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

Issue 768533004: Make getComputedStyle optimization work for adjacent combinators. (Closed)

Created:
6 years ago by rune
Modified:
6 years ago
Reviewers:
esprehn
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Make getComputedStyle optimization work for adjacent combinators. Recalc style was avoided if none of the ascendants needed style recalc or style invalidation. That did not catch the cases where SubtreeStyleChange is propagated to siblings when the node or some of its siblings have tried to match selectors with adjacent combinators (propagation happens in ContainerNode::checkForChildrenAdjacentRuleChanges()). We change the condition for recalc to include the case where we have an ascendant which has children that needs recalc, and at the same time has children that tried to match some selector with an adjacent combinator. For that case a SubtreeStyleChange may be propagated to a sibling which is an ascendant of the element we are calling getComputedStyle on. Likewise for ascendants which have children that needs style invalidation and at the same time have children that tried to match selectors with adjacent combinators. R=esprehn@chromium.org BUG=436064 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=186599

Patch Set 1 #

Total comments: 3

Patch Set 2 : #

Patch Set 3 : Rebased #

Patch Set 4 : Redistribution might change computed style. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -3 lines) Patch
A LayoutTests/fast/css/getComputedStyle/computed-style-recalc.html View 1 chunk +64 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/getComputedStyle/computed-style-recalc-expected.txt View 1 chunk +12 lines, -0 lines 0 comments Download
M Source/core/dom/ContainerNode.h View 1 2 chunks +9 lines, -0 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 1 chunk +7 lines, -3 lines 0 comments Download

Messages

Total messages: 15 (5 generated)
rune
6 years ago (2014-12-02 23:40:16 UTC) #1
rune
PTAL
6 years ago (2014-12-05 08:51:17 UTC) #2
esprehn
lgtm, it would be nice to phrase the code differently, but the logic is fine. ...
6 years ago (2014-12-05 09:52:36 UTC) #3
rune
On 2014/12/05 at 09:52:36, esprehn wrote: > lgtm, it would be nice to phrase the ...
6 years ago (2014-12-05 11:07:23 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/768533004/20001
6 years ago (2014-12-05 11:08:11 UTC) #6
commit-bot: I haz the power
Failed to apply patch for Source/core/dom/Document.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years ago (2014-12-05 11:08:19 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/768533004/40001
6 years ago (2014-12-05 11:31:21 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/37109)
6 years ago (2014-12-05 12:39:03 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/768533004/60001
6 years ago (2014-12-05 13:39:22 UTC) #14
commit-bot: I haz the power
6 years ago (2014-12-05 16:15:29 UTC) #15
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=186599

Powered by Google App Engine
This is Rietveld 408576698