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

Unified Diff: Source/core/css/CSSPrimitiveValue.h

Issue 64293008: Wrap CSS length conversion arguments in an object (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: don't make it noncopyable ; clang doesn't do the RVO stuffs? Created 7 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 | « Source/core/css/CSSMatrix.cpp ('k') | Source/core/css/CSSPrimitiveValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSPrimitiveValue.h
diff --git a/Source/core/css/CSSPrimitiveValue.h b/Source/core/css/CSSPrimitiveValue.h
index 086532e5b5ab1f244d375e4a31ad0f6806d69f16..65b1cfbf66fc01fc790977fe852e49e9d5570b7e 100644
--- a/Source/core/css/CSSPrimitiveValue.h
+++ b/Source/core/css/CSSPrimitiveValue.h
@@ -34,6 +34,7 @@ namespace WebCore {
class CSSBasicShape;
class CSSCalcValue;
+class CSSToLengthConversionData;
class Counter;
class ExceptionState;
class Length;
@@ -245,8 +246,7 @@ public:
}
/*
- * computes a length in pixels out of the given CSSValue. Need the RenderStyle to get
- * the fontinfo in case val is defined in em or ex.
+ * Computes a length in pixels out of the given CSSValue
*
* The metrics have to be a bit different for screen and printer output.
* For screen output we assume 1 inch == 72 px, for printer we assume 300 dpi
@@ -254,10 +254,10 @@ public:
* this is screen/printer dependent, so we probably need a config option for this,
* and some tool to calibrate.
*/
- template<typename T> T computeLength(const RenderStyle* currStyle, const RenderStyle* rootStyle, float multiplier = 1.0f, bool computingFontSize = false);
+ template<typename T> T computeLength(const CSSToLengthConversionData&);
// Converts to a Length, mapping various unit types appropriately.
- template<int> Length convertToLength(const RenderStyle* currStyle, const RenderStyle* rootStyle, double multiplier = 1.0, bool computingFontSize = false);
+ template<int> Length convertToLength(const CSSToLengthConversionData&);
// use with care!!!
void setPrimitiveType(unsigned short type) { m_primitiveUnitType = type; }
@@ -366,7 +366,7 @@ private:
void init(PassRefPtr<CSSCalcValue>);
bool getDoubleValueInternal(UnitTypes targetUnitType, double* result) const;
- double computeLengthDouble(const RenderStyle* currentStyle, const RenderStyle* rootStyle, float multiplier, bool computingFontSize);
+ double computeLengthDouble(const CSSToLengthConversionData&);
union {
CSSPropertyID propertyID;
« no previous file with comments | « Source/core/css/CSSMatrix.cpp ('k') | Source/core/css/CSSPrimitiveValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698