Title: [108470] trunk/Source/WebCore
Revision
108470
Author
[email protected]
Date
2012-02-22 02:12:30 -0800 (Wed, 22 Feb 2012)

Log Message

Node::attach() should be after attaching children in Element::attach().
https://bugs.webkit.org/show_bug.cgi?id=79201

Reviewed by Hajime Morita.

In Element::attach(), Node::attach() is called before attaching children if a shaodw root exists.
This may cause O(N^2) problem in NodeRenderingContext.

No new tests. Existing tests should cover this.

* dom/Element.cpp:
(WebCore::Element::attach):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (108469 => 108470)


--- trunk/Source/WebCore/ChangeLog	2012-02-22 10:04:29 UTC (rev 108469)
+++ trunk/Source/WebCore/ChangeLog	2012-02-22 10:12:30 UTC (rev 108470)
@@ -1,3 +1,18 @@
+2012-02-22  Shinya Kawanaka  <[email protected]>
+
+        Node::attach() should be after attaching children in Element::attach().
+        https://bugs.webkit.org/show_bug.cgi?id=79201
+
+        Reviewed by Hajime Morita.
+
+        In Element::attach(), Node::attach() is called before attaching children if a shaodw root exists.
+        This may cause O(N^2) problem in NodeRenderingContext.
+
+        No new tests. Existing tests should cover this.
+
+        * dom/Element.cpp:
+        (WebCore::Element::attach):
+
 2012-02-22  Kenichi Ishibashi  <[email protected]>
 
         Adding WebSocket per-frame DEFLATE extension

Modified: trunk/Source/WebCore/dom/Element.cpp (108469 => 108470)


--- trunk/Source/WebCore/dom/Element.cpp	2012-02-22 10:04:29 UTC (rev 108469)
+++ trunk/Source/WebCore/dom/Element.cpp	2012-02-22 10:12:30 UTC (rev 108470)
@@ -928,7 +928,6 @@
     // When a shadow root exists, it does the work of attaching the children.
     if (hasShadowRoot()) {
         parentPusher.push();
-        Node::attach();
         shadowRootList()->attach();
 
         // In a shadow tree, some of light children may be attached by 'content' element.
@@ -938,6 +937,7 @@
             if (!child->attached())
                 child->attach();
         }
+        Node::attach();
     } else {
         if (firstChild())
             parentPusher.push();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to