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

Unified Diff: third_party/WebKit/Source/core/editing/EditingUtilities.h

Issue 1640293005: Add comments to blink::highestEditableRoot and blink::enclosingElementWithTag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/EditingUtilities.h
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilities.h b/third_party/WebKit/Source/core/editing/EditingUtilities.h
index 5c81446d00ef3a1091d69fbc71abc4b16940f187..c734a8d4cf946294c58d7979e9ef05e53c6f06f9 100644
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.h
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.h
@@ -63,6 +63,11 @@ class Range;
// Functions returning Node
+// highestEditableRoot returns the highest editable node. If the
+// rootEditableElement of the speicified Position is <body>, this returns the
+// <body>. Otherwise, this searches ancestors for the highest editable node in
+// defiance of editing boundaries. This returns a Document if designMode="on"
+// and the specified Position is not in the <body>.
CORE_EXPORT ContainerNode* highestEditableRoot(const Position&, EditableType = ContentIsEditable);
ContainerNode* highestEditableRoot(const PositionInComposedTree&, EditableType = ContentIsEditable);
@@ -79,6 +84,9 @@ Element* enclosingTableCell(const Position&);
Element* associatedElementOf(const Position&);
Node* enclosingEmptyListItem(const VisiblePosition&);
Element* enclosingAnchorElement(const Position&);
+// Returns the lowest ancestor with the specified QualifiedName. If the
+// specified Position is editable, this function returns an editable
+// Element. Otherwise, editability doesn't matter.
Element* enclosingElementWithTag(const Position&, const QualifiedName&);
CORE_EXPORT Node* enclosingNodeOfType(const Position&, bool (*nodeIsOfType)(const Node*), EditingBoundaryCrossingRule = CannotCrossEditingBoundary);
CORE_EXPORT Node* enclosingNodeOfType(const PositionInComposedTree&, bool (*nodeIsOfType)(const Node*), EditingBoundaryCrossingRule = CannotCrossEditingBoundary);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698