| Index: Source/bindings/dart/custom/DartElementCustom.cpp
|
| diff --git a/Source/bindings/dart/custom/DartElementCustom.cpp b/Source/bindings/dart/custom/DartElementCustom.cpp
|
| index bcb76c3cbb799a8618403f04b4cf9d4954ddadf9..8bd6865ae9aa3a26975460074af4e485a90c2089 100644
|
| --- a/Source/bindings/dart/custom/DartElementCustom.cpp
|
| +++ b/Source/bindings/dart/custom/DartElementCustom.cpp
|
| @@ -33,6 +33,7 @@
|
| #include "DartElement.h"
|
| #include "DartHTMLElement.h"
|
| #include "DartSVGElement.h"
|
| +#include "RuntimeEnabledFeatures.h"
|
| #include "bindings/dart/DartDOMWrapper.h"
|
|
|
| namespace WebCore {
|
| @@ -51,35 +52,46 @@ Dart_Handle DartElement::createWrapper(DartDOMData* domData, Element* element)
|
|
|
| namespace DartElementInternal {
|
|
|
| -void scrollLeftGetter(Dart_NativeArguments args)
|
| +
|
| +void scrollLeftSetter(Dart_NativeArguments args)
|
| {
|
| + Dart_Handle exception = 0;
|
| {
|
| - Element* receiver = DartDOMWrapper::receiver< Element >(args);
|
| + Element* receiver = DartDOMWrapper::receiver<Element>(args);
|
|
|
| - DartUtilities::setDartIntegerReturnValue(args, receiver->scrollLeft());
|
| + // FIXME: The IDL now specifies an option to pass in a dictionary
|
| + // instead of just an integer.
|
| + int scrollLeft = DartUtilities::dartToInt(args, 1, exception);
|
| + if (exception)
|
| + goto fail;
|
| +
|
| + receiver->setScrollLeft(scrollLeft);
|
| return;
|
| }
|
| +
|
| +fail:
|
| + Dart_ThrowException(exception);
|
| + ASSERT_NOT_REACHED();
|
| }
|
|
|
| -void scrollTopGetter(Dart_NativeArguments args)
|
| +void scrollTopSetter(Dart_NativeArguments args)
|
| {
|
| + Dart_Handle exception = 0;
|
| {
|
| - Element* receiver = DartDOMWrapper::receiver< Element >(args);
|
| + Element* receiver = DartDOMWrapper::receiver<Element>(args);
|
|
|
| - DartUtilities::setDartIntegerReturnValue(args, receiver->scrollTop());
|
| + // FIXME: The IDL now specifies an option to pass in a dictionary
|
| + // instead of just an integer.
|
| + int scrollTop = DartUtilities::dartToInt(args, 1, exception);
|
| + if (exception)
|
| + goto fail;
|
| +
|
| + receiver->setScrollTop(scrollTop);
|
| return;
|
| }
|
| -}
|
|
|
| -void scrollLeftSetter(Dart_NativeArguments args)
|
| -{
|
| - // FIXMEDART: implement
|
| - ASSERT_NOT_REACHED();
|
| -}
|
| -
|
| -void scrollTopSetter(Dart_NativeArguments args)
|
| -{
|
| - // FIXMEDART: implement
|
| +fail:
|
| + Dart_ThrowException(exception);
|
| ASSERT_NOT_REACHED();
|
| }
|
|
|
|
|