-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Change <menuitem> from void to like-<option> #907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Should maybe remove |
Need to add |
LGTM for what that's worth. Will leave it up to you when you feel comfortable merging. |
Thanks! I want to finish writing some tests first, at least. The parser is tricky. If someone else also want to review, that would be appreciated. :-) |
This tests whatwg/html#907.
Tests PR at html5lib/html5lib-tests#72 |
@hsivonen do you think you can you review this (and the tests)? |
Since this PR makes |
Given https://groups.google.com/a/chromium.org/d/msg/blink-dev/MkEDloT-yu8/miGAi4KpAgAJ I think we should land this. |
Cool. Can you rebase? Then I will look for editorial issues and merge. |
- Change the content model - Change the processing to use trimmed child text content (unlike <option> but matches Firefox) - Change label IDL attribute to match <option>
- Add menuitem to "Generate implied end tags" - <menuitem>, <hr> and <menu> pop a <menuitem> - <menuitem> is not void and is not "special" - An open menuitem at </body>, </html> or EOF is not a parse error.
99a93cf
to
5e49a20
Compare
Yep, rebased. (I'd prefer to have this merged as two commits to separate the parser changes.) |
The specification says "foo bar"What should be parser output for above html as "" is not immediately followed by " " but a ""? |
The section you quoted is talking about conformance rules for writing HTML, and has nothing to do with how HTML is parsed. How HTML is parsed is discussed in the subsequent section. |
Can the menuitem element have menuitem/hr/menu as children? and this is what is done in https://developer.apple.com/library/ios/documentation/HealthKit/Reference/HealthKit_Constants/index.html#//apple_ref/c/econst/HKBodyTemperatureSensorLocationRectum, is the html in this page conforms this spec? |
No, it cannot. That page is still broken with the spec change, see #907 (comment) above.
->
|
@hober can you help trying to get the Apple docs pages fixed (e.g. change from |
The current spec (2016.05.15) is missing the instruction to "reconstruct the active formatting elements" to match the handling of the <option> element See relevant discussions: whatwg/html#907 whatwg/html#234 https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/MkEDloT-yu8 https://www.w3.org/Bugs/Public/show_bug.cgi?id=25325
We are not able to ship "contextmenu" in blink because of apple site issue (https://developer.apple.com/library/ios/documentation/HealthKit/Reference/HealthKit_Constants/index.html#//apple_ref/c/econst/HKBodyTemperatureSensorLocationRectum). I filed a bug in apple bug tracker but no action is taken. Firefox does not comply with the spec in this case. So, Firefox does not break the apple site. Can the specification be modified to FF implementation? |
I can't reproduce this problem in the updated docs: https://developer.apple.com/reference/healthkit/hkbodytemperaturesensorlocation |
Thank you @hober! The old URL is still broken though. Do you think a redirect could be set up? |
<!-- fake </menuitem> (maybe) --> | ||
<p>If the <span>current node</span> is a <code>menuitem</code> element, pop that node from the | ||
<span>stack of open elements</span>.</p> | ||
<!-- end of fake </menuitem> --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it reconstruct active formatting element list like <option>
do? This is how currently all implementations behaves, even tests landed by html5lib/html5lib-tests@88b8ee9 commit expect this.
\cc @zcorpan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you file an issue on that? @zcorpan is on vacation until August 9 so it's probably best to track that somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
Update: #1627
Fallout from whatwg#907. Fixes whatwg#1627.
Allow
<menuitem>
to have children giving the label(unlike
<option>
but matches Firefox)label
IDL attribute to match<option>
Fix #234: Change
<menuitem>
from void to like-<option>
menuitem
to "Generate implied end tags"<menuitem>
,<hr>
and<menu>
pop a<menuitem>
cc @smaug---- @tkent-google