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

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

Issue 420603002: Use tighter typing in editing/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 5 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/VisibleSelection.cpp ('k') | Source/core/editing/htmlediting.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/VisibleUnits.cpp
diff --git a/Source/core/editing/VisibleUnits.cpp b/Source/core/editing/VisibleUnits.cpp
index c699c4207808deb9b199ef0769f859db4e06b06b..c11b6d583a19d60052c6d25b19a9247fd95e819f 100644
--- a/Source/core/editing/VisibleUnits.cpp
+++ b/Source/core/editing/VisibleUnits.cpp
@@ -81,7 +81,7 @@ static Node* nextLeafWithSameEditability(Node* node, EditableType editableType =
// FIXME: consolidate with code in previousLinePosition.
static Position previousRootInlineBoxCandidatePosition(Node* node, const VisiblePosition& visiblePosition, EditableType editableType)
{
- Node* highestRoot = highestEditableRoot(visiblePosition.deepEquivalent(), editableType);
+ ContainerNode* highestRoot = highestEditableRoot(visiblePosition.deepEquivalent(), editableType);
Node* previousNode = previousLeafWithSameEditability(node, editableType);
while (previousNode && (!previousNode->renderer() || inSameLine(VisiblePosition(firstPositionInOrBeforeNode(previousNode)), visiblePosition)))
@@ -104,7 +104,7 @@ static Position previousRootInlineBoxCandidatePosition(Node* node, const Visible
static Position nextRootInlineBoxCandidatePosition(Node* node, const VisiblePosition& visiblePosition, EditableType editableType)
{
- Node* highestRoot = highestEditableRoot(visiblePosition.deepEquivalent(), editableType);
+ ContainerNode* highestRoot = highestEditableRoot(visiblePosition.deepEquivalent(), editableType);
Node* nextNode = nextLeafWithSameEditability(node, editableType);
while (nextNode && (!nextNode->renderer() || inSameLine(VisiblePosition(firstPositionInOrBeforeNode(nextNode)), visiblePosition)))
nextNode = nextLeafWithSameEditability(nextNode, ContentIsEditable);
@@ -755,7 +755,7 @@ static VisiblePosition startOfLine(const VisiblePosition& c, LineEndpointComputa
VisiblePosition visPos = startPositionForLine(c, mode);
if (mode == UseLogicalOrdering) {
- if (Node* editableRoot = highestEditableRoot(c.deepEquivalent())) {
+ if (ContainerNode* editableRoot = highestEditableRoot(c.deepEquivalent())) {
if (!editableRoot->contains(visPos.deepEquivalent().containerNode()))
return VisiblePosition(firstPositionInNode(editableRoot));
}
@@ -847,7 +847,7 @@ static VisiblePosition endOfLine(const VisiblePosition& c, LineEndpointComputati
if (!inSameLogicalLine(c, visPos))
visPos = visPos.previous();
- if (Node* editableRoot = highestEditableRoot(c.deepEquivalent())) {
+ if (ContainerNode* editableRoot = highestEditableRoot(c.deepEquivalent())) {
if (!editableRoot->contains(visPos.deepEquivalent().containerNode()))
return VisiblePosition(lastPositionInNode(editableRoot));
}
@@ -1091,7 +1091,7 @@ VisiblePosition startOfParagraph(const VisiblePosition& c, EditingBoundaryCrossi
Node* startBlock = enclosingBlock(startNode);
Node* node = startNode;
- Node* highestRoot = highestEditableRoot(p);
+ ContainerNode* highestRoot = highestEditableRoot(p);
int offset = p.deprecatedEditingOffset();
Position::AnchorType type = p.anchorType();
@@ -1169,7 +1169,7 @@ VisiblePosition endOfParagraph(const VisiblePosition &c, EditingBoundaryCrossing
Node* stayInsideBlock = startBlock;
Node* node = startNode;
- Node* highestRoot = highestEditableRoot(p);
+ ContainerNode* highestRoot = highestEditableRoot(p);
int offset = p.deprecatedEditingOffset();
Position::AnchorType type = p.anchorType();
@@ -1355,7 +1355,7 @@ bool isEndOfDocument(const VisiblePosition &p)
VisiblePosition startOfEditableContent(const VisiblePosition& visiblePosition)
{
- Node* highestRoot = highestEditableRoot(visiblePosition.deepEquivalent());
+ ContainerNode* highestRoot = highestEditableRoot(visiblePosition.deepEquivalent());
if (!highestRoot)
return VisiblePosition();
@@ -1364,7 +1364,7 @@ VisiblePosition startOfEditableContent(const VisiblePosition& visiblePosition)
VisiblePosition endOfEditableContent(const VisiblePosition& visiblePosition)
{
- Node* highestRoot = highestEditableRoot(visiblePosition.deepEquivalent());
+ ContainerNode* highestRoot = highestEditableRoot(visiblePosition.deepEquivalent());
if (!highestRoot)
return VisiblePosition();
« no previous file with comments | « Source/core/editing/VisibleSelection.cpp ('k') | Source/core/editing/htmlediting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698