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

Side by Side Diff: third_party/WebKit/Source/core/editing/EditingUtilities.cpp

Issue 1878473002: ASSERT -> DCHECK in core/editing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation. Created 4 years, 8 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, 2005, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // Atomic means that the node has no children, or has children which are ignored for the 80 // Atomic means that the node has no children, or has children which are ignored for the
81 // purposes of editing. 81 // purposes of editing.
82 bool isAtomicNode(const Node *node) 82 bool isAtomicNode(const Node *node)
83 { 83 {
84 return node && (!node->hasChildren() || editingIgnoresContent(node)); 84 return node && (!node->hasChildren() || editingIgnoresContent(node));
85 } 85 }
86 86
87 template <typename Traversal> 87 template <typename Traversal>
88 static int comparePositions(Node* containerA, int offsetA, Node* containerB, int offsetB, bool* disconnected) 88 static int comparePositions(Node* containerA, int offsetA, Node* containerB, int offsetB, bool* disconnected)
89 { 89 {
90 ASSERT(containerA); 90 DCHECK(containerA);
91 ASSERT(containerB); 91 DCHECK(containerB);
92 92
93 if (disconnected) 93 if (disconnected)
94 *disconnected = false; 94 *disconnected = false;
95 95
96 if (!containerA) 96 if (!containerA)
97 return -1; 97 return -1;
98 if (!containerB) 98 if (!containerB)
99 return 1; 99 return 1;
100 100
101 // see DOM2 traversal & range section 2.5 101 // see DOM2 traversal & range section 2.5
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 186
187 int comparePositionsInFlatTree(Node* containerA, int offsetA, Node* containerB, int offsetB, bool* disconnected) 187 int comparePositionsInFlatTree(Node* containerA, int offsetA, Node* containerB, int offsetB, bool* disconnected)
188 { 188 {
189 return comparePositions<FlatTreeTraversal>(containerA, offsetA, containerB, offsetB, disconnected); 189 return comparePositions<FlatTreeTraversal>(containerA, offsetA, containerB, offsetB, disconnected);
190 } 190 }
191 191
192 // Compare two positions, taking into account the possibility that one or both 192 // Compare two positions, taking into account the possibility that one or both
193 // could be inside a shadow tree. Only works for non-null values. 193 // could be inside a shadow tree. Only works for non-null values.
194 int comparePositions(const Position& a, const Position& b) 194 int comparePositions(const Position& a, const Position& b)
195 { 195 {
196 ASSERT(a.isNotNull()); 196 DCHECK(a.isNotNull());
197 ASSERT(b.isNotNull()); 197 DCHECK(b.isNotNull());
198 const TreeScope* commonScope = Position::commonAncestorTreeScope(a, b); 198 const TreeScope* commonScope = Position::commonAncestorTreeScope(a, b);
199 199
200 ASSERT(commonScope); 200 DCHECK(commonScope);
201 if (!commonScope) 201 if (!commonScope)
202 return 0; 202 return 0;
203 203
204 Node* nodeA = commonScope->ancestorInThisScope(a.computeContainerNode()); 204 Node* nodeA = commonScope->ancestorInThisScope(a.computeContainerNode());
205 ASSERT(nodeA); 205 DCHECK(nodeA);
206 bool hasDescendentA = nodeA != a.computeContainerNode(); 206 bool hasDescendentA = nodeA != a.computeContainerNode();
207 int offsetA = hasDescendentA ? 0 : a.computeOffsetInContainerNode(); 207 int offsetA = hasDescendentA ? 0 : a.computeOffsetInContainerNode();
208 208
209 Node* nodeB = commonScope->ancestorInThisScope(b.computeContainerNode()); 209 Node* nodeB = commonScope->ancestorInThisScope(b.computeContainerNode());
210 ASSERT(nodeB); 210 DCHECK(nodeB);
211 bool hasDescendentB = nodeB != b.computeContainerNode(); 211 bool hasDescendentB = nodeB != b.computeContainerNode();
212 int offsetB = hasDescendentB ? 0 : b.computeOffsetInContainerNode(); 212 int offsetB = hasDescendentB ? 0 : b.computeOffsetInContainerNode();
213 213
214 int bias = 0; 214 int bias = 0;
215 if (nodeA == nodeB) { 215 if (nodeA == nodeB) {
216 if (hasDescendentA) 216 if (hasDescendentA)
217 bias = -1; 217 bias = -1;
218 else if (hasDescendentB) 218 else if (hasDescendentB)
219 bias = 1; 219 bias = 1;
220 } 220 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 } 263 }
264 264
265 bool isEditablePosition(const Position& p, EditableType editableType, EUpdateSty le updateStyle) 265 bool isEditablePosition(const Position& p, EditableType editableType, EUpdateSty le updateStyle)
266 { 266 {
267 Node* node = p.parentAnchoredEquivalent().anchorNode(); 267 Node* node = p.parentAnchoredEquivalent().anchorNode();
268 if (!node) 268 if (!node)
269 return false; 269 return false;
270 if (updateStyle == UpdateStyle) 270 if (updateStyle == UpdateStyle)
271 node->document().updateLayoutIgnorePendingStylesheets(); 271 node->document().updateLayoutIgnorePendingStylesheets();
272 else 272 else
273 ASSERT(updateStyle == DoNotUpdateStyle); 273 DCHECK_EQ(updateStyle, DoNotUpdateStyle);
274 274
275 if (isDisplayInsideTable(node)) 275 if (isDisplayInsideTable(node))
276 node = node->parentNode(); 276 node = node->parentNode();
277 277
278 if (node->isDocumentNode()) 278 if (node->isDocumentNode())
279 return false; 279 return false;
280 return node->hasEditableStyle(editableType); 280 return node->hasEditableStyle(editableType);
281 } 281 }
282 282
283 bool isEditablePosition(const PositionInFlatTree& p, EditableType editableType, EUpdateStyle updateStyle) 283 bool isEditablePosition(const PositionInFlatTree& p, EditableType editableType, EUpdateStyle updateStyle)
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 } 672 }
673 673
674 PositionInFlatTree previousPositionOf(const PositionInFlatTree& position, Positi onMoveType moveType) 674 PositionInFlatTree previousPositionOf(const PositionInFlatTree& position, Positi onMoveType moveType)
675 { 675 {
676 return previousPositionOfAlgorithm<EditingInFlatTreeStrategy>(position, move Type); 676 return previousPositionOfAlgorithm<EditingInFlatTreeStrategy>(position, move Type);
677 } 677 }
678 678
679 template <typename Strategy> 679 template <typename Strategy>
680 PositionTemplate<Strategy> nextPositionOfAlgorithm(const PositionTemplate<Strate gy>& position, PositionMoveType moveType) 680 PositionTemplate<Strategy> nextPositionOfAlgorithm(const PositionTemplate<Strate gy>& position, PositionMoveType moveType)
681 { 681 {
682 ASSERT(moveType != PositionMoveType::BackwardDeletion); 682 DCHECK(moveType == PositionMoveType::BackwardDeletion);
683 683
684 Node* node = position.anchorNode(); 684 Node* node = position.anchorNode();
685 if (!node) 685 if (!node)
686 return position; 686 return position;
687 687
688 const int offset = position.computeEditingOffset(); 688 const int offset = position.computeEditingOffset();
689 689
690 if (Node* child = Strategy::childAt(*node, offset)) 690 if (Node* child = Strategy::childAt(*node, offset))
691 return PositionTemplate<Strategy>::firstPositionInOrBeforeNode(child); 691 return PositionTemplate<Strategy>::firstPositionInOrBeforeNode(child);
692 692
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 836
837 if (previousCharacterWasSpace || (!i && startIsStartOfParagraph) || (i + 1 == length && endIsEndOfParagraph)) { 837 if (previousCharacterWasSpace || (!i && startIsStartOfParagraph) || (i + 1 == length && endIsEndOfParagraph)) {
838 rebalancedString.append(noBreakSpaceCharacter); 838 rebalancedString.append(noBreakSpaceCharacter);
839 previousCharacterWasSpace = false; 839 previousCharacterWasSpace = false;
840 } else { 840 } else {
841 rebalancedString.append(' '); 841 rebalancedString.append(' ');
842 previousCharacterWasSpace = true; 842 previousCharacterWasSpace = true;
843 } 843 }
844 } 844 }
845 845
846 ASSERT(rebalancedString.length() == length); 846 DCHECK_EQ(rebalancedString.length(), length);
847 847
848 return rebalancedString.toString(); 848 return rebalancedString.toString();
849 } 849 }
850 850
851 bool isTableStructureNode(const Node *node) 851 bool isTableStructureNode(const Node *node)
852 { 852 {
853 LayoutObject* layoutObject = node->layoutObject(); 853 LayoutObject* layoutObject = node->layoutObject();
854 return (layoutObject && (layoutObject->isTableCell() || layoutObject->isTabl eRow() || layoutObject->isTableSection() || layoutObject->isLayoutTableCol())); 854 return (layoutObject && (layoutObject->isTableCell() || layoutObject->isTabl eRow() || layoutObject->isTableSection() || layoutObject->isLayoutTableCol()));
855 } 855 }
856 856
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 node = nextNodeConsideringAtomicNodes(*node); 1016 node = nextNodeConsideringAtomicNodes(*node);
1017 } 1017 }
1018 return nullptr; 1018 return nullptr;
1019 } 1019 }
1020 1020
1021 // Returns the visible position at the beginning of a node 1021 // Returns the visible position at the beginning of a node
1022 VisiblePosition visiblePositionBeforeNode(Node& node) 1022 VisiblePosition visiblePositionBeforeNode(Node& node)
1023 { 1023 {
1024 if (node.hasChildren()) 1024 if (node.hasChildren())
1025 return createVisiblePosition(firstPositionInOrBeforeNode(&node)); 1025 return createVisiblePosition(firstPositionInOrBeforeNode(&node));
1026 ASSERT(node.parentNode()); 1026 DCHECK(node.parentNode());
1027 ASSERT(!node.parentNode()->isShadowRoot()); 1027 DCHECK(!node.parentNode()->isShadowRoot());
1028 return createVisiblePosition(positionInParentBeforeNode(node)); 1028 return createVisiblePosition(positionInParentBeforeNode(node));
1029 } 1029 }
1030 1030
1031 // Returns the visible position at the ending of a node 1031 // Returns the visible position at the ending of a node
1032 VisiblePosition visiblePositionAfterNode(Node& node) 1032 VisiblePosition visiblePositionAfterNode(Node& node)
1033 { 1033 {
1034 if (node.hasChildren()) 1034 if (node.hasChildren())
1035 return createVisiblePosition(lastPositionInOrAfterNode(&node)); 1035 return createVisiblePosition(lastPositionInOrAfterNode(&node));
1036 ASSERT(node.parentNode()); 1036 DCHECK(node.parentNode());
1037 ASSERT(!node.parentNode()->isShadowRoot()); 1037 DCHECK(!node.parentNode()->isShadowRoot());
1038 return createVisiblePosition(positionInParentAfterNode(node)); 1038 return createVisiblePosition(positionInParentAfterNode(node));
1039 } 1039 }
1040 1040
1041 bool isHTMLListElement(Node* n) 1041 bool isHTMLListElement(Node* n)
1042 { 1042 {
1043 return (n && (isHTMLUListElement(*n) || isHTMLOListElement(*n) || isHTMLDLis tElement(*n))); 1043 return (n && (isHTMLUListElement(*n) || isHTMLOListElement(*n) || isHTMLDLis tElement(*n)));
1044 } 1044 }
1045 1045
1046 bool isListItem(const Node* n) 1046 bool isListItem(const Node* n)
1047 { 1047 {
(...skipping 25 matching lines...) Expand all
1073 return 0; 1073 return 0;
1074 } 1074 }
1075 1075
1076 return 0; 1076 return 0;
1077 } 1077 }
1078 1078
1079 template <typename Strategy> 1079 template <typename Strategy>
1080 static Node* enclosingNodeOfTypeAlgorithm(const PositionTemplate<Strategy>& p, b ool (*nodeIsOfType)(const Node*), EditingBoundaryCrossingRule rule) 1080 static Node* enclosingNodeOfTypeAlgorithm(const PositionTemplate<Strategy>& p, b ool (*nodeIsOfType)(const Node*), EditingBoundaryCrossingRule rule)
1081 { 1081 {
1082 // TODO(yosin) support CanSkipCrossEditingBoundary 1082 // TODO(yosin) support CanSkipCrossEditingBoundary
1083 ASSERT(rule == CanCrossEditingBoundary || rule == CannotCrossEditingBoundary ); 1083 DCHECK(rule == CanCrossEditingBoundary || rule == CannotCrossEditingBoundary );
1084 if (p.isNull()) 1084 if (p.isNull())
1085 return nullptr; 1085 return nullptr;
1086 1086
1087 ContainerNode* const root = rule == CannotCrossEditingBoundary ? highestEdit ableRoot(p) : nullptr; 1087 ContainerNode* const root = rule == CannotCrossEditingBoundary ? highestEdit ableRoot(p) : nullptr;
1088 for (Node* n = p.anchorNode(); n; n = Strategy::parent(*n)) { 1088 for (Node* n = p.anchorNode(); n; n = Strategy::parent(*n)) {
1089 // Don't return a non-editable node if the input position was editable, since 1089 // Don't return a non-editable node if the input position was editable, since
1090 // the callers from editing will no doubt want to perform editing inside the returned node. 1090 // the callers from editing will no doubt want to perform editing inside the returned node.
1091 if (root && !n->hasEditableStyle()) 1091 if (root && !n->hasEditableStyle())
1092 continue; 1092 continue;
1093 if (nodeIsOfType(n)) 1093 if (nodeIsOfType(n))
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 { 1261 {
1262 if (!node || !node->isElementNode()) 1262 if (!node || !node->isElementNode())
1263 return false; 1263 return false;
1264 1264
1265 LayoutObject* layoutObject = node->layoutObject(); 1265 LayoutObject* layoutObject = node->layoutObject();
1266 return (layoutObject && layoutObject->isTable()); 1266 return (layoutObject && layoutObject->isTable());
1267 } 1267 }
1268 1268
1269 bool isTableCell(const Node* node) 1269 bool isTableCell(const Node* node)
1270 { 1270 {
1271 ASSERT(node); 1271 DCHECK(node);
1272 LayoutObject* r = node->layoutObject(); 1272 LayoutObject* r = node->layoutObject();
1273 return r ? r->isTableCell() : isHTMLTableCellElement(*node); 1273 return r ? r->isTableCell() : isHTMLTableCellElement(*node);
1274 } 1274 }
1275 1275
1276 bool isEmptyTableCell(const Node* node) 1276 bool isEmptyTableCell(const Node* node)
1277 { 1277 {
1278 // Returns true IFF the passed in node is one of: 1278 // Returns true IFF the passed in node is one of:
1279 // .) a table cell with no children, 1279 // .) a table cell with no children,
1280 // .) a table cell with a single BR child, and which has no other child la youtObject, including :before and :after layoutObject 1280 // .) a table cell with a single BR child, and which has no other child la youtObject, including :before and :after layoutObject
1281 // .) the BR child of such a table cell 1281 // .) the BR child of such a table cell
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 return currentPos; 1407 return currentPos;
1408 } 1408 }
1409 } 1409 }
1410 1410
1411 return position; 1411 return position;
1412 } 1412 }
1413 1413
1414 // This assumes that it starts in editable content. 1414 // This assumes that it starts in editable content.
1415 Position leadingWhitespacePosition(const Position& position, TextAffinity affini ty, WhitespacePositionOption option) 1415 Position leadingWhitespacePosition(const Position& position, TextAffinity affini ty, WhitespacePositionOption option)
1416 { 1416 {
1417 ASSERT(isEditablePosition(position, ContentIsEditable, DoNotUpdateStyle)); 1417 DCHECK(isEditablePosition(position, ContentIsEditable, DoNotUpdateStyle));
1418 if (position.isNull()) 1418 if (position.isNull())
1419 return Position(); 1419 return Position();
1420 1420
1421 if (isHTMLBRElement(*mostBackwardCaretPosition(position).anchorNode())) 1421 if (isHTMLBRElement(*mostBackwardCaretPosition(position).anchorNode()))
1422 return Position(); 1422 return Position();
1423 1423
1424 const Position& prev = previousCharacterPosition(position, affinity); 1424 const Position& prev = previousCharacterPosition(position, affinity);
1425 if (prev == position) 1425 if (prev == position)
1426 return Position(); 1426 return Position();
1427 const Node* const anchorNode = prev.anchorNode(); 1427 const Node* const anchorNode = prev.anchorNode();
1428 if (!anchorNode || !anchorNode->isTextNode()) 1428 if (!anchorNode || !anchorNode->isTextNode())
1429 return Position(); 1429 return Position();
1430 if (enclosingBlockFlowElement(*anchorNode) != enclosingBlockFlowElement(*pos ition.anchorNode())) 1430 if (enclosingBlockFlowElement(*anchorNode) != enclosingBlockFlowElement(*pos ition.anchorNode()))
1431 return Position(); 1431 return Position();
1432 if (option == NotConsiderNonCollapsibleWhitespace && anchorNode->layoutObjec t() && !anchorNode->layoutObject()->style()->collapseWhiteSpace()) 1432 if (option == NotConsiderNonCollapsibleWhitespace && anchorNode->layoutObjec t() && !anchorNode->layoutObject()->style()->collapseWhiteSpace())
1433 return Position(); 1433 return Position();
1434 const String& string = toText(anchorNode)->data(); 1434 const String& string = toText(anchorNode)->data();
1435 const UChar previousCharacter = string[prev.computeOffsetInContainerNode()]; 1435 const UChar previousCharacter = string[prev.computeOffsetInContainerNode()];
1436 const bool isSpace = option == ConsiderNonCollapsibleWhitespace ? (isSpaceOr Newline(previousCharacter) || previousCharacter == noBreakSpaceCharacter) : isCo llapsibleWhitespace(previousCharacter); 1436 const bool isSpace = option == ConsiderNonCollapsibleWhitespace ? (isSpaceOr Newline(previousCharacter) || previousCharacter == noBreakSpaceCharacter) : isCo llapsibleWhitespace(previousCharacter);
1437 if (!isSpace || !isEditablePosition(prev)) 1437 if (!isSpace || !isEditablePosition(prev))
1438 return Position(); 1438 return Position();
1439 return prev; 1439 return prev;
1440 } 1440 }
1441 1441
1442 // This assumes that it starts in editable content. 1442 // This assumes that it starts in editable content.
1443 Position trailingWhitespacePosition(const Position& position, TextAffinity, Whit espacePositionOption option) 1443 Position trailingWhitespacePosition(const Position& position, TextAffinity, Whit espacePositionOption option)
1444 { 1444 {
1445 ASSERT(isEditablePosition(position, ContentIsEditable, DoNotUpdateStyle)); 1445 DCHECK(isEditablePosition(position, ContentIsEditable, DoNotUpdateStyle));
1446 if (position.isNull()) 1446 if (position.isNull())
1447 return Position(); 1447 return Position();
1448 1448
1449 VisiblePosition visiblePosition = createVisiblePosition(position); 1449 VisiblePosition visiblePosition = createVisiblePosition(position);
1450 UChar characterAfterVisiblePosition = characterAfter(visiblePosition); 1450 UChar characterAfterVisiblePosition = characterAfter(visiblePosition);
1451 bool isSpace = option == ConsiderNonCollapsibleWhitespace ? (isSpaceOrNewlin e(characterAfterVisiblePosition) || characterAfterVisiblePosition == noBreakSpac eCharacter) : isCollapsibleWhitespace(characterAfterVisiblePosition); 1451 bool isSpace = option == ConsiderNonCollapsibleWhitespace ? (isSpaceOrNewlin e(characterAfterVisiblePosition) || characterAfterVisiblePosition == noBreakSpac eCharacter) : isCollapsibleWhitespace(characterAfterVisiblePosition);
1452 // The space must not be in another paragraph and it must be editable. 1452 // The space must not be in another paragraph and it must be editable.
1453 if (isSpace && !isEndOfParagraph(visiblePosition) && nextPositionOf(visibleP osition, CannotCrossEditingBoundary).isNotNull()) 1453 if (isSpace && !isEndOfParagraph(visiblePosition) && nextPositionOf(visibleP osition, CannotCrossEditingBoundary).isNotNull())
1454 return position; 1454 return position;
1455 return Position(); 1455 return Position();
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 Position e = end.deepEquivalent().parentAnchoredEquivalent(); 1592 Position e = end.deepEquivalent().parentAnchoredEquivalent();
1593 if (s.isNull() || e.isNull()) 1593 if (s.isNull() || e.isNull())
1594 return EphemeralRange(); 1594 return EphemeralRange();
1595 1595
1596 return EphemeralRange(s, e); 1596 return EphemeralRange(s, e);
1597 } 1597 }
1598 1598
1599 template <typename Strategy> 1599 template <typename Strategy>
1600 static EphemeralRangeTemplate<Strategy> normalizeRangeAlgorithm(const EphemeralR angeTemplate<Strategy>& range) 1600 static EphemeralRangeTemplate<Strategy> normalizeRangeAlgorithm(const EphemeralR angeTemplate<Strategy>& range)
1601 { 1601 {
1602 ASSERT(range.isNotNull()); 1602 DCHECK(range.isNotNull());
1603 range.document().updateLayoutIgnorePendingStylesheets(); 1603 range.document().updateLayoutIgnorePendingStylesheets();
1604 1604
1605 // TODO(yosin) We should not call |parentAnchoredEquivalent()|, it is 1605 // TODO(yosin) We should not call |parentAnchoredEquivalent()|, it is
1606 // redundant. 1606 // redundant.
1607 const PositionTemplate<Strategy> normalizedStart = mostForwardCaretPosition( range.startPosition()).parentAnchoredEquivalent(); 1607 const PositionTemplate<Strategy> normalizedStart = mostForwardCaretPosition( range.startPosition()).parentAnchoredEquivalent();
1608 const PositionTemplate<Strategy> normalizedEnd = mostBackwardCaretPosition(r ange.endPosition()).parentAnchoredEquivalent(); 1608 const PositionTemplate<Strategy> normalizedEnd = mostBackwardCaretPosition(r ange.endPosition()).parentAnchoredEquivalent();
1609 // The order of the positions of |start| and |end| can be swapped after 1609 // The order of the positions of |start| and |end| can be swapped after
1610 // upstream/downstream. e.g. editing/pasteboard/copy-display-none.html 1610 // upstream/downstream. e.g. editing/pasteboard/copy-display-none.html
1611 if (normalizedStart.compareTo(normalizedEnd) > 0) 1611 if (normalizedStart.compareTo(normalizedEnd) > 0)
1612 return EphemeralRangeTemplate<Strategy>(normalizedEnd, normalizedStart); 1612 return EphemeralRangeTemplate<Strategy>(normalizedEnd, normalizedStart);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1727 // instead of possibly at the end of the last node before the selection 1727 // instead of possibly at the end of the last node before the selection
1728 return mostForwardCaretPosition(visiblePosition.deepEquivalent()); 1728 return mostForwardCaretPosition(visiblePosition.deepEquivalent());
1729 } 1729 }
1730 1730
1731 bool isTextSecurityNode(const Node* node) 1731 bool isTextSecurityNode(const Node* node)
1732 { 1732 {
1733 return node && node->layoutObject() && node->layoutObject()->style()->textSe curity() != TSNONE; 1733 return node && node->layoutObject() && node->layoutObject()->style()->textSe curity() != TSNONE;
1734 } 1734 }
1735 1735
1736 } // namespace blink 1736 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698