Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 3670c60

Browse files
committed
Merge pull request #16 from Hixie/remove-event-target
Remove EventTarget, and subsequent fallout.
2 parents b3ad3c4 + ce5aa75 commit 3670c60

File tree

177 files changed

+168
-9379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+168
-9379
lines changed

sky/engine/bindings/BUILD.gn

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@ source_set("bindings") {
1313
"builtin_natives.h",
1414
"builtin_sky.cc",
1515
"builtin_sky.h",
16-
"custom/dart_element_custom.cc",
1716
"dart_callback.cc",
1817
"dart_callback.h",
19-
"dart_event_listener.cc",
20-
"dart_event_listener.h",
2118
"exception_messages.cc",
2219
"exception_messages.h",
2320
"exception_state.cc",

sky/engine/bindings/IDLExtendedAttributes.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,8 @@
3535

3636
ActiveDOMObject
3737
CachedAttribute=*
38-
CallWith=ExecutionContext|ScriptState|ScriptArguments|ActiveWindow|FirstWindow|ThisValue
38+
CallWith=ScriptState|ScriptArguments|ActiveWindow|FirstWindow|ThisValue
3939
Constructor
40-
# FIXME: remove [ConstructorCallWith=Document], as can instead use
41-
# [ConstructorCallWith=ExecutionContext] + toDocument(executionContext)
42-
ConstructorCallWith=ExecutionContext|Document
4340
Custom=|Getter|Setter|VisitDOMWrapper|Wrap|PropertyGetter|PropertyEnumerator|PropertyQuery
4441
CustomConstructor
4542
CustomElementCallbacks

sky/engine/bindings/builtin_sky.cc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ BuiltinSky::BuiltinSky(DOMDartState* dart_state) {
2020
BuiltinSky::~BuiltinSky() {
2121
}
2222

23-
void BuiltinSky::InstallWindow(DOMDartState* dart_state) {
24-
CHECK(!LogIfError(Dart_SetField(library_.value(),
25-
ToDart("window"),
26-
ToDart(dart_state->CurrentWindow()))));
27-
// TODO(abarth): Retain the document wrapper.
28-
}
29-
3023
void BuiltinSky::InstallView(View* view) {
3124
CHECK(!LogIfError(
3225
Dart_SetField(library_.value(), ToDart("view"), ToDart(view))));

sky/engine/bindings/builtin_sky.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class BuiltinSky : public DartClassProvider {
1919
explicit BuiltinSky(DOMDartState* dart_state);
2020
~BuiltinSky();
2121

22-
void InstallWindow(DOMDartState* dart_state);
2322
void InstallView(View* view);
2423

2524
// DartClassProvider:

sky/engine/bindings/custom/dart_element_custom.cc

Lines changed: 0 additions & 36 deletions
This file was deleted.

sky/engine/bindings/dart_event_listener.cc

Lines changed: 0 additions & 84 deletions
This file was deleted.

sky/engine/bindings/dart_event_listener.h

Lines changed: 0 additions & 59 deletions
This file was deleted.

sky/engine/bindings/scheduled_action.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ScheduledAction::ScheduledAction(DartState* dart_state, Dart_Handle closure)
1919
ScheduledAction::~ScheduledAction() {
2020
}
2121

22-
void ScheduledAction::Execute(ExecutionContext*) {
22+
void ScheduledAction::Execute() {
2323
if (!closure_.dart_state())
2424
return;
2525
DartIsolateScope scope(closure_.dart_state()->isolate());

sky/engine/bindings/scheduled_action.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ScheduledAction {
2424

2525
~ScheduledAction();
2626

27-
void Execute(ExecutionContext*);
27+
void Execute();
2828

2929
private:
3030
ScheduledAction(DartState* dart_state, Dart_Handle closure);

sky/engine/bindings/scripts/dart_methods.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,6 @@ def cpp_argument(argument):
158158
if idl_type.name == 'MojoDataPipeConsumer':
159159
return '%s.Pass()' % argument_name
160160

161-
if idl_type.name == 'EventListener':
162-
if (interface.name == 'EventTarget' and
163-
method.name == 'removeEventListener'):
164-
# FIXME: remove this special case by moving get() into
165-
# EventTarget::removeEventListener
166-
return '%s.get()' % argument_name
167-
return argument.name
168161
if idl_type.is_callback_interface:
169162
return '%s.release()' % argument_name
170163
return argument_name
@@ -235,11 +228,8 @@ def dart_value_to_local_cpp_value(interface, has_type_checking_interface,
235228
idl_type = argument.idl_type
236229
name = argument.name
237230

238-
# FIXME: V8 has some special logic around the addEventListener and
239-
# removeEventListener methods that should be added in somewhere.
240-
# There is also some logic in systemnative.py to force a null check
241-
# for the useCapture argument of those same methods that we may need to
242-
# pull over.
231+
# TODO(ianh): why don't we need to null-check everything?
232+
# https://github.com/domokit/mojo/issues/280
243233
null_check = ((argument.is_optional and idl_type.is_callback_interface) or
244234
(argument.default_value and argument.default_value.is_null))
245235

0 commit comments

Comments
 (0)