зеркало из https://github.com/mozilla/pjs.git
Bug 261790 port various changes betwen xpfe/toolkit
Relanding patch after aviary branch landing - already reviewed
This commit is contained in:
Родитель
3f39d3f81d
Коммит
e73d741463
|
@ -80,7 +80,7 @@ function SelectDetector(event, doReload)
|
|||
str.data = prefvalue;
|
||||
pref.setComplexValue("intl.charset.detector",
|
||||
Components.interfaces.nsISupportsString, str);
|
||||
if (doReload) window._content.location.reload();
|
||||
if (doReload) window.content.location.reload();
|
||||
}
|
||||
catch (ex) {
|
||||
dump("Failed to set the intl.charset.detector preference.\n");
|
||||
|
@ -130,7 +130,7 @@ function UpdateCurrentCharset()
|
|||
|
||||
// exctract the charset from DOM
|
||||
var wnd = document.commandDispatcher.focusedWindow;
|
||||
if ((window == wnd) || (wnd == null)) wnd = window._content;
|
||||
if ((window == wnd) || (wnd == null)) wnd = window.content;
|
||||
menuitem = document.getElementById('charset.' + wnd.document.characterSet);
|
||||
|
||||
if (menuitem) {
|
||||
|
@ -215,7 +215,7 @@ var gLastBrowserCharset = null;
|
|||
|
||||
function charsetLoadListener (event)
|
||||
{
|
||||
var charset = window._content.document.characterSet;
|
||||
var charset = window.content.document.characterSet;
|
||||
|
||||
if (charset.length > 0 && (charset != gLastBrowserCharset)) {
|
||||
gCharsetMenu.SetCurrentCharset(charset);
|
||||
|
@ -227,7 +227,7 @@ function charsetLoadListener (event)
|
|||
|
||||
function composercharsetLoadListener (event)
|
||||
{
|
||||
var charset = window._content.document.characterSet;
|
||||
var charset = window.content.document.characterSet;
|
||||
|
||||
|
||||
if (charset.length > 0 ) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://global/locale/charsetOverlay.dtd">
|
||||
<!DOCTYPE overlay SYSTEM "chrome://global/locale/charsetOverlay.dtd">
|
||||
|
||||
<overlay id="charsetOverlay"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
|
@ -144,7 +144,7 @@
|
|||
<menupopup>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menu label="&charsetMenuMore.label;" accesskey="&charsetMenuMore.accesskey;" datasources="rdf:charset-menu" ref="NC:BrowserMoreCharsetMenuRoot">
|
||||
<menu label="&charsetMenuMore.label;" accesskey="&charsetMenuMore.accesskey;" datasources="rdf:charset-menu" ref="NC:BrowserMoreCharsetMenuRoot">
|
||||
<template>
|
||||
<rule>
|
||||
<menupopup>
|
||||
|
|
|
@ -49,8 +49,6 @@
|
|||
</vbox>
|
||||
</hbox>
|
||||
|
||||
<separator class="thin"/>
|
||||
|
||||
<!-- This method is called inline because it may unset hidden="true" on the
|
||||
above boxes, causing their frames to be build and bindings to load.
|
||||
So, by calling this inline, we guarantee the textboxes and checkboxes
|
||||
|
|
|
@ -61,7 +61,7 @@ function goQuitApplication()
|
|||
{
|
||||
var domWindow = enumerator.getNext();
|
||||
if (("tryToClose" in domWindow) && !domWindow.tryToClose())
|
||||
return false;
|
||||
return false;
|
||||
domWindow.close();
|
||||
};
|
||||
appShell.quit(Components.interfaces.nsIAppShellService.eAttemptQuit);
|
||||
|
@ -96,8 +96,7 @@ function goDoCommand(command)
|
|||
controller.doCommand(command);
|
||||
}
|
||||
catch (e) {
|
||||
dump("An error occurred executing the "+command+" command\n");
|
||||
dump(e+"\n")
|
||||
dump("An error occurred executing the " + command + " command\n" + e + "\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ var nsTransferable = {
|
|||
{
|
||||
// non-string data.
|
||||
supports = currData.supports;
|
||||
length = 0; // kFlavorHasDataProvider
|
||||
length = 0; // kFlavorHasDataProvider
|
||||
}
|
||||
trans.setTransferData(currFlavour, supports, length * 2);
|
||||
}
|
||||
|
|
|
@ -484,7 +484,7 @@
|
|||
<field name="securityUI">
|
||||
null
|
||||
</field>
|
||||
|
||||
|
||||
<field name="userTypedClear">
|
||||
true
|
||||
</field>
|
||||
|
@ -507,7 +507,7 @@
|
|||
|
||||
<field name="focusedElement">
|
||||
null
|
||||
</field>
|
||||
</field>
|
||||
|
||||
<field name="isShowingMessage">
|
||||
false
|
||||
|
|
|
@ -472,20 +472,6 @@
|
|||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="getElementByanonid">
|
||||
<parameter name="aValue"/>
|
||||
<body><![CDATA[
|
||||
var nodes = document.getAnonymousNodes(this);
|
||||
var results;
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
results = nodes[i].getElementsByAttribute("anonid", aValue);
|
||||
if (results.item(0))
|
||||
return results[0];
|
||||
}
|
||||
return null;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="showPopup">
|
||||
<body><![CDATA[
|
||||
this.mPicker.parentNode.showPopup(this, -1, -1, "popup", "bottomleft", "topleft");
|
||||
|
|
|
@ -205,7 +205,6 @@
|
|||
for (dlgtype in buttons) {
|
||||
var button = buttons[dlgtype];
|
||||
button.addEventListener("command", this._handleButtonCommand, true);
|
||||
|
||||
|
||||
// don't override custom labels with pre-defined labels on explicit buttons
|
||||
if (!button.hasAttribute("label")) {
|
||||
|
|
|
@ -74,10 +74,10 @@
|
|||
onget="return this.docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIWebBrowserFind);"/>
|
||||
<property name="editingSession"
|
||||
readonly="true"
|
||||
onget="return this.webNavigation.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIEditingSession);"/>"
|
||||
onget="return this.webNavigation.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIEditingSession);"/>
|
||||
<property name="commandManager"
|
||||
readonly="true"
|
||||
onget="return this.webNavigation.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsICommandManager);"/>"
|
||||
onget="return this.webNavigation.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsICommandManager);"/>
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
|
|
|
@ -287,10 +287,7 @@
|
|||
if (popup)
|
||||
arr = popup.getElementsByAttribute('label', this.inputField.value);
|
||||
|
||||
if (arr && arr.item(0))
|
||||
this.setSelectionInternal(arr[0]);
|
||||
else
|
||||
this.setSelectionInternal(null);
|
||||
this.setSelectionInternal(arr ? arr.item(0) : null);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
return this.stringBundle.formatStringFromName(aStringKey, aStringsArray, aStringsArray.length);
|
||||
}
|
||||
catch (e) {
|
||||
dump("*** Failed to get string " + aStringKey + " in bundle: " + this.src + "\n");
|
||||
dump("*** Failed to format string " + aStringKey + " in bundle: " + this.src + "\n");
|
||||
throw e;
|
||||
}
|
||||
]]>
|
||||
|
|
|
@ -283,7 +283,7 @@
|
|||
if (aStateFlags & nsIWebProgressListener.STATE_START)
|
||||
this.mBrowser.mFavIconURL = null;
|
||||
|
||||
if (aStateFlags & nsIWebProgressListener.STATE_START &&
|
||||
if (aStateFlags & nsIWebProgressListener.STATE_START &&
|
||||
aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) {
|
||||
// It's okay to clear what the user typed when we start
|
||||
// loading a document. If the user types, this flag gets
|
||||
|
@ -296,7 +296,7 @@
|
|||
if (!this.mBlank) {
|
||||
this.mTab.setAttribute("busy", "true");
|
||||
this.mTab.label = this.mTabBrowser.mStringBundle.getString("tabs.loading");
|
||||
this.mTab.removeAttribute("image");
|
||||
this.mTab.removeAttribute("image");
|
||||
this.mIcon = null;
|
||||
|
||||
if (this.mTabBrowser.mCurrentTab == this.mTab)
|
||||
|
@ -342,10 +342,10 @@
|
|||
p.onStateChange(aWebProgress, aRequest, aStateFlags, aStatus);
|
||||
}
|
||||
}
|
||||
}
|
||||
,
|
||||
},
|
||||
|
||||
onLocationChange : function(aWebProgress, aRequest, aLocation) {
|
||||
onLocationChange : function(aWebProgress, aRequest, aLocation)
|
||||
{
|
||||
// The document loaded correctly, clear the value if we should
|
||||
if (this.mBrowser.userTypedClear)
|
||||
this.mBrowser.userTypedValue = null;
|
||||
|
@ -359,7 +359,8 @@
|
|||
}
|
||||
},
|
||||
|
||||
onStatusChange : function(aWebProgress, aRequest, aStatus, aMessage) {
|
||||
onStatusChange : function(aWebProgress, aRequest, aStatus, aMessage)
|
||||
{
|
||||
if (this.mBlank)
|
||||
return;
|
||||
|
||||
|
@ -391,8 +392,7 @@
|
|||
return this;
|
||||
throw Components.results.NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
@ -412,7 +412,7 @@
|
|||
<body>
|
||||
<![CDATA[
|
||||
return (aURI && this.mPrefs.getBoolPref("browser.chrome.site_icons") &&
|
||||
this.mPrefs.getBoolPref("browser.chrome.favicons") &&
|
||||
this.mPrefs.getBoolPref("browser.chrome.favicons") &&
|
||||
("schemeIs" in aURI) && (aURI.schemeIs("http") || aURI.schemeIs("https")));
|
||||
]]>
|
||||
</body>
|
||||
|
@ -591,7 +591,7 @@
|
|||
|
||||
// Update the window title.
|
||||
this.updateTitlebar();
|
||||
|
||||
|
||||
// If the new tab is busy, and our current state is not busy, then
|
||||
// we need to fire a start to all progress listeners.
|
||||
const nsIWebProgressListener = Components.interfaces.nsIWebProgressListener;
|
||||
|
@ -859,7 +859,9 @@
|
|||
}
|
||||
|
||||
// Wire up a progress listener to our filter.
|
||||
const listener = this.mTabProgressListener(this.mCurrentTab, this.mCurrentBrowser, false);
|
||||
const listener = this.mTabProgressListener(this.mCurrentTab,
|
||||
this.mCurrentBrowser,
|
||||
false);
|
||||
filter.addProgressListener(listener, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
|
||||
this.mTabListeners[0] = listener;
|
||||
]]>
|
||||
|
@ -886,16 +888,14 @@
|
|||
<parameter name="aPostData"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
var blank = (aURI == "about:blank");
|
||||
|
||||
if (!this.mTabbedMode)
|
||||
this.enterTabbedMode();
|
||||
|
||||
var b = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
|
||||
"browser");
|
||||
var t = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
|
||||
"tab");
|
||||
|
||||
var blank = (aURI == "about:blank");
|
||||
|
||||
if (blank)
|
||||
t.setAttribute("label", this.mStringBundle.getString("tabs.untitled"));
|
||||
else
|
||||
|
@ -910,6 +910,8 @@
|
|||
t.setAttribute("onerror", "this.parentNode.parentNode.parentNode.parentNode.addToMissedIconCache(this.getAttribute('image')); this.removeAttribute('image');");
|
||||
this.mTabContainer.appendChild(t);
|
||||
|
||||
var b = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
|
||||
"browser");
|
||||
b.setAttribute("type", "content");
|
||||
b.setAttribute("message", "true");
|
||||
b.setAttribute("contextmenu", this.getAttribute("contentcontextmenu"));
|
||||
|
|
|
@ -15,19 +15,18 @@
|
|||
display: -moz-box;
|
||||
}
|
||||
|
||||
/* hide the content, but don't destroy the frames. Make sure this
|
||||
comes before any rules involving "hidden" */
|
||||
*[collapsed="true"], *[moz-collapsed="true"] {
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
/* The rule for hidden comes AFTER the rule for collapsed. That way if
|
||||
both are specified on an element, the hidden rule wins. */
|
||||
/* hide the content and destroy the frame */
|
||||
*[hidden="true"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* hide the content, but don't destroy the frames */
|
||||
*[collapsed="true"],
|
||||
*[moz-collapsed="true"] {
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
|
||||
/* ::::::::::
|
||||
:: Rules for 'hiding' portions of the chrome for special
|
||||
:: kinds of windows (not JUST browser windows) with toolbars
|
||||
|
@ -471,10 +470,6 @@ listbox {
|
|||
height: 200px;
|
||||
}
|
||||
|
||||
listhead, listrows, listboxbody {
|
||||
-moz-user-focus: none;
|
||||
}
|
||||
|
||||
listhead {
|
||||
-moz-box-orient: vertical;
|
||||
}
|
||||
|
@ -522,7 +517,6 @@ treecol.treecol-image {
|
|||
tree > treechildren {
|
||||
display: -moz-box;
|
||||
-moz-binding: url("chrome://global/content/bindings/tree.xml#treebody");
|
||||
-moz-user-focus: none;
|
||||
-moz-user-select: none;
|
||||
-moz-box-flex: 1;
|
||||
}
|
||||
|
@ -778,6 +772,10 @@ menulist[editable] {
|
|||
-moz-binding: url("chrome://global/content/bindings/menulist.xml#menulist-editable");
|
||||
}
|
||||
|
||||
menulist[type="description"] {
|
||||
-moz-binding: url("chrome://global/content/bindings/menulist.xml#menulist-description");
|
||||
}
|
||||
|
||||
html|*.menulist-editable-input {
|
||||
-moz-appearance: none !important;
|
||||
}
|
||||
|
@ -803,7 +801,7 @@ grippy {
|
|||
.tree-splitter {
|
||||
width: 0px;
|
||||
max-width: 0px;
|
||||
min-width: 0% ! important;
|
||||
min-width: 0% ! important;
|
||||
min-height: 0% ! important;
|
||||
-moz-box-ordinal-group: 2147483646;
|
||||
}
|
||||
|
@ -832,6 +830,7 @@ scrollbar[value="hidden"] {
|
|||
|
||||
scrollbox {
|
||||
-moz-binding: url("chrome://global/content/bindings/scrollbox.xml#scrollbox");
|
||||
/* This makes it scrollable! */
|
||||
overflow:hidden ! important;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче