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

Commits:

3 changed files:

Changes:

  • browser/locales/en-US/browser/webrtcIndicator.ftl
    ... ... @@ -60,7 +60,7 @@ webrtc-screen-system-menu =
    60 60
     ## These strings are only used on Mac for menus attached to icons
    
    61 61
     ## near the clock on the mac menubar.
    
    62 62
     ## Variables:
    
    63
    -##   $streamTitle (String): the title of the tab using the share.
    
    63
    +##   $streamTitle (String): the host of the tab using the share.
    
    64 64
     ##   $tabCount (Number): the title of the tab using the share.
    
    65 65
     
    
    66 66
     webrtc-indicator-menuitem-control-sharing =
    

  • browser/modules/webrtcUI.sys.mjs
    ... ... @@ -983,8 +983,10 @@ export function showStreamSharingMenu(win, event, inclWindow = false) {
    983 983
         let stream = activeStreams[0];
    
    984 984
     
    
    985 985
         const sharingItem = doc.createXULElement("menuitem");
    
    986
    -    const streamTitle = stream.browser.contentTitle || stream.uri;
    
    987
    -    doc.l10n.setAttributes(sharingItem, l10nIds[0], { streamTitle });
    
    986
    +    const displayHost = getDisplayHostForStream(stream);
    
    987
    +    doc.l10n.setAttributes(sharingItem, l10nIds[0], {
    
    988
    +      streamTitle: displayHost,
    
    989
    +    });
    
    988 990
         sharingItem.setAttribute("disabled", "true");
    
    989 991
         menu.appendChild(sharingItem);
    
    990 992
     
    
    ... ... @@ -1008,11 +1010,11 @@ export function showStreamSharingMenu(win, event, inclWindow = false) {
    1008 1010
     
    
    1009 1011
         for (let stream of activeStreams) {
    
    1010 1012
           const controlItem = doc.createXULElement("menuitem");
    
    1011
    -      const streamTitle = stream.browser.contentTitle || stream.uri;
    
    1013
    +      const displayHost = getDisplayHostForStream(stream);
    
    1012 1014
           doc.l10n.setAttributes(
    
    1013 1015
             controlItem,
    
    1014 1016
             "webrtc-indicator-menuitem-control-sharing-on",
    
    1015
    -        { streamTitle }
    
    1017
    +        { streamTitle: displayHost }
    
    1016 1018
           );
    
    1017 1019
           controlItem.stream = stream;
    
    1018 1020
           controlItem.addEventListener("command", this);
    
    ... ... @@ -1021,6 +1023,25 @@ export function showStreamSharingMenu(win, event, inclWindow = false) {
    1021 1023
       }
    
    1022 1024
     }
    
    1023 1025
     
    
    1026
    +function getDisplayHostForStream(stream) {
    
    1027
    +  let uri = Services.io.newURI(stream.uri);
    
    1028
    +
    
    1029
    +  let displayHost;
    
    1030
    +
    
    1031
    +  try {
    
    1032
    +    displayHost = uri.displayHost;
    
    1033
    +  } catch (ex) {
    
    1034
    +    displayHost = null;
    
    1035
    +  }
    
    1036
    +
    
    1037
    +  // Host getter threw or returned "". Fall back to spec.
    
    1038
    +  if (displayHost == null || displayHost == "") {
    
    1039
    +    displayHost = uri.displaySpec;
    
    1040
    +  }
    
    1041
    +
    
    1042
    +  return displayHost;
    
    1043
    +}
    
    1044
    +
    
    1024 1045
     function onTabSharingMenuPopupShowing(e) {
    
    1025 1046
       const streams = webrtcUI.getActiveStreams(true, true, true, true);
    
    1026 1047
       for (let streamInfo of streams) {
    

  • mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/IntentUtils.java
    ... ... @@ -89,7 +89,7 @@ public class IntentUtils {
    89 89
         }
    
    90 90
     
    
    91 91
         if (("intent".equals(scheme) || "android-app".equals(scheme))) {
    
    92
    -      // Bug 1356893 - Rject intents with file data schemes.
    
    92
    +      // Bug 1356893 - Reject intents with file data schemes.
    
    93 93
           return getSafeIntent(aUri) != null;
    
    94 94
         }
    
    95 95
     
    
    ... ... @@ -115,8 +115,11 @@ public class IntentUtils {
    115 115
         }
    
    116 116
     
    
    117 117
         final Uri data = intent.getData();
    
    118
    -    if (data != null && "file".equals(normalizeUriScheme(data).getScheme())) {
    
    119
    -      return null;
    
    118
    +    if (data != null) {
    
    119
    +      final String scheme = normalizeUriScheme(data).getScheme();
    
    120
    +      if ("file".equals(scheme) || "fido".equals(scheme)) {
    
    121
    +        return null;
    
    122
    +      }
    
    120 123
         }
    
    121 124
     
    
    122 125
         // Only open applications which can accept arbitrary data from a browser.