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

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-26T21:48:03 Rebase 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 11dd9f48a32a246c57db12a5b33fc72c26a81b17..6e355eaf12802c462eba1d6038e987550164d12a 100644
--- a/Source/core/editing/EditingUtilities.cpp
+++ b/Source/core/editing/EditingUtilities.cpp
@@ -640,9 +640,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();
}
@@ -658,8 +656,8 @@ 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);
- return enclosingNode && enclosingNode->isElementNode() ? toElement(enclosingNode) : 0;
+ Node* enclosingNode = enclosingNodeOfType(firstPositionInOrBeforeNode(node), isEnclosingBlock, rule);
+ return enclosingNode && enclosingNode->isElementNode() ? toElement(enclosingNode) : nullptr;
}
Element* enclosingBlockFlowElement(Node& node)
« 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