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

Unified Diff: Source/core/css/CSSParser-in.cpp

Issue 23516004: Have CSSParserContext take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/CSSParser.h ('k') | Source/core/css/CSSParserMode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSParser-in.cpp
diff --git a/Source/core/css/CSSParser-in.cpp b/Source/core/css/CSSParser-in.cpp
index 500e47197112ea7a11162a52b5e25b710b76b917..96048ad6378fa89c22acff59ab0776ee858f9200 100644
--- a/Source/core/css/CSSParser-in.cpp
+++ b/Source/core/css/CSSParser-in.cpp
@@ -212,15 +212,15 @@ CSSParserContext::CSSParserContext(CSSParserMode mode, const KURL& baseURL)
{
}
-CSSParserContext::CSSParserContext(Document* document, const KURL& baseURL, const String& charset)
- : baseURL(baseURL.isNull() ? document->baseURL() : baseURL)
+CSSParserContext::CSSParserContext(const Document& document, const KURL& baseURL, const String& charset)
+ : baseURL(baseURL.isNull() ? document.baseURL() : baseURL)
, charset(charset)
- , mode(document->inQuirksMode() ? CSSQuirksMode : CSSStrictMode)
- , isHTMLDocument(document->isHTMLDocument())
- , isCSSCustomFilterEnabled(document->settings() ? document->settings()->isCSSCustomFilterEnabled() : false)
- , isCSSStickyPositionEnabled(document->cssStickyPositionEnabled())
- , needsSiteSpecificQuirks(document->settings() ? document->settings()->needsSiteSpecificQuirks() : false)
- , useLegacyBackgroundSizeShorthandBehavior(document->settings() ? document->settings()->useLegacyBackgroundSizeShorthandBehavior() : false)
+ , mode(document.inQuirksMode() ? CSSQuirksMode : CSSStrictMode)
+ , isHTMLDocument(document.isHTMLDocument())
+ , isCSSCustomFilterEnabled(document.settings() ? document.settings()->isCSSCustomFilterEnabled() : false)
+ , isCSSStickyPositionEnabled(document.cssStickyPositionEnabled())
+ , needsSiteSpecificQuirks(document.settings() ? document.settings()->needsSiteSpecificQuirks() : false)
+ , useLegacyBackgroundSizeShorthandBehavior(document.settings() ? document.settings()->useLegacyBackgroundSizeShorthandBehavior() : false)
{
}
@@ -1151,7 +1151,7 @@ PassRefPtr<CSSValueList> CSSParser::parseFontFaceValue(const AtomicString& strin
return static_pointer_cast<CSSValueList>(dummyStyle->getPropertyCSSValue(CSSPropertyFontFamily));
}
-bool CSSParser::parseValue(MutableStylePropertySet* declaration, CSSPropertyID propertyID, const String& string, bool important, Document* document)
+bool CSSParser::parseValue(MutableStylePropertySet* declaration, CSSPropertyID propertyID, const String& string, bool important, const Document& document)
{
ASSERT(!string.isEmpty());
@@ -1164,7 +1164,7 @@ bool CSSParser::parseValue(MutableStylePropertySet* declaration, CSSPropertyID p
if (parseKeywordValue(declaration, propertyID, string, important, context))
return true;
- CSSParser parser(context, UseCounter::getFrom(document));
+ CSSParser parser(context, UseCounter::getFrom(&document));
return parser.parseValue(declaration, propertyID, string, important, static_cast<StyleSheetContents*>(0));
}
« no previous file with comments | « Source/core/css/CSSParser.h ('k') | Source/core/css/CSSParserMode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698