Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: safari/ext/popup.js

Issue 5083364310646784: Got rid of strange animation when the bubble is resized while reloading on Safari (Closed)
Patch Set: Addressed comment Created Jan. 17, 2014, noon
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: safari/ext/popup.js
===================================================================
--- a/safari/ext/popup.js
+++ b/safari/ext/popup.js
@@ -9,11 +9,13 @@
var backgroundPage = safari.extension.globalPage.contentWindow;
var readyState = backgroundPage.document.readyState;
var activeTab = safari.application.activeBrowserWindow.activeTab;
+ var mayResize = true;
safari.self.addEventListener("popover", function()
{
if (activeTab != safari.application.activeBrowserWindow.activeTab || readyState != "complete")
{
+ mayResize = false;
document.documentElement.style.display = "none";
document.location.reload();
}
@@ -25,8 +27,11 @@
// event listeners to do so.
var updateSize = function()
{
- safari.self.width = document.body.offsetWidth;
- safari.self.height = document.body.offsetHeight;
+ if (mayResize)
+ {
+ safari.self.width = document.body.offsetWidth;
+ safari.self.height = document.body.offsetHeight;
+ ]
};
window.addEventListener("load", function()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld