Changeset 53017 in webkit
- Timestamp:
- Jan 8, 2010 3:35:19 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r53012 r53017 1 2010-01-08 Beth Dakin <bdakin@apple.com> 2 3 Reviewed by Oliver Hunt. 4 5 Tests for https://bugs.webkit.org/show_bug.cgi?id=32757 Repaint bug 6 with -webkit-shadow on svg shapes 7 -and- 8 <rdar://problem/7389149> 9 10 * fast/repaint/moving-shadow-on-container.html: Added. 11 * fast/repaint/moving-shadow-on-path.html: Added. 12 * platform/mac/fast/repaint/moving-shadow-on-container-expected.checksum: Added. 13 * platform/mac/fast/repaint/moving-shadow-on-container-expected.png: Added. 14 * platform/mac/fast/repaint/moving-shadow-on-container-expected.txt: Added. 15 * platform/mac/fast/repaint/moving-shadow-on-path-expected.checksum: Added. 16 * platform/mac/fast/repaint/moving-shadow-on-path-expected.png: Added. 17 * platform/mac/fast/repaint/moving-shadow-on-path-expected.txt: Added. 18 1 19 2010-01-08 Alexey Proskuryakov <ap@apple.com> 2 20 -
trunk/WebCore/ChangeLog
r53009 r53017 1 2010-01-08 Beth Dakin <bdakin@apple.com> 2 3 Reviewed by Oliver Hunt. 4 5 Fix for https://bugs.webkit.org/show_bug.cgi?id=32757 Repaint bug 6 with -webkit-shadow on svg shapes 7 -and- 8 <rdar://problem/7389149> 9 10 Inflate the repaintRect for the shadow using its extent. 11 * rendering/RenderForeignObject.cpp: 12 (WebCore::RenderForeignObject::computeRectForRepaint): 13 * rendering/RenderSVGImage.cpp: 14 (WebCore::RenderSVGImage::computeRectForRepaint): 15 * rendering/RenderSVGModelObject.cpp: 16 (WebCore::RenderSVGModelObject::computeRectForRepaint): 17 * rendering/RenderSVGRoot.cpp: 18 (WebCore::RenderSVGRoot::repaintRectInLocalCoordinates): 19 (WebCore::RenderSVGRoot::computeRectForRepaint): 20 * rendering/RenderSVGText.cpp: 21 (WebCore::RenderSVGText::computeRectForRepaint): 22 * rendering/SVGRenderSupport.cpp: 23 (WebCore::getSVGShadowExtent): 24 (WebCore::SVGRenderBase::inflateForShadow): 25 * rendering/SVGRenderSupport.h: 26 1 27 2010-01-08 Kenneth Russell <kbr@google.com> 2 28 -
trunk/WebCore/rendering/RenderForeignObject.cpp
r43211 r53017 85 85 { 86 86 rect = localToParentTransform().mapRect(rect); 87 inflateForShadow(style(), rect); 87 88 RenderBlock::computeRectForRepaint(repaintContainer, rect, fixed); 88 89 } -
trunk/WebCore/rendering/RenderSVGImage.cpp
r52865 r53017 176 176 void RenderSVGImage::computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect& repaintRect, bool fixed) 177 177 { 178 inflateForShadow(style(), repaintRect); 178 179 SVGRenderBase::computeRectForRepaint(this, repaintContainer, repaintRect, fixed); 179 180 } -
trunk/WebCore/rendering/RenderSVGModelObject.cpp
r44253 r53017 57 57 void RenderSVGModelObject::computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect& repaintRect, bool fixed) 58 58 { 59 inflateForShadow(style(), repaintRect); 59 60 SVGRenderBase::computeRectForRepaint(this, repaintContainer, repaintRect, fixed); 60 61 } -
trunk/WebCore/rendering/RenderSVGRoot.cpp
r52584 r53017 252 252 FloatRect RenderSVGRoot::repaintRectInLocalCoordinates() const 253 253 { 254 // FIXME: This does not include the border but it should!254 // FIXME: This does not include the border or shadow but it should! 255 255 return computeContainerBoundingBox(this, true); 256 256 } … … 263 263 void RenderSVGRoot::computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect& repaintRect, bool fixed) 264 264 { 265 // Apply our local transforms (except for x/y translation) and call RenderBox's method to handle all the normal CSS Box model bits 265 // Apply our local transforms (except for x/y translation), then our shadow, 266 // and then call RenderBox's method to handle all the normal CSS Box model bits 266 267 repaintRect = localToBorderBoxTransform().mapRect(repaintRect); 268 inflateForShadow(style(), repaintRect); 267 269 RenderBox::computeRectForRepaint(repaintContainer, repaintRect, fixed); 268 270 } -
trunk/WebCore/rendering/RenderSVGText.cpp
r52647 r53017 60 60 void RenderSVGText::computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect& repaintRect, bool fixed) 61 61 { 62 inflateForShadow(style(), repaintRect); 62 63 SVGRenderBase::computeRectForRepaint(this, repaintContainer, repaintRect, fixed); 63 64 } -
trunk/WebCore/rendering/SVGRenderSupport.cpp
r52647 r53017 41 41 #include <wtf/UnusedParam.h> 42 42 43 using namespace std; 44 43 45 namespace WebCore { 44 46 … … 58 60 object->computeRectForRepaint(repaintContainer, repaintRect); 59 61 return repaintRect; 62 } 63 64 static void getSVGShadowExtent(ShadowData* shadow, int& top, int& right, int& bottom, int& left) 65 { 66 top = 0; 67 right = 0; 68 bottom = 0; 69 left = 0; 70 71 int blurAndSpread = shadow->blur + shadow->spread; 72 73 top = min(top, shadow->y - blurAndSpread); 74 right = max(right, shadow->x + blurAndSpread); 75 bottom = max(bottom, shadow->y + blurAndSpread); 76 left = min(left, shadow->x - blurAndSpread); 77 } 78 79 void SVGRenderBase::inflateForShadow(RenderStyle* style, IntRect& repaintRect) const 80 { 81 ASSERT(style); 82 if (!style) 83 return; 84 85 ShadowData* shadow = style->svgStyle()->shadow(); 86 if (!shadow) 87 return; 88 89 int shadowTop; 90 int shadowRight; 91 int shadowBottom; 92 int shadowLeft; 93 getSVGShadowExtent(shadow, shadowTop, shadowRight, shadowBottom, shadowLeft); 94 95 int overflowLeft = repaintRect.x() + shadowLeft; 96 int overflowRight = repaintRect.right() + shadowRight; 97 int overflowTop = repaintRect.y() + shadowTop; 98 int overflowBottom = repaintRect.bottom() + shadowBottom; 99 100 repaintRect.setX(overflowLeft); 101 repaintRect.setY(overflowTop); 102 repaintRect.setWidth(overflowRight - overflowLeft); 103 repaintRect.setHeight(overflowBottom - overflowTop); 60 104 } 61 105 -
trunk/WebCore/rendering/SVGRenderSupport.h
r52647 r53017 56 56 FloatRect clipperBoundingBoxForRenderer(const RenderObject*) const; 57 57 FloatRect maskerBoundingBoxForRenderer(const RenderObject*) const; 58 59 virtual void inflateForShadow(RenderStyle*, IntRect&) const; 60 58 61 protected: 59 62 static IntRect clippedOverflowRectForRepaint(RenderObject*, RenderBoxModelObject* repaintContainer);
Note: See TracChangeset
for help on using the changeset viewer.