Backed out changeset b245aba69d76 (bug 1508457) for apilint bustages. CLOSED TREE
authorNarcis Beleuzu <nbeleuzu@mozilla.com>
Tue, 20 Nov 2018 20:06:21 +0200
changeset 447340 53f688575d39c4d28c25db6c87e5892b8c0ea9b3
parent 447339 1d3eb26cfeac0fd13ab376ab86cc1b2ccd1fdc82
child 447341 a0fb2044780dd738d8fbd9b5c6ec074cf7b05a3e
push id35075
push usershindli@mozilla.com
push dateWed, 21 Nov 2018 04:04:02 +0000
treeherdermozilla-central@8540104bb0bd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1508457
milestone65.0a1
backs outb245aba69d768056a73019c5ceb1ab39fb543fbd
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset b245aba69d76 (bug 1508457) for apilint bustages. CLOSED TREE
mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/ContentDelegateTest.kt
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
--- a/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/ContentDelegateTest.kt
+++ b/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/ContentDelegateTest.kt
@@ -1,19 +1,17 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
  * Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.geckoview.test
 
 import android.app.assist.AssistStructure
-import android.graphics.SurfaceTexture
 import android.os.Build
 import org.mozilla.geckoview.AllowOrDeny
-import org.mozilla.geckoview.GeckoDisplay
 import org.mozilla.geckoview.GeckoResult
 import org.mozilla.geckoview.GeckoSession
 import org.mozilla.geckoview.GeckoSession.NavigationDelegate.LoadRequest
 import org.mozilla.geckoview.test.rule.GeckoSessionTestRule.AssertCalled
 import org.mozilla.geckoview.test.rule.GeckoSessionTestRule.IgnoreCrash
 import org.mozilla.geckoview.test.rule.GeckoSessionTestRule.ReuseSession
 import org.mozilla.geckoview.test.rule.GeckoSessionTestRule.WithDevToolsAPI
 import org.mozilla.geckoview.test.rule.GeckoSessionTestRule.WithDisplay
@@ -21,17 +19,16 @@ import org.mozilla.geckoview.test.util.C
 import org.mozilla.geckoview.test.util.UiThreadUtils
 
 import android.os.Looper
 import android.support.test.filters.MediumTest
 import android.support.test.filters.SdkSuppress
 import android.support.test.runner.AndroidJUnit4
 import android.text.InputType
 import android.util.SparseArray
-import android.view.Surface
 import android.view.View
 import android.view.ViewStructure
 import android.widget.EditText
 import org.hamcrest.Matchers.*
 import org.junit.Assume.assumeThat
 import org.junit.Test
 import org.junit.runner.RunWith
 
@@ -477,32 +474,9 @@ class ContentDelegateTest : BaseSessionT
     }
 
     @WithDevToolsAPI
     @Test fun sessionExitFullscreen() {
         goFullscreen()
         mainSession.exitFullScreen()
         waitForFullscreenExit()
     }
-
-    @Test fun firstComposite() {
-        val display = mainSession.acquireDisplay()
-        val texture = SurfaceTexture(0)
-        texture.setDefaultBufferSize(100, 100)
-        val surface = Surface(texture)
-        display.surfaceChanged(surface, 100, 100)
-        mainSession.loadTestPath(HELLO_HTML_PATH)
-        sessionRule.waitUntilCalled(object : Callbacks.ContentDelegate {
-            @AssertCalled(count = 1)
-            override fun onFirstComposite(session: GeckoSession) {
-            }
-        })
-        display.surfaceDestroyed()
-        display.surfaceChanged(surface, 100, 100)
-        sessionRule.waitUntilCalled(object : Callbacks.ContentDelegate {
-            @AssertCalled(count = 1)
-            override fun onFirstComposite(session: GeckoSession) {
-            }
-        })
-        display.surfaceDestroyed()
-        mainSession.releaseDisplay(display)
-    }
 }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
@@ -2588,24 +2588,16 @@ public class GeckoSession implements Par
          * GeckoSession is now closed and unusable. You may call
          * {@link #open(GeckoRuntime)} to recover the session, but no state
          * is preserved. Most applications will want to call
          * {@link #loadUri(Uri)} or {@link #restoreState(SessionState)} at this point.
          *
          * @param session The GeckoSession that crashed.
          */
         void onCrash(GeckoSession session);
-
-        /**
-         * Notification that the first content composition has occurred.
-         * This callback is invoked for the first content composite after either
-         * a start or a restart of the compositor.
-         * @param session The GeckoSession that had a first paint event.
-         */
-        default void onFirstComposite(GeckoSession session) {}
     }
 
     public interface SelectionActionDelegate {
         @IntDef(flag = true, value = {FLAG_IS_COLLAPSED,
                                       FLAG_IS_EDITABLE})
         /* package */ @interface Flag {}
 
         /**
@@ -4118,20 +4110,16 @@ public class GeckoSession implements Par
                 });
                 break;
             }
 
             case FIRST_PAINT: {
                 if (mController != null) {
                     mController.onFirstPaint();
                 }
-                ContentDelegate delegate = mContentHandler.getDelegate();
-                if (delegate != null) {
-                    delegate.onFirstComposite(this);
-                }
                 break;
             }
 
             case LAYERS_UPDATED: {
                 if (mController != null) {
                     mController.notifyDrawCallbacks();
                 }
                 break;