Bug 202719 - [CSS Shadow Parts] Allow exporting single part with multiple names using exportparts attribute
Summary: [CSS Shadow Parts] Allow exporting single part with multiple names using expo...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 149443
  Show dependency treegraph
 
Reported: 2019-10-08 23:38 PDT by Antti Koivisto
Modified: 2019-10-09 01:26 PDT (History)
13 users (show)

See Also:


Attachments
patch (6.69 KB, patch)
2019-10-08 23:45 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2019-10-08 23:38:36 PDT
exportparts="part:export1, part:export2" should work.
Comment 1 Antti Koivisto 2019-10-08 23:45:10 PDT
Created attachment 380502 [details]
patch
Comment 2 Ryosuke Niwa 2019-10-09 00:28:01 PDT
Comment on attachment 380502 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=380502&action=review

> Source/WebCore/css/SelectorChecker.cpp:1181
> +            for (unsigned i = 0; i < element.partNames().size(); ++i)

We can’t use range loop?

> Source/WebCore/dom/ShadowRoot.h:99
> +    using PartMappings = HashMap<AtomString, Vector<AtomString, 1>>;

Should we typedef Vector?
Comment 3 Antti Koivisto 2019-10-09 00:38:07 PDT
> We can’t use range loop?

Not at the moment, SpaceSplitString doesn't have iterator interface.

> Should we typedef Vector?

Seems like overkill. Aliases make the code more opaque so I prefer only using them when types get pretty complicated.
Comment 4 WebKit Commit Bot 2019-10-09 01:25:41 PDT
Comment on attachment 380502 [details]
patch

Clearing flags on attachment: 380502

Committed r250902: <https://trac.webkit.org/changeset/250902>
Comment 5 WebKit Commit Bot 2019-10-09 01:25:43 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2019-10-09 01:26:18 PDT
<rdar://problem/56108565>