ma1 pushed to branch mullvad-browser-115.16.0esr-13.5-1 at The Tor Project / Applications / Mullvad Browser

Commits:

3 changed files:

Changes:

  • browser/actors/BrowserTabChild.sys.mjs
    ... ... @@ -3,12 +3,6 @@
    3 3
      * License, v. 2.0. If a copy of the MPL was not distributed with this
    
    4 4
      * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
    
    5 5
     
    
    6
    -const lazy = {};
    
    7
    -
    
    8
    -ChromeUtils.defineESModuleGetters(lazy, {
    
    9
    -  E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
    
    10
    -});
    
    11
    -
    
    12 6
     export class BrowserTabChild extends JSWindowActorChild {
    
    13 7
       constructor() {
    
    14 8
         super();
    
    ... ... @@ -19,34 +13,6 @@ export class BrowserTabChild extends JSWindowActorChild {
    19 13
         let docShell = context.docShell;
    
    20 14
     
    
    21 15
         switch (message.name) {
    
    22
    -      // XXX(nika): Should we try to call this in the parent process instead?
    
    23
    -      case "Browser:Reload":
    
    24
    -        /* First, we'll try to use the session history object to reload so
    
    25
    -         * that framesets are handled properly. If we're in a special
    
    26
    -         * window (such as view-source) that has no session history, fall
    
    27
    -         * back on using the web navigation's reload method.
    
    28
    -         */
    
    29
    -        let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
    
    30
    -        try {
    
    31
    -          if (webNav.sessionHistory) {
    
    32
    -            webNav = webNav.sessionHistory;
    
    33
    -          }
    
    34
    -        } catch (e) {}
    
    35
    -
    
    36
    -        let reloadFlags = message.data.flags;
    
    37
    -        if (message.data.handlingUserInput) {
    
    38
    -          reloadFlags |= Ci.nsIWebNavigation.LOAD_FLAGS_USER_ACTIVATION;
    
    39
    -        }
    
    40
    -
    
    41
    -        try {
    
    42
    -          lazy.E10SUtils.wrapHandlingUserInput(
    
    43
    -            this.document.defaultView,
    
    44
    -            message.data.handlingUserInput,
    
    45
    -            () => webNav.reload(reloadFlags)
    
    46
    -          );
    
    47
    -        } catch (e) {}
    
    48
    -        break;
    
    49
    -
    
    50 16
           case "ForceEncodingDetection":
    
    51 17
             docShell.forceEncodingDetection();
    
    52 18
             break;
    

  • browser/base/content/browser.js
    ... ... @@ -3509,17 +3509,29 @@ function BrowserReloadWithFlags(reloadFlags) {
    3509 3509
       gIdentityHandler.hidePopup();
    
    3510 3510
       gPermissionPanel.hidePopup();
    
    3511 3511
     
    
    3512
    -  let handlingUserInput = document.hasValidTransientUserGestureActivation;
    
    3512
    +  if (document.hasValidTransientUserGestureActivation) {
    
    3513
    +    reloadFlags |= Ci.nsIWebNavigation.LOAD_FLAGS_USER_ACTIVATION;
    
    3514
    +  }
    
    3513 3515
     
    
    3514 3516
       for (let tab of unchangedRemoteness) {
    
    3515 3517
         if (tab.linkedPanel) {
    
    3516
    -      sendReloadMessage(tab);
    
    3518
    +      const { browsingContext } = tab.linkedBrowser;
    
    3519
    +      const { sessionHistory } = browsingContext;
    
    3520
    +      if (sessionHistory) {
    
    3521
    +        sessionHistory.reload(reloadFlags);
    
    3522
    +      } else {
    
    3523
    +        browsingContext.reload(reloadFlags);
    
    3524
    +      }
    
    3517 3525
         } else {
    
    3518 3526
           // Shift to fully loaded browser and make
    
    3519 3527
           // sure load handler is instantiated.
    
    3520
    -      tab.addEventListener("SSTabRestoring", () => sendReloadMessage(tab), {
    
    3521
    -        once: true,
    
    3522
    -      });
    
    3528
    +      tab.addEventListener(
    
    3529
    +        "SSTabRestoring",
    
    3530
    +        () => tab.linkedBrowser.browsingContext.reload(reloadFlags),
    
    3531
    +        {
    
    3532
    +          once: true,
    
    3533
    +        }
    
    3534
    +      );
    
    3523 3535
           gBrowser._insertBrowser(tab);
    
    3524 3536
         }
    
    3525 3537
       }
    
    ... ... @@ -3531,13 +3543,6 @@ function BrowserReloadWithFlags(reloadFlags) {
    3531 3543
         });
    
    3532 3544
       }
    
    3533 3545
     
    
    3534
    -  function sendReloadMessage(tab) {
    
    3535
    -    tab.linkedBrowser.sendMessageToActor(
    
    3536
    -      "Browser:Reload",
    
    3537
    -      { flags: reloadFlags, handlingUserInput },
    
    3538
    -      "BrowserTab"
    
    3539
    -    );
    
    3540
    -  }
    
    3541 3546
     }
    
    3542 3547
     
    
    3543 3548
     // TODO: can we pull getPEMString in from pippki.js instead of
    

  • docshell/shistory/nsISHistory.idl
    ... ... @@ -268,8 +268,7 @@ interface nsISHistory: nsISupports
    268 268
       [noscript, notxpcom]
    
    269 269
       void RemoveFrameEntries(in nsISHEntry aEntry);
    
    270 270
     
    
    271
    -  [noscript]
    
    272
    -  void Reload(in unsigned long aReloadFlags);
    
    271
    +  void reload(in unsigned long aReloadFlags);
    
    273 272
     
    
    274 273
       [notxpcom] void EnsureCorrectEntryAtCurrIndex(in nsISHEntry aEntry);
    
    275 274