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

Unified Diff: Source/WebCore/platform/Length.h

Issue 10349004: Revert 115573 - Move Length and CSS length computation to float (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1123/
Patch Set: Created 8 years, 8 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/WebCore/css/CSSPrimitiveValue.cpp ('k') | Source/WebCore/rendering/RenderTableCell.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/Length.h
===================================================================
--- Source/WebCore/platform/Length.h (revision 115918)
+++ Source/WebCore/platform/Length.h (working copy)
@@ -109,13 +109,8 @@
return *this;
}
- inline float value() const
+ int value() const
{
- return getFloatValue();
- }
-
- int intValue() const
- {
if (isCalculated()) {
ASSERT_NOT_REACHED();
return 0;
@@ -123,6 +118,13 @@
return getIntValue();
}
+ // FIXME: When we switch to sub-pixel layout, value will return float by default, and this will inherit
+ // the current implementation of value().
+ int intValue() const
+ {
+ return value();
+ }
+
float percent() const
{
ASSERT(type() == Percent);
« no previous file with comments | « Source/WebCore/css/CSSPrimitiveValue.cpp ('k') | Source/WebCore/rendering/RenderTableCell.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698