Bug 1700640 - Map width and height to aspect-ratio in <canvas>, <input type=image>, and <video>. r=boris
As per https://html.spec.whatwg.org/#attributes-for-embedded-content-and-images: > The width and height attributes map to the aspect-ratio property on > img, canvas, and video elements, and input elements with a type > attribute in the Image Button state. See https://github.com/whatwg/html/issues/6527 for the parsing issue with canvas and zero. For now allow both behaviors in the tests. We also remove the width-and-height-map-to-aspect-ratio pref, as it is true everywhere and has been for a while. Differential Revision: https://phabricator.services.mozilla.com/D109618
This commit is contained in:
@@ -5133,8 +5133,8 @@ void HTMLInputElement::ImageInputMapAttributesIntoRule(
|
||||
aDecls);
|
||||
nsGenericHTMLFormElementWithState::MapImageMarginAttributeInto(aAttributes,
|
||||
aDecls);
|
||||
nsGenericHTMLFormElementWithState::MapImageSizeAttributesInto(aAttributes,
|
||||
aDecls);
|
||||
nsGenericHTMLFormElementWithState::MapImageSizeAttributesInto(
|
||||
aAttributes, aDecls, MapAspectRatio::Yes);
|
||||
// Images treat align as "float"
|
||||
nsGenericHTMLFormElementWithState::MapImageAlignAttributeInto(aAttributes,
|
||||
aDecls);
|
||||
|
||||
Reference in New Issue
Block a user