[canvas] Fix intrinsic size invalidation for canvas elements.
Previously we cached at the preferred sizes level, this meant that whenever we called LayoutReplaced::PreferredLogicalWidths the (previous) PreferredLogicalWidthsDirty bit got cleared. However we now cache at the IntrinsicLogicalWidths level. The difference is that LayoutReplaced elements don't clear their IntrinsicLgoicalWidthsDirty bit. This meant that the innocent looking: if (!IntrinsicLogicalWidthsDirty()) SetIntrinsicLogicalWidthsDirty(); Was incorrect, as we were never invalidating the container chain. This caused the observed incorrect rendering in the bug. This patch changes this function to always invalidate the container chain for intrinsic sizes, and layout invalidations. Bug: 1086299 Change-Id: I8145a6276d4ec89c0c7acf91c1bf67714c127440 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2216373 Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by:Christian Biesinger <cbiesinger@chromium.org> Reviewed-by:
Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#771912}
Showing
Please register or sign in to comment