From 30f795caf5cb851fedaa63d947379eb94afb1c75 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 16 Mar 2015 17:13:02 -0600 Subject: [PATCH] Safari: remove dead code --- platform/safari/vapi-popup.js | 37 ----------------------------------- 1 file changed, 37 deletions(-) diff --git a/platform/safari/vapi-popup.js b/platform/safari/vapi-popup.js index 9293be358..b875657b2 100644 --- a/platform/safari/vapi-popup.js +++ b/platform/safari/vapi-popup.js @@ -21,41 +21,6 @@ (function() { 'use strict'; -var whenSizeChanges = function(elm, callback) { - var reset = function() { - k.style.width = grow.offsetWidth + 10 + "px"; - k.style.height = grow.offsetHeight + 10 + "px"; - grow.scrollLeft = grow.scrollWidth; - grow.scrollTop = grow.scrollHeight; - shrink.scrollLeft = shrink.scrollWidth; - shrink.scrollTop = shrink.scrollHeight; - w = elm.offsetWidth; - h = elm.offsetHeight; - } - var aux = document.createElement("div"); - aux.style.cssText = "position:absolute;left:0;top:0;right:0;bottom:0;overflow:scroll;z-index:-1;visibility:hidden"; - aux.innerHTML = '
\ -
\ -
\ -
\ -
\ -
'; - elm.appendChild(aux); - var grow = aux.childNodes[0], - k = grow.childNodes[0], - shrink = aux.childNodes[1]; - var w, h; - reset(); - grow.addEventListener("scroll", function() { - (elm.offsetWidth > w || elm.offsetHeight > h) && callback(); - reset(); - }); - shrink.addEventListener("scroll", function() { - (elm.offsetWidth < w || elm.offsetHeight < h) && callback(); - reset(); - }); -}; - var onLoaded = function() { var style = document.createElement("style"); style.textContent = "html,body,#panes{width:100%}#panes{white-space:nowrap;text-align:right}#panes > div:nth-of-type(2){display:inline-block !important}"; @@ -65,7 +30,6 @@ var onLoaded = function() { if(cls === "dfEnabled") { isThere = stt; setTimeout(updateSize, 0); - var _this = this, _args = arguments; } }; var body = document.body, popover = safari.self; @@ -75,7 +39,6 @@ var onLoaded = function() { popover.width = 152 + (isThere ? 320 : 0); popover.height = body.clientHeight; }; - body.style.position = "relative"; // Necessary for size change detection updateSize(); }; window.addEventListener("load", onLoaded);