Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e2f19a74a3bbffb907f739523cc547b6c1707c35
      
https://github.com/WebKit/WebKit/commit/e2f19a74a3bbffb907f739523cc547b6c1707c35
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-09-20 (Sun, 20 Sep 2026)

  Changed paths:
    M Source/WebCore/page/LocalFrameView.cpp

  Log Message:
  -----------
  LocalFrameView: capture page background color by reference and drop redundant 
null ComputedStyle casts
https://bugs.webkit.org/show_bug.cgi?id=324634
rdar://187885887

Reviewed by Chris Dumez.

Two behavior-preserving style cleanups in LocalFrameView.cpp:

- The blendAgainstPageBackground lambda captured its Color by value.
  WebCore::Color is small (essentially a uint64_t), but it is not
  trivially copyable, so the copy has real cost. The lambda is only
  invoked synchronously from the enclosing function, so capture the
  page background color by reference to avoid that copy.

- useDarkAppearance() and styleColorOptions() disambiguated their
  Document calls with static_cast<const Style::ComputedStyle*>(nullptr).
  Document declares a single overload of each taking
  const Style::ComputedStyle*, so plain nullptr is unambiguous; drop
  the casts.

No change in behavior, no new tests.

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

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



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

Reply via email to