New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 868810 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 14
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Implement traversal roots for style recalc and invalidation

Project Member Reported by futhark@chromium.org, Jul 30

Issue description

If we need to recalc style for a single or very few elements in a large DOM tree, considerable time can be spent traversing from the document root down to those elements as we traverse all siblings of all ancestors looking for dirty bits.

In particular, a local experiment showed that most of the time updating hover state for sections in the whatwg single page html spec was spent unnecessarily traversing the dom.

This can be solved by storing a common ancestor of the elements which needs style invalidation/recalc or layout tree update and start from that root.

 
Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 24

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7d5b57280f440627e5b2130d6736a262df254f51

commit 7d5b57280f440627e5b2130d6736a262df254f51
Author: Rune Lillesveen <futhark@chromium.org>
Date: Fri Aug 24 13:30:56 2018

Never make nodes which do not recalc style style-dirty.

Comments, processing instructions, attr, and doctype nodes should never
have style, are never marked dirty, never runs through style recalc and
marked clean, and should not have style dirty initially.

Attr and doctype nodes will never run through AttachLayoutTree since
they can not be descendants of the root element, but since PI and
comments can, we need to say that it's OK that they don't need
attachment for AttachLayoutTree.

Also, don't mark the ancestor chain with ChildNeedsStyleRecalc when
inserting such nodes into a tree.

This is fixing the TODO introduced in 492730.

Bug:  492730 ,  868810 
Change-Id: I4470ce11a94e1390c2c6a9b7d1420c0e28844ade
Reviewed-on: https://chromium-review.googlesource.com/1186729
Reviewed-by: Anders Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585819}
[modify] https://crrev.com/7d5b57280f440627e5b2130d6736a262df254f51/third_party/blink/renderer/core/dom/comment.h
[modify] https://crrev.com/7d5b57280f440627e5b2130d6736a262df254f51/third_party/blink/renderer/core/dom/container_node.cc
[modify] https://crrev.com/7d5b57280f440627e5b2130d6736a262df254f51/third_party/blink/renderer/core/dom/container_node.h
[modify] https://crrev.com/7d5b57280f440627e5b2130d6736a262df254f51/third_party/blink/renderer/core/dom/document.cc
[modify] https://crrev.com/7d5b57280f440627e5b2130d6736a262df254f51/third_party/blink/renderer/core/dom/document_type.h
[modify] https://crrev.com/7d5b57280f440627e5b2130d6736a262df254f51/third_party/blink/renderer/core/dom/node.cc
[modify] https://crrev.com/7d5b57280f440627e5b2130d6736a262df254f51/third_party/blink/renderer/core/dom/node.h
[modify] https://crrev.com/7d5b57280f440627e5b2130d6736a262df254f51/third_party/blink/renderer/core/dom/node_test.cc
[modify] https://crrev.com/7d5b57280f440627e5b2130d6736a262df254f51/third_party/blink/renderer/core/dom/processing_instruction.h

😿 Pinpoint job stopped with an error.
https://pinpoint-dot-chromeperf.appspot.com/job/12c4dfdb640000

All of the runs failed. The most common error (19/20 runs) was:
TimeoutException: 
Project Member

Comment 6 by bugdroid1@chromium.org, Sep 4

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/124b930211fa17e4448061eb56e2867dfe84bff1

commit 124b930211fa17e4448061eb56e2867dfe84bff1
Author: Rune Lillesveen <futhark@chromium.org>
Date: Tue Sep 04 10:12:03 2018

Don't mark ancestors when detaching comments and PI.

Comments and processing intstructions are never marked dirty.
LazyReattachIfAttached() should not mark ancestry child-dirty when
detaching such nodes.

Bug:  868810 
Change-Id: I22dfcb3fe7e6a691b7b5cd56156cd61ca1765097
Reviewed-on: https://chromium-review.googlesource.com/1203832
Reviewed-by: Anders Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588481}
[modify] https://crrev.com/124b930211fa17e4448061eb56e2867dfe84bff1/third_party/blink/renderer/core/dom/node.h
[modify] https://crrev.com/124b930211fa17e4448061eb56e2867dfe84bff1/third_party/blink/renderer/core/dom/node_test.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Sep 4

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/124b930211fa17e4448061eb56e2867dfe84bff1

commit 124b930211fa17e4448061eb56e2867dfe84bff1
Author: Rune Lillesveen <futhark@chromium.org>
Date: Tue Sep 04 10:12:03 2018

Don't mark ancestors when detaching comments and PI.

Comments and processing intstructions are never marked dirty.
LazyReattachIfAttached() should not mark ancestry child-dirty when
detaching such nodes.

Bug:  868810 
Change-Id: I22dfcb3fe7e6a691b7b5cd56156cd61ca1765097
Reviewed-on: https://chromium-review.googlesource.com/1203832
Reviewed-by: Anders Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588481}
[modify] https://crrev.com/124b930211fa17e4448061eb56e2867dfe84bff1/third_party/blink/renderer/core/dom/node.h
[modify] https://crrev.com/124b930211fa17e4448061eb56e2867dfe84bff1/third_party/blink/renderer/core/dom/node_test.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Sep 4

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/124b930211fa17e4448061eb56e2867dfe84bff1

commit 124b930211fa17e4448061eb56e2867dfe84bff1
Author: Rune Lillesveen <futhark@chromium.org>
Date: Tue Sep 04 10:12:03 2018

Don't mark ancestors when detaching comments and PI.

Comments and processing intstructions are never marked dirty.
LazyReattachIfAttached() should not mark ancestry child-dirty when
detaching such nodes.

Bug:  868810 
Change-Id: I22dfcb3fe7e6a691b7b5cd56156cd61ca1765097
Reviewed-on: https://chromium-review.googlesource.com/1203832
Reviewed-by: Anders Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588481}
[modify] https://crrev.com/124b930211fa17e4448061eb56e2867dfe84bff1/third_party/blink/renderer/core/dom/node.h
[modify] https://crrev.com/124b930211fa17e4448061eb56e2867dfe84bff1/third_party/blink/renderer/core/dom/node_test.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Sep 5

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/968a5c50b35dcb19546611cf0668d25b7a9c094c

commit 968a5c50b35dcb19546611cf0668d25b7a9c094c
Author: Rune Lillesveen <futhark@chromium.org>
Date: Wed Sep 05 06:15:48 2018

No need for UpdatePlaceholderVisibility on style change.

Calling UpdatePlaceholderVisibility on StyleDidChange makes us mark
style dirty in the middle of a layout tree rebuild.

Bug:  868810 
Change-Id: I070e9fd576e21768099297767f2eddaaf401068c
Reviewed-on: https://chromium-review.googlesource.com/1205150
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588777}
[modify] https://crrev.com/968a5c50b35dcb19546611cf0668d25b7a9c094c/third_party/blink/renderer/core/layout/layout_text_control.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Sep 5

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cec945ffa2d2e7988a45ff670e38951e28b2e9ce

commit cec945ffa2d2e7988a45ff670e38951e28b2e9ce
Author: Rune Lillesveen <futhark@chromium.org>
Date: Wed Sep 05 13:30:04 2018

Don't mark first-letter style dirty during layout tree rebuild.

Made the SetRemaining* ClearRemaining* instead since that was its only
use.

Discovered during the work with update roots.

Bug:  868810 
Change-Id: Ia292127db574add6802ef09ee947b88725e7ee9e
Reviewed-on: https://chromium-review.googlesource.com/1206571
Reviewed-by: Anders Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588847}
[modify] https://crrev.com/cec945ffa2d2e7988a45ff670e38951e28b2e9ce/third_party/blink/renderer/core/css/style_engine_test.cc
[modify] https://crrev.com/cec945ffa2d2e7988a45ff670e38951e28b2e9ce/third_party/blink/renderer/core/dom/first_letter_pseudo_element.cc
[modify] https://crrev.com/cec945ffa2d2e7988a45ff670e38951e28b2e9ce/third_party/blink/renderer/core/dom/first_letter_pseudo_element.h
[modify] https://crrev.com/cec945ffa2d2e7988a45ff670e38951e28b2e9ce/third_party/blink/renderer/core/layout/layout_text_fragment.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Sep 5

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ab8a02286eeabf6868659fc39044877a45a55fd1

commit ab8a02286eeabf6868659fc39044877a45a55fd1
Author: Rune Lillesveen <futhark@chromium.org>
Date: Wed Sep 05 13:56:09 2018

Make document style clean in test as expected.

The initial lifecycle state is kStyleClean (in Document::Initialize). As
long as we are not scheduling layout tree updates, we will still be in
kStyleClean until we start scheduling updates. For the test in question
we are in a state where we have kStyleClean, but style isn't actually
clean because we haven't started scheduling updates. Make sure we are
actually updating style before checking and continuing testing.

Discovered this in the work with update roots where we were able to go
back to kVisualUpdatePending before the check.

Bug:  868810 
Change-Id: Ie20d02b0e4be1d08914b056f4726627c40293414
Reviewed-on: https://chromium-review.googlesource.com/1206492
Reviewed-by: Stephen McGruer <smcgruer@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588852}
[modify] https://crrev.com/ab8a02286eeabf6868659fc39044877a45a55fd1/third_party/blink/renderer/core/dom/document_test.cc

Project Member

Comment 12 by bugdroid1@chromium.org, Sep 5

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/33fac969b5d83a3fd2f7962f6a5d5f47249b4d18

commit 33fac969b5d83a3fd2f7962f6a5d5f47249b4d18
Author: Rune Lillesveen <futhark@chromium.org>
Date: Wed Sep 05 17:59:07 2018

Move Hide() to RemovedFrom() for disconnected media controls.

Found when debugging nested remove() issue for CSS update roots.
Resolves TODO.

TEST=media/
TEST=external/wpt/media*

Bug:  868810 
Change-Id: If2d13a9167ed331b562f55ca7e5a5802e7751362
Reviewed-on: https://chromium-review.googlesource.com/1202142
Reviewed-by: Becca Hughes <beccahughes@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588932}
[modify] https://crrev.com/33fac969b5d83a3fd2f7962f6a5d5f47249b4d18/third_party/blink/renderer/core/html/media/html_media_element.cc
[modify] https://crrev.com/33fac969b5d83a3fd2f7962f6a5d5f47249b4d18/third_party/blink/renderer/modules/media_controls/media_controls_impl.cc

Project Member

Comment 13 by bugdroid1@chromium.org, Sep 5

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6df63fde6f3689bef58e460a301318eaaad34903

commit 6df63fde6f3689bef58e460a301318eaaad34903
Author: Rune Lillesveen <futhark@chromium.org>
Date: Wed Sep 05 18:38:46 2018

Call base for MediaControlPanelElement::RemovedFrom().

Things like the isConnected() flag was not updated for these elements
when removed.

Bug:  868810 
Change-Id: I53aecf996c3d45253ab9929aa94cf29fd0c4ff6f
Reviewed-on: https://chromium-review.googlesource.com/1202063
Reviewed-by: Becca Hughes <beccahughes@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588948}
[modify] https://crrev.com/6df63fde6f3689bef58e460a301318eaaad34903/third_party/blink/renderer/modules/media_controls/elements/media_control_panel_element.cc
[modify] https://crrev.com/6df63fde6f3689bef58e460a301318eaaad34903/third_party/blink/renderer/modules/media_controls/elements/media_control_panel_element_test.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Sep 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/37baf0b2e361a2c6e8b730a8f2c12d29205d34e4

commit 37baf0b2e361a2c6e8b730a8f2c12d29205d34e4
Author: Rune Lillesveen <futhark@chromium.org>
Date: Fri Sep 07 09:38:32 2018

Move RebuildLayoutTree/RecalcStyle to StyleEngine.

In preparation for starting those operations from a different root node
than the document root, make them separate methods on StyleEngine.

Bug:  868810 
Change-Id: Ic3c1308835aef9a4e7887822ad7744ae76a7dcbd
Reviewed-on: https://chromium-review.googlesource.com/1206910
Reviewed-by: Anders Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589476}
[modify] https://crrev.com/37baf0b2e361a2c6e8b730a8f2c12d29205d34e4/third_party/blink/renderer/core/css/style_engine.cc
[modify] https://crrev.com/37baf0b2e361a2c6e8b730a8f2c12d29205d34e4/third_party/blink/renderer/core/css/style_engine.h
[modify] https://crrev.com/37baf0b2e361a2c6e8b730a8f2c12d29205d34e4/third_party/blink/renderer/core/css/style_engine_test.cc
[modify] https://crrev.com/37baf0b2e361a2c6e8b730a8f2c12d29205d34e4/third_party/blink/renderer/core/dom/document.cc
[modify] https://crrev.com/37baf0b2e361a2c6e8b730a8f2c12d29205d34e4/third_party/blink/renderer/core/dom/layout_tree_builder.cc
[modify] https://crrev.com/37baf0b2e361a2c6e8b730a8f2c12d29205d34e4/third_party/blink/renderer/core/dom/node_test.cc
[modify] https://crrev.com/37baf0b2e361a2c6e8b730a8f2c12d29205d34e4/third_party/blink/renderer/core/html/html_content_element_test.cc
[modify] https://crrev.com/37baf0b2e361a2c6e8b730a8f2c12d29205d34e4/third_party/blink/renderer/core/html/html_object_element_test.cc
[modify] https://crrev.com/37baf0b2e361a2c6e8b730a8f2c12d29205d34e4/third_party/blink/renderer/core/html/html_slot_element_test.cc
[modify] https://crrev.com/37baf0b2e361a2c6e8b730a8f2c12d29205d34e4/third_party/blink/renderer/core/html/shadow/progress_shadow_element_test.cc

📍 Job complete. See results below.
https://pinpoint-dot-chromeperf.appspot.com/job/143819b5640000
📍 Job complete. See results below.
https://pinpoint-dot-chromeperf.appspot.com/job/12da0e9d640000
📍 Job complete. See results below.
https://pinpoint-dot-chromeperf.appspot.com/job/11063559640000
📍 Job complete. See results below.
https://pinpoint-dot-chromeperf.appspot.com/job/113065e3640000
Project Member

Comment 23 by bugdroid1@chromium.org, Sep 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c43e58a86775f54217851381ae6782b8fc6007ee

commit c43e58a86775f54217851381ae6782b8fc6007ee
Author: Rune Lillesveen <futhark@chromium.org>
Date: Tue Sep 11 07:12:27 2018

Make GetReattachParent a member of Node.

We will need it outside of node.cc for layout tree rebuild root.

Bug:  868810 
Change-Id: If428d5c1f954686c70c35631718c5fa270c8971b
Reviewed-on: https://chromium-review.googlesource.com/1217422
Reviewed-by: Anders Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590223}
[modify] https://crrev.com/c43e58a86775f54217851381ae6782b8fc6007ee/third_party/blink/renderer/core/dom/node.cc
[modify] https://crrev.com/c43e58a86775f54217851381ae6782b8fc6007ee/third_party/blink/renderer/core/dom/node.h

Project Member

Comment 24 by bugdroid1@chromium.org, Sep 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bbaee0177052e6b3898389bf0bb0ae847ab63de7

commit bbaee0177052e6b3898389bf0bb0ae847ab63de7
Author: Rune Lillesveen <futhark@chromium.org>
Date: Tue Sep 11 07:19:24 2018

DCHECK not marking style dirty during layout tree rebuild.

And that we do not re-enter RebuildLayoutTree.

Bug:  868810 
Change-Id: Icb70557747c26ccd107775919034ec91b054d070
Reviewed-on: https://chromium-review.googlesource.com/1217743
Reviewed-by: Anders Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590224}
[modify] https://crrev.com/bbaee0177052e6b3898389bf0bb0ae847ab63de7/third_party/blink/renderer/core/css/style_engine.cc
[modify] https://crrev.com/bbaee0177052e6b3898389bf0bb0ae847ab63de7/third_party/blink/renderer/core/css/style_engine.h
[modify] https://crrev.com/bbaee0177052e6b3898389bf0bb0ae847ab63de7/third_party/blink/renderer/core/dom/node.cc

Project Member

Comment 25 by bugdroid1@chromium.org, Sep 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f9954f1c75ca92f10d3870e15885ed48c617a140

commit f9954f1c75ca92f10d3870e15885ed48c617a140
Author: Rune Lillesveen <futhark@chromium.org>
Date: Tue Sep 11 13:09:47 2018

Introduce SelectorFilterAncestorScope for style recalc roots.

We currently push a SelectorFilterParentScope on the stack for each
element in the ancestor chain while matching style rules. In order to
support starting style recalc at a root element which is not the
document root, we need to be able to push a scope for an ancestor chain
instead of a single element. This CL introduces a subclass for doing
that. Also added some simple unit tests.

Bug:  868810 
Change-Id: I23dd49ab1b9d02efe5f281ca2dbec773d699bc0e
Reviewed-on: https://chromium-review.googlesource.com/1219106
Reviewed-by: Anders Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590280}
[modify] https://crrev.com/f9954f1c75ca92f10d3870e15885ed48c617a140/third_party/blink/renderer/core/BUILD.gn
[modify] https://crrev.com/f9954f1c75ca92f10d3870e15885ed48c617a140/third_party/blink/renderer/core/css/resolver/selector_filter_parent_scope.cc
[modify] https://crrev.com/f9954f1c75ca92f10d3870e15885ed48c617a140/third_party/blink/renderer/core/css/resolver/selector_filter_parent_scope.h
[add] https://crrev.com/f9954f1c75ca92f10d3870e15885ed48c617a140/third_party/blink/renderer/core/css/resolver/selector_filter_parent_scope_test.cc

Project Member

Comment 26 by bugdroid1@chromium.org, Sep 14

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ed7a56654a501f4764b5df1fb06f984b0650050b

commit ed7a56654a501f4764b5df1fb06f984b0650050b
Author: Rune Lillesveen <futhark@chromium.org>
Date: Fri Sep 14 08:54:55 2018

Introduce StyleTraversalRoot for invalidate/recalc/rebuild.

Style invalidation, style recalc, and layout tree rebuild all starts
from the document root looking for dirty nodes which needs updating.
That means we have unnecessary overhead traversing down to the dirty
nodes, in particular when the number of dirty nodes are few and they
have ancestors with many siblings. The overhead is mlog(n), if the
depth to the dirty node(s) is n and the number of siblings for each
ancestor is m. In particular, this overhead was noticed for the whatwg
single page HTML spec where a lot of the time spent on updating hover
style was spent in traversal.

In this CL we introduce common ancestors for dirty nodes through the
StyleTraversalRoot class which is specialized for dirtiness for needing
style invalidation, style recalc, and layout tree rebuild. The common
ancestor is updated as part of marking ancestors child-dirty which is
when we hit an ancestor which is already marked child-dirty which then
becomes a candidate for being a common root.

We start traversal from this common root which means we will only have
to traverse ancestors (for cleaning dirty bits and other functionality
we rely on being called on ancestors) and not any of their siblings.
Note that in some cases we need to start at a node higher up the
ancestor chain to make sure we have enough context like for
WhitespaceAttacher.

Local testing measuring performance using devtools of hovering section
headings and links in the single page HTML spec shows that the
RecalcStyle time is reduced by ~90%. Although that's an extreme case,
we hope to see reduction in UMA numbers for Style.* performance for the
50th percentile.

Bug:  868810 

Change-Id: I1e2cea742348f35a07f89d31e8938e857d7405d8
Reviewed-on: https://chromium-review.googlesource.com/1149300
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Anders Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591304}
[modify] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/BUILD.gn
[modify] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/css/BUILD.gn
[modify] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/css/invalidation/style_invalidator.cc
[modify] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/css/invalidation/style_invalidator.h
[add] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/css/layout_tree_rebuild_root.cc
[add] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/css/layout_tree_rebuild_root.h
[modify] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/css/style_engine.cc
[modify] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/css/style_engine.h
[add] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/css/style_invalidation_root.cc
[add] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/css/style_invalidation_root.h
[add] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/css/style_recalc_root.cc
[add] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/css/style_recalc_root.h
[add] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/css/style_traversal_root.cc
[add] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/css/style_traversal_root.h
[add] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/css/style_traversal_root_test.cc
[modify] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/dom/container_node.cc
[modify] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/dom/document.cc
[modify] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/dom/element.cc
[modify] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/dom/element.h
[modify] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/dom/node.cc
[modify] https://crrev.com/ed7a56654a501f4764b5df1fb06f984b0650050b/third_party/blink/renderer/core/dom/node.h

Status: Fixed (was: Started)
Cc: meade@chromium.org eco...@igalia.com
 Issue 691505  has been merged into this issue.
Project Member

Comment 29 by bugdroid1@chromium.org, Sep 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1d6c313b8a21bd91fdbadc870d9087336c357713

commit 1d6c313b8a21bd91fdbadc870d9087336c357713
Author: Rune Lillesveen <futhark@chromium.org>
Date: Tue Sep 18 13:05:09 2018

Clear layout_tree_rebuild_root_ on node removal.

There was a copy-paste error which cleared the invalidation root twice
instead. Since both marking and doing the actual rebuild of the layout
tree happens inside UpdateStyle(), we should never be in the situation
where we have a rebuild root when dom changes happen, so the clearing
should strictly not be necessary. Add a DCHECK to detect if this ever
happens.

Bug:  868810 
Change-Id: Ibcc9ec21e7a094295833ee442bd723000013b01e
Reviewed-on: https://chromium-review.googlesource.com/1230040
Reviewed-by: Anders Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592013}
[modify] https://crrev.com/1d6c313b8a21bd91fdbadc870d9087336c357713/third_party/blink/renderer/core/css/style_engine.cc

Sign in to add a comment