mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 22:55:23 +00:00
LibWeb: Implement the hspace and vspace attributes
These properties reflect their respective content attributes.
This commit is contained in:
committed by
Andreas Kling
parent
1bc0fcca8d
commit
9f9aa62128
@@ -0,0 +1,18 @@
|
|||||||
|
img.hspace after setting to -1: 0
|
||||||
|
img.hspace after setting to 20: 20
|
||||||
|
img.hspace after setting to 2147483648: 0
|
||||||
|
img.vspace after setting to -1: 0
|
||||||
|
img.vspace after setting to 20: 20
|
||||||
|
img.vspace after setting to 2147483648: 0
|
||||||
|
marquee.hspace after setting to -1: 0
|
||||||
|
marquee.hspace after setting to 20: 20
|
||||||
|
marquee.hspace after setting to 2147483648: 0
|
||||||
|
marquee.vspace after setting to -1: 0
|
||||||
|
marquee.vspace after setting to 20: 20
|
||||||
|
marquee.vspace after setting to 2147483648: 0
|
||||||
|
object.hspace after setting to -1: 0
|
||||||
|
object.hspace after setting to 20: 20
|
||||||
|
object.hspace after setting to 2147483648: 0
|
||||||
|
object.vspace after setting to -1: 0
|
||||||
|
object.vspace after setting to 20: 20
|
||||||
|
object.vspace after setting to 2147483648: 0
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<script src="../include.js"></script>
|
||||||
|
<script>
|
||||||
|
function setPropertyAndDumpValue(tagName, property, value) {
|
||||||
|
const element = document.createElement(tagName);
|
||||||
|
element[property] = value;
|
||||||
|
println(`${tagName}.${property} after setting to ${value}: ${element[property]}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function testIntegerReflectedProperty(tagName, property) {
|
||||||
|
setPropertyAndDumpValue(tagName, property, -1);
|
||||||
|
setPropertyAndDumpValue(tagName, property, 20);
|
||||||
|
setPropertyAndDumpValue(tagName, property, 2147483648);
|
||||||
|
}
|
||||||
|
|
||||||
|
test(() => {
|
||||||
|
for (const tagName of ["img", "marquee", "object"]) {
|
||||||
|
for (const property of ["hspace", "vspace"]) {
|
||||||
|
testIntegerReflectedProperty(tagName, property);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -30,8 +30,8 @@ interface HTMLImageElement : HTMLElement {
|
|||||||
[CEReactions, Reflect] attribute DOMString name;
|
[CEReactions, Reflect] attribute DOMString name;
|
||||||
[FIXME, CEReactions] attribute USVString lowsrc;
|
[FIXME, CEReactions] attribute USVString lowsrc;
|
||||||
[CEReactions, Reflect] attribute DOMString align;
|
[CEReactions, Reflect] attribute DOMString align;
|
||||||
[FIXME, CEReactions] attribute unsigned long hspace;
|
[CEReactions, Reflect] attribute unsigned long hspace;
|
||||||
[FIXME, CEReactions] attribute unsigned long vspace;
|
[CEReactions, Reflect] attribute unsigned long vspace;
|
||||||
[FIXME, CEReactions] attribute USVString longDesc;
|
[FIXME, CEReactions] attribute USVString longDesc;
|
||||||
|
|
||||||
[CEReactions, LegacyNullToEmptyString, Reflect] attribute DOMString border;
|
[CEReactions, LegacyNullToEmptyString, Reflect] attribute DOMString border;
|
||||||
|
|||||||
@@ -10,12 +10,12 @@ interface HTMLMarqueeElement : HTMLElement {
|
|||||||
[CEReactions, Reflect=bgcolor] attribute DOMString bgColor;
|
[CEReactions, Reflect=bgcolor] attribute DOMString bgColor;
|
||||||
[CEReactions, Reflect] attribute DOMString direction;
|
[CEReactions, Reflect] attribute DOMString direction;
|
||||||
[CEReactions, Reflect] attribute DOMString height;
|
[CEReactions, Reflect] attribute DOMString height;
|
||||||
[FIXME, CEReactions] attribute unsigned long hspace;
|
[CEReactions, Reflect] attribute unsigned long hspace;
|
||||||
[FIXME, CEReactions] attribute long loop;
|
[FIXME, CEReactions] attribute long loop;
|
||||||
[FIXME, CEReactions] attribute unsigned long scrollAmount;
|
[FIXME, CEReactions] attribute unsigned long scrollAmount;
|
||||||
[FIXME, CEReactions] attribute unsigned long scrollDelay;
|
[FIXME, CEReactions] attribute unsigned long scrollDelay;
|
||||||
[FIXME, CEReactions] attribute boolean trueSpeed;
|
[FIXME, CEReactions] attribute boolean trueSpeed;
|
||||||
[FIXME, CEReactions] attribute unsigned long vspace;
|
[CEReactions, Reflect] attribute unsigned long vspace;
|
||||||
[CEReactions, Reflect] attribute DOMString width;
|
[CEReactions, Reflect] attribute DOMString width;
|
||||||
|
|
||||||
[FIXME] undefined start();
|
[FIXME] undefined start();
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ interface HTMLObjectElement : HTMLElement {
|
|||||||
[CEReactions, Reflect] attribute DOMString archive;
|
[CEReactions, Reflect] attribute DOMString archive;
|
||||||
[CEReactions, Reflect] attribute DOMString code;
|
[CEReactions, Reflect] attribute DOMString code;
|
||||||
[CEReactions, Reflect] attribute boolean declare;
|
[CEReactions, Reflect] attribute boolean declare;
|
||||||
[FIXME, CEReactions] attribute unsigned long hspace;
|
[CEReactions, Reflect] attribute unsigned long hspace;
|
||||||
[CEReactions, Reflect] attribute DOMString standby;
|
[CEReactions, Reflect] attribute DOMString standby;
|
||||||
[FIXME, CEReactions] attribute unsigned long vspace;
|
[CEReactions, Reflect] attribute unsigned long vspace;
|
||||||
[FIXME, CEReactions] attribute DOMString codeBase;
|
[FIXME, CEReactions] attribute DOMString codeBase;
|
||||||
[CEReactions, Reflect=codetype] attribute DOMString codeType;
|
[CEReactions, Reflect=codetype] attribute DOMString codeType;
|
||||||
[CEReactions, Reflect=usemap] attribute DOMString useMap;
|
[CEReactions, Reflect=usemap] attribute DOMString useMap;
|
||||||
|
|||||||
Reference in New Issue
Block a user