|
|
DescriptionMove layout tree reconstruction code for Text nodes into new function
This code moves the Layout Tree construction code for Text
nodes into Text::rebuildTextLayoutTree()
BUG=595137
Committed: https://crrev.com/a4805a287ac79834a932f44c87791a7b9322ede8
Cr-Commit-Position: refs/heads/master@{#427967}
Patch Set 1 #
Total comments: 3
Patch Set 2 : Bugs' changes #
Total comments: 5
Patch Set 3 : Addressing bugsnash@ comments #
Total comments: 4
Patch Set 4 : Addressing Bugs' comments #
Total comments: 4
Patch Set 5 : Edits post Elliott's lgtm #
Messages
Total messages: 41 (26 generated)
The CQ bit was checked by nainar@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Move layout tree reconstruction code for Text nodes into new function BUG= ========== to ========== Move layout tree reconstruction code for Text nodes into new function This code moves the Layout Tree construction code for Text nodes into Text::rebuildTextLayoutTree() BUG=595137 ==========
nainar@chromium.org changed reviewers: + bugsnash@chromium.org
bugsnash, PTAL? Thanks!
https://codereview.chromium.org/2421793002/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/dom/Text.cpp (right): https://codereview.chromium.org/2421793002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/dom/Text.cpp:405: if (needsStyleRecalc() || needsWhitespaceLayoutObject()) { needsStyleRecalc() probably shouldn't be inside this method, as it's supposed to be about layout. Might need some refactoring and use the new needsLayout flags? https://codereview.chromium.org/2421793002/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/dom/Text.h (right): https://codereview.chromium.org/2421793002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/dom/Text.h:57: void rebuildTextLayoutTree(Text* nextTextSibling); I'm not sure about this name. There is no tree below a text node, they are always leaves. Maybe just rebuildTextLayout? Not sure if that's clear/accurate. On the other hand, this name is consistent with Element::rebuildLayoutTree... I'm not sure about it. Maybe Elliott will have a better idea?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by nainar@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Made the changes you asked for. PTAL? Thanks! https://codereview.chromium.org/2421793002/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/dom/Text.h (right): https://codereview.chromium.org/2421793002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/dom/Text.h:57: void rebuildTextLayoutTree(Text* nextTextSibling); Another name I had in mind was: rebuildTextLayoutNode() or rebuildLayoutText()
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2016/10/14 at 07:22:41, nainar wrote: > Made the changes you asked for. PTAL? Thanks! > > https://codereview.chromium.org/2421793002/diff/1/third_party/WebKit/Source/c... > File third_party/WebKit/Source/core/dom/Text.h (right): > > https://codereview.chromium.org/2421793002/diff/1/third_party/WebKit/Source/c... > third_party/WebKit/Source/core/dom/Text.h:57: void rebuildTextLayoutTree(Text* nextTextSibling); > Another name I had in mind was: > > rebuildTextLayoutNode() or rebuildLayoutText() rebuildLayoutText()?
https://codereview.chromium.org/2421793002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/dom/Text.cpp (right): https://codereview.chromium.org/2421793002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Text.cpp:401: setNeedsReattachLayoutTree(); probably don't need to implement this yet, not needed until 'The Reorg' https://codereview.chromium.org/2421793002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Text.cpp:402: clearNeedsStyleRecalc(); why is this being changed in this patch? https://codereview.chromium.org/2421793002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Text.cpp:409: if (needsReattachLayoutTree() || needsWhitespaceLayoutObject()) { this check doesn't belong in here, the method shouldn't be called if this doesn't evaluate to true. you can change it to a DCHECK if you like, but leave the 'if (needsStyleRecalc() || needsWhitespaceLayoutObject())' check in the calling method
The CQ bit was checked by nainar@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
It seems that I am misunderstanding what you mean here so have added comments inline explaining what I think you meant. PTAL? Thanks! https://codereview.chromium.org/2421793002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/dom/Text.cpp (right): https://codereview.chromium.org/2421793002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Text.cpp:401: setNeedsReattachLayoutTree(); The flag setting is being done in the mirror patch here: https://codereview.chromium.org/2398293003 and so should be done here. The next patch (the reorg one) doesn't introduce the setting of the bits it just makes sure that they are being set in the correct phases (style recalc and layout tree construction). https://codereview.chromium.org/2421793002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Text.cpp:409: if (needsReattachLayoutTree() || needsWhitespaceLayoutObject()) { Seems like I misread your comment in the previous patch. Your comment intended for this: void Text::recalcTextStyle(StyleRecalcChange change, Text* nextTextSibling) { ... } else if (needsStyleRecalc() || needsWhitespaceLayoutObject()) { setNeedsReattachLayoutTree(); rebuildTextLayoutTree(nextTextSibling); } } void Text::rebuildTextLayoutTree(Text* nextTextSibling) { reattachLayoutTree(); if (this->layoutObject()) reattachWhitespaceSiblingsIfNeeded(nextTextSibling); clearNeedsReattachLayoutTree(); } Implemented this. Let me know if I still seem to be misunderstanding you.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2421793002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/dom/Text.cpp (right): https://codereview.chromium.org/2421793002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Text.cpp:400: setNeedsReattachLayoutTree(); I understand that you want to set flags correctly, but I don't see this as setting the flag correctly. This sets a flag that is never checked, then calls a method that clears the flag. I wouldn't include it until it is used. https://codereview.chromium.org/2421793002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Text.cpp:405: void Text::rebuildTextLayoutTree(Text* nextTextSibling) { yup this is (y)
The CQ bit was checked by nainar@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
PTAL? Thanks! https://codereview.chromium.org/2421793002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/dom/Text.cpp (right): https://codereview.chromium.org/2421793002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Text.cpp:400: setNeedsReattachLayoutTree(); Yup I understand. Made the change. https://codereview.chromium.org/2421793002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Text.cpp:405: void Text::rebuildTextLayoutTree(Text* nextTextSibling) { Yeah!
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm
nainar@chromium.org changed reviewers: + esprehn@chromium.org
To Elliott for OWNERS
lgtm, btw you should start adding DCHECKs about the dirty bits whenever possible in the various functions. It catches accidentally screwing things up. You'll see I droppped asserts all over the top of ::recalcStyle and ::recalcOwnStyle to make sure things made sense, and continued to make sense as the code was refactored. https://codereview.chromium.org/2421793002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/dom/Text.cpp (right): https://codereview.chromium.org/2421793002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Text.cpp:404: void Text::rebuildTextLayoutTree(Text* nextTextSibling) { DCHECK(needsReattachLayoutTree()) at the top of this? https://codereview.chromium.org/2421793002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Text.cpp:406: if (this->layoutObject()) remove this->, there's no name conflict now that you refactored
The CQ bit was checked by nainar@chromium.org to run a CQ dry run
https://codereview.chromium.org/2421793002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/dom/Text.cpp (right): https://codereview.chromium.org/2421793002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Text.cpp:404: void Text::rebuildTextLayoutTree(Text* nextTextSibling) { We can't assert that here as we aren't setting needsReattachLayoutTree(). We could assert if we set it in Text::recalcTextStyle(). https://codereview.chromium.org/2421793002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Text.cpp:406: if (this->layoutObject()) Done.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...)
The CQ bit was checked by nainar@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from esprehn@chromium.org, bugsnash@chromium.org Link to the patchset: https://codereview.chromium.org/2421793002/#ps80001 (title: "Edits post Elliott's lgtm")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #5 (id:80001)
Message was sent while issue was closed.
Description was changed from ========== Move layout tree reconstruction code for Text nodes into new function This code moves the Layout Tree construction code for Text nodes into Text::rebuildTextLayoutTree() BUG=595137 ========== to ========== Move layout tree reconstruction code for Text nodes into new function This code moves the Layout Tree construction code for Text nodes into Text::rebuildTextLayoutTree() BUG=595137 Committed: https://crrev.com/a4805a287ac79834a932f44c87791a7b9322ede8 Cr-Commit-Position: refs/heads/master@{#427967} ==========
Message was sent while issue was closed.
Patchset 5 (id:??) landed as https://crrev.com/a4805a287ac79834a932f44c87791a7b9322ede8 Cr-Commit-Position: refs/heads/master@{#427967} |