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

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

Issue 74693003: Editing: Minor cleanup/Removal of redundant function call (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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
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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 void Editor::clearLastEditCommand() 619 void Editor::clearLastEditCommand()
620 { 620 {
621 m_lastEditCommand.clear(); 621 m_lastEditCommand.clear();
622 } 622 }
623 623
624 Node* Editor::findEventTargetFrom(const VisibleSelection& selection) const 624 Node* Editor::findEventTargetFrom(const VisibleSelection& selection) const
625 { 625 {
626 Node* target = selection.start().element(); 626 Node* target = selection.start().element();
627 if (!target) 627 if (!target)
628 target = m_frame.document()->body(); 628 target = m_frame.document()->body();
629 if (!target)
630 return 0;
631 629
632 return target; 630 return target;
633 } 631 }
634 632
635 Node* Editor::findEventTargetFromSelection() const 633 Node* Editor::findEventTargetFromSelection() const
636 { 634 {
637 return findEventTargetFrom(m_frame.selection().selection()); 635 return findEventTargetFrom(m_frame.selection().selection());
638 } 636 }
639 637
640 void Editor::applyStyle(StylePropertySet* style, EditAction editingAction) 638 void Editor::applyStyle(StylePropertySet* style, EditAction editingAction)
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 return spellChecker().isContinuousSpellCheckingEnabled(); 1345 return spellChecker().isContinuousSpellCheckingEnabled();
1348 } 1346 }
1349 1347
1350 void Editor::toggleOverwriteModeEnabled() 1348 void Editor::toggleOverwriteModeEnabled()
1351 { 1349 {
1352 m_overwriteModeEnabled = !m_overwriteModeEnabled; 1350 m_overwriteModeEnabled = !m_overwriteModeEnabled;
1353 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled); 1351 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled);
1354 } 1352 }
1355 1353
1356 } // namespace WebCore 1354 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698