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

Issue 704503002: IDL: Union type support for attributes (Closed)

Created:
6 years, 1 month ago by bashi
Modified:
6 years, 1 month ago
Reviewers:
haraken, Jens Widell
CC:
blink-reviews, blink-reviews-bindings_chromium.org, arv+blink, Inactive
Base URL:
https://chromium.googlesource.com/chromium/blink.git@union-arraybuffer
Project:
blink
Visibility:
Public.

Description

IDL: Union type support for attributes Some specs use union type attributes. For example, TrackEvent[1] has 'track' attribute, of which type is (VideoTrack or AudioTrack or TextTrack). Let's support union type attributes so that we can reduce custom bindings. Follow-up CLs will replace custom bindings if possible. BUG=240176 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=184847

Patch Set 1 : #

Total comments: 1

Patch Set 2 : #

Total comments: 9

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+280 lines, -49 lines) Patch
M LayoutTests/fast/dom/idl-union-type-unittest.html View 1 2 1 chunk +20 lines, -2 lines 0 comments Download
M LayoutTests/fast/dom/idl-union-type-unittest-expected.txt View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M Source/bindings/scripts/v8_attributes.py View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M Source/bindings/scripts/v8_interface.py View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/scripts/v8_methods.py View 1 2 3 chunks +2 lines, -6 lines 0 comments Download
M Source/bindings/scripts/v8_types.py View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M Source/bindings/templates/attributes.cpp View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M Source/bindings/templates/union.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/templates/union.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/idls/core/TestObject.idl View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/core/UnionTypesCore.h View 9 chunks +57 lines, -18 lines 0 comments Download
M Source/bindings/tests/results/core/UnionTypesCore.cpp View 18 chunks +84 lines, -18 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestObject.cpp View 2 chunks +34 lines, -0 lines 0 comments Download
M Source/core/testing/UnionTypesTest.h View 1 chunk +16 lines, -1 line 0 comments Download
M Source/core/testing/UnionTypesTest.cpp View 1 2 1 chunk +31 lines, -0 lines 0 comments Download
M Source/core/testing/UnionTypesTest.idl View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (5 generated)
bashi
Hi, could you review this CL? https://codereview.chromium.org/704503002/diff/40001/Source/bindings/templates/union.h File Source/bindings/templates/union.h (right): https://codereview.chromium.org/704503002/diff/40001/Source/bindings/templates/union.h#newcode29 Source/bindings/templates/union.h:29: {{member.rvalue_cpp_type}} getAs{{member.type_name}}() const; ...
6 years, 1 month ago (2014-11-04 11:32:49 UTC) #4
Jens Widell
LGTM https://codereview.chromium.org/704503002/diff/60001/Source/bindings/scripts/v8_attributes.py File Source/bindings/scripts/v8_attributes.py (right): https://codereview.chromium.org/704503002/diff/60001/Source/bindings/scripts/v8_attributes.py#newcode240 Source/bindings/scripts/v8_attributes.py:240: if attribute.idl_type.is_union_type: Use v8_methods.use_output_parameter_for_result() perhaps? And if so ...
6 years, 1 month ago (2014-11-04 12:19:07 UTC) #5
haraken
LGTM https://codereview.chromium.org/704503002/diff/60001/LayoutTests/fast/dom/idl-union-type-unittest.html File LayoutTests/fast/dom/idl-union-type-unittest.html (right): https://codereview.chromium.org/704503002/diff/60001/LayoutTests/fast/dom/idl-union-type-unittest.html#newcode19 LayoutTests/fast/dom/idl-union-type-unittest.html:19: shouldBeEqualToString('unionTypesTest.doubleOrStringAttribute', 'undefined'); Nit: shouldBeUndefined https://codereview.chromium.org/704503002/diff/60001/LayoutTests/fast/dom/idl-union-type-unittest.html#newcode21 LayoutTests/fast/dom/idl-union-type-unittest.html:21: shouldBeEqualToString('unionTypesTest.doubleOrStringAttribute', 'null'); ...
6 years, 1 month ago (2014-11-04 23:50:09 UTC) #6
bashi
Thank you for reviews! https://codereview.chromium.org/704503002/diff/60001/LayoutTests/fast/dom/idl-union-type-unittest.html File LayoutTests/fast/dom/idl-union-type-unittest.html (right): https://codereview.chromium.org/704503002/diff/60001/LayoutTests/fast/dom/idl-union-type-unittest.html#newcode13 LayoutTests/fast/dom/idl-union-type-unittest.html:13: shouldBeNull('unionTypesTest.doubleOrStringAttribute'); I noticed this is ...
6 years, 1 month ago (2014-11-05 00:17:33 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/704503002/100001
6 years, 1 month ago (2014-11-05 00:57:59 UTC) #10
commit-bot: I haz the power
6 years, 1 month ago (2014-11-05 01:40:24 UTC) #11
Message was sent while issue was closed.
Committed patchset #3 (id:100001) as 184847

Powered by Google App Engine
This is Rietveld 408576698