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

Side by Side Diff: Source/core/editing/FrameSelection.h

Issue 431983005: FrameSelection::updateApperance for caret should not cause layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add updateLocalCaretRect function Created 6 years, 4 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, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 void setExtent(const VisiblePosition&, EUserTriggered = NotUserTriggered); 132 void setExtent(const VisiblePosition&, EUserTriggered = NotUserTriggered);
133 133
134 Position base() const { return m_selection.base(); } 134 Position base() const { return m_selection.base(); }
135 Position extent() const { return m_selection.extent(); } 135 Position extent() const { return m_selection.extent(); }
136 Position start() const { return m_selection.start(); } 136 Position start() const { return m_selection.start(); }
137 Position end() const { return m_selection.end(); } 137 Position end() const { return m_selection.end(); }
138 138
139 // Return the renderer that is responsible for painting the caret (in the se lection start node) 139 // Return the renderer that is responsible for painting the caret (in the se lection start node)
140 RenderBlock* caretRenderer() const; 140 RenderBlock* caretRenderer() const;
141 141
142 // Caret rect local to the caret's renderer 142 // Update caret rect local to the caret's renderer
143 LayoutRect localCaretRect(); 143 void updateLocalCaretRect();
144 LayoutRect localCaretRectWithoutUpdateForTesting() const { return CaretBase: :localCaretRectWithoutUpdate(); } 144 LayoutRect localCaretRectWithoutUpdateForTesting() const { return CaretBase: :localCaretRectWithoutUpdate(); }
145 145
146 // Bounds of (possibly transformed) caret in absolute coords 146 // Bounds of (possibly transformed) caret in absolute coords
147 IntRect absoluteCaretBounds(); 147 IntRect absoluteCaretBounds();
148 void setCaretRectNeedsUpdate() { CaretBase::setCaretRectNeedsUpdate(); } 148 void setCaretRectNeedsUpdate() { CaretBase::setCaretRectNeedsUpdate(); }
149 149
150 void didChangeFocus(); 150 void didChangeFocus();
151 void willBeModified(EAlteration, SelectionDirection); 151 void willBeModified(EAlteration, SelectionDirection);
152 152
153 bool isNone() const { return m_selection.isNone(); } 153 bool isNone() const { return m_selection.isNone(); }
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 } 309 }
310 } // namespace blink 310 } // namespace blink
311 311
312 #ifndef NDEBUG 312 #ifndef NDEBUG
313 // Outside the WebCore namespace for ease of invocation from gdb. 313 // Outside the WebCore namespace for ease of invocation from gdb.
314 void showTree(const blink::FrameSelection&); 314 void showTree(const blink::FrameSelection&);
315 void showTree(const blink::FrameSelection*); 315 void showTree(const blink::FrameSelection*);
316 #endif 316 #endif
317 317
318 #endif // FrameSelection_h 318 #endif // FrameSelection_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/FrameSelection.cpp » ('j') | Source/core/editing/FrameSelection.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698