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

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

Issue 1845563002: Make enclosingBlockFlowElement() to take const Node reference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « third_party/WebKit/Source/core/editing/EditingUtilities.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/EditingUtilities.cpp
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
index 3fe2471ade436bcc32bb056d46e8063e953f0e89..ee40e3732833188fb54b6cf9016de93a3ec0c71b 100644
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
@@ -718,16 +718,16 @@ Element* enclosingBlock(const PositionInFlatTree& position, EditingBoundaryCross
return enclosingBlockAlgorithm<EditingInFlatTreeStrategy>(position, rule);
}
-Element* enclosingBlockFlowElement(Node& node)
+Element* enclosingBlockFlowElement(const Node& node)
{
if (isBlockFlowElement(node))
- return &toElement(node);
+ return const_cast<Element*>(&toElement(node));
for (Node* n = node.parentNode(); n; n = n->parentNode()) {
if (isBlockFlowElement(*n) || isHTMLBodyElement(*n))
return toElement(n);
}
- return 0;
+ return nullptr;
}
bool inSameContainingBlockFlowElement(Node* a, Node* b)
« no previous file with comments | « third_party/WebKit/Source/core/editing/EditingUtilities.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698