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

Unified Diff: third_party/WebKit/Source/core/layout/HitTestResult.cpp

Issue 2770123003: Replace ASSERT with DCHECK in core/layout/ excluding subdirs (Closed)
Patch Set: Split some DCHECKs and add DCHECK_ops wherever possible Created 3 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/layout/HitTestResult.cpp
diff --git a/third_party/WebKit/Source/core/layout/HitTestResult.cpp b/third_party/WebKit/Source/core/layout/HitTestResult.cpp
index ec41d464421cb2290a87b1ff729485ac7090e1ff..9ace9f07cb545d73d4ef30d92e9ab46aa4d7176c 100644
--- a/third_party/WebKit/Source/core/layout/HitTestResult.cpp
+++ b/third_party/WebKit/Source/core/layout/HitTestResult.cpp
@@ -192,7 +192,7 @@ void HitTestResult::setToShadowHostIfInRestrictedShadowRoot() {
}
HTMLAreaElement* HitTestResult::imageAreaForImage() const {
- ASSERT(m_innerNode);
+ DCHECK(m_innerNode);
HTMLImageElement* imageElement = nullptr;
if (isHTMLImageElement(m_innerNode)) {
imageElement = toHTMLImageElement(m_innerNode);
@@ -440,7 +440,7 @@ ListBasedHitTestBehavior HitTestResult::addNodeToListBasedTestResult(
}
void HitTestResult::append(const HitTestResult& other) {
- ASSERT(hitTestRequest().listBased());
+ DCHECK(hitTestRequest().listBased());
if (!m_scrollbar && other.scrollbar()) {
setScrollbar(other.scrollbar());
@@ -480,8 +480,8 @@ HitTestResult::NodeSet& HitTestResult::mutableListBasedTestResult() {
void HitTestResult::resolveRectBasedTest(
Node* resolvedInnerNode,
const LayoutPoint& resolvedPointInMainFrame) {
- ASSERT(isRectBasedTest());
- ASSERT(m_hitTestLocation.containsPoint(FloatPoint(resolvedPointInMainFrame)));
+ DCHECK(isRectBasedTest());
+ DCHECK(m_hitTestLocation.containsPoint(FloatPoint(resolvedPointInMainFrame)));
m_hitTestLocation = HitTestLocation(resolvedPointInMainFrame);
m_pointInInnerNodeFrame = resolvedPointInMainFrame;
m_innerNode = nullptr;
@@ -493,7 +493,7 @@ void HitTestResult::resolveRectBasedTest(
// Note that we don't know the local point after a rect-based hit-test, but we
// never use it so shouldn't bother with the cost of computing it.
resolvedInnerNode->layoutObject()->updateHitTestResult(*this, LayoutPoint());
- ASSERT(!isRectBasedTest());
+ DCHECK(!isRectBasedTest());
}
Element* HitTestResult::innerElement() const {

Powered by Google App Engine
This is Rietveld 408576698