Bug 141731 - The origin of SVG clip-path is not calculated correctly when it is applied outside the SVG
Summary: The origin of SVG clip-path is not calculated correctly when it is applied ou...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 126207
  Show dependency treegraph
 
Reported: 2015-02-17 15:58 PST by Said Abou-Hallawa
Modified: 2023-05-27 06:02 PDT (History)
6 users (show)

See Also:


Attachments
Test case (1000 bytes, text/html)
2015-02-17 15:58 PST, Said Abou-Hallawa
no flags Details
Test case -- Add translateZ(0) (1.05 KB, text/html)
2015-02-17 15:59 PST, Said Abou-Hallawa
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2015-02-17 15:58:13 PST
Created attachment 246774 [details]
Test case

Open the attached test case. It has four inline <div> tags. Inside each tag, there is a nested <div> which is clipped using an SVG <clipPath>. The same <clipPath> is applied to an item in the SVG itself.

Results: When applying the clipPath outside the SVG, the clipping is only applied on the first <div> and its origin is not correct. It shifted to the top and the left of the <div>.  Also it is applied for the first time only. From the second time, the clip-path clips the whole element, i.e. nothing is displayed from it.

When the transform: translateZ(0); is added to the style of the nested <div>, no clipping is applied, i.e.the whole element is rendered.
Comment 1 Said Abou-Hallawa 2015-02-17 15:59:15 PST
Created attachment 246775 [details]
Test case -- Add translateZ(0)
Comment 2 Radar WebKit Bug Importer 2015-02-17 16:00:46 PST
<rdar://problem/19868009>
Comment 3 Ahmad Saleem 2023-01-22 14:05:37 PST
@Said - is this reproducible for you? For me, it seems Safari 16.2, STP161 are matching with Chrome Canary 111 and Firefox Nightly 111.

Can you help me on how to reproduce this bug? Thanks!