mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Map embedded content element attributes to dimension properties
This commit is contained in:
parent
baca0e5e55
commit
728236f4d2
Notes:
github-actions[bot]
2024-10-02 09:28:22 +00:00
Author: https://github.com/tcl3
Commit: 728236f4d2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1591
8 changed files with 189 additions and 1 deletions
|
@ -10,6 +10,18 @@
|
|||
{ elementName: "marquee", attribute: "vspace", mappedProperty: "marginBottom" },
|
||||
{ elementName: "marquee", attribute: "width", mappedProperty: "width" },
|
||||
{ elementName: "marquee", attribute: "height", mappedProperty: "height" },
|
||||
{ elementName: "object", attribute: "hspace", mappedProperty: "marginLeft" },
|
||||
{ elementName: "object", attribute: "hspace", mappedProperty: "marginRight" },
|
||||
{ elementName: "object", attribute: "vspace", mappedProperty: "marginTop" },
|
||||
{ elementName: "object", attribute: "vspace", mappedProperty: "marginBottom" },
|
||||
{ elementName: "object", attribute: "width", mappedProperty: "width" },
|
||||
{ elementName: "object", attribute: "height", mappedProperty: "height" },
|
||||
{ elementName: "embed", attribute: "hspace", mappedProperty: "marginLeft" },
|
||||
{ elementName: "embed", attribute: "hspace", mappedProperty: "marginRight" },
|
||||
{ elementName: "embed", attribute: "vspace", mappedProperty: "marginTop" },
|
||||
{ elementName: "embed", attribute: "vspace", mappedProperty: "marginBottom" },
|
||||
{ elementName: "embed", attribute: "width", mappedProperty: "width" },
|
||||
{ elementName: "embed", attribute: "height", mappedProperty: "height" },
|
||||
];
|
||||
const values = ["100", " 00110 ", "120."];
|
||||
|
||||
|
@ -18,7 +30,7 @@
|
|||
document.body.appendChild(element);
|
||||
const style = document.defaultView.getComputedStyle(element);
|
||||
for (const value of values) {
|
||||
element[attribute] = value;
|
||||
element.setAttribute(attribute, value);
|
||||
println(`Test ${elementName}.${attribute} = "${value}" maps to ${mappedProperty}: ${style[mappedProperty]}`);
|
||||
}
|
||||
element.remove();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue