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

Issue 673967 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Code should never branch on childNeedsDistributionRecalc

Project Member Reported by esprehn@chromium.org, Dec 14 2016

Issue description

Hacks were added to not hit asserts:
ex. https://codereview.chromium.org/845453006

See https://bugs.chromium.org/p/chromium/issues/detail?id=450115

but we should never branch on this bit since it causes correctness bugs. It's like branching on childNeedsStyleRecalc. All things that check this bit that are not *inside* updateDistribution or setting the bits themselves are bugs.
 
Components: -Blink>DOM Blink>DOM>ShadowDOM
Owner: hayato@chromium.org
Status: Assigned (was: Untriaged)
Makes sense, thank you for filing this.
Status: Started (was: Assigned)
Labels: -Pri-3 Pri-2
Owner: kojii@chromium.org
Status: Assigned (was: Started)
kojii@, could you take a look?
I think you have a lot of contexts than me about this.
Project Member

Comment 5 by bugdroid1@chromium.org, Feb 9 2017

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

commit 884c1d0ef960ac2bfcc0839b9767fad82f6ef668
Author: kojii <kojii@chromium.org>
Date: Thu Feb 09 12:25:17 2017

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}

[add] https://crrev.com/884c1d0ef960ac2bfcc0839b9767fad82f6ef668/third_party/WebKit/LayoutTests/shadow-dom/crashes/character-data-set-data-crash.html
[modify] https://crrev.com/884c1d0ef960ac2bfcc0839b9767fad82f6ef668/third_party/WebKit/Source/core/dom/Text.cpp

Comment 6 by kojii@chromium.org, Feb 9 2017

Cc: r...@opera.com
Status: Fixed (was: Assigned)
The code still branch on childNeedsDistributionRecalc(), but the purpose is more limited only for the intended code path, and better clarified, with multiple reviewers.

If this new usage doesn't still look good and should be eliminated, please leave comments and I'll investigate further.

Sign in to add a comment