<legend> auto inline margins doesn't work correctly

RESOLVED FIXED in Firefox 64

Status

()

defect
P3
normal
RESOLVED FIXED
10 months ago
9 months ago

People

(Reporter: mats, Assigned: mats)

Tracking

(Blocks 1 bug, {testcase})

Trunk
mozilla64
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox64 fixed)

Details

Attachments

(2 attachments)

Assignee

Description

10 months ago
Posted file Testcase
Follow-up from bug 1488228 comment 10.

The attached testcase renders the same in Chrome/Safari/Edge.
Firefox seems to handle the last two (right/center) incorrectly
(or at least differently).
Priority: -- → P3
Version: unspecified → Trunk
Assignee

Comment 1

9 months ago
Posted patch fix + wptSplinter Review
We should use the content size as the available size, as is normal.

(The reason we use ComputedSizeWithPadding for the inner
anonymous block (innerAvailSize) is that it inherits the padding:
https://searchfox.org/mozilla-central/source/layout/style/res/forms.css#22
so we artificially inflate it.)

https://treeherder.mozilla.org/#/jobs?repo=try&revision=b42df657418e4cfbc6d6b3f085cae487ffac3aa3
Assignee: nobody → mats
Attachment #9006500 - Flags: review?(emilio)
Comment on attachment 9006500 [details] [diff] [review]
fix + wpt

Review of attachment 9006500 [details] [diff] [review]:
-----------------------------------------------------------------

Looks great, thanks! And thanks for the comment.

Maybe the comment about the difference between this and innerAvailSize should be in the commit message?

r=me regardless

::: testing/web-platform/tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-auto-margins.html
@@ +1,3 @@
> +<!DOCTYPE html>
> +<html>
> +<head>

nit: I'd remove <html> / <head> / <body> tags, but your call if you feel strongly about them, or don't want to bother doing that :)

@@ +1,5 @@
> +<!DOCTYPE html>
> +<html>
> +<head>
> +<title>legend inline auto margins</title>
> +<link rel="match" href="legend-auto-margins-ref.html">

nit: Maybe add <link rel="author"> lines with your name and email?
Attachment #9006500 - Flags: review?(emilio) → review+

Comment 3

9 months ago
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5f71217eb8a6
Use the parent's content size as the available size for the rendered legend so we calculate auto-margins correctly.  r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/12859 for changes under testing/web-platform/tests
Assignee

Updated

9 months ago
Flags: in-testsuite+
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.

Comment 6

9 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/5f71217eb8a6
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Upstream PR merged
You need to log in before you can comment on or make changes to this bug.