Title: [132257] trunk
- Revision
- 132257
- Author
- [email protected]
- Date
- 2012-10-23 13:17:34 -0700 (Tue, 23 Oct 2012)
Log Message
BasicShapePolygon::path takes width instead of height for boundary calculation
https://bugs.webkit.org/show_bug.cgi?id=99919
Reviewed by Darin Adler.
Source/WebCore:
The 'y' parameters of polygon were calculated by the with of the bounding box of the object.
This caused problems on percentage values for point positions.
Changed it to the height of the bounding box.
Test: css3/masking/clip-path-polygon-percentage.html
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapePolygon::path):
LayoutTests:
Test that the correct relation is used for calculating point position of an polygon.
* css3/masking/clip-path-polygon-percentage-expected.html: Added.
* css3/masking/clip-path-polygon-percentage.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (132256 => 132257)
--- trunk/LayoutTests/ChangeLog 2012-10-23 19:44:03 UTC (rev 132256)
+++ trunk/LayoutTests/ChangeLog 2012-10-23 20:17:34 UTC (rev 132257)
@@ -1,3 +1,15 @@
+2012-10-22 Dirk Schulze <[email protected]>
+
+ BasicShapePolygon::path takes width instead of height for boundary calculation
+ https://bugs.webkit.org/show_bug.cgi?id=99919
+
+ Reviewed by Darin Adler.
+
+ Test that the correct relation is used for calculating point position of an polygon.
+
+ * css3/masking/clip-path-polygon-percentage-expected.html: Added.
+ * css3/masking/clip-path-polygon-percentage.html: Added.
+
2012-10-23 Dirk Pranke <[email protected]>
Remove remaining fast/innerHTML pixel test baselines after r131960.
Added: trunk/LayoutTests/css3/masking/clip-path-polygon-percentage-expected.html (0 => 132257)
--- trunk/LayoutTests/css3/masking/clip-path-polygon-percentage-expected.html (rev 0)
+++ trunk/LayoutTests/css3/masking/clip-path-polygon-percentage-expected.html 2012-10-23 20:17:34 UTC (rev 132257)
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <p>Test that percentage values are relative to the right dimension of the bounding box</p>
+ <div style="width: 150px; height: 100px; border: solid white 50px; background-color: green;"></div>
+</body>
+</html>
\ No newline at end of file
Added: trunk/LayoutTests/css3/masking/clip-path-polygon-percentage.html (0 => 132257)
--- trunk/LayoutTests/css3/masking/clip-path-polygon-percentage.html (rev 0)
+++ trunk/LayoutTests/css3/masking/clip-path-polygon-percentage.html 2012-10-23 20:17:34 UTC (rev 132257)
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <p>Test that percentage values are relative to the right dimension of the bounding box</p>
+ <div style="margin:0; width: 150px; height: 100px; border: solid red 50px; background-color: green; -webkit-clip-path: polygon(20% 50px, 80% 25%, 80% 75%, 20% 75%)"></div>
+</body>
+</html>
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (132256 => 132257)
--- trunk/Source/WebCore/ChangeLog 2012-10-23 19:44:03 UTC (rev 132256)
+++ trunk/Source/WebCore/ChangeLog 2012-10-23 20:17:34 UTC (rev 132257)
@@ -1,3 +1,19 @@
+2012-10-22 Dirk Schulze <[email protected]>
+
+ BasicShapePolygon::path takes width instead of height for boundary calculation
+ https://bugs.webkit.org/show_bug.cgi?id=99919
+
+ Reviewed by Darin Adler.
+
+ The 'y' parameters of polygon were calculated by the with of the bounding box of the object.
+ This caused problems on percentage values for point positions.
+ Changed it to the height of the bounding box.
+
+ Test: css3/masking/clip-path-polygon-percentage.html
+
+ * rendering/style/BasicShapes.cpp:
+ (WebCore::BasicShapePolygon::path):
+
2012-10-23 Dominik Röttsches <[email protected]>
Add timeout support to XMLHttpRequest
Modified: trunk/Source/WebCore/rendering/style/BasicShapes.cpp (132256 => 132257)
--- trunk/Source/WebCore/rendering/style/BasicShapes.cpp 2012-10-23 19:44:03 UTC (rev 132256)
+++ trunk/Source/WebCore/rendering/style/BasicShapes.cpp 2012-10-23 20:17:34 UTC (rev 132257)
@@ -83,10 +83,10 @@
return;
path.moveTo(FloatPoint(floatValueForLength(m_values.at(0), boundingBox.width()) + boundingBox.x(),
- floatValueForLength(m_values.at(1), boundingBox.width()) + boundingBox.y()));
+ floatValueForLength(m_values.at(1), boundingBox.height()) + boundingBox.y()));
for (size_t i = 2; i < length; i = i + 2) {
path.addLineTo(FloatPoint(floatValueForLength(m_values.at(i), boundingBox.width()) + boundingBox.x(),
- floatValueForLength(m_values.at(i + 1), boundingBox.width()) + boundingBox.y()));
+ floatValueForLength(m_values.at(i + 1), boundingBox.height()) + boundingBox.y()));
}
path.closeSubpath();
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes