Chromium Code Reviews| 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, |
|
johnme
2013/12/18 12:04:15
I'm probably missing something, but why did you ad
Timothy Loh
2013/12/23 06:28:16
See other comments about vw/vh meaning.
This seem
|
| 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 |
| { |