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

Issue 2680463003: Remove branch on childNeedsDistributionRecalc (Closed)

Created:
3 years, 10 months ago by kojii
Modified:
3 years, 10 months ago
Reviewers:
hayato, rune
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove branch on childNeedsDistributionRecalc This patch moves a branch on childNeedsDistributionRecalc() in Text::textLayoutObjectIsNeeded() to shouldUpdateLayoutByReattaching() and adds comments so that it is clearer that the branch is used for the optimization purpose. BUG=673967 Review-Url: https://codereview.chromium.org/2680463003 Cr-Commit-Position: refs/heads/master@{#449266} Committed: https://chromium.googlesource.com/chromium/src/+/884c1d0ef960ac2bfcc0839b9767fad82f6ef668

Patch Set 1 #

Total comments: 1

Patch Set 2 : Add updateDistribution to CharacterData::setDataAndUpdate, and its test #

Total comments: 2

Patch Set 3 : hayato review: document().updateDistribution() to updateDistribution() #

Total comments: 1

Patch Set 4 : Restricted only when isTextNode and not from parser #

Patch Set 5 : rune review, hayato/tkent offline disucssions #

Total comments: 1

Patch Set 6 : rune nit: Fix typo in the comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -7 lines) Patch
A third_party/WebKit/LayoutTests/shadow-dom/crashes/character-data-set-data-crash.html View 1 1 chunk +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Text.cpp View 1 2 3 4 5 3 chunks +9 lines, -7 lines 0 comments Download

Messages

Total messages: 46 (28 generated)
kojii
PTAL.
3 years, 10 months ago (2017-02-06 22:30:12 UTC) #6
rune
https://codereview.chromium.org/2680463003/diff/1/third_party/WebKit/Source/core/dom/Text.cpp File third_party/WebKit/Source/core/dom/Text.cpp (left): https://codereview.chromium.org/2680463003/diff/1/third_party/WebKit/Source/core/dom/Text.cpp#oldcode286 third_party/WebKit/Source/core/dom/Text.cpp:286: return true; It looks like this could still happen, ...
3 years, 10 months ago (2017-02-06 22:58:52 UTC) #8
rune
On 2017/02/06 22:58:52, rune wrote: > (disclaimer: haven't tested/debugged to confirm this) Here's a repro: ...
3 years, 10 months ago (2017-02-06 23:20:43 UTC) #9
kojii
Thank you Rune for your detailed analysis as always. I think the intention is not ...
3 years, 10 months ago (2017-02-06 23:35:25 UTC) #10
kojii
PTAL. The same test was failing in PS1...were I dreaming to think it turned to ...
3 years, 10 months ago (2017-02-07 06:41:54 UTC) #17
hayato
https://codereview.chromium.org/2680463003/diff/20001/third_party/WebKit/Source/core/dom/CharacterData.cpp File third_party/WebKit/Source/core/dom/CharacterData.cpp (right): https://codereview.chromium.org/2680463003/diff/20001/third_party/WebKit/Source/core/dom/CharacterData.cpp#newcode179 third_party/WebKit/Source/core/dom/CharacterData.cpp:179: document().updateDistribution(); This should be (this->)updateDistribution() (Node::updateDistribution()), rather than document().updteDistribution().
3 years, 10 months ago (2017-02-07 07:46:25 UTC) #18
kojii
https://codereview.chromium.org/2680463003/diff/20001/third_party/WebKit/Source/core/dom/CharacterData.cpp File third_party/WebKit/Source/core/dom/CharacterData.cpp (right): https://codereview.chromium.org/2680463003/diff/20001/third_party/WebKit/Source/core/dom/CharacterData.cpp#newcode179 third_party/WebKit/Source/core/dom/CharacterData.cpp:179: document().updateDistribution(); On 2017/02/07 at 07:46:24, hayato wrote: > This ...
3 years, 10 months ago (2017-02-07 08:44:33 UTC) #21
hayato
https://codereview.chromium.org/2680463003/diff/40001/third_party/WebKit/Source/core/dom/CharacterData.cpp File third_party/WebKit/Source/core/dom/CharacterData.cpp (right): https://codereview.chromium.org/2680463003/diff/40001/third_party/WebKit/Source/core/dom/CharacterData.cpp#newcode179 third_party/WebKit/Source/core/dom/CharacterData.cpp:179: updateDistribution(); I am not sure this place is a ...
3 years, 10 months ago (2017-02-07 09:00:01 UTC) #23
kojii
On 2017/02/07 at 09:00:01, hayato wrote: > https://codereview.chromium.org/2680463003/diff/40001/third_party/WebKit/Source/core/dom/CharacterData.cpp > File third_party/WebKit/Source/core/dom/CharacterData.cpp (right): > > https://codereview.chromium.org/2680463003/diff/40001/third_party/WebKit/Source/core/dom/CharacterData.cpp#newcode179 ...
3 years, 10 months ago (2017-02-07 09:07:51 UTC) #24
kojii
On 2017/02/07 at 09:07:51, kojii wrote: > On 2017/02/07 at 09:00:01, hayato wrote: > > ...
3 years, 10 months ago (2017-02-07 09:40:54 UTC) #27
rune
On 2017/02/07 09:07:51, kojii wrote: > On 2017/02/07 at 09:00:01, hayato wrote: > > > ...
3 years, 10 months ago (2017-02-07 10:00:13 UTC) #28
kojii
Thanks, talked with hayato and tkent, it looks like all in consensus that we should ...
3 years, 10 months ago (2017-02-09 04:41:58 UTC) #31
kojii
PTAL. After a bit more reading to understand the code around here, PS5 is half ...
3 years, 10 months ago (2017-02-09 06:36:31 UTC) #37
hayato
LGTM. That looks better. I think you would need Rune's review.
3 years, 10 months ago (2017-02-09 07:48:48 UTC) #38
rune
Wasn't exactly what I proposed, but lgtm with nit. https://codereview.chromium.org/2680463003/diff/80001/third_party/WebKit/Source/core/dom/Text.cpp File third_party/WebKit/Source/core/dom/Text.cpp (right): https://codereview.chromium.org/2680463003/diff/80001/third_party/WebKit/Source/core/dom/Text.cpp#newcode428 third_party/WebKit/Source/core/dom/Text.cpp:428: ...
3 years, 10 months ago (2017-02-09 09:16:48 UTC) #39
kojii
Thank you. Yeah, so "half" of the two suggestions. and thank you for catching the ...
3 years, 10 months ago (2017-02-09 09:48:55 UTC) #40
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/2680463003/100001
3 years, 10 months ago (2017-02-09 10:56:59 UTC) #43
commit-bot: I haz the power
3 years, 10 months ago (2017-02-09 12:25:56 UTC) #46
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/884c1d0ef960ac2bfcc0839b9767...

Powered by Google App Engine
This is Rietveld 408576698