Changeset 154009 in webkit


Ignore:
Timestamp:
Aug 13, 2013 10:08:19 AM (11 years ago)
Author:
allan.jensen@digia.com
Message:

REGRESSION(SUBPIXEL_LAYOUT) Composited layers can cause one pixel shifts
https://bugs.webkit.org/show_bug.cgi?id=115304

Reviewed by David Hyatt.

Source/WebCore:

Accelerated layers can cause blocks at subpixel offsets to shift because
accumulated subpixel offsets are lost between each layers.

To solve this layer bounds are now calculated in LayoutUnits, and their
subpixel offset saved so it can be used to ensure correct pixel-snapping
during painting.

Test: fast/sub-pixel/sub-pixel-composited-layers.html

  • WebCore.exp.in:
  • inspector/InspectorLayerTreeAgent.cpp:

(WebCore::InspectorLayerTreeAgent::buildObjectForLayer):

  • platform/graphics/LayoutPoint.h:

(WebCore::LayoutPoint::fraction):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::setupClipPath):
(WebCore::RenderLayer::setupFilters):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::calculateLayerBounds):

  • rendering/RenderLayer.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateCompositedBounds):
(WebCore::RenderLayerBacking::updateAfterWidgetResize):
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
(WebCore::RenderLayerBacking::resetContentsRect):
(WebCore::RenderLayerBacking::contentOffsetInCompostingLayer):
(WebCore::RenderLayerBacking::contentsBox):
(WebCore::RenderLayerBacking::backgroundBox):
(WebCore::RenderLayerBacking::paintIntoLayer):
(WebCore::RenderLayerBacking::paintContents):
(WebCore::RenderLayerBacking::compositedBounds):
(WebCore::RenderLayerBacking::setCompositedBounds):

  • rendering/RenderLayerBacking.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::logLayerInfo):
(WebCore::RenderLayerCompositor::calculateCompositedBounds):

  • rendering/RenderLayerCompositor.h:
  • rendering/RenderTreeAsText.cpp:

(WebCore::operator<<):

  • rendering/RenderTreeAsText.h:

LayoutTests:

  • fast/sub-pixel/sub-pixel-composited-layers-expected.html: Added.
  • fast/sub-pixel/sub-pixel-composited-layers.html: Added.
Location:
trunk
Files:
2 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r154005 r154009  
     12013-08-13  Allan Sandfeld Jensen  <allan.jensen@digia.com>
     2
     3        REGRESSION(SUBPIXEL_LAYOUT) Composited layers can cause one pixel shifts
     4        https://bugs.webkit.org/show_bug.cgi?id=115304
     5
     6        Reviewed by David Hyatt.
     7
     8        * fast/sub-pixel/sub-pixel-composited-layers-expected.html: Added.
     9        * fast/sub-pixel/sub-pixel-composited-layers.html: Added.
     10
    1112013-08-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r154006 r154009  
     12013-08-13  Allan Sandfeld Jensen  <allan.jensen@digia.com>
     2
     3        REGRESSION(SUBPIXEL_LAYOUT) Composited layers can cause one pixel shifts
     4        https://bugs.webkit.org/show_bug.cgi?id=115304
     5
     6        Reviewed by David Hyatt.
     7
     8        Accelerated layers can cause blocks at subpixel offsets to shift because
     9        accumulated subpixel offsets are lost between each layers.
     10
     11        To solve this layer bounds are now calculated in LayoutUnits, and their
     12        subpixel offset saved so it can be used to ensure correct pixel-snapping
     13        during painting.
     14
     15        Test: fast/sub-pixel/sub-pixel-composited-layers.html
     16
     17        * WebCore.exp.in:
     18        * inspector/InspectorLayerTreeAgent.cpp:
     19        (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
     20        * platform/graphics/LayoutPoint.h:
     21        (WebCore::LayoutPoint::fraction):
     22        * rendering/RenderLayer.cpp:
     23        (WebCore::RenderLayer::setupClipPath):
     24        (WebCore::RenderLayer::setupFilters):
     25        (WebCore::RenderLayer::paintLayerContents):
     26        (WebCore::RenderLayer::calculateLayerBounds):
     27        * rendering/RenderLayer.h:
     28        * rendering/RenderLayerBacking.cpp:
     29        (WebCore::RenderLayerBacking::updateCompositedBounds):
     30        (WebCore::RenderLayerBacking::updateAfterWidgetResize):
     31        (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
     32        (WebCore::RenderLayerBacking::resetContentsRect):
     33        (WebCore::RenderLayerBacking::contentOffsetInCompostingLayer):
     34        (WebCore::RenderLayerBacking::contentsBox):
     35        (WebCore::RenderLayerBacking::backgroundBox):
     36        (WebCore::RenderLayerBacking::paintIntoLayer):
     37        (WebCore::RenderLayerBacking::paintContents):
     38        (WebCore::RenderLayerBacking::compositedBounds):
     39        (WebCore::RenderLayerBacking::setCompositedBounds):
     40        * rendering/RenderLayerBacking.h:
     41        * rendering/RenderLayerCompositor.cpp:
     42        (WebCore::RenderLayerCompositor::logLayerInfo):
     43        (WebCore::RenderLayerCompositor::calculateCompositedBounds):
     44        * rendering/RenderLayerCompositor.h:
     45        * rendering/RenderTreeAsText.cpp:
     46        (WebCore::operator<<):
     47        * rendering/RenderTreeAsText.h:
     48
    1492013-08-13  peavo@outlook.com  <peavo@outlook.com>
    250
  • trunk/Source/WebCore/WebCore.exp.in

    r153907 r154009  
    11371137__ZN7WebCore9DOMWindow36dispatchAllPendingBeforeUnloadEventsEv
    11381138__ZN7WebCore9FloatRectC1ERK6CGRect
     1139__ZN7WebCore9FloatRectC1ERKNS_10LayoutRectE
    11391140__ZN7WebCore9FloatRectC1ERKNS_7IntRectE
    11401141__ZN7WebCore9FloatSizeC1ERK6CGSize
  • trunk/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp

    r152103 r154009  
    181181        .setBounds(buildObjectForIntRect(renderer->absoluteBoundingBoxRect()))
    182182        .setMemory(backing->backingStoreMemoryEstimate())
    183         .setCompositedBounds(buildObjectForIntRect(backing->compositedBounds()))
     183        .setCompositedBounds(buildObjectForIntRect(enclosingIntRect(backing->compositedBounds())))
    184184        .setPaintCount(backing->graphicsLayer()->repaintCount());
    185185
  • trunk/Source/WebCore/platform/graphics/LayoutPoint.h

    r152175 r154009  
    8282        return LayoutPoint(m_y, m_x);
    8383    }
    84    
     84
     85    LayoutPoint fraction() const
     86    {
     87        return LayoutPoint(m_x.fraction(), m_y.fraction());
     88    }
     89
    8590    operator FloatPoint() const { return FloatPoint(m_x, m_y); }
    8691
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r153927 r154009  
    37313731}
    37323732
    3733 bool RenderLayer::setupClipPath(GraphicsContext* context, const LayerPaintingInfo& paintingInfo, const LayoutPoint& offsetFromRoot, IntRect& rootRelativeBounds, bool& rootRelativeBoundsComputed)
     3733bool RenderLayer::setupClipPath(GraphicsContext* context, const LayerPaintingInfo& paintingInfo, const LayoutPoint& offsetFromRoot, LayoutRect& rootRelativeBounds, bool& rootRelativeBoundsComputed)
    37343734{
    37353735    if (!renderer()->hasClipPath() || context->paintingDisabled())
     
    37743774
    37753775#if ENABLE(CSS_FILTERS)
    3776 PassOwnPtr<FilterEffectRendererHelper> RenderLayer::setupFilters(GraphicsContext* context, LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags, const LayoutPoint& offsetFromRoot, IntRect& rootRelativeBounds, bool& rootRelativeBoundsComputed)
     3776PassOwnPtr<FilterEffectRendererHelper> RenderLayer::setupFilters(GraphicsContext* context, LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags, const LayoutPoint& offsetFromRoot, LayoutRect& rootRelativeBounds, bool& rootRelativeBoundsComputed)
    37773777{
    37783778    if (context->paintingDisabled())
     
    38653865    convertToLayerCoords(paintingInfo.rootLayer, offsetFromRoot);
    38663866
    3867     IntRect rootRelativeBounds;
     3867    LayoutRect rootRelativeBounds;
    38683868    bool rootRelativeBoundsComputed = false;
    38693869
     
    53825382}
    53835383
    5384 IntRect RenderLayer::calculateLayerBounds(const RenderLayer* ancestorLayer, const LayoutPoint* offsetFromRoot, CalculateLayerBoundsFlags flags) const
     5384LayoutRect RenderLayer::calculateLayerBounds(const RenderLayer* ancestorLayer, const LayoutPoint* offsetFromRoot, CalculateLayerBoundsFlags flags) const
    53855385{
    53865386    if (!isSelfPaintingLayer())
    5387         return IntRect();
     5387        return LayoutRect();
    53885388
    53895389    // FIXME: This could be improved to do a check like hasVisibleNonCompositingDescendantLayers() (bug 92580).
    53905390    if ((flags & ExcludeHiddenDescendants) && this != ancestorLayer && !hasVisibleContent() && !hasVisibleDescendant())
    5391         return IntRect();
     5391        return LayoutRect();
    53925392
    53935393    RenderLayerModelObject* renderer = this->renderer();
     
    54295429            convertToLayerCoords(ancestorLayer, ancestorRelOffset);
    54305430            localClipRect.moveBy(ancestorRelOffset);
    5431             return pixelSnappedIntRect(localClipRect);
     5431            return localClipRect;
    54325432        }
    54335433    }
     
    54405440    if (RenderLayer* reflection = reflectionLayer()) {
    54415441        if (!reflection->isComposited()) {
    5442             IntRect childUnionBounds = reflection->calculateLayerBounds(this, 0, descendantFlags);
     5442            LayoutRect childUnionBounds = reflection->calculateLayerBounds(this, 0, descendantFlags);
    54435443            unionBounds.unite(childUnionBounds);
    54445444        }
     
    54565456            RenderLayer* curLayer = negZOrderList->at(i);
    54575457            if (flags & IncludeCompositedDescendants || !curLayer->isComposited()) {
    5458                 IntRect childUnionBounds = curLayer->calculateLayerBounds(this, 0, descendantFlags);
     5458                LayoutRect childUnionBounds = curLayer->calculateLayerBounds(this, 0, descendantFlags);
    54595459                unionBounds.unite(childUnionBounds);
    54605460            }
     
    54675467            RenderLayer* curLayer = posZOrderList->at(i);
    54685468            if (flags & IncludeCompositedDescendants || !curLayer->isComposited()) {
    5469                 IntRect childUnionBounds = curLayer->calculateLayerBounds(this, 0, descendantFlags);
     5469                LayoutRect childUnionBounds = curLayer->calculateLayerBounds(this, 0, descendantFlags);
    54705470                unionBounds.unite(childUnionBounds);
    54715471            }
     
    54815481            ASSERT(!curLayer->isOutOfFlowRenderFlowThread());
    54825482            if (flags & IncludeCompositedDescendants || !curLayer->isComposited()) {
    5483                 IntRect curAbsBounds = curLayer->calculateLayerBounds(this, 0, descendantFlags);
     5483                LayoutRect curAbsBounds = curLayer->calculateLayerBounds(this, 0, descendantFlags);
    54845484                unionBounds.unite(curAbsBounds);
    54855485            }
     
    55085508    unionBounds.moveBy(ancestorRelOffset);
    55095509   
    5510     return pixelSnappedIntRect(unionBounds);
     5510    return unionBounds;
    55115511}
    55125512
  • trunk/Source/WebCore/rendering/RenderLayer.h

    r152122 r154009  
    706706
    707707    // Can pass offsetFromRoot if known.
    708     IntRect calculateLayerBounds(const RenderLayer* ancestorLayer, const LayoutPoint* offsetFromRoot = 0, CalculateLayerBoundsFlags = DefaultCalculateLayerBoundsFlags) const;
     708    LayoutRect calculateLayerBounds(const RenderLayer* ancestorLayer, const LayoutPoint* offsetFromRoot = 0, CalculateLayerBoundsFlags = DefaultCalculateLayerBoundsFlags) const;
    709709   
    710710    // WARNING: This method returns the offset for the parent as this is what updateLayerPositions expects.
     
    941941
    942942    bool setupFontSubpixelQuantization(GraphicsContext*, bool& didQuantizeFonts);
    943     bool setupClipPath(GraphicsContext*, const LayerPaintingInfo&, const LayoutPoint& offsetFromRoot, IntRect& rootRelativeBounds, bool& rootRelativeBoundsComputed);
     943    bool setupClipPath(GraphicsContext*, const LayerPaintingInfo&, const LayoutPoint& offsetFromRoot, LayoutRect& rootRelativeBounds, bool& rootRelativeBoundsComputed);
    944944#if ENABLE(CSS_FILTERS)
    945     PassOwnPtr<FilterEffectRendererHelper> setupFilters(GraphicsContext*, LayerPaintingInfo&, PaintLayerFlags, const LayoutPoint& offsetFromRoot, IntRect& rootRelativeBounds, bool& rootRelativeBoundsComputed);
     945    PassOwnPtr<FilterEffectRendererHelper> setupFilters(GraphicsContext*, LayerPaintingInfo&, PaintLayerFlags, const LayoutPoint& offsetFromRoot, LayoutRect& rootRelativeBounds, bool& rootRelativeBoundsComputed);
    946946    GraphicsContext* applyFilters(FilterEffectRendererHelper*, GraphicsContext* originalContext, LayerPaintingInfo&, LayerFragments&);
    947947#endif
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r153805 r154009  
    426426void RenderLayerBacking::updateCompositedBounds()
    427427{
    428     IntRect layerBounds = compositor()->calculateCompositedBounds(m_owningLayer, m_owningLayer);
     428    LayoutRect layerBounds = compositor()->calculateCompositedBounds(m_owningLayer, m_owningLayer);
    429429
    430430    // Clip to the size of the document or enclosing overflow-scroll layer.
     
    448448        clippingBounds.move(-delta.x(), -delta.y());
    449449
    450         layerBounds.intersect(pixelSnappedIntRect(clippingBounds));
     450        layerBounds.intersect(clippingBounds);
    451451        m_boundsConstrainedByClipping = true;
    452452    } else
     
    471471        if (RenderLayerCompositor* innerCompositor = RenderLayerCompositor::frameContentsCompositor(toRenderPart(renderer()))) {
    472472            innerCompositor->frameViewDidChangeSize();
    473             innerCompositor->frameViewDidChangeLocation(contentsBox().location());
     473            innerCompositor->frameViewDidChangeLocation(flooredIntPoint(contentsBox().location()));
    474474        }
    475475    }
     
    648648    }
    649649
    650     IntRect localCompositingBounds = pixelSnappedIntRect(compositedBounds());
    651 
     650    LayoutRect localRawCompositingBounds = compositedBounds();
     651    LayoutPoint rawDelta;
     652    m_owningLayer->convertToLayerCoords(compAncestor, rawDelta);
     653    IntPoint delta = flooredIntPoint(rawDelta);
     654    m_subpixelAccumulation = toLayoutSize(rawDelta.fraction());
     655    // Move the bounds by the subpixel accumulation so that it pixel-snaps relative to absolute pixels instead of local coordinates.
     656    localRawCompositingBounds.move(m_subpixelAccumulation);
     657
     658    IntRect localCompositingBounds = pixelSnappedIntRect(localRawCompositingBounds);
    652659    IntRect relativeCompositingBounds(localCompositingBounds);
    653     IntPoint delta;
    654     m_owningLayer->convertToPixelSnappedLayerCoords(compAncestor, delta);
    655660    relativeCompositingBounds.moveBy(delta);
    656661
     
    702707    m_graphicsLayer->setPosition(FloatPoint(relativeCompositingBounds.location() - graphicsLayerParentLocation));
    703708    m_graphicsLayer->setOffsetFromRenderer(toIntSize(localCompositingBounds.location()));
    704    
     709
    705710    FloatSize oldSize = m_graphicsLayer->size();
    706711    if (oldSize != contentsSize) {
     
    740745
    741746        // Get layout bounds in the coords of compAncestor to match relativeCompositingBounds.
    742         IntRect layerBounds = IntRect(delta, borderBox.size());
     747        IntRect layerBounds(delta, borderBox.size());
    743748
    744749        // Update properties that depend on layer dimensions
     
    954959void RenderLayerBacking::resetContentsRect()
    955960{
    956     IntRect rect = contentsBox();
     961    IntRect rect = pixelSnappedIntRect(contentsBox());
    957962    m_graphicsLayer->setContentsRect(rect);
    958963    m_graphicsLayer->setContentsTileSize(IntSize());
     
    17581763
    17591764    // This is a no-op if the layer doesn't have an inner layer for the image.
    1760     m_graphicsLayer->setContentsRect(contentsBox());
     1765    m_graphicsLayer->setContentsRect(pixelSnappedIntRect(contentsBox()));
    17611766    m_graphicsLayer->setContentsToImage(image);
    17621767    bool isSimpleContainer = false;
     
    17961801
    17971802// Return the offset from the top-left of this compositing layer at which the renderer's contents are painted.
    1798 IntSize RenderLayerBacking::contentOffsetInCompostingLayer() const
    1799 {
    1800     return IntSize(-m_compositedBounds.x(), -m_compositedBounds.y());
    1801 }
    1802 
    1803 IntRect RenderLayerBacking::contentsBox() const
     1803LayoutSize RenderLayerBacking::contentOffsetInCompostingLayer() const
     1804{
     1805    return LayoutSize(-m_compositedBounds.x(), -m_compositedBounds.y());
     1806}
     1807
     1808LayoutRect RenderLayerBacking::contentsBox() const
    18041809{
    18051810    if (!renderer()->isBox())
    1806         return IntRect();
    1807 
    1808     IntRect contentsRect;
     1811        return LayoutRect();
     1812
     1813    LayoutRect contentsRect;
    18091814#if ENABLE(VIDEO)
    18101815    if (renderer()->isVideo()) {
     
    18131818    } else
    18141819#endif
    1815         contentsRect = pixelSnappedIntRect(toRenderBox(renderer())->contentBoxRect());
     1820        contentsRect = toRenderBox(renderer())->contentBoxRect();
    18161821
    18171822    contentsRect.move(contentOffsetInCompostingLayer());
     
    18411846        return IntRect();
    18421847
    1843     IntRect pixelSnappedBackgroundBox = pixelSnappedIntRect(backgroundRectForBox(toRenderBox(renderer())));
    1844     pixelSnappedBackgroundBox.move(contentOffsetInCompostingLayer());
    1845     return pixelSnappedBackgroundBox;
     1848    LayoutRect backgroundBox = backgroundRectForBox(toRenderBox(renderer()));
     1849    backgroundBox.move(contentOffsetInCompostingLayer());
     1850    return pixelSnappedIntRect(backgroundBox);
    18461851}
    18471852
     
    19891994   
    19901995    // FIXME: GraphicsLayers need a way to split for RenderRegions.
    1991     RenderLayer::LayerPaintingInfo paintingInfo(m_owningLayer, paintDirtyRect, paintBehavior, LayoutSize());
     1996    RenderLayer::LayerPaintingInfo paintingInfo(m_owningLayer, paintDirtyRect, paintBehavior, m_subpixelAccumulation);
    19921997    m_owningLayer->paintLayerContents(context, paintingInfo, paintFlags);
    19931998
     
    20322037        IntRect dirtyRect = clip;
    20332038        if (!(paintingPhase & GraphicsLayerPaintOverflowContents))
    2034             dirtyRect.intersect(compositedBounds());
     2039            dirtyRect.intersect(enclosingIntRect(compositedBounds()));
    20352040
    20362041        // We have to use the same root as for hit testing, because both methods can compute and cache clipRects.
     
    22652270}
    22662271
    2267 IntRect RenderLayerBacking::compositedBounds() const
     2272LayoutRect RenderLayerBacking::compositedBounds() const
    22682273{
    22692274    return m_compositedBounds;
    22702275}
    22712276
    2272 void RenderLayerBacking::setCompositedBounds(const IntRect& bounds)
     2277void RenderLayerBacking::setCompositedBounds(const LayoutRect& bounds)
    22732278{
    22742279    m_compositedBounds = bounds;
  • trunk/Source/WebCore/rendering/RenderLayerBacking.h

    r152213 r154009  
    142142    void resumeAnimations();
    143143
    144     IntRect compositedBounds() const;
    145     void setCompositedBounds(const IntRect&);
     144    LayoutRect compositedBounds() const;
     145    void setCompositedBounds(const LayoutRect&);
    146146    void updateCompositedBounds();
    147147   
     
    176176#endif
    177177
    178     IntRect contentsBox() const;
     178    LayoutRect contentsBox() const;
    179179    IntRect backgroundBox() const;
    180180   
     
    230230    GraphicsLayerPaintingPhase paintingPhaseForPrimaryLayer() const;
    231231   
    232     IntSize contentOffsetInCompostingLayer() const;
     232    LayoutSize contentOffsetInCompostingLayer() const;
    233233    // Result is transform origin in pixels.
    234234    FloatPoint3D computeTransformOrigin(const IntRect& borderBox) const;
     
    298298    uint64_t m_scrollLayerID;
    299299
    300     IntRect m_compositedBounds;
     300    LayoutRect m_compositedBounds;
     301    LayoutSize m_subpixelAccumulation; // The accumulated subpixel offset of the compositedBounds compared to absolute coordinates.
    301302
    302303    bool m_artificiallyInflatedBounds; // bounds had to be made non-zero to make transform-origin work
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r153003 r154009  
    655655    StringBuilder logString;
    656656    logString.append(String::format("%*p %dx%d %.2fKB", 12 + depth * 2, layer,
    657         backing->compositedBounds().width(), backing->compositedBounds().height(),
     657        backing->compositedBounds().width().round(), backing->compositedBounds().height().round(),
    658658        backing->backingStoreMemoryEstimate() / 1024));
    659659   
     
    831831// The bounds of the GraphicsLayer created for a compositing layer is the union of the bounds of all the descendant
    832832// RenderLayers that are rendered by the composited RenderLayer.
    833 IntRect RenderLayerCompositor::calculateCompositedBounds(const RenderLayer* layer, const RenderLayer* ancestorLayer) const
     833LayoutRect RenderLayerCompositor::calculateCompositedBounds(const RenderLayer* layer, const RenderLayer* ancestorLayer) const
    834834{
    835835    if (!canBeComposited(layer))
    836         return IntRect();
     836        return LayoutRect();
    837837    return layer->calculateLayerBounds(ancestorLayer, 0, RenderLayer::DefaultCalculateLayerBoundsFlags | RenderLayer::ExcludeHiddenDescendants | RenderLayer::DontConstrainForMask);
    838838}
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.h

    r150898 r154009  
    164164    // Return the bounding box required for compositing layer and its childern, relative to ancestorLayer.
    165165    // If layerBoundingBox is not 0, on return it contains the bounding box of this layer only.
    166     IntRect calculateCompositedBounds(const RenderLayer*, const RenderLayer* ancestorLayer) const;
     166    LayoutRect calculateCompositedBounds(const RenderLayer*, const RenderLayer* ancestorLayer) const;
    167167
    168168    // Repaint the appropriate layers when the given RenderLayer starts or stops being composited.
  • trunk/Source/WebCore/rendering/RenderTreeAsText.cpp

    r151339 r154009  
    8989}
    9090
     91TextStream& operator<<(TextStream& ts, const LayoutRect& r)
     92{
     93    // FIXME: These should be printed as floats. Keeping them ints for consistency with previous test expectations.
     94    return ts << pixelSnappedIntRect(r);
     95}
     96
    9197TextStream& operator<<(TextStream& ts, const LayoutPoint& p)
    9298{
    93     // FIXME: These should be printed as floats. Keeping them ints for consistency with pervious test expectations.
     99    // FIXME: These should be printed as floats. Keeping them ints for consistency with previous test expectations.
    94100    return ts << "(" << p.x().toInt() << "," << p.y().toInt() << ")";
    95101}
  • trunk/Source/WebCore/rendering/RenderTreeAsText.h

    r133779 r154009  
    3939class IntRect;
    4040class LayoutPoint;
     41class LayoutRect;
    4142class RenderObject;
    4243class TextStream;
     
    7273TextStream& operator<<(TextStream&, const IntRect&);
    7374TextStream& operator<<(TextStream&, const LayoutPoint&);
     75TextStream& operator<<(TextStream&, const LayoutRect&);
    7476TextStream& operator<<(TextStream&, const FloatPoint&);
    7577TextStream& operator<<(TextStream&, const FloatSize&);
Note: See TracChangeset for help on using the changeset viewer.