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

Unified Diff: Source/core/dom/CSSSelectorWatch.cpp

Issue 418163003: Simplify watched selector handling and remove remnants of user stylesheets (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cascade
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/CSSSelectorWatch.cpp
diff --git a/Source/core/dom/CSSSelectorWatch.cpp b/Source/core/dom/CSSSelectorWatch.cpp
index 8fa8255ec8e611adb515c1ef2ef885c3fe437e8c..7df0db91e100e328b99ccc218586b836d7f657d3 100644
--- a/Source/core/dom/CSSSelectorWatch.cpp
+++ b/Source/core/dom/CSSSelectorWatch.cpp
@@ -143,7 +143,9 @@ void CSSSelectorWatch::watchCSSSelectors(const Vector<String>& selectors)
m_watchedCallbackSelectors.clear();
BisonCSSParser parser(CSSParserContext(UASheetMode, 0));
- const CSSProperty callbackProperty(CSSPropertyInternalCallback, CSSPrimitiveValue::createIdentifier(CSSValueInternalPresence));
+ // We need a property declaration here otherwise the StylePropertySet will
+ // get ignored. The exact property used doesn't matter as it isn't applied.
+ const CSSProperty callbackProperty(CSSPropertyBackgroundColor, CSSPrimitiveValue::createIdentifier(CSSValueRed));
esprehn 2014/08/15 14:45:55 This hack feels pretty gross, we can't leave that
Timothy Loh 2014/08/15 15:29:14 Turns out there's a flag on MatchRequest to make u
const RefPtrWillBeRawPtr<StylePropertySet> callbackPropertySet = ImmutableStylePropertySet::create(&callbackProperty, 1, UASheetMode);
CSSSelectorList selectorList;

Powered by Google App Engine
This is Rietveld 408576698