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

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: rebased.. Created 7 years 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: Source/platform/Length.h
diff --git a/Source/platform/Length.h b/Source/platform/Length.h
index 60d20e9703020e01f31274f72d37042f6fda1f53..7d8cefaecb2c2f89cf2eb4a6dbd5387f9c9aa84b 100644
--- a/Source/platform/Length.h
+++ b/Source/platform/Length.h
@@ -40,7 +40,6 @@ enum LengthType {
Intrinsic, MinIntrinsic,
MinContent, MaxContent, FillAvailable, FitContent,
Calculated,
- ViewportPercentageWidth, ViewportPercentageHeight, ViewportPercentageMin, ViewportPercentageMax,
ExtendToZoom,
Undefined
};
@@ -229,7 +228,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 +276,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
{

Powered by Google App Engine
This is Rietveld 408576698