2011-07-04 Vsevolod Vlasov <vsevik@chromium.org>
authorvsevik@chromium.org <vsevik@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Jul 2011 20:07:20 +0000 (20:07 +0000)
committervsevik@chromium.org <vsevik@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Jul 2011 20:07:20 +0000 (20:07 +0000)
        Web Inspector: Show content for plugin requests in network panel.
        https://bugs.webkit.org/show_bug.cgi?id=30080

        Reviewed by Pavel Feldman.

        * Source/autotools/symbols.filter:
2011-07-04  Vsevolod Vlasov  <vsevik@chromium.org>

        Web Inspector: Show content for plugin requests in network panel.
        https://bugs.webkit.org/show_bug.cgi?id=30080

        Reviewed by Pavel Feldman.

        * http/tests/inspector/network/network-content-replacement-embed-expected.txt: Added.
        * http/tests/inspector/network/network-content-replacement-embed.html: Added.
        * http/tests/inspector/network/network-content-replacement-xhr-expected.txt: Added.
        * http/tests/inspector/network/network-content-replacement-xhr.html: Added.
        * http/tests/inspector/network/network-embed-expected.txt: Added.
        * http/tests/inspector/network/network-embed.html: Added.
        * http/tests/inspector/network/network-xhr-async-expected.txt:
        * http/tests/inspector/network/network-xhr-async.html:
        * http/tests/inspector/network/network-xhr-sync-expected.txt:
        * http/tests/inspector/network/network-xhr-sync.html:
        * http/tests/inspector/network/resources/cp1251.xml: Added.
        * http/tests/inspector/network/resources/plugin-data.php: Added.
        * http/tests/inspector/network/resources/resource.php:
        * http/tests/inspector/network/resources/utf8.xml: Added.
        * platform/chromium/test_expectations.txt:
2011-07-04  Vsevolod Vlasov  <vsevik@chromium.org>

        Web Inspector: Show content for plugin requests in network panel.
        https://bugs.webkit.org/show_bug.cgi?id=30080

        Reviewed by Pavel Feldman.

        Tests: http/tests/inspector/network/network-content-replacement-embed.html
               http/tests/inspector/network/network-content-replacement-xhr.html
               http/tests/inspector/network/network-embed.html

        * WebCore.exp.in:
        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::setResourcesDataSizeLimitsFromInternals):
        * inspector/InspectorController.h:
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::didReceiveDataImpl):
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::didReceiveData):
        * inspector/InspectorResourceAgent.cpp:
        (WebCore::InspectorResourceAgent::didReceiveResponse):
        (WebCore::InspectorResourceAgent::didReceiveData):
        (WebCore::InspectorResourceAgent::didFinishLoading):
        (WebCore::InspectorResourceAgent::setInitialXHRContent):
        (WebCore::InspectorResourceAgent::setResourcesDataSizeLimitsFromInternals):
        (WebCore::InspectorResourceAgent::getResourceContent):
        * inspector/InspectorResourceAgent.h:
        * inspector/NetworkResourcesData.cpp:
        (WebCore::NetworkResourcesData::ResourceData::ResourceData):
        (WebCore::NetworkResourcesData::ResourceData::setContent):
        (WebCore::NetworkResourcesData::ResourceData::purgeContent):
        (WebCore::NetworkResourcesData::ResourceData::createDecoder):
        (WebCore::NetworkResourcesData::ResourceData::dataLength):
        (WebCore::NetworkResourcesData::ResourceData::appendData):
        (WebCore::NetworkResourcesData::ResourceData::decodeDataToContent):
        (WebCore::NetworkResourcesData::NetworkResourcesData):
        (WebCore::NetworkResourcesData::responseReceived):
        (WebCore::NetworkResourcesData::setResourceContent):
        (WebCore::NetworkResourcesData::maybeAddResourceData):
        (WebCore::NetworkResourcesData::maybeDecodeDataToContent):
        (WebCore::NetworkResourcesData::data):
        (WebCore::NetworkResourcesData::clear):
        (WebCore::NetworkResourcesData::setResourcesDataSizeLimits):
        (WebCore::NetworkResourcesData::ensureNoDataForIdentifier):
        (WebCore::NetworkResourcesData::ensureFreeSpace):
        * inspector/NetworkResourcesData.h:
        (WebCore::NetworkResourcesData::ResourceData::hasContent):
        (WebCore::NetworkResourcesData::ResourceData::content):
        (WebCore::NetworkResourcesData::ResourceData::decoder):
        (WebCore::NetworkResourcesData::ResourceData::buffer):
        (WebCore::NetworkResourcesData::ResourceData::setBuffer):
        (WebCore::NetworkResourcesData::ResourceData::hasData):
        * inspector/front-end/Resource.js:
        (WebInspector.Resource.prototype.get contentEncoded):
        * inspector/front-end/ResourcePreviewView.js:
        (WebInspector.ResourcePreviewView.prototype.contentLoaded):
        (WebInspector.ResourcePreviewView.prototype._createEmptyView):
        (WebInspector.ResourcePreviewView.prototype._createPreviewView):
        * inspector/front-end/ResourceView.js:
        (WebInspector.ResourceView.hasTextContent):
        * loader/DocumentThreadableLoader.cpp:
        (WebCore::DocumentThreadableLoader::didReceiveData):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::willLoadMediaElementURL):
        (WebCore::FrameLoader::commitProvisionalLoad):
        (WebCore::FrameLoader::loadResourceSynchronously):
        (WebCore::FrameLoader::loadedResourceFromMemoryCache):
        * loader/ResourceLoadNotifier.cpp:
        (WebCore::ResourceLoadNotifier::didReceiveData):
        (WebCore::ResourceLoadNotifier::dispatchDidReceiveData):
        (WebCore::ResourceLoadNotifier::sendRemainingDelegateMessages):
        * loader/ResourceLoadNotifier.h:
        * loader/appcache/ApplicationCacheGroup.cpp:
        (WebCore::ApplicationCacheGroup::didReceiveData):
        * testing/Internals.cpp:
        (WebCore::Internals::setInspectorResourcesDataSizeLimits):
        * testing/Internals.h:
        * testing/Internals.idl:
2011-07-04  Vsevolod Vlasov  <vsevik@chromium.org>

        Web Inspector: Show content for plugin requests in network panel.
        https://bugs.webkit.org/show_bug.cgi?id=30080

        Reviewed by Pavel Feldman.

        * win/WebKit2.def:
        * win/WebKit2CFLite.def:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@90373 268f45cc-cd09-0410-ab3c-d52691b4dbfc

42 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/network/network-content-replacement-embed-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/network-content-replacement-embed.html [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/network-content-replacement-xhr-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/network-content-replacement-xhr.html [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/network-embed-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/network-embed.html [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/network-xhr-async-expected.txt
LayoutTests/http/tests/inspector/network/network-xhr-async.html
LayoutTests/http/tests/inspector/network/network-xhr-sync-expected.txt
LayoutTests/http/tests/inspector/network/network-xhr-sync.html
LayoutTests/http/tests/inspector/network/resources/cp1251.xml [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/resources/plugin-data.php [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/resources/resource.php
LayoutTests/http/tests/inspector/network/resources/utf8.xml [new file with mode: 0644]
LayoutTests/platform/chromium/test_expectations.txt
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/inspector/InspectorController.cpp
Source/WebCore/inspector/InspectorController.h
Source/WebCore/inspector/InspectorInstrumentation.cpp
Source/WebCore/inspector/InspectorInstrumentation.h
Source/WebCore/inspector/InspectorResourceAgent.cpp
Source/WebCore/inspector/InspectorResourceAgent.h
Source/WebCore/inspector/NetworkResourcesData.cpp
Source/WebCore/inspector/NetworkResourcesData.h
Source/WebCore/inspector/front-end/Resource.js
Source/WebCore/inspector/front-end/ResourcePreviewView.js
Source/WebCore/inspector/front-end/ResourceView.js
Source/WebCore/loader/DocumentThreadableLoader.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/ResourceLoadNotifier.cpp
Source/WebCore/loader/ResourceLoadNotifier.h
Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit2/ChangeLog
Source/WebKit2/win/WebKit2.def
Source/WebKit2/win/WebKit2CFLite.def
Source/autotools/symbols.filter

index e2a15de..8a635b6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-07-04  Vsevolod Vlasov  <vsevik@chromium.org>
+
+        Web Inspector: Show content for plugin requests in network panel.
+        https://bugs.webkit.org/show_bug.cgi?id=30080
+
+        Reviewed by Pavel Feldman.
+
+        * Source/autotools/symbols.filter:
+
 2011-07-01  Tony Chang  <tony@chromium.org>
 
         Add chromium sql directory to git ignore.
index 0c2cf67..7274ec4 100644 (file)
@@ -1,3 +1,26 @@
+2011-07-04  Vsevolod Vlasov  <vsevik@chromium.org>
+
+        Web Inspector: Show content for plugin requests in network panel.
+        https://bugs.webkit.org/show_bug.cgi?id=30080
+
+        Reviewed by Pavel Feldman.
+
+        * http/tests/inspector/network/network-content-replacement-embed-expected.txt: Added.
+        * http/tests/inspector/network/network-content-replacement-embed.html: Added.
+        * http/tests/inspector/network/network-content-replacement-xhr-expected.txt: Added.
+        * http/tests/inspector/network/network-content-replacement-xhr.html: Added.
+        * http/tests/inspector/network/network-embed-expected.txt: Added.
+        * http/tests/inspector/network/network-embed.html: Added.
+        * http/tests/inspector/network/network-xhr-async-expected.txt:
+        * http/tests/inspector/network/network-xhr-async.html:
+        * http/tests/inspector/network/network-xhr-sync-expected.txt:
+        * http/tests/inspector/network/network-xhr-sync.html:
+        * http/tests/inspector/network/resources/cp1251.xml: Added.
+        * http/tests/inspector/network/resources/plugin-data.php: Added.
+        * http/tests/inspector/network/resources/resource.php:
+        * http/tests/inspector/network/resources/utf8.xml: Added.
+        * platform/chromium/test_expectations.txt:
+
 2011-07-04  Anders Carlsson  <andersca@apple.com>
 
         NP_RemoveProperty is not called back by Safari when delete npObject.prop is encountered in JavaScript
diff --git a/LayoutTests/http/tests/inspector/network/network-content-replacement-embed-expected.txt b/LayoutTests/http/tests/inspector/network/network-content-replacement-embed-expected.txt
new file mode 100644 (file)
index 0000000..2911b2e
--- /dev/null
@@ -0,0 +1,13 @@
+CONSOLE MESSAGE: line 60: Done.
+Tests NetworkResourcesData logic for embed content replacement.
+
+
+http://127.0.0.1:8000/inspector/network/resources/resource.php?size=200
+resource.content after requesting content: null
+http://127.0.0.1:8000/inspector/network/resources/resource.php?size=100
+resource.content after requesting content: ****************************************************************************************************
+http://127.0.0.1:8000/inspector/network/resources/resource.php?size=201
+resource.content after requesting content: null
+http://127.0.0.1:8000/inspector/network/resources/resource.php?size=100
+resource.content after requesting content: ****************************************************************************************************
+
diff --git a/LayoutTests/http/tests/inspector/network/network-content-replacement-embed.html b/LayoutTests/http/tests/inspector/network/network-content-replacement-embed.html
new file mode 100644 (file)
index 0000000..99ee3db
--- /dev/null
@@ -0,0 +1,119 @@
+<html>
+<head>
+<script src="../inspector-test.js"></script>
+<script>
+
+var loadedFirstURL = false;
+function streamLoaded()
+{
+    if (loadedFirstURL)
+        return;
+
+    loadedFirstURL = true;
+    loadURLs();
+}
+
+var snifferInstalled = false;
+function onSnifferInstalled()
+{
+    snifferInstalled = true;
+    loadURLs();
+}
+
+function loadURLs()
+{
+    if (!snifferInstalled || !loadedFirstURL)
+        return;
+
+    if (!window.internals) {
+        console.log("This test can not be run as window.internals is not available.");
+        return;
+    }
+    // Each '*' symbol in original data will use two bytes in String object
+    // after decoding, hence multiplying by two.
+    internals.setInspectorResourcesDataSizeLimits(document, 2*300, 2*200);
+
+    // Here we test replacement logic. We save first two resources content,
+    // discard third resource content once we see its size exceeds limit,
+    // and finally replace first resource content with the last resource content.
+
+    plg.getURLNotify("resources/resource.php?size=200", null, "loadURL2");
+}
+
+function loadURL2()
+{
+    plg.getURLNotify("resources/resource.php?size=100", null, "loadURL3");
+}
+
+function loadURL3()
+{
+    plg.getURLNotify("resources/resource.php?size=201", null, "loadURL4");
+}
+
+function loadURL4()
+{
+    plg.getURLNotify("resources/resource.php?size=100", null, "allURLsLoaded");
+}
+
+function allURLsLoaded()
+{
+    console.log("Done.");
+}
+
+function test()
+{
+    InspectorTest.addSniffer(WebInspector.ConsoleView.prototype, "addMessage", step1);
+    InspectorTest.evaluateInPage("onSnifferInstalled()");
+
+    function dumpResource(resource, callback)
+    {
+        if (!resource)
+            return callback();
+        InspectorTest.addResult(resource.url);
+
+        function contentLoaded()
+        {
+            InspectorTest.addResult("resource.content after requesting content: " + resource.content);
+            callback();
+        }
+
+        resource.requestContent(contentLoaded);
+    }
+
+    function step1()
+    {
+        var resource = WebInspector.panels.network.resources[WebInspector.panels.network.resources.length - 4];
+        dumpResource(resource, step2);
+    }
+
+    function step2()
+    {
+        var resource = WebInspector.panels.network.resources[WebInspector.panels.network.resources.length - 3];
+        dumpResource(resource, step3);
+    }
+
+    function step3()
+    {
+        var resource = WebInspector.panels.network.resources[WebInspector.panels.network.resources.length - 2];
+        dumpResource(resource, step4);
+    }
+
+    function step4()
+    {
+        var resource = WebInspector.panels.network.resources[WebInspector.panels.network.resources.length - 1];
+        dumpResource(resource, step5);
+    }
+
+    function step5()
+    {
+        InspectorTest.completeTest();
+    }
+}
+</script>
+</head>
+<body onload="runTest()">
+    <p>Tests NetworkResourcesData logic for embed content replacement.</p>
+    <embed name="plg" type="application/x-webkit-test-netscape" src="resources/resource.php?type=image" onstreamload="streamLoaded()"></embed>
+</body>
+</html>
+
diff --git a/LayoutTests/http/tests/inspector/network/network-content-replacement-xhr-expected.txt b/LayoutTests/http/tests/inspector/network/network-content-replacement-xhr-expected.txt
new file mode 100644 (file)
index 0000000..d1ef73f
--- /dev/null
@@ -0,0 +1,12 @@
+CONSOLE MESSAGE: line 39: Done.
+Tests NetworkResourcesData logic for XHR content replacement.
+
+http://127.0.0.1:8000/inspector/network/resources/resource.php?size=200
+resource.content: null
+http://127.0.0.1:8000/inspector/network/resources/resource.php?size=100
+resource.content: ****************************************************************************************************
+http://127.0.0.1:8000/inspector/network/resources/resource.php?size=201
+resource.content: null
+http://127.0.0.1:8000/inspector/network/resources/resource.php?size=100
+resource.content: ****************************************************************************************************
+
diff --git a/LayoutTests/http/tests/inspector/network/network-content-replacement-xhr.html b/LayoutTests/http/tests/inspector/network/network-content-replacement-xhr.html
new file mode 100644 (file)
index 0000000..165cb1d
--- /dev/null
@@ -0,0 +1,97 @@
+<html>
+<head>
+<script src="../inspector-test.js"></script>
+<script src="../network-test.js"></script>
+<script>
+function loadData()
+{
+    if (!window.internals) {
+        console.log("This test can not be run as window.internals is not available.");
+        return;
+    }
+    // Each '*' symbol will use two bytes in String object, hence multiplying by two.
+    internals.setInspectorResourcesDataSizeLimits(document, 2*300, 2*200);
+
+    // Here we test replacement logic. We save first two resources content,
+    // discard third resource content once we see its size exceeds limit,
+    // and finally replace first resource content with the last resource content.
+
+    doXHR("GET", "resources/resource.php?size=200", true, xhrLoaded1);
+}
+
+function xhrLoaded1()
+{
+    doXHR("GET", "resources/resource.php?size=100", true, xhrLoaded2);
+}
+
+function xhrLoaded2()
+{
+    doXHR("GET", "resources/resource.php?size=201", true, xhrLoaded3);
+}
+
+function xhrLoaded3()
+{
+    doXHR("GET", "resources/resource.php?size=100", true, allXHRsLoaded);
+}
+
+function allXHRsLoaded()
+{
+    console.log("Done.");
+}
+
+function test()
+{
+    InspectorTest.addSniffer(WebInspector.ConsoleView.prototype, "addMessage", step1);
+    InspectorTest.evaluateInPage("loadData()");
+
+    function dumpResource(resource, callback)
+    {
+        if (!resource)
+            return callback();
+        InspectorTest.addResult(resource.url);
+
+        function contentLoaded()
+        {
+            InspectorTest.addResult("resource.content: " + resource.content);
+            callback();
+        }
+
+        resource.requestContent(contentLoaded);
+    }
+
+    function step1()
+    {
+        var resource = WebInspector.panels.network.resources[WebInspector.panels.network.resources.length - 4];
+        dumpResource(resource, step2);
+    }
+
+    function step2()
+    {
+        var resource = WebInspector.panels.network.resources[WebInspector.panels.network.resources.length - 3];
+        dumpResource(resource, step3);
+    }
+
+    function step3()
+    {
+        var resource = WebInspector.panels.network.resources[WebInspector.panels.network.resources.length - 2];
+        dumpResource(resource, step4);
+    }
+
+    function step4()
+    {
+        var resource = WebInspector.panels.network.resources[WebInspector.panels.network.resources.length - 1];
+        dumpResource(resource, step5);
+    }
+
+    function step5()
+    {
+        InspectorTest.completeTest();
+    }
+}
+</script>
+</head>
+<body onload="runTest()">
+    <p> Tests NetworkResourcesData logic for XHR content replacement.</p>
+</body>
+</html>
+
diff --git a/LayoutTests/http/tests/inspector/network/network-embed-expected.txt b/LayoutTests/http/tests/inspector/network/network-embed-expected.txt
new file mode 100644 (file)
index 0000000..bdbff0f
--- /dev/null
@@ -0,0 +1,41 @@
+CONSOLE MESSAGE: line 66: Done.
+Tests that network panel shows content for embed objects.
+
+
+http://127.0.0.1:8000/inspector/network/resources/resource.php?type=image
+resource.type: 8
+resource.content before requesting content: undefined
+resource.content after requesting content: null
+http://127.0.0.1:8000/inspector/network/resources/plugin-data.php?filename=utf8.xml&mimetype=text/html&charset=utf8
+resource.type: 8
+resource.content before requesting content: undefined
+resource.content after requesting content: <?xml version='1.0' encoding='utf-8'?>
+<root>
+  <utf8>SUССЕSS - These 'CCE' are cyrillic letters.</utf8>
+</root>
+
+http://127.0.0.1:8000/inspector/network/resources/plugin-data.php?filename=cp1251.xml&mimetype=text/html&charset=cp1251
+resource.type: 8
+resource.content before requesting content: undefined
+resource.content after requesting content: <?xml version='1.0' encoding='cp1251'?>
+<root>
+  <cp1251>SUССЕSS - These 'CCE' are cyrillic letters.</cp1251>
+</root>
+
+http://127.0.0.1:8000/inspector/network/resources/plugin-data.php?filename=utf8.xml&mimetype=application/xml
+resource.type: 8
+resource.content before requesting content: undefined
+resource.content after requesting content: <?xml version='1.0' encoding='utf-8'?>
+<root>
+  <utf8>SUССЕSS - These 'CCE' are cyrillic letters.</utf8>
+</root>
+
+http://127.0.0.1:8000/inspector/network/resources/plugin-data.php?filename=cp1251.xml&mimetype=application/xml
+resource.type: 8
+resource.content before requesting content: undefined
+resource.content after requesting content: <?xml version='1.0' encoding='cp1251'?>
+<root>
+  <cp1251>SUССЕSS - These 'CCE' are cyrillic letters.</cp1251>
+</root>
+
+
diff --git a/LayoutTests/http/tests/inspector/network/network-embed.html b/LayoutTests/http/tests/inspector/network/network-embed.html
new file mode 100644 (file)
index 0000000..6155239
--- /dev/null
@@ -0,0 +1,133 @@
+<html>
+<head>
+<script src="../inspector-test.js"></script>
+<script>
+
+var loadedFirstURL = false;
+function streamLoaded()
+{
+    if (loadedFirstURL)
+        return;
+
+    loadedFirstURL = true;
+    loadURLs();
+}
+
+var snifferInstalled = false;
+function onSnifferInstalled()
+{
+    snifferInstalled = true;
+    loadURLs();
+}
+
+function loadURLs()
+{
+    if (!snifferInstalled || !loadedFirstURL)
+        return;
+
+    if (!window.internals) {
+        console.log("This test can not be run as window.internals is not available.");
+        return;
+    }
+    // Since this test could be run together with other inspector backend cache
+    // tests, we need to reset size limits to default ones.
+    internals.setInspectorResourcesDataSizeLimits(document, 10 * 1000 * 1000, 1000 * 1000);
+
+    // Binary content should not be available.
+    plg.getURLNotify("resources/resource.php?type=image", null, "loadURL2");
+}
+
+function loadURL2()
+{
+    // This resource content should be correctly decoded.
+    plg.getURLNotify("resources/plugin-data.php?filename=utf8.xml&mimetype=text/html&charset=utf8", null, "loadURL3");
+}
+
+function loadURL3()
+{
+    // This resource content should be correctly decoded.
+    plg.getURLNotify("resources/plugin-data.php?filename=cp1251.xml&mimetype=text/html&charset=cp1251", null, "loadURL4");
+}
+
+function loadURL4()
+{
+    // This resource content should be correctly decoded.
+    plg.getURLNotify("resources/plugin-data.php?filename=utf8.xml&mimetype=application/xml", null, "loadURL5");
+}
+
+function loadURL5()
+{
+    // This resource content should be correctly decoded.
+    plg.getURLNotify("resources/plugin-data.php?filename=cp1251.xml&mimetype=application/xml", null, "allURLsLoaded");
+}
+
+function allURLsLoaded()
+{
+    console.log("Done.");
+}
+
+function test()
+{
+    InspectorTest.addSniffer(WebInspector.ConsoleView.prototype, "addMessage", step1);
+    InspectorTest.evaluateInPage("onSnifferInstalled()");
+
+    function dumpResource(resource, callback)
+    {
+        if (!resource)
+            return callback();
+        InspectorTest.addResult(resource.url);
+        InspectorTest.addResult("resource.type: " + resource.type);
+        InspectorTest.addResult("resource.content before requesting content: " + resource.content);
+
+        function contentLoaded()
+        {
+            InspectorTest.addResult("resource.content after requesting content: " + resource.content);
+            callback();
+        }
+
+        resource.requestContent(contentLoaded);
+    }
+
+    function step1()
+    {
+        var resource = WebInspector.panels.network.resources[WebInspector.panels.network.resources.length - 5];
+        dumpResource(resource, step2);
+    }
+
+    function step2()
+    {
+        var resource = WebInspector.panels.network.resources[WebInspector.panels.network.resources.length - 4];
+        dumpResource(resource, step3);
+    }
+
+    function step3()
+    {
+        var resource = WebInspector.panels.network.resources[WebInspector.panels.network.resources.length - 3];
+        dumpResource(resource, step4);
+    }
+
+    function step4()
+    {
+        var resource = WebInspector.panels.network.resources[WebInspector.panels.network.resources.length - 2];
+        dumpResource(resource, step5);
+    }
+
+    function step5()
+    {
+        var resource = WebInspector.panels.network.resources[WebInspector.panels.network.resources.length - 1];
+        dumpResource(resource, step6);
+    }
+
+    function step6()
+    {
+        InspectorTest.completeTest();
+    }
+}
+</script>
+</head>
+<body onload="runTest()">
+    <p>Tests that network panel shows content for embed objects.</p>
+    <embed name="plg" type="application/x-webkit-test-netscape" src="resources/resource.php?type=image" onstreamload="streamLoaded()"></embed>
+</body>
+</html>
+
index 45e5551..565fd77 100644 (file)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 13: Done.
+CONSOLE MESSAGE: line 21: Done.
 Tests XHR network resource type and content for asynchronous requests. Bug 61205
 
 http://127.0.0.1:8000/inspector/network/resources/resource.php
index 32621cb..bd8b240 100644 (file)
@@ -5,6 +5,14 @@
 <script>
 function loadData()
 {
+    if (!window.internals) {
+        console.log("This test can not be run as window.internals is not available.");
+        return;
+    }
+    // Since this test could be run together with other inspector backend cache
+    // tests, we need to reset size limits to default ones.
+    internals.setInspectorResourcesDataSizeLimits(document, 10 * 1000 * 1000, 1000 * 1000);
+
     doXHR("GET", "resources/resource.php", true, resourceLoaded);
 }
 
index 344347c..be84f43 100644 (file)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 13: Done.
+CONSOLE MESSAGE: line 21: Done.
 Tests XHR network resource type and content for synchronous requests. Bug 61205
 
 http://127.0.0.1:8000/inspector/network/resources/resource.php
index 8f2480e..00d289d 100644 (file)
@@ -5,6 +5,14 @@
 <script>
 function loadData()
 {
+    if (!window.internals) {
+        console.log("This test can not be run as window.internals is not available.");
+        return;
+    }
+    // Since this test could be run together with other inspector backend cache
+    // tests, we need to reset size limits to default ones.
+    internals.setInspectorResourcesDataSizeLimits(document, 10 * 1000 * 1000, 1000 * 1000);
+
     doXHR("GET", "resources/resource.php", false, resourceLoaded);
 }
 
diff --git a/LayoutTests/http/tests/inspector/network/resources/cp1251.xml b/LayoutTests/http/tests/inspector/network/resources/cp1251.xml
new file mode 100644 (file)
index 0000000..32285f3
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='cp1251'?>
+<root>
+  <cp1251>SUÑÑÅSS - These 'CCE' are cyrillic letters.</cp1251>
+</root>
diff --git a/LayoutTests/http/tests/inspector/network/resources/plugin-data.php b/LayoutTests/http/tests/inspector/network/resources/plugin-data.php
new file mode 100644 (file)
index 0000000..321d9e8
--- /dev/null
@@ -0,0 +1,15 @@
+<?php
+    $mimetype = $_GET["mimetype"];
+    $filename = $_GET["filename"];
+    $charset = $_GET["charset"];
+
+    header("Expires: Thu, 01 Dec 2003 16:00:00 GMT");
+    header("Cache-Control: no-store, no-cache, must-revalidate");
+    header("Pragma: no-cache");
+    if ($charset)
+        header("Content-Type: " . $mimetype . "; charset=" . $charset);
+    else
+        header("Content-Type: " . $mimetype);
+
+    readfile($filename);
+?>
index 9e5607c..3e1f185 100644 (file)
@@ -26,7 +26,7 @@
     else if ($type == "image")
         header("Content-Type: image/png");
     else
-        header("Content-Type: text/html");
+        header("Content-Type: text/plain");
 
     # Flush headers and sleep bofore sending response
     if ($send) {
diff --git a/LayoutTests/http/tests/inspector/network/resources/utf8.xml b/LayoutTests/http/tests/inspector/network/resources/utf8.xml
new file mode 100644 (file)
index 0000000..07ee481
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='utf-8'?>
+<root>
+  <utf8>SUССЕSS - These 'CCE' are cyrillic letters.</utf8>
+</root>
index fd0886b..f400523 100644 (file)
@@ -656,6 +656,10 @@ WONTFIX SKIP : inspector/extensions = FAIL
 WONTFIX SKIP : http/tests/inspector/extensions-headers.html = FAIL
 WONTFIX SKIP : http/tests/inspector/extensions-resources-redirect.html = FAIL
 
+// There is no enough plugins support in DRT
+WONTFIX SKIP : http/tests/inspector/network/network-embed.html = FAIL
+WONTFIX SKIP : http/tests/inspector/network/network-content-replacement-embed.html = FAIL
+
 // Inspector tests in Debug build are very slow.
 BUG_DRT WIN LINUX DEBUG SLOW : inspector = PASS
 BUG_DRT WIN LINUX DEBUG SLOW : http/tests/inspector = PASS
index 048c014..44d2263 100644 (file)
@@ -1,3 +1,82 @@
+2011-07-04  Vsevolod Vlasov  <vsevik@chromium.org>
+
+        Web Inspector: Show content for plugin requests in network panel.
+        https://bugs.webkit.org/show_bug.cgi?id=30080
+
+        Reviewed by Pavel Feldman.
+
+        Tests: http/tests/inspector/network/network-content-replacement-embed.html
+               http/tests/inspector/network/network-content-replacement-xhr.html
+               http/tests/inspector/network/network-embed.html
+
+        * WebCore.exp.in:
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::setResourcesDataSizeLimitsFromInternals):
+        * inspector/InspectorController.h:
+        * inspector/InspectorInstrumentation.cpp:
+        (WebCore::InspectorInstrumentation::didReceiveDataImpl):
+        * inspector/InspectorInstrumentation.h:
+        (WebCore::InspectorInstrumentation::didReceiveData):
+        * inspector/InspectorResourceAgent.cpp:
+        (WebCore::InspectorResourceAgent::didReceiveResponse):
+        (WebCore::InspectorResourceAgent::didReceiveData):
+        (WebCore::InspectorResourceAgent::didFinishLoading):
+        (WebCore::InspectorResourceAgent::setInitialXHRContent):
+        (WebCore::InspectorResourceAgent::setResourcesDataSizeLimitsFromInternals):
+        (WebCore::InspectorResourceAgent::getResourceContent):
+        * inspector/InspectorResourceAgent.h:
+        * inspector/NetworkResourcesData.cpp:
+        (WebCore::NetworkResourcesData::ResourceData::ResourceData):
+        (WebCore::NetworkResourcesData::ResourceData::setContent):
+        (WebCore::NetworkResourcesData::ResourceData::purgeContent):
+        (WebCore::NetworkResourcesData::ResourceData::createDecoder):
+        (WebCore::NetworkResourcesData::ResourceData::dataLength):
+        (WebCore::NetworkResourcesData::ResourceData::appendData):
+        (WebCore::NetworkResourcesData::ResourceData::decodeDataToContent):
+        (WebCore::NetworkResourcesData::NetworkResourcesData):
+        (WebCore::NetworkResourcesData::responseReceived):
+        (WebCore::NetworkResourcesData::setResourceContent):
+        (WebCore::NetworkResourcesData::maybeAddResourceData):
+        (WebCore::NetworkResourcesData::maybeDecodeDataToContent):
+        (WebCore::NetworkResourcesData::data):
+        (WebCore::NetworkResourcesData::clear):
+        (WebCore::NetworkResourcesData::setResourcesDataSizeLimits):
+        (WebCore::NetworkResourcesData::ensureNoDataForIdentifier):
+        (WebCore::NetworkResourcesData::ensureFreeSpace):
+        * inspector/NetworkResourcesData.h:
+        (WebCore::NetworkResourcesData::ResourceData::hasContent):
+        (WebCore::NetworkResourcesData::ResourceData::content):
+        (WebCore::NetworkResourcesData::ResourceData::decoder):
+        (WebCore::NetworkResourcesData::ResourceData::buffer):
+        (WebCore::NetworkResourcesData::ResourceData::setBuffer):
+        (WebCore::NetworkResourcesData::ResourceData::hasData):
+        * inspector/front-end/Resource.js:
+        (WebInspector.Resource.prototype.get contentEncoded):
+        * inspector/front-end/ResourcePreviewView.js:
+        (WebInspector.ResourcePreviewView.prototype.contentLoaded):
+        (WebInspector.ResourcePreviewView.prototype._createEmptyView):
+        (WebInspector.ResourcePreviewView.prototype._createPreviewView):
+        * inspector/front-end/ResourceView.js:
+        (WebInspector.ResourceView.hasTextContent):
+        * loader/DocumentThreadableLoader.cpp:
+        (WebCore::DocumentThreadableLoader::didReceiveData):
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::willLoadMediaElementURL):
+        (WebCore::FrameLoader::commitProvisionalLoad):
+        (WebCore::FrameLoader::loadResourceSynchronously):
+        (WebCore::FrameLoader::loadedResourceFromMemoryCache):
+        * loader/ResourceLoadNotifier.cpp:
+        (WebCore::ResourceLoadNotifier::didReceiveData):
+        (WebCore::ResourceLoadNotifier::dispatchDidReceiveData):
+        (WebCore::ResourceLoadNotifier::sendRemainingDelegateMessages):
+        * loader/ResourceLoadNotifier.h:
+        * loader/appcache/ApplicationCacheGroup.cpp:
+        (WebCore::ApplicationCacheGroup::didReceiveData):
+        * testing/Internals.cpp:
+        (WebCore::Internals::setInspectorResourcesDataSizeLimits):
+        * testing/Internals.h:
+        * testing/Internals.idl:
+
 2011-07-04  Jeff Timanus  <twiz@chromium.org>
 
         Reviewed by Stephen White.
index 4bf0255..519eeda 100644 (file)
@@ -1301,6 +1301,7 @@ __ZNK7WebCore8Document16dashboardRegionsEv
 __ZNK7WebCore8Document20cacheDocumentElementEv
 __ZNK7WebCore8Document31displayStringModifiedByEncodingERKN3WTF6StringE
 __ZNK7WebCore8Document4bodyEv
+__ZNK7WebCore8Document4pageEv
 __ZNK7WebCore8Document6domainEv
 __ZNK7WebCore8Document6loaderEv
 __ZNK7WebCore8IntPointcv7CGPointEv
@@ -1581,6 +1582,7 @@ __ZN7WebCore19InspectorController25evaluateForTestInFrontendElRKN3WTF6StringE
 __ZN7WebCore19InspectorController26setInspectorFrontendClientEN3WTF10PassOwnPtrINS_23InspectorFrontendClientEEE
 __ZN7WebCore19InspectorController26stopUserInitiatedProfilingEv
 __ZN7WebCore19InspectorController27startUserInitiatedProfilingEv
+__ZN7WebCore19InspectorController39setResourcesDataSizeLimitsFromInternalsEii
 __ZN7WebCore19InspectorController4showEv
 __ZN7WebCore19InspectorController5closeEv
 __ZN7WebCore28InspectorFrontendClientLocal12moveWindowByEff
index bbc48ac..4ab1271 100644 (file)
@@ -489,6 +489,11 @@ void InspectorController::resume()
 
 #endif
 
+void InspectorController::setResourcesDataSizeLimitsFromInternals(int maximumResourcesContentSize, int maximumSingleResourceContentSize)
+{
+    m_resourceAgent->setResourcesDataSizeLimitsFromInternals(maximumResourcesContentSize, maximumSingleResourceContentSize);
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(INSPECTOR)
index 739b00b..a68a13a 100644 (file)
@@ -120,6 +120,8 @@ public:
     void resume();
 #endif
 
+    void setResourcesDataSizeLimitsFromInternals(int maximumResourcesContentSize, int maximumSingleResourceContentSize);
+
 private:
     friend class PostWorkerNotificationToFrontendTask;
 
index a9e2caa..2da167d 100644 (file)
@@ -492,10 +492,10 @@ void InspectorInstrumentation::continueWithPolicyIgnoreImpl(Frame* frame, Docume
     didReceiveResourceResponseButCanceledImpl(frame, loader, identifier, r);
 }
 
-void InspectorInstrumentation::didReceiveContentLengthImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, int dataLength, int encodedDataLength)
+void InspectorInstrumentation::didReceiveDataImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, const char* data, int dataLength, int encodedDataLength)
 {
     if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())
-        resourceAgent->didReceiveContentLength(identifier, dataLength, encodedDataLength);
+        resourceAgent->didReceiveData(identifier, data, dataLength, encodedDataLength);
 }
 
 void InspectorInstrumentation::didFinishLoadingImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, DocumentLoader* loader, double finishTime)
index 20b0eb8..e3e3274 100644 (file)
@@ -126,7 +126,7 @@ public:
     static void continueAfterXFrameOptionsDenied(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&);
     static void continueWithPolicyDownload(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&);
     static void continueWithPolicyIgnore(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&);
-    static void didReceiveContentLength(Frame*, unsigned long identifier, int dataLength, int encodedDataLength);
+    static void didReceiveData(Frame*, unsigned long identifier, const char* data, int dataLength, int encodedDataLength);
     static void didFinishLoading(Frame*, DocumentLoader*, unsigned long identifier, double finishTime);
     static void didFailLoading(Frame*, DocumentLoader*, unsigned long identifier, const ResourceError&);
     static void resourceRetrievedByXMLHttpRequest(ScriptExecutionContext*, unsigned long identifier, const String& sourceString, const String& url, const String& sendURL, unsigned sendLineNumber);
@@ -254,7 +254,7 @@ private:
     static void continueAfterXFrameOptionsDeniedImpl(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&);
     static void continueWithPolicyDownloadImpl(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&);
     static void continueWithPolicyIgnoreImpl(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&);
-    static void didReceiveContentLengthImpl(InstrumentingAgents*, unsigned long identifier, int dataLength, int encodedDataLength);
+    static void didReceiveDataImpl(InstrumentingAgents*, unsigned long identifier, const char* data, int dataLength, int encodedDataLength);
     static void didFinishLoadingImpl(InstrumentingAgents*, unsigned long identifier, DocumentLoader*, double finishTime);
     static void didFailLoadingImpl(InstrumentingAgents*, unsigned long identifier, DocumentLoader*, const ResourceError&);
     static void resourceRetrievedByXMLHttpRequestImpl(InstrumentingAgents*, unsigned long identifier, const String& sourceString, const String& url, const String& sendURL, unsigned sendLineNumber);
@@ -764,11 +764,11 @@ inline void InspectorInstrumentation::continueWithPolicyIgnore(Frame* frame, Doc
 #endif
 }
 
-inline void InspectorInstrumentation::didReceiveContentLength(Frame* frame, unsigned long identifier, int dataLength, int encodedDataLength)
+inline void InspectorInstrumentation::didReceiveData(Frame* frame, unsigned long identifier, const char* data, int dataLength, int encodedDataLength)
 {
 #if ENABLE(INSPECTOR)
     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
-        didReceiveContentLengthImpl(instrumentingAgents, identifier, dataLength, encodedDataLength);
+        didReceiveDataImpl(instrumentingAgents, identifier, data, dataLength, encodedDataLength);
 #endif
 }
 
index 169ed66..cc53d1b 100644 (file)
@@ -251,18 +251,21 @@ void InspectorResourceAgent::didReceiveResponse(unsigned long identifier, Docume
         else if (m_loadingXHRSynchronously || m_resourcesData->resourceType(identifier) == InspectorPageAgent::XHRResource)
             type = InspectorPageAgent::XHRResource;
 
-        m_resourcesData->responseReceived(identifier, m_pageAgent->frameId(loader->frame()), response.url());
+        m_resourcesData->responseReceived(identifier, m_pageAgent->frameId(loader->frame()), response);
     }
     m_resourcesData->setResourceType(identifier, type);
     m_frontend->responseReceived(static_cast<int>(identifier), currentTime(), InspectorPageAgent::resourceTypeString(type), resourceResponse);
     // If we revalidated the resource and got Not modified, send content length following didReceiveResponse
-    // as there will be no calls to didReceiveContentLength from the network stack.
+    // as there will be no calls to didReceiveData from the network stack.
     if (cachedResourceSize && response.httpStatusCode() == 304)
-        didReceiveContentLength(identifier, cachedResourceSize, 0);
+        didReceiveData(identifier, 0, cachedResourceSize, 0);
 }
 
-void InspectorResourceAgent::didReceiveContentLength(unsigned long identifier, int dataLength, int encodedDataLength)
+void InspectorResourceAgent::didReceiveData(unsigned long identifier, const char* data, int dataLength, int encodedDataLength)
 {
+    if (data && m_resourcesData->resourceType(identifier) == InspectorPageAgent::OtherResource)
+        m_resourcesData->maybeAddResourceData(identifier, data, dataLength);
+
     m_frontend->dataReceived(static_cast<int>(identifier), currentTime(), dataLength, encodedDataLength);
 }
 
@@ -271,6 +274,8 @@ void InspectorResourceAgent::didFinishLoading(unsigned long identifier, Document
     if (m_resourcesData->resourceType(identifier) == InspectorPageAgent::DocumentResource)
         m_resourcesData->addResourceSharedBuffer(identifier, loader->frameLoader()->documentLoader()->mainResourceData(), loader->frame()->document()->inputEncoding());
 
+    m_resourcesData->maybeDecodeDataToContent(identifier);
+
     if (!finishTime)
         finishTime = currentTime();
 
@@ -297,7 +302,7 @@ void InspectorResourceAgent::setInitialScriptContent(unsigned long identifier, c
 
 void InspectorResourceAgent::setInitialXHRContent(unsigned long identifier, const String& sourceString)
 {
-    m_resourcesData->addResourceContent(identifier, sourceString);
+    m_resourcesData->setResourceContent(identifier, sourceString);
 }
 
 void InspectorResourceAgent::didReceiveXHRResponse(unsigned long identifier)
@@ -398,6 +403,12 @@ void InspectorResourceAgent::setBackgroundEventsCollectionEnabled(ErrorString*,
     return m_state->setBoolean(ResourceAgentState::backgroundEventsCollectionEnabled, enabled);
 }
 
+// called from Internals for layout test purposes.
+void InspectorResourceAgent::setResourcesDataSizeLimitsFromInternals(int maximumResourcesContentSize, int maximumSingleResourceContentSize)
+{
+    m_resourcesData->setResourcesDataSizeLimits(maximumResourcesContentSize, maximumSingleResourceContentSize);
+}
+
 void InspectorResourceAgent::enable(ErrorString*)
 {
     enable();
@@ -437,7 +448,7 @@ void InspectorResourceAgent::initializeBackgroundCollection()
 
 void InspectorResourceAgent::getResourceContent(ErrorString* errorString, unsigned long identifier, String* content, bool* base64Encoded)
 {
-    NetworkResourcesData::ResourceData* resourceData = m_resourcesData->data(identifier);
+    NetworkResourcesData::ResourceData const* resourceData = m_resourcesData->data(identifier);
     if (!resourceData) {
         *errorString = "No resource with given identifier found";
         return;
index b4410b3..b802af4 100644 (file)
@@ -90,7 +90,7 @@ public:
     void willSendRequest(unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse& redirectResponse);
     void markResourceAsCached(unsigned long identifier);
     void didReceiveResponse(unsigned long identifier, DocumentLoader* laoder, const ResourceResponse&);
-    void didReceiveContentLength(unsigned long identifier, int dataLength, int encodedDataLength);
+    void didReceiveData(unsigned long identifier, const char* data, int dataLength, int encodedDataLength);
     void didFinishLoading(unsigned long identifier, DocumentLoader*, double finishTime);
     void didFailLoading(unsigned long identifier, DocumentLoader*, const ResourceError&);
     void didLoadResourceFromMemoryCache(DocumentLoader*, const CachedResource*);
@@ -113,6 +113,9 @@ public:
     void isBackgroundEventsCollectionEnabled(ErrorString*, bool* enabled);
     void setBackgroundEventsCollectionEnabled(ErrorString*, bool enabled);
 
+    // called from Internals for layout test purposes.
+    void setResourcesDataSizeLimitsFromInternals(int maximumResourcesContentSize, int maximumSingleResourceContentSize);
+
     // Called from frontend
     void enable(ErrorString*);
     void disable(ErrorString*);
index 588d1eb..346b299 100644 (file)
 #include "config.h"
 #include "NetworkResourcesData.h"
 
+#include "DOMImplementation.h"
+#include "SharedBuffer.h"
+#include "TextResourceDecoder.h"
+
 #if ENABLE(INSPECTOR)
 
 namespace {
 // 10MB
 static int maximumResourcesContentSize = 10 * 1000 * 1000;
+
+// 1MB
+static int maximumSingleResourceContentSize = 1000 * 1000;
 }
 
 namespace WebCore {
 
+
 // ResourceData
 NetworkResourcesData::ResourceData::ResourceData(unsigned long identifier, const String& loaderId)
     : m_identifier(identifier)
     , m_loaderId(loaderId)
-    , m_hasContent(false)
     , m_isContentPurged(false)
     , m_type(InspectorPageAgent::OtherResource)
 {
 }
 
-String NetworkResourcesData::ResourceData::content()
+void NetworkResourcesData::ResourceData::setContent(const String& content)
 {
-    return m_hasContent ? m_contentBuilder.toString() : String();
+    ASSERT(!hasData());
+    ASSERT(!hasContent());
+    m_content = content;
 }
 
-void NetworkResourcesData::ResourceData::appendContent(const String& content)
+unsigned NetworkResourcesData::ResourceData::purgeContent()
 {
-    m_contentBuilder.append(content);
-    m_hasContent = true;
+    unsigned result = 0;
+    if (hasData()) {
+        ASSERT(!hasContent());
+        result = m_dataBuffer->size();
+        m_dataBuffer = nullptr;
+    }
+
+    if (hasContent()) {
+        ASSERT(!hasData());
+        result = 2 * m_content.length();
+        m_content = String();
+    }
+    m_isContentPurged = true;
+    return result;
 }
 
-unsigned NetworkResourcesData::ResourceData::purgeContent()
+void NetworkResourcesData::ResourceData::createDecoder(const String& mimeType, const String& textEncodingName)
 {
-    unsigned length = m_contentBuilder.toStringPreserveCapacity().length();
-    m_contentBuilder.clear();
-    m_isContentPurged = true;
-    m_hasContent = false;
-    return length;
+    if (!textEncodingName.isEmpty())
+        m_decoder = TextResourceDecoder::create("text/plain", textEncodingName);
+    else if (mimeType == "text/plain")
+        m_decoder = TextResourceDecoder::create("text/plain", "ISO-8859-1");
+    else if (mimeType == "text/html")
+        m_decoder = TextResourceDecoder::create("text/html", "UTF-8");
+    else if (DOMImplementation::isXMLMIMEType(mimeType)) {
+        m_decoder = TextResourceDecoder::create("application/xml");
+        m_decoder->useLenientXMLDecoding();
+    }
+}
+
+int NetworkResourcesData::ResourceData::dataLength() const
+{
+    return m_dataBuffer ? m_dataBuffer->size() : 0;
+}
+
+void NetworkResourcesData::ResourceData::appendData(const char* data, int dataLength)
+{
+    ASSERT(!hasContent());
+    if (!m_dataBuffer)
+        m_dataBuffer = SharedBuffer::create(data, dataLength);
+    else
+        m_dataBuffer->append(data, dataLength);
+}
+
+int NetworkResourcesData::ResourceData::decodeDataToContent()
+{
+    ASSERT(!hasContent());
+    int dataLength = m_dataBuffer->size();
+    m_content = m_decoder->decode(m_dataBuffer->data(), m_dataBuffer->size());
+    m_dataBuffer = nullptr;
+    return 2 * m_content.length() - dataLength;
 }
 
 // NetworkResourcesData
 NetworkResourcesData::NetworkResourcesData()
     : m_contentSize(0)
+    , m_maximumResourcesContentSize(maximumResourcesContentSize)
+    , m_maximumSingleResourceContentSize(maximumSingleResourceContentSize)
 {
 }
 
@@ -85,13 +136,14 @@ void NetworkResourcesData::resourceCreated(unsigned long identifier, const Strin
     m_identifierToResourceDataMap.set(identifier, new ResourceData(identifier, loaderId));
 }
 
-void NetworkResourcesData::responseReceived(unsigned long identifier, const String& frameId, const String& url)
+void NetworkResourcesData::responseReceived(unsigned long identifier, const String& frameId, const ResourceResponse& response)
 {
     ResourceData* resourceData = m_identifierToResourceDataMap.get(identifier);
     if (!resourceData)
         return;
     resourceData->setFrameId(frameId);
-    resourceData->setUrl(url);
+    resourceData->setUrl(response.url());
+    resourceData->createDecoder(response.mimeType(), response.textEncodingName());
 }
 
 void NetworkResourcesData::setResourceType(unsigned long identifier, InspectorPageAgent::ResourceType type)
@@ -110,21 +162,54 @@ InspectorPageAgent::ResourceType NetworkResourcesData::resourceType(unsigned lon
     return resourceData->type();
 }
 
-void NetworkResourcesData::addResourceContent(unsigned long identifier, const String& content)
+void NetworkResourcesData::setResourceContent(unsigned long identifier, const String& content)
 {
     ResourceData* resourceData = m_identifierToResourceDataMap.get(identifier);
     if (!resourceData)
         return;
+    int dataLength = 2 * content.length();
+    if (dataLength > m_maximumSingleResourceContentSize)
+        return;
     if (resourceData->isContentPurged())
         return;
-    if (ensureFreeSpace(content.length()) && !resourceData->isContentPurged()) {
-        if (!resourceData->hasContent())
-            m_identifiersDeque.append(identifier);
-        resourceData->appendContent(content);
-        m_contentSize += content.length();
+    if (ensureFreeSpace(dataLength) && !resourceData->isContentPurged()) {
+        m_identifiersDeque.append(identifier);
+        resourceData->setContent(content);
+        m_contentSize += dataLength;
     }
 }
 
+void NetworkResourcesData::maybeAddResourceData(unsigned long identifier, const char* data, int dataLength)
+{
+    ResourceData* resourceData = m_identifierToResourceDataMap.get(identifier);
+    if (!resourceData)
+        return;
+    if (!resourceData->decoder())
+        return;
+    if (resourceData->dataLength() + dataLength > m_maximumSingleResourceContentSize)
+        m_contentSize -= resourceData->purgeContent();
+    if (resourceData->isContentPurged())
+        return;
+    if (ensureFreeSpace(dataLength) && !resourceData->isContentPurged()) {
+        m_identifiersDeque.append(identifier);
+        resourceData->appendData(data, dataLength);
+        m_contentSize += dataLength;
+    }
+}
+
+void NetworkResourcesData::maybeDecodeDataToContent(unsigned long identifier)
+{
+    ResourceData* resourceData = m_identifierToResourceDataMap.get(identifier);
+    if (!resourceData)
+        return;
+    if (!resourceData->hasData())
+        return;
+    m_contentSize += resourceData->decodeDataToContent();
+    int dataLength = 2 * resourceData->content().length();
+    if (dataLength > m_maximumSingleResourceContentSize)
+        m_contentSize -= resourceData->purgeContent();
+}
+
 void NetworkResourcesData::addCachedResource(unsigned long identifier, CachedResource* cachedResource)
 {
     if (!m_identifierToResourceDataMap.contains(identifier))
@@ -143,7 +228,7 @@ void NetworkResourcesData::addResourceSharedBuffer(unsigned long identifier, Pas
     resourceData->setTextEncodingName(textEncodingName);
 }
 
-NetworkResourcesData::ResourceData* NetworkResourcesData::data(unsigned long identifier)
+NetworkResourcesData::ResourceData const* NetworkResourcesData::data(unsigned long identifier)
 {
     return m_identifierToResourceDataMap.get(identifier);
 }
@@ -151,6 +236,7 @@ NetworkResourcesData::ResourceData* NetworkResourcesData::data(unsigned long ide
 void NetworkResourcesData::clear(const String& preservedLoaderId)
 {
     m_identifiersDeque.clear();
+    m_contentSize = 0;
 
     ResourceDataMap preservedMap;
 
@@ -166,11 +252,19 @@ void NetworkResourcesData::clear(const String& preservedLoaderId)
     m_identifierToResourceDataMap.swap(preservedMap);
 }
 
+void NetworkResourcesData::setResourcesDataSizeLimits(int maximumResourcesContentSize, int maximumSingleResourceContentSize)
+{
+    clear();
+    m_maximumResourcesContentSize = maximumResourcesContentSize;
+    m_maximumSingleResourceContentSize = maximumSingleResourceContentSize;
+}
+
+
 void NetworkResourcesData::ensureNoDataForIdentifier(unsigned long identifier)
 {
     ResourceData* resourceData = m_identifierToResourceDataMap.get(identifier);
     if (resourceData) {
-        if (resourceData->hasContent())
+        if (resourceData->hasContent() || resourceData->hasData())
             m_contentSize -= resourceData->purgeContent();
         delete resourceData;
         m_identifierToResourceDataMap.remove(identifier);
@@ -179,10 +273,10 @@ void NetworkResourcesData::ensureNoDataForIdentifier(unsigned long identifier)
 
 bool NetworkResourcesData::ensureFreeSpace(int size)
 {
-    if (size > maximumResourcesContentSize)
+    if (size > m_maximumResourcesContentSize)
         return false;
 
-    while (size > maximumResourcesContentSize - m_contentSize) {
+    while (size > m_maximumResourcesContentSize - m_contentSize) {
         unsigned long identifier = m_identifiersDeque.takeFirst();
         ResourceData* resourceData = m_identifierToResourceDataMap.get(identifier);
         if (resourceData)
index 78cdbeb..d547aa7 100644 (file)
@@ -31,7 +31,6 @@
 
 #include "CachedResourceHandle.h"
 #include "InspectorPageAgent.h"
-#include "SharedBuffer.h"
 
 #include <wtf/Deque.h>
 #include <wtf/HashMap.h>
 
 namespace WebCore {
 
-class SharedBuffer;
 class CachedResource;
+class SharedBuffer;
+class TextResourceDecoder;
 
 class NetworkResourcesData {
 public:
     class ResourceData {
+        friend class NetworkResourcesData;
     public:
         ResourceData(unsigned long identifier, const String& loaderId);
 
@@ -61,38 +62,47 @@ public:
         String url() const { return m_url; }
         void setUrl(const String& url) { m_url = url; }
 
-        bool hasContent() const { return m_hasContent; }
-        String content();
-        void appendContent(const String&);
+        bool hasContent() const { return !m_content.isNull(); }
+        String content() const { return m_content; }
+        void setContent(const String&);
 
         bool isContentPurged() const { return m_isContentPurged; }
-        void setIsContentPurged(bool isContentPurged) { m_isContentPurged = isContentPurged; }
         unsigned purgeContent();
 
         InspectorPageAgent::ResourceType type() const { return m_type; }
         void setType(InspectorPageAgent::ResourceType type) { m_type = type; }
 
-        PassRefPtr<SharedBuffer> buffer() const { return m_buffer; }
-        void setBuffer(PassRefPtr<SharedBuffer> buffer) { m_buffer = buffer; }
-
         String textEncodingName() const { return m_textEncodingName; }
         void setTextEncodingName(const String& textEncodingName) { m_textEncodingName = textEncodingName; }
 
+        TextResourceDecoder* decoder() const { return m_decoder.get(); }
+        void createDecoder(const String& mimeType, const String& textEncodingName);
+
+        PassRefPtr<SharedBuffer> buffer() const { return m_buffer; }
+        void setBuffer(PassRefPtr<SharedBuffer> buffer) { m_buffer = buffer; }
+
         CachedResource* cachedResource() const { return m_cachedResource.get(); }
         void setCachedResource(CachedResource* cachedResource) { m_cachedResource = cachedResource; }
 
     private:
+        bool hasData() const { return m_dataBuffer; }
+        int dataLength() const;
+        void appendData(const char* data, int dataLength);
+        int decodeDataToContent();
+
         unsigned long m_identifier;
         String m_loaderId;
         String m_frameId;
         String m_url;
-        bool m_hasContent;
-        StringBuilder m_contentBuilder;
+        String m_content;
+        RefPtr<SharedBuffer> m_dataBuffer;
         bool m_isContentPurged;
         InspectorPageAgent::ResourceType m_type;
 
-        RefPtr<SharedBuffer> m_buffer;
         String m_textEncodingName;
+        RefPtr<TextResourceDecoder> m_decoder;
+
+        RefPtr<SharedBuffer> m_buffer;
         CachedResourceHandle<CachedResource> m_cachedResource;
     };
 
@@ -101,15 +111,19 @@ public:
     ~NetworkResourcesData();
 
     void resourceCreated(unsigned long identifier, const String& loaderId);
-    void responseReceived(unsigned long identifier, const String& frameId, const String& url);
+    void responseReceived(unsigned long identifier, const String& frameId, const ResourceResponse&);
     void setResourceType(unsigned long identifier, InspectorPageAgent::ResourceType);
     InspectorPageAgent::ResourceType resourceType(unsigned long identifier);
-    void addResourceContent(unsigned long identifier, const String& content);
+    void setResourceContent(unsigned long identifier, const String& content);
+    void maybeAddResourceData(unsigned long identifier, const char* data, int dataLength);
+    void maybeDecodeDataToContent(unsigned long identifier);
     void addCachedResource(unsigned long identifier, CachedResource*);
     void addResourceSharedBuffer(unsigned long identifier, PassRefPtr<SharedBuffer>, const String& textEncodingName);
-    ResourceData* data(unsigned long identifier);
+    ResourceData const* data(unsigned long identifier);
     void clear(const String& preservedLoaderId = String());
 
+    void setResourcesDataSizeLimits(int maximumResourcesContentSize, int maximumSingleResourceContentSize);
+
 private:
     void ensureNoDataForIdentifier(unsigned long identifier);
     bool ensureFreeSpace(int size);
@@ -119,6 +133,8 @@ private:
     typedef HashMap<unsigned long, ResourceData*> ResourceDataMap;
     ResourceDataMap m_identifierToResourceDataMap;
     int m_contentSize;
+    int m_maximumResourcesContentSize;
+    int m_maximumSingleResourceContentSize;
 };
 
 } // namespace WebCore
index ec1d148..a104035 100644 (file)
@@ -782,6 +782,11 @@ WebInspector.Resource.prototype = {
         return this._content;
     },
 
+    get contentEncoded()
+    {
+        return this._contentEncoded;
+    },
+
     get contentTimestamp()
     {
         return this._contentTimestamp;
index 3fbce47..58c617f 100644 (file)
@@ -39,7 +39,7 @@ WebInspector.ResourcePreviewView.prototype = {
     {
         if (!this.resource.content) {
             if (!this._emptyView) {
-                this._emptyView = new WebInspector.EmptyView(WebInspector.UIString("This request has no preview available."));
+                this._emptyView = this._createEmptyView();
                 this._emptyView.show(this.element);
             }
         } else {
@@ -47,13 +47,18 @@ WebInspector.ResourcePreviewView.prototype = {
                 this._emptyView.detach();
                 delete this._emptyView;
             }
-            if (!this._view)
-                this._view = this._createInnerView();
-            this._view.show(this.element);
+            if (!this._previewView)
+                this._previewView = this._createPreviewView();
+            this._previewView.show(this.element);
         }
     },
 
-    _createInnerView: function()
+    _createEmptyView: function()
+    {
+        return new WebInspector.EmptyView(WebInspector.UIString("This request has no preview available."));
+    },
+    
+    _createPreviewView: function()
     {
         if (this.resource.hasErrorStatusCode() && this.resource.content)
             return new WebInspector.ResourceHTMLView(this.resource);
@@ -66,6 +71,9 @@ WebInspector.ResourcePreviewView.prototype = {
 
         if (this._responseView.sourceView)
             return this._responseView.sourceView;
+        
+        if (this.resource.category === WebInspector.resourceCategories.other)
+            return this._createEmptyView();
 
         return WebInspector.ResourceView.nonSourceViewForResource(this.resource);
     }
index 7226f67..106e8b1 100644 (file)
@@ -51,6 +51,8 @@ WebInspector.ResourceView.hasTextContent = function(resource)
     case WebInspector.resourceCategories.xhr:
     case WebInspector.resourceCategories.stylesheets:
         return true;
+    case WebInspector.resourceCategories.other:
+        return resource.content && !resource.contentEncoded;
     default:
         return false;
     }
index eff6399..4656d2c 100644 (file)
@@ -229,7 +229,7 @@ void DocumentThreadableLoader::didReceiveData(SubresourceLoader* loader, const c
 
 #if ENABLE(INSPECTOR)
     if (m_preflightRequestIdentifier)
-        InspectorInstrumentation::didReceiveContentLength(m_document->frame(), m_preflightRequestIdentifier, 0, dataLength);
+        InspectorInstrumentation::didReceiveData(m_document->frame(), m_preflightRequestIdentifier, 0, 0, dataLength);
 #endif
 
     // Preflight data should be invisible to clients.
index e2f283f..960cafe 100644 (file)
@@ -1382,7 +1382,7 @@ bool FrameLoader::willLoadMediaElementURL(KURL& url)
     unsigned long identifier;
     ResourceError error;
     requestFromDelegate(request, identifier, error);
-    notifier()->sendRemainingDelegateMessages(m_documentLoader.get(), identifier, ResourceResponse(url, String(), -1, String(), String()), -1, -1, error);
+    notifier()->sendRemainingDelegateMessages(m_documentLoader.get(), identifier, ResourceResponse(url, String(), -1, String(), String()), 0, -1, -1, error);
 
     url = request.url();
 
@@ -1780,7 +1780,7 @@ void FrameLoader::commitProvisionalLoad()
             // FIXME: If we get a resource with more than 2B bytes, this code won't do the right thing.
             // However, with today's computers and networking speeds, this won't happen in practice.
             // Could be an issue with a giant local file.
-            notifier()->sendRemainingDelegateMessages(m_documentLoader.get(), identifier, response, static_cast<int>(response.expectedContentLength()), 0, error);
+            notifier()->sendRemainingDelegateMessages(m_documentLoader.get(), identifier, response, 0, static_cast<int>(response.expectedContentLength()), 0, error);
         }
         
         pageCache()->remove(history()->currentItem());
@@ -2590,7 +2590,7 @@ unsigned long FrameLoader::loadResourceSynchronously(const ResourceRequest& requ
 #endif
     }
     int encodedDataLength = response.resourceLoadInfo() ? static_cast<int>(response.resourceLoadInfo()->encodedDataLength) : -1;
-    notifier()->sendRemainingDelegateMessages(m_documentLoader.get(), identifier, response, data.size(), encodedDataLength, error);
+    notifier()->sendRemainingDelegateMessages(m_documentLoader.get(), identifier, response, data.data(), data.size(), encodedDataLength, error);
     return identifier;
 }
 
@@ -2883,7 +2883,7 @@ void FrameLoader::loadedResourceFromMemoryCache(const CachedResource* resource)
     ResourceError error;
     requestFromDelegate(request, identifier, error);
     InspectorInstrumentation::markResourceAsCached(page, identifier);
-    notifier()->sendRemainingDelegateMessages(m_documentLoader.get(), identifier, resource->response(), resource->encodedSize(), 0, error);
+    notifier()->sendRemainingDelegateMessages(m_documentLoader.get(), identifier, resource->response(), 0, resource->encodedSize(), 0, error);
 }
 
 void FrameLoader::applyUserAgent(ResourceRequest& request)
index ac46a94..f4513bb 100644 (file)
@@ -79,7 +79,7 @@ void ResourceLoadNotifier::didReceiveData(ResourceLoader* loader, const char* da
     if (Page* page = m_frame->page())
         page->progress()->incrementProgress(loader->identifier(), data, dataLength);
 
-    dispatchDidReceiveContentLength(loader->documentLoader(), loader->identifier(), dataLength, encodedDataLength);
+    dispatchDidReceiveData(loader->documentLoader(), loader->identifier(), data, dataLength, encodedDataLength);
 }
 
 void ResourceLoadNotifier::didFinishLoad(ResourceLoader* loader, double finishTime)
@@ -130,11 +130,11 @@ void ResourceLoadNotifier::dispatchDidReceiveResponse(DocumentLoader* loader, un
     InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, loader, r);
 }
 
-void ResourceLoadNotifier::dispatchDidReceiveContentLength(DocumentLoader* loader, unsigned long identifier, int dataLength, int encodedDataLength)
+void ResourceLoadNotifier::dispatchDidReceiveData(DocumentLoader* loader, unsigned long identifier, const char* data, int dataLength, int encodedDataLength)
 {
     m_frame->loader()->client()->dispatchDidReceiveContentLength(loader, identifier, dataLength);
 
-    InspectorInstrumentation::didReceiveContentLength(m_frame, identifier, dataLength, encodedDataLength);
+    InspectorInstrumentation::didReceiveData(m_frame, identifier, data, dataLength, encodedDataLength);
 }
 
 void ResourceLoadNotifier::dispatchDidFinishLoading(DocumentLoader* loader, unsigned long identifier, double finishTime)
@@ -152,13 +152,13 @@ void ResourceLoadNotifier::dispatchTransferLoadingResourceFromPage(unsigned long
     oldPage->progress()->completeProgress(identifier);
 }
 
-void ResourceLoadNotifier::sendRemainingDelegateMessages(DocumentLoader* loader, unsigned long identifier, const ResourceResponse& response, int dataLength, int encodedDataLength, const ResourceError& error)
+void ResourceLoadNotifier::sendRemainingDelegateMessages(DocumentLoader* loader, unsigned long identifier, const ResourceResponse& response, const char* data, int dataLength, int encodedDataLength, const ResourceError& error)
 {
     if (!response.isNull())
         dispatchDidReceiveResponse(loader, identifier, response);
 
     if (dataLength > 0)
-        dispatchDidReceiveContentLength(loader, identifier, dataLength, encodedDataLength);
+        dispatchDidReceiveData(loader, identifier, data, dataLength, encodedDataLength);
 
     if (error.isNull())
         dispatchDidFinishLoading(loader, identifier, 0);
index dafd619..6a9296c 100644 (file)
@@ -60,11 +60,11 @@ public:
     void assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest&);
     void dispatchWillSendRequest(DocumentLoader*, unsigned long identifier, ResourceRequest&, const ResourceResponse& redirectResponse);
     void dispatchDidReceiveResponse(DocumentLoader*, unsigned long identifier, const ResourceResponse&);
-    void dispatchDidReceiveContentLength(DocumentLoader*, unsigned long identifier, int dataLength, int encodedDataLength);
+    void dispatchDidReceiveData(DocumentLoader*, unsigned long identifier, const char* data, int dataLength, int encodedDataLength);
     void dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier, double finishTime);
     void dispatchTransferLoadingResourceFromPage(unsigned long, DocumentLoader*, const ResourceRequest&, Page*);
 
-    void sendRemainingDelegateMessages(DocumentLoader*, unsigned long identifier, const ResourceResponse&, int dataLength, int encodedDataLength, const ResourceError&);
+    void sendRemainingDelegateMessages(DocumentLoader*, unsigned long identifier, const ResourceResponse&, const char* data, int dataLength, int encodedDataLength, const ResourceError&);
 
 private:
     Frame* m_frame;
index 45b184c..64f7b68 100644 (file)
@@ -571,7 +571,7 @@ void ApplicationCacheGroup::didReceiveData(ResourceHandle* handle, const char* d
     UNUSED_PARAM(encodedDataLength);
 
 #if ENABLE(INSPECTOR)
-    InspectorInstrumentation::didReceiveContentLength(m_frame, m_currentResourceIdentifier, length, 0);
+    InspectorInstrumentation::didReceiveData(m_frame, m_currentResourceIdentifier, 0, length, 0);
 #endif
 
     if (handle == m_manifestHandle) {
index 86cdcbe..fb95e1b 100644 (file)
@@ -30,6 +30,8 @@
 #include "Document.h"
 #include "Element.h"
 #include "ExceptionCode.h"
+#include "InspectorController.h"
+#include "Page.h"
 #include "RenderTreeAsText.h"
 #include "ShadowContentElement.h"
 #include "ShadowRoot.h"
@@ -123,4 +125,15 @@ String Internals::shadowPseudoId(Element* element, ExceptionCode& ec)
     return element->shadowPseudoId().string();
 }
 
+#if ENABLE(INSPECTOR)
+void Internals::setInspectorResourcesDataSizeLimits(Document* document, int maximumResourcesContentSize, int maximumSingleResourceContentSize, ExceptionCode& ec)
+{
+    if (!document || !document->page() || !document->page()->inspectorController()) {
+        ec = INVALID_ACCESS_ERR;
+        return;
+    }
+    document->page()->inspectorController()->setResourcesDataSizeLimitsFromInternals(maximumResourcesContentSize, maximumSingleResourceContentSize);
+}
+#endif
+
 }
index e677e32..150ab8e 100644 (file)
@@ -53,6 +53,10 @@ public:
     String shadowPseudoId(Element*, ExceptionCode&);
     PassRefPtr<Element> createShadowContentElement(Document*, ExceptionCode&);
 
+#if ENABLE(INSPECTOR)
+    void setInspectorResourcesDataSizeLimits(Document*, int maximumResourcesContentSize, int maximumSingleResourceContentSize, ExceptionCode&);
+#endif
+
 private:
     Internals();
 };
index b82871e..6aba803 100644 (file)
@@ -35,6 +35,8 @@ module window {
         void removeShadowRoot(in Element host) raises (DOMException);
         DOMString shadowPseudoId(in Element element) raises (DOMException);
         Element createShadowContentElement(in Document document) raises(DOMException);
+
+        void setInspectorResourcesDataSizeLimits(in Document document, in long maximumResourcesContentSize, in long maximumSingleResourceContentSize) raises(DOMException);
     };
 }
 
index e207f93..1eb11e2 100644 (file)
@@ -1,3 +1,13 @@
+2011-07-04  Vsevolod Vlasov  <vsevik@chromium.org>
+
+        Web Inspector: Show content for plugin requests in network panel.
+        https://bugs.webkit.org/show_bug.cgi?id=30080
+
+        Reviewed by Pavel Feldman.
+
+        * win/WebKit2.def:
+        * win/WebKit2CFLite.def:
+
 2011-07-04  Anders Carlsson  <andersca@apple.com>
 
         NP_RemoveProperty is not called back by Safari when delete npObject.prop is encountered in JavaScript
index 668755d..1967fb0 100644 (file)
@@ -144,8 +144,10 @@ EXPORTS
         ?getCachedDOMStructure@WebCore@@YAPAVStructure@JSC@@PAVJSDOMGlobalObject@1@PBUClassInfo@3@@Z
         ?isPreloaded@CachedResourceLoader@WebCore@@QBE_NABVString@WTF@@@Z
         ?jsStringSlowCase@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@AAV?$HashMap@PAVStringImpl@WTF@@V?$Weak@VJSString@JSC@@@JSC@@UStringHash@2@U?$HashTraits@PAVStringImpl@WTF@@@2@U?$HashTraits@V?$Weak@VJSString@JSC@@@JSC@@@2@@WTF@@PAVStringImpl@6@@Z
+        ?page@Document@WebCore@@QBEPAVPage@2@XZ
         ?removeShadowRoot@Element@WebCore@@QAEXXZ
         ?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
+        ?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z
         ?shadowRoot@Element@WebCore@@QBEPAVShadowRoot@2@XZ
         ?toDocument@WebCore@@YAPAVDocument@1@VJSValue@JSC@@@Z
         ?toElement@WebCore@@YAPAVElement@1@VJSValue@JSC@@@Z
index 1871ce7..a1876dd 100644 (file)
@@ -137,8 +137,10 @@ EXPORTS
         ?getCachedDOMStructure@WebCore@@YAPAVStructure@JSC@@PAVJSDOMGlobalObject@1@PBUClassInfo@3@@Z
         ?isPreloaded@CachedResourceLoader@WebCore@@QBE_NABVString@WTF@@@Z
         ?jsStringSlowCase@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@AAV?$HashMap@PAVStringImpl@WTF@@V?$Weak@VJSString@JSC@@@JSC@@UStringHash@2@U?$HashTraits@PAVStringImpl@WTF@@@2@U?$HashTraits@V?$Weak@VJSString@JSC@@@JSC@@@2@@WTF@@PAVStringImpl@6@@Z
+        ?page@Document@WebCore@@QBEPAVPage@2@XZ
         ?removeShadowRoot@Element@WebCore@@QAEXXZ
         ?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
+        ?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z
         ?shadowRoot@Element@WebCore@@QBEPAVShadowRoot@2@XZ
         ?toDocument@WebCore@@YAPAVDocument@1@VJSValue@JSC@@@Z
         ?toElement@WebCore@@YAPAVElement@1@VJSValue@JSC@@@Z
index 16842de..bc920a9 100644 (file)
@@ -36,6 +36,7 @@ _ZN7WebCore13createWrapperEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_4NodeE;
 _ZN7WebCore15setDOMExceptionEPN3JSC9ExecStateEi;
 _ZN7WebCore16jsStringSlowCaseEPN3JSC9ExecStateERN3WTF7HashMapIPNS3_10StringImplENS0_4WeakINS0_8JSStringEEENS3_10StringHashENS3_10HashTraitsIS6_EENSB_IS9_EEEES6_;
 _ZN7WebCore17cacheDOMStructureEPNS_17JSDOMGlobalObjectEPN3JSC9StructureEPKNS2_9ClassInfoE;
+_ZN7WebCore19InspectorController39setResourcesDataSizeLimitsFromInternalsEii;
 _ZN7WebCore20ShadowContentElement6createEPNS_8DocumentE;
 _ZN7WebCore21getCachedDOMStructureEPNS_17JSDOMGlobalObjectEPKN3JSC9ClassInfoE;
 _ZN7WebCore22externalRepresentationEPNS_7ElementEj;
@@ -50,6 +51,7 @@ _ZN7WebCore9toElementEN3JSC7JSValueE;
 _ZNK7WebCore20CachedResourceLoader11isPreloadedERKN3WTF6StringE;
 _ZNK7WebCore6JSNode21pushEventHandlerScopeEPN3JSC9ExecStateEPNS1_14ScopeChainNodeE;
 _ZNK7WebCore7Element10shadowRootEv;
+_ZNK7WebCore8Document4pageEv;
 local:
 _Z*;
 cti*;