Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Issue 443373002: Add <menuitem>, new HTMLMenuElement IDL attributes. (Closed)

Created:
6 years, 4 months ago by pals
Modified:
6 years, 4 months ago
Reviewers:
tkent
CC:
blink-reviews, dglazkov+blink, blink-reviews-html_chromium.org, arv+blink, Inactive
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Add <menuitem>, new HTMLMenuElement IDL attributes. Specifications: http://www.whatwg.org/specs/web-apps/current-work/#the-menu-element http://www.whatwg.org/specs/web-apps/current-work/#the-menuitem-element Changes in /parser/HTMLStackItem.h are required as per this part of specification http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#special And isSpecial() is used here http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#parsing-main-inbody with section "Any other end tag" During end tag processing, if it is a special element, it should report parseError. Changes in /parser/HTMLTreeBuilder.cpp are required as per this part of specification http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#tokenization "When a start tag token is emitted with its self-closing flag set, if the flag is not acknowledged when it is processed by the tree construction stage, that is a parse error." <menuitem> has no end tag, its a self closing tag, and it should not contain any inner node, so adding token using insertSelfClosingHTMLElement(). Changes in /rendering/RenderTheme.cpp are as per this part of specification http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#hidden-elements BUG=87553 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=180037

Patch Set 1 #

Total comments: 2

Patch Set 2 : parsing <menuitem> #

Patch Set 3 : more tests #

Total comments: 4

Patch Set 4 : No end tag #

Patch Set 5 : Added RuntimeEnabled check #

Total comments: 11

Patch Set 6 : Added more tests #

Total comments: 4

Patch Set 7 : Fixed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+270 lines, -3 lines) Patch
A LayoutTests/fast/dom/HTMLMenuElement/menu-type-popup.html View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/HTMLMenuElement/menu-type-popup-expected.html View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/HTMLMenuItemElement/menuitem-with-end-tag.html View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/HTMLMenuItemElement/menuitem-with-end-tag-expected.html View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/boolean-attribute-reflection-expected.txt View 1 chunk +12 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/domstring-attribute-reflection.html View 1 chunk +4 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/domstring-attribute-reflection-expected.txt View 1 chunk +120 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/script-tests/boolean-attribute-reflection.js View 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/fast/parser/parse-menuitem.html View 1 2 3 4 5 6 1 chunk +13 lines, -0 lines 0 comments Download
A LayoutTests/fast/parser/parse-menuitem-expected.txt View 1 2 3 4 5 6 1 chunk +13 lines, -0 lines 0 comments Download
M LayoutTests/webexposed/global-constructors-listing-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/core.gypi View 2 chunks +3 lines, -0 lines 0 comments Download
M Source/core/events/RelatedEvent.h View 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/html/HTMLElement.cpp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLMenuElement.idl View 1 chunk +2 lines, -0 lines 0 comments Download
A Source/core/html/HTMLMenuItemElement.h View 1 chunk +22 lines, -0 lines 0 comments Download
A Source/core/html/HTMLMenuItemElement.cpp View 1 chunk +20 lines, -0 lines 0 comments Download
A Source/core/html/HTMLMenuItemElement.idl View 1 1 chunk +14 lines, -0 lines 0 comments Download
M Source/core/html/HTMLTagNames.in View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/parser/HTMLStackItem.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/html/parser/HTMLTreeBuilder.cpp View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/rendering/RenderTheme.cpp View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
pals
Please take a look.
6 years, 4 months ago (2014-08-07 07:18:48 UTC) #1
tkent
Don't we need to update the HTML parser for <menuitem>? Please refer to the parser ...
6 years, 4 months ago (2014-08-07 07:26:29 UTC) #2
pals
Yes we need to update HTML parser for <menuitem>. I need some time to understand ...
6 years, 4 months ago (2014-08-07 09:46:49 UTC) #3
pals
Updated HTML parser for <menuitem> as per specification. PTAL. https://codereview.chromium.org/443373002/diff/1/Source/core/html/HTMLMenuItemElement.idl File Source/core/html/HTMLMenuItemElement.idl (right): https://codereview.chromium.org/443373002/diff/1/Source/core/html/HTMLMenuItemElement.idl#newcode13 Source/core/html/HTMLMenuItemElement.idl:13: ...
6 years, 4 months ago (2014-08-07 11:27:13 UTC) #4
tkent
This CL needs tests for the HTML parser changes.
6 years, 4 months ago (2014-08-07 13:19:52 UTC) #5
tkent
On 2014/08/07 13:19:52, tkent wrote: > This CL needs tests for the HTML parser changes. ...
6 years, 4 months ago (2014-08-07 13:54:56 UTC) #6
pals
On 2014/08/07 13:54:56, tkent wrote: > On 2014/08/07 13:19:52, tkent wrote: > > This CL ...
6 years, 4 months ago (2014-08-07 14:26:47 UTC) #7
tkent
On 2014/08/07 14:26:47, sanjoy.pal wrote: > On 2014/08/07 13:54:56, tkent wrote: > > On 2014/08/07 ...
6 years, 4 months ago (2014-08-08 00:45:17 UTC) #8
pals
On 2014/08/08 00:45:17, tkent wrote: > On 2014/08/07 14:26:47, sanjoy.pal wrote: > > On 2014/08/07 ...
6 years, 4 months ago (2014-08-08 11:49:02 UTC) #9
tkent
On 2014/08/08 11:49:02, sanjoy.pal wrote: > > Why? What does the specification say? > Specification ...
6 years, 4 months ago (2014-08-11 01:57:13 UTC) #10
tkent
https://codereview.chromium.org/443373002/diff/40001/LayoutTests/fast/parser/stray-menuitem.html File LayoutTests/fast/parser/stray-menuitem.html (right): https://codereview.chromium.org/443373002/diff/40001/LayoutTests/fast/parser/stray-menuitem.html#newcode1 LayoutTests/fast/parser/stray-menuitem.html:1: <!DOCTYPE html> This test doesn't make sense. This test ...
6 years, 4 months ago (2014-08-11 01:58:33 UTC) #11
pals
Modified the tests to check no endTag generation for <menuitem>. https://codereview.chromium.org/443373002/diff/40001/LayoutTests/fast/parser/stray-menuitem.html File LayoutTests/fast/parser/stray-menuitem.html (right): https://codereview.chromium.org/443373002/diff/40001/LayoutTests/fast/parser/stray-menuitem.html#newcode1 ...
6 years, 4 months ago (2014-08-11 09:11:58 UTC) #12
pals
On 2014/08/11 09:11:58, sanjoy.pal wrote: > Modified the tests to check no endTag generation for ...
6 years, 4 months ago (2014-08-11 09:44:10 UTC) #13
tkent
<menu type=popup><menuitem><menuitem></menu> The second <menuitem> won't be a child of the first <menuitem>, right? https://codereview.chromium.org/443373002/diff/80001/Source/core/html/parser/HTMLStackItem.h ...
6 years, 4 months ago (2014-08-11 10:23:01 UTC) #14
pals
On 2014/08/11 10:23:01, tkent wrote: > <menu type=popup><menuitem><menuitem></menu> > > The second <menuitem> won't be ...
6 years, 4 months ago (2014-08-11 11:10:44 UTC) #15
pals
<menu type=popup><menuitem><menuitem></menu> Added tests to check that the second <menuitem> won't be a child of ...
6 years, 4 months ago (2014-08-11 11:27:21 UTC) #16
tkent
https://codereview.chromium.org/443373002/diff/80001/Source/core/html/parser/HTMLStackItem.h File Source/core/html/parser/HTMLStackItem.h (right): https://codereview.chromium.org/443373002/diff/80001/Source/core/html/parser/HTMLStackItem.h#newcode182 Source/core/html/parser/HTMLStackItem.h:182: || (RuntimeEnabledFeatures::contextMenuEnabled() && tagName == HTMLNames::menuitemTag) On 2014/08/11 11:27:20, ...
6 years, 4 months ago (2014-08-11 13:36:57 UTC) #17
pals
Updated the CL description. Please take another look. https://codereview.chromium.org/443373002/diff/80001/Source/core/html/parser/HTMLStackItem.h File Source/core/html/parser/HTMLStackItem.h (right): https://codereview.chromium.org/443373002/diff/80001/Source/core/html/parser/HTMLStackItem.h#newcode182 Source/core/html/parser/HTMLStackItem.h:182: || ...
6 years, 4 months ago (2014-08-11 14:07:08 UTC) #18
tkent
> Changes in /parser/HTMLTreeBuilder.cpp are required as per this part of specification > http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#parsing-main-inbody > ...
6 years, 4 months ago (2014-08-11 16:01:02 UTC) #19
pals
On 2014/08/11 16:01:02, tkent wrote: > > Changes in /parser/HTMLTreeBuilder.cpp are required as per this ...
6 years, 4 months ago (2014-08-11 16:41:32 UTC) #20
tkent
On 2014/08/11 16:41:32, sanjoy.pal wrote: > On 2014/08/11 16:01:02, tkent wrote: > > > Changes ...
6 years, 4 months ago (2014-08-11 16:55:35 UTC) #21
tkent
On 2014/08/11 16:55:35, tkent wrote: > On 2014/08/11 16:41:32, sanjoy.pal wrote: > > On 2014/08/11 ...
6 years, 4 months ago (2014-08-11 16:56:13 UTC) #22
pals
On 2014/08/11 16:56:13, tkent wrote: > On 2014/08/11 16:55:35, tkent wrote: > > On 2014/08/11 ...
6 years, 4 months ago (2014-08-11 17:11:47 UTC) #23
pals
On 2014/08/11 16:55:35, tkent wrote: > On 2014/08/11 16:41:32, sanjoy.pal wrote: > > On 2014/08/11 ...
6 years, 4 months ago (2014-08-11 18:14:45 UTC) #24
pals
Sorry, I was editing from a mobile browser yesterday, I wrongly quoted the statement about ...
6 years, 4 months ago (2014-08-12 04:09:36 UTC) #25
tkent
ok, the current CL description sounds reasonable, and the code change looks to follow the ...
6 years, 4 months ago (2014-08-12 05:01:05 UTC) #26
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 4 months ago (2014-08-12 05:01:42 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sanjoy.pal@samsung.com/443373002/120001
6 years, 4 months ago (2014-08-12 05:02:49 UTC) #28
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: blink_presubmit on tryserver.blink ...
6 years, 4 months ago (2014-08-12 05:47:32 UTC) #29
commit-bot: I haz the power
6 years, 4 months ago (2014-08-12 06:50:08 UTC) #30
Message was sent while issue was closed.
Change committed as 180037

Powered by Google App Engine
This is Rietveld 408576698