Title: [89503] trunk
Revision
89503
Author
[email protected]
Date
2011-06-22 17:28:56 -0700 (Wed, 22 Jun 2011)

Log Message

2011-06-22  Nate Chapin  <[email protected]>

        Reviewed by Adam Barth.

        Add symbols required for window.internals.
        https://bugs.webkit.org/show_bug.cgi?id=62066

        * Source/autotools/symbols.filter:
2011-06-22  Nate Chapin  <[email protected]>

        Reviewed by Adam Barth.

        Test updates for https://bugs.webkit.org/show_bug.cgi?id=62066.

        * fast/preloader/scan-body-from-head-import.html: Use window.internals.
        * fast/preloader/scan-body-from-head-script.html: Use window.internals.
        * http/tests/loading/cross-origin-XHR-willLoadRequest-expected.txt:
        * http/tests/loading/cross-origin-XHR-willLoadRequest.html:
        * http/tests/loading/preload-append-scan-expected.txt:
        * http/tests/loading/preload-append-scan.php: Use window.internals.
        * http/tests/misc/favicon-loads-with-icon-loading-override-expected.txt:
        * http/tests/misc/link-rel-icon-beforeload-expected.txt:
        * platform/chromium-linux/fast/preloader/scan-body-from-head-script-expected.txt:  Removed.
2011-06-22  Nate Chapin  <[email protected]>

        Reviewed by Adam Barth.

        Don't let all subresources keep isLoadingInAPISense() from
        returning false, only requests that affect
        CachedResourceRequest::requestCount().

        Also, add a callback to Internals to determine whether
        a resource has been preloaded.

        https://bugs.webkit.org/show_bug.cgi?id=62066

        * WebCore.exp.in:
        * dom/Document.cpp: Add m_loadEventFinished.
        * dom/Document.h:
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::isLoadingInAPISense):
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::isPreloaded):
        * loader/cache/CachedResourceLoader.h:
        * testing/Internals.cpp:
        (WebCore::Internals::isPreloaded):
        * testing/Internals.h:
        * testing/Internals.idl:
2011-06-22  Nate Chapin  <[email protected]>

        Reviewed by Adam Barth.

        Add win symbols for new window.internals functionality.
        https://bugs.webkit.org/show_bug.cgi?id=62066

        * win/WebKit2.def:
2011-06-22  Nate Chapin  <[email protected]>

        Reviewed by Adam Barth.

        Add libsoup to libWebCoreInternals build.
        https://bugs.webkit.org/show_bug.cgi?id=62066

        * GNUmakefile.am:

Modified Paths

Removed Paths

Diff

Modified: trunk/ChangeLog (89502 => 89503)


--- trunk/ChangeLog	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/ChangeLog	2011-06-23 00:28:56 UTC (rev 89503)
@@ -1,3 +1,12 @@
+2011-06-22  Nate Chapin  <[email protected]>
+
+        Reviewed by Adam Barth.
+
+        Add symbols required for window.internals.
+        https://bugs.webkit.org/show_bug.cgi?id=62066
+
+        * Source/autotools/symbols.filter:
+
 2011-06-22  Martin Robinson  <[email protected]>
 
         Reviewed by Adam Roben.

Modified: trunk/LayoutTests/ChangeLog (89502 => 89503)


--- trunk/LayoutTests/ChangeLog	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/LayoutTests/ChangeLog	2011-06-23 00:28:56 UTC (rev 89503)
@@ -1,3 +1,19 @@
+2011-06-22  Nate Chapin  <[email protected]>
+
+        Reviewed by Adam Barth.
+
+        Test updates for https://bugs.webkit.org/show_bug.cgi?id=62066.
+
+        * fast/preloader/scan-body-from-head-import.html: Use window.internals.
+        * fast/preloader/scan-body-from-head-script.html: Use window.internals.
+        * http/tests/loading/cross-origin-XHR-willLoadRequest-expected.txt:
+        * http/tests/loading/cross-origin-XHR-willLoadRequest.html:
+        * http/tests/loading/preload-append-scan-expected.txt:
+        * http/tests/loading/preload-append-scan.php: Use window.internals.
+        * http/tests/misc/favicon-loads-with-icon-loading-override-expected.txt:
+        * http/tests/misc/link-rel-icon-beforeload-expected.txt:
+        * platform/chromium-linux/fast/preloader/scan-body-from-head-script-expected.txt:  Removed.
+
 2011-06-22  Jessie Berlin  <[email protected]>
 
         [WebKit2 Tests] plugins/npruntime/embed-property-equality.html failing since introduction in

Modified: trunk/LayoutTests/fast/preloader/scan-body-from-head-import-expected.txt (89502 => 89503)


--- trunk/LayoutTests/fast/preloader/scan-body-from-head-import-expected.txt	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/LayoutTests/fast/preloader/scan-body-from-head-import-expected.txt	2011-06-23 00:28:56 UTC (rev 89503)
@@ -1,5 +1,3 @@
-style1.css has MIME type text/css
-image1.png has MIME type image/png
 
 This tests that resources in the body which block parsing (script, css) are preloaded
 ahead of other resources (images). It requires DumpRenderTree to see the log of what
@@ -10,4 +8,4 @@
 </style>
 </body>
 </html>
-
+PASS

Modified: trunk/LayoutTests/fast/preloader/scan-body-from-head-import.html (89502 => 89503)


--- trunk/LayoutTests/fast/preloader/scan-body-from-head-import.html	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/LayoutTests/fast/preloader/scan-body-from-head-import.html	2011-06-23 00:28:56 UTC (rev 89503)
@@ -1,10 +1,19 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController) {
+if (window.layoutTestController)
     layoutTestController.dumpAsText();
-    layoutTestController.dumpResourceResponseMIMETypes();
+
+function checkForPreload() {
+    var result;
+    if (internals.isPreloaded(document, "resources/image1.png") && internals.isPreloaded(document, "resources/style1.css"))
+        result = "PASS";
+    else
+        result = "FAIL";
+    document.getElementsByTagName("body")[0].appendChild(document.createTextNode(result));
 }
+
+window.addEventListener("DOMContentLoaded", checkForPreload, false);
 </script>
 <script src=""
 </head>

Modified: trunk/LayoutTests/fast/preloader/scan-body-from-head-script-expected.txt (89502 => 89503)


--- trunk/LayoutTests/fast/preloader/scan-body-from-head-script-expected.txt	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/LayoutTests/fast/preloader/scan-body-from-head-script-expected.txt	2011-06-23 00:28:56 UTC (rev 89503)
@@ -1,5 +1,3 @@
-script1.js has MIME type application/x-_javascript_
-image1.png has MIME type image/png
 
 This tests that resources in the body which block parsing (script, css) are preloaded
 ahead of other resources (images). It requires DumpRenderTree to see the log of what
@@ -8,4 +6,4 @@
 <script src=""
 </body>
 </html>
-
+PASS

Modified: trunk/LayoutTests/fast/preloader/scan-body-from-head-script.html (89502 => 89503)


--- trunk/LayoutTests/fast/preloader/scan-body-from-head-script.html	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/LayoutTests/fast/preloader/scan-body-from-head-script.html	2011-06-23 00:28:56 UTC (rev 89503)
@@ -1,10 +1,19 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController) {
+if (window.layoutTestController)
     layoutTestController.dumpAsText();
-    layoutTestController.dumpResourceResponseMIMETypes();
+
+function checkForPreload() {
+    var result;
+    if (internals.isPreloaded(document, "resources/image1.png") && internals.isPreloaded(document, "resources/script1.js"))
+        result = "PASS";
+    else
+        result = "FAIL";
+    document.getElementsByTagName("body")[0].appendChild(document.createTextNode(result));
 }
+
+window.addEventListener("DOMContentLoaded", checkForPreload, false);
 </script>
 <script src=""
 </head>

Modified: trunk/LayoutTests/http/tests/loading/cross-origin-XHR-willLoadRequest-expected.txt (89502 => 89503)


--- trunk/LayoutTests/http/tests/loading/cross-origin-XHR-willLoadRequest-expected.txt	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/LayoutTests/http/tests/loading/cross-origin-XHR-willLoadRequest-expected.txt	2011-06-23 00:28:56 UTC (rev 89503)
@@ -2,6 +2,6 @@
 main frame - didCommitLoadForFrame
 main frame - didFinishDocumentLoadForFrame
 main frame - didHandleOnloadEventsForFrame
+main frame - didFinishLoadForFrame
 CONSOLE MESSAGE: line 1: XMLHttpRequest cannot load http://localhost:8000/loading/resources/foo.txt. Origin http://127.0.0.1:8000 is not allowed by Access-Control-Allow-Origin.
-main frame - didFinishLoadForFrame
 The console message above should report failure to load foo.txt due to cross-origin access, not a network error.

Modified: trunk/LayoutTests/http/tests/loading/cross-origin-XHR-willLoadRequest.html (89502 => 89503)


--- trunk/LayoutTests/http/tests/loading/cross-origin-XHR-willLoadRequest.html	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/LayoutTests/http/tests/loading/cross-origin-XHR-willLoadRequest.html	2011-06-23 00:28:56 UTC (rev 89503)
@@ -1,8 +1,13 @@
 <script>
     layoutTestController.dumpAsText();
+    layoutTestController.waitUntilDone();
     layoutTestController.addURLToRedirect("http://localhost:8000/loading/resources/bar.txt", "http://localhost:8000/loading/resources/foo.txt");
 
     var request = new XMLHttpRequest();
+    request._onreadystatechange_ = function() {
+        if (request.readyState == 4)
+            layoutTestController.notifyDone();
+    }
     request.open("GET", "http://localhost:8000/loading/resources/bar.txt");
     request.send();
 </script>

Modified: trunk/LayoutTests/http/tests/loading/preload-append-scan-expected.txt (89502 => 89503)


--- trunk/LayoutTests/http/tests/loading/preload-append-scan-expected.txt	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/LayoutTests/http/tests/loading/preload-append-scan-expected.txt	2011-06-23 00:28:56 UTC (rev 89503)
@@ -1,11 +1,9 @@
 main frame - didStartProvisionalLoadForFrame
 main frame - didCommitLoadForFrame
-slow-script.pl has MIME type application/_javascript_
 main frame - didFinishDocumentLoadForFrame
 main frame - didHandleOnloadEventsForFrame
-preload-test.jpg has MIME type image/jpeg
 main frame - didFinishLoadForFrame
 
 This test needs to be run in DRT. Preload scanner should see the image resource.
 <img src=""
-
+PASS

Modified: trunk/LayoutTests/http/tests/loading/preload-append-scan.php (89502 => 89503)


--- trunk/LayoutTests/http/tests/loading/preload-append-scan.php	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/LayoutTests/http/tests/loading/preload-append-scan.php	2011-06-23 00:28:56 UTC (rev 89503)
@@ -5,11 +5,22 @@
 # Spam a bunch of As to make sure we blow past any buffers.
 print str_repeat("A", 2048);
 ?> -->
+<body>
 <script>
-if (window.layoutTestController) {
+if (window.layoutTestController)
     layoutTestController.dumpAsText();
-    layoutTestController.dumpResourceResponseMIMETypes();
+
+function checkForPreload() {
+    var result;
+    if (internals.isPreloaded(document, "resources/preload-test.jpg"))
+        result = "PASS";
+    else
+        result = "FAIL";
+    document.getElementsByTagName("body")[0].appendChild(document.createTextNode(result));
 }
+
+window.addEventListener("DOMContentLoaded", checkForPreload, false);
+
 function debug(x) {}
 </script>
 <script src=""

Modified: trunk/LayoutTests/http/tests/misc/favicon-loads-with-icon-loading-override-expected.txt (89502 => 89503)


--- trunk/LayoutTests/http/tests/misc/favicon-loads-with-icon-loading-override-expected.txt	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/LayoutTests/http/tests/misc/favicon-loads-with-icon-loading-override-expected.txt	2011-06-23 00:28:56 UTC (rev 89503)
@@ -2,8 +2,6 @@
 http://127.0.0.1:8000/misc/favicon-loads-with-icon-loading-override.html - willSendRequest <NSURLRequest URL http://127.0.0.1:8000/misc/favicon-loads-with-icon-loading-override.html, main document URL http://127.0.0.1:8000/misc/favicon-loads-with-icon-loading-override.html, http method GET> redirectResponse (null)
 http://127.0.0.1:8000/misc/favicon-loads-with-icon-loading-override.html - didReceiveResponse <NSURLResponse http://127.0.0.1:8000/misc/favicon-loads-with-icon-loading-override.html, http status code 200>
 http://127.0.0.1:8000/misc/resources/favicon.ico - willSendRequest <NSURLRequest URL http://127.0.0.1:8000/misc/resources/favicon.ico, main document URL http://127.0.0.1:8000/misc/favicon-loads-with-icon-loading-override.html, http method GET> redirectResponse (null)
-http://127.0.0.1:8000/misc/favicon-loads-with-icon-loading-override.html - didFinishLoading
-http://127.0.0.1:8000/misc/resources/favicon.ico - didReceiveResponse <NSURLResponse http://127.0.0.1:8000/misc/resources/favicon.ico, http status code 200>
 https://bugs.webkit.org/show_bug.cgi?id=58292 - Provide new setting to allow site icon loading despite disabling automatic image loading in general.
 Resource load callbacks will reveal if the favicon still gets loaded if automatic image loading is disabled, but site icon image loading override is enabled. 
 

Modified: trunk/LayoutTests/http/tests/misc/link-rel-icon-beforeload-expected.txt (89502 => 89503)


--- trunk/LayoutTests/http/tests/misc/link-rel-icon-beforeload-expected.txt	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/LayoutTests/http/tests/misc/link-rel-icon-beforeload-expected.txt	2011-06-23 00:28:56 UTC (rev 89503)
@@ -2,6 +2,4 @@
 http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html - willSendRequest <NSURLRequest URL http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html, main document URL http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html, http method GET> redirectResponse (null)
 http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html - didReceiveResponse <NSURLResponse http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html, http status code 200>
 http://127.0.0.1:8000/favicon.ico - willSendRequest <NSURLRequest URL http://127.0.0.1:8000/favicon.ico, main document URL http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html, http method GET> redirectResponse (null)
-http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html - didFinishLoading
-http://127.0.0.1:8000/favicon.ico - didReceiveResponse <NSURLResponse http://127.0.0.1:8000/favicon.ico, http status code 200>
 This test should not show a request for the favicon dont-load-this.ico, since the beforeload handler on the favicon link returns false. Therefore, if the resource request list below shows a request for dont-load-this.ico, then this test has failed.

Deleted: trunk/LayoutTests/platform/chromium-linux/fast/preloader/scan-body-from-head-script-expected.txt (89502 => 89503)


--- trunk/LayoutTests/platform/chromium-linux/fast/preloader/scan-body-from-head-script-expected.txt	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/LayoutTests/platform/chromium-linux/fast/preloader/scan-body-from-head-script-expected.txt	2011-06-23 00:28:56 UTC (rev 89503)
@@ -1,11 +0,0 @@
-script1.js has MIME type application/_javascript_
-image1.png has MIME type image/png
-
-This tests that resources in the body which block parsing (script, css) are preloaded
-ahead of other resources (images). It requires DumpRenderTree to see the log of what
-resources are loaded.
-<img src=""
-<script src=""
-</body>
-</html>
-

Modified: trunk/Source/WebCore/ChangeLog (89502 => 89503)


--- trunk/Source/WebCore/ChangeLog	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/Source/WebCore/ChangeLog	2011-06-23 00:28:56 UTC (rev 89503)
@@ -1,3 +1,29 @@
+2011-06-22  Nate Chapin  <[email protected]>
+
+        Reviewed by Adam Barth.
+
+        Don't let all subresources keep isLoadingInAPISense() from
+        returning false, only requests that affect
+        CachedResourceRequest::requestCount().
+
+        Also, add a callback to Internals to determine whether
+        a resource has been preloaded.
+
+        https://bugs.webkit.org/show_bug.cgi?id=62066
+
+        * WebCore.exp.in:
+        * dom/Document.cpp: Add m_loadEventFinished.
+        * dom/Document.h:
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::isLoadingInAPISense):
+        * loader/cache/CachedResourceLoader.cpp:
+        (WebCore::CachedResourceLoader::isPreloaded):
+        * loader/cache/CachedResourceLoader.h:
+        * testing/Internals.cpp:
+        (WebCore::Internals::isPreloaded):
+        * testing/Internals.h:
+        * testing/Internals.idl:
+
 2011-06-22  Chris Rogers  <[email protected]>
 
         Reviewed by David Levin.

Modified: trunk/Source/WebCore/WebCore.exp.in (89502 => 89503)


--- trunk/Source/WebCore/WebCore.exp.in	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/Source/WebCore/WebCore.exp.in	2011-06-23 00:28:56 UTC (rev 89503)
@@ -1179,6 +1179,7 @@
 __ZNK7WebCore19ResourceRequestBase3urlEv
 __ZNK7WebCore19ResourceRequestBase6isNullEv
 __ZNK7WebCore19ResourceRequestBase7isEmptyEv
+__ZNK7WebCore20CachedResourceLoader11isPreloadedERKN3WTF6StringE
 __ZNK7WebCore20HTMLTableCellElement9cellAboveEv
 __ZNK7WebCore20ResourceResponseBase14httpStatusCodeEv
 __ZNK7WebCore20ResourceResponseBase14httpStatusTextEv

Modified: trunk/Source/WebCore/dom/Document.cpp (89502 => 89503)


--- trunk/Source/WebCore/dom/Document.cpp	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/Source/WebCore/dom/Document.cpp	2011-06-23 00:28:56 UTC (rev 89503)
@@ -387,6 +387,7 @@
     , m_ignoreDestructiveWriteCount(0)
     , m_titleSetExplicitly(false)
     , m_updateFocusAppearanceTimer(this, &Document::updateFocusAppearanceTimerFired)
+    , m_loadEventFinished(false)
     , m_startTime(currentTime())
     , m_overMinimumLayoutThreshold(false)
     , m_extraLayoutDelay(0)
@@ -3400,6 +3401,7 @@
     if (!domWindow)
         return;
     domWindow->dispatchLoadEvent();
+    m_loadEventFinished = true;
 }
 
 void Document::enqueueWindowEvent(PassRefPtr<Event> event)

Modified: trunk/Source/WebCore/dom/Document.h (89502 => 89503)


--- trunk/Source/WebCore/dom/Document.h	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/Source/WebCore/dom/Document.h	2011-06-23 00:28:56 UTC (rev 89503)
@@ -997,6 +997,7 @@
     void statePopped(SerializedScriptValue*);
 
     bool processingLoadEvent() const { return m_processingLoadEvent; }
+    bool loadEventFinished() const { return m_loadEventFinished; }
 
 #if ENABLE(DATABASE)
     virtual bool allowDatabaseAccess() const;
@@ -1278,8 +1279,12 @@
     Timer<Document> m_updateFocusAppearanceTimer;
 
     Element* m_cssTarget;
-    
+
+    // FIXME: Merge these 2 variables into an enum. Also, FrameLoader::m_didCallImplicitClose
+    // is almost a duplication of this data, so that should probably get merged in too.
     bool m_processingLoadEvent;
+    bool m_loadEventFinished;
+
     RefPtr<SerializedScriptValue> m_pendingStateObject;
     double m_startTime;
     bool m_overMinimumLayoutThreshold;

Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (89502 => 89503)


--- trunk/Source/WebCore/loader/DocumentLoader.cpp	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp	2011-06-23 00:28:56 UTC (rev 89503)
@@ -441,11 +441,9 @@
     // Once a frame has loaded, we no longer need to consider subresources,
     // but we still need to consider subframes.
     if (frameLoader()->state() != FrameStateComplete) {
-        if (!m_primaryLoadComplete && isLoading())
-            return true;
-        if (!m_subresourceLoaders.isEmpty())
-            return true;
         Document* doc = m_frame->document();
+        if ((!m_primaryLoadComplete || !m_frame->document()->loadEventFinished()) && isLoading())
+            return true;
         if (doc->cachedResourceLoader()->requestCount())
             return true;
         if (DocumentParser* parser = doc->parser())

Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (89502 => 89503)


--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2011-06-23 00:28:56 UTC (rev 89503)
@@ -652,6 +652,28 @@
 #endif
 }
 
+bool CachedResourceLoader::isPreloaded(const String& urlString) const
+{
+    const KURL& url = ""
+
+    if (m_preloads) {
+        ListHashSet<CachedResource*>::iterator end = m_preloads->end();
+        for (ListHashSet<CachedResource*>::iterator it = m_preloads->begin(); it != end; ++it) {
+            CachedResource* resource = *it;
+            if (resource->url() == url)
+                return true;
+        }
+    }
+
+    Deque<PendingPreload>::const_iterator dequeEnd = m_pendingPreloads.end();
+    for (Deque<PendingPreload>::const_iterator it = m_pendingPreloads.begin(); it != dequeEnd; ++it) {
+        PendingPreload pendingPreload = *it;
+        if (pendingPreload.m_request.url() == url)
+            return true;
+    }
+    return false;
+}
+
 void CachedResourceLoader::clearPreloads()
 {
 #if PRELOAD_DEBUG

Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.h (89502 => 89503)


--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.h	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.h	2011-06-23 00:28:56 UTC (rev 89503)
@@ -96,7 +96,8 @@
     void incrementRequestCount(const CachedResource*);
     void decrementRequestCount(const CachedResource*);
     int requestCount();
-    
+
+    bool isPreloaded(const String& urlString) const;
     void clearPreloads();
     void clearPendingPreloads();
     void preload(CachedResource::Type, ResourceRequest&, const String& charset, bool referencedFromBody);

Modified: trunk/Source/WebCore/testing/Internals.cpp (89502 => 89503)


--- trunk/Source/WebCore/testing/Internals.cpp	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/Source/WebCore/testing/Internals.cpp	2011-06-23 00:28:56 UTC (rev 89503)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "Internals.h"
 
+#include "CachedResourceLoader.h"
+#include "Document.h"
 #include "RenderTreeAsText.h"
 #include "ShadowContentElement.h"
 
@@ -44,6 +46,14 @@
 {
 }
 
+bool Internals::isPreloaded(Document* document, const String& url)
+{
+    if (!document)
+        return false;
+
+    return document->cachedResourceLoader()->isPreloaded(url);
+}
+
 PassRefPtr<Element> Internals::createShadowContentElement(Document* document, ExceptionCode& ec)
 {
     if (!document) {

Modified: trunk/Source/WebCore/testing/Internals.h (89502 => 89503)


--- trunk/Source/WebCore/testing/Internals.h	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/Source/WebCore/testing/Internals.h	2011-06-23 00:28:56 UTC (rev 89503)
@@ -27,6 +27,7 @@
 #define Internals_h
 
 #include "ExceptionCode.h"
+#include "PlatformString.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/text/WTFString.h>
@@ -40,6 +41,8 @@
 public:
     static PassRefPtr<Internals> create();
     virtual ~Internals();
+    
+    bool isPreloaded(Document*, const String& url);
 
     PassRefPtr<Element> createShadowContentElement(Document*, ExceptionCode&);
     String elementRenderTreeAsText(Element*, ExceptionCode&);

Modified: trunk/Source/WebCore/testing/Internals.idl (89502 => 89503)


--- trunk/Source/WebCore/testing/Internals.idl	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/Source/WebCore/testing/Internals.idl	2011-06-23 00:28:56 UTC (rev 89503)
@@ -29,6 +29,7 @@
     ] Internals {
         Element createShadowContentElement(in Document document) raises(DOMException);
         DOMString elementRenderTreeAsText(in Element element) raises(DOMException);
+        boolean isPreloaded(in Document document, in DOMString url);
     };
 }
 

Modified: trunk/Source/WebKit2/ChangeLog (89502 => 89503)


--- trunk/Source/WebKit2/ChangeLog	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/Source/WebKit2/ChangeLog	2011-06-23 00:28:56 UTC (rev 89503)
@@ -1,3 +1,12 @@
+2011-06-22  Nate Chapin  <[email protected]>
+
+        Reviewed by Adam Barth.
+
+        Add win symbols for new window.internals functionality.
+        https://bugs.webkit.org/show_bug.cgi?id=62066
+
+        * win/WebKit2.def:
+
 2011-06-22  Balazs Kelemen  <[email protected]>
 
         Reviewed by Andreas Kling.

Modified: trunk/Source/WebKit2/win/WebKit2.def (89502 => 89503)


--- trunk/Source/WebKit2/win/WebKit2.def	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/Source/WebKit2/win/WebKit2.def	2011-06-23 00:28:56 UTC (rev 89503)
@@ -136,6 +136,7 @@
 
         ; Re-exports from WebCore for WebCoreTestSupport
         ?getCachedDOMStructure@WebCore@@YAPAVStructure@JSC@@PAVJSDOMGlobalObject@1@PBUClassInfo@3@@Z
+        ?isPreloaded@CachedResourceLoader@WebCore@@QBE_NABVString@WTF@@@Z
         ?cacheDOMStructure@WebCore@@YAPAVStructure@JSC@@PAVJSDOMGlobalObject@1@PAV23@PBUClassInfo@3@@Z
         ?virtualFunctionToPreventWeakVtable@JSDOMWrapper@WebCore@@MAEXXZ
         ?create@ShadowContentElement@WebCore@@SA?AV?$PassRefPtr@VShadowContentElement@WebCore@@@WTF@@PAVDocument@2@@Z

Modified: trunk/Source/autotools/symbols.filter (89502 => 89503)


--- trunk/Source/autotools/symbols.filter	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/Source/autotools/symbols.filter	2011-06-23 00:28:56 UTC (rev 89503)
@@ -45,6 +45,7 @@
 _ZN7WebCore9JSElement3putEPN3JSC9ExecStateERKNS1_10IdentifierENS1_7JSValueERNS1_15PutPropertySlotE;
 _ZN7WebCore9JSElement6s_infoE;
 _ZN7WebCore9toElementEN3JSC7JSValueE;
+_ZNK7WebCore20CachedResourceLoader11isPreloadedERKN3WTF6StringE;
 _ZNK7WebCore6JSNode21pushEventHandlerScopeEPN3JSC9ExecStateEPNS1_14ScopeChainNodeE;
 local:
 _Z*;

Modified: trunk/Tools/ChangeLog (89502 => 89503)


--- trunk/Tools/ChangeLog	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/Tools/ChangeLog	2011-06-23 00:28:56 UTC (rev 89503)
@@ -1,3 +1,12 @@
+2011-06-22  Nate Chapin  <[email protected]>
+
+        Reviewed by Adam Barth.
+
+        Add libsoup to libWebCoreInternals build.
+        https://bugs.webkit.org/show_bug.cgi?id=62066
+
+        * GNUmakefile.am:
+
 2011-06-22  Dirk Pranke  <[email protected]>
 
         Reviewed by Tony Chang.

Modified: trunk/Tools/GNUmakefile.am (89502 => 89503)


--- trunk/Tools/GNUmakefile.am	2011-06-23 00:18:39 UTC (rev 89502)
+++ trunk/Tools/GNUmakefile.am	2011-06-23 00:28:56 UTC (rev 89503)
@@ -111,7 +111,8 @@
 
 libWebCoreInternals_la_CFLAGS = \
 	-fno-strict-aliasing \
-	$(_javascript_core_cflags)
+	$(_javascript_core_cflags) \
+        $(LIBSOUP_CFLAGS)
 
 # DumpRenderTree
 Programs_DumpRenderTree_CPPFLAGS = \
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to