Title: [114310] branches/subpixellayout

Diff

Modified: branches/subpixellayout/LayoutTests/fast/block/float/overhanging-tall-block.html (114309 => 114310)


--- branches/subpixellayout/LayoutTests/fast/block/float/overhanging-tall-block.html	2012-04-16 22:26:36 UTC (rev 114309)
+++ branches/subpixellayout/LayoutTests/fast/block/float/overhanging-tall-block.html	2012-04-16 22:27:32 UTC (rev 114310)
@@ -1,9 +1,9 @@
 <body style="overflow: hidden;">
-    <div><textarea rows="100000000"></textarea></div>
+    <div><textarea rows="1000000"></textarea></div>
     <div>
-        <textarea style="display: block; width: 100%" rows="100000000"></textarea>
+        <textarea style="display: block; width: 100%" rows="100000"></textarea>
         <div id="target" style="display: inline-block; width: 300px; height: 150px; float: left;"></div>
-        <textarea style="display: block;" rows="100000000"></textarea>
+        <textarea style="display: block;" rows="100000"></textarea>
     </div>
     <div></div>
     <script>

Modified: branches/subpixellayout/LayoutTests/fast/canvas/canvas-skia-excessive-size.html (114309 => 114310)


--- branches/subpixellayout/LayoutTests/fast/canvas/canvas-skia-excessive-size.html	2012-04-16 22:26:36 UTC (rev 114309)
+++ branches/subpixellayout/LayoutTests/fast/canvas/canvas-skia-excessive-size.html	2012-04-16 22:27:32 UTC (rev 114310)
@@ -29,7 +29,7 @@
 </script>
 </head>
 <body _onload_="test();">
-<canvas id="bigCanvas" width="134217728" height="1"></canvas>
+<canvas id="bigCanvas" width="1342177" height="1"></canvas>
 <p>This test checks to see if the browser survives the attempted creation
 of an excessively large canvas.</p>
 <hr>

Modified: branches/subpixellayout/LayoutTests/fast/css/large-number-round-trip.html (114309 => 114310)


--- branches/subpixellayout/LayoutTests/fast/css/large-number-round-trip.html	2012-04-16 22:26:36 UTC (rev 114309)
+++ branches/subpixellayout/LayoutTests/fast/css/large-number-round-trip.html	2012-04-16 22:27:32 UTC (rev 114310)
@@ -22,7 +22,7 @@
 
   var box = document.getElementById('box');
 
-  var testValue = "90010000px";
+  var testValue = "9001000px";
   box.style.left = testValue;
 
   var leftValue = window.getComputedStyle(box, null).left;

Modified: branches/subpixellayout/LayoutTests/fast/text/text-shadow-extreme-value.html (114309 => 114310)


--- branches/subpixellayout/LayoutTests/fast/text/text-shadow-extreme-value.html	2012-04-16 22:26:36 UTC (rev 114309)
+++ branches/subpixellayout/LayoutTests/fast/text/text-shadow-extreme-value.html	2012-04-16 22:27:32 UTC (rev 114310)
@@ -12,7 +12,7 @@
 }
 </script>
     <style type="text/css">
-    p { text-shadow: purple 0px 0px 38005685px; }
+    p { text-shadow: purple 0px 0px 380056px; }
     </style>
 </head>
 <body _onload_="test()">

Modified: branches/subpixellayout/LayoutTests/platform/mac/mathml/xHeight-expected.png


(Binary files differ)

Modified: branches/subpixellayout/Source/WebCore/html/shadow/TextControlInnerElements.cpp (114309 => 114310)


--- branches/subpixellayout/Source/WebCore/html/shadow/TextControlInnerElements.cpp	2012-04-16 22:26:36 UTC (rev 114309)
+++ branches/subpixellayout/Source/WebCore/html/shadow/TextControlInnerElements.cpp	2012-04-16 22:27:32 UTC (rev 114310)
@@ -285,7 +285,7 @@
     MouseEvent* mouseEvent = static_cast<MouseEvent*>(event);
     IntPoint local = roundedIntPoint(box->absoluteToLocal(mouseEvent->absoluteLocation(), false, true));
     if (mouseEvent->type() == eventNames().mousedownEvent && mouseEvent->button() == LeftButton) {
-        if (box->borderBoxRect().contains(local)) {
+        if (box->pixelSnappedBorderBoxRect().contains(local)) {
             // The following functions of HTMLInputElement may run _javascript_
             // code which detaches this shadow node. We need to take a reference
             // and check renderer() after such function calls.
@@ -304,7 +304,7 @@
     } else if (mouseEvent->type() == eventNames().mouseupEvent && mouseEvent->button() == LeftButton)
         stopRepeatingTimer();
     else if (event->type() == eventNames().mousemoveEvent) {
-        if (box->borderBoxRect().contains(local)) {
+        if (box->pixelSnappedBorderBoxRect().contains(local)) {
             if (!m_capturing) {
                 if (Frame* frame = document()->frame()) {
                     frame->eventHandler()->setCapturingMouseEventsNode(this);

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderBlock.cpp (114309 => 114310)


--- branches/subpixellayout/Source/WebCore/rendering/RenderBlock.cpp	2012-04-16 22:26:36 UTC (rev 114309)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderBlock.cpp	2012-04-16 22:27:32 UTC (rev 114310)
@@ -1666,7 +1666,7 @@
     if (!style()->hasAppearance())
         return;
 
-    IntRect inflatedRect = borderBoxRect();
+    IntRect inflatedRect = pixelSnappedBorderBoxRect();
     theme()->adjustRepaintRect(this, inflatedRect);
     addVisualOverflow(inflatedRect);
 }

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderBox.h (114309 => 114310)


--- branches/subpixellayout/Source/WebCore/rendering/RenderBox.h	2012-04-16 22:26:36 UTC (rev 114309)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderBox.h	2012-04-16 22:27:32 UTC (rev 114310)
@@ -133,8 +133,9 @@
     IntRect pixelSnappedFrameRect() const { return pixelSnappedIntRect(m_frameRect); }
     void setFrameRect(const LayoutRect& rect) { m_frameRect = rect; }
 
-    IntRect borderBoxRect() const { return IntRect(IntPoint(), IntSize(m_frameRect.pixelSnappedWidth(), m_frameRect.pixelSnappedHeight())); }
-    virtual IntRect borderBoundingBox() const { return borderBoxRect(); } 
+    LayoutRect borderBoxRect() const { return LayoutRect(LayoutPoint(), size()); }
+    IntRect pixelSnappedBorderBoxRect() const { return IntRect(IntPoint(), m_frameRect.pixelSnappedSize()); }
+    virtual IntRect borderBoundingBox() const { return pixelSnappedBorderBoxRect(); } 
 
     // The content area of the box (excludes padding - and intrinsic padding for table cells, etc... - and border).
     LayoutRect contentBoxRect() const { return LayoutRect(borderLeft() + paddingLeft(), borderTop() + paddingTop(), contentWidth(), contentHeight()); }
@@ -454,7 +455,7 @@
     LayoutRect layoutOverflowRectForPropagation(RenderStyle*) const;
 
     RenderOverflow* hasRenderOverflow() const { return m_overflow.get(); }    
-    bool hasVisualOverflow() const { return m_overflow && !borderBoxRect().contains(pixelSnappedIntRect(m_overflow->visualOverflowRect())); }
+    bool hasVisualOverflow() const { return m_overflow && !borderBoxRect().contains(m_overflow->visualOverflowRect()); }
 
     virtual bool needsPreferredWidthsRecalculation() const;
     virtual void computeIntrinsicRatioInformation(FloatSize& /* intrinsicSize */, double& /* intrinsicRatio */, bool& /* isPercentageIntrinsicSize */) const { }

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (114309 => 114310)


--- branches/subpixellayout/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp	2012-04-16 22:26:36 UTC (rev 114309)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp	2012-04-16 22:27:32 UTC (rev 114310)
@@ -813,7 +813,7 @@
                             }
                         }
                     }
-                } while (groupRemainingSpace);
+                } while (groupRemainingSpace >= 1);
             }
 
             // We didn't find any children that could grow.

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp (114309 => 114310)


--- branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp	2012-04-16 22:26:36 UTC (rev 114309)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp	2012-04-16 22:27:32 UTC (rev 114310)
@@ -1981,7 +1981,7 @@
     bool hasVerticalBar = verticalScrollbar();
     bool hasResizer = renderer()->style()->resize() != RESIZE_NONE;
     if ((hasHorizontalBar && hasVerticalBar) || (hasResizer && (hasHorizontalBar || hasVerticalBar)))
-        return cornerRect(this, renderBox()->borderBoxRect());
+        return cornerRect(this, renderBox()->pixelSnappedBorderBoxRect());
     return IntRect();
 }
 
@@ -2000,7 +2000,7 @@
         return IntRect();
     IntRect scrollCornerAndResizer = scrollCornerRect();
     if (scrollCornerAndResizer.isEmpty())
-        scrollCornerAndResizer = resizerCornerRect(this, pixelSnappedIntRect(box->borderBoxRect()));
+        scrollCornerAndResizer = resizerCornerRect(this, box->pixelSnappedBorderBoxRect());
     return scrollCornerAndResizer;
 }
 
@@ -2102,7 +2102,7 @@
     const RenderBox* box = renderBox();
     int x = minX + box->borderLeft();
     if (renderer()->style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft())
-        x += m_vBar ? m_vBar->width() : resizerCornerRect(this, box->borderBoxRect()).width();
+        x += m_vBar ? m_vBar->width() : resizerCornerRect(this, box->pixelSnappedBorderBoxRect()).width();
     return x;
 }
 
@@ -2305,7 +2305,7 @@
     if (!box)
         return;
 
-    const IntRect borderBox = box->borderBoxRect();
+    const IntRect borderBox = box->pixelSnappedBorderBoxRect();
     const IntRect& scrollCorner = scrollCornerRect();
     IntRect absBounds(borderBox.location() + offsetFromLayer, borderBox.size());
     if (m_vBar)
@@ -2644,7 +2644,7 @@
     RenderBox* box = renderBox();
     ASSERT(box);
 
-    IntRect absRect = resizerCornerRect(this, box->borderBoxRect());
+    IntRect absRect = resizerCornerRect(this, box->pixelSnappedBorderBoxRect());
     absRect.moveBy(paintOffset);
     if (!absRect.intersects(damageRect))
         return;
@@ -2699,7 +2699,7 @@
     
     IntRect resizeControlRect;
     if (renderer()->style()->resize() != RESIZE_NONE) {
-        resizeControlRect = resizerCornerRect(this, box->borderBoxRect());
+        resizeControlRect = resizerCornerRect(this, box->pixelSnappedBorderBoxRect());
         if (resizeControlRect.contains(localPoint))
             return true;
     }

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderLayerBacking.cpp (114309 => 114310)


--- branches/subpixellayout/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-04-16 22:26:36 UTC (rev 114309)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-04-16 22:27:32 UTC (rev 114310)
@@ -502,7 +502,7 @@
     }
     
     if (m_owningLayer->hasTransform()) {
-        const IntRect borderBox = toRenderBox(renderer())->borderBoxRect();
+        const IntRect borderBox = toRenderBox(renderer())->pixelSnappedBorderBoxRect();
 
         // Get layout bounds in the coords of compAncestor to match relativeCompositingBounds.
         IntRect layerBounds = IntRect(delta, borderBox.size());
@@ -1287,7 +1287,7 @@
     bool didAnimateFilter = false;
 #endif
     
-    if (hasTransform && m_graphicsLayer->addAnimation(transformVector, toRenderBox(renderer())->borderBoxRect().size(), anim, keyframes.animationName(), timeOffset)) {
+    if (hasTransform && m_graphicsLayer->addAnimation(transformVector, toRenderBox(renderer())->pixelSnappedBorderBoxRect().size(), anim, keyframes.animationName(), timeOffset)) {
         didAnimateTransform = true;
         compositor()->didStartAcceleratedAnimation(CSSPropertyWebkitTransform);
     }
@@ -1352,7 +1352,7 @@
             KeyframeValueList transformVector(AnimatedPropertyWebkitTransform);
             transformVector.insert(new TransformAnimationValue(0, &fromStyle->transform()));
             transformVector.insert(new TransformAnimationValue(1, &toStyle->transform()));
-            if (m_graphicsLayer->addAnimation(transformVector, toRenderBox(renderer())->borderBoxRect().size(), transformAnim, GraphicsLayer::animationNameForTransition(AnimatedPropertyWebkitTransform), timeOffset)) {
+            if (m_graphicsLayer->addAnimation(transformVector, toRenderBox(renderer())->pixelSnappedBorderBoxRect().size(), transformAnim, GraphicsLayer::animationNameForTransition(AnimatedPropertyWebkitTransform), timeOffset)) {
                 // To ensure that the correct transform is visible when the animation ends, also set the final transform.
                 updateLayerTransform(toStyle);
                 didAnimateTransform = true;

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderRubyRun.cpp (114309 => 114310)


--- branches/subpixellayout/Source/WebCore/rendering/RenderRubyRun.cpp	2012-04-16 22:26:36 UTC (rev 114309)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderRubyRun.cpp	2012-04-16 22:27:32 UTC (rev 114310)
@@ -287,11 +287,11 @@
         return;
 
     int logicalWidth = this->logicalWidth();
-    int logicalLeftOverhang = MAX_LAYOUT_UNIT;
-    int logicalRightOverhang = MAX_LAYOUT_UNIT;
+    int logicalLeftOverhang = numeric_limits<int>::max();
+    int logicalRightOverhang = numeric_limits<int>::max();
     for (RootInlineBox* rootInlineBox = rubyBase->firstRootBox(); rootInlineBox; rootInlineBox = rootInlineBox->nextRootBox()) {
-        logicalLeftOverhang = min<LayoutUnit>(logicalLeftOverhang, rootInlineBox->logicalLeft());
-        logicalRightOverhang = min<LayoutUnit>(logicalRightOverhang, logicalWidth - rootInlineBox->logicalRight());
+        logicalLeftOverhang = min<int>(logicalLeftOverhang, rootInlineBox->logicalLeft());
+        logicalRightOverhang = min<int>(logicalRightOverhang, logicalWidth - rootInlineBox->logicalRight());
     }
 
     startOverhang = style()->isLeftToRightDirection() ? logicalLeftOverhang : logicalRightOverhang;

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderTable.cpp (114309 => 114310)


--- branches/subpixellayout/Source/WebCore/rendering/RenderTable.cpp	2012-04-16 22:26:36 UTC (rev 114309)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderTable.cpp	2012-04-16 22:27:32 UTC (rev 114310)
@@ -509,7 +509,7 @@
         int bottomBorderOverflow = height() + outerBorderBottom() - borderBottom();
         int topBorderOverflow = borderTop() - outerBorderTop();
         IntRect borderOverflowRect(leftBorderOverflow, topBorderOverflow, rightBorderOverflow - leftBorderOverflow, bottomBorderOverflow - topBorderOverflow);
-        if (borderOverflowRect != borderBoxRect()) {
+        if (borderOverflowRect != pixelSnappedBorderBoxRect()) {
             addLayoutOverflow(borderOverflowRect);
             addVisualOverflow(borderOverflowRect);
         }

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderThemeMac.mm (114309 => 114310)


--- branches/subpixellayout/Source/WebCore/rendering/RenderThemeMac.mm	2012-04-16 22:26:36 UTC (rev 114309)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderThemeMac.mm	2012-04-16 22:27:32 UTC (rev 114310)
@@ -1534,7 +1534,7 @@
 
     float zoomLevel = o->style()->effectiveZoom();
 
-    FloatRect localBounds = [search cancelButtonRectForBounds:NSRect(input->renderBox()->borderBoxRect())];
+    FloatRect localBounds = [search cancelButtonRectForBounds:NSRect(input->renderBox()->pixelSnappedBorderBoxRect())];
 
 #if ENABLE(INPUT_SPEECH)
     // Take care of cases where the cancel button was not aligned with the right border of the input element (for e.g.
@@ -1619,7 +1619,7 @@
 
     updateActiveState([search searchButtonCell], o);
 
-    FloatRect localBounds = [search searchButtonRectForBounds:NSRect(input->renderBox()->borderBoxRect())];
+    FloatRect localBounds = [search searchButtonRectForBounds:NSRect(input->renderBox()->pixelSnappedBorderBoxRect())];
     localBounds = convertToPaintingRect(input->renderer(), o, localBounds, r);
 
     [[search searchButtonCell] drawWithFrame:localBounds inView:documentViewFor(o)];
@@ -1655,7 +1655,7 @@
     GraphicsContextStateSaver stateSaver(*paintInfo.context);
     float zoomLevel = o->style()->effectiveZoom();
 
-    FloatRect localBounds = [search searchButtonRectForBounds:NSRect(input->renderBox()->borderBoxRect())];
+    FloatRect localBounds = [search searchButtonRectForBounds:NSRect(input->renderBox()->pixelSnappedBorderBoxRect())];
     localBounds = convertToPaintingRect(input->renderer(), o, localBounds, r);
     
     IntRect unzoomedRect(localBounds);

Modified: branches/subpixellayout/Source/WebCore/rendering/svg/RenderSVGRoot.cpp (114309 => 114310)


--- branches/subpixellayout/Source/WebCore/rendering/svg/RenderSVGRoot.cpp	2012-04-16 22:26:36 UTC (rev 114309)
+++ branches/subpixellayout/Source/WebCore/rendering/svg/RenderSVGRoot.cpp	2012-04-16 22:27:32 UTC (rev 114310)
@@ -256,7 +256,7 @@
 void RenderSVGRoot::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& adjustedPaintOffset)
 {
     // An empty viewport disables rendering.
-    if (borderBoxRect().isEmpty())
+    if (pixelSnappedBorderBoxRect().isEmpty())
         return;
 
     // Don't paint, if the context explicitely disabled it.
@@ -368,7 +368,7 @@
     repaintRect = m_localToBorderBoxTransform.mapRect(repaintRect);
 
     // Apply initial viewport clip - not affected by overflow settings    
-    repaintRect.intersect(borderBoxRect());
+    repaintRect.intersect(pixelSnappedBorderBoxRect());
 
     const SVGRenderStyle* svgStyle = style()->svgStyle();
     if (const ShadowData* shadow = svgStyle->shadow())
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to