Closed Bug 1686326 Opened 3 years ago Closed 3 years ago

[quirks] Chrome allows negative top margin on <button> to position them in transitional DTD, Firefox does not.

Categories

(Core :: Layout: Block and Inline, defect, P3)

defect

Tracking

()

RESOLVED FIXED
86 Branch
Webcompat Priority ?
Tracking Status
firefox86 --- fixed

People

(Reporter: twisniewski, Assigned: MatsPalmgren_bugz)

References

()

Details

(Keywords: parity-chrome, testcase)

Attachments

(2 files)

Attached file testcase.html

In the attached test-case, Firefox does not seem to honor the negative top margin on the button element, while Chrome does. This seems to be specific to the doctype declaration; if I drop it, then Firefox honors the negative margin (although the button position still does not quite match Chrome's position even in that case).

This is causing some text overlapping issues on haiaoedu.com, as reported at https://webcompat.com/issues/65186.

Fwiw, this fixes the testcase:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=baa9ef6d0b15600c7f358aaf32f5af9fc9f16fa7
Let's see what the fallout is...

We check != eCompatibility_FullStandards rather than == eCompatibility_NavQuirks elsewhere in this file so it I suspect this line is an unintentional deviation.

Severity: -- → S3
OS: Unspecified → All
Priority: -- → P3
Hardware: Unspecified → All
Summary: Chrome allows negative top margin on <button> to position them in transitional DTD, Firefox does not. → [quirks] Chrome allows negative top margin on <button> to position them in transitional DTD, Firefox does not.

The line comes from bug 931853 and apparently I forgot to test "limited-quirks mode"... :-(

Assignee: nobody → mats
Component: Layout: Form Controls → Layout: Block and Inline

nsLineLayout.cpp now checks:
CompatibilityMode() != eCompatibility_FullStandards
in all places.

Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c8f0bf3f70f5
[quirks] Apply line-height quirk code in both quirks and limited-quirks mode in all places.  r=jfkthame
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/27210 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: