| 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);
|
|
|