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

Issue 424163002: Enable the WebIDL [Exposed] annotation on an interface's members. (Closed)

Created:
6 years, 4 months ago by Peter Beverloo
Modified:
6 years, 4 months ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, arv+blink, abarth-chromium
Project:
blink
Visibility:
Public.

Description

Enable the WebIDL [Exposed] annotation on an interface's members. Blink only supports [Exposed] as an interface-level annotation right now, but it also makes sense as a member-level annotation in case certain members should only be available in a subset of the interface's exposure set. The first user for this will be the Web Notifications API, which now defines requestPermission() to only be exposed on Document, whereas the rest of the API will be available in both windows and workers. BUG=398446 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=179418 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=179947

Patch Set 1 #

Patch Set 2 : remove some noise #

Total comments: 26

Patch Set 3 : second iteration #

Total comments: 1

Patch Set 4 : address comments #

Total comments: 19

Patch Set 5 : comments and merge test files #

Total comments: 2

Patch Set 6 : #

Total comments: 4

Patch Set 7 : compile fixes, comment #

Patch Set 8 : potential interactive_ui_tests fix #

Patch Set 9 : rebased #

Patch Set 10 : missed renames #

Unified diffs Side-by-side diffs Delta from patch set Stats (+480 lines, -165 lines) Patch
M Source/bindings/core/v8/V8WindowShell.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/scripts/code_generator_v8.py View 1 2 3 4 5 2 chunks +25 lines, -5 lines 0 comments Download
M Source/bindings/scripts/v8_attributes.py View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/scripts/v8_interface.py View 1 2 3 4 5 6 7 8 6 chunks +10 lines, -7 lines 0 comments Download
M Source/bindings/scripts/v8_methods.py View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/scripts/v8_utilities.py View 1 2 3 4 5 6 7 8 2 chunks +51 lines, -0 lines 0 comments Download
M Source/bindings/templates/interface.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/templates/interface.cpp View 1 2 3 4 5 6 7 8 9 6 chunks +27 lines, -20 lines 0 comments Download
M Source/bindings/templates/interface_base.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/tests/idls/TestInterface.idl View 1 2 3 4 5 6 7 8 2 chunks +16 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8SVGTestInterface.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8SVGTestInterface.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestException.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestException.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterface.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterface.cpp View 1 2 3 4 5 6 7 8 9 7 chunks +222 lines, -13 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterface2.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterface2.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterface3.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterface3.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceCheckSecurity.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceCheckSecurity.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor.cpp View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor2.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor3.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor3.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor4.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor4.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceCustomConstructor.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceCustomConstructor.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceDocument.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceDocument.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEmpty.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEmpty.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEventConstructor.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEventTarget.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEventTarget.cpp View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceGarbageCollected.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceGarbageCollected.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.cpp View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNode.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNode.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/tests/results/V8TestNode.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestNode.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestObject.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestObject.cpp View 1 2 3 4 5 6 7 8 9 3 chunks +11 lines, -10 lines 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperations.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperations.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsNotEnumerable.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsNotEnumerable.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestTypedefs.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestTypedefs.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/dom/ExecutionContext.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/dom/ExecutionContextClient.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/workers/WorkerGlobalScope.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
Peter Beverloo
First draft with some questions. It'd be great if you'd have some time to look ...
6 years, 4 months ago (2014-07-29 17:40:26 UTC) #1
Jens Widell
The design looks good to me; doesn't seem to add much complexity, which is nice. ...
6 years, 4 months ago (2014-07-29 18:24:30 UTC) #2
Inactive
https://codereview.chromium.org/424163002/diff/20001/Source/bindings/tests/idls/TestExposedInterface.idl File Source/bindings/tests/idls/TestExposedInterface.idl (right): https://codereview.chromium.org/424163002/diff/20001/Source/bindings/tests/idls/TestExposedInterface.idl#newcode6 Source/bindings/tests/idls/TestExposedInterface.idl:6: Exposed=Worker&Window&ServiceWorker On 2014/07/29 18:24:29, Jens Lindström wrote: > We ...
6 years, 4 months ago (2014-07-29 18:54:47 UTC) #3
haraken
(I'm happy to take another look once Jens comments are addressed.) https://codereview.chromium.org/424163002/diff/20001/Source/bindings/scripts/v8_utilities.py File Source/bindings/scripts/v8_utilities.py (right): ...
6 years, 4 months ago (2014-07-29 20:13:11 UTC) #4
bashi
https://codereview.chromium.org/424163002/diff/20001/Source/bindings/scripts/v8_utilities.py File Source/bindings/scripts/v8_utilities.py (right): https://codereview.chromium.org/424163002/diff/20001/Source/bindings/scripts/v8_utilities.py#newcode236 Source/bindings/scripts/v8_utilities.py:236: exposure_set = set(extended_attributes['Exposed'].split('&')) extended_attributes['Exposed'].split('[|&]') ? I understand that the ...
6 years, 4 months ago (2014-07-30 00:34:34 UTC) #5
Peter Beverloo
Thank you for the great comments so far!! https://codereview.chromium.org/424163002/diff/20001/Source/bindings/scripts/v8_interface.py File Source/bindings/scripts/v8_interface.py (right): https://codereview.chromium.org/424163002/diff/20001/Source/bindings/scripts/v8_interface.py#newcode244 Source/bindings/scripts/v8_interface.py:244: 'has_conditional_attributes': ...
6 years, 4 months ago (2014-07-30 14:48:16 UTC) #6
Jens Widell
https://codereview.chromium.org/424163002/diff/20001/Source/bindings/templates/interface.cpp File Source/bindings/templates/interface.cpp (right): https://codereview.chromium.org/424163002/diff/20001/Source/bindings/templates/interface.cpp#newcode1170 Source/bindings/templates/interface.cpp:1170: {% else %} On 2014/07/30 14:48:15, Peter Beverloo wrote: ...
6 years, 4 months ago (2014-07-30 15:16:18 UTC) #7
Peter Beverloo
Addressed. Thanks! On 2014/07/30 15:16:18, Jens Lindström wrote: > https://codereview.chromium.org/424163002/diff/20001/Source/bindings/templates/interface.cpp > File Source/bindings/templates/interface.cpp (right): > ...
6 years, 4 months ago (2014-07-30 16:03:46 UTC) #8
haraken
Just a couple of nits. https://codereview.chromium.org/424163002/diff/60001/Source/bindings/scripts/code_generator_v8.py File Source/bindings/scripts/code_generator_v8.py (right): https://codereview.chromium.org/424163002/diff/60001/Source/bindings/scripts/code_generator_v8.py#newcode242 Source/bindings/scripts/code_generator_v8.py:242: 'custom_exposed': custom_exposed_if, "custom" is ...
6 years, 4 months ago (2014-07-30 16:32:03 UTC) #9
Jens Widell
https://codereview.chromium.org/424163002/diff/60001/Source/bindings/scripts/code_generator_v8.py File Source/bindings/scripts/code_generator_v8.py (right): https://codereview.chromium.org/424163002/diff/60001/Source/bindings/scripts/code_generator_v8.py#newcode271 Source/bindings/scripts/code_generator_v8.py:271: return generate_indented_conditional(code, 'context && (%s)' % custom_exposed_rules) Can 'context' ...
6 years, 4 months ago (2014-07-30 16:48:45 UTC) #10
Peter Beverloo
Thank you for your comments and patience! I merged the test file in TestInterface.idl per ...
6 years, 4 months ago (2014-07-31 19:02:22 UTC) #11
Jens Widell
https://codereview.chromium.org/424163002/diff/80001/Source/bindings/templates/interface.cpp File Source/bindings/templates/interface.cpp (right): https://codereview.chromium.org/424163002/diff/80001/Source/bindings/templates/interface.cpp#newcode1191 Source/bindings/templates/interface.cpp:1191: {% for method in per_context_enabled_methods %} Should we group ...
6 years, 4 months ago (2014-07-31 19:47:11 UTC) #12
haraken
LGTM with Jen's comment addressed.
6 years, 4 months ago (2014-07-31 19:51:46 UTC) #13
Peter Beverloo
Thank you for the reviews! Jens, would you mind confirming that this is what you ...
6 years, 4 months ago (2014-08-01 14:04:01 UTC) #14
Jens Widell
LGTM, with a small further improvement suggested. https://codereview.chromium.org/424163002/diff/100001/Source/bindings/scripts/v8_interface.py File Source/bindings/scripts/v8_interface.py (right): https://codereview.chromium.org/424163002/diff/100001/Source/bindings/scripts/v8_interface.py#newcode268 Source/bindings/scripts/v8_interface.py:268: conditionally_exposed_methods = ...
6 years, 4 months ago (2014-08-01 14:21:28 UTC) #15
Peter Beverloo
https://codereview.chromium.org/424163002/diff/100001/Source/bindings/scripts/v8_interface.py File Source/bindings/scripts/v8_interface.py (right): https://codereview.chromium.org/424163002/diff/100001/Source/bindings/scripts/v8_interface.py#newcode268 Source/bindings/scripts/v8_interface.py:268: conditionally_exposed_methods = [] On 2014/08/01 14:21:27, Jens Lindström wrote: ...
6 years, 4 months ago (2014-08-01 14:30:44 UTC) #16
Jens Widell
On 2014/08/01 14:30:44, Peter Beverloo wrote: > https://codereview.chromium.org/424163002/diff/100001/Source/bindings/scripts/v8_interface.py > File Source/bindings/scripts/v8_interface.py (right): > > https://codereview.chromium.org/424163002/diff/100001/Source/bindings/scripts/v8_interface.py#newcode268 ...
6 years, 4 months ago (2014-08-01 14:38:29 UTC) #17
Peter Beverloo
The CQ bit was checked by peter@chromium.org
6 years, 4 months ago (2014-08-01 19:42:51 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/peter@chromium.org/424163002/120001
6 years, 4 months ago (2014-08-01 19:43:22 UTC) #19
commit-bot: I haz the power
Change committed as 179418
6 years, 4 months ago (2014-08-01 20:20:17 UTC) #20
enne (OOO)
A revert of this CL has been created in https://codereview.chromium.org/426583003/ by enne@chromium.org. The reason for ...
6 years, 4 months ago (2014-08-01 23:25:07 UTC) #21
Peter Beverloo
Uploaded patch set 8 to fix the interactive_ui_tests case. Rationale in the bug: https://code.google.com/p/chromium/issues/detail?id=398446#c11
6 years, 4 months ago (2014-08-05 14:53:10 UTC) #22
Peter Beverloo
On 2014/08/05 14:53:10, Peter Beverloo wrote: > Uploaded patch set 8 to fix the interactive_ui_tests ...
6 years, 4 months ago (2014-08-11 12:46:51 UTC) #23
Peter Beverloo
The CQ bit was checked by peter@chromium.org
6 years, 4 months ago (2014-08-11 12:46:58 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/peter@chromium.org/424163002/180001
6 years, 4 months ago (2014-08-11 12:47:44 UTC) #25
commit-bot: I haz the power
6 years, 4 months ago (2014-08-11 13:51:03 UTC) #26
Message was sent while issue was closed.
Change committed as 179947

Powered by Google App Engine
This is Rietveld 408576698