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

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: Initial 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
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/css/resolver/StyleResolverState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolverState.h
diff --git a/Source/core/css/resolver/StyleResolverState.h b/Source/core/css/resolver/StyleResolverState.h
index 098d7687e43ff2120cae8d90d9d38a056cfe6b8c..f3e91ae159a65176622ce69ee95106508579eb9f 100644
--- a/Source/core/css/resolver/StyleResolverState.h
+++ b/Source/core/css/resolver/StyleResolverState.h
@@ -39,6 +39,7 @@ namespace WebCore {
class FillLayer;
class FontDescription;
class RenderRegion;
+class StyleRule;
class StyleResolverState {
WTF_MAKE_NONCOPYABLE(StyleResolverState);
@@ -59,7 +60,11 @@ public:
, m_lineHeightValue(0)
, m_fontDirty(false)
, m_hasUAAppearance(false)
- , m_backgroundData(BackgroundFillLayer) { }
+ , m_backgroundData(BackgroundFillLayer)
+#if ENABLE(CSS_CALLBACKS)
+ , m_rule(0)
+#endif
+ { }
public:
void initForStyleResolve(Document*, Element*, RenderStyle* parentStyle = 0, RenderRegion* regionForStyling = 0);
@@ -76,6 +81,7 @@ public:
void setStyle(PassRefPtr<RenderStyle> style) { m_style = style; }
RenderStyle* style() const { return m_style.get(); }
PassRefPtr<RenderStyle> takeStyle() { return m_style.release(); }
+ PassRefPtr<RenderStyle> takeStyleAndClear();
const ContainerNode* parentNode() const { return m_parentNode; }
void setParentStyle(PassRefPtr<RenderStyle> parentStyle) { m_parentStyle = parentStyle; }
@@ -88,6 +94,10 @@ public:
void setElementAffectedByClassRules(bool isAffected) { m_elementAffectedByClassRules = isAffected; }
bool elementAffectedByClassRules() const { return m_elementAffectedByClassRules; }
+#if ENABLE(CSS_CALLBACKS)
+ void setRule(StyleRule* rule) { m_rule = rule; }
+ const StyleRule* rule() const { return m_rule; }
+#endif
void setApplyPropertyToRegularStyle(bool isApply) { m_applyPropertyToRegularStyle = isApply; }
void setApplyPropertyToVisitedLinkStyle(bool isApply) { m_applyPropertyToVisitedLinkStyle = isApply; }
bool applyPropertyToRegularStyle() const { return m_applyPropertyToRegularStyle; }
@@ -155,8 +165,11 @@ private:
FillLayer m_backgroundData;
Color m_backgroundColor;
ElementStyleResources m_elementStyleResources;
-};
+#if ENABLE(CSS_CALLBACKS)
+ StyleRule* m_rule;
+#endif
+};
} // namespace WebCore
#endif // StyleResolverState_h
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/css/resolver/StyleResolverState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698