Title: [109639] branches/subpixellayout/Source

Diff

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderBlock.cpp (109638 => 109639)


--- branches/subpixellayout/Source/WebCore/rendering/RenderBlock.cpp	2012-03-03 01:22:24 UTC (rev 109638)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderBlock.cpp	2012-03-03 01:22:41 UTC (rev 109639)
@@ -1662,7 +1662,7 @@
     if (!style()->hasAppearance())
         return;
 
-    IntRect inflatedRect = pixelSnappedBorderBoxRect();
+    IntRect inflatedRect = borderBoxRect();
     theme()->adjustRepaintRect(this, inflatedRect);
     addVisualOverflow(inflatedRect);
 }

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderBox.h (109638 => 109639)


--- branches/subpixellayout/Source/WebCore/rendering/RenderBox.h	2012-03-03 01:22:24 UTC (rev 109638)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderBox.h	2012-03-03 01:22:41 UTC (rev 109639)
@@ -126,10 +126,8 @@
     LayoutRect frameRect() const { return m_frameRect; }
     void setFrameRect(const LayoutRect& rect) { m_frameRect = rect; }
 
-    // FIXME: We shouldn't be returning this as a LayoutRect, since it loses its position and won't properly pixel snap.
-    LayoutRect borderBoxRect() const { return LayoutRect(0, 0, width(), height()); }
-    IntRect pixelSnappedBorderBoxRect() const { return IntRect(IntPoint(), IntSize(m_frameRect.pixelSnappedWidth(), m_frameRect.pixelSnappedHeight())); }
-    virtual IntRect borderBoundingBox() const { return pixelSnappedBorderBoxRect(); } 
+    IntRect borderBoxRect() const { return IntRect(IntPoint(), IntSize(m_frameRect.pixelSnappedWidth(), m_frameRect.pixelSnappedHeight())); }
+    virtual IntRect borderBoundingBox() const { return borderBoxRect(); } 
 
     // The content area of the box (excludes padding and border).
     LayoutRect contentBoxRect() const { return LayoutRect(borderLeft() + paddingLeft(), borderTop() + paddingTop(), contentWidth(), contentHeight()); }
@@ -443,7 +441,7 @@
     LayoutRect layoutOverflowRectForPropagation(RenderStyle*) const;
 
     RenderOverflow* hasRenderOverflow() const { return m_overflow.get(); }    
-    bool hasVisualOverflow() const { return m_overflow && !borderBoxRect().contains(m_overflow->visualOverflowRect()); }
+    bool hasVisualOverflow() const { return m_overflow && !borderBoxRect().contains(pixelSnappedIntRect(m_overflow->visualOverflowRect())); }
 
     virtual bool needsPreferredWidthsRecalculation() const;
     virtual void computeIntrinsicRatioInformation(FloatSize& /* intrinsicSize */, double& /* intrinsicRatio */, bool& /* isPercentageIntrinsicSize */) const { }

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp (109638 => 109639)


--- branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp	2012-03-03 01:22:24 UTC (rev 109638)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp	2012-03-03 01:22:41 UTC (rev 109639)
@@ -1868,7 +1868,7 @@
     bool hasVerticalBar = verticalScrollbar();
     bool hasResizer = renderer()->style()->resize() != RESIZE_NONE;
     if ((hasHorizontalBar && hasVerticalBar) || (hasResizer && (hasHorizontalBar || hasVerticalBar)))
-        return cornerRect(this, renderBox()->pixelSnappedBorderBoxRect());
+        return cornerRect(this, renderBox()->borderBoxRect());
     return IntRect();
 }
 
@@ -2172,7 +2172,7 @@
     if (!box)
         return;
 
-    const IntRect borderBox = box->pixelSnappedBorderBoxRect();
+    const IntRect borderBox = box->borderBoxRect();
     const IntRect& scrollCorner = scrollCornerRect();
     IntRect absBounds(borderBox.location() + offsetFromLayer, borderBox.size());
     if (m_vBar)
@@ -2534,7 +2534,7 @@
     RenderBox* box = renderBox();
     ASSERT(box);
 
-    IntRect absRect = resizerCornerRect(this, box->pixelSnappedBorderBoxRect());
+    IntRect absRect = resizerCornerRect(this, box->borderBoxRect());
     absRect.moveBy(paintOffset);
     if (!absRect.intersects(damageRect))
         return;
@@ -2589,7 +2589,7 @@
     
     IntRect resizeControlRect;
     if (renderer()->style()->resize() != RESIZE_NONE) {
-        resizeControlRect = resizerCornerRect(this, box->pixelSnappedBorderBoxRect());
+        resizeControlRect = resizerCornerRect(this, box->borderBoxRect());
         if (resizeControlRect.contains(localPoint))
             return true;
     }

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderLayerBacking.cpp (109638 => 109639)


--- branches/subpixellayout/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-03-03 01:22:24 UTC (rev 109638)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-03-03 01:22:41 UTC (rev 109639)
@@ -488,7 +488,7 @@
     }
     
     if (m_owningLayer->hasTransform()) {
-        const IntRect borderBox = toRenderBox(renderer())->pixelSnappedBorderBoxRect();
+        const IntRect borderBox = toRenderBox(renderer())->borderBoxRect();
 
         // Get layout bounds in the coords of compAncestor to match relativeCompositingBounds.
         IntRect layerBounds = IntRect(delta, borderBox.size());
@@ -1243,7 +1243,7 @@
     bool didAnimateFilter = false;
 #endif
     
-    if (hasTransform && m_graphicsLayer->addAnimation(transformVector, toRenderBox(renderer())->pixelSnappedBorderBoxRect().size(), anim, keyframes.animationName(), timeOffset)) {
+    if (hasTransform && m_graphicsLayer->addAnimation(transformVector, toRenderBox(renderer())->borderBoxRect().size(), anim, keyframes.animationName(), timeOffset)) {
         didAnimateTransform = true;
         compositor()->didStartAcceleratedAnimation(CSSPropertyWebkitTransform);
     }
@@ -1308,7 +1308,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())->pixelSnappedBorderBoxRect().size(), transformAnim, GraphicsLayer::animationNameForTransition(AnimatedPropertyWebkitTransform), timeOffset)) {
+            if (m_graphicsLayer->addAnimation(transformVector, toRenderBox(renderer())->borderBoxRect().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/RenderThemeMac.h (109638 => 109639)


--- branches/subpixellayout/Source/WebCore/rendering/RenderThemeMac.h	2012-03-03 01:22:24 UTC (rev 109638)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderThemeMac.h	2012-03-03 01:22:41 UTC (rev 109639)
@@ -74,12 +74,12 @@
     virtual int popupInternalPaddingTop(RenderStyle*) const;
     virtual int popupInternalPaddingBottom(RenderStyle*) const;
     
-    virtual bool paintCapsLockIndicator(RenderObject*, const PaintInfo&, const LayoutRect&);
+    virtual bool paintCapsLockIndicator(RenderObject*, const PaintInfo&, const IntRect&);
 
     virtual bool popsMenuByArrowKeys() const OVERRIDE { return true; }
 
 #if ENABLE(METER_TAG)
-    virtual LayoutSize meterSizeForBounds(const RenderMeter*, const LayoutRect&) const;
+    virtual IntSize meterSizeForBounds(const RenderMeter*, const IntRect&) const;
     virtual bool paintMeter(RenderObject*, const PaintInfo&, const IntRect&);
     virtual bool supportsMeter(ControlPart) const;
 #endif

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderThemeMac.mm (109638 => 109639)


--- branches/subpixellayout/Source/WebCore/rendering/RenderThemeMac.mm	2012-03-03 01:22:24 UTC (rev 109638)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderThemeMac.mm	2012-03-03 01:22:41 UTC (rev 109639)
@@ -729,13 +729,13 @@
 {
 }
 
-bool RenderThemeMac::paintCapsLockIndicator(RenderObject*, const PaintInfo& paintInfo, const LayoutRect& r)
+bool RenderThemeMac::paintCapsLockIndicator(RenderObject*, const PaintInfo& paintInfo, const IntRect& r)
 {
     if (paintInfo.context->paintingDisabled())
         return true;
 
     LocalCurrentGraphicsContext localContext(paintInfo.context);
-    wkDrawCapsLockIndicator(localContext.cgContext(), pixelSnappedIntRect(r));
+    wkDrawCapsLockIndicator(localContext.cgContext(), r);
     
     return false;
 }
@@ -794,7 +794,7 @@
     // Now inflate it to account for the shadow.
     IntRect inflatedRect = r;
     if (r.width() >= minimumMenuListSize(o->style()))
-        inflatedRect = pixelSnappedIntRect(inflateRect(inflatedRect, size, popupButtonMargins(), zoomLevel));
+        inflatedRect = inflateRect(inflatedRect, size, popupButtonMargins(), zoomLevel);
 
     GraphicsContextStateSaver stateSaver(*paintInfo.context);
     
@@ -817,16 +817,16 @@
 
 #if ENABLE(METER_TAG)
 
-LayoutSize RenderThemeMac::meterSizeForBounds(const RenderMeter* renderMeter, const LayoutRect& bounds) const
+IntSize RenderThemeMac::meterSizeForBounds(const RenderMeter* renderMeter, const IntRect& bounds) const
 {
     if (NoControlPart == renderMeter->style()->appearance())
         return bounds.size();
 
     NSLevelIndicatorCell* cell = levelIndicatorFor(renderMeter);
     // Makes enough room for cell's intrinsic size.
-    NSSize cellSize = [cell cellSizeForBounds:IntRect(IntPoint(), roundedIntSize(bounds.size()))];
-    return LayoutSize(bounds.width().toInt() < cellSize.width ? cellSize.width : bounds.width().toInt(),
-                      bounds.height().toInt() < cellSize.height ? cellSize.height : bounds.height().toInt());
+    NSSize cellSize = [cell cellSizeForBounds:IntRect(IntPoint(), bounds.size())];
+    return IntSize(bounds.width() < cellSize.width ? cellSize.width : bounds.width(),
+                   bounds.height() < cellSize.height ? cellSize.height : bounds.height());
 }
 
 bool RenderThemeMac::paintMeter(RenderObject* renderObject, const PaintInfo& paintInfo, const IntRect& rect)
@@ -1533,7 +1533,7 @@
 
     float zoomLevel = o->style()->effectiveZoom();
 
-    FloatRect localBounds = [search cancelButtonRectForBounds:NSRect(FloatRect(input->renderBox()->borderBoxRect()))];
+    FloatRect localBounds = [search cancelButtonRectForBounds:NSRect(input->renderBox()->borderBoxRect())];
 
 #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.
@@ -1618,7 +1618,7 @@
 
     updateActiveState([search searchButtonCell], o);
 
-    FloatRect localBounds = [search searchButtonRectForBounds:NSRect(FloatRect(input->renderBox()->borderBoxRect()))];
+    FloatRect localBounds = [search searchButtonRectForBounds:NSRect(input->renderBox()->borderBoxRect())];
     localBounds = convertToPaintingRect(input->renderer(), o, localBounds, r);
 
     [[search searchButtonCell] drawWithFrame:localBounds inView:documentViewFor(o)];
@@ -1654,7 +1654,7 @@
     GraphicsContextStateSaver stateSaver(*paintInfo.context);
     float zoomLevel = o->style()->effectiveZoom();
 
-    FloatRect localBounds = [search searchButtonRectForBounds:NSRect(FloatRect(input->renderBox()->borderBoxRect()))];
+    FloatRect localBounds = [search searchButtonRectForBounds:NSRect(input->renderBox()->borderBoxRect())];
     localBounds = convertToPaintingRect(input->renderer(), o, localBounds, r);
     
     IntRect unzoomedRect(localBounds);

Modified: branches/subpixellayout/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm (109638 => 109639)


--- branches/subpixellayout/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm	2012-03-03 01:22:24 UTC (rev 109638)
+++ branches/subpixellayout/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm	2012-03-03 01:22:41 UTC (rev 109639)
@@ -281,7 +281,7 @@
     RenderLayerBacking* backing = layer ? layer->backing() : 0;
     IntSize fullScreenSize = fullScreenRect.size();
     if (backing)
-        fullScreenSize = expandedIntSize(backing->contentsBox().size());
+        fullScreenSize = backing->contentsBox().size();
 
     CALayer* caLayer = m_rootLayer->children().first()->platformLayer();
 

Modified: branches/subpixellayout/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp (109638 => 109639)


--- branches/subpixellayout/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp	2012-03-03 01:22:24 UTC (rev 109638)
+++ branches/subpixellayout/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp	2012-03-03 01:22:41 UTC (rev 109639)
@@ -339,7 +339,7 @@
         CGRect box = CGPDFPageGetBoxRect(pdfPage, kCGPDFCropBox);
         if (CGRectIsEmpty(box))
             box = CGPDFPageGetBoxRect(pdfPage, kCGPDFMediaBox);
-        m_pageBoxes.append(enclosingIntRect(box));
+        m_pageBoxes.append(box);
         m_pdfDocumentSize.setWidth(max(m_pdfDocumentSize.width(), static_cast<int>(box.size.width)));
         m_pdfDocumentSize.expand(0, box.size.height);
     }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to