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

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

Issue 212873002: Remove Selection.containsNode assertion that is not valid. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make test slightly smaller. Created 6 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
Index: Source/core/page/DOMSelection.cpp
diff --git a/Source/core/page/DOMSelection.cpp b/Source/core/page/DOMSelection.cpp
index 99c29c28c4001d42a10958fb1dfb1c8a0583d6e3..80edf63d5a7c41da4a4e42e6d8b6a3ab29e794c1 100644
--- a/Source/core/page/DOMSelection.cpp
+++ b/Source/core/page/DOMSelection.cpp
@@ -481,7 +481,8 @@ bool DOMSelection::containsNode(const Node* n, bool allowPartial) const
TrackExceptionState exceptionState;
bool nodeFullySelected = Range::compareBoundaryPoints(parentNode, nodeIndex, selectedRange->startContainer(), selectedRange->startOffset(), exceptionState) >= 0 && !exceptionState.hadException()
&& Range::compareBoundaryPoints(parentNode, nodeIndex + 1, selectedRange->endContainer(), selectedRange->endOffset(), exceptionState) <= 0 && !exceptionState.hadException();
- ASSERT(!exceptionState.hadException());
+ if (exceptionState.hadException())
Yuta Kitamura 2014/03/27 01:21:12 In what situation does this become true? I think
Mads Ager (chromium) 2014/03/27 13:52:44 This becomes true when the nodes that are compared
Yuta Kitamura 2014/03/28 02:38:28 Ah, I tried running a debugger and I think I've go
+ return false;
if (nodeFullySelected)
return true;

Powered by Google App Engine
This is Rietveld 408576698