Bug 943846 - Don't constrain generated display-ports to composition bounds. r=kats, a=1.3+
authorChris Lord <chrislord.net@gmail.com>
Mon, 16 Dec 2013 17:21:05 -0500
changeset 175325 7610a39b29b4af814bd941b5dbca78117e112643
parent 175324 7d667fc1bc2026143d9151d9589460b56a2dc900
child 175326 94709e5edef562fef11dc3a5fb3265541a54bdf9
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats, 1
bugs943846
milestone28.0a2
Bug 943846 - Don't constrain generated display-ports to composition bounds. r=kats, a=1.3+
gfx/layers/ipc/AsyncPanZoomController.cpp
--- a/gfx/layers/ipc/AsyncPanZoomController.cpp
+++ b/gfx/layers/ipc/AsyncPanZoomController.cpp
@@ -1191,31 +1191,16 @@ const CSSRect AsyncPanZoomController::Ca
     scrollOffset.x = scrollableRect.x;
   }
   if (scrollOffset.y + compositionBounds.height > scrollableRect.height) {
     scrollOffset.y -= compositionBounds.height + scrollOffset.y - scrollableRect.height;
   } else if (scrollOffset.y < scrollableRect.y) {
     scrollOffset.y = scrollableRect.y;
   }
 
-  // FIXME/bug 936500: Make sure the displayport contains the composition
-  // bounds. This is to work around a layout bug that means if a display item's
-  // corresponding displayport doesn't contain its frame's bounds, it may get
-  // optimised out and the layer won't get created.
-  if (displayPort.x + displayPort.width < compositionBounds.width) {
-    displayPort.x = -(displayPort.width - compositionBounds.width);
-  } else if (displayPort.x > 0) {
-    displayPort.x = 0;
-  }
-  if (displayPort.y + displayPort.height < compositionBounds.height) {
-    displayPort.y = -(displayPort.height - compositionBounds.height);
-  } else if (displayPort.y > 0) {
-    displayPort.y = 0;
-  }
-
   CSSRect shiftedDisplayPort = displayPort + scrollOffset;
   return scrollableRect.ClampRect(shiftedDisplayPort) - scrollOffset;
 }
 
 void AsyncPanZoomController::ScheduleComposite() {
   if (mCompositorParent) {
     mCompositorParent->ScheduleRenderOnCompositorThread();
   }