Changeset 106464 in webkit


Ignore:
Timestamp:
Feb 1, 2012 5:31:11 AM (12 years ago)
Author:
peter@chromium.org
Message:

getIntersectionList causes transforms to be recalculated in SVG
https://bugs.webkit.org/show_bug.cgi?id=77179

Reviewed by Nikolas Zimmermann.

Introduce a local variable to store the element's local-to-parent
transformation matrix in, removing the need for the const_cast and
stopping us from modifying any matrices elsewhere.

Source/WebCore:

Test: svg/custom/intersection-list-transforms.svg

  • rendering/svg/RenderSVGModelObject.cpp:

(WebCore::getElementCTM):

LayoutTests:

  • svg/custom/intersection-list-transforms-expected.png: Added.
  • svg/custom/intersection-list-transforms-expected.txt: Added.
  • svg/custom/intersection-list-transforms.svg: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r106463 r106464  
     12012-02-01  Peter Beverloo  <peter@chromium.org>
     2
     3        getIntersectionList causes transforms to be recalculated in SVG
     4        https://bugs.webkit.org/show_bug.cgi?id=77179
     5
     6        Reviewed by Nikolas Zimmermann.
     7
     8        Introduce a local variable to store the element's local-to-parent
     9        transformation matrix in, removing the need for the const_cast and
     10        stopping us from modifying any matrices elsewhere.
     11
     12        * svg/custom/intersection-list-transforms-expected.png: Added.
     13        * svg/custom/intersection-list-transforms-expected.txt: Added.
     14        * svg/custom/intersection-list-transforms.svg: Added.
     15
    1162012-02-01  Vsevolod Vlasov  <vsevik@chromium.org>
    217
  • trunk/Source/WebCore/ChangeLog

    r106463 r106464  
     12012-02-01  Peter Beverloo  <peter@chromium.org>
     2
     3        getIntersectionList causes transforms to be recalculated in SVG
     4        https://bugs.webkit.org/show_bug.cgi?id=77179
     5
     6        Reviewed by Nikolas Zimmermann.
     7
     8        Introduce a local variable to store the element's local-to-parent
     9        transformation matrix in, removing the need for the const_cast and
     10        stopping us from modifying any matrices elsewhere.
     11
     12        Test: svg/custom/intersection-list-transforms.svg
     13
     14        * rendering/svg/RenderSVGModelObject.cpp:
     15        (WebCore::getElementCTM):
     16
    1172012-02-01  Vsevolod Vlasov  <vsevik@chromium.org>
    218
  • trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.cpp

    r101517 r106464  
    126126    ASSERT(stopAtElement);
    127127
     128    AffineTransform localTransform;
    128129    Node* current = element;
     130
    129131    while (current && current->isSVGElement()) {
    130132        SVGElement* currentElement = static_cast<SVGElement*>(current);
    131         if (currentElement->isStyled())
    132             transform = const_cast<AffineTransform&>(currentElement->renderer()->localToParentTransform()).multiply(transform);
    133 
     133        if (currentElement->isStyled()) {
     134            localTransform = currentElement->renderer()->localToParentTransform();
     135            transform = localTransform.multiply(transform);
     136        }
    134137        // For getCTM() computation, stop at the nearest viewport element
    135138        if (currentElement == stopAtElement)
Note: See TracChangeset for help on using the changeset viewer.