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

Issue 201573003: Reset SelectorCheckingContext.elementStyle for :ancestor matching. (Closed)

Created:
6 years, 9 months ago by rune
Modified:
6 years, 9 months ago
Reviewers:
dglazkov
CC:
blink-reviews, ed+blinkwatch_opera.com, dglazkov+blink, apavlov+blink_chromium.org, darktears, rune+blink, rwlbuis
Visibility:
Public.

Description

Reset SelectorCheckingContext.elementStyle for :ancestor matching. SelectorCheckingContext.elementStyle is used to store the RenderStyle for the element we are currently computing styles for. It is among other things used for setting flags on the RenderStyle if we may match :hover, :first-child, or some other pseudo classes. When we go past a combinator during matching, we set the elementStyle to null to tell we are not currently looking at the target element for the selector matching. The :ancestor pseudo is a special case in the sense that it will select styles for the shadow host element, but its sub-selectors may actually match ancestor elements of the host element, behaving as if we had a descendant combinator. This CL resets elementStyle to 0 when matching ancestors of a shadow host for the :ancestor pseudo class in order to set flags for :hover, :first-child, etc on the correct RenderStyle objects. R=dglazkov@chromium.org BUG=353503 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169491

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -5 lines) Patch
A LayoutTests/fast/dom/shadow/ancestor-first-child.html View 1 chunk +32 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/shadow/ancestor-first-child-expected.txt View 1 chunk +11 lines, -0 lines 0 comments Download
M Source/core/css/SelectorChecker.cpp View 1 chunk +7 lines, -5 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
rune
6 years, 9 months ago (2014-03-18 20:17:50 UTC) #1
dglazkov
lgtm
6 years, 9 months ago (2014-03-18 21:11:31 UTC) #2
rune
The CQ bit was checked by rune@opera.com
6 years, 9 months ago (2014-03-18 21:18:03 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/201573003/1
6 years, 9 months ago (2014-03-18 21:18:28 UTC) #4
commit-bot: I haz the power
6 years, 9 months ago (2014-03-18 22:29:24 UTC) #5
Message was sent while issue was closed.
Change committed as 169491

Powered by Google App Engine
This is Rietveld 408576698