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

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

Issue 2712223002: Get rid of redundant functions updateIfNeeded() in FrameSelection and SelectionEditor (Closed)
Patch Set: 2017-02-25T10:59:38 Created 3 years, 9 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) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 .setIsHandleVisible(isHandleVisible()) 1144 .setIsHandleVisible(isHandleVisible())
1145 .build(); 1145 .build();
1146 1146
1147 if (newSelection.isNone()) 1147 if (newSelection.isNone())
1148 return; 1148 return;
1149 1149
1150 setSelection(newSelection, CloseTyping | ClearTypingStyle, 1150 setSelection(newSelection, CloseTyping | ClearTypingStyle,
1151 CursorAlignOnScroll::IfNeeded, granularity); 1151 CursorAlignOnScroll::IfNeeded, granularity);
1152 } 1152 }
1153 1153
1154 void FrameSelection::updateIfNeeded() {
Xiaocheng 2017/02/25 02:45:46 We should also remove this function from FS.h
1155 DCHECK(!m_frame->document()->needsLayoutTreeUpdate());
1156 m_selectionEditor->updateIfNeeded();
1157 }
1158
1159 void FrameSelection::setCaretVisible(bool caretIsVisible) { 1154 void FrameSelection::setCaretVisible(bool caretIsVisible) {
1160 m_frameCaret->setCaretVisibility(caretIsVisible ? CaretVisibility::Visible 1155 m_frameCaret->setCaretVisibility(caretIsVisible ? CaretVisibility::Visible
1161 : CaretVisibility::Hidden); 1156 : CaretVisibility::Hidden);
1162 } 1157 }
1163 1158
1164 void FrameSelection::setCaretBlinkingSuspended(bool suspended) { 1159 void FrameSelection::setCaretBlinkingSuspended(bool suspended) {
1165 m_frameCaret->setCaretBlinkingSuspended(suspended); 1160 m_frameCaret->setCaretBlinkingSuspended(suspended);
1166 } 1161 }
1167 1162
1168 bool FrameSelection::isCaretBlinkingSuspended() const { 1163 bool FrameSelection::isCaretBlinkingSuspended() const {
(...skipping 21 matching lines...) Expand all
1190 } 1185 }
1191 1186
1192 void showTree(const blink::FrameSelection* sel) { 1187 void showTree(const blink::FrameSelection* sel) {
1193 if (sel) 1188 if (sel)
1194 sel->showTreeForThis(); 1189 sel->showTreeForThis();
1195 else 1190 else
1196 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; 1191 LOG(INFO) << "Cannot showTree for <null> FrameSelection.";
1197 } 1192 }
1198 1193
1199 #endif 1194 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/Editor.cpp ('k') | third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698