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

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

Issue 1320573003: Rename isBlock() to isEnclosingBlock() in EditingUtilities (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-26T15:16:19 Created 5 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 | « Source/core/editing/EditingUtilities.h ('k') | Source/core/editing/EditingUtilitiesTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/EditingUtilities.cpp
diff --git a/Source/core/editing/EditingUtilities.cpp b/Source/core/editing/EditingUtilities.cpp
index bd66ce3e735e63ea449b5cd882471fcbd91410e0..17c379725745dd669554efe92a4a94ffc7bb2ce7 100644
--- a/Source/core/editing/EditingUtilities.cpp
+++ b/Source/core/editing/EditingUtilities.cpp
@@ -624,9 +624,7 @@ PositionInComposedTree nextPositionOf(const PositionInComposedTree& position, Po
return nextPositionOfAlgorithm<EditingInComposedTreeStrategy>(position, moveType);
}
-// 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)
+bool isEnclosingBlock(const Node* node)
{
return node && node->layoutObject() && !node->layoutObject()->isInline() && !node->layoutObject()->isRubyText();
}
@@ -642,7 +640,7 @@ bool isInline(const Node* node)
// knowing about these kinds of special cases.
Element* enclosingBlock(Node* node, EditingBoundaryCrossingRule rule)
{
- Node* enclosingNode = enclosingNodeOfType(firstPositionInOrBeforeNode(node), isBlock, rule);
+ Node* enclosingNode = enclosingNodeOfType(firstPositionInOrBeforeNode(node), isEnclosingBlock, rule);
return enclosingNode && enclosingNode->isElementNode() ? toElement(enclosingNode) : 0;
hajimehoshi 2015/08/26 07:21:48 nit: nullptr
yosin_UTC9 2015/08/26 07:35:53 Done.
}
« no previous file with comments | « Source/core/editing/EditingUtilities.h ('k') | Source/core/editing/EditingUtilitiesTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698