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

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

Issue 1245843003: [CodeHealth] Use Position::anchorNode instead of deprecatedNode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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 | « Source/core/editing/StyledMarkupSerializer.cpp ('k') | 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 VisiblePosition skipToStartOfEditingBoundary(const VisiblePosition&) const; 81 VisiblePosition skipToStartOfEditingBoundary(const VisiblePosition&) const;
82 VisiblePosition skipToEndOfEditingBoundary(const VisiblePosition&) const; 82 VisiblePosition skipToEndOfEditingBoundary(const VisiblePosition&) const;
83 83
84 VisiblePosition left(bool stayInEditableContent = false) const; 84 VisiblePosition left(bool stayInEditableContent = false) const;
85 VisiblePosition right(bool stayInEditableContent = false) const; 85 VisiblePosition right(bool stayInEditableContent = false) const;
86 86
87 UChar32 characterAfter() const; 87 UChar32 characterAfter() const;
88 UChar32 characterBefore() const { return previous().characterAfter(); } 88 UChar32 characterBefore() const { return previous().characterAfter(); }
89 89
90 // FIXME: This does not handle [table, 0] correctly. 90 // FIXME: This does not handle [table, 0] correctly.
91 Element* rootEditableElement() const { return m_deepPosition.isNotNull() ? m _deepPosition.deprecatedNode()->rootEditableElement() : 0; } 91 Element* rootEditableElement() const { return m_deepPosition.isNotNull() ? m _deepPosition.anchorNode()->rootEditableElement() : 0; }
92 92
93 InlineBoxPosition computeInlineBoxPosition() const 93 InlineBoxPosition computeInlineBoxPosition() const
94 { 94 {
95 return m_deepPosition.computeInlineBoxPosition(m_affinity); 95 return m_deepPosition.computeInlineBoxPosition(m_affinity);
96 } 96 }
97 97
98 // Rect is local to the returned layoutObject 98 // Rect is local to the returned layoutObject
99 LayoutRect localCaretRect(LayoutObject*&) const; 99 LayoutRect localCaretRect(LayoutObject*&) const;
100 // Bounds of (possibly transformed) caret in absolute coords 100 // Bounds of (possibly transformed) caret in absolute coords
101 IntRect absoluteCaretBounds() const; 101 IntRect absoluteCaretBounds() const;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 } // namespace blink 151 } // namespace blink
152 152
153 #ifndef NDEBUG 153 #ifndef NDEBUG
154 // Outside the WebCore namespace for ease of invocation from gdb. 154 // Outside the WebCore namespace for ease of invocation from gdb.
155 void showTree(const blink::VisiblePosition*); 155 void showTree(const blink::VisiblePosition*);
156 void showTree(const blink::VisiblePosition&); 156 void showTree(const blink::VisiblePosition&);
157 #endif 157 #endif
158 158
159 #endif // VisiblePosition_h 159 #endif // VisiblePosition_h
OLDNEW
« no previous file with comments | « Source/core/editing/StyledMarkupSerializer.cpp ('k') | Source/core/editing/VisiblePosition.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698