Changeset 96558 in webkit
- Timestamp:
- Oct 3, 2011, 5:10:38 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r96552 r96558 1 2011-10-03 Dan Bernstein <mitz@apple.com> 2 3 <rdar://problem/9973489> REGRESSION (r66599): -[DOMNode boundingBox] returns the zero rect for SVG elements 4 https://bugs.webkit.org/show_bug.cgi?id=69305 5 6 Reviewed by Simon Fraser. 7 8 * svg/custom/boundingBox-expected.txt: Added. 9 * svg/custom/boundingBox.html: Added. 10 1 11 2011-10-03 Ryosuke Niwa <rniwa@webkit.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r96554 r96558 1 2011-10-03 Dan Bernstein <mitz@apple.com> 2 3 <rdar://problem/9973489> REGRESSION (r66599): -[DOMNode boundingBox] returns the zero rect for SVG elements 4 https://bugs.webkit.org/show_bug.cgi?id=69305 5 6 Reviewed by Simon Fraser. 7 8 Test: svg/custom/boundingBox.html 9 10 Rather than asserting and returning the zero rect, take the transform-aware code path for computing SVG 11 bounding rects. 12 13 * rendering/svg/RenderSVGForeignObject.cpp: 14 (WebCore::RenderSVGForeignObject::mapLocalToContainer): Updated for change to SVGRenderSupport::mapLocalToContainer(). 15 * rendering/svg/RenderSVGInline.cpp: 16 (WebCore::RenderSVGInline::mapLocalToContainer): Ditto. 17 * rendering/svg/RenderSVGModelObject.cpp: 18 (WebCore::RenderSVGModelObject::mapLocalToContainer): Ditto. 19 (WebCore::RenderSVGModelObject::absoluteRects): Replaced an incorrect assertion with code to approximate the bounding 20 box. 21 * rendering/svg/RenderSVGText.cpp: 22 (WebCore::RenderSVGText::mapLocalToContainer): Updated for change to SVGRenderSupport::mapLocalToContainer(). 23 * rendering/svg/SVGRenderSupport.cpp: 24 (WebCore::SVGRenderSupport::mapLocalToContainer): Removed the fixed and useTransform boolean parameters. 25 * rendering/svg/SVGRenderSupport.h: 26 1 27 2011-10-03 Michael Nordman <michaeln@google.com> 2 28 -
trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp
r95040 r96558 161 161 } 162 162 163 void RenderSVGForeignObject::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState& transformState, bool* wasFixed) const163 void RenderSVGForeignObject::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool /* fixed */, bool /* useTransforms */, TransformState& transformState, bool* wasFixed) const 164 164 { 165 // When crawling up the hierachy starting from foreignObject child content, useTransforms may not be set to true. 166 if (!useTransforms) 167 useTransforms = true; 168 SVGRenderSupport::mapLocalToContainer(this, repaintContainer, fixed, useTransforms, transformState, wasFixed); 165 SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState, wasFixed); 169 166 } 170 167 -
trunk/Source/WebCore/rendering/svg/RenderSVGInline.cpp
r93440 r96558 78 78 } 79 79 80 void RenderSVGInline::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState& transformState, bool* wasFixed) const80 void RenderSVGInline::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool /* useTransforms */, bool /* fixed */, TransformState& transformState, bool* wasFixed) const 81 81 { 82 SVGRenderSupport::mapLocalToContainer(this, repaintContainer, useTransforms, fixed,transformState, wasFixed);82 SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState, wasFixed); 83 83 } 84 84 -
trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.cpp
r95901 r96558 54 54 } 55 55 56 void RenderSVGModelObject::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState& transformState, bool* wasFixed) const56 void RenderSVGModelObject::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool /* fixed */, bool /* useTransforms */, TransformState& transformState, bool* wasFixed) const 57 57 { 58 SVGRenderSupport::mapLocalToContainer(this, repaintContainer, fixed, useTransforms,transformState, wasFixed);58 SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState, wasFixed); 59 59 } 60 60 … … 71 71 } 72 72 73 void RenderSVGModelObject::absoluteRects(Vector<LayoutRect>& , const LayoutPoint&)73 void RenderSVGModelObject::absoluteRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) 74 74 { 75 // This code path should never be taken for SVG, as we're assuming useTransforms=true everywhere, absoluteQuads should be used. 76 ASSERT_NOT_REACHED(); 75 LayoutRect rect = enclosingLayoutRect(strokeBoundingBox()); 76 rect.moveBy(accumulatedOffset); 77 rects.append(rect); 77 78 } 78 79 -
trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp
r94372 r96558 94 94 } 95 95 96 void RenderSVGText::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState& transformState, bool* wasFixed) const97 { 98 SVGRenderSupport::mapLocalToContainer(this, repaintContainer, fixed, useTransforms,transformState, wasFixed);96 void RenderSVGText::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool /* fixed */, bool /* useTransforms */, TransformState& transformState, bool* wasFixed) const 97 { 98 SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState, wasFixed); 99 99 } 100 100 -
trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp
r93050 r96558 71 71 } 72 72 73 void SVGRenderSupport::mapLocalToContainer(const RenderObject* object, RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState& transformState, bool* wasFixed) 74 { 75 ASSERT(!fixed); // We should have no fixed content in the SVG rendering tree. 76 ASSERT(useTransforms); // Mapping a point through SVG w/o respecting transforms is useless. 73 void SVGRenderSupport::mapLocalToContainer(const RenderObject* object, RenderBoxModelObject* repaintContainer, TransformState& transformState, bool* wasFixed) 74 { 77 75 transformState.applyTransform(object->localToParentTransform()); 78 object->parent()->mapLocalToContainer(repaintContainer, f ixed, useTransforms, transformState, wasFixed);76 object->parent()->mapLocalToContainer(repaintContainer, false, true, transformState, wasFixed); 79 77 } 80 78 -
trunk/Source/WebCore/rendering/svg/SVGRenderSupport.h
r93050 r96558 64 64 static LayoutRect clippedOverflowRectForRepaint(const RenderObject*, RenderBoxModelObject* repaintContainer); 65 65 static void computeRectForRepaint(const RenderObject*, RenderBoxModelObject* repaintContainer, LayoutRect&, bool fixed); 66 static void mapLocalToContainer(const RenderObject*, RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed,TransformState&, bool* wasFixed = 0);66 static void mapLocalToContainer(const RenderObject*, RenderBoxModelObject* repaintContainer, TransformState&, bool* wasFixed = 0); 67 67 68 68 // Shared between SVG renderers and resources.
Note:
See TracChangeset
for help on using the changeset viewer.