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

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

Issue 318803002: Rename Repaint to Paint Invalidation part 3 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 { 189 {
190 RenderObject* caretPainter = caretRenderer(node); 190 RenderObject* caretPainter = caretRenderer(node);
191 if (!caretPainter) 191 if (!caretPainter)
192 return; 192 return;
193 193
194 // FIXME: Need to over-paint 1 pixel to workaround some rounding problems. 194 // FIXME: Need to over-paint 1 pixel to workaround some rounding problems.
195 // https://bugs.webkit.org/show_bug.cgi?id=108283 195 // https://bugs.webkit.org/show_bug.cgi?id=108283
196 LayoutRect inflatedRect = rect; 196 LayoutRect inflatedRect = rect;
197 inflatedRect.inflate(1); 197 inflatedRect.inflate(1);
198 198
199 caretPainter->repaintRectangle(inflatedRect); 199 caretPainter->invalidatePaintRectangle(inflatedRect);
200 } 200 }
201 201
202 bool CaretBase::shouldRepaintCaret(const RenderView* view, bool isContentEditabl e) const 202 bool CaretBase::shouldRepaintCaret(const RenderView* view, bool isContentEditabl e) const
203 { 203 {
204 ASSERT(view); 204 ASSERT(view);
205 bool caretBrowsing = false; 205 bool caretBrowsing = false;
206 if (FrameView* frameView = view->frameView()) { 206 if (FrameView* frameView = view->frameView()) {
207 LocalFrame& frame = frameView->frame(); // The frame where the selection started 207 LocalFrame& frame = frameView->frame(); // The frame where the selection started
208 caretBrowsing = frame.settings() && frame.settings()->caretBrowsingEnabl ed(); 208 caretBrowsing = frame.settings() && frame.settings()->caretBrowsingEnabl ed();
209 } 209 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 context->fillRect(caret, caretColor); 262 context->fillRect(caret, caretColor);
263 } 263 }
264 264
265 void DragCaretController::paintDragCaret(LocalFrame* frame, GraphicsContext* p, const LayoutPoint& paintOffset, const LayoutRect& clipRect) const 265 void DragCaretController::paintDragCaret(LocalFrame* frame, GraphicsContext* p, const LayoutPoint& paintOffset, const LayoutRect& clipRect) const
266 { 266 {
267 if (m_position.deepEquivalent().deprecatedNode()->document().frame() == fram e) 267 if (m_position.deepEquivalent().deprecatedNode()->document().frame() == fram e)
268 paintCaret(m_position.deepEquivalent().deprecatedNode(), p, paintOffset, clipRect); 268 paintCaret(m_position.deepEquivalent().deprecatedNode(), p, paintOffset, clipRect);
269 } 269 }
270 270
271 } 271 }
OLDNEW
« no previous file with comments | « Source/core/dom/DocumentMarkerController.cpp ('k') | Source/core/editing/InputMethodController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698