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

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

Issue 1325443002: Introduce localCaretRectOf() for VisiblePosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-28T23:08:19 Rebase after absoluteCaretRectBoundsOf() Created 5 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 | « no previous file | Source/core/editing/VisiblePosition.cpp » ('j') | 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 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2008 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 VisiblePosition honorEditingBoundaryAtOrAfter(const VisiblePosition&) const; 99 VisiblePosition honorEditingBoundaryAtOrAfter(const VisiblePosition&) const;
100 VisiblePosition skipToStartOfEditingBoundary(const VisiblePosition&) const; 100 VisiblePosition skipToStartOfEditingBoundary(const VisiblePosition&) const;
101 VisiblePosition skipToEndOfEditingBoundary(const VisiblePosition&) const; 101 VisiblePosition skipToEndOfEditingBoundary(const VisiblePosition&) const;
102 102
103 VisiblePosition left() const; 103 VisiblePosition left() const;
104 VisiblePosition right() const; 104 VisiblePosition right() const;
105 105
106 // FIXME: This does not handle [table, 0] correctly. 106 // FIXME: This does not handle [table, 0] correctly.
107 Element* rootEditableElement() const { return m_deepPosition.isNotNull() ? m _deepPosition.anchorNode()->rootEditableElement() : 0; } 107 Element* rootEditableElement() const { return m_deepPosition.isNotNull() ? m _deepPosition.anchorNode()->rootEditableElement() : 0; }
108 108
109 // Rect is local to the returned layoutObject
110 LayoutRect localCaretRect(LayoutObject*&) const;
111
112 DECLARE_TRACE(); 109 DECLARE_TRACE();
113 110
114 #ifndef NDEBUG 111 #ifndef NDEBUG
115 void debugPosition(const char* msg = "") const; 112 void debugPosition(const char* msg = "") const;
116 void formatForDebugger(char* buffer, unsigned length) const; 113 void formatForDebugger(char* buffer, unsigned length) const;
117 void showTreeForThis() const; 114 void showTreeForThis() const;
118 #endif 115 #endif
119 116
120 private: 117 private:
121 template<typename Strategy> 118 template<typename Strategy>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 154
158 } // namespace blink 155 } // namespace blink
159 156
160 #ifndef NDEBUG 157 #ifndef NDEBUG
161 // Outside the WebCore namespace for ease of invocation from gdb. 158 // Outside the WebCore namespace for ease of invocation from gdb.
162 void showTree(const blink::VisiblePosition*); 159 void showTree(const blink::VisiblePosition*);
163 void showTree(const blink::VisiblePosition&); 160 void showTree(const blink::VisiblePosition&);
164 #endif 161 #endif
165 162
166 #endif // VisiblePosition_h 163 #endif // VisiblePosition_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/VisiblePosition.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698