mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 711595 - Request desktop site should be disabled for the same URIs as share. r=mfinkle
This commit is contained in:
parent
af477c6f5e
commit
09668436d1
@ -464,6 +464,7 @@ abstract public class GeckoApp
|
||||
forward.setEnabled(false);
|
||||
share.setEnabled(false);
|
||||
saveAsPDF.setEnabled(false);
|
||||
agentMode.setEnabled(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -482,9 +483,12 @@ abstract public class GeckoApp
|
||||
|
||||
forward.setEnabled(tab.canDoForward());
|
||||
|
||||
// Don't share about:, chrome: and file: URIs
|
||||
// Disable share and agentMode menuitems for about:, chrome: and file: URIs
|
||||
String scheme = Uri.parse(tab.getURL()).getScheme();
|
||||
share.setEnabled(!(scheme.equals("about") || scheme.equals("chrome") || scheme.equals("file")));
|
||||
boolean enabled = !(scheme.equals("about") || scheme.equals("chrome") ||
|
||||
scheme.equals("file"));
|
||||
share.setEnabled(enabled);
|
||||
agentMode.setEnabled(enabled);
|
||||
|
||||
// Disable save as PDF for about:home and xul pages
|
||||
saveAsPDF.setEnabled(!(tab.getURL().equals("about:home") ||
|
||||
|
Loading…
Reference in New Issue
Block a user