| Index: Source/WebCore/bindings/dart/custom/DartHTMLMediaElementCustom.cpp
|
| diff --git a/Source/WebCore/bindings/dart/custom/DartHTMLMediaElementCustom.cpp b/Source/WebCore/bindings/dart/custom/DartHTMLMediaElementCustom.cpp
|
| index cb213cafefb1315439c0dbf1e5383679b8932b2e..2ac10971a95856c0be91c7632b55349aaa51b6f5 100644
|
| --- a/Source/WebCore/bindings/dart/custom/DartHTMLMediaElementCustom.cpp
|
| +++ b/Source/WebCore/bindings/dart/custom/DartHTMLMediaElementCustom.cpp
|
| @@ -33,14 +33,33 @@
|
|
|
| #include "DartHTMLMediaElement.h"
|
|
|
| +#include "DartMediaController.h"
|
| +
|
| namespace WebCore {
|
|
|
| namespace DartHTMLMediaElementInternal {
|
|
|
| -void controllerSetter(Dart_NativeArguments)
|
| +void controllerSetter(Dart_NativeArguments args)
|
| {
|
| - // FIXME: proper implementation.
|
| - DART_UNIMPLEMENTED();
|
| + DartApiScope dartApiScope;
|
| + Dart_Handle exception = 0;
|
| + {
|
| + HTMLMediaElement* receiver = DartDOMWrapper::receiver<HTMLMediaElement>(args);
|
| + MediaController* controller = DartDOMWrapper::unwrapDartWrapper<DartMediaController>(Dart_GetNativeArgument(args, 1), exception);
|
| + if (exception)
|
| + goto fail;
|
| +
|
| + // 4.8.10.11.2 Media controllers: controller attribute.
|
| + // On setting, it must first remove the element's mediagroup attribute, if any,
|
| + receiver->setMediaGroup(String());
|
| + // and then set the current media controller to the given value.
|
| + receiver->setController(controller);
|
| + return;
|
| + }
|
| +
|
| +fail:
|
| + Dart_ThrowException(exception);
|
| + ASSERT_NOT_REACHED();
|
| }
|
|
|
| }
|
|
|