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

Unified Diff: sky/engine/core/css/CSSPrimitiveValue.cpp

Issue 711203002: Remove zoom() and effectiveZoom(). (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
« no previous file with comments | « sky/engine/core/css/CSSPrimitiveValue.h ('k') | sky/engine/core/css/CSSToLengthConversionData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/CSSPrimitiveValue.cpp
diff --git a/sky/engine/core/css/CSSPrimitiveValue.cpp b/sky/engine/core/css/CSSPrimitiveValue.cpp
index 062953d082fd9f0f9416ea15e4bb8aa3db4c4b11..c866a09b1c243830cefabb8eaa8684fe9d7936e9 100644
--- a/sky/engine/core/css/CSSPrimitiveValue.cpp
+++ b/sky/engine/core/css/CSSPrimitiveValue.cpp
@@ -297,7 +297,7 @@ CSSPrimitiveValue::CSSPrimitiveValue(RGBA32 color, UnitType type)
m_value.rgbcolor = color;
}
-CSSPrimitiveValue::CSSPrimitiveValue(const Length& length, float zoom)
+CSSPrimitiveValue::CSSPrimitiveValue(const Length& length)
: CSSValue(PrimitiveClass)
{
switch (length.type()) {
@@ -340,13 +340,13 @@ CSSPrimitiveValue::CSSPrimitiveValue(const Length& length, float zoom)
break;
case Fixed:
m_primitiveUnitType = CSS_PX;
- m_value.num = length.value() / zoom;
+ m_value.num = length.value();
break;
case Calculated: {
const CalculationValue& calc = length.calculationValue();
if (calc.pixels() && calc.percent()) {
init(CSSCalcValue::create(
- CSSCalcValue::createExpressionNode(calc.pixels() / zoom, calc.percent()),
+ CSSCalcValue::createExpressionNode(calc.pixels(), calc.percent()),
calc.isNonNegative() ? ValueRangeNonNegative : ValueRangeAll));
break;
}
@@ -355,7 +355,7 @@ CSSPrimitiveValue::CSSPrimitiveValue(const Length& length, float zoom)
m_value.num = calc.percent();
} else {
m_primitiveUnitType = CSS_PX;
- m_value.num = calc.pixels() / zoom;
+ m_value.num = calc.pixels();
}
if (m_value.num < 0 && calc.isNonNegative())
m_value.num = 0;
@@ -373,7 +373,7 @@ void CSSPrimitiveValue::init(const LengthSize& lengthSize, const RenderStyle& st
{
m_primitiveUnitType = CSS_PAIR;
m_hasCachedCSSText = false;
- m_value.pair = Pair::create(create(lengthSize.width(), style.effectiveZoom()), create(lengthSize.height(), style.effectiveZoom()), Pair::KeepIdenticalValues).leakRef();
+ m_value.pair = Pair::create(create(lengthSize.width()), create(lengthSize.height()), Pair::KeepIdenticalValues).leakRef();
}
void CSSPrimitiveValue::init(PassRefPtr<Rect> r)
@@ -652,7 +652,7 @@ double CSSPrimitiveValue::computeLengthDouble(const CSSToLengthConversionData& c
if (computingFontSize || isFontRelativeLength())
return result;
- return result * conversionData.zoom();
+ return result;
}
void CSSPrimitiveValue::accumulateLengthArray(CSSLengthArray& lengthArray, double multiplier) const
« no previous file with comments | « sky/engine/core/css/CSSPrimitiveValue.h ('k') | sky/engine/core/css/CSSToLengthConversionData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698