Closed Bug 1801581 Opened 2 years ago Closed 2 years ago

getBoundingClientRect returns the wrong size for fixed position SVG content since bug 1340715

Categories

(Core :: SVG, defect)

defect

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox107 --- wontfix
firefox108 --- wontfix
firefox109 --- wontfix
firefox110 --- fixed

People

(Reporter: birtles, Assigned: TYLin)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

Attached file test.html

See the attached test case. In Chrome and previous versions of Firefox this produced a bounding box 300px wide but in recent versions of Firefox the bounding box has zero width.

Mozregression points to bug 1340715.

Even without running the JS, you can see that the bbox has zero width when you highlight <div id=div> in the DevTools.

Set release status flags based on info from the regressing bug 1340715

:TYLin, since you are the author of the regressor, bug 1340715, could you take a look? Also, could you set the severity field?

For more information, please visit auto_nag documentation.

Severity: -- → S3

Re comment 0:

See the attached test case. In Chrome and previous versions of Firefox this produced a bounding box 300px wide but in recent versions of Firefox the bounding box has zero width.

Yes, Chrome 110 produces a bounding box of 300px width, but any Firefox version before bug 1340715 produces a bounding box of the current window width.

300px still seems preferable to 0px as (a) it would match Chrome and (b) wouldn't confuse code trying to detect hidden elements.

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
Flags: needinfo?(aethanyc)
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/cb640b83609b Make preferred isize of SVG with no preferred aspect-ratio fall back to fallback intrinsic size. r=firefox-svg-reviewers,emilio,dholbert
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/37745 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
Upstream PR merged by moz-wptsync-bot

The patch landed in nightly and beta is affected.
:TYLin, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox109 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(aethanyc)
Duplicate of this bug: 1807877

This bug fixed a regression. The patch in the original bug is too risky for a uplift, so does this patch.

A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)

Yeah, wrong bug?

Flags: needinfo?(aethanyc)

Comment on attachment 9317550 [details]
Bug 1801581 - Make preferred isize of SVG with fit-content value fall back to fallback intrinsic size. r?#firefox-svg-reviewers

Revision D169778 was moved to bug 1811683. Setting attachment 9317550 [details] to obsolete.

Attachment #9317550 - Attachment is obsolete: true

(In reply to Emilio Cobos Álvarez (:emilio) from comment #15)

Yeah, wrong bug?

Oops, the patch is for bug 1811683.

Flags: needinfo?(aethanyc)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: