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

Issue 188543002: Avoid reattachWhitespaceSiblings when renderer does not change. (Closed)

Created:
6 years, 9 months ago by rune
Modified:
6 years, 9 months ago
CC:
blink-reviews, zoltan1, dsinclair, sof, eae+blinkwatch, leviw+renderwatch, dglazkov+blink, adamk+blink_chromium.org, jchaffraix+rendering, Inactive, bemjb+rendering_chromium.org, pdr., rwlbuis
Visibility:
Public.

Description

Avoid reattachWhitespaceSiblings when renderer does not change. If the renderer is null before and after the style recalc, there is no need to reattach whitespace siblings. It is necessary to check for needsAttach() since the old renderer might have been detached by lazyReattachIfAttached(), for instance. BUG=340213 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168668

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -1 line) Patch
A LayoutTests/fast/layout/display-none-no-relayout.html View 1 chunk +28 lines, -0 lines 0 comments Download
A LayoutTests/fast/layout/display-none-no-relayout-expected.txt View 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 chunk +4 lines, -1 line 2 comments Download
M Source/core/rendering/style/RenderStyleConstants.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
rune
6 years, 9 months ago (2014-03-06 10:52:21 UTC) #1
leviw_travelin_and_unemployed
LGTM. Great!
6 years, 9 months ago (2014-03-06 18:29:04 UTC) #2
leviw_travelin_and_unemployed
The CQ bit was checked by leviw@chromium.org
6 years, 9 months ago (2014-03-06 18:29:10 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rune@opera.com/188543002/1
6 years, 9 months ago (2014-03-06 18:29:18 UTC) #4
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-06 18:50:09 UTC) #5
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink
6 years, 9 months ago (2014-03-06 18:50:10 UTC) #6
leviw_travelin_and_unemployed
The CQ bit was checked by leviw@chromium.org
6 years, 9 months ago (2014-03-06 18:52:14 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rune@opera.com/188543002/1
6 years, 9 months ago (2014-03-06 18:52:22 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rune@opera.com/188543002/1
6 years, 9 months ago (2014-03-06 19:03:32 UTC) #9
commit-bot: I haz the power
Change committed as 168668
6 years, 9 months ago (2014-03-06 19:33:52 UTC) #10
esprehn
https://codereview.chromium.org/188543002/diff/1/Source/core/dom/Element.cpp File Source/core/dom/Element.cpp (right): https://codereview.chromium.org/188543002/diff/1/Source/core/dom/Element.cpp#newcode1601 Source/core/dom/Element.cpp:1601: if (rendererWillChange || renderer()) You're going to reattach on ...
6 years, 9 months ago (2014-03-06 19:40:24 UTC) #11
rune
6 years, 9 months ago (2014-03-06 20:56:33 UTC) #12
Message was sent while issue was closed.
https://codereview.chromium.org/188543002/diff/1/Source/core/dom/Element.cpp
File Source/core/dom/Element.cpp (right):

https://codereview.chromium.org/188543002/diff/1/Source/core/dom/Element.cpp#...
Source/core/dom/Element.cpp:1601: if (rendererWillChange || renderer())
On 2014/03/06 19:40:24, esprehn wrote:
> You're going to reattach on the initial attach of an element which is display:
> none too which isn't right.
> 
> if !renderer() && needsAttach() before and then !renderer() after as well we
> don't need need to reattach whitespace.

The problem is that !renderer() && needsAttach() also happens when
lazyReattachIfAttached() has been called. For that case, there are possibly
whitespace renderer garbage lying around after detach() has been called from
lazyReattachIfAttached(). At this point, I don't know if that's the case or not.
This case is hit in two of the layout tests.

Powered by Google App Engine
This is Rietveld 408576698