Bug 200383

Summary: <foreignObject> doesn't establish a containing block
Product: WebKit Reporter: Xidorn Quan <xidorn-webkit>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: sabouhallawa, simon.fraser, webkit-bug-importer, zalan, zimmermann
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
testcase none

Xidorn Quan
Reported 2019-08-01 22:38:11 PDT
Created attachment 375397 [details] testcase See the attached testcase, the green box should be 200px away from the top and left edge, however it's attached to the two edges on Safari. I'm not sure whether there is any spec about the behavior here, but I think it makes sense that <foreignObject> should establish a containing block so that absolutely-positioned element wouldn't escape out of <foreignObject>.
Attachments
testcase (284 bytes, text/html)
2019-08-01 22:38 PDT, Xidorn Quan
no flags
Xidorn Quan
Comment 1 2019-08-01 22:38:34 PDT
And it works as expected on Firefox and Chrome.
Radar WebKit Bug Importer
Comment 2 2019-08-02 13:29:46 PDT
Said Abou-Hallawa
Comment 3 2019-08-02 15:31:14 PDT
This bug happens because RenderSVGForeignObject is not a rendering root. RenderSVGForeignObject::requiresLayer() currently returns false. *** This bug has been marked as a duplicate of bug 23113 ***
Note You need to log in before you can comment on or make changes to this bug.