Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d4e98dfdcb5014c16bdb9afc962e55c9c4719138
      
https://github.com/WebKit/WebKit/commit/d4e98dfdcb5014c16bdb9afc962e55c9c4719138
  Author: Fujii Hironori <[email protected]>
  Date:   2026-02-17 (Tue, 17 Feb 2026)

  Changed paths:
    M Source/WebCore/html/shadow/DataListButtonElement.cpp
    M Source/WebCore/html/shadow/DataListButtonElement.h

  Log Message:
  -----------
  REGRESSION(305314@main): DataListButtonElement::canAdjustStyleForAppearance 
behaved inconsistently
https://bugs.webkit.org/show_bug.cgi?id=305709

Reviewed by Antti Koivisto.

After <https://commits.webkit.org/305314@main>, GTK has observed a random
assertion failure for 
fast/forms/datalist/data-list-search-input-with-appearance-none.html.

> ASSERTION FAILED: mode == Verify => !geometryChanged
> ../../../Source/WebCore/rendering/RenderLayer.cpp(2207) : bool 
> WebCore::RenderLayer::updateLayerPosition(WTF::OptionSet<UpdateLayerPositionsFlag>*,
>  UpdateLayerPositionsMode)

This meant the RenderLayer position was changed unexpectedly. It was a
-webkit-list-button shadow element for datalist suggestions.

The change added DataListButtonElement::canAdjustStyleForAppearance() which
returned true unless the shadow host style has none appearance by using
existingComputedStyle(). However, existingComputedStyle() doesn't returns a
style for the first time in this function. This function returned true for the
first time, but false for the next time in the test case.

SearchFieldResultsButtonElement class also checks the shadow host style, but it
takes another approach. It overrides resolveCustomStyle() to get the shadow
host style. Take the same approach for DataListButtonElement.

* Source/WebCore/html/shadow/DataListButtonElement.cpp:
(WebCore::DataListButtonElement::DataListButtonElement):
(WebCore::DataListButtonElement::isDisabledFormControl const):
(WebCore::DataListButtonElement::resolveCustomStyle):
(WebCore::DataListButtonElement::canAdjustStyleForAppearance const): Deleted.
* Source/WebCore/html/shadow/DataListButtonElement.h:

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



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

Reply via email to