Changeset 41976 in webkit


Ignore:
Timestamp:
Mar 25, 2009 10:07:31 AM (15 years ago)
Author:
hyatt@apple.com
Message:

WebCore:

2009-03-25 David Hyatt <hyatt@apple.com>

Reviewed by Eric Seidel

Fix for bug 23198, border images should not clip to border radii. The border-image should just ignore
the border-radius, since the assumption is that any desired rounding will be built into the border-image
itself.

Note that I do not agree with this change, but I am matching the spec.

Added fast/borders/border-image-border-radius.html

  • rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintNinePieceImage):

LayoutTests:

2009-03-25 David Hyatt <hyatt@apple.com>

Reviewed by Eric Seidel

Test case for bug 23198.

  • fast/borders/border-image-border-radius.html: Added.
  • platform/mac/fast/borders/border-image-border-radius-expected.checksum: Added.
  • platform/mac/fast/borders/border-image-border-radius-expected.png: Added.
  • platform/mac/fast/borders/border-image-border-radius-expected.txt: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r41972 r41976  
     12009-03-25  David Hyatt  <hyatt@apple.com>
     2
     3        Reviewed by Eric Seidel
     4
     5        Test case for bug 23198.
     6
     7        * fast/borders/border-image-border-radius.html: Added.
     8        * platform/mac/fast/borders/border-image-border-radius-expected.checksum: Added.
     9        * platform/mac/fast/borders/border-image-border-radius-expected.png: Added.
     10        * platform/mac/fast/borders/border-image-border-radius-expected.txt: Added.
     11
    1122009-03-25  Darin Adler  <darin@apple.com>
    213
  • trunk/WebCore/ChangeLog

    r41975 r41976  
     12009-03-25  David Hyatt  <hyatt@apple.com>
     2
     3        Reviewed by Eric Seidel
     4
     5        Fix for bug 23198, border images should not clip to border radii.  The border-image should just ignore
     6        the border-radius, since the assumption is that any desired rounding will be built into the border-image
     7        itself.
     8
     9        Note that I do not agree with this change, but I am matching the spec.
     10
     11        Added fast/borders/border-image-border-radius.html
     12
     13        * rendering/RenderBoxModelObject.cpp:
     14        (WebCore::RenderBoxModelObject::paintNinePieceImage):
     15
    1162009-03-25  Gustavo Noronha Silva  <gns@gnome.org>
    217
  • trunk/WebCore/rendering/RenderBoxModelObject.cpp

    r41602 r41976  
    602602{
    603603    StyleImage* styleImage = ninePieceImage.image();
    604     if (!styleImage || !styleImage->canRender(style->effectiveZoom()))
     604    if (!styleImage)
    605605        return false;
    606606
     
    608608        return true; // Never paint a nine-piece image incrementally, but don't paint the fallback borders either.
    609609
    610     // If we have a border radius, the image gets clipped to the rounded rect.
    611     bool clipped = false;
    612     if (style->hasBorderRadius()) {
    613         IntRect clipRect(tx, ty, w, h);
    614         graphicsContext->save();
    615         graphicsContext->addRoundedRectClip(clipRect, style->borderTopLeftRadius(), style->borderTopRightRadius(),
    616                                             style->borderBottomLeftRadius(), style->borderBottomRightRadius());
    617         clipped = true;
    618     }
     610    if (!styleImage->canRender(style->effectiveZoom()))
     611        return false;
    619612
    620613    // FIXME: border-image is broken with full page zooming when tiling has to happen, since the tiling function
     
    712705                                        IntRect(leftSlice, topSlice, imageWidth - rightSlice - leftSlice, imageHeight - topSlice - bottomSlice),
    713706                                        (Image::TileRule)hRule, (Image::TileRule)vRule, op);
    714 
    715     // Clear the clip for the border radius.
    716     if (clipped)
    717         graphicsContext->restore();
    718707
    719708    return true;
Note: See TracChangeset for help on using the changeset viewer.