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

Side by Side Diff: Source/core/dom/Position.h

Issue 20681004: Make first-letter style to work with editing Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-09-20T18:27:32 Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 return m_offset; 115 return m_offset;
116 return offsetForPositionAfterAnchor(); 116 return offsetForPositionAfterAnchor();
117 } 117 }
118 118
119 // These are convenience methods which are smart about whether the position is neighbor anchored or parent anchored 119 // These are convenience methods which are smart about whether the position is neighbor anchored or parent anchored
120 Node* computeNodeBeforePosition() const; 120 Node* computeNodeBeforePosition() const;
121 Node* computeNodeAfterPosition() const; 121 Node* computeNodeAfterPosition() const;
122 122
123 Node* anchorNode() const { return m_anchorNode.get(); } 123 Node* anchorNode() const { return m_anchorNode.get(); }
124 124
125 // FIXME: We should replace anchorNode()->renderer() and deprecatedNode()->r enderer()
126 // with rendererOfAnchorNode().
127 RenderObject* rendererOfAnchorNode() const;
128
129 // New code should not use this function.
130 int deprecatedOffsetInRendererOfAnchorNode() const;
131
125 // FIXME: Callers should be moved off of node(), node() is not always the co ntainer for this position. 132 // FIXME: Callers should be moved off of node(), node() is not always the co ntainer for this position.
126 // For nodes which editingIgnoresContent(node()) returns true, positions lik e [ignoredNode, 0] 133 // For nodes which editingIgnoresContent(node()) returns true, positions lik e [ignoredNode, 0]
127 // will be treated as before ignoredNode (thus node() is really after the po sition, not containing it). 134 // will be treated as before ignoredNode (thus node() is really after the po sition, not containing it).
128 Node* deprecatedNode() const { return m_anchorNode.get(); } 135 Node* deprecatedNode() const { return m_anchorNode.get(); }
129 136
130 Document* document() const { return m_anchorNode ? &m_anchorNode->document() : 0; } 137 Document* document() const { return m_anchorNode ? &m_anchorNode->document() : 0; }
131 bool inDocument() const { return m_anchorNode && m_anchorNode->inDocument(); } 138 bool inDocument() const { return m_anchorNode && m_anchorNode->inDocument(); }
132 Element* rootEditableElement() const 139 Element* rootEditableElement() const
133 { 140 {
134 Node* container = containerNode(); 141 Node* container = containerNode();
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 347
341 } // namespace WebCore 348 } // namespace WebCore
342 349
343 #ifndef NDEBUG 350 #ifndef NDEBUG
344 // Outside the WebCore namespace for ease of invocation from gdb. 351 // Outside the WebCore namespace for ease of invocation from gdb.
345 void showTree(const WebCore::Position&); 352 void showTree(const WebCore::Position&);
346 void showTree(const WebCore::Position*); 353 void showTree(const WebCore::Position*);
347 #endif 354 #endif
348 355
349 #endif // Position_h 356 #endif // Position_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698