[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

aestes at apple.com aestes at apple.com
Wed Dec 22 11:25:27 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit d26119e7d2e1c8bd152d1422a1ee39778a0f4778
Author: aestes at apple.com <aestes at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jul 23 00:25:17 2010 +0000

    When there are no beforeload listeners on a document,
    HTMLLinkElement::process() should be called immediately when the node is
    inserted into the document, rather than waiting until after attach is
    performed.
    <https://bugs.webkit.org/show_bug.cgi?id=42859>
    <rdar://problem/8194528>
    
    Reviewed by Maciej Stachowiak.
    
    No new tests.
    
    * html/HTMLLinkElement.cpp:
    (WebCore::HTMLLinkElement::insertedIntoDocument): If there are no
    beforeload listeners, call process() immediately.  Otherwise, add it as
    a post-attach callback.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63924 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b75b7ee..1586873 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-07-22  Andy Estes  <aestes at apple.com>
+
+        Reviewed by Maciej Stachowiak.
+
+        When there are no beforeload listeners on a document,
+        HTMLLinkElement::process() should be called immediately when the node is
+        inserted into the document, rather than waiting until after attach is
+        performed.
+        <https://bugs.webkit.org/show_bug.cgi?id=42859>
+        <rdar://problem/8194528>
+
+        No new tests.
+
+        * html/HTMLLinkElement.cpp:
+        (WebCore::HTMLLinkElement::insertedIntoDocument): If there are no
+        beforeload listeners, call process() immediately.  Otherwise, add it as
+        a post-attach callback.
+
 2010-07-22  James Robinson  <jamesr at chromium.org>
 
         Reviewed by Simon Fraser.
diff --git a/WebCore/html/HTMLLinkElement.cpp b/WebCore/html/HTMLLinkElement.cpp
index 3079575..fc13165 100644
--- a/WebCore/html/HTMLLinkElement.cpp
+++ b/WebCore/html/HTMLLinkElement.cpp
@@ -258,8 +258,13 @@ void HTMLLinkElement::insertedIntoDocument()
     // to fire, it is possible for JavaScript to remove the element in the midst
     // of it being inserted into the DOM, which can lead to assertion failures
     // and crashes. Avoid this by postponing the beforeload/load until after
-    // attach.
-    m_shouldProcessAfterAttach = true;
+    // attach if there are beforeload listeners.
+    if (document()->hasListenerType(Document::BEFORELOAD_LISTENER)) {
+        m_shouldProcessAfterAttach = true;
+        return;
+    }
+
+    process();
 }
 
 void HTMLLinkElement::removedFromDocument()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list