Bug 901332 - Google CalDAV OAuth2 authentication dialog not shown in SeaMonkey. r=Ratty

a=Ratty CLOSED TREE

--HG--
rename : mail/base/content/browserRequest.js => suite/mailnews/browserRequest.js
rename : mail/base/content/browserRequest.xul => suite/mailnews/browserRequest.xul
rename : mail/themes/osx/mail/browserRequest.css => suite/themes/classic/mac/messenger/browserRequest.css
rename : mail/themes/windows/mail/browserRequest.css => suite/themes/classic/messenger/browserRequest.css
rename : chat/themes/away-16.png => suite/themes/classic/messenger/icons/insecure.png
rename : mail/themes/windows/mail/icons/loading.png => suite/themes/classic/messenger/icons/loading.png
rename : chat/themes/available-16.png => suite/themes/classic/messenger/icons/secure.png
rename : mail/themes/windows/mail/browserRequest.css => suite/themes/modern/messenger/browserRequest.css
rename : chat/themes/away-16.png => suite/themes/modern/messenger/icons/insecure.png
rename : mail/themes/linux/mail/icons/loading.png => suite/themes/modern/messenger/icons/loading.png
rename : chat/themes/available-16.png => suite/themes/modern/messenger/icons/secure.png
This commit is contained in:
Philipp Kewisch 2014-04-02 00:30:50 +02:00
Родитель 82eb967c98
Коммит a30c245da0
14 изменённых файлов: 300 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,113 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
const wpl = Components.interfaces.nsIWebProgressListener;
var reporterListener = {
_isBusy: false,
get securityButton() {
delete this.securityButton;
return this.securityButton = document.getElementById("security-button");
},
QueryInterface: function(aIID) {
if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
aIID.equals(Components.interfaces.nsISupports))
return this;
throw Components.results.NS_NOINTERFACE;
},
onStateChange: function(/*in nsIWebProgress*/ aWebProgress,
/*in nsIRequest*/ aRequest,
/*in unsigned long*/ aStateFlags,
/*in nsresult*/ aStatus) {
},
onProgressChange: function(/*in nsIWebProgress*/ aWebProgress,
/*in nsIRequest*/ aRequest,
/*in long*/ aCurSelfProgress,
/*in long */aMaxSelfProgress,
/*in long */aCurTotalProgress,
/*in long */aMaxTotalProgress) {
},
onLocationChange: function(/*in nsIWebProgress*/ aWebProgress,
/*in nsIRequest*/ aRequest,
/*in nsIURI*/ aLocation) {
document.getElementById("headerMessage").textContent = aLocation.spec;
},
onStatusChange: function(/*in nsIWebProgress*/ aWebProgress,
/*in nsIRequest*/ aRequest,
/*in nsresult*/ aStatus,
/*in wstring*/ aMessage) {
},
onSecurityChange: function(/*in nsIWebProgress*/ aWebProgress,
/*in nsIRequest*/ aRequest,
/*in unsigned long*/ aState) {
const wpl_security_bits = wpl.STATE_IS_SECURE |
wpl.STATE_IS_BROKEN |
wpl.STATE_IS_INSECURE |
wpl.STATE_SECURE_HIGH |
wpl.STATE_SECURE_MED |
wpl.STATE_SECURE_LOW;
var browser = document.getElementById("requestFrame");
var level;
switch (aState & wpl_security_bits) {
case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_HIGH:
level = "high";
break;
case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_MED:
case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_LOW:
level = "low";
break;
case wpl.STATE_IS_BROKEN:
level = "broken";
break;
}
if (level) {
this.securityButton.setAttribute("level", level);
this.securityButton.hidden = false;
} else {
this.securityButton.hidden = true;
this.securityButton.removeAttribute("level");
}
this.securityButton.setAttribute("tooltiptext",
browser.securityUI.tooltipText);
}
}
function cancelRequest()
{
reportUserClosed();
window.close();
}
function reportUserClosed()
{
let request = window.arguments[0].wrappedJSObject;
request.cancelled();
}
function loadRequestedUrl()
{
let request = window.arguments[0].wrappedJSObject;
document.getElementById("headerMessage").textContent = request.promptText;
let account = request.account;
if (request.iconURI != "")
document.getElementById("headerImage").src = request.iconURI;
var browser = document.getElementById("requestFrame");
browser.addProgressListener(reporterListener,
Components.interfaces.nsIWebProgress.NOTIFY_ALL);
var url = request.url;
if (url != "") {
browser.setAttribute("src", url);
document.getElementById("headerMessage").textContent = url;
}
request.loaded(window, browser.webProgress);
}

Просмотреть файл

@ -0,0 +1,34 @@
<?xml version="1.0"?>
<!--# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/browserRequest.css" type="text/css"?>
<!DOCTYPE window>
<window id="browserRequest"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
buttons=","
onload="loadRequestedUrl()"
onclose="reportUserClosed()"
title=""
width="800"
height="500"
orient="vertical">
<script type="application/javascript" src="chrome://messenger/content/browserRequest.js"/>
<keyset id="mainKeyset">
<key id="key_close" key="w" modifiers="accel" oncommand="cancelRequest()"/>
<key id="key_close2" keycode="VK_ESCAPE" oncommand="cancelRequest()"/>
</keyset>
<hbox id="header">
<hbox id="addressbox" flex="1" disabled="true">
<image id="security-button"/>
<description id="headerMessage"/>
</hbox>
</hbox>
<browser type="content" disablehistory="true" src="about:blank" id="requestFrame" flex="1"/>
</window>

Просмотреть файл

@ -16,6 +16,8 @@ messenger.jar:
% overlay chrome://editor/content/composerOverlay.xul chrome://messenger/content/mailEditorOverlay.xul % overlay chrome://editor/content/composerOverlay.xul chrome://messenger/content/mailEditorOverlay.xul
% overlay chrome://editor/content/EdImageOverlay.xul chrome://messenger/content/messengercompose/mailComposeEditorOverlay.xul % overlay chrome://editor/content/EdImageOverlay.xul chrome://messenger/content/messengercompose/mailComposeEditorOverlay.xul
% overlay chrome://editor/content/EdLinkProps.xul chrome://messenger/content/messengercompose/mailComposeEditorOverlay.xul % overlay chrome://editor/content/EdLinkProps.xul chrome://messenger/content/messengercompose/mailComposeEditorOverlay.xul
content/messenger/browserRequest.xul
content/messenger/browserRequest.js
content/messenger/msgViewPickerOverlay.js content/messenger/msgViewPickerOverlay.js
content/messenger/mailViewSetup.js content/messenger/mailViewSetup.js
content/messenger/mailViewSetup.xul content/messenger/mailViewSetup.xul

Просмотреть файл

@ -215,6 +215,7 @@ classic.jar:
skin/classic/editor/icons/progress-failed.gif (editor/icons/progress-failed.gif) skin/classic/editor/icons/progress-failed.gif (editor/icons/progress-failed.gif)
#ifdef XP_MACOSX #ifdef XP_MACOSX
skin/classic/messenger/accountManage.css (mac/messenger/accountManage.css) skin/classic/messenger/accountManage.css (mac/messenger/accountManage.css)
skin/classic/messenger/browserRequest.css (mac/messenger/browserRequest.css)
skin/classic/messenger/filterDialog.css (mac/messenger/filterDialog.css) skin/classic/messenger/filterDialog.css (mac/messenger/filterDialog.css)
skin/classic/messenger/mailWindow1.css (mac/messenger/mailWindow1.css) skin/classic/messenger/mailWindow1.css (mac/messenger/mailWindow1.css)
skin/classic/messenger/messageHeader.css (mac/messenger/messageHeader.css) skin/classic/messenger/messageHeader.css (mac/messenger/messageHeader.css)
@ -237,6 +238,7 @@ classic.jar:
skin/classic/messenger/smime/icons/smimeicons-small.png (mac/messenger/smime/icons/smimeicons-small.png) skin/classic/messenger/smime/icons/smimeicons-small.png (mac/messenger/smime/icons/smimeicons-small.png)
#else #else
skin/classic/messenger/accountManage.css (messenger/accountManage.css) skin/classic/messenger/accountManage.css (messenger/accountManage.css)
skin/classic/messenger/browserRequest.css (messenger/browserRequest.css)
skin/classic/messenger/filterDialog.css (messenger/filterDialog.css) skin/classic/messenger/filterDialog.css (messenger/filterDialog.css)
skin/classic/messenger/mailWindow1.css (messenger/mailWindow1.css) skin/classic/messenger/mailWindow1.css (messenger/mailWindow1.css)
skin/classic/messenger/messageHeader.css (messenger/messageHeader.css) skin/classic/messenger/messageHeader.css (messenger/messageHeader.css)
@ -319,8 +321,10 @@ classic.jar:
skin/classic/messenger/icons/folder-trash-share-open.png (messenger/icons/folder-trash-share-open.png) skin/classic/messenger/icons/folder-trash-share-open.png (messenger/icons/folder-trash-share-open.png)
skin/classic/messenger/icons/folder-trash-share.png (messenger/icons/folder-trash-share.png) skin/classic/messenger/icons/folder-trash-share.png (messenger/icons/folder-trash-share.png)
skin/classic/messenger/icons/info.png (messenger/icons/info.png) skin/classic/messenger/icons/info.png (messenger/icons/info.png)
skin/classic/messenger/icons/insecure.png (messenger/icons/insecure.png)
skin/classic/messenger/icons/junk.png (messenger/icons/junk.png) skin/classic/messenger/icons/junk.png (messenger/icons/junk.png)
skin/classic/messenger/icons/junkcol.png (messenger/icons/junkcol.png) skin/classic/messenger/icons/junkcol.png (messenger/icons/junkcol.png)
skin/classic/messenger/icons/loading.png (messenger/icons/loading.png)
skin/classic/messenger/icons/local-mailhost.png (messenger/icons/local-mailhost.png) skin/classic/messenger/icons/local-mailhost.png (messenger/icons/local-mailhost.png)
skin/classic/messenger/icons/message-mail-attach-del.png (messenger/icons/message-mail-attach-del.png) skin/classic/messenger/icons/message-mail-attach-del.png (messenger/icons/message-mail-attach-del.png)
skin/classic/messenger/icons/message-mail-attach-fwd-offl-reply.png (messenger/icons/message-mail-attach-fwd-offl-reply.png) skin/classic/messenger/icons/message-mail-attach-fwd-offl-reply.png (messenger/icons/message-mail-attach-fwd-offl-reply.png)
@ -358,6 +362,7 @@ classic.jar:
skin/classic/messenger/icons/phishing.png (messenger/icons/phishing.png) skin/classic/messenger/icons/phishing.png (messenger/icons/phishing.png)
skin/classic/messenger/icons/readcol.png (messenger/icons/readcol.png) skin/classic/messenger/icons/readcol.png (messenger/icons/readcol.png)
skin/classic/messenger/icons/remote-blocked.png (messenger/icons/remote-blocked.png) skin/classic/messenger/icons/remote-blocked.png (messenger/icons/remote-blocked.png)
skin/classic/messenger/icons/secure.png (messenger/icons/secure.png)
skin/classic/messenger/icons/server-local-new.png (messenger/icons/server-local-new.png) skin/classic/messenger/icons/server-local-new.png (messenger/icons/server-local-new.png)
skin/classic/messenger/icons/server-local.png (messenger/icons/server-local.png) skin/classic/messenger/icons/server-local.png (messenger/icons/server-local.png)
skin/classic/messenger/icons/server-mail-new.png (messenger/icons/server-mail-new.png) skin/classic/messenger/icons/server-mail-new.png (messenger/icons/server-mail-new.png)

Просмотреть файл

@ -0,0 +1,60 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#security-button {
width: 20px;
margin-top: -1px;
margin-right: 5px;
background-repeat: no-repeat;
}
#security-button[level="high"],
#security-button[level="low"] {
background-image: url("chrome://messenger/skin/icons/secure.png");
}
#security-button[level="broken"] {
background-image: url("chrome://messenger/skin/icons/insecure.png");
}
#security-button[loading="true"] {
background-image: url("chrome://messenger/skin/icons/loading.png");
background-position: 4px 3px;
}
@media (min-resolution: 2ddpx) {
#security-button[loading="true"] {
background-image: url("chrome://messenger/skin/icons/loading@2x.png");
}
}
/*
#header {
overflow: hidden;
padding: 5px;
border-bottom: 1px solid black;
font-weight: bold;
font-size: 1.2em;
}
*/
#header {
border-bottom: 1px solid rgb(105, 105, 105);
overflow: hidden;
}
#addressbox {
font-weight: bold;
font-size: normal;
-moz-appearance: textfield;
overflow: hidden;
margin: 5px 5px;
font-weight: normal;
}
#headerMessage {
margin-top: 3px;
margin-bottom: 3px;
}

Просмотреть файл

@ -0,0 +1,41 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#security-button {
width: 20px;
padding-right: 5px;
background-repeat: no-repeat;
}
#security-button[level="high"],
#security-button[level="low"] {
background-image: url("chrome://messenger/skin/icons/secure.png");
}
#security-button[level="broken"] {
background-image: url("chrome://messenger/skin/icons/insecure.png");
}
#security-button[loading="true"] {
background-image: url("chrome://messenger/skin/icons/loading.png");
background-position: 4px 2px;
}
#header {
overflow: hidden;
border-bottom: 1px solid black;
}
#addressbox {
font-weight: bold;
font-size: normal;
-moz-appearance: textfield;
overflow: hidden;
margin: 0px 5px;
font-weight: normal;
}
#headerMessage {
margin-top: 4px;
}

Двоичные данные
suite/themes/classic/messenger/icons/insecure.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 559 B

Двоичные данные
suite/themes/classic/messenger/icons/loading.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 10 KiB

Двоичные данные
suite/themes/classic/messenger/icons/secure.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 595 B

Просмотреть файл

@ -395,6 +395,7 @@ modern.jar:
skin/modern/messenger/accountManage.css (messenger/accountManage.css) skin/modern/messenger/accountManage.css (messenger/accountManage.css)
skin/modern/messenger/accountWizard.css (messenger/accountWizard.css) skin/modern/messenger/accountWizard.css (messenger/accountWizard.css)
skin/modern/messenger/addressingWidget.css (messenger/addressingWidget.css) skin/modern/messenger/addressingWidget.css (messenger/addressingWidget.css)
skin/modern/messenger/browserRequest.css (messenger/browserRequest.css)
skin/modern/messenger/dialogs.css (messenger/dialogs.css) skin/modern/messenger/dialogs.css (messenger/dialogs.css)
skin/modern/messenger/filterDialog.css (messenger/filterDialog.css) skin/modern/messenger/filterDialog.css (messenger/filterDialog.css)
skin/modern/messenger/folderMenus.css (messenger/folderMenus.css) skin/modern/messenger/folderMenus.css (messenger/folderMenus.css)
@ -483,7 +484,9 @@ modern.jar:
skin/modern/messenger/icons/folder-trash.gif (messenger/icons/folder-trash.gif) skin/modern/messenger/icons/folder-trash.gif (messenger/icons/folder-trash.gif)
skin/modern/messenger/icons/folder-search.gif (messenger/icons/folder-search.gif) skin/modern/messenger/icons/folder-search.gif (messenger/icons/folder-search.gif)
skin/modern/messenger/icons/info.png (messenger/icons/info.png) skin/modern/messenger/icons/info.png (messenger/icons/info.png)
skin/modern/messenger/icons/insecure.png (messenger/icons/insecure.png)
skin/modern/messenger/icons/junk.png (messenger/icons/junk.png) skin/modern/messenger/icons/junk.png (messenger/icons/junk.png)
skin/modern/messenger/icons/loading.png (messenger/icons/loading.png)
skin/modern/messenger/icons/local-mailhost.gif (messenger/icons/local-mailhost.gif) skin/modern/messenger/icons/local-mailhost.gif (messenger/icons/local-mailhost.gif)
skin/modern/messenger/icons/mast-mail.gif (messenger/icons/mast-mail.gif) skin/modern/messenger/icons/mast-mail.gif (messenger/icons/mast-mail.gif)
skin/modern/messenger/icons/message-mail-attach-del.gif (messenger/icons/message-mail-attach-del.gif) skin/modern/messenger/icons/message-mail-attach-del.gif (messenger/icons/message-mail-attach-del.gif)
@ -523,6 +526,7 @@ modern.jar:
skin/modern/messenger/icons/readcol-read.gif (messenger/icons/readcol-read.gif) skin/modern/messenger/icons/readcol-read.gif (messenger/icons/readcol-read.gif)
skin/modern/messenger/icons/readcol-unread.gif (messenger/icons/readcol-unread.gif) skin/modern/messenger/icons/readcol-unread.gif (messenger/icons/readcol-unread.gif)
skin/modern/messenger/icons/remote-blocked.png (messenger/icons/remote-blocked.png) skin/modern/messenger/icons/remote-blocked.png (messenger/icons/remote-blocked.png)
skin/modern/messenger/icons/secure.png (messenger/icons/secure.png)
skin/modern/messenger/icons/server-local-new.gif (messenger/icons/server-local-new.gif) skin/modern/messenger/icons/server-local-new.gif (messenger/icons/server-local-new.gif)
skin/modern/messenger/icons/server-local.gif (messenger/icons/server-local.gif) skin/modern/messenger/icons/server-local.gif (messenger/icons/server-local.gif)
skin/modern/messenger/icons/server-mail-new.gif (messenger/icons/server-mail-new.gif) skin/modern/messenger/icons/server-mail-new.gif (messenger/icons/server-mail-new.gif)

Просмотреть файл

@ -0,0 +1,41 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#security-button {
width: 20px;
padding-right: 5px;
background-repeat: no-repeat;
}
#security-button[level="high"],
#security-button[level="low"] {
background-image: url("chrome://messenger/skin/icons/secure.png");
}
#security-button[level="broken"] {
background-image: url("chrome://messenger/skin/icons/insecure.png");
}
#security-button[loading="true"] {
background-image: url("chrome://messenger/skin/icons/loading.png");
background-position: 4px 2px;
}
#header {
overflow: hidden;
border-bottom: 1px solid black;
}
#addressbox {
font-weight: bold;
font-size: normal;
-moz-appearance: textfield;
overflow: hidden;
margin: 0px 5px;
font-weight: normal;
}
#headerMessage {
margin-top: 4px;
}

Двоичные данные
suite/themes/modern/messenger/icons/insecure.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 559 B

Двоичные данные
suite/themes/modern/messenger/icons/loading.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 14 KiB

Двоичные данные
suite/themes/modern/messenger/icons/secure.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 595 B