Title: [127548] trunk
- Revision
- 127548
- Author
- [email protected]
- Date
- 2012-09-04 20:57:56 -0700 (Tue, 04 Sep 2012)
Log 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.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (127547 => 127548)
--- trunk/LayoutTests/ChangeLog 2012-09-05 03:45:33 UTC (rev 127547)
+++ trunk/LayoutTests/ChangeLog 2012-09-05 03:57:56 UTC (rev 127548)
@@ -1,3 +1,15 @@
+2012-09-04 Dirk Schulze <[email protected]>
+
+ -webkit-clip-path does not apply origin for polygon()
+ https://bugs.webkit.org/show_bug.cgi?id=95656
+
+ Reviewed by Tim Horton.
+
+ 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.
+
2012-09-04 Kenichi Ishibashi <[email protected]>
[Chromium] Unreviewed test expectations update after r127534
Added: trunk/LayoutTests/svg/clip-path/clip-path-shape-polygon-relative-expected.svg (0 => 127548)
--- trunk/LayoutTests/svg/clip-path/clip-path-shape-polygon-relative-expected.svg (rev 0)
+++ trunk/LayoutTests/svg/clip-path/clip-path-shape-polygon-relative-expected.svg 2012-09-05 03:57:56 UTC (rev 127548)
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect x="50" y="50" width="200" height="200" fill="green"/>
+</svg>
\ No newline at end of file
Added: trunk/LayoutTests/svg/clip-path/clip-path-shape-polygon-relative.svg (0 => 127548)
--- trunk/LayoutTests/svg/clip-path/clip-path-shape-polygon-relative.svg (rev 0)
+++ trunk/LayoutTests/svg/clip-path/clip-path-shape-polygon-relative.svg 2012-09-05 03:57:56 UTC (rev 127548)
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect x="50" y="50" width="200" height="200" fill="green" style="-webkit-clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)"/>
+</svg>
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (127547 => 127548)
--- trunk/Source/WebCore/ChangeLog 2012-09-05 03:45:33 UTC (rev 127547)
+++ trunk/Source/WebCore/ChangeLog 2012-09-05 03:57:56 UTC (rev 127548)
@@ -1,3 +1,19 @@
+2012-09-04 Dirk Schulze <[email protected]>
+
+ -webkit-clip-path does not apply origin for polygon()
+ https://bugs.webkit.org/show_bug.cgi?id=95656
+
+ Reviewed by Tim Horton.
+
+ 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.
+
2012-09-04 Adam Barth <[email protected]>
Make chromium-linux build without WTF_DEPRECATED_STRING_OPERATORS
Modified: trunk/Source/WebCore/rendering/style/BasicShapes.cpp (127547 => 127548)
--- trunk/Source/WebCore/rendering/style/BasicShapes.cpp 2012-09-05 03:45:33 UTC (rev 127547)
+++ trunk/Source/WebCore/rendering/style/BasicShapes.cpp 2012-09-05 03:57:56 UTC (rev 127548)
@@ -82,11 +82,11 @@
if (!length)
return;
- path.moveTo(FloatPoint(floatValueForLength(m_values.at(0), boundingBox.width()),
- floatValueForLength(m_values.at(1), boundingBox.width())));
+ path.moveTo(FloatPoint(floatValueForLength(m_values.at(0), boundingBox.width()) + boundingBox.x(),
+ floatValueForLength(m_values.at(1), boundingBox.width()) + boundingBox.y()));
for (size_t i = 2; i < length; i = i + 2) {
- path.addLineTo(FloatPoint(floatValueForLength(m_values.at(i), boundingBox.width()),
- floatValueForLength(m_values.at(i + 1), boundingBox.width())));
+ path.addLineTo(FloatPoint(floatValueForLength(m_values.at(i), boundingBox.width()) + boundingBox.x(),
+ floatValueForLength(m_values.at(i + 1), boundingBox.width()) + boundingBox.y()));
}
path.closeSubpath();
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes