Changeset 175847 in webkit
- Timestamp:
- Nov 10, 2014 7:25:36 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r175846 r175847 1 2014-11-10 Said Abou-Hallawa <sabouhallawa@apple.com> 2 3 SVG foreign objects do not inherit the container coordinates system if they are repainted.. 4 https://bugs.webkit.org/show_bug.cgi?id=138481. 5 6 Reviewed by Simon Fraser. 7 8 Ensure the repaint rectangle of the SVG foreign object is calculated correctly 9 when the container element has transformation. 10 11 * svg/transforms/svg-transform-foreign-object-repaint-expected.png: Added. 12 * svg/transforms/svg-transform-foreign-object-repaint-expected.txt: Added. 13 * svg/transforms/svg-transform-foreign-object-repaint.html: Added. 14 15 Re-baseline these tests since the render tree dumping uses renderer.absoluteClippedOverflowRect() 16 in writePositionAndStyle() to get the object rectangle so this issue only affects test output. 17 18 * svg/zoom/page/zoom-foreign-content-expected.txt: 19 * platform/mac/svg/zoom/page/zoom-foreignObject-expected.txt: 20 1 21 2014-11-10 Andreas Kling <akling@apple.com> 2 22 -
trunk/LayoutTests/platform/mac/svg/zoom/page/zoom-foreignObject-expected.txt
r171341 r175847 17 17 RenderSVGRect {rect} at (0,0) size 361x289 [stroke={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=250.00] [height=200.00] 18 18 RenderSVGForeignObject {foreignObject} at (260,0) size 250x200 19 RenderSVGRoot {svg} at ( 260,5) size 250x19520 RenderSVGContainer {g} at ( 260,5) size 250x195[transform={m=((3.00,0.26)(0.26,3.02)) t=(0.00,0.00)}]19 RenderSVGRoot {svg} at (374,7) size 361x281 20 RenderSVGContainer {g} at (374,7) size 361x281 [transform={m=((3.00,0.26)(0.26,3.02)) t=(0.00,0.00)}] 21 21 RenderSVGText {text} at (0,1) size 82x19 contains 1 chunk(s) 22 22 RenderSVGInlineText {#text} at (0,0) size 82x19 23 23 chunk 1 text run 1 at (0.00,16.00) startOffset 0 endOffset 14 width 81.05: "This is a text" 24 RenderSVGContainer {a} at ( 265,62) size 204x7424 RenderSVGContainer {a} at (381,89) size 295x107 25 25 RenderSVGText {text} at (0,20) size 67x19 contains 1 chunk(s) 26 26 RenderSVGInlineText {#text} at (0,0) size 67x19 -
trunk/LayoutTests/svg/zoom/page/zoom-foreign-content-expected.txt
r112022 r175847 4 4 RenderSVGRoot {svg} at (0,0) size 800x600 5 5 RenderSVGForeignObject {foreignObject} at (0,0) size 800x600 6 RenderSVGRoot {svg} at (0,0) size 99x997 RenderSVGRect {rect} at (0,0) size 99x99[fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=99.00] [height=99.00]6 RenderSVGRoot {svg} at (0,0) size 206x206 7 RenderSVGRect {rect} at (0,0) size 206x206 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=99.00] [height=99.00] 8 8 RenderText {#text} at (0,0) size 0x0 9 9 RenderSVGForeignObject {foreignObject} at (0,0) size 800x600 -
trunk/Source/WebCore/ChangeLog
r175844 r175847 1 2014-11-10 Said Abou-Hallawa <sabouhallawa@apple.com> 2 3 SVG foreign objects do not inherit the container coordinates system if they are repainted. 4 https://bugs.webkit.org/show_bug.cgi?id=138481. 5 6 Reviewed by Simon Fraser. 7 8 If a foreign object is included in an SVG, it should inherit the coordinates system 9 of the container if it is repainted. The foreign object is actually redrawn in the 10 CSS coordinates system regardless of the transformation that may be applied to the 11 container. 12 13 The bug is RenderSVG* classes use computeFloatRectForRepaint(), but the rest of the 14 render classes use computeRectForRepaint(). RenderSVGForeignObject::computeRectForRepaint() 15 was not defined, so we end up hitting RenderObject::computeRectForRepaint() for 16 a RenderSVGTransformableContainer and completely miss the transform. 17 18 Tests: svg/transforms/svg-transform-foreign-object-repaint.html 19 20 Implement RenderSVGForeignObject::computeRectForRepaint() so we can apply the 21 container transformation on the SVG foreign object repaint rectangle. 22 * rendering/svg/RenderSVGForeignObject.cpp: 23 (WebCore::RenderSVGForeignObject::computeRectForRepaint): 24 * rendering/svg/RenderSVGForeignObject.h: 25 1 26 2014-11-10 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 27 -
trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp
r173859 r175847 103 103 } 104 104 105 void RenderSVGForeignObject::computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect& repaintRect, bool fixed) const 106 { 107 FloatRect floatRect(repaintRect); 108 computeFloatRectForRepaint(repaintContainer, floatRect, fixed); 109 repaintRect = enclosingLayoutRect(floatRect); 110 } 111 105 112 const AffineTransform& RenderSVGForeignObject::localToParentTransform() const 106 113 { -
trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.h
r175084 r175847 42 42 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const override; 43 43 virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect&, bool fixed = false) const override; 44 virtual void computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect&, bool fixed = false) const override; 44 45 45 46 virtual bool requiresLayer() const override { return false; }
Note: See TracChangeset
for help on using the changeset viewer.