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

Unified Diff: Source/core/rendering/RenderReplaced.cpp

Issue 343103003: Flexbox: Allow intrinsic aspect ratios to inform main-size calculation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderReplaced.cpp
diff --git a/Source/core/rendering/RenderReplaced.cpp b/Source/core/rendering/RenderReplaced.cpp
index b38b7aa3a8431a1d7728a30ffdf31f43f80ae69f..a3d0b5197a128a47e0750076ec86c87e2a0f3b9f 100644
--- a/Source/core/rendering/RenderReplaced.cpp
+++ b/Source/core/rendering/RenderReplaced.cpp
@@ -230,12 +230,6 @@ bool RenderReplaced::needsPreferredWidthsRecalculation() const
return hasRelativeLogicalHeight() && style()->logicalWidth().isAuto() && !hasAutoHeightOrContainingBlockWithAutoHeight();
}
-static inline bool rendererHasAspectRatio(const RenderObject* renderer)
-{
- ASSERT(renderer);
- return renderer->isImage() || renderer->isCanvas() || renderer->isVideo();
-}
-
void RenderReplaced::computeAspectRatioInformationForRenderBox(RenderBox* contentRenderer, FloatSize& constrainedSize, double& intrinsicRatio) const
{
FloatSize intrinsicSize;
@@ -326,7 +320,7 @@ void RenderReplaced::computeIntrinsicRatioInformation(FloatSize& intrinsicSize,
intrinsicSize = FloatSize(intrinsicLogicalWidth().toFloat(), intrinsicLogicalHeight().toFloat());
// Figure out if we need to compute an intrinsic ratio.
- if (intrinsicSize.isEmpty() || !rendererHasAspectRatio(this))
+ if (intrinsicSize.isEmpty() || !hasAspectRatio())
return;
intrinsicRatio = intrinsicSize.width() / intrinsicSize.height();
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698