Changeset 285084 in webkit
- Timestamp:
- Oct 30, 2021 3:58:21 PM (9 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/editing/execCommand/null_calc_primitive_value_for_css_property.html (modified) (1 diff)
-
LayoutTests/editing/execCommand/transpose-backslash-with-euc.html (modified) (1 diff)
-
LayoutTests/editing/inserting/insert-html-crash-02.html (modified) (1 diff)
-
LayoutTests/editing/selection/DOMSelection-crossing-document-expected.txt (modified) (1 diff)
-
LayoutTests/editing/selection/DOMSelection-crossing-document.html (modified) (1 diff)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/selection/extend-exception-expected.txt (added)
-
LayoutTests/imported/w3c/web-platform-tests/selection/extend-exception.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/DOMSelection.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r285067 r285084 1 2021-10-30 Brandon Stewart <brandonstewart@apple.com> 2 3 Selection extend() should trigger exception with no ranges 4 https://bugs.webkit.org/show_bug.cgi?id=232420 5 6 Reviewed by Chris Dumez. 7 8 Resolve errors in test cases introduced by new exception being thrown by extend() 9 when no ranges are present. 10 11 * editing/execCommand/null_calc_primitive_value_for_css_property.html: 12 * editing/execCommand/transpose-backslash-with-euc.html: 13 * editing/inserting/insert-html-crash-02.html: 14 * editing/selection/DOMSelection-crossing-document-expected.txt: 15 * editing/selection/DOMSelection-crossing-document.html: 16 1 17 2021-10-29 Lauro Moura <lmoura@igalia.com> 2 18 -
trunk/LayoutTests/editing/execCommand/null_calc_primitive_value_for_css_property.html
r271635 r285084 11 11 testRunner.dumpAsText(); 12 12 13 document.getSelection().extend(x); 13 document.getSelection().collapse(x, 0); 14 document.getSelection().extend(x); 15 14 16 document.execCommand("insertHTML", false, "The test passes if there is no crash."); 15 17 } -
trunk/LayoutTests/editing/execCommand/transpose-backslash-with-euc.html
r120173 r285084 12 12 { 13 13 var backslashDivElement = document.getElementById("backslash"); 14 getSelection().collapse(backslashDivElement, 0); 14 15 getSelection().extend(backslashDivElement, 1); 15 16 document.execCommand("Transpose"); -
trunk/LayoutTests/editing/inserting/insert-html-crash-02.html
r283868 r285084 14 14 document.body.appendChild(iframe0); 15 15 document.body.appendChild(document.createElement('iframe')); 16 getSelection().collapse(document.body, 0); 16 17 getSelection().extend(document.body); 17 18 iframe0.contentDocument.onvisibilitychange = () => { -
trunk/LayoutTests/editing/selection/DOMSelection-crossing-document-expected.txt
r56962 r285084 9 9 PASS mainSel.anchorNode is null 10 10 PASS foreignSel.anchorNode is null 11 PASS mainSel.anchorNode is n ull11 PASS mainSel.anchorNode is not null 12 12 PASS foreignSel.anchorNode is null 13 13 PASS mainSel.anchorNode is null -
trunk/LayoutTests/editing/selection/DOMSelection-crossing-document.html
r217390 r285084 47 47 48 48 clear(); 49 mainSel.addRange(new Range()); 49 50 mainSel.extend(foreignElement, 1); 50 51 shouldBeNull("foreignSel.anchorNode"); 51 should BeNull("mainSel.anchorNode");52 shouldNotBe("mainSel.anchorNode", "null"); 52 53 53 54 clear(); -
trunk/LayoutTests/imported/w3c/ChangeLog
r285054 r285084 1 2021-10-30 Brandon Stewart <brandonstewart@apple.com> 2 3 Selection extend() should trigger exception with no ranges 4 https://bugs.webkit.org/show_bug.cgi?id=232420 5 6 Reviewed by Chris Dumez. 7 8 Verify extend() will throw an exception when the Selection object 9 contains no Range objects. Chrome and Firefox will also throw an 10 exception in this scenario. 11 12 https://w3c.github.io/selection-api/#dom-selection-extend 13 14 * web-platform-tests/selection/extend-exception-expected.txt: Added. 15 * web-platform-tests/selection/extend-exception.html: Added. 16 1 17 2021-10-29 Antti Koivisto <antti@apple.com> 2 18 -
trunk/Source/WebCore/ChangeLog
r285083 r285084 1 2021-10-30 Brandon Stewart <brandonstewart@apple.com> 2 3 Selection extend() should trigger exception with no ranges 4 https://bugs.webkit.org/show_bug.cgi?id=232420 5 6 Reviewed by Chris Dumez. 7 8 The 'extend' method in the Selection API should throw an exception upon 9 being called if there are no ranges present in the Selection object. 10 11 https://w3c.github.io/selection-api/#dom-selection-extend 12 13 Test: imported/w3c/web-platform-tests/selection/extend-exception.html 14 15 * page/DOMSelection.cpp: 16 (WebCore::DOMSelection::extend): 17 1 18 2021-10-30 Alan Bujtas <zalan@apple.com> 2 19 -
trunk/Source/WebCore/page/DOMSelection.cpp
r278253 r285084 339 339 if (!frame) 340 340 return { }; 341 342 if (rangeCount() < 1) 343 return Exception { InvalidStateError, "extend() requires a Range to be added to the Selection" }; 344 341 345 if (frame->settings().liveRangeSelectionEnabled()) { 342 346 if (!frame->document()->contains(node))
Note: See TracChangeset
for help on using the changeset viewer.