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

Unified Diff: Source/WebCore/css/CSSPrimitiveValue.cpp

Issue 10908295: Merge 127933 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 3 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 | « LayoutTests/platform/wk2/Skipped ('k') | Source/WebCore/platform/FractionalLayoutUnit.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/css/CSSPrimitiveValue.cpp
===================================================================
--- Source/WebCore/css/CSSPrimitiveValue.cpp (revision 128804)
+++ Source/WebCore/css/CSSPrimitiveValue.cpp (working copy)
@@ -469,7 +469,8 @@
template<> Length CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize)
{
#if ENABLE(SUBPIXEL_LAYOUT)
- return Length(static_cast<float>(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)), Fixed);
+ double value = computeLengthDouble(style, rootStyle, multiplier, computingFontSize);
+ return Length(static_cast<float>(value > intMaxForLayoutUnit || value < intMinForLayoutUnit ? 0.0 : value), Fixed);
#else
return Length(roundForImpreciseConversion<float>(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)), Fixed);
#endif
« no previous file with comments | « LayoutTests/platform/wk2/Skipped ('k') | Source/WebCore/platform/FractionalLayoutUnit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698