Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1f488a95e2fce8d54f19c802846829c4334ececf
      
https://github.com/WebKit/WebKit/commit/1f488a95e2fce8d54f19c802846829c4334ececf
  Author: Kiet Ho <[email protected]>
  Date:   2025-10-22 (Wed, 22 Oct 2025)

  Changed paths:
    A 
LayoutTests/fast/css/css-anchor-position/position-try-popover-transition-display-none-crash-expected.txt
    A 
LayoutTests/fast/css/css-anchor-position/position-try-popover-transition-display-none-crash.html
    M Source/WebCore/style/StyleTreeResolver.cpp

  Log Message:
  -----------
  REGRESSION (300909@main): Closing a transitioned popover with "position-try" 
can crash the browser window
rdar://163072798
https://bugs.webkit.org/show_bug.cgi?id=301057

Reviewed by Simon Fraser.

Vector::findIf returns notFound if no element is found. notFound is (size_t)(-1)
or positive 0xffff...ffff, so the > 0 check won't catch notFound. Fix the check
to explicitly check for non-zero and not notFound.

Test: 
fast/css/css-anchor-position/position-try-popover-transition-display-none-crash.html

* 
LayoutTests/fast/css/css-anchor-position/position-try-popover-transition-display-none-crash-expected.txt:
 Added.
* 
LayoutTests/fast/css/css-anchor-position/position-try-popover-transition-display-none-crash.html:
 Added.
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::sortPositionOptionsIfNeeded):

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



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

Reply via email to