Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Issue 2740823005: Track lastTextNode during rebuildLayoutTree. (Closed)

Created:
3 years, 9 months ago by rune
Modified:
3 years, 9 months ago
Reviewers:
nainar, esprehn
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-dom_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Track lastTextNode during rebuildLayoutTree. We keep track of last seen text node for more efficient whitespace re-attachment. When style recalc and layout tree building was split, the text node is still tracked during recalc, stored in a hash map, and retreived when needed during layout tree building. However, the text nodes are also traversed during layout tree building so that we can track the nodes during that phase instead. StyleReattachData is removed and this CL reverts back to using the m_nonAttachedStyle map for ComputedStyle. The comment about reversed traversal of children for avoiding n^2 performance is moved to rebuildChildrenLayoutTrees() since that's where the issue is. We should be able to do the child recalc first-to-last now if we want to. R=nainar@chromium.org,esprehn@chromium.org BUG=595137 Review-Url: https://codereview.chromium.org/2740823005 Cr-Commit-Position: refs/heads/master@{#456047} Committed: https://chromium.googlesource.com/chromium/src/+/af8b67666d6c89aec9abebe7df21a2732d91ea2a

Patch Set 1 #

Patch Set 2 : Missing reset of lastTextNode for elements. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -90 lines) Patch
M third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp View 1 chunk +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/dom/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/ContainerNode.cpp View 1 2 chunks +21 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 3 chunks +5 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 4 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.h View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.cpp View 5 chunks +8 lines, -19 lines 0 comments Download
D third_party/WebKit/Source/core/dom/StyleReattachData.h View 1 chunk +0 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Text.h View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Text.cpp View 2 chunks +4 lines, -9 lines 0 comments Download

Messages

Total messages: 14 (8 generated)
rune
ptal Hope this doesn't interfere too much with your work Naina.
3 years, 9 months ago (2017-03-10 00:25:08 UTC) #3
nainar
This change makes sense and lgtm - thank you for making it! Making the HashMap's ...
3 years, 9 months ago (2017-03-10 00:30:21 UTC) #4
esprehn
lgtm
3 years, 9 months ago (2017-03-10 02:42:48 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2740823005/20001
3 years, 9 months ago (2017-03-10 10:41:54 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/af8b67666d6c89aec9abebe7df21a2732d91ea2a
3 years, 9 months ago (2017-03-10 12:37:28 UTC) #13
Bugs Nash
3 years, 9 months ago (2017-03-12 20:35:07 UTC) #14
Message was sent while issue was closed.
This is fantastic! Good work Rune

Powered by Google App Engine
This is Rietveld 408576698