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

Unified Diff: Source/core/css/resolver/StyleResolverState.h

Issue 18371008: Add a WebDocument::watchCssSelectors(selectors) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Omit split CLs 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/StyleResolverState.h
diff --git a/Source/core/css/resolver/StyleResolverState.h b/Source/core/css/resolver/StyleResolverState.h
index e04ed7a3d084d161d5f85cf66cbb408f7312f994..7ccc4e0afde15534fcbf85447f24e5204e3c99e0 100644
--- a/Source/core/css/resolver/StyleResolverState.h
+++ b/Source/core/css/resolver/StyleResolverState.h
@@ -38,6 +38,7 @@ namespace WebCore {
class FontDescription;
class RenderRegion;
+class StyleRule;
// ElementResolveContext is immutable and serves as an input to the style resolve process.
class ElementResolveContext {
@@ -101,6 +102,9 @@ public:
, m_lineHeightValue(0)
, m_fontDirty(false)
, m_styleMap(*this, m_elementStyleResources)
+#if ENABLE(CSS_CALLBACKS)
+ , m_rule(0)
+#endif
{ }
// These are all just pass-through methods to ElementResolveContext.
@@ -122,6 +126,11 @@ public:
const RenderRegion* regionForStyling() const { return m_regionForStyling; }
+#if ENABLE(CSS_CALLBACKS)
+ void setRule(StyleRule* rule) { m_rule = rule; }
+ const StyleRule* rule() const { return m_rule; }
esprehn 2013/07/13 01:43:01 currentRule() ?
Jeffrey Yasskin 2013/08/13 00:29:29 Done.
+#endif
+
// FIXME: These are effectively side-channel "out parameters" for the various
// map functions. When we map from CSS to style objects we use this state object
// to track various meta-data about that mapping (e.g. if it's cache-able).
@@ -221,8 +230,11 @@ private:
// CSSToStyleMap is a pure-logic class and only contains
// a back-pointer to this object.
CSSToStyleMap m_styleMap;
-};
+#if ENABLE(CSS_CALLBACKS)
+ StyleRule* m_rule;
+#endif
+};
} // namespace WebCore
#endif // StyleResolverState_h

Powered by Google App Engine
This is Rietveld 408576698