Bug 263960
| Summary: | [CSSOM] Stylesheet::insertRule shoud return index on successful insertion | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Matthieu Dubet <m_dubet> |
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Matthieu Dubet
https://drafts.csswg.org/cssom/#insert-a-css-rule
Step 8 : Return index.
We return a constant -1 for historical reason, time to respect the spec
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/117730318>
Matthieu Dubet
It's already the case
https://github.com/WebKit/WebKit/blob/399d66f88e336da795cf2ed2836dee80af046b19/Source/WebCore/css/CSSStyleSheet.cpp#L367
And addRule returns -1 per spec
https://drafts.csswg.org/cssom/#insert-a-css-rule:~:text=index%20as%20arguments.-,Return%20%2D1.,-Authors%20should%20not