| Index: sky/engine/bindings-dart/core/dart/custom/DartSVGNumberCustom.cpp
|
| diff --git a/LICENSE b/sky/engine/bindings-dart/core/dart/custom/DartSVGNumberCustom.cpp
|
| similarity index 60%
|
| copy from LICENSE
|
| copy to sky/engine/bindings-dart/core/dart/custom/DartSVGNumberCustom.cpp
|
| index 972bb2edb099e58b6a1939fa57f8e74391159c0c..5bda16e63a3d73f8b5b577e747d86319f941416e 100644
|
| --- a/LICENSE
|
| +++ b/sky/engine/bindings-dart/core/dart/custom/DartSVGNumberCustom.cpp
|
| @@ -1,4 +1,5 @@
|
| -// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Copyright 2012, Google Inc.
|
| +// All rights reserved.
|
| //
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| @@ -25,3 +26,42 @@
|
| // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| +
|
| +#include "config.h"
|
| +#include "bindings/core/dart/DartSVGNumber.h"
|
| +
|
| +namespace blink {
|
| +
|
| +namespace DartSVGNumberInternal {
|
| +
|
| +void valueGetter(Dart_NativeArguments args)
|
| +{
|
| + SVGNumberTearOff* receiver = DartDOMWrapper::receiver<SVGNumberTearOff>(args);
|
| + Dart_SetReturnValue(args, DartUtilities::doubleToDart(receiver->value()));
|
| +}
|
| +
|
| +void valueSetter(Dart_NativeArguments args)
|
| +{
|
| + Dart_Handle exception = 0;
|
| + {
|
| + SVGNumberTearOff* receiver = DartDOMWrapper::receiver<SVGNumberTearOff>(args);
|
| + float value = DartUtilities::dartToDouble(Dart_GetNativeArgument(args, 1), exception);
|
| + if (exception)
|
| + goto fail;
|
| +
|
| + DartExceptionState es;
|
| + receiver->setValue(value, es);
|
| + if (es.hadException()) {
|
| + exception = es.toDart(args);
|
| + goto fail;
|
| + }
|
| + return;
|
| + }
|
| +fail:
|
| + Dart_ThrowException(exception);
|
| + ASSERT_NOT_REACHED();
|
| +}
|
| +
|
| +}
|
| +
|
| +}
|
|
|