mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 329959: Dialog Origin Spoofing fix on Mac for SeaMonkey; p=<stefanh@bluebottle.com>, r=me, sr=Neil
This commit is contained in:
parent
cc8d86617c
commit
24468da038
@ -103,8 +103,17 @@ function setLabelForNode(aNode, aLabel, aIsLabelFlag)
|
||||
|
||||
function commonDialogOnLoad()
|
||||
{
|
||||
// set the document title
|
||||
document.title = gCommonDialogParam.GetString(12);
|
||||
// Set the document title. On Mac, we only care about URI's.
|
||||
if (/Mac/.test(navigator.platform)) {
|
||||
var titleString = gCommonDialogParam.GetString(12);
|
||||
if (/^\w+:\/\/\w/.test(titleString)) {
|
||||
setElementText("info.title", titleString, true);
|
||||
unHideElementById("info.title"); // Show URI inside dialog.
|
||||
}
|
||||
}
|
||||
else {
|
||||
document.title = gCommonDialogParam.GetString(12);
|
||||
}
|
||||
|
||||
// set the number of command buttons
|
||||
var nButtons = gCommonDialogParam.GetInt(2);
|
||||
|
@ -21,6 +21,8 @@
|
||||
</hbox>
|
||||
|
||||
<vbox flex="1" style="max-width: 45em;">
|
||||
<!-- title -->
|
||||
<description id="info.title" class="header" hidden="true"/>
|
||||
<!-- text -->
|
||||
<description id="info.header" class="header"/>
|
||||
<vbox id="info.box"/>
|
||||
|
Loading…
Reference in New Issue
Block a user