[Webkit-unassigned] [Bug 211282] New: getBBox on tspan returns bbox for the containing text element

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 1 04:21:03 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=211282

            Bug ID: 211282
           Summary: getBBox on tspan returns bbox for the containing text
                    element
           Product: WebKit
           Version: Safari 12
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: SVG
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: fabien.snauwaert+webkit at gmail.com
                CC: zimmermann at kde.org

Created attachment 398172

  --> https://bugs.webkit.org/attachment.cgi?id=398172&action=review

Demo of the issue, open the Console and check the dimensions output there

EXPECTED BEHAVIOR:
- When using an SVG element's getBBox() method, the browser should return the correct dimensions of the bounding box for <tspan> elements.

OBSERVED BEHAVIOR:
- The browser is returning the bounding box of its parent <text> element instead. i.e. all tspans return the dimensions of their parent element in place of their own real dimensions.

OTHER BROWSERS:
- This works fine in Firefox.
- Chromium had the same bug and fixed it recently: https://bugs.chromium.org/p/chromium/issues/detail?id=349835 (OK in Chromium Version 84.0.4133.0 (Developer Build) (64-bit); still not OK in Chrome Version 81.0.4044.129 (Official Build) (64-bit).)

Interestingly enough, unlike getBBox(), Safari's Inspector does return the correct dimensions (rounded), so a way to fetch the correct value might already be in the codebase.


Attaching a demo of my own; the Chromium thread has plenty of other examples if needed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200501/c78eedb4/attachment-0001.htm>


More information about the webkit-unassigned mailing list