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

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

Issue 1878473002: ASSERT -> DCHECK in core/editing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Output info for some DCHECKs, add TODOs. Created 4 years, 8 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: third_party/WebKit/Source/core/editing/CaretBase.cpp
diff --git a/third_party/WebKit/Source/core/editing/CaretBase.cpp b/third_party/WebKit/Source/core/editing/CaretBase.cpp
index 7c8ecbb0c4ad827c20cc48e960c36a223acb4fee..2c04c3b1d59342903f0afcb8fc0539c0d52e39e4 100644
--- a/third_party/WebKit/Source/core/editing/CaretBase.cpp
+++ b/third_party/WebKit/Source/core/editing/CaretBase.cpp
@@ -73,7 +73,7 @@ static void mapCaretRectToCaretPainter(LayoutItem caretLayoutItem, LayoutBlockIt
// FIXME: This should probably just use mapLocalToAncestor.
// Compute an offset between the caretLayoutItem and the caretPainterItem.
- ASSERT(caretLayoutItem.isDescendantOf(caretPainterItem));
+ DCHECK(caretLayoutItem.isDescendantOf(caretPainterItem));
bool unrooted = false;
while (caretLayoutItem != caretPainterItem) {
@@ -97,7 +97,7 @@ bool CaretBase::updateCaretRect(const PositionWithAffinity& caretPosition)
if (caretPosition.position().isNull())
return false;
- ASSERT(caretPosition.position().anchorNode()->layoutObject());
+ DCHECK(caretPosition.position().anchorNode()->layoutObject());
// First compute a rect local to the layoutObject at the selection start.
LayoutObject* layoutObject;
@@ -157,7 +157,7 @@ bool CaretBase::shouldRepaintCaret(Node& node) const
bool CaretBase::shouldRepaintCaret(const LayoutView* view) const
{
- ASSERT(view);
+ DCHECK(view);
if (FrameView* frameView = view->frameView()) {
LocalFrame& frame = frameView->frame(); // The frame where the selection started
return frame.settings() && frame.settings()->caretBrowsingEnabled();

Powered by Google App Engine
This is Rietveld 408576698