WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 129246
-webkit-clip-path wrong offset for clipPath references
https://bugs.webkit.org/show_bug.cgi?id=129246
Summary
-webkit-clip-path wrong offset for clipPath references
Dirk Schulze
Reported
2014-02-24 01:03:50 PST
Created
attachment 225035
[details]
Example - should be a perfect circle If -webkit-clip-path references a <clipPath> element the offset is from the top left of the viewport, not of the HTML element. This changes once a CSS transform is specified. Then the offset is correct. -webkit-transform: translate(0px, 0px)
Attachments
Example - should be a perfect circle
(285 bytes, text/html)
2014-02-24 01:03 PST
,
Dirk Schulze
no flags
Details
Patch
(9.46 KB, patch)
2018-05-20 14:47 PDT
,
Dirk Schulze
no flags
Details
Formatted Diff
Diff
Patch for landing
(9.84 KB, patch)
2018-06-27 13:32 PDT
,
Dirk Schulze
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Dirk Schulze
Comment 1
2014-02-25 05:06:45 PST
The example makes use of clipPathUnits="userSpaceOnUse". All units an percentage are resolved in the viewport of the <clip-path> element (wrongly btw). All objects within <clipPath> are sized and positioned in this coordinate space. The these objects are just mapped to the coordinate space of the clipped object. This causes the wrong offset and strange behavior of clipping paths with percentage values.
Dirk Schulze
Comment 2
2018-05-20 11:02:17 PDT
https://codepen.io/krit/pen/xjMRWM
Dirk Schulze
Comment 3
2018-05-20 14:47:19 PDT
Created
attachment 340807
[details]
Patch
Simon Fraser (smfr)
Comment 4
2018-06-26 14:08:28 PDT
Comment on
attachment 340807
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=340807&action=review
> Source/WebCore/rendering/RenderLayer.cpp:4179 > + downcast<RenderSVGResourceClipper>(*element->renderer()).applyClippingToContext(renderer(), svgReferenceBox, paintingInfo.paintDirtyRect, context);
Does hasTagName(SVGNames::clipPathTag) mean that the renderer is always a RenderSVGResourceClipper? (I know the existing code did this.). I would feel happier with an is<> check, otherwise this code will release-assert.
Dirk Schulze
Comment 5
2018-06-27 13:32:37 PDT
Created
attachment 343747
[details]
Patch for landing
WebKit Commit Bot
Comment 6
2018-06-27 16:28:26 PDT
Comment on
attachment 343747
[details]
Patch for landing Clearing flags on attachment: 343747 Committed
r233287
: <
https://trac.webkit.org/changeset/233287
>
WebKit Commit Bot
Comment 7
2018-06-27 16:28:28 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8
2018-06-27 16:29:18 PDT
<
rdar://problem/41550953
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug