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

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

Issue 1675163002: Rename ComposedTree to FlatTree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip Created 4 years, 10 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) 2004, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2009 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 26 matching lines...) Expand all
37 #include "wtf/Vector.h" 37 #include "wtf/Vector.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 class InlineTextBox; 41 class InlineTextBox;
42 class LayoutText; 42 class LayoutText;
43 class LayoutTextFragment; 43 class LayoutTextFragment;
44 44
45 CORE_EXPORT String plainText(const EphemeralRange&, TextIteratorBehaviorFlags = TextIteratorDefaultBehavior); 45 CORE_EXPORT String plainText(const EphemeralRange&, TextIteratorBehaviorFlags = TextIteratorDefaultBehavior);
46 46
47 String plainText(const EphemeralRangeInComposedTree&, TextIteratorBehaviorFlags = TextIteratorDefaultBehavior); 47 String plainText(const EphemeralRangeInFlatTree&, TextIteratorBehaviorFlags = Te xtIteratorDefaultBehavior);
48 48
49 // Iterates through the DOM range, returning all the text, and 0-length boundari es 49 // Iterates through the DOM range, returning all the text, and 0-length boundari es
50 // at points where replaced elements break up the text flow. The text comes bac k in 50 // at points where replaced elements break up the text flow. The text comes bac k in
51 // chunks so as to optimize for performance of the iteration. 51 // chunks so as to optimize for performance of the iteration.
52 52
53 template<typename Strategy> 53 template<typename Strategy>
54 class CORE_TEMPLATE_CLASS_EXPORT TextIteratorAlgorithm { 54 class CORE_TEMPLATE_CLASS_EXPORT TextIteratorAlgorithm {
55 STACK_ALLOCATED(); 55 STACK_ALLOCATED();
56 public: 56 public:
57 // [start, end] indicates the document range that the iteration should take place within (both ends inclusive). 57 // [start, end] indicates the document range that the iteration should take place within (both ends inclusive).
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 bool m_shouldStop; 195 bool m_shouldStop;
196 // Used for use counter |InnerTextWithShadowTree| and 196 // Used for use counter |InnerTextWithShadowTree| and
197 // |SelectionToStringWithShadowTree|, we should not use other purpose. 197 // |SelectionToStringWithShadowTree|, we should not use other purpose.
198 bool m_handleShadowRoot; 198 bool m_handleShadowRoot;
199 199
200 // Contains state of emitted text. 200 // Contains state of emitted text.
201 TextIteratorTextState m_textState; 201 TextIteratorTextState m_textState;
202 }; 202 };
203 203
204 extern template class CORE_EXTERN_TEMPLATE_EXPORT TextIteratorAlgorithm<EditingS trategy>; 204 extern template class CORE_EXTERN_TEMPLATE_EXPORT TextIteratorAlgorithm<EditingS trategy>;
205 extern template class CORE_EXTERN_TEMPLATE_EXPORT TextIteratorAlgorithm<EditingI nComposedTreeStrategy>; 205 extern template class CORE_EXTERN_TEMPLATE_EXPORT TextIteratorAlgorithm<EditingI nFlatTreeStrategy>;
206 206
207 using TextIterator = TextIteratorAlgorithm<EditingStrategy>; 207 using TextIterator = TextIteratorAlgorithm<EditingStrategy>;
208 using TextIteratorInComposedTree = TextIteratorAlgorithm<EditingInComposedTreeSt rategy>; 208 using TextIteratorInFlatTree = TextIteratorAlgorithm<EditingInFlatTreeStrategy>;
209 209
210 } // namespace blink 210 } // namespace blink
211 211
212 #endif // TextIterator_h 212 #endif // TextIterator_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698