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

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

Issue 2320933002: Get rid of unused parameter from CaretBase::invalidateCaretRect() (Closed)
Patch Set: 2016-09-08T13:53:37 Created 4 years, 3 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 | « third_party/WebKit/Source/core/editing/CaretBase.h ('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) 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 bool CaretBase::shouldRepaintCaret(const LayoutViewItem view) const 174 bool CaretBase::shouldRepaintCaret(const LayoutViewItem view) const
175 { 175 {
176 DCHECK(view); 176 DCHECK(view);
177 if (FrameView* frameView = view.frameView()) { 177 if (FrameView* frameView = view.frameView()) {
178 LocalFrame& frame = frameView->frame(); // The frame where the selection started 178 LocalFrame& frame = frameView->frame(); // The frame where the selection started
179 return frame.settings() && frame.settings()->caretBrowsingEnabled(); 179 return frame.settings() && frame.settings()->caretBrowsingEnabled();
180 } 180 }
181 return false; 181 return false;
182 } 182 }
183 183
184 void CaretBase::invalidateCaretRect(Node* node, bool caretRectChanged) 184 void CaretBase::invalidateCaretRect(Node* node)
185 { 185 {
186 if (caretRectChanged)
187 return;
188
189 if (LayoutViewItem view = node->document().layoutViewItem()) { 186 if (LayoutViewItem view = node->document().layoutViewItem()) {
190 node->document().updateStyleAndLayoutTree(); 187 node->document().updateStyleAndLayoutTree();
191 if (hasEditableStyle(*node) || shouldRepaintCaret(view)) 188 if (hasEditableStyle(*node) || shouldRepaintCaret(view))
192 invalidateLocalCaretRect(node, localCaretRectWithoutUpdate()); 189 invalidateLocalCaretRect(node, localCaretRectWithoutUpdate());
193 } 190 }
194 } 191 }
195 192
196 void CaretBase::paintCaret(Node* node, GraphicsContext& context, const LayoutPoi nt& paintOffset, DisplayItem::Type displayItemType) const 193 void CaretBase::paintCaret(Node* node, GraphicsContext& context, const LayoutPoi nt& paintOffset, DisplayItem::Type displayItemType) const
197 { 194 {
198 if (m_caretVisibility == CaretVisibility::Hidden) 195 if (m_caretVisibility == CaretVisibility::Hidden)
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 { 228 {
232 return "Caret"; 229 return "Caret";
233 } 230 }
234 231
235 LayoutRect CaretBase::visualRect() const 232 LayoutRect CaretBase::visualRect() const
236 { 233 {
237 return m_visualRect; 234 return m_visualRect;
238 } 235 }
239 236
240 } // namespace blink 237 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/CaretBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698