|
Revert 150924 "Node::lazyAttach shouldn't lie about being attached"
Reverting as it's causing https://code.google.com/p/chromium/issues/detail?id=245879
> Node::lazyAttach shouldn't lie about being attached
>
> lazyAttach just needs to mark the node as needing a style recalc, there's no reason
> to mark the node as attached, or mark all the descendants as being attached. We also
> don't need to mark all descendants as needing a style recalc since Element::recalcStyle
> is going to transform the StyleChange into a Force when it goes to descendants.
>
> Now lazyAttach just marks you as needing a FullStyleChange and the later recalcStyle
> will mark you as attached. This means that after this patch attached() is equivalent to
> "ever had style recalc". In a future patch we should rename that flag.
>
> A benefit of this patch is that doing appendChild(divWithLotsOfDescendants); now does 2
> fewer walks of the descendants because we don't need to mark them all as attached in
> lazyAttach, and we don't need to run detach() in recalcStyle() when it calls reattach.
>
> Another benefit is that Node::attach is no longer n^2 when you append many elements
> without any whitespace between them because the loop to fix up whitespace can bail
> out early when it sees !next->attached().
>
> R=eseidel@chromium.org
>
> Review URL: https://codereview.chromium.org/15159008
TBR=esprehn@chromium.org
BUG= 245879
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=151674
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+46 lines, -46 lines) |
Patch |
|
M |
trunk/LayoutTests/fast/dom/shadow/shadow-root-attached.html
|
View
|
|
2 chunks |
+0 lines, -2 lines |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/fast/html/object-image-nested-fallback.html
|
View
|
|
1 chunk |
+2 lines, -10 lines |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/fast/overflow/overflow-height-float-not-removed-crash3-expected.txt
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/http/tests/cache/subresource-expiration-1-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/http/tests/cache/subresource-expiration-2-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/platform/chromium-mac/editing/selection/caret-ltr-2-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/platform/chromium-mac/editing/selection/caret-ltr-2-left-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/platform/chromium-mac/editing/selection/caret-ltr-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/platform/chromium-mac/editing/selection/caret-ltr-right-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/platform/chromium-mac/editing/selection/caret-rtl-2-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/platform/chromium-mac/editing/selection/caret-rtl-2-left-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/platform/chromium-mac/editing/selection/caret-rtl-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/platform/chromium-mac/editing/selection/caret-rtl-right-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/platform/chromium-win/editing/selection/caret-ltr-2-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/platform/chromium-win/editing/selection/caret-ltr-2-left-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/platform/chromium-win/editing/selection/caret-ltr-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/platform/chromium-win/editing/selection/caret-ltr-right-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/platform/chromium-win/editing/selection/caret-rtl-2-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/platform/chromium-win/editing/selection/caret-rtl-2-left-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/platform/chromium-win/editing/selection/caret-rtl-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
trunk/LayoutTests/platform/chromium-win/editing/selection/caret-rtl-right-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
trunk/Source/core/dom/Element.cpp
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
trunk/Source/core/dom/Node.h
|
View
|
|
2 chunks |
+8 lines, -4 lines |
0 comments
|
Download
|
|
M |
trunk/Source/core/dom/Node.cpp
|
View
|
|
1 chunk |
+7 lines, -11 lines |
0 comments
|
Download
|
|
M |
trunk/Source/core/dom/Text.cpp
|
View
|
|
1 chunk |
+1 line, -4 lines |
0 comments
|
Download
|
|
M |
trunk/Source/core/dom/shadow/ElementShadow.cpp
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
trunk/Source/core/dom/shadow/ShadowRoot.cpp
|
View
|
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
|
M |
trunk/Source/core/html/HTMLDialogElement.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
trunk/Source/core/html/HTMLObjectElement.cpp
|
View
|
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
trunk/Source/core/html/HTMLPlugInImageElement.cpp
|
View
|
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
Total messages: 2 (0 generated)
|