Bug 1267530 part 2 - Add ASCII art explaination of flow of fullscreen transition. r=smaug
authorXidorn Quan <quanxunzhen@gmail.com>
Tue, 03 May 2016 17:58:57 +1000
changeset 295786 42f8c2e67ba766e974866dbadbafb9ad7c8e0cab
parent 295785 914eba686417f7a2d82098c8e3026902671298f4
child 295787 dd0fd7a876d62da427a2d4587e13f1837e1b78c7
push id76089
push userxquan@mozilla.com
push dateTue, 03 May 2016 07:59:48 +0000
treeherdermozilla-inbound@d95633a61869 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1267530
milestone49.0a1
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
Bug 1267530 part 2 - Add ASCII art explaination of flow of fullscreen transition. r=smaug MozReview-Commit-ID: D5vZSPBGyHN
dom/base/nsGlobalWindow.cpp
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -6165,16 +6165,37 @@ public:
   NS_IMETHOD Run() override;
 
 private:
   virtual ~FullscreenTransitionTask()
   {
     MOZ_COUNT_DTOR(FullscreenTransitionTask);
   }
 
+  /**
+   * The flow of fullscreen transition:
+   *
+   *         parent process         |         child process
+   * ----------------------------------------------------------------
+   *
+   *                                    | request/exit fullscreen
+   *                              <-----|
+   *         BeforeToggle stage |
+   *                            |
+   *  ToggleFullscreen stage *1 |----->
+   *                                    | HandleFullscreenRequests
+   *                                    |
+   *                              <-----| MozAfterPaint event
+   *       AfterToggle stage *2 |
+   *                            |
+   *                  End stage |
+   *
+   * Note we also start a timer at *1 so that if we don't get MozAfterPaint
+   * from the child process in time, we continue going to *2.
+   */
   enum Stage {
     // BeforeToggle stage happens before we enter or leave fullscreen
     // state. In this stage, the task triggers the pre-toggle fullscreen
     // transition on the widget.
     eBeforeToggle,
     // ToggleFullscreen stage actually executes the fullscreen toggle,
     // and wait for the next paint on the content to continue.
     eToggleFullscreen,