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

Unified Diff: Source/core/editing/htmlediting.cpp

Issue 1203613003: Make inSameLine() in VisibleUnits.cpp to work with positions in composed tree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-06-24T17:52:54 Get rid of redundant explict in RenderedPosition Created 5 years, 6 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 | « Source/core/editing/htmlediting.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/htmlediting.cpp
diff --git a/Source/core/editing/htmlediting.cpp b/Source/core/editing/htmlediting.cpp
index cbaacdad8b11127f3a91d37028e28a4beeab6a5f..721a3afc75e61b9ac4dc4b994cbc2d844ae3aaa5 100644
--- a/Source/core/editing/htmlediting.cpp
+++ b/Source/core/editing/htmlediting.cpp
@@ -136,6 +136,11 @@ ContainerNode* highestEditableRoot(const Position& position, EditableType editab
return highestRoot;
}
+ContainerNode* highestEditableRoot(const PositionInComposedTree& position, EditableType editableType)
+{
+ return highestEditableRoot(toPositionInDOMTree(position), editableType);
+}
+
Element* lowestEditableAncestor(Node* node)
{
while (node) {
@@ -165,6 +170,11 @@ bool isEditablePosition(const Position& p, EditableType editableType, EUpdateSty
return node->hasEditableStyle(editableType);
}
+bool isEditablePosition(const PositionInComposedTree& p, EditableType editableType, EUpdateStyle updateStyle)
+{
+ return isEditablePosition(toPositionInDOMTree(p), editableType, updateStyle);
+}
+
bool isAtUnsplittableElement(const Position& pos)
{
Node* node = pos.deprecatedNode();
@@ -291,6 +301,11 @@ Position previousVisuallyDistinctCandidate(const Position& position)
return previousVisuallyDistinctCandidateAlgorithm<Position>(position);
}
+PositionInComposedTree previousVisuallyDistinctCandidate(const PositionInComposedTree& position)
+{
+ return previousVisuallyDistinctCandidateAlgorithm<PositionInComposedTree>(position);
+}
+
VisiblePosition firstEditableVisiblePositionAfterPositionInRoot(const Position& position, ContainerNode* highestRoot)
{
// position falls before highestRoot.
@@ -351,6 +366,11 @@ Position lastEditablePositionBeforePositionInRoot(const Position& position, Node
return lastEditablePositionBeforePositionInRootAlgorithm<Position>(position, highestRoot);
}
+PositionInComposedTree lastEditablePositionBeforePositionInRoot(const PositionInComposedTree& position, Node* highestRoot)
+{
+ return lastEditablePositionBeforePositionInRootAlgorithm<PositionInComposedTree>(position, highestRoot);
+}
+
// FIXME: The method name, comment, and code say three different things here!
// Whether or not content before and after this node will collapse onto the same line as it.
bool isBlock(const Node* node)
« no previous file with comments | « Source/core/editing/htmlediting.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698