Closed Bug 1545639 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 16353 - Revert "Fix error message for deleteRule()"

Categories

(Testing :: web-platform-tests, defect, P4)

defect

Tracking

(firefox69 fixed)

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 16353 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/16353
Details from upstream follow.

Mason Freed <masonfreed@chromium.org> wrote:

Revert "Fix error message for deleteRule()"

This reverts commit b2caae9ede888ede7d662c8760da9ab765904571.

Reason for revert: Reverting while I get more context on the deprecation of IndexSizeError

Original change's description:

Fix error message for deleteRule()

Previous to this CL, deleteRule on an empty style sheet would throw a
confusingly-worded IndexSizeError. Now, it properly throws a RangeError.

For example:

const styleEl = document.createElement('style');
document.head.appendChild(styleEl);
styleEl.sheet.deleteRule(0);
--> Uncaught RangeError: Failed to execute 'deleteRule' on 'CSSStyleSheet': The index provided (0) is outside the range [0, 0).

Bug: 949523
Change-Id: I306409f53be88f4bead261dd171466fd3aad5565
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1561410
Auto-Submit: Mason Freed \<masonfreed@chromium.org>
Commit-Queue: Chris Harrelson \<chrishtr@chromium.org>
Reviewed-by: Chris Harrelson \<chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#650697}

TBR=chrishtr@chromium.org,masonfreed@chromium.org

Change-Id: I773160a6ffa263dd7b8d2eb9c9025ad46a970044
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 949523
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1566836
Reviewed-by: Mason Freed \<masonfreed@chromium.org>
Commit-Queue: Mason Freed \<masonfreed@chromium.org>
Cr-Commit-Position: refs/heads/master@{#650835}

Whiteboard: [wptsync downstream] → [wptsync downstream error]
PR 16353 applied with additional changes from upstream: 065779d2966e319c006fccfdbd4e27800624ad42
Whiteboard: [wptsync downstream error] → [wptsync downstream]
The PR was not expected to affect any tests, but the try push wasn't a success. Check the try results for infrastructure issues
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3ab7ec36c060
[wpt PR 16353] - Revert "Fix error message for deleteRule()", a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.