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

Side by Side Diff: third_party/WebKit/Source/core/editing/PositionIterator.h

Issue 2399663003: Reflow comments in //third_party/WebKit/Source/core/editing (Closed)
Patch Set: Created 4 years, 2 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) 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 private: 72 private:
73 PositionIteratorAlgorithm(Node* anchorNode, int offsetInAnchorNode); 73 PositionIteratorAlgorithm(Node* anchorNode, int offsetInAnchorNode);
74 74
75 bool isValid() const { 75 bool isValid() const {
76 return !m_anchorNode || 76 return !m_anchorNode ||
77 m_domTreeVersion == m_anchorNode->document().domTreeVersion(); 77 m_domTreeVersion == m_anchorNode->document().domTreeVersion();
78 } 78 }
79 79
80 Member<Node> m_anchorNode; 80 Member<Node> m_anchorNode;
81 Member<Node> 81 // If this is non-null, Strategy::parent(*m_nodeAfterPositionInAnchor) ==
82 m_nodeAfterPositionInAnchor; // If this is non-null, Strategy::parent(*m_ nodeAfterPositionInAnchor) == m_anchorNode; 82 // m_anchorNode;
83 Member<Node> m_nodeAfterPositionInAnchor;
83 int m_offsetInAnchor; 84 int m_offsetInAnchor;
84 size_t m_depthToAnchorNode; 85 size_t m_depthToAnchorNode;
85 // If |m_nodeAfterPositionInAnchor| is not null, 86 // If |m_nodeAfterPositionInAnchor| is not null,
86 // m_offsetsInAnchorNode[m_depthToAnchorNode] == 87 // m_offsetsInAnchorNode[m_depthToAnchorNode] ==
87 // Strategy::index(m_nodeAfterPositionInAnchor). 88 // Strategy::index(m_nodeAfterPositionInAnchor).
88 Vector<int> m_offsetsInAnchorNode; 89 Vector<int> m_offsetsInAnchorNode;
89 uint64_t m_domTreeVersion; 90 uint64_t m_domTreeVersion;
90 }; 91 };
91 92
92 extern template class PositionIteratorAlgorithm<EditingStrategy>; 93 extern template class PositionIteratorAlgorithm<EditingStrategy>;
93 extern template class PositionIteratorAlgorithm<EditingInFlatTreeStrategy>; 94 extern template class PositionIteratorAlgorithm<EditingInFlatTreeStrategy>;
94 95
95 using PositionIterator = PositionIteratorAlgorithm<EditingStrategy>; 96 using PositionIterator = PositionIteratorAlgorithm<EditingStrategy>;
96 using PositionIteratorInFlatTree = 97 using PositionIteratorInFlatTree =
97 PositionIteratorAlgorithm<EditingInFlatTreeStrategy>; 98 PositionIteratorAlgorithm<EditingInFlatTreeStrategy>;
98 99
99 } // namespace blink 100 } // namespace blink
100 101
101 #endif // PositionIterator_h 102 #endif // PositionIterator_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/Position.cpp ('k') | third_party/WebKit/Source/core/editing/PositionIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698