Title: [100189] branches/subpixellayout/Source/WebCore
Revision
100189
Author
[email protected]
Date
2011-11-14 14:19:24 -0800 (Mon, 14 Nov 2011)

Log Message

Reverting lengths to being stored as pixel values for the specified zoom level and adopting an enclosingIntRect model for reporting sizes in RenderTreeAsText. This vastly lowers the number of failing layout tests on our branch.

Modified Paths

Diff

Modified: branches/subpixellayout/Source/WebCore/css/CSSPrimitiveValue.cpp (100188 => 100189)


--- branches/subpixellayout/Source/WebCore/css/CSSPrimitiveValue.cpp	2011-11-14 21:56:58 UTC (rev 100188)
+++ branches/subpixellayout/Source/WebCore/css/CSSPrimitiveValue.cpp	2011-11-14 22:19:24 UTC (rev 100189)
@@ -345,7 +345,7 @@
 template<> Length CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, double multiplier, bool computingFontSize)
 {
     // FIXME: Length.h no longer expects 28 bit integers, so these bounds should be INT_MAX and INT_MIN
-    return Length(static_cast<float>(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)), Fixed);
+    return Length(roundForImpreciseConversion<int, intMaxForLength, intMinForLength>(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)), Fixed);
 }
 
 template<> short CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, double multiplier, bool computingFontSize)

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderTreeAsText.cpp (100188 => 100189)


--- branches/subpixellayout/Source/WebCore/rendering/RenderTreeAsText.cpp	2011-11-14 21:56:58 UTC (rev 100188)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderTreeAsText.cpp	2011-11-14 22:19:24 UTC (rev 100189)
@@ -313,6 +313,9 @@
     if (adjustForTableCells)
         r.move(0, -toRenderTableCell(o.containingBlock())->intrinsicPaddingBefore());
 
+    // FIXME: Convert layout test results to report sub-pixel values, in the meantime using enclosingIntRect
+    // for consistency with old results.
+    r = enclosingIntRect(r);
     ts << " " << r;
 
     if (!(o.isText() && !o.isBR())) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to