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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutHTMLCanvas.cpp

Issue 2111623002: Canvas objects did not mark themselves for layout when they're a flex item (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 6 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 | « third_party/WebKit/LayoutTests/css3/flexbox/canvas-dynamic-change.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutHTMLCanvas.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutHTMLCanvas.cpp b/third_party/WebKit/Source/core/layout/LayoutHTMLCanvas.cpp
index cd52e66b8a434a7d42469e8b5fc7a64da3d4b0e8..ce9b4d10f4cbb32a1d7af6c7e5b31699ddd50790 100644
--- a/third_party/WebKit/Source/core/layout/LayoutHTMLCanvas.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutHTMLCanvas.cpp
@@ -71,8 +71,13 @@ void LayoutHTMLCanvas::canvasSizeChanged()
LayoutSize oldSize = size();
updateLogicalWidth();
updateLogicalHeight();
- if (oldSize == size())
+ if (oldSize == size() && !hasOverrideLogicalContentWidth() && !hasOverrideLogicalContentHeight()) {
+ // If we have an override size, then we're probably a flex item, and the
+ // check above is insufficient because updateLogical{Width,Height} just
+ // used the override size. We actually have to mark ourselves as needing
+ // layout so the flex algorithm can run and compute our size correctly.
return;
+ }
if (!selfNeedsLayout())
setNeedsLayout(LayoutInvalidationReason::SizeChanged);
« no previous file with comments | « third_party/WebKit/LayoutTests/css3/flexbox/canvas-dynamic-change.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698