Bug 53082 - SVG: "margin" style not properly applied to xhtml foreignObjects
Summary: SVG: "margin" style not properly applied to xhtml foreignObjects
Status: RESOLVED DUPLICATE of bug 245908
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows Vista
: P1 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-25 06:32 PST by Berend-Jan Wever
Modified: 2022-12-02 16:06 PST (History)
6 users (show)

See Also:


Attachments
SVG version - displays X too high (257 bytes, image/svg+xml)
2011-01-25 06:32 PST, Berend-Jan Wever
no flags Details
XHTML version - displays X located correctly (140 bytes, application/xhtml+xml)
2011-01-25 06:33 PST, Berend-Jan Wever
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Berend-Jan Wever 2011-01-25 06:32:32 PST
Created attachment 80057 [details]
SVG version - displays X too high

Chromium bug: http://code.google.com/p/chromium/issues/detail?id=70758

Repro = compare visually:
<?xml version="1.0" standalone="yes"?>
<html xmlns="http://www.w3.org/1999/xhtml">
  <body style="margin:50px">
    X
  </body>
</html>

and

<?xml version="1.0" standalone="yes"?>
<svg xmlns="http://www.w3.org/2000/svg">
  <foreignObject x="0" y="0" width="100%" height="100%">
    <body xmlns="http://www.w3.org/1999/xhtml" style="margin:50px">
      X
    </body>
  </foreignObject>
</svg>

The later (SVG) version does not apply the margin on the TOP, so the X is not displayed in the correct location.
Comment 1 Berend-Jan Wever 2011-01-25 06:33:07 PST
Created attachment 80058 [details]
XHTML version - displays X located correctly
Comment 2 Ahmad Saleem 2022-05-30 05:32:07 PDT
I am still able to reproduce the following issue from the attached test case "display X too high" on Safari 15.5 (macOS 12.4).

It renders fine on Chrome Canary 104 and Firefox Nightly 102. Chrome fixed this issue in 2016 in this bug - https://bugs.chromium.org/p/chromium/issues/detail?id=226805

Thanks!
Comment 3 Ahmad Saleem 2022-10-12 06:57:21 PDT
Let's try - https://github.com/WebKit/WebKit/pull/5252
Comment 4 Ahmad Saleem 2022-12-02 16:06:25 PST

*** This bug has been marked as a duplicate of bug 245908 ***