Changeset 273302 in webkit
- Timestamp:
- Feb 23, 2021 4:28:20 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r273301 r273302 1 2021-02-23 Frederic Wang <fwang@igalia.com> 2 3 Nullptr crash in ModifySelectionListLevelCommand::appendSiblingNodeRange 4 https://bugs.webkit.org/show_bug.cgi?id=221650 5 6 Reviewed by Ryosuke Niwa. 7 8 * fast/editing/modify-selection-list-level-crash-expected.txt: Added. 9 * fast/editing/modify-selection-list-level-crash.html: Added. 10 1 11 2021-02-23 Kimmo Kinnunen <kkinnunen@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r273300 r273302 1 2021-02-23 Frederic Wang <fwang@igalia.com> 2 3 Nullptr crash in ModifySelectionListLevelCommand::appendSiblingNodeRange 4 https://bugs.webkit.org/show_bug.cgi?id=221650 5 6 Reviewed by Ryosuke Niwa. 7 8 getStartEndListChildren relies on the render tree to move the "end" node to the next sibling, 9 but this does not necessarily correspond to a sibling of the "start" node in the DOM tree. 10 This breaks the assumption of ModifySelectionListLevelCommand::appendSiblingNodeRange that 11 the "start" and "end" nodes are siblings (in that order), causing a null-pointer dereference. 12 This patch fixes the issue by ensuring that getStartEndListChildren does not try to change 13 the "end" node if it is not a sibling of the "start" one. 14 15 Test: fast/editing/modify-selection-list-level-crash.html 16 17 * editing/ModifySelectionListLevel.cpp: 18 (WebCore::getStartEndListChildren): Don't change the end node if r->node() is a sibling of 19 startChildList. 20 1 21 2021-02-23 Ryosuke Niwa <rniwa@webkit.org> 2 22 -
trunk/Source/WebCore/editing/ModifySelectionListLevel.cpp
r272556 r273302 81 81 if (endListChild->renderer()->isListItem()) { 82 82 RenderObject* r = endListChild->renderer()->nextSibling(); 83 if (r && isListHTMLElement(r->node()) )83 if (r && isListHTMLElement(r->node()) && r->node()->parentNode() == startListChild->parentNode()) 84 84 endListChild = r->node(); 85 85 }
Note: See TracChangeset
for help on using the changeset viewer.