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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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
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 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 // |tryDHTMLCut| dispatches cut event, which may make layout dirty, but we 1067 // |tryDHTMLCut| dispatches cut event, which may make layout dirty, but we
1068 // need clean layout to obtain the selected content. 1068 // need clean layout to obtain the selected content.
1069 frame().document()->updateStyleAndLayoutIgnorePendingStylesheets(); 1069 frame().document()->updateStyleAndLayoutIgnorePendingStylesheets();
1070 1070
1071 // TODO(yosin) We should use early return style here. 1071 // TODO(yosin) We should use early return style here.
1072 if (canDeleteRange(selectedRange())) { 1072 if (canDeleteRange(selectedRange())) {
1073 spellChecker().updateMarkersForWordsAffectedByEditing(true); 1073 spellChecker().updateMarkersForWordsAffectedByEditing(true);
1074 if (enclosingTextControl(frame().selection().start())) { 1074 if (enclosingTextControl(frame().selection().start())) {
1075 String plainText = frame().selectedTextForClipboard(); 1075 String plainText = frame().selectedTextForClipboard();
1076 Pasteboard::generalPasteboard()->writePlainText( 1076 Pasteboard::generalPasteboard()->writePlainText(
1077 plainText, canSmartCopyOrDelete() ? Pasteboard::CanSmartReplace 1077 plainText,
1078 : Pasteboard::CannotSmartReplace); 1078 canSmartCopyOrDelete() ? Pasteboard::CanSmartReplace
1079 : Pasteboard::CannotSmartReplace);
1079 } else { 1080 } else {
1080 writeSelectionToPasteboard(); 1081 writeSelectionToPasteboard();
1081 } 1082 }
1082 1083
1083 if (source == CommandFromMenuOrKeyBinding) { 1084 if (source == CommandFromMenuOrKeyBinding) {
1084 if (dispatchBeforeInputDataTransfer(findEventTargetFromSelection(), 1085 if (dispatchBeforeInputDataTransfer(findEventTargetFromSelection(),
1085 InputEvent::InputType::DeleteByCut, 1086 InputEvent::InputType::DeleteByCut,
1086 nullptr) != 1087 nullptr) !=
1087 DispatchEventResult::NotCanceled) 1088 DispatchEventResult::NotCanceled)
1088 return; 1089 return;
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
1702 1703
1703 DEFINE_TRACE(Editor) { 1704 DEFINE_TRACE(Editor) {
1704 visitor->trace(m_frame); 1705 visitor->trace(m_frame);
1705 visitor->trace(m_lastEditCommand); 1706 visitor->trace(m_lastEditCommand);
1706 visitor->trace(m_undoStack); 1707 visitor->trace(m_undoStack);
1707 visitor->trace(m_mark); 1708 visitor->trace(m_mark);
1708 visitor->trace(m_typingStyle); 1709 visitor->trace(m_typingStyle);
1709 } 1710 }
1710 1711
1711 } // namespace blink 1712 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp ('k') | third_party/WebKit/Source/core/editing/FindOptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698