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

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

Issue 23717008: Remove useless null checks from Node::document() call sites (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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/FrameSelection.cpp ('k') | Source/core/editing/markup.cpp » ('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 7ad6c8803304fd079760da388d6720a9a9846c3e..fa94d0c52f8e2f39ed369bb9a680fbc5d830820c 100644
--- a/Source/core/editing/VisibleUnits.cpp
+++ b/Source/core/editing/VisibleUnits.cpp
@@ -1329,7 +1329,7 @@ bool isEndOfBlock(const VisiblePosition &pos)
VisiblePosition startOfDocument(const Node* node)
{
- if (!node || !node->document() || !node->document()->documentElement())
+ if (!node || !node->document()->documentElement())
return VisiblePosition();
return VisiblePosition(firstPositionInNode(node->document()->documentElement()), DOWNSTREAM);
@@ -1342,7 +1342,7 @@ VisiblePosition startOfDocument(const VisiblePosition &c)
VisiblePosition endOfDocument(const Node* node)
{
- if (!node || !node->document() || !node->document()->documentElement())
+ if (!node || !node->document()->documentElement())
return VisiblePosition();
Element* doc = node->document()->documentElement();
« no previous file with comments | « Source/core/editing/FrameSelection.cpp ('k') | Source/core/editing/markup.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698