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

Unified Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 18371008: Add a WebDocument::watchCssSelectors(selectors) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Fix most comments; TODO benchmark and use Element::recalcStyle Created 7 years, 5 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/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index 45ff268a2759aa37b19cc9580245635b31bdcdea..e01acf3c9dbd81fb1c4b9bf1b8434c4ec5ae81dd 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -72,6 +72,7 @@
#include "core/css/resolver/StyleBuilder.h"
#include "core/css/resolver/TransformBuilder.h"
#include "core/css/resolver/ViewportStyleResolver.h"
+#include "core/dom/CSSSelectorWatch.h"
#include "core/dom/DocumentStyleSheetCollection.h"
#include "core/dom/FullscreenController.h"
#include "core/dom/NodeRenderStyle.h"
@@ -178,7 +179,7 @@ StyleResolver::StyleResolver(Document* document, bool matchAuthorAndUserStyles)
m_styleTree.clear();
DocumentStyleSheetCollection* styleSheetCollection = document->styleSheetCollection();
- m_ruleSets.initUserStyle(styleSheetCollection, *m_medium, *this);
+ m_ruleSets.initUserStyle(styleSheetCollection, CSSSelectorWatch::from(document)->watchedCallbackSelectors(), *m_medium, *this);
#if ENABLE(SVG_FONTS)
if (document->svgExtensions()) {
@@ -1569,6 +1570,7 @@ void StyleResolver::applyProperties(const StylePropertySet* properties, StyleRul
{
ASSERT((propertyWhitelistType != PropertyWhitelistRegion) || m_state.regionForStyling());
InspectorInstrumentationCookie cookie = InspectorInstrumentation::willProcessRule(document(), rule, this);
+ m_state.setRule(rule);
unsigned propertyCount = properties->propertyCount();
for (unsigned i = 0; i < propertyCount; ++i) {

Powered by Google App Engine
This is Rietveld 408576698