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

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

Issue 16646002: Move the CSS Device Adaptation @viewport rule support behind a runtime flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing Created 7 years, 6 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.h ('k') | Source/core/css/resolver/ViewportStyleResolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index 6008ef774d58a2347d8761be5b1a7d02cbc04818..6be1c2d2e781c5cefd1ddafda96d7f43495cfed6 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -219,9 +219,7 @@ StyleResolver::StyleResolver(Document* document, bool matchAuthorAndUserStyles)
, m_document(document)
, m_matchAuthorAndUserStyles(matchAuthorAndUserStyles)
, m_fontSelector(CSSFontSelector::create(document))
-#if ENABLE(CSS_DEVICE_ADAPTATION)
, m_viewportStyleResolver(ViewportStyleResolver::create(document))
-#endif
, m_styleBuilder(DeprecatedStyleBuilder::sharedStyleBuilder())
, m_styleMap(this)
{
@@ -294,9 +292,8 @@ void StyleResolver::appendAuthorStyleSheets(unsigned firstNew, const Vector<RefP
if (document()->renderer() && document()->renderer()->style())
document()->renderer()->style()->font().update(fontSelector());
-#if ENABLE(CSS_DEVICE_ADAPTATION)
- viewportStyleResolver()->resolve();
-#endif
+ if (RuntimeEnabledFeatures::cssViewportEnabled())
+ viewportStyleResolver()->resolve();
}
void StyleResolver::resetAuthorStyle()
@@ -375,10 +372,7 @@ void StyleResolver::addKeyframeStyle(PassRefPtr<StyleRuleKeyframes> rule)
StyleResolver::~StyleResolver()
{
m_fontSelector->clearDocument();
-
-#if ENABLE(CSS_DEVICE_ADAPTATION)
m_viewportStyleResolver->clearDocument();
-#endif
}
void StyleResolver::sweepMatchedPropertiesCache(Timer<StyleResolver>*)
@@ -3322,12 +3316,10 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
case CSSPropertyWordWrap:
case CSSPropertyZIndex:
case CSSPropertyZoom:
-#if ENABLE(CSS_DEVICE_ADAPTATION)
case CSSPropertyMaxZoom:
case CSSPropertyMinZoom:
case CSSPropertyOrientation:
case CSSPropertyUserZoom:
-#endif
ASSERT_NOT_REACHED();
return;
default:
« no previous file with comments | « Source/core/css/resolver/StyleResolver.h ('k') | Source/core/css/resolver/ViewportStyleResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698