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

Unified Diff: third_party/WebKit/Source/core/html/ImageDocument.cpp

Issue 2258033002: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. 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/html/ImageDocument.cpp
diff --git a/third_party/WebKit/Source/core/html/ImageDocument.cpp b/third_party/WebKit/Source/core/html/ImageDocument.cpp
index aca5533bb18256f4104464c3d7f67b98b32d0b56..0e71f636fcfd525304a5ad21de938bd6d8ab5102 100644
--- a/third_party/WebKit/Source/core/html/ImageDocument.cpp
+++ b/third_party/WebKit/Source/core/html/ImageDocument.cpp
@@ -252,7 +252,7 @@ float ImageDocument::scale() const
if (!view)
return 1;
- ASSERT(m_imageElement->cachedImage());
+ DCHECK(m_imageElement->cachedImage());
LayoutSize imageSize = m_imageElement->cachedImage()->imageSize(LayoutObject::shouldRespectImageOrientation(m_imageElement->layoutObject()), pageZoomFactor(this));
LayoutSize windowSize = LayoutSize(view->width(), view->height());
@@ -267,7 +267,7 @@ void ImageDocument::resizeImageToFit(ScaleType type)
if (!m_imageElement || m_imageElement->document() != this || (pageZoomFactor(this) > 1 && type == ScaleOnlyUnzoomedDocument))
return;
- ASSERT(m_imageElement->cachedImage());
+ DCHECK(m_imageElement->cachedImage());
LayoutSize imageSize = m_imageElement->cachedImage()->imageSize(LayoutObject::shouldRespectImageOrientation(m_imageElement->layoutObject()), pageZoomFactor(this));
float scale = this->scale();
@@ -279,7 +279,7 @@ void ImageDocument::resizeImageToFit(ScaleType type)
void ImageDocument::imageClicked(int x, int y)
{
- ASSERT(m_shrinkToFitMode == Desktop);
+ DCHECK_EQ(m_shrinkToFitMode, Desktop);
if (!m_imageSizeIsKnown || imageFitsInWindow())
return;
@@ -304,7 +304,7 @@ void ImageDocument::imageClicked(int x, int y)
void ImageDocument::imageUpdated()
{
- ASSERT(m_imageElement);
+ DCHECK(m_imageElement);
if (m_imageSizeIsKnown)
return;
@@ -323,12 +323,12 @@ void ImageDocument::imageUpdated()
void ImageDocument::restoreImageSize(ScaleType type)
{
- ASSERT(m_shrinkToFitMode == Desktop);
+ DCHECK_EQ(m_shrinkToFitMode, Desktop);
if (!m_imageElement || !m_imageSizeIsKnown || m_imageElement->document() != this || (pageZoomFactor(this) < 1 && type == ScaleOnlyUnzoomedDocument))
return;
- ASSERT(m_imageElement->cachedImage());
+ DCHECK(m_imageElement->cachedImage());
LayoutSize imageSize = m_imageElement->cachedImage()->imageSize(LayoutObject::shouldRespectImageOrientation(m_imageElement->layoutObject()), 1.0f);
m_imageElement->setWidth(imageSize.width());
m_imageElement->setHeight(imageSize.height());
@@ -343,7 +343,7 @@ void ImageDocument::restoreImageSize(ScaleType type)
bool ImageDocument::imageFitsInWindow() const
{
- ASSERT(m_shrinkToFitMode == Desktop);
+ DCHECK_EQ(m_shrinkToFitMode, Desktop);
if (!m_imageElement || m_imageElement->document() != this)
return true;
@@ -352,7 +352,7 @@ bool ImageDocument::imageFitsInWindow() const
if (!view)
return true;
- ASSERT(m_imageElement->cachedImage());
+ DCHECK(m_imageElement->cachedImage());
LayoutSize imageSize = m_imageElement->cachedImage()->imageSize(LayoutObject::shouldRespectImageOrientation(m_imageElement->layoutObject()), pageZoomFactor(this));
LayoutSize windowSize = LayoutSize(view->width(), view->height());
« no previous file with comments | « third_party/WebKit/Source/core/html/ImageData.cpp ('k') | third_party/WebKit/Source/core/html/LabelsNodeList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698