LayoutImage shouldn't need to know about cache revalidation |
|
Issue descriptionTo fix https://bugs.chromium.org/p/chromium/issues/detail?id=747672, I added an IsCacheValidator() check to LayoutImage::EmbeddedReplacedContent, which causes us to ignore the replaced content if it is an SVGImage in the process of being revalidated. This is hacky, temporary fix. Opening this bug to track fixing it the right way. From https://chromium-review.googlesource.com/c/chromium/src/+/634131#message-cc383973599a601c024491ecb589a181423258e5 " 1. Start revalidation with SVGImage from MemoryCache 2. Layout happens while waiting for revalidation response. LayoutImage is laid out, and its LayoutReplaced superclass inspects the SVGImage that is being revalidated. It looks like a 100% valid SVGImage, has a size, etc. Intrinsic size is updated (see LayoutReplaced::ComputeIntrinsicSizingInfoForReplacedContent), but for reasons that I don't fully understand, this then gets clamped to 0x0 by LayoutBox::ComputeReplacedLogical{Height,Width}RespectingMinMax{Height,Width} 3. Revalidation finishes. The intrinsic style doesn't change, but the computed height/width need update. They don't get updated because SetNeedsLayoutAndFullPaintInvalidation() isn't called. Using IsCacheValidator() here probably isn't the best solution, but it gets us close to the way things used to work, appears to work reliably, prevents us from depending on data that might be invalid, and I don't think it should trigger too many spurious layouts (my primary fear with a more invasive change right before a branch). "
,
Oct 16 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a99bfdf79831dea44584325e6669977d6ba8ddd6 commit a99bfdf79831dea44584325e6669977d6ba8ddd6 Author: Nate Chapin <japhet@chromium.org> Date: Mon Oct 16 17:55:11 2017 Revert "LayoutImage shouldn't need to know about an image's revalidation state" This reverts commit 591f8b71b99ba4a3826157e5bcd1eea7ca2c6d40. Reason for revert: Memory regression: https://bugs.chromium.org/p/chromium/issues/detail?id=774552 Original change's description: > LayoutImage shouldn't need to know about an image's revalidation state > > Bug: 761026 > Change-Id: Ic911b8fcce6f1e37759739f20e8cab154c13ff91 > Reviewed-on: https://chromium-review.googlesource.com/639243 > Reviewed-by: Philip Rogers <pdr@chromium.org> > Commit-Queue: Nate Chapin <japhet@chromium.org> > Cr-Commit-Position: refs/heads/master@{#508158} TBR=pdr@chromium.org,hiroshige@chromium.org,japhet@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 761026 Change-Id: I72b41a9eeaebe84249b356c9200e9128e50783f4 Reviewed-on: https://chromium-review.googlesource.com/721619 Reviewed-by: Nate Chapin <japhet@chromium.org> Commit-Queue: Nate Chapin <japhet@chromium.org> Cr-Commit-Position: refs/heads/master@{#509101} [modify] https://crrev.com/a99bfdf79831dea44584325e6669977d6ba8ddd6/third_party/WebKit/Source/core/layout/LayoutImage.cpp [modify] https://crrev.com/a99bfdf79831dea44584325e6669977d6ba8ddd6/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp [modify] https://crrev.com/a99bfdf79831dea44584325e6669977d6ba8ddd6/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.h |
|
►
Sign in to add a comment |
|
Comment 1 by bugdroid1@chromium.org
, Oct 11 2017