[webkit-changes] [WebKit/WebKit] f02829: [size containment] CSS zoom on size contained vide...

Alan Baradlay noreply at github.com
Wed Oct 9 17:11:02 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f028290ec36df8d7774cdc58d12722fbe36e43b9
      https://github.com/WebKit/WebKit/commit/f028290ec36df8d7774cdc58d12722fbe36e43b9
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2024-10-09 (Wed, 09 Oct 2024)

  Changed paths:
    A LayoutTests/fast/inline/video-with-sizing-containment-and-zoom-crash-expected.txt
    A LayoutTests/fast/inline/video-with-sizing-containment-and-zoom-crash.html
    M Source/WebCore/rendering/RenderReplaced.cpp
    M Source/WebCore/rendering/RenderVideo.cpp

  Log Message:
  -----------
  [size containment] CSS zoom on size contained video causes unstable intrinsic size
https://bugs.webkit.org/show_bug.cgi?id=281096
<rdar://137177632>

Reviewed by Antti Koivisto.

In case of shouldApplySizeContainment(), RenderVideo::calculateIntrinsicSize would never
return the zoom adjusted intrinsic width causing if (size == intrinsicSize()) always fail in
RenderVideo::updateIntrinsicSize (with ends up initiating layout -while running layout).

Let's take zoom into account when computing intrinsic size in RenderReplaced::intrinsicSize().

* LayoutTests/fast/inline/video-with-sizing-containment-and-zoom-crash-expected.txt: Added.
* LayoutTests/fast/inline/video-with-sizing-containment-and-zoom-crash.html: Added.
* Source/WebCore/rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::paint):
* Source/WebCore/rendering/RenderVideo.cpp:
(WebCore::RenderVideo::updateIntrinsicSize):
(WebCore::RenderVideo::calculateIntrinsicSize):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list