The searchfield still allocates space for the search clear button due to CSS in themeAdwaita.css. To fix this, styles added on ::-webkit-search-cancel-button from themeAdwaita.css need to be set by RenderThemeAdwaita.cpp instead in adjustSearchFieldCancelButtonStyle, notably width/height.
actually there's a better fix
<rdar://problem/94113204>
Pull request: https://github.com/WebKit/WebKit/pull/1161
Committed 253595@main (5f2088ec9415): <https://commits.webkit.org/253595@main> Reviewed commits have been landed. Closing PR #1161 and removing active labels.
Test gardening commit 253620@main (19719edc4942): <https://commits.webkit.org/253620@main> Reviewed commits have been landed. Closing PR #3505 and removing active labels.
Re-opening for pull request https://github.com/apple/WebKit/pull/179