Upstream version 7.35.139.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / devtools / front_end / Popover.js
index 14ee959..d183d2a 100644 (file)
@@ -182,8 +182,8 @@ WebInspector.Popover.prototype = {
         } else {
             // Positioning below the anchor.
             newElementPosition.y = anchorBox.y + anchorBox.height + arrowHeight;
-            if ((newElementPosition.y + newElementPosition.height + arrowHeight - borderWidth >= totalHeight) && (arrowDirection !== WebInspector.Popover.Orientation.Top)) {
-                newElementPosition.height = totalHeight - anchorBox.y - anchorBox.height - borderRadius * 2 - arrowHeight;
+            if ((newElementPosition.y + newElementPosition.height + borderRadius >= totalHeight) && (arrowDirection !== WebInspector.Popover.Orientation.Top)) {
+                newElementPosition.height = totalHeight - borderRadius - newElementPosition.y;
                 if (this._hasFixedHeight && newElementPosition.height < preferredHeight) {
                     newElementPosition.y = totalHeight - preferredHeight - borderRadius;
                     newElementPosition.height = preferredHeight;