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

Unified Diff: third_party/WebKit/Source/core/paint/ViewPainter.cpp

Issue 2261663002: Disallow cast/implicit conversion from LayoutUnit to int/unsigned (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 4 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: third_party/WebKit/Source/core/paint/ViewPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/ViewPainter.cpp b/third_party/WebKit/Source/core/paint/ViewPainter.cpp
index 6883c0b049ed1acacc51e519abbf0f39e73e17f4..0eaa3933544410cc693a4a4901dec83cce0e6165 100644
--- a/third_party/WebKit/Source/core/paint/ViewPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/ViewPainter.cpp
@@ -20,9 +20,9 @@ namespace blink {
void ViewPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
// If we ever require layout but receive a paint anyway, something has gone horribly wrong.
- ASSERT(!m_layoutView.needsLayout());
+ DCHECK(!m_layoutView.needsLayout());
// LayoutViews should never be called to paint with an offset not on device pixels.
- ASSERT(LayoutPoint(IntPoint(paintOffset.x(), paintOffset.y())) == paintOffset);
+ DCHECK(LayoutPoint(IntPoint(paintOffset.x().toInt(), paintOffset.y().toInt())) == paintOffset);
const FrameView* frameView = m_layoutView.frameView();
if (frameView->shouldThrottleRendering())

Powered by Google App Engine
This is Rietveld 408576698