Changeset 127548 in webkit


Ignore:
Timestamp:
Sep 4, 2012 8:57:56 PM (12 years ago)
Author:
krit@webkit.org
Message:

-webkit-clip-path does not apply origin for polygon()
https://bugs.webkit.org/show_bug.cgi?id=95656

Reviewed by Tim Horton.

Source/WebCore:

The polygon() shape function did not apply origin of bouding box on created path. The shape was
not moved to the correct position.

Tests: svg/clip-path/clip-path-shape-polygon-relative-expected.svg

svg/clip-path/clip-path-shape-polygon-relative.svg

  • rendering/style/BasicShapes.cpp:

(WebCore::BasicShapePolygon::path): Apply origin of bounding box.

LayoutTests:

Check that the origin of the bounding box gets applied to the clip path.

  • svg/clip-path/clip-path-shape-polygon-relative-expected.svg: Added.
  • svg/clip-path/clip-path-shape-polygon-relative.svg: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r127546 r127548  
     12012-09-04  Dirk Schulze  <krit@webkit.org>
     2
     3        -webkit-clip-path does not apply origin for polygon()
     4        https://bugs.webkit.org/show_bug.cgi?id=95656
     5
     6        Reviewed by Tim Horton.
     7
     8        Check that the origin of the bounding box gets applied to the clip path.
     9
     10        * svg/clip-path/clip-path-shape-polygon-relative-expected.svg: Added.
     11        * svg/clip-path/clip-path-shape-polygon-relative.svg: Added.
     12
    1132012-09-04  Kenichi Ishibashi  <bashi@chromium.org>
    214
  • trunk/Source/WebCore/ChangeLog

    r127540 r127548  
     12012-09-04  Dirk Schulze  <krit@webkit.org>
     2
     3        -webkit-clip-path does not apply origin for polygon()
     4        https://bugs.webkit.org/show_bug.cgi?id=95656
     5
     6        Reviewed by Tim Horton.
     7
     8        The polygon() shape function did not apply origin of bouding box on created path. The shape was
     9        not moved to the correct position.
     10
     11        Tests: svg/clip-path/clip-path-shape-polygon-relative-expected.svg
     12               svg/clip-path/clip-path-shape-polygon-relative.svg
     13
     14        * rendering/style/BasicShapes.cpp:
     15        (WebCore::BasicShapePolygon::path): Apply origin of bounding box.
     16
    1172012-09-04  Adam Barth  <abarth@chromium.org>
    218
  • trunk/Source/WebCore/rendering/style/BasicShapes.cpp

    r127383 r127548  
    8383        return;
    8484
    85     path.moveTo(FloatPoint(floatValueForLength(m_values.at(0), boundingBox.width()),
    86                            floatValueForLength(m_values.at(1), boundingBox.width())));
     85    path.moveTo(FloatPoint(floatValueForLength(m_values.at(0), boundingBox.width()) + boundingBox.x(),
     86                           floatValueForLength(m_values.at(1), boundingBox.width()) + boundingBox.y()));
    8787    for (size_t i = 2; i < length; i = i + 2) {
    88         path.addLineTo(FloatPoint(floatValueForLength(m_values.at(i), boundingBox.width()),
    89                                   floatValueForLength(m_values.at(i + 1), boundingBox.width())));
     88        path.addLineTo(FloatPoint(floatValueForLength(m_values.at(i), boundingBox.width()) + boundingBox.x(),
     89                                  floatValueForLength(m_values.at(i + 1), boundingBox.width()) + boundingBox.y()));
    9090    }
    9191    path.closeSubpath();
Note: See TracChangeset for help on using the changeset viewer.