| Index: Source/core/dom/Element.cpp
|
| diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
|
| index 7b03118ae897022f701741706f20b8edaf64215f..db59ce86a121e02ae0631ec87effbfc25a784ae8 100644
|
| --- a/Source/core/dom/Element.cpp
|
| +++ b/Source/core/dom/Element.cpp
|
| @@ -27,6 +27,7 @@
|
| #include "core/dom/Element.h"
|
|
|
| #include "bindings/core/v8/Dictionary.h"
|
| +#include "bindings/core/v8/DictionaryHelper.h"
|
| #include "bindings/core/v8/ExceptionMessages.h"
|
| #include "bindings/core/v8/ExceptionState.h"
|
| #include "core/CSSValueKeywords.h"
|
| @@ -711,7 +712,7 @@ void Element::setScrollLeft(const Dictionary& scrollOptionsHorizontal, Exception
|
| {
|
| String scrollBehaviorString;
|
| ScrollBehavior scrollBehavior = ScrollBehaviorAuto;
|
| - if (scrollOptionsHorizontal.get("behavior", scrollBehaviorString)) {
|
| + if (DictionaryHelper::get(scrollOptionsHorizontal, "behavior", scrollBehaviorString)) {
|
| if (!ScrollableArea::scrollBehaviorFromString(scrollBehaviorString, scrollBehavior)) {
|
| exceptionState.throwTypeError("The ScrollBehavior provided is invalid.");
|
| return;
|
| @@ -719,7 +720,7 @@ void Element::setScrollLeft(const Dictionary& scrollOptionsHorizontal, Exception
|
| }
|
|
|
| int position;
|
| - if (!scrollOptionsHorizontal.get("x", position)) {
|
| + if (!DictionaryHelper::get(scrollOptionsHorizontal, "x", position)) {
|
| exceptionState.throwTypeError("ScrollOptionsHorizontal must include an 'x' member.");
|
| return;
|
| }
|
| @@ -757,7 +758,7 @@ void Element::setScrollTop(const Dictionary& scrollOptionsVertical, ExceptionSta
|
| {
|
| String scrollBehaviorString;
|
| ScrollBehavior scrollBehavior = ScrollBehaviorAuto;
|
| - if (scrollOptionsVertical.get("behavior", scrollBehaviorString)) {
|
| + if (DictionaryHelper::get(scrollOptionsVertical, "behavior", scrollBehaviorString)) {
|
| if (!ScrollableArea::scrollBehaviorFromString(scrollBehaviorString, scrollBehavior)) {
|
| exceptionState.throwTypeError("The ScrollBehavior provided is invalid.");
|
| return;
|
| @@ -765,7 +766,7 @@ void Element::setScrollTop(const Dictionary& scrollOptionsVertical, ExceptionSta
|
| }
|
|
|
| int position;
|
| - if (!scrollOptionsVertical.get("y", position)) {
|
| + if (!DictionaryHelper::get(scrollOptionsVertical, "y", position)) {
|
| exceptionState.throwTypeError("ScrollOptionsVertical must include a 'y' member.");
|
| return;
|
| }
|
|
|