Changeset 73423 in webkit


Ignore:
Timestamp:
Dec 6, 2010 7:42:36 PM (13 years ago)
Author:
hyatt@apple.com
Message:

https://bugs.webkit.org/show_bug.cgi?id=50593

Reviewed by Simon Fraser.

Fix background canvas painting for documents with left/top overflow. The math from the original RTL patch was incorrect.

Just use the RenderView's document dimensions always.

WebCore:

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::paintRootBoxDecorations):

LayoutTests:

  • fast/blockflow/Kusa-Makura-background-canvas.html: Added.
  • platform/mac/fast/blockflow/Kusa-Makura-background-canvas-expected.checksum: Added.
  • platform/mac/fast/blockflow/Kusa-Makura-background-canvas-expected.png: Added.
  • platform/mac/fast/blockflow/Kusa-Makura-background-canvas-expected.txt: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r73421 r73423  
     12010-12-06  David Hyatt  <hyatt@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=50593
     6       
     7        Fix background canvas painting for documents with left/top overflow.  The math from the original RTL patch was incorrect.
     8       
     9        Just use the RenderView's document dimensions always.
     10
     11        * fast/blockflow/Kusa-Makura-background-canvas.html: Added.
     12        * platform/mac/fast/blockflow/Kusa-Makura-background-canvas-expected.checksum: Added.
     13        * platform/mac/fast/blockflow/Kusa-Makura-background-canvas-expected.png: Added.
     14        * platform/mac/fast/blockflow/Kusa-Makura-background-canvas-expected.txt: Added.
     15
    1162010-12-06  Simon Fraser  <simon.fraser@apple.com>
    217
  • trunk/WebCore/ChangeLog

    r73421 r73423  
     12010-12-06  David Hyatt  <hyatt@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=50593
     6       
     7        Fix background canvas painting for documents with left/top overflow.  The math from the original RTL patch was incorrect.
     8       
     9        Just use the RenderView's document dimensions always.
     10
     11        * rendering/RenderBox.cpp:
     12        (WebCore::RenderBox::paintRootBoxDecorations):
     13
    1142010-12-06  Simon Fraser  <simon.fraser@apple.com>
    215
  • trunk/WebCore/rendering/RenderBox.cpp

    r73385 r73423  
    744744    }
    745745
    746     int w = width();
    747     int h = height();
    748 
    749     int rw;
    750     int rh;
    751     if (view()->frameView()) {
    752         rw = view()->frameView()->contentsWidth();
    753         rh = view()->frameView()->contentsHeight();
    754     } else {
    755         rw = view()->width();
    756         rh = view()->height();
    757     }
    758 
    759     // CSS2 14.2:
    760     // The background of the box generated by the root element covers the entire canvas including
    761     // its margins.
    762     int bx = tx - marginLeft() + view()->docLeft();
    763     int by = ty - marginTop() + view()->docTop();
    764     int bw = max(w + marginLeft() + marginRight() + borderLeft() + borderRight(), rw);
    765     int bh = max(h + marginTop() + marginBottom() + borderTop() + borderBottom(), rh);
    766 
    767     paintFillLayers(paintInfo, bgColor, bgLayer, bx, by, bw, bh, CompositeSourceOver, bodyObject);
     746    // The background of the box generated by the root element covers the entire canvas, so just use
     747    // the RenderView's docTop/Left/Width/Height accessors.
     748    paintFillLayers(paintInfo, bgColor, bgLayer, view()->docLeft(), view()->docTop(), view()->docWidth(), view()->docHeight(), CompositeSourceOver, bodyObject);
    768749
    769750    if (style()->hasBorder() && style()->display() != INLINE)
    770         paintBorder(paintInfo.context, tx, ty, w, h, style());
     751        paintBorder(paintInfo.context, tx, ty, width(), height(), style());
    771752}
    772753
Note: See TracChangeset for help on using the changeset viewer.