[webkit-changes] [WebKit/WebKit] 36adb3: Charts on sixcolors.com flicker when zooming in

Said Abou-Hallawa noreply at github.com
Tue May 23 12:38:02 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 36adb36a799fae4fd51fe20e40916487d4d3ecb5
      https://github.com/WebKit/WebKit/commit/36adb36a799fae4fd51fe20e40916487d4d3ecb5
  Author: Said Abou-Hallawa <said at apple.com>
  Date:   2023-05-23 (Tue, 23 May 2023)

  Changed paths:
    A LayoutTests/fast/images/decode-decoding-change-image-src-expected.html
    A LayoutTests/fast/images/decode-decoding-change-image-src.html
    M LayoutTests/fast/images/decoding-attribute-async-small-image.html
    M LayoutTests/fast/images/decoding-attribute-dynamic-async-small-image.html
    M Source/WebCore/rendering/RenderBoxModelObject.cpp

  Log Message:
  -----------
  Charts on sixcolors.com flicker when zooming in
https://bugs.webkit.org/show_bug.cgi?id=256620
rdar://108930635

Reviewed by Simon Fraser.

If
	1. An image is in the current viewport,
	2. It has the attribute decoding="async",
	3. The layer has already painted at least once,
	4. And the image frame is being re-decoded

Then the decoding="async" attribute should be ignored to avoid flickering.

RenderBoxModelObject::decodingModeForImageDraw() is re-factored such that caces
which return DecodingMode::Synchronous are checked first. Then flickering case
is checked. Then cases which return DecodingMode::Asynchronous are checked last.

Two layout tests are changed to ensure the image is displayed on a fresh layer
when the image has the decoding="async".

* LayoutTests/fast/images/decode-decoding-change-image-src-expected.html: Added.
* LayoutTests/fast/images/decode-decoding-change-image-src.html: Added.
* Source/WebCore/rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::decodingModeForImageDraw const):

Canonical link: https://commits.webkit.org/264433@main




More information about the webkit-changes mailing list