Fix our broken uses of ParseIntWithBounds(value, 0)
Categories
(Core :: DOM: Core & HTML, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(5 files)
Some of these should be ParseHTMLDimension and some should be parsing as unsigned ints (which behaves differently for negative values).
Assignee | ||
Comment 1•5 years ago
|
||
"charoff" isn't parsed specially in the spec, and nothing in our code uses the
parsed value.
Assignee | ||
Comment 2•5 years ago
|
||
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.
Assignee | ||
Comment 3•5 years ago
|
||
We're going to need that for hspace/vspace
Assignee | ||
Comment 4•5 years ago
|
||
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.
Assignee | ||
Comment 5•5 years ago
|
||
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.
Comment 7•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5f320b55434e
https://hg.mozilla.org/mozilla-central/rev/399e8e089eda
https://hg.mozilla.org/mozilla-central/rev/651433227fdb
https://hg.mozilla.org/mozilla-central/rev/bd2a2e91e9ee
https://hg.mozilla.org/mozilla-central/rev/b8938b6afa9c
Comment 11•5 years ago
|
||
Comment 12•5 years ago
|
||
bugherder |
Description
•