WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
255335
hidden attribute doesn't work on select's option and optgroup
https://bugs.webkit.org/show_bug.cgi?id=255335
Summary
hidden attribute doesn't work on select's option and optgroup
Mattia Astorino
Reported
2023-04-12 06:54:42 PDT
Hello, just reporting that option elements with the hidden attribute are broken and they're still visible and can be selected. DEMO:
https://jsfiddle.net/73y0fmek/
The option "1" and the option group should not be visible like the spec say. Works with firefox and Chrome/Edge.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-04-12 07:57:30 PDT
<
rdar://problem/107939825
>
Alexey Proskuryakov
Comment 2
2023-04-12 17:28:16 PDT
We had earlier reports of this, but they seem to be duped to different bugs that are all similar yet not obviously the same. This may need some cleanup. Cf.
bug 8351
,
bug 25623
,
bug 62900
,
bug 169039
,
bug 191581
Karl Dubost
Comment 3
2023-04-12 19:40:01 PDT
In
Bug 191581
, Chris has done a bit of analysis about the possible why? I followed the track of
https://bugs.webkit.org/show_bug.cgi?id=191581#c2
where he said: ``` Both HTMLOptionElement and HTMLOptGroupElement have the following override: bool rendererIsNeeded(const RenderStyle&) final { return false; } Not sure why they do not need a renderer. ``` If we go down following the history, it has been added at a very early stage. Thu, 6 Jul 2006 05:47:30 +0000
https://searchfox.org/wubkat/diff/1018550ecbdbd0f48c091502b7e2a0f26f8c9481/WebCore/html/HTMLOptGroupElement.h#46
Maybe… the solution is that nobody tried to remove this.
Karl Dubost
Comment 4
2023-04-12 19:49:29 PDT
I'm trying to remove them in a local branch to see what it does.
Karl Dubost
Comment 5
2023-04-13 07:27:51 PDT
So removing the RendererIsNeeded doesn't change anything to the behavior. It doesn't break things, but it doesn't improve things.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug