Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: Source/core/editing/Editor.cpp

Issue 14829006: Use after free in WebCore::dispatchEditableContentChangedEvents (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix formatting. remove unneeded exception handlers. simplify calculations Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/editing/undo/undo-after-event-edited-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 void Editor::indent() 740 void Editor::indent()
741 { 741 {
742 applyCommand(IndentOutdentCommand::create(m_frame->document(), IndentOutdent Command::Indent)); 742 applyCommand(IndentOutdentCommand::create(m_frame->document(), IndentOutdent Command::Indent));
743 } 743 }
744 744
745 void Editor::outdent() 745 void Editor::outdent()
746 { 746 {
747 applyCommand(IndentOutdentCommand::create(m_frame->document(), IndentOutdent Command::Outdent)); 747 applyCommand(IndentOutdentCommand::create(m_frame->document(), IndentOutdent Command::Outdent));
748 } 748 }
749 749
750 static void dispatchEditableContentChangedEvents(Element* startRoot, Element* en dRoot) 750 static void dispatchEditableContentChangedEvents(PassRefPtr<Element> startRoot, PassRefPtr<Element> endRoot)
751 { 751 {
752 if (startRoot) 752 if (startRoot)
753 startRoot->dispatchEvent(Event::create(eventNames().webkitEditableConten tChangedEvent, false, false), IGNORE_EXCEPTION); 753 startRoot->dispatchEvent(Event::create(eventNames().webkitEditableConten tChangedEvent, false, false), IGNORE_EXCEPTION);
754 if (endRoot && endRoot != startRoot) 754 if (endRoot && endRoot != startRoot)
755 endRoot->dispatchEvent(Event::create(eventNames().webkitEditableContentC hangedEvent, false, false), IGNORE_EXCEPTION); 755 endRoot->dispatchEvent(Event::create(eventNames().webkitEditableContentC hangedEvent, false, false), IGNORE_EXCEPTION);
756 } 756 }
757 757
758 void Editor::appliedEditing(PassRefPtr<CompositeEditCommand> cmd) 758 void Editor::appliedEditing(PassRefPtr<CompositeEditCommand> cmd)
759 { 759 {
760 m_frame->document()->updateLayout(); 760 m_frame->document()->updateLayout();
(...skipping 1861 matching lines...) Expand 10 before | Expand all | Expand 10 after
2622 2622
2623 return checkingTypes; 2623 return checkingTypes;
2624 } 2624 }
2625 2625
2626 bool Editor::unifiedTextCheckerEnabled() const 2626 bool Editor::unifiedTextCheckerEnabled() const
2627 { 2627 {
2628 return WebCore::unifiedTextCheckerEnabled(m_frame); 2628 return WebCore::unifiedTextCheckerEnabled(m_frame);
2629 } 2629 }
2630 2630
2631 } // namespace WebCore 2631 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/editing/undo/undo-after-event-edited-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698