Bug 1510569 - Keep track of whether we are navigating to a new URI in nsDocShell r=mconley,kmag,qdot
Previously the `WebNavigationChild` would keep track of when triggering its `nsIWebNavigation`, `goForward`, `goBack`, `gotoIndex`, and `loadURI` methods. It's `nsIWebNavigation` instance is always an `nsIDocShell` and as part of porting `OnStateChange` and `OnLocationChange` events from `WebProgressChild`/`RemoteWebProgress` to `BrowserChild`/`BrowserParent`, this informations needs to be available from the `BrowserChild`. As it stands, it is currently an expando property on the `WebProgressChild`. Instead of introducing yet another XPCOM interface for the WebProgressChild, we now store this information directly on the `nsDocShell`. Furthermore, instead of having the `WebNavigationChild` manage this part of the `nsDocShell`'s state, we can have the `nsDocShell` manage this state itself so it is always consistent. Differential Revision: https://phabricator.services.mozilla.com/D28124
This commit is contained in:
@@ -1205,6 +1205,10 @@ class nsDocShell final : public nsDocLoader,
|
||||
bool mTitleValidForCurrentURI : 1;
|
||||
|
||||
bool mIsFrame : 1;
|
||||
|
||||
// This flag indicates whether or not the DocShell is currently executing an
|
||||
// nsIWebNavigation navigation method.
|
||||
bool mIsNavigating : 1;
|
||||
};
|
||||
|
||||
#endif /* nsDocShell_h__ */
|
||||
|
||||
Reference in New Issue
Block a user