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

Issue 17054002: Element::recalcStyle() overly reattach()-es InsertionPoints. (Closed)

Created:
7 years, 6 months ago by Hajime Morrita
Modified:
7 years, 6 months ago
Reviewers:
esprehn, dglazkov
CC:
blink-reviews, webcomponents-bugzilla_chromium.org, dglazkov+blink, eae+blinkwatch, adamk+blink_chromium.org, chromiumbugtracker_adobe.com
Visibility:
Public.

Description

Element::recalcStyle() overly reattach()-es InsertionPoints. Before this change, recalcStyle() reattach()-ed InsertionPoints even if only inheriting styles were changed. This misbehavior was caused by the fact that InsertionPoint never have renderers. This change fixes it by telling recalcStyle() such a special case. - lazyReattach()-es by ContentDistributor was insufficient. It didn't reattach insertion point children. Also, it didnt' use lazyReattachIfAttached() and marks not-yet-attached nodes attached. - InsertionPoint should tell its distribution about style change but it didn't. - Distributed text nodes didn't recalculate style. - ShadowRoot::recalcStyle() should just attach() when it isn't yet attached(). - There were some missing ensureDistribution() calls. This change also fixes these problems. BUG=234801 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=152516

Patch Set 1 #

Total comments: 12

Patch Set 2 : Addressed points #

Total comments: 6

Patch Set 3 : For landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -25 lines) Patch
A LayoutTests/fast/dom/shadow/input-color-in-content.html View 1 chunk +45 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/shadow/input-color-in-content-expected.txt View 1 chunk +16 lines, -0 lines 0 comments Download
M Source/core/dom/Element.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/dom/EventPathWalker.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/NodeRenderingTraversal.cpp View 1 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/dom/Text.cpp View 1 1 chunk +11 lines, -6 lines 0 comments Download
M Source/core/dom/shadow/ContentDistributor.h View 1 2 2 chunks +5 lines, -3 lines 0 comments Download
M Source/core/dom/shadow/ContentDistributor.cpp View 1 2 5 chunks +20 lines, -8 lines 0 comments Download
M Source/core/dom/shadow/ElementShadow.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/dom/shadow/ElementShadow.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/shadow/InsertionPoint.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/shadow/InsertionPoint.cpp View 1 2 7 chunks +17 lines, -5 lines 0 comments Download
M Source/core/dom/shadow/ShadowRoot.cpp View 1 chunk +8 lines, -0 lines 0 comments Download
M Source/core/html/shadow/HTMLShadowElement.cpp View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
Hajime Morrita
Could you take a look? This is another try of https://codereview.chromium.org/15680005/. The change based on ...
7 years, 6 months ago (2013-06-14 08:18:33 UTC) #1
esprehn
This looks way better! A bunch of random comments, but with those fixes this should ...
7 years, 6 months ago (2013-06-14 08:32:29 UTC) #2
Hajime Morrita
Thanks for quick review, Elliott! The revised one will come shortly. https://codereview.chromium.org/17054002/diff/1/Source/core/dom/Text.cpp File Source/core/dom/Text.cpp (right): ...
7 years, 6 months ago (2013-06-14 09:59:14 UTC) #3
Hajime Morrita
uploaded.
7 years, 6 months ago (2013-06-14 10:02:20 UTC) #4
esprehn
LGTM. Please remove the unused host argument before landing. https://codereview.chromium.org/17054002/diff/8001/LayoutTests/platform/chromium-win/fast/html/details-add-details-child-2-expected.txt File LayoutTests/platform/chromium-win/fast/html/details-add-details-child-2-expected.txt (right): https://codereview.chromium.org/17054002/diff/8001/LayoutTests/platform/chromium-win/fast/html/details-add-details-child-2-expected.txt#newcode7 LayoutTests/platform/chromium-win/fast/html/details-add-details-child-2-expected.txt:7: ...
7 years, 6 months ago (2013-06-14 22:22:10 UTC) #5
Hajime Morrita
https://codereview.chromium.org/17054002/diff/8001/LayoutTests/platform/chromium-win/fast/html/details-add-details-child-2-expected.txt File LayoutTests/platform/chromium-win/fast/html/details-add-details-child-2-expected.txt (right): https://codereview.chromium.org/17054002/diff/8001/LayoutTests/platform/chromium-win/fast/html/details-add-details-child-2-expected.txt#newcode7 LayoutTests/platform/chromium-win/fast/html/details-add-details-child-2-expected.txt:7: RenderBlock (anonymous) at (0,0) size 784x0 Great! Will update ...
7 years, 6 months ago (2013-06-17 01:58:23 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/morrita@chromium.org/17054002/16001
7 years, 6 months ago (2013-06-17 01:58:49 UTC) #7
commit-bot: I haz the power
7 years, 6 months ago (2013-06-17 03:30:14 UTC) #8
Message was sent while issue was closed.
Change committed as 152516

Powered by Google App Engine
This is Rietveld 408576698