Commit 2316be23 authored by hyatt's avatar hyatt

Fix for bugzilla bugs 14183 and 14184, 'repeat' regressed in border-image

        because of a botched 'round' support removal.  Also update for a change in
        the spec that has the second stretch/round/repeat keyword match the first
        if omitted.
        
        Reviewed by olliej

        * css/cssparser.cpp:
        (WebCore::BorderImageParseContext::commitBorderImage):
        * platform/graphics/Image.cpp:
        (WebCore::Image::drawTiled):
        * platform/graphics/Image.h:
        (WebCore::Image::):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a6188e22
2007-06-15 David Hyatt <hyatt@apple.com>
Fix for bugzilla bugs 14183 and 14184, 'repeat' regressed in border-image
because of a botched 'round' support removal. Also update for a change in
the spec that has the second stretch/round/repeat keyword match the first
if omitted.
Reviewed by olliej
* css/cssparser.cpp:
(WebCore::BorderImageParseContext::commitBorderImage):
* platform/graphics/Image.cpp:
(WebCore::Image::drawTiled):
* platform/graphics/Image.h:
(WebCore::Image::):
2007-06-15 Sam Weinig <sam@webkit.org>
Reviewed by Darin.
......@@ -2824,8 +2824,10 @@ struct BorderImageParseContext
// Fill in STRETCH as the default if it wasn't specified.
if (!m_horizontalRule)
m_horizontalRule = CSS_VAL_STRETCH;
// The vertical rule should match the horizontal rule if unspecified.
if (!m_verticalRule)
m_verticalRule = CSS_VAL_STRETCH;
m_verticalRule = m_horizontalRule;
// Make our new border image value now and add it as the result.
CSSBorderImageValue* borderImage = new CSSBorderImageValue(m_image, rect, m_horizontalRule, m_verticalRule);
......
......@@ -174,6 +174,12 @@ void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& dstRect, const Flo
return;
}
// FIXME: We do not support 'round' yet. For now just map it to 'repeat'.
if (hRule == RoundTile)
hRule = RepeatTile;
if (vRule == RoundTile)
vRule = RepeatTile;
FloatSize scale = calculatePatternScale(dstRect, srcRect, hRule, vRule);
AffineTransform patternTransform = AffineTransform().scale(scale.width(), scale.height());
......
......@@ -104,7 +104,7 @@ public:
// Typically the CachedImage that owns us.
ImageObserver* imageObserver() const { return m_imageObserver; }
enum TileRule { StretchTile, RepeatTile };
enum TileRule { StretchTile, RoundTile, RepeatTile };
#if PLATFORM(MAC)
// Accessors for native image formats.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment