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

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

Issue 2650633002: Move CaretBase::invalidateCaretRect() to DragCaretController (Closed)
Patch Set: 2017-01-23T13:45:50 Created 3 years, 11 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 inflatedRect.inflate(LayoutUnit(1)); 127 inflatedRect.inflate(LayoutUnit(1));
128 128
129 // FIXME: We should not allow paint invalidation out of paint invalidation 129 // FIXME: We should not allow paint invalidation out of paint invalidation
130 // state. crbug.com/457415 130 // state. crbug.com/457415
131 DisablePaintInvalidationStateAsserts disabler; 131 DisablePaintInvalidationStateAsserts disabler;
132 132
133 m_visualRect = 133 m_visualRect =
134 node->layoutObject()->invalidatePaintRectangle(inflatedRect, this); 134 node->layoutObject()->invalidatePaintRectangle(inflatedRect, this);
135 } 135 }
136 136
137 void CaretBase::invalidateCaretRect(Node* node,
138 const LayoutRect& caretLocalRect) {
139 node->document().updateStyleAndLayoutTree();
140 if (hasEditableStyle(*node))
141 invalidateLocalCaretRect(node, caretLocalRect);
142 }
143
144 void CaretBase::paintCaret(Node* node, 137 void CaretBase::paintCaret(Node* node,
145 GraphicsContext& context, 138 GraphicsContext& context,
146 const LayoutRect& caretLocalRect, 139 const LayoutRect& caretLocalRect,
147 const LayoutPoint& paintOffset, 140 const LayoutPoint& paintOffset,
148 DisplayItem::Type displayItemType) { 141 DisplayItem::Type displayItemType) {
149 if (DrawingRecorder::useCachedDrawingIfPossible(context, *this, 142 if (DrawingRecorder::useCachedDrawingIfPossible(context, *this,
150 displayItemType)) 143 displayItemType))
151 return; 144 return;
152 145
153 LayoutRect drawingRect = caretLocalRect; 146 LayoutRect drawingRect = caretLocalRect;
(...skipping 11 matching lines...) Expand all
165 158
166 String CaretBase::debugName() const { 159 String CaretBase::debugName() const {
167 return "Caret"; 160 return "Caret";
168 } 161 }
169 162
170 LayoutRect CaretBase::visualRect() const { 163 LayoutRect CaretBase::visualRect() const {
171 return m_visualRect; 164 return m_visualRect;
172 } 165 }
173 166
174 } // namespace blink 167 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/CaretBase.h ('k') | third_party/WebKit/Source/core/editing/DragCaretController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698