Changeset 70594 in webkit
- Timestamp:
- Oct 26, 2010, 5:49:45 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/editing/execCommand/indent-node-to-split-to-crash-expected.txt (added)
-
LayoutTests/editing/execCommand/indent-node-to-split-to-crash.html (added)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/editing/CompositeEditCommand.cpp (modified) (1 diff)
-
WebCore/editing/IndentOutdentCommand.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r70593 r70594 1 2010-10-26 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Kent Tamura. 4 5 Crash in CompositeEditCommand::splitTreeToNode 6 https://bugs.webkit.org/show_bug.cgi?id=48349 7 8 Added a test to ensure WebKit does not crash when indenting. 9 10 * editing/execCommand/indent-node-to-split-to-crash-expected.txt: Added. 11 * editing/execCommand/indent-node-to-split-to-crash.html: Added. 12 1 13 2010-10-26 Ryosuke Niwa <rniwa@webkit.org> 2 14 -
trunk/WebCore/ChangeLog
r70593 r70594 1 2010-10-26 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Kent Tamura. 4 5 Crash in CompositeEditCommand::splitTreeToNode 6 https://bugs.webkit.org/show_bug.cgi?id=48349 7 8 The bug was caused by indentIntoBlockquote's passing null pointer to splitTreeToNode. 9 Fixed the crash by adding early exits. 10 11 Test: editing/execCommand/indent-node-to-split-to-crash.html 12 13 * editing/CompositeEditCommand.cpp: 14 (WebCore::CompositeEditCommand::splitTreeToNode): 15 * editing/IndentOutdentCommand.cpp: 16 (WebCore::IndentOutdentCommand::indentIntoBlockquote): 17 1 18 2010-10-26 Ryosuke Niwa <rniwa@webkit.org> 2 19 -
trunk/WebCore/editing/CompositeEditCommand.cpp
r69868 r70594 1185 1185 RefPtr<Node> node; 1186 1186 for (node = start; node && node->parent() != end; node = node->parent()) { 1187 if (!node->parent()->isElementNode()) 1188 break; 1187 1189 VisiblePosition positionInParent(Position(node->parent(), 0), DOWNSTREAM); 1188 1190 VisiblePosition positionInNode(Position(node, 0), DOWNSTREAM); -
trunk/WebCore/editing/IndentOutdentCommand.cpp
r69868 r70594 99 99 else 100 100 nodeToSplitTo = editableRootForPosition(start); 101 102 if (!nodeToSplitTo) 103 return; 101 104 102 105 RefPtr<Node> outerBlock = (start.node() == nodeToSplitTo) ? start.node() : splitTreeToNode(start.node(), nodeToSplitTo);
Note:
See TracChangeset
for help on using the changeset viewer.