зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1410900 - Allow using shift-click on the Reload Frame context menuitem to skip the cache when reloading the frame. r=johannh
This patch uses the same logic as BrowserReloadOrDuplicate to determine if the cache should be skipped. I didn't extract out the logic to a separate function because I didn't want to add another function to the global namespace of browser.js. MozReview-Commit-ID: 15kztsqMnAM --HG-- extra : rebase_source : d5ad3ee62062d5971c95281368a102298e367e59
This commit is contained in:
Родитель
1bc1c23eb7
Коммит
d2e8741f6d
|
@ -332,7 +332,7 @@
|
|||
<menuitem id="context-reloadframe"
|
||||
label="&reloadFrameCmd.label;"
|
||||
accesskey="&reloadFrameCmd.accesskey;"
|
||||
oncommand="gContextMenu.reloadFrame();"/>
|
||||
oncommand="gContextMenu.reloadFrame(event);"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="context-bookmarkframe"
|
||||
label="&bookmarkThisFrameCmd.label;"
|
||||
|
|
|
@ -832,9 +832,10 @@ nsContextMenu.prototype = {
|
|||
},
|
||||
|
||||
// Reload clicked-in frame.
|
||||
reloadFrame() {
|
||||
reloadFrame(aEvent) {
|
||||
let forceReload = aEvent.shiftKey;
|
||||
this.browser.messageManager.sendAsyncMessage("ContextMenu:ReloadFrame",
|
||||
null, { target: this.target });
|
||||
null, { target: this.target, forceReload });
|
||||
},
|
||||
|
||||
// Open clicked-in frame in its own window.
|
||||
|
|
|
@ -105,7 +105,8 @@ const messageListeners = {
|
|||
},
|
||||
|
||||
"ContextMenu:ReloadFrame": function(aMessage) {
|
||||
this.getTarget(aMessage).ownerDocument.location.reload();
|
||||
let forceReload = aMessage.objects && aMessage.objects.forceReload;
|
||||
this.getTarget(aMessage).ownerDocument.location.reload(forceReload);
|
||||
},
|
||||
|
||||
"ContextMenu:ReloadImage": function(aMessage) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче