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

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

Issue 686723002: Improve RAII of StyleResolverState. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix assertions. Created 6 years, 2 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.h
diff --git a/Source/core/css/resolver/StyleResolver.h b/Source/core/css/resolver/StyleResolver.h
index 7470c15bf6e9599d1b85a5e009a06ae78072b174..f5e1d923145b2bf5e80c6c4673b5c82eb8a9fc94 100644
--- a/Source/core/css/resolver/StyleResolver.h
+++ b/Source/core/css/resolver/StyleResolver.h
@@ -55,6 +55,7 @@ class Interpolation;
class MediaQueryEvaluator;
class RuleData;
class StyleKeyframe;
+class StyleBasisContext;
class StylePropertySet;
class StyleResolverStats;
class StyleRule;
@@ -113,7 +114,7 @@ public:
PassRefPtr<RenderStyle> pseudoStyleForElement(Element*, const PseudoStyleRequest&, RenderStyle* parentStyle);
PassRefPtr<RenderStyle> styleForPage(int pageIndex);
- PassRefPtr<RenderStyle> defaultStyleForElement();
+ PassRefPtr<RenderStyle> initialRenderStyle();
PassRefPtr<RenderStyle> styleForText(Text*);
static PassRefPtr<RenderStyle> styleForDocument(Document&);
@@ -260,7 +261,10 @@ private:
bool isFirstPage(int pageIndex) const;
String pageName(int pageIndex) const;
- bool pseudoStyleForElementInternal(Element&, const PseudoStyleRequest&, RenderStyle* parentStyle, StyleResolverState&);
+ PassRefPtr<RenderStyle> styleForContext(const StyleBasisContext&);
+ PassRefPtr<RenderStyle> parentStyleForContext(const StyleBasisContext&);
+
+ bool pseudoStyleForElementInternal(const PseudoStyleRequest&, StyleResolverState&, const StyleBasisContext&);
Document& document() { return *m_document; }

Powered by Google App Engine
This is Rietveld 408576698