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

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

Issue 2852573002: Rename InvalidatePaintIfNeeded to drop deprecated IfNeeded suffix. (Closed)
Patch Set: Created 3 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
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 UpdateAppearance(); 139 UpdateAppearance();
140 bool should_paint_caret = 140 bool should_paint_caret =
141 should_paint_caret_ && IsActive() && 141 should_paint_caret_ && IsActive() &&
142 caret_visibility_ == CaretVisibility::kVisible && 142 caret_visibility_ == CaretVisibility::kVisible &&
143 selection_editor_->ComputeVisibleSelectionInDOMTree().HasEditableStyle(); 143 selection_editor_->ComputeVisibleSelectionInDOMTree().HasEditableStyle();
144 144
145 display_item_client_->UpdateStyleAndLayoutIfNeeded( 145 display_item_client_->UpdateStyleAndLayoutIfNeeded(
146 should_paint_caret ? CaretPosition() : PositionWithAffinity()); 146 should_paint_caret ? CaretPosition() : PositionWithAffinity());
147 } 147 }
148 148
149 void FrameCaret::InvalidatePaintIfNeeded( 149 void FrameCaret::InvalidatePaint(const LayoutBlock& block,
150 const LayoutBlock& block, 150 const PaintInvalidatorContext& context) {
151 const PaintInvalidatorContext& context) { 151 display_item_client_->InvalidatePaint(block, context);
152 display_item_client_->InvalidatePaintIfNeeded(block, context);
153 } 152 }
154 153
155 bool FrameCaret::CaretPositionIsValidForDocument( 154 bool FrameCaret::CaretPositionIsValidForDocument(
156 const Document& document) const { 155 const Document& document) const {
157 if (!IsActive()) 156 if (!IsActive())
158 return true; 157 return true;
159 158
160 return CaretPosition().GetDocument() == document && 159 return CaretPosition().GetDocument() == document &&
161 !CaretPosition().IsOrphan(); 160 !CaretPosition().IsOrphan();
162 } 161 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 frame_view->ScheduleVisualUpdateForPaintInvalidationIfNeeded(); 229 frame_view->ScheduleVisualUpdateForPaintInvalidationIfNeeded();
231 } 230 }
232 231
233 void FrameCaret::RecreateCaretBlinkTimerForTesting( 232 void FrameCaret::RecreateCaretBlinkTimerForTesting(
234 RefPtr<WebTaskRunner> task_runner) { 233 RefPtr<WebTaskRunner> task_runner) {
235 caret_blink_timer_.reset(new TaskRunnerTimer<FrameCaret>( 234 caret_blink_timer_.reset(new TaskRunnerTimer<FrameCaret>(
236 std::move(task_runner), this, &FrameCaret::CaretBlinkTimerFired)); 235 std::move(task_runner), this, &FrameCaret::CaretBlinkTimerFired));
237 } 236 }
238 237
239 } // namespace blink 238 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameCaret.h ('k') | third_party/WebKit/Source/core/editing/FrameSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698