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

Side by Side Diff: Source/core/editing/PositionIterator.cpp

Issue 1300813002: Get rid of a redundant function Position::deprecatedEditingOffset() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-18T17:24:05 Created 5 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
« no previous file with comments | « Source/core/editing/Position.cpp ('k') | Source/core/editing/VisibleUnits.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) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 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 19 matching lines...) Expand all
30 30
31 template <typename Strategy> 31 template <typename Strategy>
32 PositionIteratorAlgorithm<Strategy>::PositionIteratorAlgorithm(Node* anchorNode, int offsetInAnchor) 32 PositionIteratorAlgorithm<Strategy>::PositionIteratorAlgorithm(Node* anchorNode, int offsetInAnchor)
33 : m_anchorNode(anchorNode) 33 : m_anchorNode(anchorNode)
34 , m_nodeAfterPositionInAnchor(Strategy::childAt(*anchorNode, offsetInAnchor) ) 34 , m_nodeAfterPositionInAnchor(Strategy::childAt(*anchorNode, offsetInAnchor) )
35 , m_offsetInAnchor(m_nodeAfterPositionInAnchor ? 0 : offsetInAnchor) 35 , m_offsetInAnchor(m_nodeAfterPositionInAnchor ? 0 : offsetInAnchor)
36 { 36 {
37 } 37 }
38 template <typename Strategy> 38 template <typename Strategy>
39 PositionIteratorAlgorithm<Strategy>::PositionIteratorAlgorithm(const PositionAlg orithm<Strategy>& pos) 39 PositionIteratorAlgorithm<Strategy>::PositionIteratorAlgorithm(const PositionAlg orithm<Strategy>& pos)
40 : PositionIteratorAlgorithm(pos.anchorNode(), pos.deprecatedEditingOffset()) 40 : PositionIteratorAlgorithm(pos.anchorNode(), pos.computeEditingOffset())
41 { 41 {
42 } 42 }
43 43
44 template <typename Strategy> 44 template <typename Strategy>
45 PositionIteratorAlgorithm<Strategy>::PositionIteratorAlgorithm() 45 PositionIteratorAlgorithm<Strategy>::PositionIteratorAlgorithm()
46 : m_anchorNode(nullptr) 46 : m_anchorNode(nullptr)
47 , m_nodeAfterPositionInAnchor(nullptr) 47 , m_nodeAfterPositionInAnchor(nullptr)
48 , m_offsetInAnchor(0) 48 , m_offsetInAnchor(0)
49 { 49 {
50 } 50 }
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 return true; 172 return true;
173 if (m_nodeAfterPositionInAnchor) 173 if (m_nodeAfterPositionInAnchor)
174 return false; 174 return false;
175 return Strategy::hasChildren(*m_anchorNode) || m_offsetInAnchor >= Strategy: :lastOffsetForEditing(m_anchorNode); 175 return Strategy::hasChildren(*m_anchorNode) || m_offsetInAnchor >= Strategy: :lastOffsetForEditing(m_anchorNode);
176 } 176 }
177 177
178 template class PositionIteratorAlgorithm<EditingStrategy>; 178 template class PositionIteratorAlgorithm<EditingStrategy>;
179 template class PositionIteratorAlgorithm<EditingInComposedTreeStrategy>; 179 template class PositionIteratorAlgorithm<EditingInComposedTreeStrategy>;
180 180
181 } // namespace blink 181 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/editing/Position.cpp ('k') | Source/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698