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

Unified Diff: Source/platform/Length.h

Issue 82083002: Move viewport unit resolution to style recalc time (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: rename browser zoom to page zoom Created 6 years, 12 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/svg/SVGSVGElement.cpp ('k') | Source/platform/LengthFunctions.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/Length.h
diff --git a/Source/platform/Length.h b/Source/platform/Length.h
index 60d20e9703020e01f31274f72d37042f6fda1f53..9048d49bf30f80e525c22fa869a5515e5d89f30f 100644
--- a/Source/platform/Length.h
+++ b/Source/platform/Length.h
@@ -35,13 +35,14 @@
namespace WebCore {
+// FIXME: This enum makes it hard to tell in general what values may be
+// appropriate for any given Length.
enum LengthType {
Auto, Percent, Fixed,
Intrinsic, MinIntrinsic,
MinContent, MaxContent, FillAvailable, FitContent,
Calculated,
- ViewportPercentageWidth, ViewportPercentageHeight, ViewportPercentageMin, ViewportPercentageMax,
- ExtendToZoom,
+ ExtendToZoom, DeviceWidth, DeviceHeight,
Undefined
};
@@ -229,7 +230,7 @@ public:
bool isIntrinsicOrAuto() const { return type() == Auto || isLegacyIntrinsic() || isIntrinsic(); }
bool isLegacyIntrinsic() const { return type() == Intrinsic || type() == MinIntrinsic; }
bool isIntrinsic() const { return type() == MinContent || type() == MaxContent || type() == FillAvailable || type() == FitContent; }
- bool isSpecified() const { return type() == Fixed || type() == Percent || type() == Calculated || isViewportPercentage(); }
+ bool isSpecified() const { return type() == Fixed || type() == Percent || type() == Calculated; }
bool isSpecifiedOrIntrinsic() const { return isSpecified() || isIntrinsic(); }
bool isCalculated() const { return type() == Calculated; }
bool isCalculatedEqual(const Length&) const;
@@ -277,16 +278,6 @@ public:
}
float nonNanCalculatedValue(int maxValue) const;
- bool isViewportPercentage() const
- {
- LengthType lengthType = type();
- return lengthType >= ViewportPercentageWidth && lengthType <= ViewportPercentageMax;
- }
- float viewportPercentageLength() const
- {
- ASSERT(isViewportPercentage());
- return getFloatValue();
- }
private:
int getIntValue() const
{
« no previous file with comments | « Source/core/svg/SVGSVGElement.cpp ('k') | Source/platform/LengthFunctions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698