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

Unified Diff: Source/core/layout/LayoutBoxModelObject.cpp

Issue 1096993003: Tighten assertions around StyleImage::computeIntrinsicDimensions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutBoxModelObject.cpp
diff --git a/Source/core/layout/LayoutBoxModelObject.cpp b/Source/core/layout/LayoutBoxModelObject.cpp
index 0cfefc58b17aee4c8dc86463604977d9c6127fe8..b697d5f450ca5ac941c71e6ac0b6a06980f197e2 100644
--- a/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/Source/core/layout/LayoutBoxModelObject.cpp
@@ -615,13 +615,13 @@ IntSize LayoutBoxModelObject::calculateImageIntrinsicDimensions(StyleImage* imag
if (image->isGeneratedImage() && image->usesImageContainerSize())
return IntSize(positioningAreaSize.width(), positioningAreaSize.height());
- Length intrinsicWidth;
- Length intrinsicHeight;
+ Length intrinsicWidth(Fixed);
+ Length intrinsicHeight(Fixed);
FloatSize intrinsicRatio;
image->computeIntrinsicDimensions(this, intrinsicWidth, intrinsicHeight, intrinsicRatio);
- ASSERT(!intrinsicWidth.isPercent());
- ASSERT(!intrinsicHeight.isPercent());
+ ASSERT(intrinsicWidth.isFixed());
+ ASSERT(intrinsicHeight.isFixed());
IntSize resolvedSize(intrinsicWidth.value(), intrinsicHeight.value());
IntSize minimumSize(resolvedSize.width() > 0 ? 1 : 0, resolvedSize.height() > 0 ? 1 : 0);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698