RESOLVED FIXED Bug 96669
[CSS Exclusions] Add shape-inside tests for rounded rectangles
https://bugs.webkit.org/show_bug.cgi?id=96669
Summary [CSS Exclusions] Add shape-inside tests for rounded rectangles
Bear Travis
Reported 2012-09-13 10:48:17 PDT
Shape-inside should work for rounded rectangles. Support should mostly be in with the addition of the shapes module, but it needs testing.
Attachments
Adding rounded rectangle tests (15.98 KB, patch)
2012-10-02 15:23 PDT, Bear Travis
no flags
Updating tests (20.39 KB, patch)
2012-10-04 16:33 PDT, Bear Travis
no flags
Adding shape outline (21.60 KB, patch)
2012-10-05 11:05 PDT, Bear Travis
no flags
Bear Travis
Comment 1 2012-10-02 15:23:24 PDT
Created attachment 166763 [details] Adding rounded rectangle tests
Hans Muller
Comment 2 2012-10-03 11:12:30 PDT
(In reply to comment #1) > Created an attachment (id=166763) [details] > Adding rounded rectangle tests These tests look good to me although you might want make the height of one of the test case shapes greater than its width. Likewise for the corner radii. And it would simple and useful to verify that setting either corner radius value to zero produced the same results as a simple rectangle. > "The expected results use float "sandbags" to mark off the shape-inside area." You might qualify this, since shape-inside-rounded-rectangle-001-expected.html doesn't use sandbags, just carefully placed breaks.
Bear Travis
Comment 3 2012-10-04 16:33:12 PDT
Created attachment 167201 [details] Updating tests Incorporating feedback from Hans. * Making one of the test cases have height > width and cornerRadiusY > cornerRadiusX * Testing the case where cornerRadiusX or cornerRadiusY is 0 * Fixing up the comments to be more specific about only some of the tests using float sandbags Corner radii greater than half their dimension (shape width or height) currently produce odd results. Linking to new bug 98462.
Bear Travis
Comment 4 2012-10-05 11:05:08 PDT
Created attachment 167353 [details] Adding shape outline Updating patch to use the ::before pseudo element to represent the outline of the shape inside.
Levi Weintraub
Comment 5 2012-10-05 12:22:54 PDT
Comment on attachment 167353 [details] Adding shape outline View in context: https://bugs.webkit.org/attachment.cgi?id=167353&action=review > LayoutTests/fast/exclusions/shape-inside/shape-inside-rounded-rectangle-002-expected.html:15 > + function createSimulatedShapeElement() { > + var stylesheet = document.getElementById("stylesheet"); > + var dimensions = { width: 200, height: 300, > + shapeX: 25, shapeY: 45, > + shapeWidth: 100, shapeHeight: 200, > + shapeRadiusX: 0, shapeRadiusY: 55 }; > + generateSimulatedShapeElement("shape-inside1", stylesheet.sheet, dimensions, 9); > + dimensions.shapeRadiusX = 55; > + dimensions.shapeRadiusY = 0; > + generateSimulatedShapeElement("shape-inside2", stylesheet.sheet, dimensions, 9); Super cool way to do ref expectations.
Dirk Schulze
Comment 6 2012-10-05 14:47:49 PDT
Comment on attachment 167353 [details] Adding shape outline Just setting cq+
WebKit Review Bot
Comment 7 2012-10-05 15:00:56 PDT
Comment on attachment 167353 [details] Adding shape outline Clearing flags on attachment: 167353 Committed r130557: <http://trac.webkit.org/changeset/130557>
WebKit Review Bot
Comment 8 2012-10-05 15:01:01 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.