WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
263960
[CSSOM] Stylesheet::insertRule shoud return index on successful insertion
https://bugs.webkit.org/show_bug.cgi?id=263960
Summary
[CSSOM] Stylesheet::insertRule shoud return index on successful insertion
Matthieu Dubet
Reported
2023-10-31 02:36:32 PDT
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
Comment 1
2023-10-31 02:36:51 PDT
<
rdar://problem/117730318
>
Matthieu Dubet
Comment 2
2023-10-31 02:44:45 PDT
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
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug