[webkit-changes] [WebKit/WebKit] 2d31da: Offscreen Canvas does not respect size set via CSS.

mattwoodrow noreply at github.com
Thu Mar 23 14:28:40 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2d31dae22ea7c1284f447a13c76ddeaffcf684d8
      https://github.com/WebKit/WebKit/commit/2d31dae22ea7c1284f447a13c76ddeaffcf684d8
  Author: Matt Woodrow <mattwoodrow at apple.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    A LayoutTests/fast/canvas/offscreen-scaling-expected.html
    A LayoutTests/fast/canvas/offscreen-scaling.html
    M Source/WebCore/platform/graphics/ca/cocoa/GraphicsLayerAsyncContentsDisplayDelegateCocoa.mm

  Log Message:
  -----------
  Offscreen Canvas does not respect size set via CSS.
https://bugs.webkit.org/show_bug.cgi?id=253821
<rdar://106941318>

Reviewed by Simon Fraser.

We were previously overwriting the size of the contents layer to match the size of the buffer.
This skips that, since the size is already set during layer configuration to be desired destination size,
and then scaling the buffer to that size happens automatically.

* LayoutTests/fast/canvas/offscreen-scaling-expected.html: Added.
* LayoutTests/fast/canvas/offscreen-scaling.html: Added.
* Source/WebCore/platform/graphics/ca/cocoa/GraphicsLayerAsyncContentsDisplayDelegateCocoa.mm:
(WebCore::GraphicsLayerAsyncContentsDisplayDelegateCocoa::tryCopyToLayer):

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




More information about the webkit-changes mailing list