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

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

Issue 434773003: Use tighter typing in Editing: VisibleUnits (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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: Source/core/editing/VisibleUnits.cpp
diff --git a/Source/core/editing/VisibleUnits.cpp b/Source/core/editing/VisibleUnits.cpp
index 3af707634d0d2be3ea63bd4a91cbb9f4b0d51e00..f9996c5d880fac5ce50e045070febd37d0527a7d 100644
--- a/Source/core/editing/VisibleUnits.cpp
+++ b/Source/core/editing/VisibleUnits.cpp
@@ -1088,7 +1088,7 @@ VisiblePosition startOfParagraph(const VisiblePosition& c, EditingBoundaryCrossi
if (isRenderedAsNonInlineTableImageOrHR(startNode))
return VisiblePosition(positionBeforeNode(startNode));
- Node* startBlock = enclosingBlock(startNode);
+ Element* startBlock = enclosingBlock(startNode);
Node* node = startNode;
ContainerNode* highestRoot = highestEditableRoot(p);
@@ -1165,8 +1165,8 @@ VisiblePosition endOfParagraph(const VisiblePosition &c, EditingBoundaryCrossing
if (isRenderedAsNonInlineTableImageOrHR(startNode))
return VisiblePosition(positionAfterNode(startNode));
- Node* startBlock = enclosingBlock(startNode);
- Node* stayInsideBlock = startBlock;
+ Element* startBlock = enclosingBlock(startNode);
+ Element* stayInsideBlock = startBlock;
Node* node = startNode;
ContainerNode* highestRoot = highestEditableRoot(p);
@@ -1286,14 +1286,14 @@ VisiblePosition nextParagraphPosition(const VisiblePosition& p, int x)
VisiblePosition startOfBlock(const VisiblePosition& visiblePosition, EditingBoundaryCrossingRule rule)
{
Position position = visiblePosition.deepEquivalent();
- Node* startBlock = position.containerNode() ? enclosingBlock(position.containerNode(), rule) : 0;
+ Element* startBlock = position.containerNode() ? enclosingBlock(position.containerNode(), rule) : 0;
return startBlock ? VisiblePosition(firstPositionInNode(startBlock)) : VisiblePosition();
}
VisiblePosition endOfBlock(const VisiblePosition& visiblePosition, EditingBoundaryCrossingRule rule)
{
Position position = visiblePosition.deepEquivalent();
- Node* endBlock = position.containerNode() ? enclosingBlock(position.containerNode(), rule) : 0;
+ Element* endBlock = position.containerNode() ? enclosingBlock(position.containerNode(), rule) : 0;
return endBlock ? VisiblePosition(lastPositionInNode(endBlock)) : VisiblePosition();
}
« 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