Bug 1331509 - Always return the correct APZ state, since we should have it. r=dvander
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 17 Jan 2017 15:52:46 -0500
changeset 463168 8d8e6116ed6ddbd99a528fcd8911e559336b938f
parent 463167 edcd2bd8340d4fceac08c0b904096275a4e29703
child 463169 1b00058c2288f0c41fde073ef20cf5dc2be26011
push id41967
push userbmo:miket@mozilla.com
push dateWed, 18 Jan 2017 15:17:32 +0000
reviewersdvander
bugs1331509
milestone53.0a1
Bug 1331509 - Always return the correct APZ state, since we should have it. r=dvander MozReview-Commit-ID: CrLri2Qucj0
dom/ipc/TabChild.cpp
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -422,20 +422,20 @@ TabChild::TabChild(nsIContentChild* aMan
   for (uint32_t idx = 0; idx < NUMBER_OF_AUDIO_CHANNELS; idx++) {
     mAudioChannelsActive.AppendElement(false);
   }
 }
 
 bool
 TabChild::AsyncPanZoomEnabled() const
 {
-  // If we have received the CompositorOptions we can answer definitively. If
-  // not, return a best guess based on gfxPlaform values.
-  return mCompositorOptions ? mCompositorOptions->UseAPZ()
-                            : gfxPlatform::AsyncPanZoomEnabled();
+  // By the time anybody calls this, we must have had InitRenderingState called
+  // already, and so mCompositorOptions should be populated.
+  MOZ_RELEASE_ASSERT(mCompositorOptions);
+  return mCompositorOptions->UseAPZ();
 }
 
 NS_IMETHODIMP
 TabChild::Observe(nsISupports *aSubject,
                   const char *aTopic,
                   const char16_t *aData)
 {
   if (!strcmp(aTopic, BEFORE_FIRST_PAINT)) {