OLD | NEW |
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // ------------------------------------------------------------------------- | 62 // ------------------------------------------------------------------------- |
63 | 63 |
64 // Functions returning Node | 64 // Functions returning Node |
65 | 65 |
66 // highestEditableRoot returns the highest editable node. If the | 66 // highestEditableRoot returns the highest editable node. If the |
67 // rootEditableElement of the speicified Position is <body>, this returns the | 67 // rootEditableElement of the speicified Position is <body>, this returns the |
68 // <body>. Otherwise, this searches ancestors for the highest editable node in | 68 // <body>. Otherwise, this searches ancestors for the highest editable node in |
69 // defiance of editing boundaries. This returns a Document if designMode="on" | 69 // defiance of editing boundaries. This returns a Document if designMode="on" |
70 // and the specified Position is not in the <body>. | 70 // and the specified Position is not in the <body>. |
71 CORE_EXPORT ContainerNode* highestEditableRoot(const Position&, EditableType = C
ontentIsEditable); | 71 CORE_EXPORT ContainerNode* highestEditableRoot(const Position&, EditableType = C
ontentIsEditable); |
72 ContainerNode* highestEditableRoot(const PositionInComposedTree&, EditableType =
ContentIsEditable); | 72 ContainerNode* highestEditableRoot(const PositionInFlatTree&, EditableType = Con
tentIsEditable); |
73 | 73 |
74 Node* highestEnclosingNodeOfType(const Position&, bool (*nodeIsOfType)(const Nod
e*), | 74 Node* highestEnclosingNodeOfType(const Position&, bool (*nodeIsOfType)(const Nod
e*), |
75 EditingBoundaryCrossingRule = CannotCrossEditingBoundary, Node* stayWithin =
nullptr); | 75 EditingBoundaryCrossingRule = CannotCrossEditingBoundary, Node* stayWithin =
nullptr); |
76 Node* highestNodeToRemoveInPruning(Node*, Node* excludeNode = nullptr); | 76 Node* highestNodeToRemoveInPruning(Node*, Node* excludeNode = nullptr); |
77 | 77 |
78 Element* enclosingBlock(Node*, EditingBoundaryCrossingRule = CannotCrossEditingB
oundary); | 78 Element* enclosingBlock(Node*, EditingBoundaryCrossingRule = CannotCrossEditingB
oundary); |
79 CORE_EXPORT Element* enclosingBlock(const Position&, EditingBoundaryCrossingRule
); | 79 CORE_EXPORT Element* enclosingBlock(const Position&, EditingBoundaryCrossingRule
); |
80 CORE_EXPORT Element* enclosingBlock(const PositionInComposedTree&, EditingBounda
ryCrossingRule); | 80 CORE_EXPORT Element* enclosingBlock(const PositionInFlatTree&, EditingBoundaryCr
ossingRule); |
81 Element* enclosingBlockFlowElement(Node&); // Deprecated, use enclosingBlock ins
tead. | 81 Element* enclosingBlockFlowElement(Node&); // Deprecated, use enclosingBlock ins
tead. |
82 bool inSameContainingBlockFlowElement(Node*, Node*); | 82 bool inSameContainingBlockFlowElement(Node*, Node*); |
83 Element* enclosingTableCell(const Position&); | 83 Element* enclosingTableCell(const Position&); |
84 Element* associatedElementOf(const Position&); | 84 Element* associatedElementOf(const Position&); |
85 Node* enclosingEmptyListItem(const VisiblePosition&); | 85 Node* enclosingEmptyListItem(const VisiblePosition&); |
86 Element* enclosingAnchorElement(const Position&); | 86 Element* enclosingAnchorElement(const Position&); |
87 // Returns the lowest ancestor with the specified QualifiedName. If the | 87 // Returns the lowest ancestor with the specified QualifiedName. If the |
88 // specified Position is editable, this function returns an editable | 88 // specified Position is editable, this function returns an editable |
89 // Element. Otherwise, editability doesn't matter. | 89 // Element. Otherwise, editability doesn't matter. |
90 Element* enclosingElementWithTag(const Position&, const QualifiedName&); | 90 Element* enclosingElementWithTag(const Position&, const QualifiedName&); |
91 CORE_EXPORT Node* enclosingNodeOfType(const Position&, bool (*nodeIsOfType)(cons
t Node*), EditingBoundaryCrossingRule = CannotCrossEditingBoundary); | 91 CORE_EXPORT Node* enclosingNodeOfType(const Position&, bool (*nodeIsOfType)(cons
t Node*), EditingBoundaryCrossingRule = CannotCrossEditingBoundary); |
92 CORE_EXPORT Node* enclosingNodeOfType(const PositionInComposedTree&, bool (*node
IsOfType)(const Node*), EditingBoundaryCrossingRule = CannotCrossEditingBoundary
); | 92 CORE_EXPORT Node* enclosingNodeOfType(const PositionInFlatTree&, bool (*nodeIsOf
Type)(const Node*), EditingBoundaryCrossingRule = CannotCrossEditingBoundary); |
93 | 93 |
94 HTMLSpanElement* tabSpanElement(const Node*); | 94 HTMLSpanElement* tabSpanElement(const Node*); |
95 Element* isLastPositionBeforeTable(const VisiblePosition&); | 95 Element* isLastPositionBeforeTable(const VisiblePosition&); |
96 CORE_EXPORT Element* isFirstPositionAfterTable(const VisiblePosition&); | 96 CORE_EXPORT Element* isFirstPositionAfterTable(const VisiblePosition&); |
97 CORE_EXPORT Element* isFirstPositionAfterTable(const VisiblePositionInComposedTr
ee&); | 97 CORE_EXPORT Element* isFirstPositionAfterTable(const VisiblePositionInFlatTree&)
; |
98 | 98 |
99 // Returns the next leaf node or nullptr if there are no more. | 99 // Returns the next leaf node or nullptr if there are no more. |
100 // Delivers leaf nodes as if the whole DOM tree were a linear chain of its leaf
nodes. | 100 // Delivers leaf nodes as if the whole DOM tree were a linear chain of its leaf
nodes. |
101 Node* nextAtomicLeafNode(const Node& start); | 101 Node* nextAtomicLeafNode(const Node& start); |
102 | 102 |
103 // Returns the previous leaf node or nullptr if there are no more. | 103 // Returns the previous leaf node or nullptr if there are no more. |
104 // Delivers leaf nodes as if the whole DOM tree were a linear chain of its leaf
nodes. | 104 // Delivers leaf nodes as if the whole DOM tree were a linear chain of its leaf
nodes. |
105 Node* previousAtomicLeafNode(const Node& start); | 105 Node* previousAtomicLeafNode(const Node& start); |
106 | 106 |
107 template <typename Strategy> | 107 template <typename Strategy> |
108 ContainerNode* parentCrossingShadowBoundaries(const Node&); | 108 ContainerNode* parentCrossingShadowBoundaries(const Node&); |
109 template <> | 109 template <> |
110 inline ContainerNode* parentCrossingShadowBoundaries<EditingStrategy>(const Node
& node) | 110 inline ContainerNode* parentCrossingShadowBoundaries<EditingStrategy>(const Node
& node) |
111 { | 111 { |
112 return NodeTraversal::parentOrShadowHostNode(node); | 112 return NodeTraversal::parentOrShadowHostNode(node); |
113 } | 113 } |
114 template <> | 114 template <> |
115 inline ContainerNode* parentCrossingShadowBoundaries<EditingInComposedTreeStrate
gy>(const Node& node) | 115 inline ContainerNode* parentCrossingShadowBoundaries<EditingInFlatTreeStrategy>(
const Node& node) |
116 { | 116 { |
117 return ComposedTreeTraversal::parent(node); | 117 return FlatTreeTraversal::parent(node); |
118 } | 118 } |
119 | 119 |
120 // boolean functions on Node | 120 // boolean functions on Node |
121 | 121 |
122 // FIXME: editingIgnoresContent, canHaveChildrenForEditing, and isAtomicNode | 122 // FIXME: editingIgnoresContent, canHaveChildrenForEditing, and isAtomicNode |
123 // should be renamed to reflect its usage. | 123 // should be renamed to reflect its usage. |
124 | 124 |
125 // Returns true for nodes that either have no content, or have content that is i
gnored (skipped over) while editing. | 125 // Returns true for nodes that either have no content, or have content that is i
gnored (skipped over) while editing. |
126 // There are no VisiblePositions inside these nodes. | 126 // There are no VisiblePositions inside these nodes. |
127 inline bool editingIgnoresContent(const Node* node) | 127 inline bool editingIgnoresContent(const Node* node) |
(...skipping 21 matching lines...) Expand all Loading... |
149 bool isNodeVisiblyContainedWithin(Node&, const Range&); | 149 bool isNodeVisiblyContainedWithin(Node&, const Range&); |
150 bool isRenderedAsNonInlineTableImageOrHR(const Node*); | 150 bool isRenderedAsNonInlineTableImageOrHR(const Node*); |
151 // Returns true if specified nodes are elements, have identical tag names, | 151 // Returns true if specified nodes are elements, have identical tag names, |
152 // have identical attributes, and are editable. | 152 // have identical attributes, and are editable. |
153 CORE_EXPORT bool areIdenticalElements(const Node&, const Node&); | 153 CORE_EXPORT bool areIdenticalElements(const Node&, const Node&); |
154 bool isNonTableCellHTMLBlockElement(const Node*); | 154 bool isNonTableCellHTMLBlockElement(const Node*); |
155 bool isBlockFlowElement(const Node&); | 155 bool isBlockFlowElement(const Node&); |
156 bool nodeIsUserSelectAll(const Node*); | 156 bool nodeIsUserSelectAll(const Node*); |
157 bool isTextSecurityNode(const Node*); | 157 bool isTextSecurityNode(const Node*); |
158 CORE_EXPORT TextDirection directionOfEnclosingBlock(const Position&); | 158 CORE_EXPORT TextDirection directionOfEnclosingBlock(const Position&); |
159 CORE_EXPORT TextDirection directionOfEnclosingBlock(const PositionInComposedTree
&); | 159 CORE_EXPORT TextDirection directionOfEnclosingBlock(const PositionInFlatTree&); |
160 CORE_EXPORT TextDirection primaryDirectionOf(const Node&); | 160 CORE_EXPORT TextDirection primaryDirectionOf(const Node&); |
161 | 161 |
162 // ------------------------------------------------------------------------- | 162 // ------------------------------------------------------------------------- |
163 // Position | 163 // Position |
164 // ------------------------------------------------------------------------- | 164 // ------------------------------------------------------------------------- |
165 | 165 |
166 // Functions returning Position | 166 // Functions returning Position |
167 | 167 |
168 Position nextCandidate(const Position&); | 168 Position nextCandidate(const Position&); |
169 PositionInComposedTree nextCandidate(const PositionInComposedTree&); | 169 PositionInFlatTree nextCandidate(const PositionInFlatTree&); |
170 Position previousCandidate(const Position&); | 170 Position previousCandidate(const Position&); |
171 PositionInComposedTree previousCandidate(const PositionInComposedTree&); | 171 PositionInFlatTree previousCandidate(const PositionInFlatTree&); |
172 | 172 |
173 CORE_EXPORT Position nextVisuallyDistinctCandidate(const Position&); | 173 CORE_EXPORT Position nextVisuallyDistinctCandidate(const Position&); |
174 CORE_EXPORT PositionInComposedTree nextVisuallyDistinctCandidate(const PositionI
nComposedTree&); | 174 CORE_EXPORT PositionInFlatTree nextVisuallyDistinctCandidate(const PositionInFla
tTree&); |
175 Position previousVisuallyDistinctCandidate(const Position&); | 175 Position previousVisuallyDistinctCandidate(const Position&); |
176 PositionInComposedTree previousVisuallyDistinctCandidate(const PositionInCompose
dTree&); | 176 PositionInFlatTree previousVisuallyDistinctCandidate(const PositionInFlatTree&); |
177 | 177 |
178 Position positionBeforeContainingSpecialElement(const Position&, HTMLElement** c
ontainingSpecialElement = nullptr); | 178 Position positionBeforeContainingSpecialElement(const Position&, HTMLElement** c
ontainingSpecialElement = nullptr); |
179 Position positionAfterContainingSpecialElement(const Position&, HTMLElement** co
ntainingSpecialElement = nullptr); | 179 Position positionAfterContainingSpecialElement(const Position&, HTMLElement** co
ntainingSpecialElement = nullptr); |
180 | 180 |
181 inline Position firstPositionInOrBeforeNode(Node* node) | 181 inline Position firstPositionInOrBeforeNode(Node* node) |
182 { | 182 { |
183 return Position::firstPositionInOrBeforeNode(node); | 183 return Position::firstPositionInOrBeforeNode(node); |
184 } | 184 } |
185 | 185 |
186 inline Position lastPositionInOrAfterNode(Node* node) | 186 inline Position lastPositionInOrAfterNode(Node* node) |
187 { | 187 { |
188 return Position::lastPositionInOrAfterNode(node); | 188 return Position::lastPositionInOrAfterNode(node); |
189 } | 189 } |
190 | 190 |
191 CORE_EXPORT Position firstEditablePositionAfterPositionInRoot(const Position&, N
ode&); | 191 CORE_EXPORT Position firstEditablePositionAfterPositionInRoot(const Position&, N
ode&); |
192 CORE_EXPORT Position lastEditablePositionBeforePositionInRoot(const Position&, N
ode&); | 192 CORE_EXPORT Position lastEditablePositionBeforePositionInRoot(const Position&, N
ode&); |
193 CORE_EXPORT PositionInComposedTree firstEditablePositionAfterPositionInRoot(cons
t PositionInComposedTree&, Node&); | 193 CORE_EXPORT PositionInFlatTree firstEditablePositionAfterPositionInRoot(const Po
sitionInFlatTree&, Node&); |
194 CORE_EXPORT PositionInComposedTree lastEditablePositionBeforePositionInRoot(cons
t PositionInComposedTree&, Node&); | 194 CORE_EXPORT PositionInFlatTree lastEditablePositionBeforePositionInRoot(const Po
sitionInFlatTree&, Node&); |
195 | 195 |
196 // Move up or down the DOM by one position. | 196 // Move up or down the DOM by one position. |
197 // Offsets are computed using layout text for nodes that have layoutObjects - | 197 // Offsets are computed using layout text for nodes that have layoutObjects - |
198 // but note that even when using composed characters, the result may be inside | 198 // but note that even when using composed characters, the result may be inside |
199 // a single user-visible character if a ligature is formed. | 199 // a single user-visible character if a ligature is formed. |
200 CORE_EXPORT Position previousPositionOf(const Position&, PositionMoveType); | 200 CORE_EXPORT Position previousPositionOf(const Position&, PositionMoveType); |
201 CORE_EXPORT Position nextPositionOf(const Position&, PositionMoveType); | 201 CORE_EXPORT Position nextPositionOf(const Position&, PositionMoveType); |
202 CORE_EXPORT PositionInComposedTree previousPositionOf(const PositionInComposedTr
ee&, PositionMoveType); | 202 CORE_EXPORT PositionInFlatTree previousPositionOf(const PositionInFlatTree&, Pos
itionMoveType); |
203 CORE_EXPORT PositionInComposedTree nextPositionOf(const PositionInComposedTree&,
PositionMoveType); | 203 CORE_EXPORT PositionInFlatTree nextPositionOf(const PositionInFlatTree&, Positio
nMoveType); |
204 | 204 |
205 CORE_EXPORT int uncheckedPreviousOffset(const Node*, int current); | 205 CORE_EXPORT int uncheckedPreviousOffset(const Node*, int current); |
206 CORE_EXPORT int uncheckedNextOffset(const Node*, int current); | 206 CORE_EXPORT int uncheckedNextOffset(const Node*, int current); |
207 | 207 |
208 // comparision functions on Position | 208 // comparision functions on Position |
209 | 209 |
210 // |disconnected| is optional output parameter having true if specified | 210 // |disconnected| is optional output parameter having true if specified |
211 // positions don't have common ancestor. | 211 // positions don't have common ancestor. |
212 int comparePositionsInDOMTree(Node* containerA, int offsetA, Node* containerB, i
nt offsetB, bool* disconnected = nullptr); | 212 int comparePositionsInDOMTree(Node* containerA, int offsetA, Node* containerB, i
nt offsetB, bool* disconnected = nullptr); |
213 int comparePositionsInComposedTree(Node* containerA, int offsetA, Node* containe
rB, int offsetB, bool* disconnected = nullptr); | 213 int comparePositionsInFlatTree(Node* containerA, int offsetA, Node* containerB,
int offsetB, bool* disconnected = nullptr); |
214 int comparePositions(const Position&, const Position&); | 214 int comparePositions(const Position&, const Position&); |
215 int comparePositions(const PositionWithAffinity&, const PositionWithAffinity&); | 215 int comparePositions(const PositionWithAffinity&, const PositionWithAffinity&); |
216 | 216 |
217 // boolean functions on Position | 217 // boolean functions on Position |
218 | 218 |
219 enum EUpdateStyle { UpdateStyle, DoNotUpdateStyle }; | 219 enum EUpdateStyle { UpdateStyle, DoNotUpdateStyle }; |
220 // FIXME: Both isEditablePosition and isRichlyEditablePosition rely on up-to-dat
e | 220 // FIXME: Both isEditablePosition and isRichlyEditablePosition rely on up-to-dat
e |
221 // style to give proper results. They shouldn't update style by default, but | 221 // style to give proper results. They shouldn't update style by default, but |
222 // should make it clear that that is the contract. | 222 // should make it clear that that is the contract. |
223 // FIXME: isRichlyEditablePosition should also take EUpdateStyle. | 223 // FIXME: isRichlyEditablePosition should also take EUpdateStyle. |
224 CORE_EXPORT bool isEditablePosition(const Position&, EditableType = ContentIsEdi
table, EUpdateStyle = UpdateStyle); | 224 CORE_EXPORT bool isEditablePosition(const Position&, EditableType = ContentIsEdi
table, EUpdateStyle = UpdateStyle); |
225 bool isEditablePosition(const PositionInComposedTree&, EditableType = ContentIsE
ditable, EUpdateStyle = UpdateStyle); | 225 bool isEditablePosition(const PositionInFlatTree&, EditableType = ContentIsEdita
ble, EUpdateStyle = UpdateStyle); |
226 bool isRichlyEditablePosition(const Position&, EditableType = ContentIsEditable)
; | 226 bool isRichlyEditablePosition(const Position&, EditableType = ContentIsEditable)
; |
227 bool lineBreakExistsAtPosition(const Position&); | 227 bool lineBreakExistsAtPosition(const Position&); |
228 bool isAtUnsplittableElement(const Position&); | 228 bool isAtUnsplittableElement(const Position&); |
229 | 229 |
230 // miscellaneous functions on Position | 230 // miscellaneous functions on Position |
231 | 231 |
232 enum WhitespacePositionOption { NotConsiderNonCollapsibleWhitespace, ConsiderNon
CollapsibleWhitespace }; | 232 enum WhitespacePositionOption { NotConsiderNonCollapsibleWhitespace, ConsiderNon
CollapsibleWhitespace }; |
233 Position leadingWhitespacePosition(const Position&, TextAffinity, WhitespacePosi
tionOption = NotConsiderNonCollapsibleWhitespace); | 233 Position leadingWhitespacePosition(const Position&, TextAffinity, WhitespacePosi
tionOption = NotConsiderNonCollapsibleWhitespace); |
234 Position trailingWhitespacePosition(const Position&, TextAffinity, WhitespacePos
itionOption = NotConsiderNonCollapsibleWhitespace); | 234 Position trailingWhitespacePosition(const Position&, TextAffinity, WhitespacePos
itionOption = NotConsiderNonCollapsibleWhitespace); |
235 unsigned numEnclosingMailBlockquotes(const Position&); | 235 unsigned numEnclosingMailBlockquotes(const Position&); |
236 void updatePositionForNodeRemoval(Position&, Node&); | 236 void updatePositionForNodeRemoval(Position&, Node&); |
237 | 237 |
238 // ------------------------------------------------------------------------- | 238 // ------------------------------------------------------------------------- |
239 // VisiblePosition | 239 // VisiblePosition |
240 // ------------------------------------------------------------------------- | 240 // ------------------------------------------------------------------------- |
241 | 241 |
242 // Functions returning VisiblePosition | 242 // Functions returning VisiblePosition |
243 | 243 |
244 // TODO(yosin) We should rename | 244 // TODO(yosin) We should rename |
245 // |firstEditableVisiblePositionAfterPositionInRoot()| to a better name which | 245 // |firstEditableVisiblePositionAfterPositionInRoot()| to a better name which |
246 // describes what this function returns, since it returns a position before | 246 // describes what this function returns, since it returns a position before |
247 // specified position due by canonicalization. | 247 // specified position due by canonicalization. |
248 CORE_EXPORT VisiblePosition firstEditableVisiblePositionAfterPositionInRoot(cons
t Position&, ContainerNode&); | 248 CORE_EXPORT VisiblePosition firstEditableVisiblePositionAfterPositionInRoot(cons
t Position&, ContainerNode&); |
249 CORE_EXPORT VisiblePositionInComposedTree firstEditableVisiblePositionAfterPosit
ionInRoot(const PositionInComposedTree&, ContainerNode&); | 249 CORE_EXPORT VisiblePositionInFlatTree firstEditableVisiblePositionAfterPositionI
nRoot(const PositionInFlatTree&, ContainerNode&); |
250 // TODO(yosin) We should rename | 250 // TODO(yosin) We should rename |
251 // |lastEditableVisiblePositionBeforePositionInRoot()| to a better name which | 251 // |lastEditableVisiblePositionBeforePositionInRoot()| to a better name which |
252 // describes what this function returns, since it returns a position after | 252 // describes what this function returns, since it returns a position after |
253 // specified position due by canonicalization. | 253 // specified position due by canonicalization. |
254 CORE_EXPORT VisiblePosition lastEditableVisiblePositionBeforePositionInRoot(cons
t Position&, ContainerNode&); | 254 CORE_EXPORT VisiblePosition lastEditableVisiblePositionBeforePositionInRoot(cons
t Position&, ContainerNode&); |
255 CORE_EXPORT VisiblePositionInComposedTree lastEditableVisiblePositionBeforePosit
ionInRoot(const PositionInComposedTree&, ContainerNode&); | 255 CORE_EXPORT VisiblePositionInFlatTree lastEditableVisiblePositionBeforePositionI
nRoot(const PositionInFlatTree&, ContainerNode&); |
256 VisiblePosition visiblePositionBeforeNode(Node&); | 256 VisiblePosition visiblePositionBeforeNode(Node&); |
257 VisiblePosition visiblePositionAfterNode(Node&); | 257 VisiblePosition visiblePositionAfterNode(Node&); |
258 | 258 |
259 bool lineBreakExistsAtVisiblePosition(const VisiblePosition&); | 259 bool lineBreakExistsAtVisiblePosition(const VisiblePosition&); |
260 | 260 |
261 int comparePositions(const VisiblePosition&, const VisiblePosition&); | 261 int comparePositions(const VisiblePosition&, const VisiblePosition&); |
262 | 262 |
263 int indexForVisiblePosition(const VisiblePosition&, RefPtrWillBeRawPtr<Container
Node>& scope); | 263 int indexForVisiblePosition(const VisiblePosition&, RefPtrWillBeRawPtr<Container
Node>& scope); |
264 EphemeralRange makeRange(const VisiblePosition&, const VisiblePosition&); | 264 EphemeralRange makeRange(const VisiblePosition&, const VisiblePosition&); |
265 EphemeralRange normalizeRange(const EphemeralRange&); | 265 EphemeralRange normalizeRange(const EphemeralRange&); |
266 EphemeralRangeInComposedTree normalizeRange(const EphemeralRangeInComposedTree&)
; | 266 EphemeralRangeInFlatTree normalizeRange(const EphemeralRangeInFlatTree&); |
267 VisiblePosition visiblePositionForIndex(int index, ContainerNode* scope); | 267 VisiblePosition visiblePositionForIndex(int index, ContainerNode* scope); |
268 | 268 |
269 // ------------------------------------------------------------------------- | 269 // ------------------------------------------------------------------------- |
270 // HTMLElement | 270 // HTMLElement |
271 // ------------------------------------------------------------------------- | 271 // ------------------------------------------------------------------------- |
272 | 272 |
273 // Functions returning HTMLElement | 273 // Functions returning HTMLElement |
274 | 274 |
275 PassRefPtrWillBeRawPtr<HTMLElement> createDefaultParagraphElement(Document&); | 275 PassRefPtrWillBeRawPtr<HTMLElement> createDefaultParagraphElement(Document&); |
276 PassRefPtrWillBeRawPtr<HTMLElement> createHTMLElement(Document&, const Qualified
Name&); | 276 PassRefPtrWillBeRawPtr<HTMLElement> createHTMLElement(Document&, const Qualified
Name&); |
277 | 277 |
278 HTMLElement* enclosingList(Node*); | 278 HTMLElement* enclosingList(Node*); |
279 HTMLElement* outermostEnclosingList(Node*, HTMLElement* rootList = nullptr); | 279 HTMLElement* outermostEnclosingList(Node*, HTMLElement* rootList = nullptr); |
280 Node* enclosingListChild(Node*); | 280 Node* enclosingListChild(Node*); |
281 | 281 |
282 // ------------------------------------------------------------------------- | 282 // ------------------------------------------------------------------------- |
283 // Element | 283 // Element |
284 // ------------------------------------------------------------------------- | 284 // ------------------------------------------------------------------------- |
285 | 285 |
286 // Functions returning Element | 286 // Functions returning Element |
287 | 287 |
288 PassRefPtrWillBeRawPtr<HTMLSpanElement> createTabSpanElement(Document&); | 288 PassRefPtrWillBeRawPtr<HTMLSpanElement> createTabSpanElement(Document&); |
289 PassRefPtrWillBeRawPtr<HTMLSpanElement> createTabSpanElement(Document&, const St
ring& tabText); | 289 PassRefPtrWillBeRawPtr<HTMLSpanElement> createTabSpanElement(Document&, const St
ring& tabText); |
290 | 290 |
291 Element* rootEditableElementOf(const Position&, EditableType = ContentIsEditable
); | 291 Element* rootEditableElementOf(const Position&, EditableType = ContentIsEditable
); |
292 Element* rootEditableElementOf(const PositionInComposedTree&, EditableType = Con
tentIsEditable); | 292 Element* rootEditableElementOf(const PositionInFlatTree&, EditableType = Content
IsEditable); |
293 Element* rootEditableElementOf(const VisiblePosition&); | 293 Element* rootEditableElementOf(const VisiblePosition&); |
294 Element* unsplittableElementForPosition(const Position&); | 294 Element* unsplittableElementForPosition(const Position&); |
295 | 295 |
296 // Boolean functions on Element | 296 // Boolean functions on Element |
297 | 297 |
298 bool canMergeLists(Element* firstList, Element* secondList); | 298 bool canMergeLists(Element* firstList, Element* secondList); |
299 | 299 |
300 // ------------------------------------------------------------------------- | 300 // ------------------------------------------------------------------------- |
301 // VisibleSelection | 301 // VisibleSelection |
302 // ------------------------------------------------------------------------- | 302 // ------------------------------------------------------------------------- |
(...skipping 23 matching lines...) Expand all Loading... |
326 // FIXME: this is required until 6853027 is fixed and text checking can do t
his for us. | 326 // FIXME: this is required until 6853027 is fixed and text checking can do t
his for us. |
327 return character == '\'' || character == rightSingleQuotationMarkCharacter |
| character == hebrewPunctuationGershayimCharacter; | 327 return character == '\'' || character == rightSingleQuotationMarkCharacter |
| character == hebrewPunctuationGershayimCharacter; |
328 } | 328 } |
329 | 329 |
330 String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagrap
h, bool endIsEndOfParagraph); | 330 String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagrap
h, bool endIsEndOfParagraph); |
331 const String& nonBreakingSpaceString(); | 331 const String& nonBreakingSpaceString(); |
332 | 332 |
333 } // namespace blink | 333 } // namespace blink |
334 | 334 |
335 #endif | 335 #endif |
OLD | NEW |