From 84032e42d1e485cff2ffeacde114638c29213f66 Mon Sep 17 00:00:00 2001 From: Ali Juma Date: Tue, 7 Feb 2012 11:26:52 -0500 Subject: [PATCH 01/12] Fix delayed rendering after orientation change. --- gfx/layers/ipc/CompositorParent.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index b711b63ed63..038e3f612be 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -104,13 +104,11 @@ CompositorParent::PauseComposition() void CompositorParent::ResumeComposition() { - if (mPaused) { - mPaused = false; + mPaused = false; #ifdef MOZ_WIDGET_ANDROID - static_cast(mLayerManager.get())->gl()->RenewSurface(); + static_cast(mLayerManager.get())->gl()->RenewSurface(); #endif - } } void From da17ffe288fe74b8e42bc2182b65be2e1d350ed5 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 7 Feb 2012 22:17:54 -0800 Subject: [PATCH 02/12] Have the compositor thread manipulate the layer with a display port if there is one --- gfx/layers/ipc/CompositorParent.cpp | 34 +++++++++++++++++++++++++++-- gfx/layers/ipc/CompositorParent.h | 6 +++++ 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index 038e3f612be..1f74c8740a7 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -182,13 +182,43 @@ CompositorParent::Composite() printf_stderr("Correcting for position fixed %i, %i\n", -mScrollOffset.x, -mScrollOffset.y); worldTransform.Translate(offset); worldTransform.Scale(mXScale, mYScale, 1.0f); - Layer* root = mLayerManager->GetRoot(); - root->AsShadowLayer()->SetShadowTransform(worldTransform); + Layer* layer = GetPrimaryScrollableLayer(); + layer->AsShadowLayer()->SetShadowTransform(worldTransform); mLayerManager->EndEmptyTransaction(); mLastCompose = mozilla::TimeStamp::Now(); } +// Do a breadth-first search to find the first layer in the tree with a +// displayport set. +Layer* +CompositorParent::GetPrimaryScrollableLayer() +{ + Layer* root = mLayerManager->GetRoot(); + + nsTArray queue; + queue.AppendElement(root); + for (int i = 0; i < queue.Length(); i++) { + ContainerLayer* containerLayer = queue[i]->AsContainerLayer(); + if (!containerLayer) { + continue; + } + + const FrameMetrics& frameMetrics = containerLayer->GetFrameMetrics(); + if (!frameMetrics.mDisplayPort.IsEmpty()) { + return containerLayer; + } + + Layer* child = containerLayer->GetFirstChild(); + while (child) { + queue.AppendElement(child); + child = child->GetNextSibling(); + } + } + + return root; +} + // Go down shadow layer tree, setting properties to match their non-shadow // counterparts. static void diff --git a/gfx/layers/ipc/CompositorParent.h b/gfx/layers/ipc/CompositorParent.h index 27b28a9a518..770918341e4 100644 --- a/gfx/layers/ipc/CompositorParent.h +++ b/gfx/layers/ipc/CompositorParent.h @@ -126,6 +126,12 @@ private: * accordingly. */ void RequestViewTransform(); + + /** + * Does a breadth-first search to find the first layer in the tree with a + * displayport set. + */ + Layer* GetPrimaryScrollableLayer(); #endif nsRefPtr mLayerManager; From 362804f0a4ff402ddf19a5d8a440bd716bcceca7 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 7 Feb 2012 22:21:38 -0800 Subject: [PATCH 03/12] Temporary workaround for bug 681192 and bug 724786 (subpixel layer invalidation). Remove me later. --- layout/base/FrameLayerBuilder.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index 5b60d01b18d..300268fdabd 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -871,6 +871,8 @@ ContainerState::CreateOrRecycleThebesLayer(nsIFrame* aActiveScrolledRoot) matrix.Translate(gfxPoint(pixOffset.x, pixOffset.y)); layer->SetTransform(gfx3DMatrix::From2D(matrix)); + // FIXME: Temporary workaround for bug 681192 and bug 724786. Uncomment this code before review! +#if 0 // Calculate exact position of the top-left of the active scrolled root. // This might not be 0,0 due to the snapping in ScaleToNearestPixels. gfxPoint activeScrolledRootTopLeft = scaledOffset - matrix.GetTranslation(); @@ -882,6 +884,7 @@ ContainerState::CreateOrRecycleThebesLayer(nsIFrame* aActiveScrolledRoot) nsIntRect invalidate = layer->GetValidRegion().GetBounds(); layer->InvalidateRegion(invalidate); } +#endif return layer.forget(); } From e5a5435bfe727ab5e676f6e21d1e976de4614ee2 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 7 Feb 2012 22:32:21 -0800 Subject: [PATCH 04/12] Force the creation of an nsDisplayScrollLayer if a displayport was set on a scroll frame --- layout/generic/nsGfxScrollFrame.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 547d931e0c1..f78d2dd08a6 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -2043,16 +2043,18 @@ nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder, NS_ENSURE_SUCCESS(rv, rv); // Since making new layers is expensive, only use nsDisplayScrollLayer - // if the area is scrollable. + // if the area is scrollable and there's a displayport (or we're the content + // process). nsRect scrollRange = GetScrollRange(); ScrollbarStyles styles = GetScrollbarStylesFromFrame(); mShouldBuildLayer = - (XRE_GetProcessType() == GeckoProcessType_Content && + ((XRE_GetProcessType() == GeckoProcessType_Content || usingDisplayport) && (styles.mHorizontal != NS_STYLE_OVERFLOW_HIDDEN || styles.mVertical != NS_STYLE_OVERFLOW_HIDDEN) && (scrollRange.width > 0 || scrollRange.height > 0) && - (!mIsRoot || !mOuter->PresContext()->IsRootContentDocument())); + (usingDisplayport || !mIsRoot || + !mOuter->PresContext()->IsRootContentDocument())); if (ShouldBuildLayer()) { // ScrollLayerWrapper must always be created because it initializes the From a7a7b83045f049c2f1a00d30d2febfe8f2abba2a Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 7 Feb 2012 22:45:41 -0800 Subject: [PATCH 05/12] Use a display port in browser.js. Disable zooming and CSS viewport adjustment for now. --- mobile/android/chrome/content/browser.js | 41 ++++++++++++++++++------ 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index c553da272ea..eaa073531c1 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -105,6 +105,12 @@ const kElementsReceivingInput = { video: true }; +// How many pixels on each side to buffer. +const kBufferAmount = 300; + +// Whether we're using GL layers. +const kUsingGLLayers = true; + function dump(a) { Cc["@mozilla.org/consoleservice;1"].getService(Ci.nsIConsoleService).logStringMessage(a); } @@ -1392,6 +1398,8 @@ let gTabIDFactory = 0; let gScreenWidth = 1; let gScreenHeight = 1; +let gBrowserWidth = null; + function Tab(aURL, aParams) { this.browser = null; this.vbox = null; @@ -1421,14 +1429,20 @@ Tab.prototype = { this.browser = document.createElement("browser"); this.browser.setAttribute("type", "content"); this.setBrowserSize(980, 480); + this.browser.style.width = gScreenWidth + "px"; + this.browser.style.height = gScreenHeight + "px"; this.browser.style.MozTransformOrigin = "0 0"; this.vbox.appendChild(this.browser); this.browser.stop(); - // Turn off clipping so we can buffer areas outside of the browser element. let frameLoader = this.browser.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader; - frameLoader.clipSubdocument = false; + if (kUsingGLLayers) { + frameLoader.renderMode = Ci.nsIFrameLoader.RENDER_MODE_ASYNC_SCROLL; + } else { + // Turn off clipping so we can buffer areas outside of the browser element. + frameLoader.clipSubdocument = false; + } this.id = ++gTabIDFactory; @@ -1611,8 +1625,8 @@ Tab.prototype = { let transform = "translate(" + x + "px, " + y + "px)"; - if (hasZoom) - transform += " scale(" + this._viewport.zoom + ")"; + + // FIXME: Use nsIDOMWindowUtils::SetResolution(this._viewport.zoom * k) for some k here. this.browser.style.MozTransform = transform; }, @@ -1729,6 +1743,14 @@ Tab.prototype = { if (this._pluginsToPlay.length && !this._pluginOverlayShowing) PluginHelper.showDoorHanger(this); + // FIXME: This should not be in DOMContentLoaded; it should happen earlier. + let cwu = this.browser.contentWindow.QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIDOMWindowUtils); + cwu.setDisplayPortForElement(-kBufferAmount, -kBufferAmount, + gScreenWidth + kBufferAmount * 2, + gScreenHeight + kBufferAmount * 2, + this.browser.contentDocument.documentElement); + break; } @@ -2049,7 +2071,7 @@ Tab.prototype = { let minScale = this.getPageZoomLevel(screenW); viewportH = Math.max(viewportH, screenH / minScale); - let oldBrowserWidth = parseInt(this.browser.style.width); + let oldBrowserWidth = gBrowserWidth; this.setBrowserSize(viewportW, viewportH); // Avoid having the scroll position jump around after device rotation. @@ -2060,7 +2082,7 @@ Tab.prototype = { // If the browser width changes, we change the zoom proportionally. This ensures sensible // behavior when rotating the device on pages with automatically-resizing viewports. - if (viewportW == oldBrowserWidth) + if (oldBrowserWidth == null || viewportW == oldBrowserWidth) return; let viewport = this.viewport; @@ -2073,9 +2095,8 @@ Tab.prototype = { if ("defaultZoom" in md && md.defaultZoom) return md.defaultZoom; - let browserWidth = parseInt(this.browser.style.width); dump("### getDefaultZoomLevel gScreenWidth=" + gScreenWidth); - return gScreenWidth / browserWidth; + return gScreenWidth / gBrowserWidth; }, getPageZoomLevel: function getPageZoomLevel() { @@ -2088,8 +2109,8 @@ Tab.prototype = { }, setBrowserSize: function(aWidth, aHeight) { - this.browser.style.width = aWidth + "px"; - this.browser.style.height = aHeight + "px"; + // TODO: Use nsIDOMWindowUtils::SetCSSViewport() here. + gBrowserWidth = aWidth; }, getRequestLoadContext: function(aRequest) { From 1309935c66d52948cde8600517113f8144ff382d Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 7 Feb 2012 23:10:58 -0800 Subject: [PATCH 06/12] Lower the minimum viewport change delay to 25 for now --- mobile/android/base/gfx/GeckoLayerClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/android/base/gfx/GeckoLayerClient.java b/mobile/android/base/gfx/GeckoLayerClient.java index 42e79e9c13f..f0deb51511d 100644 --- a/mobile/android/base/gfx/GeckoLayerClient.java +++ b/mobile/android/base/gfx/GeckoLayerClient.java @@ -74,7 +74,7 @@ public abstract class GeckoLayerClient extends LayerClient implements GeckoEvent /* The viewport that Gecko will display when drawing is finished */ protected ViewportMetrics mNewGeckoViewport; - private static final long MIN_VIEWPORT_CHANGE_DELAY = 200L; + private static final long MIN_VIEWPORT_CHANGE_DELAY = 25L; private long mLastViewportChangeTime; private boolean mPendingViewportAdjust; private boolean mViewportSizeChanged; From 7890b6e54d61d2aa1f6a18742c53777e9de22d32 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 7 Feb 2012 23:24:58 -0800 Subject: [PATCH 07/12] Remove the blinkenlights in the background --- gfx/layers/opengl/LayerManagerOGL.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/gfx/layers/opengl/LayerManagerOGL.cpp b/gfx/layers/opengl/LayerManagerOGL.cpp index 8b84dc8b1dd..9351e5461e5 100644 --- a/gfx/layers/opengl/LayerManagerOGL.cpp +++ b/gfx/layers/opengl/LayerManagerOGL.cpp @@ -823,18 +823,7 @@ LayerManagerOGL::Render() mGLContext->fEnable(LOCAL_GL_SCISSOR_TEST); - static int i = 0; - i++; - i=i%3; - if( i == 0 ) { - mGLContext->fClearColor(1.0, 0.0, 0.0, 0.0); - } else if( i == 1 ) { - mGLContext->fClearColor(0.0, 0.0, 0.0, 0.0); - } else if( i == 2 ) { - mGLContext->fClearColor(1.0, 1.0, 0.0, 0.0); - } else { - mGLContext->fClearColor(0.0, 1.0, 0.0, 0.0); - } + mGLContext->fClearColor(1.0, 1.0, 1.0, 0.0); mGLContext->fClear(LOCAL_GL_COLOR_BUFFER_BIT | LOCAL_GL_DEPTH_BUFFER_BIT); // Render our layers. From 7dcaa3b44e7f76120fd6977a755d5f2686fc4cc2 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 7 Feb 2012 23:37:29 -0800 Subject: [PATCH 08/12] Allow redraw while a finger is down. Make this logic work properly later. --- mobile/android/base/gfx/GeckoLayerClient.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mobile/android/base/gfx/GeckoLayerClient.java b/mobile/android/base/gfx/GeckoLayerClient.java index f0deb51511d..648f0665862 100644 --- a/mobile/android/base/gfx/GeckoLayerClient.java +++ b/mobile/android/base/gfx/GeckoLayerClient.java @@ -265,8 +265,10 @@ public abstract class GeckoLayerClient extends LayerClient implements GeckoEvent } private void adjustViewportWithThrottling() { - if (!getLayerController().getRedrawHint()) - return; + // FIXME: Allow redraw while a finger is down, but only if we're about to checkerboard. + // This requires fixing aboutToCheckerboard() to know about the new buffer size. + /*if (!getLayerController().getRedrawHint()) + return;*/ if (mPendingViewportAdjust) return; From cc4e90ef0c7ef169596155277b7ee7675b5cf09b Mon Sep 17 00:00:00 2001 From: Benoit Girard Date: Wed, 8 Feb 2012 12:08:03 -0500 Subject: [PATCH 09/12] Build fixes and clean up --- gfx/layers/ipc/CompositorParent.cpp | 24 ++++++++---------------- gfx/layers/ipc/CompositorParent.h | 7 ------- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index 1f74c8740a7..18687bc92d6 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -52,9 +52,9 @@ namespace mozilla { namespace layers { CompositorParent::CompositorParent(nsIWidget* aWidget) - : mPaused(false) - , mWidget(aWidget) + : mWidget(aWidget) , mCurrentCompositeTask(NULL) + , mPaused(false) { MOZ_COUNT_CTOR(CompositorParent); } @@ -182,13 +182,18 @@ CompositorParent::Composite() printf_stderr("Correcting for position fixed %i, %i\n", -mScrollOffset.x, -mScrollOffset.y); worldTransform.Translate(offset); worldTransform.Scale(mXScale, mYScale, 1.0f); +#ifdef MOZ_WIDGET_ANDROID Layer* layer = GetPrimaryScrollableLayer(); +#else + Layer* root = mLayerManager->GetRoot(); +#endif layer->AsShadowLayer()->SetShadowTransform(worldTransform); mLayerManager->EndEmptyTransaction(); mLastCompose = mozilla::TimeStamp::Now(); } +#ifdef MOZ_WIDGET_ANDROID // Do a breadth-first search to find the first layer in the tree with a // displayport set. Layer* @@ -218,6 +223,7 @@ CompositorParent::GetPrimaryScrollableLayer() return root; } +#endif // Go down shadow layer tree, setting properties to match their non-shadow // counterparts. @@ -411,12 +417,6 @@ CompositorParent::TestScroll() PLayersParent* CompositorParent::AllocPLayers(const LayersBackend &backendType) { -#ifdef MOZ_WIDGET_ANDROID - // Registering with the compositor will create the surface view that - // the layer manager expects to attach to. - //RegisterCompositorWithJava(); -#endif - if (backendType == LayerManager::LAYERS_OPENGL) { nsRefPtr layerManager = new LayerManagerOGL(mWidget); mWidget = NULL; @@ -445,14 +445,6 @@ CompositorParent::DeallocPLayers(PLayersParent* actor) return true; } -#ifdef MOZ_WIDGET_ANDROID -void -CompositorParent::RegisterCompositorWithJava() -{ - mozilla::AndroidBridge::Bridge()->RegisterCompositor(); -} -#endif - } // namespace layers } // namespace mozilla diff --git a/gfx/layers/ipc/CompositorParent.h b/gfx/layers/ipc/CompositorParent.h index 770918341e4..25f03f1ccc4 100644 --- a/gfx/layers/ipc/CompositorParent.h +++ b/gfx/layers/ipc/CompositorParent.h @@ -114,13 +114,6 @@ private: // Platform specific functions #ifdef MOZ_WIDGET_ANDROID - /** - * Register the compositor thread with the Java native thread. - * This will replace the temporary compositor with the real - * Gecko compositor thread. - **/ - void RegisterCompositorWithJava(); - /** * Asks Java for the viewport position and updates the world transform * accordingly. From 3b9d7e2845500cc2ed239fc52c9446ad1102a0b1 Mon Sep 17 00:00:00 2001 From: Ali Juma Date: Wed, 8 Feb 2012 16:09:10 -0500 Subject: [PATCH 10/12] Fix incorrect rendering after orientation change. --- mobile/android/base/gfx/FlexibleGLSurfaceView.java | 4 ++-- mobile/android/base/gfx/GeckoGLLayerClient.java | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/mobile/android/base/gfx/FlexibleGLSurfaceView.java b/mobile/android/base/gfx/FlexibleGLSurfaceView.java index 8a1883fdb27..a07ea8a888b 100644 --- a/mobile/android/base/gfx/FlexibleGLSurfaceView.java +++ b/mobile/android/base/gfx/FlexibleGLSurfaceView.java @@ -157,8 +157,7 @@ public class FlexibleGLSurfaceView extends SurfaceView implements SurfaceHolder. } if (mListener != null) { - mListener.compositionResumeRequested(); - mListener.renderRequested(); + mListener.surfaceChanged(width, height); } } @@ -203,6 +202,7 @@ public class FlexibleGLSurfaceView extends SurfaceView implements SurfaceHolder. void renderRequested(); void compositionPauseRequested(); void compositionResumeRequested(); + void surfaceChanged(int width, int height); } public static class FlexibleGLSurfaceViewException extends RuntimeException { diff --git a/mobile/android/base/gfx/GeckoGLLayerClient.java b/mobile/android/base/gfx/GeckoGLLayerClient.java index 3ba9992b6e0..2207067a796 100644 --- a/mobile/android/base/gfx/GeckoGLLayerClient.java +++ b/mobile/android/base/gfx/GeckoGLLayerClient.java @@ -203,5 +203,13 @@ public class GeckoGLLayerClient extends GeckoLayerClient Log.e(LOGTAG, "### Scheduling ResumeComposition"); GeckoAppShell.scheduleResumeComposition(); } + + public void surfaceChanged(int width, int height) { + compositionPauseRequested(); + LayerController layerController = getLayerController(); + layerController.setViewportSize(new FloatSize(width, height)); + compositionResumeRequested(); + renderRequested(); + } } From 1cb0fb8d39f1bf0632444390ec0b18c33b472ca4 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Wed, 8 Feb 2012 13:12:12 -0800 Subject: [PATCH 11/12] Remove CSS transforms as they're basically incompatible with displayports --- mobile/android/chrome/content/browser.js | 30 ------------------------ 1 file changed, 30 deletions(-) diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index eaa073531c1..592fafb05b1 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -852,27 +852,20 @@ var BrowserApp = { top: focusedRect.top - tab.viewportExcess.y, bottom: focusedRect.bottom - tab.viewportExcess.y }; - let transformChanged = false; if (focusedRect.right >= visibleContentWidth && focusedRect.left > 0) { // the element is too far off the right side, so we need to scroll to the right more tab.viewportExcess.x += Math.min(focusedRect.left, focusedRect.right - visibleContentWidth); - transformChanged = true; } else if (focusedRect.left < 0) { // the element is too far off the left side, so we need to scroll to the left more tab.viewportExcess.x += focusedRect.left; - transformChanged = true; } if (focusedRect.bottom >= visibleContentHeight && focusedRect.top > 0) { // the element is too far down, so we need to scroll down more tab.viewportExcess.y += Math.min(focusedRect.top, focusedRect.bottom - visibleContentHeight); - transformChanged = true; } else if (focusedRect.top < 0) { // the element is too far up, so we need to scroll up more tab.viewportExcess.y += focusedRect.top; - transformChanged = true; } - if (transformChanged) - tab.updateTransform(); // finally, let java know where we ended up tab.sendViewportUpdate(); } @@ -1431,7 +1424,6 @@ Tab.prototype = { this.setBrowserSize(980, 480); this.browser.style.width = gScreenWidth + "px"; this.browser.style.height = gScreenHeight + "px"; - this.browser.style.MozTransformOrigin = "0 0"; this.vbox.appendChild(this.browser); this.browser.stop(); @@ -1566,27 +1558,19 @@ Tab.prototype = { this._viewport.height = gScreenHeight = aViewport.height; dump("### gScreenWidth = " + gScreenWidth + "\n"); - let transformChanged = false; - if ((aViewport.offsetX != this._viewport.offsetX) || (excessX != this.viewportExcess.x)) { this._viewport.offsetX = aViewport.offsetX; this.viewportExcess.x = excessX; - transformChanged = true; } if ((aViewport.offsetY != this._viewport.offsetY) || (excessY != this.viewportExcess.y)) { this._viewport.offsetY = aViewport.offsetY; this.viewportExcess.y = excessY; - transformChanged = true; } if (Math.abs(aViewport.zoom - this._viewport.zoom) >= 1e-6) { this._viewport.zoom = aViewport.zoom; - transformChanged = true; } - - if (transformChanged) - this.updateTransform(); }, screenshot: function(aSrc, aDst) { @@ -1617,20 +1601,6 @@ Tab.prototype = { }, Ci.nsIThread.DISPATCH_NORMAL); }, - updateTransform: function() { - let hasZoom = (Math.abs(this._viewport.zoom - 1.0) >= 1e-6); - let x = this._viewport.offsetX + Math.round(-this.viewportExcess.x * this._viewport.zoom); - let y = this._viewport.offsetY + Math.round(-this.viewportExcess.y * this._viewport.zoom); - - let transform = - "translate(" + x + "px, " + - y + "px)"; - - // FIXME: Use nsIDOMWindowUtils::SetResolution(this._viewport.zoom * k) for some k here. - - this.browser.style.MozTransform = transform; - }, - get viewport() { // Update the viewport to current dimensions this._viewport.x = (this.browser.contentWindow.scrollX + From a4dab36b438eb71e0ec11c8cdbbe67798372196f Mon Sep 17 00:00:00 2001 From: Ali Juma Date: Wed, 8 Feb 2012 19:57:21 -0500 Subject: [PATCH 12/12] Build fix. --- gfx/layers/ipc/CompositorParent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index 18687bc92d6..0c3a12163b0 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -185,7 +185,7 @@ CompositorParent::Composite() #ifdef MOZ_WIDGET_ANDROID Layer* layer = GetPrimaryScrollableLayer(); #else - Layer* root = mLayerManager->GetRoot(); + Layer* layer = mLayerManager->GetRoot(); #endif layer->AsShadowLayer()->SetShadowTransform(worldTransform);