WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
ROLLOUT of r60642
bug-40151-20100604011531.patch (text/plain), 14.18 KB, created by
WebKit Review Bot
on 2010-06-03 18:15:33 PDT
(
hide
)
Description:
ROLLOUT of r60642
Filename:
MIME Type:
Creator:
WebKit Review Bot
Created:
2010-06-03 18:15:33 PDT
Size:
14.18 KB
patch
obsolete
>diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog >index 184ae146b92e1e3dc51446fc85ea0595a3db274a..3e5243d055b7d421e82f161c8e6ac4c1d713543c 100644 >--- a/WebCore/ChangeLog >+++ b/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2010-06-03 Sheriff Bot <webkit.review.bot@gmail.com> >+ >+ Unreviewed, rolling out r60642. >+ http://trac.webkit.org/changeset/60642 >+ https://bugs.webkit.org/show_bug.cgi?id=40151 >+ >+ Broke rendering of border images on rotated elements >+ (Requested by jamesr on #webkit). >+ >+ * platform/graphics/GraphicsContext.cpp: >+ (WebCore::GraphicsContext::drawImage): >+ (WebCore::GraphicsContext::drawTiledImage): >+ * platform/graphics/GraphicsContext.h: >+ * rendering/RenderBoxModelObject.cpp: >+ (WebCore::RenderBoxModelObject::paintNinePieceImage): >+ > 2010-06-03 Damian Kaleta <dkaleta@apple.com> > > Reviewed by Beth Dakin. >diff --git a/WebCore/platform/graphics/GraphicsContext.cpp b/WebCore/platform/graphics/GraphicsContext.cpp >index d41cef6c2b95909a212edf808f8f11d55d1fce8e..17639113f856dcf8f5490814d7b79604d41ff566 100644 >--- a/WebCore/platform/graphics/GraphicsContext.cpp >+++ b/WebCore/platform/graphics/GraphicsContext.cpp >@@ -382,11 +382,8 @@ void GraphicsContext::drawHighlightForText(const Font& font, const TextRun& run, > fillRect(font.selectionRectForText(run, point, h, from, to), backgroundColor, colorSpace); > } > >-void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& src, CompositeOperator op, bool useLowQualityScale, bool roundToPixels) >+void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& src, CompositeOperator op, bool useLowQualityScale) > { >- if (roundToPixels) >- roundToDevicePixels(dest); >- > if (paintingDisabled() || !image) > return; > >@@ -416,50 +413,31 @@ void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const > > void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, const IntRect& rect, const IntPoint& srcPoint, const IntSize& tileSize, CompositeOperator op, bool useLowQualityScale) > { >- drawTiledImage(image, styleColorSpace, FloatRect(rect), FloatPoint(srcPoint), tileSize, op, useLowQualityScale); >-} >- >-void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, const IntRect& dest, const IntRect& srcRect, Image::TileRule hRule, Image::TileRule vRule, CompositeOperator op, bool useLowQualityScale) >-{ >- drawTiledImage(image, styleColorSpace, FloatRect(dest), FloatRect(srcRect), hRule, vRule, op, useLowQualityScale); >-} >- >-void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, const FloatRect& rect, const FloatPoint& srcPoint, const IntSize& tileSize, CompositeOperator op, bool useLowQualityScale, bool roundToPixels) >-{ >- FloatRect dstRect(rect); >- >- if (roundToPixels) >- dstRect = roundToDevicePixels(rect); >- > if (paintingDisabled() || !image) > return; > if (useLowQualityScale) { > save(); > setImageInterpolationQuality(InterpolationLow); > } >- image->drawTiled(this, dstRect, srcPoint, tileSize, styleColorSpace, op); >+ image->drawTiled(this, rect, srcPoint, tileSize, styleColorSpace, op); > if (useLowQualityScale) > restore(); > } > >-void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& srcRect, Image::TileRule hRule, Image::TileRule vRule, CompositeOperator op, bool useLowQualityScale, bool roundToPixels) >+void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, const IntRect& dest, const IntRect& srcRect, Image::TileRule hRule, Image::TileRule vRule, CompositeOperator op, bool useLowQualityScale) > { >- FloatRect dstRect(dest); >- >- if (roundToPixels) >- dstRect = roundToDevicePixels(dest); >- > if (paintingDisabled() || !image) > return; >+ > if (useLowQualityScale) { > save(); > setImageInterpolationQuality(InterpolationLow); > } > if (hRule == Image::StretchTile && vRule == Image::StretchTile) > // Just do a scale. >- drawImage(image, styleColorSpace, dstRect, srcRect, op); >+ drawImage(image, styleColorSpace, dest, srcRect, op); > else >- image->drawTiled(this, dstRect, srcRect, hRule, vRule, styleColorSpace, op); >+ image->drawTiled(this, dest, srcRect, hRule, vRule, styleColorSpace, op); > if (useLowQualityScale) > restore(); > } >diff --git a/WebCore/platform/graphics/GraphicsContext.h b/WebCore/platform/graphics/GraphicsContext.h >index 18f2c5c8843ba88c7513ceb4c1647679ce994370..1f99daba6e081c1d6eb81a3866d92e15e253bcbd 100644 >--- a/WebCore/platform/graphics/GraphicsContext.h >+++ b/WebCore/platform/graphics/GraphicsContext.h >@@ -223,17 +223,12 @@ namespace WebCore { > void drawImage(Image*, ColorSpace styleColorSpace, const IntPoint& destPoint, const IntRect& srcRect, CompositeOperator = CompositeSourceOver); > void drawImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntRect& srcRect, CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false); > void drawImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect = FloatRect(0, 0, -1, -1), >- CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false, bool roundToPixels = false); >+ CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false); > void drawTiledImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntPoint& srcPoint, const IntSize& tileSize, > CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false); > void drawTiledImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntRect& srcRect, > Image::TileRule hRule = Image::StretchTile, Image::TileRule vRule = Image::StretchTile, > CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false); >- void drawTiledImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatPoint& srcPoint, const IntSize& tileSize, >- CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false, bool roundToPixels = false); >- void drawTiledImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, >- Image::TileRule hRule = Image::StretchTile, Image::TileRule vRule = Image::StretchTile, >- CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false, bool roundToPixels = false); > > void setImageInterpolationQuality(InterpolationQuality); > InterpolationQuality imageInterpolationQuality() const; >diff --git a/WebCore/rendering/RenderBoxModelObject.cpp b/WebCore/rendering/RenderBoxModelObject.cpp >index 3edbaae2a326f7de7011cb15566921c174f2080c..196e8c595a65947fc41807e15047b151bd5903d6 100644 >--- a/WebCore/rendering/RenderBoxModelObject.cpp >+++ b/WebCore/rendering/RenderBoxModelObject.cpp >@@ -888,20 +888,21 @@ bool RenderBoxModelObject::paintNinePieceImage(GraphicsContext* graphicsContext, > // The top left corner rect is (tx, ty, leftWidth, topWidth) > // The rect to use from within the image is obtained from our slice, and is (0, 0, leftSlice, topSlice) > if (drawTop) >- graphicsContext->drawImage(image, colorSpace, FloatRect(tx, ty, leftWidth, topWidth), >- FloatRect(0, 0, leftSlice, topSlice), op, false, true); >+ graphicsContext->drawImage(image, colorSpace, IntRect(tx, ty, leftWidth, topWidth), >+ IntRect(0, 0, leftSlice, topSlice), op); > > // The bottom left corner rect is (tx, ty + h - bottomWidth, leftWidth, bottomWidth) > // The rect to use from within the image is (0, imageHeight - bottomSlice, leftSlice, botomSlice) > if (drawBottom) >- graphicsContext->drawImage(image, colorSpace, FloatRect(tx, ty + h - bottomWidth, leftWidth, bottomWidth), >- FloatRect(0, imageHeight - bottomSlice, leftSlice, bottomSlice), op, false, true); >+ graphicsContext->drawImage(image, colorSpace, IntRect(tx, ty + h - bottomWidth, leftWidth, bottomWidth), >+ IntRect(0, imageHeight - bottomSlice, leftSlice, bottomSlice), op); > > // Paint the left edge. > // Have to scale and tile into the border rect. >- graphicsContext->drawTiledImage(image, colorSpace, FloatRect(tx, ty + topWidth, leftWidth, h - topWidth - bottomWidth), >- FloatRect(0, topSlice, leftSlice, imageHeight - topSlice - bottomSlice), >- Image::StretchTile, (Image::TileRule)vRule, op, false, true); >+ graphicsContext->drawTiledImage(image, colorSpace, IntRect(tx, ty + topWidth, leftWidth, >+ h - topWidth - bottomWidth), >+ IntRect(0, topSlice, leftSlice, imageHeight - topSlice - bottomSlice), >+ Image::StretchTile, (Image::TileRule)vRule, op); > } > > if (drawRight) { >@@ -909,38 +910,41 @@ bool RenderBoxModelObject::paintNinePieceImage(GraphicsContext* graphicsContext, > // The top right corner rect is (tx + w - rightWidth, ty, rightWidth, topWidth) > // The rect to use from within the image is obtained from our slice, and is (imageWidth - rightSlice, 0, rightSlice, topSlice) > if (drawTop) >- graphicsContext->drawImage(image, colorSpace, FloatRect(tx + w - rightWidth, ty, rightWidth, topWidth), >- FloatRect(imageWidth - rightSlice, 0, rightSlice, topSlice), op, false, true); >+ graphicsContext->drawImage(image, colorSpace, IntRect(tx + w - rightWidth, ty, rightWidth, topWidth), >+ IntRect(imageWidth - rightSlice, 0, rightSlice, topSlice), op); > > // The bottom right corner rect is (tx + w - rightWidth, ty + h - bottomWidth, rightWidth, bottomWidth) > // The rect to use from within the image is (imageWidth - rightSlice, imageHeight - bottomSlice, rightSlice, bottomSlice) > if (drawBottom) >- graphicsContext->drawImage(image, colorSpace, FloatRect(tx + w - rightWidth, ty + h - bottomWidth, rightWidth, bottomWidth), >- FloatRect(imageWidth - rightSlice, imageHeight - bottomSlice, rightSlice, bottomSlice), op, false, true); >+ graphicsContext->drawImage(image, colorSpace, IntRect(tx + w - rightWidth, ty + h - bottomWidth, rightWidth, bottomWidth), >+ IntRect(imageWidth - rightSlice, imageHeight - bottomSlice, rightSlice, bottomSlice), op); > > // Paint the right edge. >- graphicsContext->drawTiledImage(image, colorSpace, graphicsContext->roundToDevicePixels(FloatRect(tx + w - rightWidth, ty + topWidth, rightWidth, h - topWidth - bottomWidth)), >- FloatRect(imageWidth - rightSlice, topSlice, rightSlice, imageHeight - topSlice - bottomSlice), >- Image::StretchTile, (Image::TileRule)vRule, op, false, true); >+ graphicsContext->drawTiledImage(image, colorSpace, IntRect(tx + w - rightWidth, ty + topWidth, rightWidth, >+ h - topWidth - bottomWidth), >+ IntRect(imageWidth - rightSlice, topSlice, rightSlice, imageHeight - topSlice - bottomSlice), >+ Image::StretchTile, (Image::TileRule)vRule, op); > } > > // Paint the top edge. > if (drawTop) >- graphicsContext->drawTiledImage(image, colorSpace, FloatRect(tx + leftWidth, ty, w - leftWidth - rightWidth, topWidth), >- FloatRect(leftSlice, 0, imageWidth - rightSlice - leftSlice, topSlice), >- (Image::TileRule)hRule, Image::StretchTile, op, false, true); >+ graphicsContext->drawTiledImage(image, colorSpace, IntRect(tx + leftWidth, ty, w - leftWidth - rightWidth, topWidth), >+ IntRect(leftSlice, 0, imageWidth - rightSlice - leftSlice, topSlice), >+ (Image::TileRule)hRule, Image::StretchTile, op); > > // Paint the bottom edge. > if (drawBottom) >- graphicsContext->drawTiledImage(image, colorSpace, FloatRect(tx + leftWidth, ty + h - bottomWidth, w - leftWidth - rightWidth, bottomWidth), >- FloatRect(leftSlice, imageHeight - bottomSlice, imageWidth - rightSlice - leftSlice, bottomSlice), >- (Image::TileRule)hRule, Image::StretchTile, op, false, true); >+ graphicsContext->drawTiledImage(image, colorSpace, IntRect(tx + leftWidth, ty + h - bottomWidth, >+ w - leftWidth - rightWidth, bottomWidth), >+ IntRect(leftSlice, imageHeight - bottomSlice, imageWidth - rightSlice - leftSlice, bottomSlice), >+ (Image::TileRule)hRule, Image::StretchTile, op); > > // Paint the middle. > if (drawMiddle) >- graphicsContext->drawTiledImage(image, colorSpace, FloatRect(tx + leftWidth, ty + topWidth, w - leftWidth - rightWidth, h - topWidth - bottomWidth), >- FloatRect(leftSlice, topSlice, imageWidth - rightSlice - leftSlice, imageHeight - topSlice - bottomSlice), >- (Image::TileRule)hRule, (Image::TileRule)vRule, op, false, true); >+ graphicsContext->drawTiledImage(image, colorSpace, IntRect(tx + leftWidth, ty + topWidth, w - leftWidth - rightWidth, >+ h - topWidth - bottomWidth), >+ IntRect(leftSlice, topSlice, imageWidth - rightSlice - leftSlice, imageHeight - topSlice - bottomSlice), >+ (Image::TileRule)hRule, (Image::TileRule)vRule, op); > > return true; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 40151
: 57840