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

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

Issue 381613002: Add UseCounter for flex items having intinsic aspect ratios (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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/frame/UseCounter.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/RenderFlexibleBox.cpp
diff --git a/Source/core/rendering/RenderFlexibleBox.cpp b/Source/core/rendering/RenderFlexibleBox.cpp
index 3f8b11f277a7e2958ce106052f8679f2fd632936..ce694f8df7ad0e4e8eeeda9957e2ee2eeb00bd43 100644
--- a/Source/core/rendering/RenderFlexibleBox.cpp
+++ b/Source/core/rendering/RenderFlexibleBox.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "core/rendering/RenderFlexibleBox.h"
+#include "core/frame/UseCounter.h"
#include "core/rendering/FastTextAutosizer.h"
#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderView.h"
@@ -612,6 +613,9 @@ LayoutUnit RenderFlexibleBox::preferredMainAxisContentExtentForChild(RenderBox*
{
child->clearOverrideSize();
+ if (child->style()->hasAspectRatio() || child->isImage() || child->isVideo() || child->isCanvas())
+ UseCounter::count(document(), UseCounter::AspectRatioFlexItem);
+
Length flexBasis = flexBasisForChild(child);
if (preferredMainAxisExtentDependsOnLayout(flexBasis, hasInfiniteLineLength)) {
LayoutUnit mainAxisExtent;
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698