Index: Source/core/css/resolver/StyleResolver.h |
diff --git a/Source/core/css/resolver/StyleResolver.h b/Source/core/css/resolver/StyleResolver.h |
index 2ce8755d4f2636fb10e19a53b64e1ff555d2b222..def50bcfc3ed7b1b4b84bf380f3f6a91ca7162fb 100644 |
--- a/Source/core/css/resolver/StyleResolver.h |
+++ b/Source/core/css/resolver/StyleResolver.h |
@@ -172,7 +172,7 @@ struct CSSPropertyValue { |
class StyleResolver { |
WTF_MAKE_NONCOPYABLE(StyleResolver); WTF_MAKE_FAST_ALLOCATED; |
public: |
- StyleResolver(Document*, bool matchAuthorAndUserStyles); |
+ StyleResolver(Document&, bool matchAuthorAndUserStyles); |
~StyleResolver(); |
// FIXME: StyleResolver should not be keeping tree-walk state. |
@@ -202,11 +202,11 @@ public: |
PassRefPtr<RenderStyle> defaultStyleForElement(); |
PassRefPtr<RenderStyle> styleForText(Text*); |
- static PassRefPtr<RenderStyle> styleForDocument(const Document*, CSSFontSelector* = 0); |
+ static PassRefPtr<RenderStyle> styleForDocument(const Document&, CSSFontSelector* = 0); |
// FIXME: This only has 5 callers and should be removed. Callers should be explicit about |
// their dependency on Document* instead of grabbing one through StyleResolver. |
- Document* document() { return m_document; } |
+ Document& document() { return m_document; } |
// FIXME: It could be better to call m_ruleSets.appendAuthorStyleSheets() directly after we factor StyleRsolver further. |
// https://bugs.webkit.org/show_bug.cgi?id=108890 |
@@ -224,7 +224,7 @@ public: |
ScopedStyleResolver* ensureScopedStyleResolver(const ContainerNode* scope) |
{ |
- return m_styleTree.ensureScopedStyleResolver(scope ? scope : document()); |
+ return m_styleTree.ensureScopedStyleResolver(scope ? scope : &document()); |
} |
// FIXME: Used by SharingStyleFinder, but should be removed. |
@@ -310,7 +310,7 @@ private: |
void matchPageRules(MatchResult&, RuleSet*, bool isLeftPage, bool isFirstPage, const String& pageName); |
void matchPageRulesForList(Vector<StyleRulePage*>& matchedRules, const Vector<StyleRulePage*>&, bool isLeftPage, bool isFirstPage, const String& pageName); |
void collectViewportRules(); |
- Settings* documentSettings() { return m_document->settings(); } |
+ Settings* documentSettings() { return m_document.settings(); } |
bool isLeftPage(int pageIndex) const; |
bool isRightPage(int pageIndex) const { return !isLeftPage(pageIndex); } |
@@ -332,7 +332,7 @@ private: |
OwnPtr<MediaQueryEvaluator> m_medium; |
RefPtr<RenderStyle> m_rootDefaultStyle; |
- Document* m_document; |
+ Document& m_document; |
SelectorFilter m_selectorFilter; |
bool m_matchAuthorAndUserStyles; |