Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1562257] part 2. Fix parsing of margin attributes on <body> match the spec. #17758

Merged
merged 4 commits into from Jul 10, 2019

Conversation

moz-wptsync-bot
Copy link
Collaborator

The various margin attributes on are "pixel length attributes" in the
spec, which should get parsed as non-negative integers. That said, Chrome and
Safari implement marginwidth, marginheight, marginleft, and margintop as
"dimension attributes" instead, and don't implement marginright and marginbottom
at all.

Differential Revision: https://phabricator.services.mozilla.com/D36372

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1562257
gecko-commit: 399e8e089eda6d6cba06bb37c3aadacc607fe6b6
gecko-integration-branch: central
gecko-reviewers: mccr8

The various margin attributes on <body> are "pixel length attributes" in the
spec, which should get parsed as non-negative integers.  That said, Chrome and
Safari implement marginwidth, marginheight, marginleft, and margintop as
"dimension attributes" instead, and don't implement marginright and marginbottom
at all.

Differential Revision: https://phabricator.services.mozilla.com/D36372

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1562257
gecko-commit: 399e8e089eda6d6cba06bb37c3aadacc607fe6b6
gecko-integration-branch: central
gecko-reviewers: mccr8
…attribute name and CSS property name not matching.

We're going to need that for hspace/vspace

Differential Revision: https://phabricator.services.mozilla.com/D36373

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1562257
gecko-commit: 651433227fdbeb4fd53d90c15fac3dad3b1245a6
gecko-integration-branch: central
gecko-reviewers: mccr8
…e spec.

Per spec, "hspace" and "vspace" are parsed as dimension attributes and are
supported on the following elements: embed, iframe, img, object,
<input type="image">, marquee.  Except no one implements this for iframe.
whatwg/html#4742 tracks the spec changing accordingly.

As far as hspace/vpace on <table> go, Safari supports them in both quirks and
standards mode, while Chrome doesn't support them in either mode.  The HTML spec
doesn't have them supported at all, and neither does the quirks mode spec, so
I'm removing the quirks-only support we had to align with the specs and Chrome.

Differential Revision: https://phabricator.services.mozilla.com/D36375

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1562257
gecko-commit: bd2a2e91e9eefc6f27621620e11b93ffd8eca2e6
gecko-integration-branch: central
gecko-reviewers: mccr8
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already reviewed downstream.

…he spec.

Per spec, "border" is parsed as a non-negative integer, only mapped if nonzero
(though this is not observably different from mapping even if 0, except if user
or UA stylesheets style the border), and supported on img, object,
<input type="image">, but NOT embed, iframe, or marquee.

This matches the Chrome and Safari behavior, as far as I can tell.  The
substantive change here is that we are removing mapping for the <embed border>
case.

Differential Revision: https://phabricator.services.mozilla.com/D36376

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1562257
gecko-commit: b8938b6afa9c4b498ec016d1b3d50be0e50684c0
gecko-integration-branch: central
gecko-reviewers: mccr8
@moz-wptsync-bot moz-wptsync-bot merged commit e0a9e5e into master Jul 10, 2019
@moz-wptsync-bot moz-wptsync-bot deleted the gecko/1562257 branch July 10, 2019 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants