gecko-dev/layout
Florian Rivoal 9ead971a06 Bug 1562057 - Make empty <select> elements the same size as size-contained ones. r=dholbert
Per the css-contain specification, size contained element must be sized as if
they were empty. The code added to handle size containment shortciruits the
(inline) size calculations, and returns 0. However, an empty <select> element
is rendered as if it contained a &nbsp; and some padding gets added to it by
the UA stylesheet (forms.css). This causes reftest that check that
size-contained <select> elements and empty ones look the same.

This commit fixes this by also shortcircuiting the (inline) size calculations
and returning 0 for empty <select> elements.

Replacing the &nbsp; by a zero width space would not have been enough, since
padding would still be added. It would have been possible to add it in the
inline size calculations of size-contained <select> elements as well, but this
padding serves not purpose when the element is empty, so removing it from there
has no downside, and shortcircuitig both cases is simpler (and marginally
faster) than adding the padding in both cases.

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

--HG--
extra : moz-landing-system : lando
2019-09-11 20:37:55 +00:00
..
base Backed out changeset 9ef1dd77e6b2 (bug 1561546) for causing frequent failures in dom/animation/test/mozilla/test_restyles.html CLOSED TREE 2019-09-11 23:21:46 +03:00
build Bug 1578133 - Make nsBox get theme from the nsPresContext. r=mats 2019-09-09 00:08:59 +00:00
doc Bug 1544343 - part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio 2019-04-16 07:25:10 +00:00
forms Bug 1562057 - Make empty <select> elements the same size as size-contained ones. r=dholbert 2019-09-11 20:37:55 +00:00
generic Bug 1248227 - Add crashtest. r=dholbert 2019-09-10 03:36:29 +00:00
inspector Bug 1564968 - add isElementThemed method to InspectorUtils to infer native theme styling such as focus. r=emilio 2019-08-28 17:49:22 +00:00
ipc Bug 1556548 - Rename RenderFrame to RemoteLayerTreeOwner. r=mattwoodrow 2019-06-02 13:51:33 -04:00
mathml Backed out changeset f20ce5c7a25c (bug 1575870) for assertion failure at nsNavHistory.cpp on a CLOSED TREE 2019-08-29 13:45:54 +03:00
media
painting Backed out changeset 7876583b2407 (bug 1577236) for causing failures in calc-rounding-001.html CLOSED TREE 2019-09-11 18:48:22 +03:00
printing Bug 1577711 - Part 2: Perform frame static clone after parent static clone, r=smaug 2019-09-05 14:55:19 +00:00
reftests Bug 1562057 - Make empty <select> elements the same size as size-contained ones. r=dholbert 2019-09-11 20:37:55 +00:00
style Backed out changeset 7876583b2407 (bug 1577236) for causing failures in calc-rounding-001.html CLOSED TREE 2019-09-11 18:48:22 +03:00
svg Bug 1574137 - Disable test_filter_crossorigin.html on fission. r=gbrown 2019-09-06 13:35:57 +00:00
tables Bug 1308587 Part 2 - Remove -moz prefix for all multi-column properties in testing and css files. r=dholbert 2019-09-05 21:37:32 +00:00
tools Bug 1577515: Add fuzz to some Canvas 2D reftests when remote canvas enabled. r=jrmuizel 2019-09-09 06:51:03 +00:00
xul Bug 1580556 - Remove the xul/grid/examples folder;r=mats 2019-09-11 18:35:06 +00:00
moz.build