From 44e3dff6ef26283484a82304489beb1020b92d21 Mon Sep 17 00:00:00 2001 From: "mfinkle@mozilla.com" Date: Wed, 7 May 2008 18:57:23 -0500 Subject: [PATCH] more canvas panning fixes --HG-- branch : mobile --- mobile/chrome/content/deckbrowser.xml | 56 +++++++++++---------------- 1 file changed, 23 insertions(+), 33 deletions(-) diff --git a/mobile/chrome/content/deckbrowser.xml b/mobile/chrome/content/deckbrowser.xml index d115c0cbee62..94b804e4158b 100644 --- a/mobile/chrome/content/deckbrowser.xml +++ b/mobile/chrome/content/deckbrowser.xml @@ -42,6 +42,14 @@ document.getAnonymousElementByAttribute(this, "anonid", "container"); + + document.getAnonymousElementByAttribute(this, "anonid", "tabspace"); + + + + document.getAnonymousElementByAttribute(this, "anonid", "renderspace"); + + null @@ -179,7 +187,6 @@ 0) tabs.removeChild(tabs.childNodes[0]); @@ -207,7 +214,7 @@ var page = document.getAnonymousElementByAttribute(deckpage, "anonid", "page"); function _selectTab(aEvent) { self.show(target); - tabspace.collapsed = true; + self._tabspace.collapsed = true; self._container.collapsed = false; } page.addEventListener("click", _selectTab, false); @@ -215,7 +222,7 @@ var close = document.getAnonymousElementByAttribute(deckpage, "anonid", "close"); function _closeTab(aEvent) { self.removeBrowser(target); - tabspace.collapsed = true; + self._tabspace.collapsed = true; self._container.collapsed = false; }; close.addEventListener("click", _closeTab, false); @@ -237,38 +244,26 @@ } this._container.collapsed = true; - tabspace.collapsed = false; + this._renderspace.collapse = true; + this._tabspace.collapsed = false; ]]> - - 0 - - - - 0 - - domWin.innerWidth * 2) - canvasW = domWin.innerWidth * 2; - if (canvasH > domWin.innerHeight * 2) - canvasH = domWin.innerHeight * 2; canvas.width = canvasW; canvas.height = canvasH; var ctx = canvas.getContext("2d"); ctx.clearRect(0, 0, canvasW, canvasH); var stime = Date.now(); - ctx.drawWindow(domWin, domWin.scrollX, domWin.scrollY, canvasW, canvasH, "rgba(0,0,0,0)"); + ctx.drawWindow(domWin, domWin.scrollX, domWin.scrollY, domWin.innerWidth, domWin.innerHeight, "rgba(0,0,0,0)"); var etime = Date.now(); dump("drawWindow: " + (etime - stime) + " ms\n"); ]]> @@ -279,12 +274,14 @@ @@ -295,8 +292,7 @@ @@ -306,20 +302,14 @@