Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / tools / telemetry / telemetry / page / actions / gesture_common.js
index d977e37..1d21628 100644 (file)
                  left: bound.left,
                  width: bound.width,
                  height: bound.height };
+    if (rect.top < 0) {
+      rect.height += rect.top;
+      rect.top = 0;
+    }
+    if (rect.left < 0) {
+      rect.width += rect.left;
+      rect.left = 0;
+    }
+
     var outsideHeight = (rect.top + rect.height) - window.innerHeight;
     var outsideWidth = (rect.left + rect.width) - window.innerWidth;