Index: Source/core/frame/LocalDOMWindow.cpp |
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp |
index 21ea7a4fd548428bda10d12abae0ed2e024e0215..4a9822fcbb98ec33e5b01290a1706766d895cac3 100644 |
--- a/Source/core/frame/LocalDOMWindow.cpp |
+++ b/Source/core/frame/LocalDOMWindow.cpp |
@@ -1403,8 +1403,11 @@ void LocalDOMWindow::scrollTo(const ScrollToOptions& scrollToOptions) const |
scrollViewportTo(frame(), DoublePoint(scaledX, scaledY), scrollBehavior); |
} |
-void LocalDOMWindow::moveBy(int x, int y) const |
+void LocalDOMWindow::moveBy(int x, int y, bool hasX, bool hasY) const |
{ |
+ if (!hasX || !hasY) |
+ UseCounter::count(document(), UseCounter::WindowMoveResizeMissingArguments); |
philipj_slow
2015/02/05 10:13:58
It could well be that there's only a single 1-argu
Jens Widell
2015/02/05 10:19:52
I reasoned that the possible outcomes were to eith
|
+ |
if (!frame() || !frame()->isMainFrame()) |
return; |
@@ -1420,6 +1423,9 @@ void LocalDOMWindow::moveBy(int x, int y) const |
void LocalDOMWindow::moveTo(int x, int y, bool hasX, bool hasY) const |
{ |
+ if (!hasX || !hasY) |
+ UseCounter::count(document(), UseCounter::WindowMoveResizeMissingArguments); |
+ |
if (!frame() || !frame()->isMainFrame()) |
return; |
@@ -1433,8 +1439,11 @@ void LocalDOMWindow::moveTo(int x, int y, bool hasX, bool hasY) const |
host->chrome().setWindowRect(adjustWindowRect(*frame(), windowRect)); |
} |
-void LocalDOMWindow::resizeBy(int x, int y) const |
+void LocalDOMWindow::resizeBy(int x, int y, bool hasX, bool hasY) const |
{ |
+ if (!hasX || !hasY) |
+ UseCounter::count(document(), UseCounter::WindowMoveResizeMissingArguments); |
+ |
if (!frame() || !frame()->isMainFrame()) |
return; |
@@ -1450,6 +1459,9 @@ void LocalDOMWindow::resizeBy(int x, int y) const |
void LocalDOMWindow::resizeTo(int width, int height, bool hasWidth, bool hasHeight) const |
{ |
+ if (!hasWidth || !hasHeight) |
+ UseCounter::count(document(), UseCounter::WindowMoveResizeMissingArguments); |
+ |
if (!frame() || !frame()->isMainFrame()) |
return; |