Bug 1562257 [wpt PR 17758] - [Gecko Bug 1562257] part 2. Fix parsing of margin attributes on <body> match the spec., a=testonly

Automatic update from web-platform-tests
part 2.  Fix parsing of margin attributes on <body> match the spec.

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

--
part 3.  Change the dimension attribute reflection test to handle the 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

--
part 4.  Fix style mapping of hspace and vspace attributes to match the 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.
https://github.com/whatwg/html/issues/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

--
part 5.  Fix style mapping of border attribues to more closely match the 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

--

wpt-commits: 16d86b2b8c5e8cda1bb529b053af153c3b3d6887, c3dec041a318c9af716aac3b2d95ff42aa5325f9, 008153ffff00b8201548b7f420c155f23b549ee4, e0a9e5eec6d3aeb770e65ab30ee6d19824928256
wpt-pr: 17758
This commit is contained in:
Boris Zbarsky 2019-07-22 10:23:13 +00:00 коммит произвёл James Graham
Родитель a89e074a3e
Коммит 03c892bae5
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -1,5 +1,7 @@
<!doctype html>
<meta charset=utf-8>
<!-- Creating iframes is slow in browsers -->
<meta name=timeout content=long>
<title>Test handling of attributes that map to pixel length properties</title>
<link rel="help"
href="https://html.spec.whatwg.org/multipage/rendering.html#maps-to-the-pixel-length-property">