[Webkit-unassigned] [Bug 239669] New: [cssom] Iterating computed style should not include 'all' shorthand

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 22 12:40:44 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=239669

            Bug ID: 239669
           Summary: [cssom] Iterating computed style should not include
                    'all' shorthand
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: obrufau at igalia.com

A computed style should only list declarations for longhand properties, e.g.

    var cs = getComputedStyle(document.body);
    var longhands = new Set(cs);
    longhands.has("margin"); // false
    longhands.has("margin-left"); // true

However, the 'all' shorthand is included:

    longhands.has("all"); // true, should be false

Same with item():

    cs.item(4); // "alignment-baseline"
    cs.item(5); // "all"
    cs.item(6); // "alt"

See https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle

> set decls to a list of all longhand properties that are supported CSS
> properties, in lexicographical order, with the value being the resolved
> value computed for obj using the style rules associated with doc.
> Additionally, append to decls all the custom properties whose computed
> value for obj is not the guaranteed-invalid value.

getComputedStyle().all should continue working of course, but it shouldn't be indexed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220422/8626ff8f/attachment.htm>


More information about the webkit-unassigned mailing list