Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 14dfefc6795a38c665aaa22ec596ae1e887c3dd2
      
https://github.com/WebKit/WebKit/commit/14dfefc6795a38c665aaa22ec596ae1e887c3dd2
  Author: Alejandro G. Castro <[email protected]>
  Date:   2026-06-24 (Wed, 24 Jun 2026)

  Changed paths:
    A 
LayoutTests/compositing/patterns/direct-pattern-compositing-offscreen-expected.html
    A LayoutTests/compositing/patterns/direct-pattern-compositing-offscreen.html
    M Source/WebCore/platform/graphics/skia/SkiaCompositingLayer.cpp

  Log Message:
  -----------
  [GTK][WPE] Skia Compositor: directly composited image is painted as a solid 
rectangle when partially offscreen
https://bugs.webkit.org/show_bug.cgi?id=317744

Reviewed by Carlos Garcia Campos.

A directly composited image is drawn in SkiaCompositingLayer::paintContents()
with an SkShader whose local matrix was computed from the contents tile size
and phase only, ignoring the contents rect origin. When the layer is partially
clipped (for instance an element positioned partly offscreen) the contents rect
has a non-zero, negative origin, so the kRepeat shader sampled the wrong region
of the image and the layer was painted as an opaque rectangle instead of the
image's actual shape.

Anchor the pattern at the contents rect origin, matching both the non-tiled
drawImageRect() path below it and the TextureMapper implementation. It is a
no-op when the contents rect origin is zero.

Added a new layout test:
  - compositing/patterns/direct-pattern-compositing-offscreen.html

* 
LayoutTests/compositing/patterns/direct-pattern-compositing-offscreen-expected.html:
 Added.
* LayoutTests/compositing/patterns/direct-pattern-compositing-offscreen.html: 
Added.
* Source/WebCore/platform/graphics/skia/SkiaCompositingLayer.cpp:
(WebCore::SkiaCompositingLayer::paintContents):

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



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

Reply via email to