Skip marking style dirty for more cases.
SetStyleChangeOnInsertion() did not skip marking nodes style dirty like we did for SetNeedsStyleRecalc(). Create a common method to check that. Also, skip marking text nodes for re-attachment. We already skipped marking elements and in display:none in SetForceReattachLayoutTree(), but not text nodes. When changing text data on text nodes we force a re-attach from Text::UpdateTextLayoutObject() is case we change from non-rendered white-space to something that is rendered. The two tests below would fail with FlatTreeStyleRecalc enabled without this change. TEST=fast/dom/shadow/adopt-node-with-shadow-root.html TEST=shadow-dom/slots-2.html Bug: 972752 Change-Id: Ifbad22725cf4316068d0ddd20e561ecb56266607 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1901032 Commit-Queue: Rune Lillesveen <futhark@chromium.org> Reviewed-by:Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#712994}
Showing
Please register or sign in to comment