RESOLVED FIXED 123295
[CSS Shapes] Image valued shape size and position should conform to the spec
https://bugs.webkit.org/show_bug.cgi?id=123295
Summary [CSS Shapes] Image valued shape size and position should conform to the spec
Hans Muller
Reported 2013-10-24 15:32:09 PDT
The CSS Shapes spec (http://dev.w3.org/csswg/css-shapes/#shapes-from-image) implies that an image's shape may be scaled and translated relative to the original image and the origin: "The image is sized and positioned as if it were a replaced element with a specified width and height of the element's used content-box size." The current implementation defines the shape in terms of the image's native resolution and the origin of the content box.
Attachments
Patch (17.31 KB, patch)
2014-01-22 12:02 PST, Hans Muller
no flags
Patch (17.33 KB, patch)
2014-01-22 16:29 PST, Hans Muller
no flags
Patch (17.34 KB, patch)
2014-01-22 19:05 PST, Hans Muller
no flags
Hans Muller
Comment 1 2014-01-22 12:02:08 PST
Created attachment 221886 [details] Patch Implement image valued shape-outside scaling and translation per the spec, http://dev.w3.org/csswg/css-shapes/#shapes-from-image: "The image is sized and positioned as if it were a replaced element whose specified width and height are the same as the elements used content box size." This change doesn't completely fulfill the spec, it's limited to image elements and shape-outside.
Hans Muller
Comment 2 2014-01-22 16:29:11 PST
Created attachment 221921 [details] Patch Just a cosmetic change - removed the createRasterShape() local image variable definition, since it's only used once.
Hans Muller
Comment 3 2014-01-22 19:05:30 PST
Created attachment 221936 [details] Patch Use RenderImage instead of RenderReplaced in getImageRect() (ShapeInfo.cpp).
Andreas Kling
Comment 4 2014-01-23 14:34:33 PST
Comment on attachment 221936 [details] Patch r=me
WebKit Commit Bot
Comment 5 2014-01-23 16:02:22 PST
Comment on attachment 221936 [details] Patch Clearing flags on attachment: 221936 Committed r162659: <http://trac.webkit.org/changeset/162659>
WebKit Commit Bot
Comment 6 2014-01-23 16:02:34 PST
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.