mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 319659 XPFE code assumes document.firstChild is the root element
p=me r=neil.parkwaycc.co.uk sr=jag
This commit is contained in:
parent
02c3dc5507
commit
409f5623a2
@ -2420,7 +2420,7 @@ var nsSpellingCommand =
|
|||||||
{
|
{
|
||||||
window.cancelSendMessage = false;
|
window.cancelSendMessage = false;
|
||||||
try {
|
try {
|
||||||
var skipBlockQuotes = (window.document.firstChild.getAttribute("windowtype") == "msgcompose");
|
var skipBlockQuotes = (window.document.documentElement.getAttribute("windowtype") == "msgcompose");
|
||||||
window.openDialog("chrome://editor/content/EdSpellCheck.xul", "_blank",
|
window.openDialog("chrome://editor/content/EdSpellCheck.xul", "_blank",
|
||||||
"chrome,close,titlebar,modal", false, skipBlockQuotes, true);
|
"chrome,close,titlebar,modal", false, skipBlockQuotes, true);
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ function editPage(url, launchWindow, delay)
|
|||||||
// if the current window is a browser window, then extract the current charset menu setting from the current
|
// if the current window is a browser window, then extract the current charset menu setting from the current
|
||||||
// document and use it to initialize the new composer window...
|
// document and use it to initialize the new composer window...
|
||||||
|
|
||||||
var wintype = document.firstChild.getAttribute('windowtype');
|
var wintype = document.documentElement.getAttribute('windowtype');
|
||||||
var charsetArg;
|
var charsetArg;
|
||||||
|
|
||||||
if (launchWindow && (wintype == "navigator:browser") && launchWindow.content.document)
|
if (launchWindow && (wintype == "navigator:browser") && launchWindow.content.document)
|
||||||
|
@ -2253,7 +2253,7 @@ function OnMsgLoaded(aUrl)
|
|||||||
var markReadOnADelay = gPrefBranch.getBoolPref("mailnews.mark_message_read.delay");
|
var markReadOnADelay = gPrefBranch.getBoolPref("mailnews.mark_message_read.delay");
|
||||||
if (msgHdr && !msgHdr.isRead)
|
if (msgHdr && !msgHdr.isRead)
|
||||||
{
|
{
|
||||||
var wintype = document.firstChild.getAttribute('windowtype');
|
var wintype = document.documentElement.getAttribute('windowtype');
|
||||||
if (markReadOnADelay && wintype == "mail:3pane") // only use the timer if viewing using the 3-pane preview pane and the user has set the pref
|
if (markReadOnADelay && wintype == "mail:3pane") // only use the timer if viewing using the 3-pane preview pane and the user has set the pref
|
||||||
gMarkViewedMessageAsReadTimer = setTimeout(MarkCurrentMessageAsRead, gPrefBranch.getIntPref("mailnews.mark_message_read.delay.interval") * 1000);
|
gMarkViewedMessageAsReadTimer = setTimeout(MarkCurrentMessageAsRead, gPrefBranch.getIntPref("mailnews.mark_message_read.delay.interval") * 1000);
|
||||||
else
|
else
|
||||||
|
@ -119,7 +119,7 @@ var SecurityController =
|
|||||||
{
|
{
|
||||||
case "cmd_viewSecurityStatus":
|
case "cmd_viewSecurityStatus":
|
||||||
{
|
{
|
||||||
if (document.firstChild.getAttribute('windowtype') == "mail:messageWindow")
|
if (document.documentElement.getAttribute('windowtype') == "mail:messageWindow")
|
||||||
{
|
{
|
||||||
return ( gCurrentMessageUri != null);
|
return ( gCurrentMessageUri != null);
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ var contentAreaDNDObserver = {
|
|||||||
/^\s*(javascript|data):/.test(url))
|
/^\s*(javascript|data):/.test(url))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (document.firstChild.getAttribute('windowtype')) {
|
switch (document.documentElement.getAttribute('windowtype')) {
|
||||||
case "navigator:browser":
|
case "navigator:browser":
|
||||||
// Perform a security check before loading the URI
|
// Perform a security check before loading the URI
|
||||||
nsDragAndDrop.dragDropSecurityCheck(aEvent, aDragSession, url);
|
nsDragAndDrop.dragDropSecurityCheck(aEvent, aDragSession, url);
|
||||||
|
@ -96,7 +96,7 @@ function openNewWindowWith(url, sendReferrer)
|
|||||||
// set, then extract the current charset menu setting from the current document and use it to
|
// set, then extract the current charset menu setting from the current document and use it to
|
||||||
// initialize the new browser window...
|
// initialize the new browser window...
|
||||||
var charsetArg = null;
|
var charsetArg = null;
|
||||||
var wintype = document.firstChild.getAttribute('windowtype');
|
var wintype = document.documentElement.getAttribute('windowtype');
|
||||||
if (wintype == "navigator:browser")
|
if (wintype == "navigator:browser")
|
||||||
charsetArg = "charset=" + window.content.document.characterSet;
|
charsetArg = "charset=" + window.content.document.characterSet;
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ function openNewTabWith(url, sendReferrer, reverseBackgroundPref)
|
|||||||
|
|
||||||
// As in openNewWindowWith(), we want to pass the charset of the
|
// As in openNewWindowWith(), we want to pass the charset of the
|
||||||
// current document over to a new tab.
|
// current document over to a new tab.
|
||||||
var wintype = browserDocument.firstChild.getAttribute('windowtype');
|
var wintype = browserDocument.documentElement.getAttribute('windowtype');
|
||||||
var originCharset;
|
var originCharset;
|
||||||
if (wintype == "navigator:browser") {
|
if (wintype == "navigator:browser") {
|
||||||
originCharset = window.content.document.characterSet;
|
originCharset = window.content.document.characterSet;
|
||||||
|
@ -747,7 +747,7 @@ function sidebar_overlay_init() {
|
|||||||
sidebarObj.master_datasources = get_remote_datasource_url();
|
sidebarObj.master_datasources = get_remote_datasource_url();
|
||||||
sidebarObj.master_datasources += " chrome://communicator/content/sidebar/local-panels.rdf";
|
sidebarObj.master_datasources += " chrome://communicator/content/sidebar/local-panels.rdf";
|
||||||
sidebarObj.master_resource = 'urn:sidebar:master-panel-list';
|
sidebarObj.master_resource = 'urn:sidebar:master-panel-list';
|
||||||
sidebarObj.component = document.firstChild.getAttribute('windowtype');
|
sidebarObj.component = document.documentElement.getAttribute('windowtype');
|
||||||
debug("sidebarObj.component is " + sidebarObj.component);
|
debug("sidebarObj.component is " + sidebarObj.component);
|
||||||
|
|
||||||
// Initialize the display
|
// Initialize the display
|
||||||
|
@ -278,7 +278,7 @@ function mailCharsetLoadListener (event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var wintype = document.firstChild.getAttribute('windowtype');
|
var wintype = document.documentElement.getAttribute('windowtype');
|
||||||
if (window && (wintype == "navigator:browser"))
|
if (window && (wintype == "navigator:browser"))
|
||||||
{
|
{
|
||||||
var contentArea = window.document.getElementById("appcontent");
|
var contentArea = window.document.getElementById("appcontent");
|
||||||
|
Loading…
Reference in New Issue
Block a user