Changeset 277174 in webkit
- Timestamp:
- May 7, 2021, 8:23:51 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r277173 r277174 1 2021-05-07 Frédéric Wang <fwang@igalia.com> 2 3 Crash in ApplyStyleCommand::applyRelativeFontStyleChange 4 https://bugs.webkit.org/show_bug.cgi?id=225235 5 6 Reviewed by Ryosuke Niwa. 7 8 Add regression test. 9 10 * editing/execCommand/font-size-delta-same-node-for-start-and-end-crash-expected.txt: Added. 11 * editing/execCommand/font-size-delta-same-node-for-start-and-end-crash.html: Added. 12 * platform/ios/editing/execCommand/font-size-delta-same-node-for-start-and-end-crash-expected.txt: Added. 13 1 14 2021-05-07 Philippe Normand <pnormand@igalia.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r277172 r277174 1 2021-05-07 Frédéric Wang <fwang@igalia.com> 2 3 Crash in ApplyStyleCommand::applyRelativeFontStyleChange 4 https://bugs.webkit.org/show_bug.cgi?id=225235 5 6 Reviewed by Ryosuke Niwa. 7 8 Test: editing/execCommand/font-size-delta-same-node-for-start-and-end-crash.html 9 10 In ApplyStyleCommand::applyRelativeFontStyleChange, when the selection start and end have the 11 same anchor node, the start node of the loop is obtained by calling Position::upstream on the 12 selection start while end node of the loop is obtained by calling NodeTraversal::next on the 13 anchor node. This can result in the former being after the latter. This patch fixes this by 14 moving the end of the loop after the anchor node (similar to what is already done when the 15 start anchor node is a strict descendant of the end anchor node). 16 17 * editing/ApplyStyleCommand.cpp: 18 (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): Also include the case where 19 end.deprecatedNode() == start.deprecatedNode() in the conditional. 20 1 21 2021-05-07 Carlos Garnacho <carlosg@gnome.org> 2 22 -
trunk/Source/WebCore/editing/ApplyStyleCommand.cpp
r276133 r277174 349 349 ASSERT(start.deprecatedNode()); 350 350 ASSERT(end.deprecatedNode()); 351 if ( start.deprecatedNode()->isDescendantOf(*end.deprecatedNode()))351 if (end.deprecatedNode()->contains(*start.deprecatedNode())) 352 352 beyondEnd = NodeTraversal::nextSkippingChildren(*end.deprecatedNode()); 353 353 else
Note:
See TracChangeset
for help on using the changeset viewer.