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

Side by Side Diff: Source/core/editing/EditingUtilities.h

Issue 1320823002: Introduce Position version of enclsoingBlock() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-27T12:35:12 Created 5 years, 3 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 | « no previous file | Source/core/editing/EditingUtilities.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) 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 CORE_EXPORT ContainerNode* highestEditableRoot(const Position&, EditableType = C ontentIsEditable); 65 CORE_EXPORT ContainerNode* highestEditableRoot(const Position&, EditableType = C ontentIsEditable);
66 ContainerNode* highestEditableRoot(const PositionInComposedTree&, EditableType = ContentIsEditable); 66 ContainerNode* highestEditableRoot(const PositionInComposedTree&, EditableType = ContentIsEditable);
67 67
68 Node* highestEnclosingNodeOfType(const Position&, bool (*nodeIsOfType)(const Nod e*), 68 Node* highestEnclosingNodeOfType(const Position&, bool (*nodeIsOfType)(const Nod e*),
69 EditingBoundaryCrossingRule = CannotCrossEditingBoundary, Node* stayWithin = nullptr); 69 EditingBoundaryCrossingRule = CannotCrossEditingBoundary, Node* stayWithin = nullptr);
70 Node* highestNodeToRemoveInPruning(Node*, Node* excludeNode = nullptr); 70 Node* highestNodeToRemoveInPruning(Node*, Node* excludeNode = nullptr);
71 Element* lowestEditableAncestor(Node*); 71 Element* lowestEditableAncestor(Node*);
72 72
73 Element* enclosingBlock(Node*, EditingBoundaryCrossingRule = CannotCrossEditingB oundary); 73 Element* enclosingBlock(Node*, EditingBoundaryCrossingRule = CannotCrossEditingB oundary);
74 Element* enclosingBlock(const Position&, EditingBoundaryCrossingRule);
74 Element* enclosingBlockFlowElement(Node&); // Deprecated, use enclosingBlock ins tead. 75 Element* enclosingBlockFlowElement(Node&); // Deprecated, use enclosingBlock ins tead.
75 bool inSameContainingBlockFlowElement(Node*, Node*); 76 bool inSameContainingBlockFlowElement(Node*, Node*);
76 Element* enclosingTableCell(const Position&); 77 Element* enclosingTableCell(const Position&);
77 Element* associatedElementOf(const Position&); 78 Element* associatedElementOf(const Position&);
78 Node* enclosingEmptyListItem(const VisiblePosition&); 79 Node* enclosingEmptyListItem(const VisiblePosition&);
79 Element* enclosingAnchorElement(const Position&); 80 Element* enclosingAnchorElement(const Position&);
80 Element* enclosingElementWithTag(const Position&, const QualifiedName&); 81 Element* enclosingElementWithTag(const Position&, const QualifiedName&);
81 CORE_EXPORT Node* enclosingNodeOfType(const Position&, bool (*nodeIsOfType)(cons t Node*), EditingBoundaryCrossingRule = CannotCrossEditingBoundary); 82 CORE_EXPORT Node* enclosingNodeOfType(const Position&, bool (*nodeIsOfType)(cons t Node*), EditingBoundaryCrossingRule = CannotCrossEditingBoundary);
82 CORE_EXPORT Node* enclosingNodeOfType(const PositionInComposedTree&, bool (*node IsOfType)(const Node*), EditingBoundaryCrossingRule = CannotCrossEditingBoundary ); 83 CORE_EXPORT Node* enclosingNodeOfType(const PositionInComposedTree&, bool (*node IsOfType)(const Node*), EditingBoundaryCrossingRule = CannotCrossEditingBoundary );
83 84
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 // FIXME: this is required until 6853027 is fixed and text checking can do t his for us. 309 // FIXME: this is required until 6853027 is fixed and text checking can do t his for us.
309 return character == '\'' || character == rightSingleQuotationMarkCharacter | | character == hebrewPunctuationGershayimCharacter; 310 return character == '\'' || character == rightSingleQuotationMarkCharacter | | character == hebrewPunctuationGershayimCharacter;
310 } 311 }
311 312
312 String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagrap h, bool endIsEndOfParagraph); 313 String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagrap h, bool endIsEndOfParagraph);
313 const String& nonBreakingSpaceString(); 314 const String& nonBreakingSpaceString();
314 315
315 } 316 }
316 317
317 #endif 318 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/EditingUtilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698