Changeset 83026 in webkit
- Timestamp:
- Apr 6, 2011 12:22:26 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r83025 r83026 1 2011-04-06 Naoki Takano <takano.naoki@gmail.com> 2 3 Reviewed by Ryosuke Niwa. 4 5 REGRESSION(r81328): Null pointer crash in canAppendNewLineFeed when selection isn't inside an editable element 6 https://bugs.webkit.org/show_bug.cgi?id=57755 7 8 * editing/execCommand/insert-line-break-onload-expected.txt: Added. 9 * editing/execCommand/insert-line-break-onload.html: Added to check calling InsertLineBreak without any crash. 10 1 11 2011-04-05 James Kozianski <koz@chromium.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r83022 r83026 1 2011-04-06 Naoki Takano <takano.naoki@gmail.com> 2 3 Reviewed by Ryosuke Niwa. 4 5 REGRESSION(r81328): Null pointer crash in canAppendNewLineFeed when selection isn't inside an editable element 6 https://bugs.webkit.org/show_bug.cgi?id=57755 7 8 Test: editing/execCommand/insert-line-break-onload.html 9 10 * editing/TypingCommand.cpp: 11 (WebCore::canAppendNewLineFeed): Added null pointer check for rootEditableElement(). 12 1 13 2011-04-05 Antti Koivisto <antti@apple.com> 2 14 -
trunk/Source/WebCore/editing/TypingCommand.cpp
r82233 r83026 50 50 static bool canAppendNewLineFeed(const VisibleSelection& selection) 51 51 { 52 Node* node = selection.rootEditableElement(); 53 if (!node) 54 return false; 55 56 RefPtr<BeforeTextInsertedEvent> event = BeforeTextInsertedEvent::create(String("\n")); 52 57 ExceptionCode ec = 0; 53 RefPtr<BeforeTextInsertedEvent> event = BeforeTextInsertedEvent::create(String("\n")); 54 selection.rootEditableElement()->dispatchEvent(event, ec); 58 node->dispatchEvent(event, ec); 55 59 return event->text().length(); 56 60 }
Note: See TracChangeset
for help on using the changeset viewer.