Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8ad316d5e199d82b9b8de009b2dda01309248ca4
      
https://github.com/WebKit/WebKit/commit/8ad316d5e199d82b9b8de009b2dda01309248ca4
  Author: Wenson Hsieh <wenson_hs...@apple.com>
  Date:   2025-03-10 (Mon, 10 Mar 2025)

  Changed paths:
    A 
LayoutTests/fast/page-color-sampling/color-sampling-ignores-backdrop-filters-expected.txt
    A 
LayoutTests/fast/page-color-sampling/color-sampling-ignores-backdrop-filters.html
    A 
LayoutTests/fast/page-color-sampling/color-sampling-ignores-images-expected.txt
    A LayoutTests/fast/page-color-sampling/color-sampling-ignores-images.html
    M Source/WebCore/page/LocalFrameView.cpp
    M Source/WebCore/page/PageColorSampler.cpp

  Log Message:
  -----------
  [Page color sampler] Fine-tune color sampling heuristics to avoid backdrop 
filters
https://bugs.webkit.org/show_bug.cgi?id=289443
rdar://146618551

Reviewed by Abrar Rahman Protyasha.

Apply several minor adjustments to the page color sampling heuristic for 
fixed-position elements at
the edges of the viewport.

* 
LayoutTests/fast/page-color-sampling/color-sampling-ignores-backdrop-filters-expected.txt:
 Added.
* 
LayoutTests/fast/page-color-sampling/color-sampling-ignores-backdrop-filters.html:
 Added.
* 
LayoutTests/fast/page-color-sampling/color-sampling-ignores-images-expected.txt:
 Added.
* LayoutTests/fast/page-color-sampling/color-sampling-ignores-images.html: 
Added.

Add a couple of layout test to exercise these changes.

* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::fixedContainerEdges const):

Bail immediately if we find an hit-test to an element with a backdrop filter.

* Source/WebCore/page/PageColorSampler.cpp:
(WebCore::PageColorSampler::predominantColor):

Several small fixes here:
- Bump the sample count up slightly.
- Use `isVisible` instead of `isValid` to ignore completely transparent colors.
- Exclude replaced content when painting the snapshot.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to