Bug 80686 - HTML parser: allow <hr> to be used inside <select> as a separator
Summary: HTML parser: allow <hr> to be used inside <select> as a separator
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Anne van Kesteren
URL:
Keywords: InRadar
Depends on:
Blocks: 41115
  Show dependency treegraph
 
Reported: 2012-03-09 01:57 PST by Kent Tamura
Modified: 2023-05-03 01:15 PDT (History)
8 users (show)

See Also:


Attachments
Reproducible HTML (506 bytes, text/html)
2012-03-09 01:57 PST, Kent Tamura
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2012-03-09 01:57:28 PST
Created attachment 131013 [details]
Reproducible HTML

We have a feature that <hr> children in a <select> represent a menu separator.

http://www.webkit.org/blog/32/webkit-fixes-in-safari-202-mac-os-x-1043/
> Menu separator support: an <hr> inside a <select> with size 1 will now add a horizontal separator in the menu.

This feature doesn't work for now if such markup is parsed by the parser. It works if we insert <hr> into a <select> by a DOM operation.
Open the attached HTML, and see the difference between two popup menus.
Comment 1 Dimitri Glazkov (Google) 2012-03-09 08:44:10 PST
I think we need to change the spec first. It says that hr should be ignored: http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#parsing-main-inselect
Comment 2 Adam Barth 2012-03-09 08:48:44 PST
Or we should drop the feature if it's not implemented by other rendering engines.
Comment 3 Kent Tamura 2012-03-11 19:14:54 PDT
It seems Chromium is using this feature for a popup menu in chrome://settings/fonts.
Comment 4 Adam Barth 2012-03-11 20:23:56 PDT
> It seems Chromium is using this feature for a popup menu in chrome://settings/fonts.

Chromium shouldn't constrain us.  We can change Chromium to use a more wildly supported API.
Comment 5 Adele Peterson 2012-03-11 23:04:32 PDT
I originally added this support for an Apple Dashboard widget that is no longer using that markup.  Unfortunately, I think there were other clients over the years.  I'll have to check to see if we have any reports about this not working in the latest Safari/OS X WebKit, but I suspect no one has noticed.
Comment 6 Radar WebKit Bug Importer 2023-04-05 06:41:26 PDT
<rdar://problem/107656886>
Comment 7 Anne van Kesteren 2023-04-05 06:44:37 PDT
Pull request: https://github.com/WebKit/WebKit/pull/12407
Comment 8 EWS 2023-05-03 01:15:24 PDT
Committed 263624@main (d9e3a6262dbe): <https://commits.webkit.org/263624@main>

Reviewed commits have been landed. Closing PR #12407 and removing active labels.