Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/DOMRectReadOnly.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/DOMRectReadOnly.cpp b/third_party/WebKit/Source/core/dom/DOMRectReadOnly.cpp |
| index 3b09920df6ed806de5715b72aeff6ee9a89f1750..292161f84cda0cb3758087e07301f33b340cf9ad 100644 |
| --- a/third_party/WebKit/Source/core/dom/DOMRectReadOnly.cpp |
| +++ b/third_party/WebKit/Source/core/dom/DOMRectReadOnly.cpp |
| @@ -6,6 +6,7 @@ |
| #include "bindings/core/v8/ScriptValue.h" |
| #include "bindings/core/v8/V8ObjectBuilder.h" |
| +#include "core/dom/DOMRectInit.h" |
| namespace blink { |
| @@ -29,6 +30,10 @@ ScriptValue DOMRectReadOnly::toJSONForBinding(ScriptState* scriptState) const { |
| return result.scriptValue(); |
| } |
| +DOMRectReadOnly* DOMRectReadOnly::fromRect(const DOMRectInit& other) { |
| + return new DOMRectReadOnly(other.x(), other.y(), other.width(), other.height()); |
|
zino
2017/01/14 17:11:34
nit: Please remove unnecessary blanks.
Byoungkwon Ko
2017/01/15 02:49:08
Done.
|
| +} |
| + |
| DOMRectReadOnly::DOMRectReadOnly(double x, |
| double y, |
| double width, |