[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
pfeldman at chromium.org
pfeldman at chromium.org
Thu Feb 4 21:28:07 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit c61175c218f3d3232a44598045abf168c1e3c205
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jan 26 16:33:35 2010 +0000
2010-01-26 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hather.
Web Inspector: add methods for getting resource content from within frontend.
https://bugs.webkit.org/show_bug.cgi?id=34163
* inspector/InspectorBackend.cpp:
(WebCore::InspectorBackend::getResourceContent):
* inspector/InspectorBackend.h:
* inspector/InspectorBackend.idl:
* inspector/InspectorFrontend.cpp:
(WebCore::InspectorFrontend::didGetResourceContent):
* inspector/InspectorFrontend.h:
* inspector/InspectorFrontendHost.cpp:
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
* inspector/front-end/InspectorBackendStub.js:
(.WebInspector.InspectorBackendStub.prototype.getResourceContent):
* inspector/front-end/InspectorFrontendHostStub.js:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 409ae5e..f8aba32 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,27 @@
2010-01-26 Pavel Feldman <pfeldman at chromium.org>
+ Reviewed by Timothy Hather.
+
+ Web Inspector: add methods for getting resource content from within frontend.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34163
+
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::getResourceContent):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::didGetResourceContent):
+ * inspector/InspectorFrontend.h:
+ * inspector/InspectorFrontendHost.cpp:
+ * inspector/InspectorFrontendHost.h:
+ * inspector/InspectorFrontendHost.idl:
+ * inspector/front-end/InspectorBackendStub.js:
+ (.WebInspector.InspectorBackendStub.prototype.getResourceContent):
+ * inspector/front-end/InspectorFrontendHostStub.js:
+
+2010-01-26 Pavel Feldman <pfeldman at chromium.org>
+
Not reviewed: added null check into the timeline agent getter.
* inspector/InspectorTimelineAgent.h:
diff --git a/WebCore/inspector/InspectorBackend.cpp b/WebCore/inspector/InspectorBackend.cpp
index ace27a7..999a4b7 100644
--- a/WebCore/inspector/InspectorBackend.cpp
+++ b/WebCore/inspector/InspectorBackend.cpp
@@ -122,6 +122,19 @@ void InspectorBackend::disableResourceTracking(bool always)
m_inspectorController->disableResourceTracking(always);
}
+void InspectorBackend::getResourceContent(long callId, unsigned long identifier)
+{
+ InspectorFrontend* frontend = inspectorFrontend();
+ if (!frontend)
+ return;
+
+ RefPtr<InspectorResource> resource = m_inspectorController->resources().get(identifier);
+ if (resource)
+ frontend->didGetResourceContent(callId, resource->sourceString());
+ else
+ frontend->didGetResourceContent(callId, "");
+}
+
void InspectorBackend::startTimelineProfiler()
{
if (m_inspectorController)
diff --git a/WebCore/inspector/InspectorBackend.h b/WebCore/inspector/InspectorBackend.h
index 1bde878..81c1f2d 100644
--- a/WebCore/inspector/InspectorBackend.h
+++ b/WebCore/inspector/InspectorBackend.h
@@ -68,6 +68,7 @@ public:
void enableResourceTracking(bool always);
void disableResourceTracking(bool always);
bool resourceTrackingEnabled() const;
+ void getResourceContent(long callId, unsigned long identifier);
void startTimelineProfiler();
void stopTimelineProfiler();
diff --git a/WebCore/inspector/InspectorBackend.idl b/WebCore/inspector/InspectorBackend.idl
index a2d16a0..043a9f5 100644
--- a/WebCore/inspector/InspectorBackend.idl
+++ b/WebCore/inspector/InspectorBackend.idl
@@ -42,6 +42,7 @@ module core {
boolean resourceTrackingEnabled();
void enableResourceTracking(in boolean always);
void disableResourceTracking(in boolean always);
+ void getResourceContent(in long callId, in unsigned long identifier);
void startTimelineProfiler();
void stopTimelineProfiler();
@@ -77,6 +78,7 @@ module core {
#endif
void setInjectedScriptSource(in DOMString scriptSource);
void dispatchOnInjectedScript(in long callId, in long injectedScriptId, in DOMString methodName, in DOMString arguments, in boolean async);
+
void getChildNodes(in long callId, in long nodeId);
void setAttribute(in long callId, in long elementId, in DOMString name, in DOMString value);
void removeAttribute(in long callId, in long elementId, in DOMString name);
diff --git a/WebCore/inspector/InspectorFrontend.cpp b/WebCore/inspector/InspectorFrontend.cpp
index 070f58e..d5c817d 100644
--- a/WebCore/inspector/InspectorFrontend.cpp
+++ b/WebCore/inspector/InspectorFrontend.cpp
@@ -155,6 +155,15 @@ void InspectorFrontend::removeResource(unsigned long identifier)
function.call();
}
+void InspectorFrontend::didGetResourceContent(int callId, const String& content)
+{
+ ScriptFunctionCall function(m_scriptState, m_webInspector, "dispatch");
+ function.appendArgument("didGetResourceContent");
+ function.appendArgument(callId);
+ function.appendArgument(content);
+ function.call();
+}
+
void InspectorFrontend::updateFocusedNode(long nodeId)
{
ScriptFunctionCall function(m_scriptState, m_webInspector, "dispatch");
diff --git a/WebCore/inspector/InspectorFrontend.h b/WebCore/inspector/InspectorFrontend.h
index c126d9b..0b52566 100644
--- a/WebCore/inspector/InspectorFrontend.h
+++ b/WebCore/inspector/InspectorFrontend.h
@@ -73,6 +73,7 @@ namespace WebCore {
bool updateResource(unsigned long identifier, const ScriptObject& resourceObj);
void removeResource(unsigned long identifier);
+ void didGetResourceContent(int callId, const String& content);
void updateFocusedNode(long nodeId);
void setAttachedWindow(bool attached);
diff --git a/WebCore/inspector/InspectorFrontendHost.cpp b/WebCore/inspector/InspectorFrontendHost.cpp
index 42a20d7..6cfaf5d 100644
--- a/WebCore/inspector/InspectorFrontendHost.cpp
+++ b/WebCore/inspector/InspectorFrontendHost.cpp
@@ -149,6 +149,7 @@ const String& InspectorFrontendHost::port() const
return port;
}
+// FIXME: Remove this once migrated to SourceFrame2.
void InspectorFrontendHost::addResourceSourceToFrame(long identifier, Node* frame)
{
if (!m_inspectorController)
@@ -161,6 +162,7 @@ void InspectorFrontendHost::addResourceSourceToFrame(long identifier, Node* fram
}
}
+// FIXME: Remove this once migrated to SourceFrame2.
bool InspectorFrontendHost::addSourceToFrame(const String& mimeType, const String& source, Node* frameNode)
{
ASSERT_ARG(frameNode, frameNode);
diff --git a/WebCore/inspector/InspectorFrontendHost.h b/WebCore/inspector/InspectorFrontendHost.h
index 84a54ad..a95eccf 100644
--- a/WebCore/inspector/InspectorFrontendHost.h
+++ b/WebCore/inspector/InspectorFrontendHost.h
@@ -73,6 +73,7 @@ public:
const String& platform() const;
const String& port() const;
+ // FIXME: Remove these once migrated to SourceFrame2.
void addResourceSourceToFrame(long identifier, Node* frame);
bool addSourceToFrame(const String& mimeType, const String& source, Node* frame);
diff --git a/WebCore/inspector/InspectorFrontendHost.idl b/WebCore/inspector/InspectorFrontendHost.idl
index 66bad41..7e7a62d 100644
--- a/WebCore/inspector/InspectorFrontendHost.idl
+++ b/WebCore/inspector/InspectorFrontendHost.idl
@@ -46,6 +46,7 @@ module core {
DOMString platform();
DOMString port();
+ // FIXME: Remove these once migrated to SourceFrame2.
void addResourceSourceToFrame(in long identifier, in Node frame);
boolean addSourceToFrame(in DOMString mimeType, in DOMString sourceValue, in Node frame);
diff --git a/WebCore/inspector/front-end/InspectorBackendStub.js b/WebCore/inspector/front-end/InspectorBackendStub.js
index 392ba63..01afdfa 100644
--- a/WebCore/inspector/front-end/InspectorBackendStub.js
+++ b/WebCore/inspector/front-end/InspectorBackendStub.js
@@ -100,7 +100,6 @@ WebInspector.InspectorBackendStub.prototype = {
{
},
-
addResourceSourceToFrame: function(identifier, element)
{
},
@@ -110,6 +109,13 @@ WebInspector.InspectorBackendStub.prototype = {
return false;
},
+ // FIXME: remove once migrated to SourceFrame2.
+ getResourceContent: function(callId, identifier)
+ {
+ WebInspector.didGetResourceContent(callId, "");
+ },
+
+ // FIXME: remove once migrated to SourceFrame2.
getResourceDocumentNode: function(identifier)
{
return undefined;
diff --git a/WebCore/inspector/front-end/InspectorFrontendHostStub.js b/WebCore/inspector/front-end/InspectorFrontendHostStub.js
index 9141c0f..5328029 100644
--- a/WebCore/inspector/front-end/InspectorFrontendHostStub.js
+++ b/WebCore/inspector/front-end/InspectorFrontendHostStub.js
@@ -71,10 +71,12 @@ WebInspector.InspectorFrontendHostStub.prototype = {
{
},
+ // FIXME: remove once migrated to SourceFrame2.
addResourceSourceToFrame: function(identifier, element)
{
},
+ // FIXME: remove once migrated to SourceFrame2.
addSourceToFrame: function(mimeType, source, element)
{
return false;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list