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

Unified Diff: sky/engine/core/css/resolver/StyleBuilderCustom.cpp

Issue 710113003: Initial step of removing CSS zoom related properties. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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: sky/engine/core/css/resolver/StyleBuilderCustom.cpp
diff --git a/sky/engine/core/css/resolver/StyleBuilderCustom.cpp b/sky/engine/core/css/resolver/StyleBuilderCustom.cpp
index e762659f9132366a6b5a0ec0192a66cd3e2929c6..db6b37f1f23f178360cbd747ef3e60f37acf5f5a 100644
--- a/sky/engine/core/css/resolver/StyleBuilderCustom.cpp
+++ b/sky/engine/core/css/resolver/StyleBuilderCustom.cpp
@@ -592,50 +592,6 @@ void StyleBuilderFunctions::applyValueCSSPropertyVerticalAlign(StyleResolverStat
state.style()->setVerticalAlignLength(primitiveValue->convertToLength<FixedConversion | PercentConversion>(state.cssToLengthConversionData()));
}
-static void resetEffectiveZoom(StyleResolverState& state)
-{
- // Reset the zoom in effect. This allows the setZoom method to accurately compute a new zoom in effect.
- state.setEffectiveZoom(state.parentStyle() ? state.parentStyle()->effectiveZoom() : RenderStyle::initialZoom());
-}
-
-void StyleBuilderFunctions::applyInitialCSSPropertyZoom(StyleResolverState& state)
-{
- resetEffectiveZoom(state);
- state.setZoom(RenderStyle::initialZoom());
-}
-
-void StyleBuilderFunctions::applyInheritCSSPropertyZoom(StyleResolverState& state)
-{
- resetEffectiveZoom(state);
- state.setZoom(state.parentStyle()->zoom());
-}
-
-void StyleBuilderFunctions::applyValueCSSPropertyZoom(StyleResolverState& state, CSSValue* value)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(value->isPrimitiveValue());
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
-
- if (primitiveValue->getValueID() == CSSValueNormal) {
- resetEffectiveZoom(state);
- state.setZoom(RenderStyle::initialZoom());
- } else if (primitiveValue->getValueID() == CSSValueReset) {
- state.setEffectiveZoom(RenderStyle::initialZoom());
- state.setZoom(RenderStyle::initialZoom());
- } else if (primitiveValue->getValueID() == CSSValueDocument) {
- float docZoom = state.rootElementStyle() ? state.rootElementStyle()->zoom() : RenderStyle::initialZoom();
- state.setEffectiveZoom(docZoom);
- state.setZoom(docZoom);
- } else if (primitiveValue->isPercentage()) {
- resetEffectiveZoom(state);
- if (float percent = primitiveValue->getFloatValue())
- state.setZoom(percent / 100.0f);
- } else if (primitiveValue->isNumber()) {
- resetEffectiveZoom(state);
- if (float number = primitiveValue->getFloatValue())
- state.setZoom(number);
- }
-}
-
void StyleBuilderFunctions::applyInitialCSSPropertyWebkitAspectRatio(StyleResolverState& state)
{
state.style()->setHasAspectRatio(RenderStyle::initialHasAspectRatio());
« no previous file with comments | « sky/engine/core/css/resolver/MatchedPropertiesCache.cpp ('k') | sky/engine/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698