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

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

Issue 340713003: Ignore visibility when checking whether Position is editable or not at DeletetSelectionCommand (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« Source/core/editing/htmlediting.h ('K') | « 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 e9947e4542fa017dc1a98b96e6ba5f07410521b7..08bfe2a1988c0dd8de744ca79c74748dbf051a54 100644
--- a/Source/core/editing/htmlediting.cpp
+++ b/Source/core/editing/htmlediting.cpp
@@ -283,18 +283,18 @@ VisiblePosition firstEditablePositionAfterPositionInRoot(const Position& positio
return VisiblePosition(p);
}
-VisiblePosition lastEditablePositionBeforePositionInRoot(const Position& position, Node* highestRoot)
+Position lastEditablePositionBeforePositionInRoot(const Position& position, Node* highestRoot)
{
// When position falls after highestRoot, the result is easy to compute.
if (comparePositions(position, lastPositionInNode(highestRoot)) == 1)
- return VisiblePosition(lastPositionInNode(highestRoot));
+ return lastPositionInNode(highestRoot);
Position p = position;
if (position.deprecatedNode()->treeScope() != highestRoot->treeScope()) {
Node* shadowAncestor = highestRoot->treeScope().ancestorInThisScope(p.deprecatedNode());
if (!shadowAncestor)
- return VisiblePosition();
+ return Position();
p = firstPositionInOrBeforeNode(shadowAncestor);
}
@@ -303,9 +303,9 @@ VisiblePosition lastEditablePositionBeforePositionInRoot(const Position& positio
p = isAtomicNode(p.deprecatedNode()) ? positionInParentBeforeNode(*p.deprecatedNode()) : previousVisuallyDistinctCandidate(p);
if (p.deprecatedNode() && p.deprecatedNode() != highestRoot && !p.deprecatedNode()->isDescendantOf(highestRoot))
- return VisiblePosition();
+ return Position();
- return VisiblePosition(p);
+ return p;
Yuta Kitamura 2014/06/18 08:08:11 Let's stop using abbreviated names.
yosin_UTC9 2014/06/19 07:36:57 Done by http://crrev.com/342553008/
}
// FIXME: The method name, comment, and code say three different things here!
« Source/core/editing/htmlediting.h ('K') | « Source/core/editing/htmlediting.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698