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

Issue 418163003: Simplify watched selector handling and remove remnants of user stylesheets (Closed)

Created:
6 years, 5 months ago by Timothy Loh
Modified:
6 years, 4 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, dglazkov+blink, ed+blinkwatch_opera.com, rwlbuis, rune+blink
Base URL:
https://chromium.googlesource.com/chromium/blink.git@cascade
Project:
blink
Visibility:
Public.

Description

Simplify watched selector handling and remove remnants of user stylesheets This patch simplifies our handling of watched selectors, allowing us to remove the remaining pieces of user stylesheets. Currently a special -internal-callback property is added via a user stylesheet, which depends on the StyleBuilder applying all values and not just the cascaded values to function correctly. The approach in this patch is to have this logic separate to applyMatchedProperties, which means we won't need to have a separate property and we can still use the matched properties cache in these cases. This also allows us to remove the Vector of StyleRule in MatchResult. BUG=316960 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=180379

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 4

Patch Set 4 : rebase #

Patch Set 5 : use includeEmptyRules flag on MatchRequest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -81 lines) Patch
M Source/core/css/CSSComputedStyleDeclaration.cpp View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M Source/core/css/CSSProperties.in View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/css/CSSValueKeywords.in View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/css/ElementRuleCollector.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/RuntimeCSSEnabled.cpp View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M Source/core/css/parser/BisonCSSParser-in.cpp View 1 2 3 2 chunks +0 lines, -4 lines 0 comments Download
M Source/core/css/parser/CSSPropertyParser.cpp View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/css/resolver/MatchResult.h View 1 2 4 chunks +3 lines, -10 lines 0 comments Download
M Source/core/css/resolver/MatchResult.cpp View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M Source/core/css/resolver/MatchedPropertiesCache.cpp View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M Source/core/css/resolver/StyleBuilderCustom.cpp View 1 2 1 chunk +0 lines, -14 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.h View 1 2 4 chunks +2 lines, -5 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.cpp View 1 2 3 4 10 chunks +25 lines, -24 lines 0 comments Download
M Source/core/css/resolver/StyleResolverState.h View 1 2 2 chunks +0 lines, -5 lines 0 comments Download
M Source/core/css/resolver/StyleResolverState.cpp View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/dom/CSSSelectorWatch.cpp View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M Source/core/frame/UseCounter.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
Timothy Loh
6 years, 4 months ago (2014-08-12 10:55:07 UTC) #1
rune
rslgtm Looks a lot better with the new approach, but I'm not an expert here. ...
6 years, 4 months ago (2014-08-14 19:50:32 UTC) #2
Timothy Loh
https://codereview.chromium.org/418163003/diff/80001/Source/core/css/resolver/StyleResolver.h File Source/core/css/resolver/StyleResolver.h (left): https://codereview.chromium.org/418163003/diff/80001/Source/core/css/resolver/StyleResolver.h#oldcode303 Source/core/css/resolver/StyleResolver.h:303: // FIXME: watched selectors should be implemented using injected ...
6 years, 4 months ago (2014-08-15 09:40:39 UTC) #3
Timothy Loh
esprehn, did you want to take a look here?
6 years, 4 months ago (2014-08-15 09:41:14 UTC) #4
esprehn
lgtm https://codereview.chromium.org/418163003/diff/80001/Source/core/dom/CSSSelectorWatch.cpp File Source/core/dom/CSSSelectorWatch.cpp (right): https://codereview.chromium.org/418163003/diff/80001/Source/core/dom/CSSSelectorWatch.cpp#newcode148 Source/core/dom/CSSSelectorWatch.cpp:148: const CSSProperty callbackProperty(CSSPropertyBackgroundColor, CSSPrimitiveValue::createIdentifier(CSSValueRed)); This hack feels pretty ...
6 years, 4 months ago (2014-08-15 14:45:56 UTC) #5
Timothy Loh
https://codereview.chromium.org/418163003/diff/80001/Source/core/dom/CSSSelectorWatch.cpp File Source/core/dom/CSSSelectorWatch.cpp (right): https://codereview.chromium.org/418163003/diff/80001/Source/core/dom/CSSSelectorWatch.cpp#newcode148 Source/core/dom/CSSSelectorWatch.cpp:148: const CSSProperty callbackProperty(CSSPropertyBackgroundColor, CSSPrimitiveValue::createIdentifier(CSSValueRed)); On 2014/08/15 14:45:55, esprehn wrote: ...
6 years, 4 months ago (2014-08-15 15:29:14 UTC) #6
Timothy Loh
The CQ bit was checked by timloh@chromium.org
6 years, 4 months ago (2014-08-15 15:29:19 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/timloh@chromium.org/418163003/120001
6 years, 4 months ago (2014-08-15 15:29:55 UTC) #8
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_blink_rel on tryserver.blink ...
6 years, 4 months ago (2014-08-15 17:02:27 UTC) #9
commit-bot: I haz the power
6 years, 4 months ago (2014-08-15 17:42:49 UTC) #10
Message was sent while issue was closed.
Committed patchset #5 (120001) as 180379

Powered by Google App Engine
This is Rietveld 408576698