WebPlatformForEmbedded / WPEWebKit

WPE WebKit port (downstream)
210 stars 135 forks source link

[wpe-2.38][Regression] CSS background-repeat prop not reported correctly #1344

Closed asurdej-comcast closed 1 month ago

asurdej-comcast commented 1 month ago

Low priority We are checking CSS tests regressions wpe-2.38 vs wpe-2.28 from https://css3test.com/ Test cases only checks if browser correctly recognize CSS properties, not if they are correctly implemented.

There is a regression in "background-repeat" and "mask-repeat" CSS properties in wpe-2.38. Both seem to share the same root case. Internally they are handled by webkit as two separate values "background-repeat-x" and "background-repeat-y" that are marked as internal and are not reported in element's style.

In a nutshell the test case looks like:

var element = document.createElement('div');
element.style.backgroundRepeat = "space"
if (element.style.length > 0)
    PASS
else
    FAIL

> element.style.length
< 0
> element.style
< CSSStyleDeclaration {cssText: "background-repeat: space space;", length: 0, parentRule: null, cssFloat: "", EpubCaptionSide: "", …}

Setting "background-repeat" doesn't affect CSSStyleDeclaration lenght, and is not listed in props array. It is correctly visible in cssText property. The same applies to "mask-repeat", except it is not really listed in style.cssText at all.

wpe-2.28 reports this as two separate values "background-repeat-x" and "background-repeat-y" so style.length is "2".

magomez commented 1 month ago

@asurdej-comcast I've just pushed 14747c54cb29d495d4cb2b0377768f45f6a27c78 to the wpe-2.38 branch to fix this. It works for me. Could you verify and close this, please?

asurdej-comcast commented 1 month ago

Thanks @magomez Your change works fine. Closing this ticket