Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9e91f375cf99af97d10d41a730eb2d6998d1e4ba
https://github.com/WebKit/WebKit/commit/9e91f375cf99af97d10d41a730eb2d6998d1e4ba
Author: Ahmad Saleem <[email protected]>
Date: 2026-06-19 (Fri, 19 Jun 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/input-type-hidden-important-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/input-type-hidden-important.html
M Source/WebCore/css/html.css
Log Message:
-----------
input[type=hidden] should be display:none !important in the UA stylesheet
https://bugs.webkit.org/show_bug.cgi?id=317495
rdar://180137214
Reviewed by Tim Nguyen.
The HTML Rendering specification [1] renders hidden inputs with an
!important UA declaration:
input[type=hidden i] { display: none !important; }
WebKit's rule omitted !important, so a normal-importance author rule such
as `input { display: block }` (or a `display`-setting CSS reset) would win
the cascade and reveal hidden inputs, diverging from the spec and from
other browsers.
Add !important to match the specification and other browsers.
[1] https://html.spec.whatwg.org/multipage/rendering.html#hidden-elements
Test:
imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/input-type-hidden-important.html
*
LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/input-type-hidden-important-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/input-type-hidden-important.html:
Added.
* Source/WebCore/css/html.css:
(input[type="hidden"]):
Canonical link: https://commits.webkit.org/315559@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications