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

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

Issue 1308663003: The node and allowPartialContainment arguments for Selection API should not be optional (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
Index: Source/core/editing/DOMSelection.cpp
diff --git a/Source/core/editing/DOMSelection.cpp b/Source/core/editing/DOMSelection.cpp
index 0468dbc358f711e80df97db3fcc79745064fb840..f066f1c539822460586735c07af8632e1ff13ec4 100644
--- a/Source/core/editing/DOMSelection.cpp
+++ b/Source/core/editing/DOMSelection.cpp
@@ -461,7 +461,7 @@ bool DOMSelection::containsNode(const Node* n, bool allowPartial) const
FrameSelection& selection = m_frame->selection();
- if (!n || m_frame->document() != n->document() || selection.isNone())
+ if (m_frame->document() != n->document() || selection.isNone())
return false;
unsigned nodeIndex = n->nodeIndex();

Powered by Google App Engine
This is Rietveld 408576698