зеркало из https://github.com/mozilla/gecko-dev.git
9ead971a06
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 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 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 |
||
---|---|---|
.. | ||
base | ||
build | ||
doc | ||
forms | ||
generic | ||
inspector | ||
ipc | ||
mathml | ||
media | ||
painting | ||
printing | ||
reftests | ||
style | ||
svg | ||
tables | ||
tools | ||
xul | ||
moz.build |