Bug 263104 - getComputedStyle() should return the same list than what was specified (truncation or excess)
Summary: getComputedStyle() should return the same list than what was specified (trunc...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 17
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar, WPTImpact
Depends on:
Blocks: 261552 263051
  Show dependency treegraph
 
Reported: 2023-10-12 19:43 PDT by Karl Dubost
Modified: 2023-12-01 05:16 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Dubost 2023-10-12 19:43:08 PDT
getComputedStyle(elt).* should return the specified values for coordinating list properties.

.test {
    background-image: url(foo.ping);
    background-blend-mode: normal, luminosity;
    background-position: 0px 0px, 10px 10px;
}

let test = document.querySelector('.test');
window.getComputedStyle(test).backgroundBlendMode;
window.getComputedStyle(test).backgroundPosition;

should return (like Gecko)

normal, luminosity
0px 0px, 10px 10px

currently WebKit and Blink return

normal
0px 0px


Currently all the properties in 
https://searchfox.org/wubkat/rev/95664cfd77a025b5154b8fc6dd52a6cbd9c0f544/Source/WebCore/css/ComputedStyleExtractor.cpp
which have the patterns


        auto& layers = style.backgroundLayers();
        if (!layers.next())
            return createConvertingToCSSValueID(layers.blendMode());
        CSSValueListBuilder list;
        for (auto* currLayer = &layers; currLayer; currLayer = currLayer->next())
            list.append(createConvertingToCSSValueID(currLayer->blendMode()));
        return CSSValueList::createSpaceSeparated(WTFMove(list));


will not send back the list of values as specified and will stop if the number of images and the number of associated properties is different.
Comment 1 Radar WebKit Bug Importer 2023-10-12 19:43:41 PDT
<rdar://problem/116897028>
Comment 3 Karl Dubost 2023-10-13 16:52:19 PDT
This is happening for mask-image too.