Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a0ea903bb9afa692396f45e6960c8ab5ef4fc364
      
https://github.com/WebKit/WebKit/commit/a0ea903bb9afa692396f45e6960c8ab5ef4fc364
  Author: Gerald Squelart <[email protected]>
  Date:   2026-01-29 (Thu, 29 Jan 2026)

  Changed paths:
    A LayoutTests/fast/canvas/fillText-edge-clip-expected.html
    A LayoutTests/fast/canvas/fillText-edge-clip-shadow-expected.html
    A LayoutTests/fast/canvas/fillText-edge-clip-shadow.html
    A LayoutTests/fast/canvas/fillText-edge-clip.html
    A LayoutTests/fast/canvas/fillText-edge-expected.html
    A LayoutTests/fast/canvas/fillText-edge-shadow-expected.html
    A LayoutTests/fast/canvas/fillText-edge-shadow.html
    A LayoutTests/fast/canvas/fillText-edge.html
    A LayoutTests/fast/canvas/fillText-empty-clip-expected.html
    A LayoutTests/fast/canvas/fillText-empty-clip.html
    M LayoutTests/platform/win/TestExpectations
    M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp

  Log Message:
  -----------
  Cull simple canvas text drawing outside of the clip
https://bugs.webkit.org/show_bug.cgi?id=306394
rdar://168526176

Reviewed by Matt Woodrow.

In simple cases where no-frills text would be drawn on top of a canvas,
it's easy and fast to check if the text does NOT intersect with the
current clip, in which case the whole operation can safely be skipped.

Tech detail: Even though the first thing `IntRect::intersects()` does is
check for `this->empty()`, doing it explicitly first can avoid having to
compute `enclosingIntRect(FloatRect)`.

Tests: fast/canvas/fillText-edge-clip-shadow.html
       fast/canvas/fillText-edge-clip.html
       fast/canvas/fillText-edge-shadow.html
       fast/canvas/fillText-edge.html
       fast/canvas/fillText-empty-clip.html
* LayoutTests/fast/canvas/fillText-edge-clip-expected.html: Added.
* LayoutTests/fast/canvas/fillText-edge-clip-shadow-expected.html: Added.
* LayoutTests/fast/canvas/fillText-edge-clip-shadow.html: Added.
* LayoutTests/fast/canvas/fillText-edge-clip.html: Added.
* LayoutTests/fast/canvas/fillText-edge-expected.html: Added.
* LayoutTests/fast/canvas/fillText-edge-shadow-expected.html: Added.
* LayoutTests/fast/canvas/fillText-edge-shadow.html: Added.
* LayoutTests/fast/canvas/fillText-edge.html: Added.
* LayoutTests/fast/canvas/fillText-empty-clip-expected.html: Added.
* LayoutTests/fast/canvas/fillText-empty-clip.html: Added.
* LayoutTests/platform/win/TestExpectations: Slight shadow color diffs, filed 
https://bugs.webkit.org/show_bug.cgi?id=306588
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::drawTextUnchecked):

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



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

Reply via email to