Bug 1331509 - Always return the correct APZ state, since we should have it. r?dvander draft
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 17 Jan 2017 15:52:46 -0500
changeset 462717 890f86e7409894be13a1c71cbde4ab1a610fdf4e
parent 462716 3cdb6822d4a781a5bff1e0f9af4f0d259738c9f1
child 542480 5cebe3ad0cf2ba63b6c5dfcc0fa4a0e626745c4f
push id41849
push userkgupta@mozilla.com
push dateTue, 17 Jan 2017 23:14:58 +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)) {