зеркало из https://github.com/mozilla/gecko-dev.git
merge from mozilla-central. no merges required
This commit is contained in:
Коммит
aed99c36d1
|
@ -1335,6 +1335,11 @@ void nsDocAccessible::ContentStatesChanged(nsIDocument* aDocument,
|
|||
nsHTMLSelectOptionAccessible::SelectionChangedIfOption(aContent2);
|
||||
}
|
||||
|
||||
void nsDocAccessible::DocumentStatesChanged(nsIDocument* aDocument,
|
||||
PRInt32 aStateMask)
|
||||
{
|
||||
}
|
||||
|
||||
void nsDocAccessible::CharacterDataWillChange(nsIDocument *aDocument,
|
||||
nsIContent* aContent,
|
||||
CharacterDataChangeInfo* aInfo)
|
||||
|
|
|
@ -112,8 +112,8 @@
|
|||
<command id="Browser:ReloadSkipCache" oncommand="BrowserReloadSkipCache()" disabled="true">
|
||||
<observes element="Browser:Reload" attribute="disabled"/>
|
||||
</command>
|
||||
<command id="Browser:NextTab" oncommand="gBrowser.mTabContainer.advanceSelectedTab(1, true);"/>
|
||||
<command id="Browser:PrevTab" oncommand="gBrowser.mTabContainer.advanceSelectedTab(-1, true);"/>
|
||||
<command id="Browser:NextTab" oncommand="gBrowser.tabContainer.advanceSelectedTab(1, true);"/>
|
||||
<command id="Browser:PrevTab" oncommand="gBrowser.tabContainer.advanceSelectedTab(-1, true);"/>
|
||||
<command id="Browser:ShowAllTabs" oncommand="allTabs.open();"/>
|
||||
<command id="cmd_fullZoomReduce" oncommand="FullZoom.reduce()"/>
|
||||
<command id="cmd_fullZoomEnlarge" oncommand="FullZoom.enlarge()"/>
|
||||
|
|
|
@ -202,7 +202,7 @@ var ctrlTab = {
|
|||
if (this._tabList)
|
||||
return this._tabList;
|
||||
|
||||
var list = Array.slice(gBrowser.mTabs);
|
||||
var list = Array.slice(gBrowser.tabs);
|
||||
|
||||
if (this._closing)
|
||||
this.detachTab(this._closing, list);
|
||||
|
@ -445,9 +445,9 @@ var ctrlTab = {
|
|||
} else if (!event.shiftKey) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
if (gBrowser.mTabs.length > 2) {
|
||||
if (gBrowser.tabs.length > 2) {
|
||||
this.open();
|
||||
} else if (gBrowser.mTabs.length == 2) {
|
||||
} else if (gBrowser.tabs.length == 2) {
|
||||
gBrowser.selectedTab = gBrowser.selectedTab.nextSibling ||
|
||||
gBrowser.selectedTab.previousSibling;
|
||||
}
|
||||
|
@ -577,7 +577,7 @@ var allTabs = {
|
|||
return;
|
||||
this._initiated = true;
|
||||
|
||||
Array.forEach(gBrowser.mTabs, function (tab) {
|
||||
Array.forEach(gBrowser.tabs, function (tab) {
|
||||
this._addPreview(tab);
|
||||
}, this);
|
||||
|
||||
|
@ -672,15 +672,15 @@ var allTabs = {
|
|||
if (this.isOpen)
|
||||
return;
|
||||
|
||||
this._maxPanelHeight = Math.max(gBrowser.clientHeight, screen.availHeight / 2);
|
||||
this._maxPanelWidth = Math.max(gBrowser.clientWidth, screen.availWidth / 2);
|
||||
|
||||
this.filter();
|
||||
|
||||
tabPreviewPanelHelper.opening(this);
|
||||
|
||||
this.panel.popupBoxObject.setConsumeRollupEvent(Ci.nsIPopupBoxObject.ROLLUP_CONSUME);
|
||||
var estimateHeight = (this._maxHeight + parseInt(this.container.maxHeight) + 50) / 2;
|
||||
this.panel.openPopupAtScreen(screen.availLeft + (screen.availWidth - this._maxWidth) / 2,
|
||||
screen.availTop + (screen.availHeight - estimateHeight) / 2,
|
||||
false);
|
||||
this.panel.popupBoxObject.setConsumeRollupEvent(Ci.nsIPopupBoxObject.ROLLUP_NO_CONSUME);
|
||||
this.panel.openPopup(gBrowser, "overlap", 0, 0, false, true);
|
||||
},
|
||||
|
||||
close: function allTabs_close() {
|
||||
|
@ -694,6 +694,10 @@ var allTabs = {
|
|||
this.panel.addEventListener("keypress", this, false);
|
||||
this.panel.addEventListener("keypress", this, true);
|
||||
this._browserCommandSet.addEventListener("command", this, false);
|
||||
|
||||
// When the panel is open, a second click on the all tabs button should
|
||||
// close the panel but not re-open it.
|
||||
document.getElementById("Browser:ShowAllTabs").setAttribute("disabled", "true");
|
||||
},
|
||||
|
||||
suspendGUI: function allTabs_suspendGUI() {
|
||||
|
@ -706,6 +710,10 @@ var allTabs = {
|
|||
this.panel.removeEventListener("keypress", this, false);
|
||||
this.panel.removeEventListener("keypress", this, true);
|
||||
this._browserCommandSet.removeEventListener("command", this, false);
|
||||
|
||||
setTimeout(function () {
|
||||
document.getElementById("Browser:ShowAllTabs").removeAttribute("disabled");
|
||||
}, 300);
|
||||
},
|
||||
|
||||
handleEvent: function allTabs_handleEvent(event) {
|
||||
|
@ -754,8 +762,6 @@ var allTabs = {
|
|||
|
||||
_visible: 0,
|
||||
_currentFilter: null,
|
||||
get _maxWidth () screen.availWidth * .9,
|
||||
get _maxHeight () screen.availHeight * .75,
|
||||
get _stack () {
|
||||
delete this._stack;
|
||||
return this._stack = document.getElementById("allTabs-stack");
|
||||
|
@ -786,21 +792,22 @@ var allTabs = {
|
|||
_reflow: function allTabs_reflow() {
|
||||
this._updateTabCloseButton();
|
||||
|
||||
const CONTAINER_MAX_WIDTH = this._maxPanelWidth * .95;
|
||||
const CONTAINER_MAX_HEIGHT = this._maxPanelHeight - 35;
|
||||
// the size of the whole preview relative to the thumbnail
|
||||
const REL_PREVIEW_THUMBNAIL = 1.2;
|
||||
const REL_PREVIEW_HEIGHT_WIDTH = tabPreviews.height / tabPreviews.width;
|
||||
const PREVIEW_MAX_WIDTH = tabPreviews.width * REL_PREVIEW_THUMBNAIL;
|
||||
|
||||
var maxHeight = this._maxHeight;
|
||||
var maxWidth = this._maxWidth;
|
||||
var rel = tabPreviews.height / tabPreviews.width;
|
||||
var rows, previewHeight, previewWidth, outerHeight;
|
||||
var previewMaxWidth = tabPreviews.width * REL_PREVIEW_THUMBNAIL;
|
||||
this._columns = Math.floor(maxWidth / previewMaxWidth);
|
||||
this._columns = Math.floor(CONTAINER_MAX_WIDTH / PREVIEW_MAX_WIDTH);
|
||||
do {
|
||||
rows = Math.ceil(this._visible / this._columns);
|
||||
previewWidth = Math.min(previewMaxWidth, Math.round(maxWidth / this._columns));
|
||||
previewHeight = Math.round(previewWidth * rel);
|
||||
previewWidth = Math.min(PREVIEW_MAX_WIDTH,
|
||||
Math.round(CONTAINER_MAX_WIDTH / this._columns));
|
||||
previewHeight = Math.round(previewWidth * REL_PREVIEW_HEIGHT_WIDTH);
|
||||
outerHeight = previewHeight + this._previewLabelHeight;
|
||||
} while (rows * outerHeight > maxHeight && ++this._columns);
|
||||
} while (rows * outerHeight > CONTAINER_MAX_HEIGHT && ++this._columns);
|
||||
|
||||
var outerWidth = previewWidth;
|
||||
{
|
||||
|
@ -834,10 +841,10 @@ var allTabs = {
|
|||
row.appendChild(preview);
|
||||
}, this);
|
||||
|
||||
this._stack.width = maxWidth;
|
||||
this._stack.width = this._maxPanelWidth;
|
||||
this.container.width = Math.ceil(outerWidth * Math.min(this._columns, this._visible));
|
||||
this.container.left = Math.round((maxWidth - this.container.width) / 2);
|
||||
this.container.maxWidth = maxWidth - this.container.left;
|
||||
this.container.left = Math.round((this._maxPanelWidth - this.container.width) / 2);
|
||||
this.container.maxWidth = this._maxPanelWidth - this.container.left;
|
||||
this.container.maxHeight = rows * outerHeight;
|
||||
},
|
||||
|
||||
|
@ -881,19 +888,19 @@ var allTabs = {
|
|||
if (event &&
|
||||
event.target.parentNode.parentNode == this.container &&
|
||||
(event.target._tab.previousSibling || event.target._tab.nextSibling)) {
|
||||
let preview = event.target.getBoundingClientRect();
|
||||
let canvas = event.target.firstChild.getBoundingClientRect();
|
||||
let container = this.container.getBoundingClientRect();
|
||||
let tabCloseButton = this.tabCloseButton.getBoundingClientRect();
|
||||
let alignLeft = getComputedStyle(this.panel, "").direction == "rtl";
|
||||
#ifdef XP_MACOSX
|
||||
alignLeft = !alignLeft;
|
||||
#endif
|
||||
this.tabCloseButton.left = preview.left -
|
||||
this.tabCloseButton.left = canvas.left -
|
||||
container.left +
|
||||
parseInt(this.container.left) +
|
||||
(alignLeft ? 0 :
|
||||
preview.width - tabCloseButton.width);
|
||||
this.tabCloseButton.top = preview.top - container.top;
|
||||
canvas.width - tabCloseButton.width);
|
||||
this.tabCloseButton.top = canvas.top - container.top;
|
||||
this.tabCloseButton._targetPreview = event.target;
|
||||
this.tabCloseButton.style.visibility = "visible";
|
||||
event.target.setAttribute("closebuttonhover", "true");
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
<handler event="drop"><![CDATA[
|
||||
let tab = event.dataTransfer.mozGetDataAt("application/x-moz-node", 0);
|
||||
if (tab && tab.parentNode == gBrowser.tabContainer) {
|
||||
let newIndex = Array.indexOf(gBrowser.tabContainer.childNodes, this._tab);
|
||||
let newIndex = Array.indexOf(gBrowser.tabs, this._tab);
|
||||
gBrowser.moveTabTo(tab, newIndex);
|
||||
}
|
||||
]]></handler>
|
||||
|
|
|
@ -2984,7 +2984,7 @@ const DOMLinkHandler = {
|
|||
if (browserIndex == -1)
|
||||
break;
|
||||
|
||||
var tab = gBrowser.mTabContainer.childNodes[browserIndex];
|
||||
let tab = gBrowser.tabs[browserIndex];
|
||||
gBrowser.setIcon(tab, link.href);
|
||||
iconAdded = true;
|
||||
}
|
||||
|
@ -6564,7 +6564,7 @@ var FeedHandler = {
|
|||
function undoCloseTab(aIndex) {
|
||||
// wallpaper patch to prevent an unnecessary blank tab (bug 343895)
|
||||
var blankTabToRemove = null;
|
||||
if (gBrowser.tabContainer.childNodes.length == 1 &&
|
||||
if (gBrowser.tabs.length == 1 &&
|
||||
!gPrefService.getBoolPref("browser.tabs.autoHide") &&
|
||||
gBrowser.sessionHistory.count < 2 &&
|
||||
gBrowser.currentURI.spec == "about:blank" &&
|
||||
|
@ -6627,7 +6627,7 @@ var gBookmarkAllTabsHandler = {
|
|||
},
|
||||
|
||||
_updateCommandState: function BATH__updateCommandState(aTabClose) {
|
||||
var numTabs = gBrowser.tabContainer.childNodes.length;
|
||||
var numTabs = gBrowser.tabs.length;
|
||||
|
||||
// The TabClose event is fired before the tab is removed from the DOM
|
||||
if (aTabClose)
|
||||
|
|
|
@ -276,9 +276,6 @@
|
|||
</panel>
|
||||
|
||||
<panel id="allTabs-panel" hidden="true" norestorefocus="true" ignorekeys="true"
|
||||
# XXX: KUI style disabled, because the transparent background slows down
|
||||
# interacting with the panel, esp. the search field.
|
||||
# class="KUI-panel"
|
||||
onmouseover="allTabs._updateTabCloseButton(event);">
|
||||
<hbox id="allTabs-meta" align="center">
|
||||
<spacer flex="1"/>
|
||||
|
|
|
@ -19,11 +19,8 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
.tabbrowser-tabs:not([closebuttons="noclose"]):not([closebuttons="closeatend"]) > .tabbrowser-tab[selected="true"]:not(:only-child) > .tab-close-button {
|
||||
display: -moz-box;
|
||||
}
|
||||
|
||||
.tabbrowser-tabs[closebuttons="alltabs"] > .tabbrowser-tab:not(:only-child) > .tab-close-button {
|
||||
.tabbrowser-tabs:not([closebuttons="noclose"]):not([closebuttons="closeatend"]) > .tabbrowser-tab[selected="true"] > .tab-close-button,
|
||||
.tabbrowser-tabs[closebuttons="alltabs"] > .tabbrowser-tab > .tab-close-button {
|
||||
display: -moz-box;
|
||||
}
|
||||
|
||||
|
|
|
@ -78,10 +78,11 @@
|
|||
<children/>
|
||||
</content>
|
||||
<implementation implements="nsIDOMEventListener">
|
||||
<field name="mPrefs" readonly="true">
|
||||
Components.classes['@mozilla.org/preferences-service;1']
|
||||
.getService(Components.interfaces.nsIPrefService)
|
||||
.getBranch(null);
|
||||
<field name="tabContainer" readonly="true">
|
||||
document.getElementById(this.getAttribute("tabcontainer"));
|
||||
</field>
|
||||
<field name="tabs" readonly="true">
|
||||
this.tabContainer.childNodes;
|
||||
</field>
|
||||
<field name="mURIFixup" readonly="true">
|
||||
Components.classes["@mozilla.org/docshell/urifixup;1"]
|
||||
|
@ -94,15 +95,9 @@
|
|||
<field name="mTabBox" readonly="true">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "tabbox");
|
||||
</field>
|
||||
<field name="mTabContainer" readonly="true">
|
||||
document.getElementById(this.getAttribute("tabcontainer"));
|
||||
</field>
|
||||
<field name="mPanelContainer" readonly="true">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "panelcontainer");
|
||||
</field>
|
||||
<field name="mTabs" readonly="true">
|
||||
this.mTabContainer.childNodes
|
||||
</field>
|
||||
<field name="mStringBundle">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "tbstringbundle");
|
||||
</field>
|
||||
|
@ -209,7 +204,7 @@
|
|||
<![CDATA[
|
||||
for (let i = 0; i < this.browsers.length; i++) {
|
||||
if (this.browsers[i].contentWindow == aWindow)
|
||||
return this.mTabs[i];
|
||||
return this.tabs[i];
|
||||
}
|
||||
return null;
|
||||
]]>
|
||||
|
@ -669,8 +664,9 @@
|
|||
<parameter name="aURI"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
return (aURI && this.mPrefs.getBoolPref("browser.chrome.site_icons") &&
|
||||
this.mPrefs.getBoolPref("browser.chrome.favicons") &&
|
||||
return (aURI &&
|
||||
Services.prefs.getBoolPref("browser.chrome.site_icons") &&
|
||||
Services.prefs.getBoolPref("browser.chrome.favicons") &&
|
||||
("schemeIs" in aURI) && (aURI.schemeIs("http") || aURI.schemeIs("https")));
|
||||
]]>
|
||||
</body>
|
||||
|
@ -683,9 +679,9 @@
|
|||
var browser = this.getBrowserForTab(aTab);
|
||||
var docURIObject = browser.contentDocument.documentURIObject;
|
||||
if (browser.contentDocument instanceof ImageDocument) {
|
||||
if (this.mPrefs.getBoolPref("browser.chrome.site_icons")) {
|
||||
if (Services.prefs.getBoolPref("browser.chrome.site_icons")) {
|
||||
try {
|
||||
var sz = this.mPrefs.getIntPref("browser.chrome.image_icons.max_size");
|
||||
let sz = Services.prefs.getIntPref("browser.chrome.image_icons.max_size");
|
||||
if (!sz)
|
||||
return;
|
||||
|
||||
|
@ -779,7 +775,7 @@
|
|||
<parameter name="aForceUpdate"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
var newBrowser = this.getBrowserAtIndex(this.mTabContainer.selectedIndex);
|
||||
var newBrowser = this.getBrowserAtIndex(this.tabContainer.selectedIndex);
|
||||
if (this.mCurrentBrowser == newBrowser && !aForceUpdate)
|
||||
return;
|
||||
|
||||
|
@ -825,7 +821,7 @@
|
|||
|
||||
// make sure that all status indicators are properly updated
|
||||
if ("onUpdateCurrentBrowser" in p) {
|
||||
var listener = this.mTabListeners[this.mTabContainer.selectedIndex] || null;
|
||||
let listener = this.mTabListeners[this.tabContainer.selectedIndex] || null;
|
||||
if (listener && listener.mStateFlags)
|
||||
p.onUpdateCurrentBrowser(listener.mStateFlags, listener.mStatus,
|
||||
listener.mMessage, listener.mTotalProgress);
|
||||
|
@ -1029,7 +1025,7 @@
|
|||
}
|
||||
|
||||
var bgLoad = (aLoadInBackground != null) ? aLoadInBackground :
|
||||
this.mPrefs.getBoolPref("browser.tabs.loadInBackground");
|
||||
Services.prefs.getBoolPref("browser.tabs.loadInBackground");
|
||||
var owner = bgLoad ? null : this.selectedTab;
|
||||
var tab = this.addTab(aURI, {
|
||||
referrerURI: aReferrerURI,
|
||||
|
@ -1079,7 +1075,7 @@
|
|||
else
|
||||
firstTabAdded = this.addTab(aURIs[0], {ownerTab: owner});
|
||||
|
||||
var tabNum = this.mTabContainer.selectedIndex;
|
||||
var tabNum = this.tabContainer.selectedIndex;
|
||||
for (let i = 1; i < aURIs.length; ++i) {
|
||||
let tab = this.addTab(aURIs[i]);
|
||||
if (aReplace)
|
||||
|
@ -1139,15 +1135,15 @@
|
|||
t.setAttribute("label", aURI);
|
||||
|
||||
t.setAttribute("crop", "end");
|
||||
t.maxWidth = this.mTabContainer.mTabMaxWidth;
|
||||
t.minWidth = this.mTabContainer.mTabMinWidth;
|
||||
t.maxWidth = this.tabContainer.mTabMaxWidth;
|
||||
t.minWidth = this.tabContainer.mTabMinWidth;
|
||||
t.width = 0;
|
||||
t.setAttribute("flex", "100");
|
||||
t.setAttribute("validate", "never");
|
||||
t.setAttribute("onerror", "this.removeAttribute('image');");
|
||||
t.className = "tabbrowser-tab";
|
||||
|
||||
this.mTabContainer.appendChild(t);
|
||||
this.tabContainer.appendChild(t);
|
||||
|
||||
if (this.tabContainer.mTabstrip._isRTLScrollbox) {
|
||||
/* In RTL UI, the tab is visually added to the left side of the
|
||||
|
@ -1155,11 +1151,11 @@
|
|||
* order to make sure the same set of tabs is visible before and
|
||||
* after the new tab is added. See bug 508816. */
|
||||
|
||||
this.tabContainer.mTabstrip.scrollByPixels(this.mTabs[0].clientWidth);
|
||||
this.tabContainer.mTabstrip.scrollByPixels(this.tabs[0].clientWidth);
|
||||
}
|
||||
|
||||
// invalidate cache, because mTabContainer is about to change
|
||||
this._browsers = null;
|
||||
// invalidate cache, because tabContainer is about to change
|
||||
this._browsers = null;
|
||||
|
||||
// If this new tab is owned by another, assert that relationship
|
||||
if (aOwner)
|
||||
|
@ -1188,7 +1184,7 @@
|
|||
this.tabContainer.updateVisibility();
|
||||
|
||||
// wire up a progress listener for the new browser object.
|
||||
var position = this.mTabContainer.childNodes.length-1;
|
||||
var position = this.tabs.length - 1;
|
||||
var tabListener = this.mTabProgressListener(t, b, blank);
|
||||
const filter = Components.classes["@mozilla.org/appshell/component/browser-status-filter;1"]
|
||||
.createInstance(Components.interfaces.nsIWebProgress);
|
||||
|
@ -1255,7 +1251,7 @@
|
|||
// an external application or bookmark, i.e. somewhere other
|
||||
// than the current tab.
|
||||
if ((aRelatedToCurrent == null ? aReferrerURI : aRelatedToCurrent) &&
|
||||
this.mPrefs.getBoolPref("browser.tabs.insertRelatedAfterCurrent")) {
|
||||
Services.prefs.getBoolPref("browser.tabs.insertRelatedAfterCurrent")) {
|
||||
let newTabPos = (this._lastRelatedTab ||
|
||||
this.selectedTab)._tPos + 1;
|
||||
this.moveTabTo(t, newTabPos);
|
||||
|
@ -1271,17 +1267,16 @@
|
|||
<parameter name="aAll"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
var numTabs = this.mTabContainer.childNodes.length;
|
||||
var numTabs = this.tabs.length;
|
||||
var reallyClose = true;
|
||||
if (numTabs <= 1)
|
||||
return reallyClose;
|
||||
|
||||
const pref = "browser.tabs.warnOnClose";
|
||||
var shouldPrompt = this.mPrefs.getBoolPref(pref);
|
||||
var shouldPrompt = Services.prefs.getBoolPref(pref);
|
||||
|
||||
if (shouldPrompt) {
|
||||
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
||||
.getService(Components.interfaces.nsIPromptService);
|
||||
let promptService = Services.prompt;
|
||||
|
||||
//default to true: if it were false, we wouldn't get this far
|
||||
var warnOnClose = { value:true };
|
||||
|
@ -1310,7 +1305,7 @@
|
|||
reallyClose = (buttonPressed == 0);
|
||||
// don't set the pref unless they press OK and it's false
|
||||
if (reallyClose && !warnOnClose.value)
|
||||
this.mPrefs.setBoolPref(pref, false);
|
||||
Services.prefs.setBoolPref(pref, false);
|
||||
}
|
||||
return reallyClose;
|
||||
]]>
|
||||
|
@ -1324,9 +1319,9 @@
|
|||
if (this.warnAboutClosingTabs(false)) {
|
||||
this.selectedTab = aTab;
|
||||
|
||||
for (let i = this.mTabs.length - 1; i >= 0; --i) {
|
||||
if (this.mTabs[i] != aTab)
|
||||
this.removeTab(this.mTabs[i]);
|
||||
for (let i = this.tabs.length - 1; i >= 0; --i) {
|
||||
if (this.tabs[i] != aTab)
|
||||
this.removeTab(this.tabs[i]);
|
||||
}
|
||||
}
|
||||
]]>
|
||||
|
@ -1380,12 +1375,11 @@
|
|||
}
|
||||
|
||||
var closeWindow = false;
|
||||
var l = this.mTabs.length - this._removingTabs.length;
|
||||
var newTab = false;
|
||||
if (l == 1) {
|
||||
if (this.tabs.length - this._removingTabs.length == 1) {
|
||||
closeWindow = aCloseWindowWithLastTab != null ? aCloseWindowWithLastTab :
|
||||
!window.toolbar.visible ||
|
||||
this.mPrefs.getBoolPref("browser.tabs.closeWindowWithLastTab");
|
||||
this.tabContainer._closeWindowWithLastTab;
|
||||
|
||||
// Closing the tab and replacing it with a blank one is notably slower
|
||||
// than closing the window right away. If the caller opts in, take
|
||||
|
@ -1397,7 +1391,6 @@
|
|||
return null;
|
||||
|
||||
newTab = true;
|
||||
l++;
|
||||
}
|
||||
|
||||
this._removingTabs.push(aTab);
|
||||
|
@ -1422,7 +1415,7 @@
|
|||
browser.setAttribute("type", "content-targetable");
|
||||
|
||||
// Remove this tab as the owner of any other tabs, since it's going away.
|
||||
Array.forEach(this.mTabs, function (tab) {
|
||||
Array.forEach(this.tabs, function (tab) {
|
||||
if ("owner" in tab && tab.owner == aTab)
|
||||
// |tab| is a child of the tab we're removing, make it an orphan
|
||||
tab.owner = null;
|
||||
|
@ -1494,8 +1487,8 @@
|
|||
this.tabContainer.removeChild(aTab);
|
||||
|
||||
// ... and fix up the _tPos properties immediately.
|
||||
for (let i = aTab._tPos; i < this.mTabs.length; i++)
|
||||
this.mTabs[i]._tPos = i;
|
||||
for (let i = aTab._tPos; i < this.tabs.length; i++)
|
||||
this.tabs[i]._tPos = i;
|
||||
|
||||
// update tab close buttons state
|
||||
if (!this._windowIsClosing)
|
||||
|
@ -1532,7 +1525,7 @@
|
|||
|
||||
if (aTab.owner &&
|
||||
this._removingTabs.indexOf(aTab.owner) == -1 &&
|
||||
this.mPrefs.getBoolPref("browser.tabs.selectOwnerOnClose")) {
|
||||
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")) {
|
||||
this.selectedTab = aTab.owner;
|
||||
return;
|
||||
}
|
||||
|
@ -1736,12 +1729,12 @@
|
|||
<![CDATA[
|
||||
// count backwards for aIndex < 0
|
||||
if (aIndex < 0)
|
||||
aIndex += this.mTabs.length;
|
||||
aIndex += this.tabs.length;
|
||||
|
||||
if (aIndex >= 0 &&
|
||||
aIndex < this.mTabs.length &&
|
||||
aIndex < this.tabs.length &&
|
||||
aIndex != this.tabContainer.selectedIndex)
|
||||
this.selectedTab = this.mTabs[aIndex];
|
||||
this.selectedTab = this.tabs[aIndex];
|
||||
|
||||
if (aEvent) {
|
||||
aEvent.preventDefault();
|
||||
|
@ -1751,12 +1744,6 @@
|
|||
</body>
|
||||
</method>
|
||||
|
||||
<property name="tabContainer" readonly="true">
|
||||
<getter>
|
||||
return this.mTabContainer;
|
||||
</getter>
|
||||
</property>
|
||||
|
||||
<property name="selectedTab">
|
||||
<getter>
|
||||
return this.mTabBox.selectedTab;
|
||||
|
@ -1778,7 +1765,7 @@
|
|||
<getter>
|
||||
<![CDATA[
|
||||
return this._browsers ||
|
||||
(this._browsers = Array.map(this.mTabs, function (tab) tab.linkedBrowser));
|
||||
(this._browsers = Array.map(this.tabs, function (tab) tab.linkedBrowser));
|
||||
]]>
|
||||
</getter>
|
||||
</property>
|
||||
|
@ -1789,17 +1776,15 @@
|
|||
<parameter name="aTab"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
if (this.mTabs.length == 1)
|
||||
if (this.tabs.length == 1)
|
||||
return null;
|
||||
|
||||
// tell a new window to take the "dropped" tab
|
||||
var ww = Cc["@mozilla.org/embedcomp/window-watcher;1"].
|
||||
getService(Ci.nsIWindowWatcher);
|
||||
return ww.openWindow(window,
|
||||
getBrowserURL(),
|
||||
null,
|
||||
"chrome,dialog=no,all",
|
||||
aTab);
|
||||
return Services.ww.openWindow(window,
|
||||
getBrowserURL(),
|
||||
null,
|
||||
"chrome,dialog=no,all",
|
||||
aTab);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
@ -1822,16 +1807,16 @@
|
|||
this.mCurrentTab._selected = false;
|
||||
// use .item() instead of [] because dragging to the end of the strip goes out of
|
||||
// bounds: .item() returns null (so it acts like appendChild), but [] throws
|
||||
this.mTabContainer.insertBefore(aTab, this.mTabs.item(aIndex));
|
||||
// invalidate cache, because mTabContainer is about to change
|
||||
this.tabContainer.insertBefore(aTab, this.tabs.item(aIndex));
|
||||
// invalidate cache, because tabContainer is about to change
|
||||
this._browsers = null;
|
||||
|
||||
for (let i = 0; i < this.mTabs.length; i++) {
|
||||
this.mTabs[i]._tPos = i;
|
||||
this.mTabs[i]._selected = false;
|
||||
for (let i = 0; i < this.tabs.length; i++) {
|
||||
this.tabs[i]._tPos = i;
|
||||
this.tabs[i]._selected = false;
|
||||
}
|
||||
this.mCurrentTab._selected = true;
|
||||
this.mTabContainer.mTabstrip.ensureElementIsVisible(this.mCurrentTab, false);
|
||||
this.tabContainer.mTabstrip.ensureElementIsVisible(this.mCurrentTab, false);
|
||||
|
||||
var evt = document.createEvent("UIEvents");
|
||||
evt.initUIEvent("TabMove", true, false, window, oldPosition);
|
||||
|
@ -2160,7 +2145,7 @@
|
|||
if (window.getComputedStyle(this, null).direction == "ltr")
|
||||
offset *= -1;
|
||||
|
||||
this.mTabContainer.advanceSelectedTab(offset, true);
|
||||
this.tabContainer.advanceSelectedTab(offset, true);
|
||||
aEvent.stopPropagation();
|
||||
aEvent.preventDefault();
|
||||
return;
|
||||
|
@ -2247,7 +2232,7 @@
|
|||
<constructor>
|
||||
<![CDATA[
|
||||
this.mCurrentBrowser = this.mPanelContainer.childNodes[0].firstChild;
|
||||
this.mCurrentTab = this.mTabContainer.firstChild;
|
||||
this.mCurrentTab = this.tabContainer.firstChild;
|
||||
document.addEventListener("keypress", this, false);
|
||||
|
||||
var uniqueId = "panel" + Date.now();
|
||||
|
@ -2291,6 +2276,12 @@
|
|||
</method>
|
||||
<property name="mContextTab" readonly="true"
|
||||
onget="return this.tabContainer._contextTab;"/>
|
||||
<property name="mPrefs" readonly="true"
|
||||
onget="return Services.prefs;"/>
|
||||
<property name="mTabContainer" readonly="true"
|
||||
onget="return this.tabContainer;"/>
|
||||
<property name="mTabs" readonly="true"
|
||||
onget="return this.tabs;"/>
|
||||
</implementation>
|
||||
|
||||
<handlers>
|
||||
|
@ -2299,7 +2290,7 @@
|
|||
if (!event.isTrusted)
|
||||
return;
|
||||
|
||||
if (this.mTabs.length == 1)
|
||||
if (this.tabs.length == 1)
|
||||
return;
|
||||
|
||||
var tab = this._getTabForContentWindow(event.target);
|
||||
|
@ -2454,26 +2445,11 @@
|
|||
<implementation implements="nsIDOMEventListener">
|
||||
<constructor>
|
||||
<![CDATA[
|
||||
var pb2 =
|
||||
Components.classes['@mozilla.org/preferences-service;1'].
|
||||
getService(Components.interfaces.nsIPrefBranch2);
|
||||
|
||||
try {
|
||||
this.mTabMinWidth = pb2.getIntPref("browser.tabs.tabMinWidth");
|
||||
} catch (e) {
|
||||
}
|
||||
try {
|
||||
this.mTabMaxWidth = pb2.getIntPref("browser.tabs.tabMaxWidth");
|
||||
} catch (e) {
|
||||
}
|
||||
try {
|
||||
this.mTabClipWidth = pb2.getIntPref("browser.tabs.tabClipWidth");
|
||||
} catch (e) {
|
||||
}
|
||||
try {
|
||||
this.mCloseButtons = pb2.getIntPref("browser.tabs.closeButtons");
|
||||
} catch (e) {
|
||||
}
|
||||
this.mTabMinWidth = Services.prefs.getIntPref("browser.tabs.tabMinWidth");
|
||||
this.mTabMaxWidth = Services.prefs.getIntPref("browser.tabs.tabMaxWidth");
|
||||
this.mTabClipWidth = Services.prefs.getIntPref("browser.tabs.tabClipWidth");
|
||||
this.mCloseButtons = Services.prefs.getIntPref("browser.tabs.closeButtons");
|
||||
this._closeWindowWithLastTab = Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab");
|
||||
|
||||
var tab = this.firstChild;
|
||||
tab.setAttribute("label",
|
||||
|
@ -2487,8 +2463,9 @@
|
|||
tab.setAttribute("onerror", "this.removeAttribute('image');");
|
||||
this.adjustTabstrip();
|
||||
|
||||
pb2.addObserver("browser.tabs.closeButtons", this._prefObserver, false);
|
||||
pb2.addObserver("browser.tabs.autoHide", this._prefObserver, false);
|
||||
Services.prefs.addObserver("browser.tabs.closeButtons", this._prefObserver, false);
|
||||
Services.prefs.addObserver("browser.tabs.autoHide", this._prefObserver, false);
|
||||
Services.prefs.addObserver("browser.tabs.closeWindowWithLastTab", this._prefObserver, false);
|
||||
|
||||
window.addEventListener("resize", this, false);
|
||||
]]>
|
||||
|
@ -2496,11 +2473,9 @@
|
|||
|
||||
<destructor>
|
||||
<![CDATA[
|
||||
var pb2 =
|
||||
Components.classes['@mozilla.org/preferences-service;1'].
|
||||
getService(Components.interfaces.nsIPrefBranch2);
|
||||
pb2.removeObserver("browser.tabs.closeButtons", this._prefObserver);
|
||||
pb2.removeObserver("browser.tabs.autoHide", this._prefObserver);
|
||||
Services.prefs.removeObserver("browser.tabs.closeButtons", this._prefObserver);
|
||||
Services.prefs.removeObserver("browser.tabs.autoHide", this._prefObserver);
|
||||
Services.prefs.removeObserver("browser.tabs.closeWindowWithLastTab", this._prefObserver);
|
||||
]]>
|
||||
</destructor>
|
||||
|
||||
|
@ -2528,20 +2503,19 @@
|
|||
observe: function (subject, topic, data) {
|
||||
switch (data) {
|
||||
case "browser.tabs.closeButtons":
|
||||
subject.QueryInterface(Components.interfaces.nsIPrefBranch);
|
||||
this.tabContainer.mCloseButtons = subject.getIntPref("browser.tabs.closeButtons");
|
||||
this.tabContainer.mCloseButtons = Services.prefs.getIntPref(data);
|
||||
this.tabContainer.adjustTabstrip();
|
||||
break;
|
||||
case "browser.tabs.autoHide":
|
||||
this.tabContainer.updateVisibility();
|
||||
break;
|
||||
case "browser.tabs.closeWindowWithLastTab":
|
||||
this.tabContainer._closeWindowWithLastTab = Services.prefs.getBoolPref(data);
|
||||
this.tabContainer.adjustTabstrip();
|
||||
break;
|
||||
}
|
||||
}
|
||||
});]]></field>
|
||||
<field name="mTabMinWidth">100</field>
|
||||
<field name="mTabMaxWidth">250</field>
|
||||
<field name="mTabClipWidth">140</field>
|
||||
<field name="mCloseButtons">1</field>
|
||||
<field name="_blockDblClick">false</field>
|
||||
|
||||
<field name="_tabDropIndicator">
|
||||
|
@ -2594,10 +2568,15 @@
|
|||
// 3 - closeatend = close button at the end of the tabstrip
|
||||
switch (this.mCloseButtons) {
|
||||
case 0:
|
||||
this.setAttribute("closebuttons", "activetab");
|
||||
if (this.childNodes.length == 1 && this._closeWindowWithLastTab)
|
||||
this.setAttribute("closebuttons", "noclose");
|
||||
else
|
||||
this.setAttribute("closebuttons", "activetab");
|
||||
break;
|
||||
case 1:
|
||||
if (this.firstChild.getBoundingClientRect().width > this.mTabClipWidth)
|
||||
if (this.childNodes.length == 1 && this._closeWindowWithLastTab)
|
||||
this.setAttribute("closebuttons", "noclose");
|
||||
else if (this.firstChild.getBoundingClientRect().width > this.mTabClipWidth)
|
||||
this.setAttribute("closebuttons", "alltabs");
|
||||
else
|
||||
this.setAttribute("closebuttons", "activetab");
|
||||
|
@ -2610,20 +2589,6 @@
|
|||
this.mTabstripClosebutton.collapsed = this.mCloseButtons != 3;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<field name="_mPrefs">null</field>
|
||||
<property name="mPrefs" readonly="true">
|
||||
<getter>
|
||||
<![CDATA[
|
||||
if (!this._mPrefs) {
|
||||
this._mPrefs =
|
||||
Components.classes['@mozilla.org/preferences-service;1'].
|
||||
getService(Components.interfaces.nsIPrefBranch2);
|
||||
}
|
||||
return this._mPrefs;
|
||||
]]>
|
||||
</getter>
|
||||
</property>
|
||||
|
||||
<method name="_handleTabSelect">
|
||||
<body><![CDATA[
|
||||
|
@ -2829,7 +2794,7 @@
|
|||
return;
|
||||
|
||||
if (this.childNodes.length > 1 ||
|
||||
!Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab"))
|
||||
!this._closeWindowWithLastTab)
|
||||
this.tabbrowser.removeTab(event.target);
|
||||
|
||||
event.stopPropagation();
|
||||
|
@ -3030,11 +2995,7 @@
|
|||
let dragSession = dragService.getCurrentSession();
|
||||
nsDragAndDrop.dragDropSecurityCheck(event, dragSession, url);
|
||||
|
||||
let bgLoad = true;
|
||||
try {
|
||||
bgLoad = Services.prefs.getBoolPref("browser.tabs.loadInBackground");
|
||||
}
|
||||
catch (e) { }
|
||||
let bgLoad = Services.prefs.getBoolPref("browser.tabs.loadInBackground");
|
||||
|
||||
if (event.shiftKey)
|
||||
bgLoad = !bgLoad;
|
||||
|
|
|
@ -32,8 +32,8 @@ function pickOne(array) {
|
|||
return array[rand(0, array.length - 1)];
|
||||
}
|
||||
function pickOneTab() {
|
||||
var tab = pickOne(gBrowser.tabContainer.childNodes);
|
||||
return [tab, Array.indexOf(gBrowser.tabContainer.childNodes, tab)];
|
||||
var tab = pickOne(gBrowser.tabs);
|
||||
return [tab, Array.indexOf(gBrowser.tabs, tab)];
|
||||
}
|
||||
function nextSequence() {
|
||||
while (gBrowser.browsers.length > 1)
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
function test() {
|
||||
var tabs = gBrowser.tabContainer.childElementCount;
|
||||
var tabCount = gBrowser.tabs.length;
|
||||
content.focus();
|
||||
browserDOMWindow.openURI(makeURI("about:blank"),
|
||||
null,
|
||||
Ci.nsIBrowserDOMWindow.OPEN_NEWTAB,
|
||||
Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
|
||||
is(gBrowser.tabContainer.childElementCount, tabs + 1,
|
||||
is(gBrowser.tabs.length, tabCount + 1,
|
||||
"'-new-tab about:blank' opens a new tab");
|
||||
is(gBrowser.selectedTab, gBrowser.tabContainer.childNodes[tabs],
|
||||
is(gBrowser.selectedTab, gBrowser.tabs[tabCount],
|
||||
"'-new-tab about:blank' selects the new tab");
|
||||
is(document.activeElement, gURLBar.inputField,
|
||||
"'-new-tab about:blank' focuses the location bar");
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
var expected = ["TabOpen", "onLocationChange", "onStateChange", "onLinkIconAvailable"];
|
||||
var actual = [];
|
||||
var tabIndex = -1;
|
||||
__defineGetter__("tab", function () gBrowser.tabContainer.childNodes[tabIndex]);
|
||||
__defineGetter__("tab", function () gBrowser.tabs[tabIndex]);
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
tabIndex = gBrowser.tabContainer.childElementCount;
|
||||
tabIndex = gBrowser.tabs.length;
|
||||
gBrowser.addTabsProgressListener(progressListener);
|
||||
gBrowser.tabContainer.addEventListener("TabOpen", TabOpen, false);
|
||||
gBrowser.addTab("data:text/html,<html><head><link href='about:logo' rel='shortcut icon'>");
|
||||
|
|
|
@ -3,7 +3,7 @@ function test() {
|
|||
gBrowser.addTab();
|
||||
gBrowser.addTab();
|
||||
|
||||
var tabs = gBrowser.tabContainer.childNodes;
|
||||
var tabs = gBrowser.tabs;
|
||||
var owner;
|
||||
|
||||
is(tabs.length, 4, "4 tabs are open");
|
||||
|
|
|
@ -75,7 +75,7 @@ function test() {
|
|||
|
||||
ok(!pb.privateBrowsingEnabled, "Private browsing mode should not have been activated");
|
||||
is(confirmCalls, 1, "Only one confirm box should be shown");
|
||||
is(gBrowser.tabContainer.childNodes.length, 3,
|
||||
is(gBrowser.tabs.length, 3,
|
||||
"No tabs should be closed because private browsing mode transition was canceled");
|
||||
is(gBrowser.getBrowserForTab(gBrowser.tabContainer.firstChild).currentURI.spec, "about:blank",
|
||||
"The first tab should be a blank tab");
|
||||
|
@ -91,7 +91,7 @@ function test() {
|
|||
|
||||
ok(pb.privateBrowsingEnabled, "Private browsing mode should have been activated");
|
||||
is(confirmCalls, 2, "Only two confirm boxes should be shown");
|
||||
is(gBrowser.tabContainer.childNodes.length, 1,
|
||||
is(gBrowser.tabs.length, 1,
|
||||
"Incorrect number of tabs after transition into private browsing");
|
||||
gBrowser.selectedBrowser.addEventListener("load", function() {
|
||||
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
|
||||
|
@ -113,7 +113,7 @@ function test() {
|
|||
|
||||
ok(pb.privateBrowsingEnabled, "Private browsing mode should not have been deactivated");
|
||||
is(confirmCalls, 1, "Only one confirm box should be shown");
|
||||
is(gBrowser.tabContainer.childNodes.length, 2,
|
||||
is(gBrowser.tabs.length, 2,
|
||||
"No tabs should be closed because private browsing mode transition was canceled");
|
||||
is(gBrowser.getBrowserForTab(gBrowser.tabContainer.firstChild).currentURI.spec, TEST_PAGE_1,
|
||||
"The first tab should be the same one we opened");
|
||||
|
@ -127,7 +127,7 @@ function test() {
|
|||
|
||||
ok(!pb.privateBrowsingEnabled, "Private browsing mode should have been deactivated");
|
||||
is(confirmCalls, 2, "Only two confirm boxes should be shown");
|
||||
is(gBrowser.tabContainer.childNodes.length, 3,
|
||||
is(gBrowser.tabs.length, 3,
|
||||
"Incorrect number of tabs after transition into private browsing");
|
||||
|
||||
let loads = 0;
|
||||
|
|
|
@ -67,7 +67,7 @@ function pbObserver(aSubject, aTopic, aData) {
|
|||
function test() {
|
||||
waitForExplicitFinish();
|
||||
_obs.addObserver(pbObserver, "private-browsing", false);
|
||||
is(gBrowser.tabContainer.childNodes.length, 1, "There should only be one tab");
|
||||
is(gBrowser.tabs.length, 1, "There should only be one tab");
|
||||
let testTab = gBrowser.addTab();
|
||||
gBrowser.selectedTab = testTab;
|
||||
testTab.linkedBrowser.addEventListener("unload", function () {
|
||||
|
|
|
@ -127,7 +127,7 @@ function restoreSession() {
|
|||
var top = getBrowserWindow();
|
||||
|
||||
// if there's only this page open, reuse the window for restoring the session
|
||||
if (top.gBrowser.tabContainer.childNodes.length == 1) {
|
||||
if (top.gBrowser.tabs.length == 1) {
|
||||
ss.setWindowState(top, stateString, true);
|
||||
return;
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ function restoreSession() {
|
|||
|
||||
var tabbrowser = top.gBrowser;
|
||||
var tabIndex = tabbrowser.getBrowserIndexForDocument(document);
|
||||
tabbrowser.removeTab(tabbrowser.tabContainer.childNodes[tabIndex]);
|
||||
tabbrowser.removeTab(tabbrowser.tabs[tabIndex]);
|
||||
}, true);
|
||||
}
|
||||
|
||||
|
|
|
@ -1138,7 +1138,7 @@ SessionStoreService.prototype = {
|
|||
*/
|
||||
_saveWindowHistory: function sss_saveWindowHistory(aWindow) {
|
||||
var tabbrowser = aWindow.gBrowser;
|
||||
var tabs = tabbrowser.mTabs;
|
||||
var tabs = tabbrowser.tabs;
|
||||
var tabsData = this._windows[aWindow.__SSi].tabs = [];
|
||||
|
||||
for (var i = 0; i < tabs.length; i++)
|
||||
|
@ -1926,7 +1926,7 @@ SessionStoreService.prototype = {
|
|||
tabbrowser.moveTabTo(tabbrowser.selectedTab, newTabCount - 1);
|
||||
|
||||
for (var t = 0; t < newTabCount; t++) {
|
||||
tabs.push(t < openTabCount ? tabbrowser.mTabs[t] : tabbrowser.addTab());
|
||||
tabs.push(t < openTabCount ? tabbrowser.tabs[t] : tabbrowser.addTab());
|
||||
// when resuming at startup: add additionally requested pages to the end
|
||||
if (!aOverwriteTabs && root._firstTabs) {
|
||||
tabbrowser.moveTabTo(tabs[t], t);
|
||||
|
@ -1935,7 +1935,7 @@ SessionStoreService.prototype = {
|
|||
|
||||
// when overwriting tabs, remove all superflous ones
|
||||
if (aOverwriteTabs && newTabCount < openTabCount) {
|
||||
Array.slice(tabbrowser.mTabs, newTabCount, openTabCount)
|
||||
Array.slice(tabbrowser.tabs, newTabCount, openTabCount)
|
||||
.forEach(tabbrowser.removeTab, tabbrowser);
|
||||
}
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ function test() {
|
|||
gPrefService.clearUserPref("browser.sessionstore.privacy_level");
|
||||
// undoCloseTab can reuse a single blank tab, so we have to
|
||||
// make sure not to close the window when closing our last tab
|
||||
if (tabbrowser.tabContainer.childNodes.length == 1)
|
||||
if (tabbrowser.tabs.length == 1)
|
||||
tabbrowser.addTab();
|
||||
tabbrowser.removeTab(tab);
|
||||
finish();
|
||||
|
|
|
@ -104,7 +104,7 @@ function test() {
|
|||
newWin2.gBrowser.tabContainer.addEventListener("SSTabRestored", function(aEvent) {
|
||||
newWin2.gBrowser.tabContainer.removeEventListener("SSTabRestored", arguments.callee, true);
|
||||
|
||||
is(newWin2.gBrowser.tabContainer.childNodes.length, 2,
|
||||
is(newWin2.gBrowser.tabs.length, 2,
|
||||
"The window correctly restored 2 tabs");
|
||||
is(newWin2.gBrowser.currentURI.spec, testURL,
|
||||
"The window correctly restored the URL");
|
||||
|
|
|
@ -75,7 +75,7 @@ function test() {
|
|||
gPrefService.clearUserPref("browser.sessionstore.privacy_level");
|
||||
// undoCloseTab can reuse a single blank tab, so we have to
|
||||
// make sure not to close the window when closing our last tab
|
||||
if (gBrowser.tabContainer.childNodes.length == 1)
|
||||
if (gBrowser.tabs.length == 1)
|
||||
gBrowser.addTab();
|
||||
gBrowser.removeTab(tab);
|
||||
finish();
|
||||
|
|
|
@ -68,7 +68,7 @@ function test() {
|
|||
newState.windows[0].extData[uniqueKey2] = uniqueValue2;
|
||||
ss.setWindowState(newWin, JSON.stringify(newState), false);
|
||||
|
||||
is(newWin.gBrowser.tabContainer.childNodes.length, 2,
|
||||
is(newWin.gBrowser.tabs.length, 2,
|
||||
"original tab wasn't overwritten");
|
||||
is(ss.getWindowValue(newWin, uniqueKey1), uniqueValue1,
|
||||
"window value wasn't overwritten when the tabs weren't");
|
||||
|
@ -78,7 +78,7 @@ function test() {
|
|||
newState.windows[0].extData[uniqueKey2] = uniqueValue1;
|
||||
ss.setWindowState(newWin, JSON.stringify(newState), true);
|
||||
|
||||
is(newWin.gBrowser.tabContainer.childNodes.length, 1,
|
||||
is(newWin.gBrowser.tabs.length, 1,
|
||||
"original tabs were overwritten");
|
||||
is(ss.getWindowValue(newWin, uniqueKey1), "",
|
||||
"window value was cleared");
|
||||
|
|
|
@ -180,12 +180,6 @@ PreviewController.prototype = {
|
|||
this.linkedBrowser.removeEventListener("pageshow", this, false);
|
||||
this.linkedBrowser.removeEventListener("DOMTitleChanged", this, false);
|
||||
this.linkedBrowser.removeEventListener("MozAfterPaint", this, false);
|
||||
|
||||
// Break cycles, otherwise we end up leaking the window with everything
|
||||
// attached to it.
|
||||
delete this.win;
|
||||
delete this.preview;
|
||||
delete this.dirtyRegion;
|
||||
},
|
||||
get wrappedJSObject() {
|
||||
return this;
|
||||
|
@ -389,8 +383,9 @@ function TabWindow(win) {
|
|||
this.tabbrowser.tabContainer.addEventListener(this.events[i], this, false);
|
||||
this.tabbrowser.addTabsProgressListener(this);
|
||||
|
||||
|
||||
AeroPeek.windows.push(this);
|
||||
let tabs = this.tabbrowser.mTabs;
|
||||
let tabs = this.tabbrowser.tabs;
|
||||
for (let i = 0; i < tabs.length; i++)
|
||||
this.newTab(tabs[i]);
|
||||
|
||||
|
@ -405,9 +400,7 @@ TabWindow.prototype = {
|
|||
destroy: function () {
|
||||
this._destroying = true;
|
||||
|
||||
let tabs = this.tabbrowser.mTabs;
|
||||
|
||||
this.tabbrowser.removeTabsProgressListener(this);
|
||||
let tabs = this.tabbrowser.tabs;
|
||||
|
||||
for (let i = 0; i < this.events.length; i++)
|
||||
this.tabbrowser.tabContainer.removeEventListener(this.events[i], this, false);
|
||||
|
@ -596,17 +589,6 @@ var AeroPeek = {
|
|||
this.enabled = this._prefenabled = this.prefs.getBoolPref(TOGGLE_PREF_NAME);
|
||||
},
|
||||
|
||||
destroy: function destroy() {
|
||||
this._enabled = false;
|
||||
|
||||
this.prefs.removeObserver(TOGGLE_PREF_NAME, this);
|
||||
this.prefs.removeObserver(DISABLE_THRESHOLD_PREF_NAME, this);
|
||||
this.prefs.removeObserver(CACHE_EXPIRATION_TIME_PREF_NAME, this);
|
||||
|
||||
if (this.cacheTimer)
|
||||
this.cacheTimer.cancel();
|
||||
},
|
||||
|
||||
get enabled() {
|
||||
return this._enabled;
|
||||
},
|
||||
|
@ -654,10 +636,7 @@ var AeroPeek = {
|
|||
return;
|
||||
|
||||
win.gTaskbarTabGroup.destroy();
|
||||
delete win.gTaskbarTabGroup;
|
||||
|
||||
if (this.windows.length == 0)
|
||||
this.destroy();
|
||||
win.gTaskbarTabGroup = null;
|
||||
},
|
||||
|
||||
resetCacheTimer: function () {
|
||||
|
|
|
@ -181,7 +181,7 @@ BrowserTab.prototype = {
|
|||
},
|
||||
|
||||
get index() {
|
||||
var tabs = this._tabbrowser.mTabs;
|
||||
var tabs = this._tabbrowser.tabs;
|
||||
for (var i=0; i<tabs.length; i++) {
|
||||
if (tabs[i].linkedBrowser == this._browser)
|
||||
return i;
|
||||
|
@ -229,7 +229,7 @@ BrowserTab.prototype = {
|
|||
* Helper used to determine the index offset of the browsertab
|
||||
*/
|
||||
_getTab : function bt_gettab() {
|
||||
var tabs = this._tabbrowser.mTabs;
|
||||
var tabs = this._tabbrowser.tabs;
|
||||
return tabs[this.index] || null;
|
||||
},
|
||||
|
||||
|
|
|
@ -336,7 +336,7 @@ l10n-upload-%: AB_CD=$*
|
|||
l10n-upload-%:
|
||||
$(PYTHON) $(topsrcdir)/build/upload.py --base-path $(DIST) "$(DIST)/$(PACKAGE)" $(DIST)/$(LANGPACK)
|
||||
ifdef MOZ_MAKE_COMPLETE_MAR
|
||||
$(PYTHON) $(topsrcdir)/build/upload.py --base-path $(DIST) $(DIST)/$(COMPLETE_MAR)
|
||||
$(PYTHON) $(topsrcdir)/build/upload.py --base-path $(DIST) $(DIST)/$(COMPLETE_MAR) $(call QUOTED_WILDCARD,$(wildcard $(DIST)/$(PARTIAL_MAR)))
|
||||
endif
|
||||
ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
|
||||
$(PYTHON) $(topsrcdir)/build/upload.py --base-path $(DIST) "$(INSTALLER_PACKAGE)"
|
||||
|
|
|
@ -1373,26 +1373,19 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
|
|||
-moz-box-shadow: none;
|
||||
}
|
||||
|
||||
.ctrlTab-favicon[src],
|
||||
.allTabs-favicon[src] {
|
||||
background-color: white;
|
||||
padding: 2px;
|
||||
/* XXX: Upscaling images is ugly on Linux (bug 422179)
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
opacity: .7;
|
||||
*/
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
/* Ctrl-Tab */
|
||||
|
||||
#ctrlTab-panel {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.ctrlTab-favicon[src] {
|
||||
background-color: white;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.ctrlTab-preview:not(#ctrlTab-showAll) .tabPreview-canvas {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
@ -1407,13 +1400,7 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
|
|||
/* All Tabs */
|
||||
|
||||
#allTabs-panel {
|
||||
/* compensate for the widget border and padding to center the panel correctly */
|
||||
margin-left: -13px;
|
||||
}
|
||||
|
||||
#allTabs-tab-close-button {
|
||||
/*XXX without this, the closebutton can cause the panel to expand horizontally */
|
||||
margin-right: -16px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
#allTabs-meta {
|
||||
|
@ -1425,8 +1412,9 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
|
|||
-moz-margin-end: 0;
|
||||
}
|
||||
|
||||
#allTabs-stack {
|
||||
margin: 10px;
|
||||
.allTabs-favicon {
|
||||
margin-top: 1px;
|
||||
-moz-margin-start: 1px;
|
||||
}
|
||||
|
||||
.allTabs-preview-label {
|
||||
|
|
|
@ -121,40 +121,6 @@
|
|||
border-top: 1px solid rgba(0,0,0,0.65);
|
||||
}
|
||||
|
||||
/* ----- INACTIVE WINDOW ----- */
|
||||
|
||||
#main-window:not([active="true"]) > #navigator-toolbox > #nav-bar {
|
||||
background-image: url("chrome://global/skin/toolbar/toolbar-background-inactive.png");
|
||||
}
|
||||
|
||||
#main-window:not([active="true"]) > #navigator-toolbox > #PersonalToolbar {
|
||||
background-color: -moz-mac-chrome-inactive;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.32);
|
||||
}
|
||||
|
||||
#main-window:not([active="true"]) > #navigator-toolbox > #TabsToolbar:not(:-moz-lwtheme) {
|
||||
background-color: #e2e2e2;
|
||||
}
|
||||
|
||||
#main-window:not([active="true"]) > #navigator-toolbox > toolbar > toolbaritem,
|
||||
#main-window:not([active="true"]) > #navigator-toolbox > toolbar > toolbarbutton,
|
||||
#main-window:not([active="true"]) .tabs-newtab-button > .toolbarbutton-icon {
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
#main-window:not([active="true"]) > #browser > vbox > #sidebar,
|
||||
#main-window:not([active="true"]) > #browser > vbox > sidebarheader {
|
||||
background-color: #e8e8e8;
|
||||
}
|
||||
|
||||
#main-window:not([active="true"]) .tabbrowser-tab {
|
||||
color: #575757;
|
||||
}
|
||||
|
||||
#main-window:not([active="true"]) .tabbrowser-tab[selected="true"] {
|
||||
background-color: -moz-mac-chrome-inactive;
|
||||
}
|
||||
|
||||
/* ----- BOOKMARK TOOLBAR ----- */
|
||||
|
||||
#PersonalToolbar {
|
||||
|
@ -167,6 +133,11 @@
|
|||
-moz-box-align: center;
|
||||
}
|
||||
|
||||
#PersonalToolbar:-moz-window-inactive {
|
||||
background-color: -moz-mac-chrome-inactive;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.32);
|
||||
}
|
||||
|
||||
#personal-bookmarks {
|
||||
-moz-box-align: center;
|
||||
}
|
||||
|
@ -339,6 +310,11 @@ toolbar[mode="text"] .toolbarbutton-1 > .toolbarbutton-text {
|
|||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
#navigator-toolbox > toolbar > toolbaritem:-moz-window-inactive,
|
||||
#navigator-toolbox > toolbar > toolbarbutton:-moz-window-inactive {
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
#back-button:-moz-locale-dir(rtl) > .toolbarbutton-icon,
|
||||
#forward-button:-moz-locale-dir(rtl) > .toolbarbutton-icon,
|
||||
#back-forward-dropmarker:-moz-locale-dir(rtl) > .toolbarbutton-icon {
|
||||
|
@ -1364,12 +1340,17 @@ richlistitem[selected="true"][current="true"] > hbox > .ac-result-type-bookmark,
|
|||
|
||||
/* ----- SIDEBAR ELEMENTS ----- */
|
||||
|
||||
#sidebar {
|
||||
#sidebar,
|
||||
sidebarheader {
|
||||
background-color: #d4dde5;
|
||||
}
|
||||
|
||||
sidebarheader {
|
||||
background-color: #d4dde5;
|
||||
#sidebar:-moz-window-inactive,
|
||||
sidebarheader:-moz-window-inactive {
|
||||
background-color: #e8e8e8;
|
||||
}
|
||||
|
||||
sidebarheader {
|
||||
padding: 2px;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
@ -1459,10 +1440,6 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
|||
}
|
||||
|
||||
#nav-bar {
|
||||
background-color: #9e9e9e;
|
||||
background-image: url("chrome://global/skin/toolbar/toolbar-background.gif");
|
||||
background-repeat: repeat-x;
|
||||
background-position: top right;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
|
@ -1560,6 +1537,10 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
|||
padding-top: 1px;
|
||||
}
|
||||
|
||||
.tabs-newtab-button > .toolbarbutton-icon:-moz-window-inactive {
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
.tabbrowser-tab[selected="true"] {
|
||||
padding: 0 6px 1px;
|
||||
border-width: 2px;
|
||||
|
@ -1570,6 +1551,10 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
|||
background-color: -moz-mac-chrome-active;
|
||||
}
|
||||
|
||||
.tabbrowser-tab[selected="true"]:-moz-window-inactive {
|
||||
background-color: -moz-mac-chrome-inactive;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:focus > .tab-text {
|
||||
-moz-box-shadow: @focusRingShadow@;
|
||||
}
|
||||
|
@ -1579,8 +1564,11 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
|||
color: #000000;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme,
|
||||
#main-window:not([active="true"]) .tabbrowser-tab:-moz-lwtheme {
|
||||
.tabbrowser-tab:-moz-window-inactive {
|
||||
color: #575757;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme {
|
||||
color: inherit;
|
||||
text-shadow: inherit;
|
||||
}
|
||||
|
@ -1595,6 +1583,10 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
|||
background: #9B9B9B url("chrome://browser/skin/tabbrowser/tabbrowser-tabs-bkgnd.png") repeat-x;
|
||||
}
|
||||
|
||||
#TabsToolbar:not(:-moz-lwtheme):-moz-window-inactive {
|
||||
background-color: #e2e2e2;
|
||||
}
|
||||
|
||||
.tabbrowser-tabs {
|
||||
-moz-box-align: stretch;
|
||||
height: 25px;
|
||||
|
@ -1949,19 +1941,6 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
|||
|
||||
/* ::::: Ctrl-Tab and All Tabs Panels ::::: */
|
||||
|
||||
.tabPreview-canvas {
|
||||
-moz-box-shadow: 1px 1px 3px rgb(12%,12%,12%);
|
||||
}
|
||||
|
||||
.ctrlTab-favicon[src],
|
||||
.allTabs-favicon[src] {
|
||||
background-color: white;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding: 2px;
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
/* Ctrl-Tab */
|
||||
|
||||
#ctrlTab-panel {
|
||||
|
@ -1969,22 +1948,33 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
|||
text-shadow: 0 0 1px rgb(27%,27%,27%), 0 0 3px rgb(27%,27%,27%);
|
||||
}
|
||||
|
||||
.ctrlTab-preview:not(#ctrlTab-showAll) .tabPreview-canvas {
|
||||
.ctrlTab-favicon[src] {
|
||||
background-color: white;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.ctrlTab-preview-inner > .tabPreview-canvas {
|
||||
-moz-box-shadow: 1px 1px 3px rgb(12%,12%,12%);
|
||||
}
|
||||
|
||||
.ctrlTab-preview:not(#ctrlTab-showAll) > * > .ctrlTab-preview-inner > .tabPreview-canvas {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.ctrlTab-preview .ctrlTab-preview-inner {
|
||||
.ctrlTab-preview-inner {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
#ctrlTab-showAll .ctrlTab-preview-inner {
|
||||
#ctrlTab-showAll:not(:focus) > * > .ctrlTab-preview-inner {
|
||||
padding: 10px;
|
||||
background-color: rgba(255,255,255,.2);
|
||||
-moz-border-radius: .5em;
|
||||
}
|
||||
|
||||
.ctrlTab-preview:focus .ctrlTab-preview-inner,
|
||||
#ctrlTab-showAll:focus .ctrlTab-preview-inner {
|
||||
.ctrlTab-preview:focus > * > .ctrlTab-preview-inner {
|
||||
color: white;
|
||||
background-color: rgba(0,0,0,.6);
|
||||
text-shadow: none;
|
||||
padding: 8px;
|
||||
|
@ -1992,7 +1982,7 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
|||
-moz-border-radius: .5em;
|
||||
}
|
||||
|
||||
.ctrlTab-preview:not(#ctrlTab-showAll):focus .ctrlTab-preview-inner {
|
||||
.ctrlTab-preview:not(#ctrlTab-showAll):focus > * > .ctrlTab-preview-inner {
|
||||
margin: -10px -10px 0;
|
||||
}
|
||||
|
||||
|
@ -2003,19 +1993,15 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
|||
/* All Tabs */
|
||||
|
||||
#allTabs-panel {
|
||||
padding: 10px;
|
||||
margin-left: -10px;
|
||||
}
|
||||
|
||||
#allTabs-panel:not(.KUI-panel) {
|
||||
padding-bottom: 10px;
|
||||
-moz-appearance: none;
|
||||
background: rgb(27%,27%,27%) url(KUI-background.png) repeat-x;
|
||||
border: none;
|
||||
color: white;
|
||||
background: -moz-dialog;
|
||||
color: -moz-dialogText;
|
||||
}
|
||||
|
||||
#allTabs-meta {
|
||||
margin-bottom: 10px;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
#allTabs-filter {
|
||||
|
@ -2023,26 +2009,24 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
|||
-moz-margin-end: 0;
|
||||
}
|
||||
|
||||
#allTabs-tab-close-button {
|
||||
/*XXX without this, the closebutton can cause the panel to expand horizontally */
|
||||
margin-right: -16px;
|
||||
}
|
||||
|
||||
#allTabs-tab-close-button > .toolbarbutton-icon {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.allTabs-preview:focus,
|
||||
.allTabs-preview:hover,
|
||||
.allTabs-preview[closebuttonhover] {
|
||||
background-color: rgba(0,0,0,.4);
|
||||
-moz-border-radius: .5em;
|
||||
.allTabs-favicon {
|
||||
margin-top: 1px;
|
||||
-moz-margin-start: 1px;
|
||||
}
|
||||
|
||||
.allTabs-preview:focus {
|
||||
border: 2px solid white;
|
||||
.allTabs-preview-inner > .tabPreview-canvas {
|
||||
background-color: rgb(60%,60%,60%);
|
||||
-moz-box-shadow: 0 0 2px ThreeDShadow;
|
||||
}
|
||||
|
||||
.allTabs-preview-label {
|
||||
-moz-transform: translate(0, 1px);
|
||||
.allTabs-preview:not(:hover):not([closebuttonhover]) > html|canvas {
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
.allTabs-preview:focus > * > .allTabs-preview-inner {
|
||||
-moz-box-shadow: @focusRingShadow@;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
border-top: @sidebarItemGraphiteFocusedBorderTop@;
|
||||
}
|
||||
|
||||
window:not([active="true"]) #placesList > treechildren::-moz-tree-row(selected) {
|
||||
#placesList > treechildren:-moz-window-inactive::-moz-tree-row(selected) {
|
||||
background: @sidebarItemInactiveBackground@;
|
||||
border-top: @sidebarItemInactiveBorderTop@;
|
||||
}
|
||||
|
@ -103,14 +103,14 @@ window:not([active="true"]) #placesList > treechildren::-moz-tree-row(selected)
|
|||
inset 0 0 0 20px @toolbarbuttonPressedBackgroundColor@;
|
||||
}
|
||||
|
||||
:root:not([active]) #placesToolbar > toolbarbutton {
|
||||
#placesToolbar > toolbarbutton:-moz-window-inactive {
|
||||
border-color: @toolbarbuttonInactiveBorderColor@;
|
||||
background-image: @toolbarbuttonInactiveBackgroundImage@;
|
||||
}
|
||||
|
||||
#placesToolbar > toolbarbutton[disabled="true"] > .toolbarbutton-icon,
|
||||
:root:not([active]) #placesToolbar > toolbarbutton > .toolbarbutton-icon,
|
||||
:root:not([active]) #placesToolbar > toolbarbutton > .toolbarbutton-menu-dropmarker {
|
||||
#placesToolbar > toolbarbutton > .toolbarbutton-icon:-moz-window-inactive,
|
||||
#placesToolbar > toolbarbutton > .toolbarbutton-menu-dropmarker:-moz-window-inactive {
|
||||
opacity: 0.5; /* remove the second and third selector when we support click-through (bug 392188) */
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,7 @@ window:not([active="true"]) #placesList > treechildren::-moz-tree-row(selected)
|
|||
|
||||
/* Search field */
|
||||
|
||||
:root:not([active="true"]) #searchFilter {
|
||||
#searchFilter:-moz-window-inactive {
|
||||
opacity: 0.7; /* remove this when we support click-through (bug 392188) */
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ window:not([active="true"]) #placesList > treechildren::-moz-tree-row(selected)
|
|||
border: 0px;
|
||||
}
|
||||
|
||||
#places:not([active="true"]) > #placesView > #placesList {
|
||||
#placesList:-moz-window-inactive {
|
||||
background-color: #e8e8e8;
|
||||
}
|
||||
|
||||
|
|
|
@ -1493,19 +1493,6 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
|
|||
|
||||
/* ::::: Ctrl-Tab and All Tabs Panels ::::: */
|
||||
|
||||
.tabPreview-canvas {
|
||||
-moz-box-shadow: 1px 1px 3px rgb(12%,12%,12%);
|
||||
}
|
||||
|
||||
.ctrlTab-favicon[src],
|
||||
.allTabs-favicon[src] {
|
||||
background-color: white;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding: 2px;
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
/* Ctrl-Tab */
|
||||
|
||||
#ctrlTab-panel {
|
||||
|
@ -1514,22 +1501,32 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
|
|||
text-shadow: 0 0 1px rgb(27%,27%,27%), 0 0 3px rgb(27%,27%,27%);
|
||||
}
|
||||
|
||||
.ctrlTab-preview:not(#ctrlTab-showAll) .tabPreview-canvas {
|
||||
.ctrlTab-favicon[src] {
|
||||
background-color: white;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.ctrlTab-preview-inner > .tabPreview-canvas {
|
||||
-moz-box-shadow: 1px 1px 3px rgb(12%,12%,12%);
|
||||
}
|
||||
|
||||
.ctrlTab-preview:not(#ctrlTab-showAll) > * > .ctrlTab-preview-inner > .tabPreview-canvas {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.ctrlTab-preview .ctrlTab-preview-inner {
|
||||
.ctrlTab-preview-inner {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
#ctrlTab-showAll .ctrlTab-preview-inner {
|
||||
#ctrlTab-showAll:not(:focus) > * > .ctrlTab-preview-inner {
|
||||
padding: 10px;
|
||||
background-color: rgba(255,255,255,.2);
|
||||
-moz-border-radius: .5em;
|
||||
}
|
||||
|
||||
.ctrlTab-preview:focus .ctrlTab-preview-inner,
|
||||
#ctrlTab-showAll:focus .ctrlTab-preview-inner {
|
||||
.ctrlTab-preview:focus > * > .ctrlTab-preview-inner {
|
||||
color: white;
|
||||
background-color: rgba(0,0,0,.6);
|
||||
text-shadow: none;
|
||||
|
@ -1538,7 +1535,7 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
|
|||
-moz-border-radius: .5em;
|
||||
}
|
||||
|
||||
.ctrlTab-preview:not(#ctrlTab-showAll):focus .ctrlTab-preview-inner {
|
||||
.ctrlTab-preview:not(#ctrlTab-showAll):focus > * > .ctrlTab-preview-inner {
|
||||
margin: -10px -10px 0;
|
||||
}
|
||||
|
||||
|
@ -1549,19 +1546,15 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
|
|||
/* All Tabs */
|
||||
|
||||
#allTabs-panel {
|
||||
padding: 10px;
|
||||
margin-left: -10px;
|
||||
}
|
||||
|
||||
#allTabs-panel:not(.KUI-panel) {
|
||||
padding-bottom: 10px;
|
||||
-moz-appearance: none;
|
||||
background: rgb(27%,27%,27%) url(KUI-background.png) repeat-x;
|
||||
border: none;
|
||||
color: white;
|
||||
background: -moz-dialog;
|
||||
color: -moz-dialogText;
|
||||
}
|
||||
|
||||
#allTabs-meta {
|
||||
margin-bottom: 10px;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
#allTabs-filter {
|
||||
|
@ -1569,28 +1562,24 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
|
|||
-moz-margin-end: 0;
|
||||
}
|
||||
|
||||
#allTabs-tab-close-button {
|
||||
/*XXX without this, the closebutton can cause the panel to expand horizontally */
|
||||
margin-right: -16px;
|
||||
}
|
||||
|
||||
#allTabs-tab-close-button > .toolbarbutton-icon {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.allTabs-preview:focus,
|
||||
.allTabs-preview:hover,
|
||||
.allTabs-preview[closebuttonhover] {
|
||||
color: white;
|
||||
text-shadow: none;
|
||||
background-color: rgba(0,0,0,.4);
|
||||
-moz-border-radius: .5em;
|
||||
.allTabs-favicon {
|
||||
margin-top: 1px;
|
||||
-moz-margin-start: 1px;
|
||||
}
|
||||
|
||||
.allTabs-preview:focus {
|
||||
border: 2px solid white;
|
||||
.allTabs-preview-inner > .tabPreview-canvas {
|
||||
background-color: rgb(60%,60%,60%);
|
||||
-moz-box-shadow: 0 0 2px ThreeDShadow;
|
||||
}
|
||||
|
||||
.allTabs-preview-label {
|
||||
-moz-transform: translate(0, 1px);
|
||||
.allTabs-preview:not(:hover):not([closebuttonhover]) > html|canvas {
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
.allTabs-preview:focus > * > .allTabs-preview-inner {
|
||||
outline: 1px dotted -moz-dialogText;
|
||||
}
|
||||
|
|
|
@ -607,10 +607,9 @@ user_pref("camino.use_system_proxy_settings", false); // Camino-only, harmless t
|
|||
def killPid(self, pid):
|
||||
os.kill(pid, signal.SIGKILL)
|
||||
|
||||
def triggerBreakpad(self, proc, utilityPath):
|
||||
"""Attempt to kill this process in a way that triggers Breakpad crash
|
||||
reporting, if we know how for this platform. Otherwise just .kill() it."""
|
||||
if self.CRASHREPORTER:
|
||||
def killAndGetStack(self, proc, utilityPath, debuggerInfo):
|
||||
"""Kill the process, preferrably in a way that gets us a stack trace."""
|
||||
if self.CRASHREPORTER and not debuggerInfo:
|
||||
if self.UNIXISH:
|
||||
# ABRT will get picked up by Breakpad's signal handler
|
||||
os.kill(proc.pid, signal.SIGABRT)
|
||||
|
@ -620,11 +619,11 @@ user_pref("camino.use_system_proxy_settings", false); // Camino-only, harmless t
|
|||
crashinject = os.path.normpath(os.path.join(utilityPath, "crashinject.exe"))
|
||||
if os.path.exists(crashinject) and subprocess.Popen([crashinject, str(proc.pid)]).wait() == 0:
|
||||
return
|
||||
#TODO: kill the process such that it triggers Breakpad on OS X (bug 525296)
|
||||
#TODO: kill the process such that it triggers Breakpad on OS X (bug 525296)
|
||||
self.log.info("Can't trigger Breakpad, just killing process")
|
||||
proc.kill()
|
||||
|
||||
def waitForFinish(self, proc, utilityPath, timeout, maxTime, startTime):
|
||||
def waitForFinish(self, proc, utilityPath, timeout, maxTime, startTime, debuggerInfo):
|
||||
""" Look for timeout or crashes and return the status after the process terminates """
|
||||
stackFixerProcess = None
|
||||
stackFixerModule = None
|
||||
|
@ -657,10 +656,10 @@ user_pref("camino.use_system_proxy_settings", false); // Camino-only, harmless t
|
|||
# Kill the application, but continue reading from stack fixer so as not to deadlock on stackFixerProcess.wait().
|
||||
hitMaxTime = True
|
||||
self.log.info("TEST-UNEXPECTED-FAIL | automation.py | application ran for longer than allowed maximum time of %d seconds", int(maxTime))
|
||||
self.triggerBreakpad(proc, utilityPath)
|
||||
self.killAndGetStack(proc, utilityPath, debuggerInfo)
|
||||
if didTimeout:
|
||||
self.log.info("TEST-UNEXPECTED-FAIL | automation.py | application timed out after %d seconds with no output", int(timeout))
|
||||
self.triggerBreakpad(proc, utilityPath)
|
||||
self.killAndGetStack(proc, utilityPath, debuggerInfo)
|
||||
|
||||
status = proc.wait()
|
||||
if status != 0 and not didTimeout and not hitMaxTime:
|
||||
|
@ -768,8 +767,11 @@ user_pref("camino.use_system_proxy_settings", false); // Camino-only, harmless t
|
|||
cmd, args = self.buildCommandLine(app, debuggerInfo, profileDir, testURL, extraArgs)
|
||||
startTime = datetime.now()
|
||||
|
||||
# Don't redirect stdout and stderr if an interactive debugger is attached
|
||||
if debuggerInfo and debuggerInfo["interactive"]:
|
||||
# If an interactive debugger is attached, don't redirect output
|
||||
# and don't use timeouts.
|
||||
timeout = None
|
||||
maxTime = None
|
||||
outputPipe = None
|
||||
else:
|
||||
outputPipe = subprocess.PIPE
|
||||
|
@ -781,7 +783,7 @@ user_pref("camino.use_system_proxy_settings", false); // Camino-only, harmless t
|
|||
stderr = subprocess.STDOUT)
|
||||
self.log.info("INFO | automation.py | Application pid: %d", proc.pid)
|
||||
|
||||
status = self.waitForFinish(proc, utilityPath, timeout, maxTime, startTime)
|
||||
status = self.waitForFinish(proc, utilityPath, timeout, maxTime, startTime, debuggerInfo)
|
||||
self.log.info("INFO | automation.py | Application ran for: %s", str(datetime.now() - startTime))
|
||||
|
||||
# Do a final check for zombie child processes.
|
||||
|
|
147
configure.in
147
configure.in
|
@ -132,7 +132,7 @@ GCONF_VERSION=1.2.1
|
|||
GIO_VERSION=2.0
|
||||
STARTUP_NOTIFICATION_VERSION=0.8
|
||||
DBUS_VERSION=0.60
|
||||
SQLITE_VERSION=3.6.22
|
||||
SQLITE_VERSION=3.6.23
|
||||
LIBNOTIFY_VERSION=0.4
|
||||
|
||||
MSMANIFEST_TOOL=
|
||||
|
@ -834,7 +834,7 @@ else
|
|||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
|
||||
MOZ_PATH_PROGS(PYTHON, $PYTHON python2.5 python2.4 python)
|
||||
MOZ_PATH_PROGS(PYTHON, $PYTHON python2.6 python2.5 python2.4 python)
|
||||
if test -z "$PYTHON"; then
|
||||
AC_MSG_ERROR([python was not found in \$PATH])
|
||||
fi
|
||||
|
@ -1131,6 +1131,9 @@ case "$HOST_OS_ARCH" in
|
|||
cygwin*|mingw*|mks*|msvc*)
|
||||
HOST_OS_ARCH=WINNT
|
||||
;;
|
||||
darwin*)
|
||||
HOST_OS_ARCH=Darwin
|
||||
;;
|
||||
linux*)
|
||||
HOST_OS_ARCH=Linux
|
||||
;;
|
||||
|
@ -5085,16 +5088,17 @@ then
|
|||
PKG_CHECK_MODULES(MOZ_QT, QtGui QtNetwork QtCore)
|
||||
AC_CHECK_PROGS(HOST_MOC, moc, "")
|
||||
else
|
||||
MOZ_QT_LIBS="-L$QTDIR/qt/lib/ -lQtGui -lQtNetwork -lQtCore"
|
||||
MOZ_QT_LIBS="-L$QTDIR/lib/ -lQtGui -lQtNetwork -lQtCore -lQtDBus -lQtXml"
|
||||
|
||||
MOZ_QT_CFLAGS="-DQT_SHARED"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/qt/include"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/qt/include/Qt"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/qt/include/QtGui"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/qt/include/QtCore"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/qt/include/QtNetwork"
|
||||
|
||||
HOST_MOC="$QTDIR/qt/bin/moc"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/Qt"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtGui"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtCore"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtNetwork"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtDBus"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtXml"
|
||||
HOST_MOC="$QTDIR/bin/moc"
|
||||
fi
|
||||
if test -z "$HOST_MOC"; then
|
||||
AC_MSG_ERROR([No acceptable moc preprocessor found. Qt SDK is not installed or --with-qt is
|
||||
|
@ -6366,13 +6370,18 @@ then
|
|||
SQLITE_CFLAGS=
|
||||
SQLITE_LIBS='$(call EXPAND_LIBNAME_PATH,mozsqlite3,$(DIST)/lib)'
|
||||
else
|
||||
dnl ============================
|
||||
dnl === SQLite Version check ===
|
||||
dnl ============================
|
||||
dnl Check to see if the system SQLite package is new enough.
|
||||
PKG_CHECK_MODULES(SQLITE, sqlite3 >= $SQLITE_VERSION)
|
||||
dnl ===================================
|
||||
dnl === SQLITE_SECURE_DELETE checks ===
|
||||
dnl ===================================
|
||||
dnl check to see if the system sqlite package is compiled with
|
||||
|
||||
dnl ==================================
|
||||
dnl === SQLITE_SECURE_DELETE check ===
|
||||
dnl ==================================
|
||||
dnl Check to see if the system SQLite package is compiled with
|
||||
dnl SQLITE_SECURE_DELETE enabled.
|
||||
AC_MSG_CHECKING(for SQLITE_SECURE_DELETE support in system sqlite)
|
||||
AC_MSG_CHECKING(for SQLITE_SECURE_DELETE support in system SQLite)
|
||||
_SAVE_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $SQLITE_CFLAGS"
|
||||
_SAVE_LIBS="$LIBS"
|
||||
|
@ -6380,51 +6389,9 @@ else
|
|||
AC_CACHE_VAL(ac_cv_sqlite_secure_delete,[
|
||||
AC_TRY_RUN([
|
||||
#include "sqlite3.h"
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
int main(int argc, char **argv){
|
||||
sqlite3 *db;
|
||||
sqlite3_uint64 r;
|
||||
char *zFilename;
|
||||
FILE *in;
|
||||
int i;
|
||||
int rc;
|
||||
char *zBuf;
|
||||
const int bufSize = 1024*3;
|
||||
|
||||
zBuf = malloc(bufSize*sizeof(char));
|
||||
assert( zBuf );
|
||||
rc = sqlite3_open(":memory:", &db);
|
||||
assert( rc==SQLITE_OK );
|
||||
sqlite3_close(db);
|
||||
sqlite3_randomness(sizeof(r), &r);
|
||||
zFilename = sqlite3_mprintf("test_db_%llu.sqlite", r);
|
||||
rc = sqlite3_open(zFilename, &db);
|
||||
assert( rc==SQLITE_OK );
|
||||
rc = sqlite3_exec(db,
|
||||
"BEGIN;"
|
||||
"CREATE TABLE t1(x);"
|
||||
"INSERT INTO t1 VALUES(zeroblob(1000)||'abcdefghijklmnopqrstuvwxyz');"
|
||||
"COMMIT;"
|
||||
"DELETE FROM t1;",
|
||||
0, 0, 0
|
||||
);
|
||||
assert( rc==SQLITE_OK );
|
||||
sqlite3_close(db);
|
||||
in = fopen(zFilename, "r");
|
||||
assert( in!=0 );
|
||||
rc = fread(zBuf, 1, bufSize, in);
|
||||
assert( rc==bufSize );
|
||||
fclose(in);
|
||||
unlink(zFilename);
|
||||
free( zBuf );
|
||||
for(i=0; i<bufSize-11; i++){
|
||||
if( *(zBuf+i)=='h' && memcmp(zBuf+i, "hijklmnopq", 10)==0 ){
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return !sqlite3_compileoption_used("SQLITE_SECURE_DELETE=1");
|
||||
}],
|
||||
ac_cv_sqlite_secure_delete=yes,
|
||||
ac_cv_sqlite_secure_delete=no,
|
||||
|
@ -6435,7 +6402,65 @@ else
|
|||
CFLAGS="$_SAVE_CFLAGS"
|
||||
LIBS="$_SAVE_LIBS"
|
||||
if test "x$ac_cv_sqlite_secure_delete" = "xno"; then
|
||||
AC_MSG_ERROR([System Sqlite library is not compiled with SQLITE_SECURE_DELETE.])
|
||||
AC_MSG_ERROR([System SQLite library is not compiled with SQLITE_SECURE_DELETE.])
|
||||
fi
|
||||
|
||||
dnl ===============================
|
||||
dnl === SQLITE_THREADSAFE check ===
|
||||
dnl ===============================
|
||||
dnl Check to see if the system SQLite package is compiled with
|
||||
dnl SQLITE_THREADSAFE enabled.
|
||||
AC_MSG_CHECKING(for SQLITE_THREADSAFE support in system SQLite)
|
||||
_SAVE_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $SQLITE_CFLAGS"
|
||||
_SAVE_LIBS="$LIBS"
|
||||
LIBS="$LIBS $SQLITE_LIBS"
|
||||
AC_CACHE_VAL(ac_cv_sqlite_threadsafe,[
|
||||
AC_TRY_RUN([
|
||||
#include "sqlite3.h"
|
||||
|
||||
int main(int argc, char **argv){
|
||||
return !sqlite3_compileoption_used("SQLITE_THREADSAFE=1");
|
||||
}],
|
||||
ac_cv_sqlite_threadsafe=yes,
|
||||
ac_cv_sqlite_threadsafe=no,
|
||||
ac_cv_sqlite_threadsafe=no
|
||||
)
|
||||
])
|
||||
AC_MSG_RESULT($ac_cv_sqlite_threadsafe)
|
||||
CFLAGS="$_SAVE_CFLAGS"
|
||||
LIBS="$_SAVE_LIBS"
|
||||
if test "x$ac_cv_sqlite_threadsafe" = "xno"; then
|
||||
AC_MSG_ERROR([System SQLite library is not compiled with SQLITE_THREADSAFE.])
|
||||
fi
|
||||
|
||||
dnl ================================
|
||||
dnl === SQLITE_ENABLE_FTS3 check ===
|
||||
dnl ================================
|
||||
dnl check to see if the system SQLite package is compiled with
|
||||
dnl SQLITE_THREADSAFE enabled.
|
||||
AC_MSG_CHECKING(for SQLITE_ENABLE_FTS3 support in system SQLite)
|
||||
_SAVE_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $SQLITE_CFLAGS"
|
||||
_SAVE_LIBS="$LIBS"
|
||||
LIBS="$LIBS $SQLITE_LIBS"
|
||||
AC_CACHE_VAL(ac_cv_sqlite_enable_fts3,[
|
||||
AC_TRY_RUN([
|
||||
#include "sqlite3.h"
|
||||
|
||||
int main(int argc, char **argv){
|
||||
return !sqlite3_compileoption_used("SQLITE_ENABLE_FTS3=1");
|
||||
}],
|
||||
ac_cv_sqlite_enable_fts3=yes,
|
||||
ac_cv_sqlite_enable_fts3=no,
|
||||
ac_cv_sqlite_enable_fts3=no
|
||||
)
|
||||
])
|
||||
AC_MSG_RESULT($ac_cv_sqlite_enable_fts3)
|
||||
CFLAGS="$_SAVE_CFLAGS"
|
||||
LIBS="$_SAVE_LIBS"
|
||||
if test "x$ac_cv_sqlite_enable_fts3" = "xno"; then
|
||||
AC_MSG_ERROR([System SQLite library is not compiled with SQLITE_ENABLE_FTS3.])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -8737,9 +8762,7 @@ if test -z "$MOZ_NATIVE_NSPR"; then
|
|||
ac_configure_args="$ac_configure_args --with-nspr-libs='$NSPR_LIBS'"
|
||||
fi
|
||||
ac_configure_args="$ac_configure_args --with-dist-dir=../../dist"
|
||||
ac_configure_args="$ac_configure_args --includedir=$dist/include"
|
||||
ac_configure_args="$ac_configure_args --bindir=$dist/bin"
|
||||
ac_configure_args="$ac_configure_args --libdir=$dist/lib"
|
||||
ac_configure_args="$ac_configure_args --prefix=$dist"
|
||||
ac_configure_args="$ac_configure_args --with-sync-build-files=$_topsrcdir"
|
||||
if test "$MOZ_MEMORY"; then
|
||||
ac_configure_args="$ac_configure_args --enable-jemalloc"
|
||||
|
|
|
@ -115,12 +115,19 @@ class Link;
|
|||
} // namespace mozilla
|
||||
|
||||
#define NS_IDOCUMENT_IID \
|
||||
{ 0x36f0a42c, 0x089b, 0x4909, \
|
||||
{ 0xb3, 0xee, 0xc5, 0xa4, 0x00, 0x90, 0x30, 0x02 } }
|
||||
{ 0x94fb5716, 0xff00, 0x4b97, \
|
||||
{ 0x90, 0x01, 0x91, 0x65, 0x1a, 0x5f, 0xbe, 0x64 } }
|
||||
|
||||
// Flag for AddStyleSheet().
|
||||
#define NS_STYLESHEET_FROM_CATALOG (1 << 0)
|
||||
|
||||
// Document states
|
||||
|
||||
// RTL locale: specific to the XUL localedir attribute
|
||||
#define NS_DOCUMENT_STATE_RTL_LOCALE (1 << 0)
|
||||
// Window activation status
|
||||
#define NS_DOCUMENT_STATE_WINDOW_INACTIVE (1 << 1)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// Document interface. This is implemented by all document objects in
|
||||
|
@ -677,6 +684,11 @@ public:
|
|||
nsIContent* aContent2,
|
||||
PRInt32 aStateMask) = 0;
|
||||
|
||||
// Notify that a document state has changed.
|
||||
// This should only be called by callers whose state is also reflected in the
|
||||
// implementation of nsDocument::GetDocumentState.
|
||||
virtual void DocumentStatesChanged(PRInt32 aStateMask) = 0;
|
||||
|
||||
// Observation hooks for style data to propagate notifications
|
||||
// to document observers
|
||||
virtual void StyleRuleChanged(nsIStyleSheet* aStyleSheet,
|
||||
|
@ -1282,6 +1294,13 @@ public:
|
|||
*/
|
||||
virtual int GetDocumentLWTheme() { return Doc_Theme_None; }
|
||||
|
||||
/**
|
||||
* Returns the document state.
|
||||
* Document state bits have the form NS_DOCUMENT_STATE_* and are declared in
|
||||
* nsIDocument.h.
|
||||
*/
|
||||
virtual PRInt32 GetDocumentState() = 0;
|
||||
|
||||
/**
|
||||
* Gets the document's cached pointer to the first <base> element in this
|
||||
* document which has an href attribute. If the document doesn't contain any
|
||||
|
|
|
@ -118,6 +118,15 @@ public:
|
|||
nsIContent* aContent2,
|
||||
PRInt32 aStateMask) = 0;
|
||||
|
||||
/**
|
||||
* Notification that the state of the document has changed.
|
||||
*
|
||||
* @param aDocument The document being observed
|
||||
* @param aStateMask the state that changed
|
||||
*/
|
||||
virtual void DocumentStatesChanged(nsIDocument* aDocument,
|
||||
PRInt32 aStateMask) = 0;
|
||||
|
||||
/**
|
||||
* A StyleSheet has just been added to the document. This method is
|
||||
* called automatically when a StyleSheet gets added to the
|
||||
|
@ -234,6 +243,8 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocumentObserver, NS_IDOCUMENT_OBSERVER_IID)
|
|||
nsIContent* aContent1, \
|
||||
nsIContent* aContent2, \
|
||||
PRInt32 aStateMask); \
|
||||
virtual void DocumentStatesChanged(nsIDocument* aDocument, \
|
||||
PRInt32 aStateMask); \
|
||||
virtual void StyleSheetAdded(nsIDocument* aDocument, \
|
||||
nsIStyleSheet* aStyleSheet, \
|
||||
PRBool aDocumentSheet); \
|
||||
|
@ -284,6 +295,12 @@ _class::ContentStatesChanged(nsIDocument* aDocument, \
|
|||
nsIContent* aContent2, \
|
||||
PRInt32 aStateMask) \
|
||||
{ \
|
||||
} \
|
||||
\
|
||||
void \
|
||||
_class::DocumentStatesChanged(nsIDocument* aDocument, \
|
||||
PRInt32 aStateMask) \
|
||||
{ \
|
||||
}
|
||||
|
||||
#define NS_IMPL_NSIDOCUMENTOBSERVER_CONTENT(_class) \
|
||||
|
|
|
@ -539,10 +539,11 @@ NS_IMETHODIMP
|
|||
nsDOMAttribute::IsEqualNode(nsIDOMNode* aOther,
|
||||
PRBool* aReturn)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aOther);
|
||||
|
||||
*aReturn = PR_FALSE;
|
||||
|
||||
if (!aOther)
|
||||
return NS_OK;
|
||||
|
||||
// Node type check by QI. We also reuse this later.
|
||||
nsCOMPtr<nsIAttribute> aOtherAttr = do_QueryInterface(aOther);
|
||||
if (!aOtherAttr) {
|
||||
|
|
|
@ -4055,6 +4055,16 @@ nsDocument::ContentStatesChanged(nsIContent* aContent1, nsIContent* aContent2,
|
|||
(this, aContent1, aContent2, aStateMask));
|
||||
}
|
||||
|
||||
void
|
||||
nsDocument::DocumentStatesChanged(PRInt32 aStateMask)
|
||||
{
|
||||
// Invalidate our cached state.
|
||||
mGotDocumentState &= ~aStateMask;
|
||||
mDocumentState &= ~aStateMask;
|
||||
|
||||
NS_DOCUMENT_NOTIFY_OBSERVERS(DocumentStatesChanged, (this, aStateMask));
|
||||
}
|
||||
|
||||
void
|
||||
nsDocument::StyleRuleChanged(nsIStyleSheet* aStyleSheet,
|
||||
nsIStyleRule* aOldStyleRule,
|
||||
|
@ -5658,10 +5668,11 @@ nsDocument::IsSameNode(nsIDOMNode* aOther, PRBool* aReturn)
|
|||
NS_IMETHODIMP
|
||||
nsDocument::IsEqualNode(nsIDOMNode* aOther, PRBool* aReturn)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aOther);
|
||||
|
||||
*aReturn = PR_FALSE;
|
||||
|
||||
if (!aOther)
|
||||
return NS_OK;
|
||||
|
||||
// Node type check by QI. We also reuse this later.
|
||||
nsCOMPtr<nsIDocument> aOtherDoc = do_QueryInterface(aOther);
|
||||
if (!aOtherDoc) {
|
||||
|
@ -6746,12 +6757,11 @@ nsDocument::CreateElem(nsIAtom *aName, nsIAtom *aPrefix, PRInt32 aNamespaceID,
|
|||
PRBool
|
||||
nsDocument::IsSafeToFlush() const
|
||||
{
|
||||
PRBool isSafeToFlush = PR_TRUE;
|
||||
nsCOMPtr<nsIPresShell> shell = GetPrimaryShell();
|
||||
if (shell) {
|
||||
shell->IsSafeToFlush(isSafeToFlush);
|
||||
}
|
||||
return isSafeToFlush;
|
||||
if (!shell)
|
||||
return PR_TRUE;
|
||||
|
||||
return shell->IsSafeToFlush();
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -7617,6 +7627,26 @@ nsDocument::MaybePreLoadImage(nsIURI* uri)
|
|||
}
|
||||
}
|
||||
|
||||
PRInt32
|
||||
nsDocument::GetDocumentState()
|
||||
{
|
||||
if (!(mGotDocumentState & NS_DOCUMENT_STATE_RTL_LOCALE)) {
|
||||
if (IsDocumentRightToLeft()) {
|
||||
mDocumentState |= NS_DOCUMENT_STATE_RTL_LOCALE;
|
||||
}
|
||||
mGotDocumentState |= NS_DOCUMENT_STATE_RTL_LOCALE;
|
||||
}
|
||||
if (!(mGotDocumentState & NS_DOCUMENT_STATE_WINDOW_INACTIVE)) {
|
||||
nsIPresShell* shell = GetPrimaryShell();
|
||||
if (shell && shell->GetPresContext() &&
|
||||
shell->GetPresContext()->IsTopLevelWindowInactive()) {
|
||||
mDocumentState |= NS_DOCUMENT_STATE_WINDOW_INACTIVE;
|
||||
}
|
||||
mGotDocumentState |= NS_DOCUMENT_STATE_WINDOW_INACTIVE;
|
||||
}
|
||||
return mDocumentState;
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
/**
|
||||
|
|
|
@ -693,6 +693,7 @@ public:
|
|||
virtual void ContentStatesChanged(nsIContent* aContent1,
|
||||
nsIContent* aContent2,
|
||||
PRInt32 aStateMask);
|
||||
virtual void DocumentStatesChanged(PRInt32 aStateMask);
|
||||
|
||||
virtual void StyleRuleChanged(nsIStyleSheet* aStyleSheet,
|
||||
nsIStyleRule* aOldStyleRule,
|
||||
|
@ -939,6 +940,8 @@ public:
|
|||
|
||||
virtual nsISupports* GetCurrentContentSink();
|
||||
|
||||
virtual PRInt32 GetDocumentState();
|
||||
|
||||
virtual void RegisterFileDataUri(nsACString& aUri);
|
||||
|
||||
protected:
|
||||
|
@ -1134,6 +1137,9 @@ protected:
|
|||
|
||||
nsCOMPtr<nsIContent> mFirstBaseNodeWithHref;
|
||||
|
||||
PRInt32 mDocumentState;
|
||||
PRInt32 mGotDocumentState;
|
||||
|
||||
private:
|
||||
friend class nsUnblockOnloadEvent;
|
||||
|
||||
|
|
|
@ -894,10 +894,11 @@ nsNode3Tearoff::AreNodesEqual(nsIContent* aContent1,
|
|||
NS_IMETHODIMP
|
||||
nsNode3Tearoff::IsEqualNode(nsIDOMNode* aOther, PRBool* aReturn)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aOther);
|
||||
|
||||
*aReturn = PR_FALSE;
|
||||
|
||||
if (!aOther)
|
||||
return NS_OK;
|
||||
|
||||
// Since we implement nsIContent, aOther must as well.
|
||||
nsCOMPtr<nsIContent> aOtherContent = do_QueryInterface(aOther);
|
||||
// Documents and attributes don't implement nsIContent.
|
||||
|
|
|
@ -361,6 +361,7 @@ _TEST_FILES = test_bug5141.html \
|
|||
test_bug548463.html \
|
||||
test_bug545644.html \
|
||||
test_bug545644.xhtml \
|
||||
test_bug553896.xhtml \
|
||||
$(NULL)
|
||||
|
||||
# This test fails on the Mac for some reason
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=553896
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 553896</title>
|
||||
<script type="application/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=553896">Mozilla Bug 553896</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
<![CDATA[
|
||||
/** Test for Bug 553896 **/
|
||||
try {
|
||||
ok(!document.createElement("foo").isEqualNode(null), "Node is equal to null?");
|
||||
} catch (e) {
|
||||
ok(false, "Exception was raised.");
|
||||
}
|
||||
try {
|
||||
ok(!document.createAttribute("foo").isEqualNode(null), "Node is equal to null?");
|
||||
} catch (e) {
|
||||
ok(false, "Exception was raised.");
|
||||
}
|
||||
try {
|
||||
ok(!document.createTextNode("foo").isEqualNode(null), "Node is equal to null?");
|
||||
} catch (e) {
|
||||
ok(false, "Exception was raised.");
|
||||
}
|
||||
try {
|
||||
ok(!document.createCDATASection("foo").isEqualNode(null), "Node is equal to null?");
|
||||
} catch (e) {
|
||||
ok(false, "Exception was raised.");
|
||||
}
|
||||
try {
|
||||
ok(!document.createProcessingInstruction("foo", "bar").isEqualNode(null), "Node is equal to null?");
|
||||
} catch (e) {
|
||||
ok(false, "Exception was raised.");
|
||||
}
|
||||
try {
|
||||
ok(!document.createComment("foo").isEqualNode(null), "Node is equal to null?");
|
||||
} catch (e) {
|
||||
ok(false, "Exception was raised.");
|
||||
}
|
||||
try {
|
||||
ok(!document.isEqualNode(null), "Node is equal to null?");
|
||||
} catch (e) {
|
||||
ok(false, "Exception was raised.");
|
||||
}
|
||||
try {
|
||||
ok(!document.implementation.createDocumentType("html", "", "").isEqualNode(null), "Node is equal to null?");
|
||||
} catch (e) {
|
||||
ok(false, "Exception was raised.");
|
||||
}
|
||||
try {
|
||||
ok(!document.createDocumentFragment().isEqualNode(null), "Node is equal to null?");
|
||||
} catch (e) {
|
||||
ok(false, "Exception was raised.");
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -86,8 +86,7 @@ nsContentEventHandler::InitCommon()
|
|||
|
||||
// If text frame which has overflowing selection underline is dirty,
|
||||
// we need to flush the pending reflow here.
|
||||
nsresult rv = mPresShell->FlushPendingNotifications(Flush_Layout);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
mPresShell->FlushPendingNotifications(Flush_Layout);
|
||||
|
||||
nsCopySupport::GetSelectionForCopy(mPresShell->GetDocument(),
|
||||
getter_AddRefs(mSelection));
|
||||
|
@ -96,7 +95,7 @@ nsContentEventHandler::InitCommon()
|
|||
|
||||
|
||||
nsCOMPtr<nsIDOMRange> firstRange;
|
||||
rv = mSelection->GetRangeAt(0, getter_AddRefs(firstRange));
|
||||
nsresult rv = mSelection->GetRangeAt(0, getter_AddRefs(firstRange));
|
||||
// This shell doesn't support selection.
|
||||
if (NS_FAILED(rv))
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
|
|
@ -43,14 +43,12 @@ namespace mozilla {
|
|||
|
||||
/*static*/ SMILBoolType SMILBoolType::sSingleton;
|
||||
|
||||
nsresult
|
||||
void
|
||||
SMILBoolType::Init(nsSMILValue& aValue) const
|
||||
{
|
||||
NS_PRECONDITION(aValue.mType == this || aValue.IsNull(),
|
||||
"Unexpected value type");
|
||||
NS_PRECONDITION(aValue.IsNull(), "Unexpected value type");
|
||||
aValue.mU.mBool = PR_FALSE;
|
||||
aValue.mType = this;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
protected:
|
||||
// nsISMILType Methods
|
||||
// -------------------
|
||||
virtual nsresult Init(nsSMILValue& aValue) const;
|
||||
virtual void Init(nsSMILValue& aValue) const;
|
||||
virtual void Destroy(nsSMILValue&) const;
|
||||
virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
|
||||
virtual nsresult Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
|
||||
|
|
|
@ -43,14 +43,12 @@ namespace mozilla {
|
|||
|
||||
/*static*/ SMILEnumType SMILEnumType::sSingleton;
|
||||
|
||||
nsresult
|
||||
void
|
||||
SMILEnumType::Init(nsSMILValue& aValue) const
|
||||
{
|
||||
NS_PRECONDITION(aValue.mType == this || aValue.IsNull(),
|
||||
"Unexpected value type");
|
||||
NS_PRECONDITION(aValue.IsNull(), "Unexpected value type");
|
||||
aValue.mU.mUint = 0;
|
||||
aValue.mType = this;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
protected:
|
||||
// nsISMILType Methods
|
||||
// -------------------
|
||||
virtual nsresult Init(nsSMILValue& aValue) const;
|
||||
virtual void Init(nsSMILValue& aValue) const;
|
||||
virtual void Destroy(nsSMILValue&) const;
|
||||
virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
|
||||
virtual PRBool IsEqual(const nsSMILValue& aLeft,
|
||||
|
|
|
@ -43,13 +43,12 @@ namespace mozilla {
|
|||
|
||||
/*static*/ SMILIntegerType SMILIntegerType::sSingleton;
|
||||
|
||||
nsresult
|
||||
void
|
||||
SMILIntegerType::Init(nsSMILValue& aValue) const
|
||||
{
|
||||
NS_ABORT_IF_FALSE(aValue.IsNull(), "Unexpected value type");
|
||||
aValue.mU.mInt = 0;
|
||||
aValue.mType = this;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace mozilla {
|
|||
class SMILIntegerType : public nsISMILType
|
||||
{
|
||||
public:
|
||||
virtual nsresult Init(nsSMILValue& aValue) const;
|
||||
virtual void Init(nsSMILValue& aValue) const;
|
||||
virtual void Destroy(nsSMILValue&) const;
|
||||
virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
|
||||
virtual PRBool IsEqual(const nsSMILValue& aLeft,
|
||||
|
|
|
@ -85,11 +85,10 @@ protected:
|
|||
* Initialises aValue and sets it to some identity value such that adding
|
||||
* aValue to another value of the same type has no effect.
|
||||
*
|
||||
* @pre (aValue.mType == this && aValue.mU is valid)
|
||||
* || aValue.mType == null-type
|
||||
* @post aValue.mType == this || NS_FAILED(rv)
|
||||
* @pre aValue.IsNull()
|
||||
* @post aValue.mType == this
|
||||
*/
|
||||
virtual nsresult Init(nsSMILValue& aValue) const = 0;
|
||||
virtual void Init(nsSMILValue& aValue) const = 0;
|
||||
|
||||
/**
|
||||
* Destroys any data associated with a value of this type.
|
||||
|
|
|
@ -51,17 +51,6 @@
|
|||
//----------------------------------------------------------------------
|
||||
// nsSMILAnimationController implementation
|
||||
|
||||
// In my testing the minimum needed for smooth animation is 36 frames per
|
||||
// second which seems like a lot (Flash traditionally uses 14fps).
|
||||
//
|
||||
// Redrawing is synchronous. This is deliberate so that later we can tune the
|
||||
// timer based on how long the callback takes. To achieve 36fps we'd need 28ms
|
||||
// between frames. For now we set the timer interval to be a little less than
|
||||
// this (to allow for the render itself) and then let performance decay as the
|
||||
// image gets more complicated and render times increase.
|
||||
//
|
||||
const PRUint32 nsSMILAnimationController::kTimerInterval = 22;
|
||||
|
||||
// Helper method
|
||||
static nsRefreshDriver*
|
||||
GetRefreshDriverForDoc(nsIDocument* aDoc)
|
||||
|
@ -91,8 +80,6 @@ nsSMILAnimationController::nsSMILAnimationController()
|
|||
nsSMILAnimationController::~nsSMILAnimationController()
|
||||
{
|
||||
StopSampling(GetRefreshDriverForDoc(mDocument));
|
||||
mTimer = nsnull;
|
||||
|
||||
NS_ASSERTION(mAnimationElementTable.Count() == 0,
|
||||
"Animation controller shouldn't be tracking any animation"
|
||||
" elements when it dies");
|
||||
|
@ -118,9 +105,6 @@ nsSMILAnimationController::Init(nsIDocument* aDoc)
|
|||
{
|
||||
NS_ENSURE_ARG_POINTER(aDoc);
|
||||
|
||||
mTimer = do_CreateInstance("@mozilla.org/timer;1");
|
||||
NS_ENSURE_TRUE(mTimer, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
// Keep track of document, so we can traverse its set of animation elements
|
||||
mDocument = aDoc;
|
||||
|
||||
|
@ -172,7 +156,6 @@ NS_IMPL_ADDREF(nsSMILAnimationController)
|
|||
NS_IMPL_RELEASE(nsSMILAnimationController)
|
||||
|
||||
// nsRefreshDriver Callback function
|
||||
// XXXdholbert NOTE: This function isn't used yet
|
||||
void
|
||||
nsSMILAnimationController::WillRefresh(mozilla::TimeStamp aTime)
|
||||
{
|
||||
|
@ -256,39 +239,29 @@ nsSMILAnimationController::Unlink()
|
|||
//----------------------------------------------------------------------
|
||||
// Timer-related implementation helpers
|
||||
|
||||
/*static*/ void
|
||||
nsSMILAnimationController::Notify(nsITimer* timer, void* aClosure)
|
||||
{
|
||||
nsSMILAnimationController* controller = (nsSMILAnimationController*)aClosure;
|
||||
|
||||
NS_ASSERTION(controller->mTimer == timer,
|
||||
"nsSMILAnimationController::Notify called with incorrect timer");
|
||||
|
||||
controller->Sample();
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsSMILAnimationController::StartSampling(nsRefreshDriver* aRefreshDriver)
|
||||
{
|
||||
NS_ENSURE_TRUE(mTimer, NS_ERROR_FAILURE);
|
||||
NS_ASSERTION(mPauseState == 0, "Starting timer but controller is paused");
|
||||
|
||||
//
|
||||
// XXX Make this self-tuning. Sounds like control theory to me and not
|
||||
// something I'm familiar with.
|
||||
//
|
||||
return mTimer->InitWithFuncCallback(nsSMILAnimationController::Notify,
|
||||
this,
|
||||
kTimerInterval,
|
||||
nsITimer::TYPE_REPEATING_SLACK);
|
||||
NS_ASSERTION(mPauseState == 0, "Starting sampling but controller is paused");
|
||||
if (aRefreshDriver) {
|
||||
NS_ABORT_IF_FALSE(!GetRefreshDriverForDoc(mDocument) ||
|
||||
aRefreshDriver == GetRefreshDriverForDoc(mDocument),
|
||||
"Starting sampling with wrong refresh driver");
|
||||
aRefreshDriver->AddRefreshObserver(this, Flush_Style);
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsSMILAnimationController::StopSampling(nsRefreshDriver* aRefreshDriver)
|
||||
{
|
||||
NS_ENSURE_TRUE(mTimer, NS_ERROR_FAILURE);
|
||||
|
||||
return mTimer->Cancel();
|
||||
if (aRefreshDriver) {
|
||||
// NOTE: The document might already have been detached from its PresContext
|
||||
// (and RefreshDriver), which would make GetRefreshDriverForDoc return null.
|
||||
NS_ABORT_IF_FALSE(!GetRefreshDriverForDoc(mDocument) ||
|
||||
aRefreshDriver == GetRefreshDriverForDoc(mDocument),
|
||||
"Stopping sampling with wrong refresh driver");
|
||||
aRefreshDriver->RemoveRefreshObserver(this, Flush_Style);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -111,8 +111,9 @@ public:
|
|||
void Unlink();
|
||||
|
||||
// Methods for controlling whether we're sampling
|
||||
nsresult StartSampling(nsRefreshDriver* aRefreshDriver);
|
||||
nsresult StopSampling(nsRefreshDriver* aRefreshDriver);
|
||||
// (Use to register/unregister us with the given nsRefreshDriver)
|
||||
void StartSampling(nsRefreshDriver* aRefreshDriver);
|
||||
void StopSampling(nsRefreshDriver* aRefreshDriver);
|
||||
|
||||
protected:
|
||||
// Typedefs
|
||||
|
@ -148,9 +149,6 @@ protected:
|
|||
PR_STATIC_CALLBACK(PLDHashOperator) CompositorTableEntryTraverse(
|
||||
nsSMILCompositor* aCompositor, void* aArg);
|
||||
|
||||
// Timer-related implementation helpers
|
||||
static void Notify(nsITimer* aTimer, void* aClosure);
|
||||
|
||||
// Sample-related callbacks and implementation helpers
|
||||
virtual void DoSample();
|
||||
void DoSample(PRBool aSkipUnchangedContainers);
|
||||
|
@ -179,7 +177,6 @@ protected:
|
|||
NS_DECL_OWNINGTHREAD
|
||||
|
||||
static const PRUint32 kTimerInterval;
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
AnimationElementHashtable mAnimationElementTable;
|
||||
TimeContainerHashtable mChildContainerTable;
|
||||
PRPackedBool mResampleNeeded;
|
||||
|
|
|
@ -126,14 +126,13 @@ ExtractValueWrapper(const nsSMILValue& aValue)
|
|||
|
||||
// Class methods
|
||||
// -------------
|
||||
nsresult
|
||||
void
|
||||
nsSMILCSSValueType::Init(nsSMILValue& aValue) const
|
||||
{
|
||||
NS_ABORT_IF_FALSE(aValue.IsNull(), "Unexpected SMIL value type");
|
||||
|
||||
aValue.mU.mPtr = nsnull;
|
||||
aValue.mType = this;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
protected:
|
||||
// nsISMILType Methods
|
||||
// -------------------
|
||||
NS_OVERRIDE virtual nsresult Init(nsSMILValue& aValue) const;
|
||||
NS_OVERRIDE virtual void Init(nsSMILValue& aValue) const;
|
||||
NS_OVERRIDE virtual void Destroy(nsSMILValue&) const;
|
||||
NS_OVERRIDE virtual nsresult Assign(nsSMILValue& aDest,
|
||||
const nsSMILValue& aSrc) const;
|
||||
|
|
|
@ -43,14 +43,12 @@
|
|||
|
||||
/*static*/ nsSMILFloatType nsSMILFloatType::sSingleton;
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsSMILFloatType::Init(nsSMILValue& aValue) const
|
||||
{
|
||||
NS_PRECONDITION(aValue.mType == this || aValue.IsNull(),
|
||||
"Unexpected value type");
|
||||
NS_PRECONDITION(aValue.IsNull(), "Unexpected value type");
|
||||
aValue.mU.mDouble = 0.0;
|
||||
aValue.mType = this;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
protected:
|
||||
// nsISMILType Methods
|
||||
// -------------------
|
||||
virtual nsresult Init(nsSMILValue& aValue) const;
|
||||
virtual void Init(nsSMILValue& aValue) const;
|
||||
virtual void Destroy(nsSMILValue&) const;
|
||||
virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
|
||||
virtual PRBool IsEqual(const nsSMILValue& aLeft,
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
protected:
|
||||
// nsISMILType Methods
|
||||
// -------------------
|
||||
virtual nsresult Init(nsSMILValue& aValue) const { return NS_OK; }
|
||||
virtual void Init(nsSMILValue& aValue) const {}
|
||||
virtual void Destroy(nsSMILValue& aValue) const {}
|
||||
virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
|
||||
|
||||
|
|
|
@ -56,10 +56,7 @@ nsSMILValue::nsSMILValue(const nsISMILType* aType)
|
|||
nsSMILValue::nsSMILValue(const nsSMILValue& aVal)
|
||||
: mType(&nsSMILNullType::sSingleton)
|
||||
{
|
||||
nsresult rv = InitAndCheckPostcondition(aVal.mType);
|
||||
if (NS_FAILED(rv))
|
||||
return;
|
||||
|
||||
InitAndCheckPostcondition(aVal.mType);
|
||||
mType->Assign(*this, aVal);
|
||||
}
|
||||
|
||||
|
@ -70,9 +67,7 @@ nsSMILValue::operator=(const nsSMILValue& aVal)
|
|||
return *this;
|
||||
|
||||
if (mType != aVal.mType) {
|
||||
nsresult rv = DestroyAndReinit(aVal.mType);
|
||||
if (NS_FAILED(rv))
|
||||
return *this; // Initialization failed; return early
|
||||
DestroyAndReinit(aVal.mType);
|
||||
}
|
||||
|
||||
mType->Assign(*this, aVal);
|
||||
|
@ -134,9 +129,7 @@ nsSMILValue::Interpolate(const nsSMILValue& aEndVal,
|
|||
|
||||
if (aResult.mType != mType) {
|
||||
// Outparam has wrong type
|
||||
nsresult rv = aResult.DestroyAndReinit(mType);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
aResult.DestroyAndReinit(mType);
|
||||
}
|
||||
|
||||
return mType->Interpolate(*this, aEndVal, aUnitDistance, aResult);
|
||||
|
@ -146,13 +139,12 @@ nsSMILValue::Interpolate(const nsSMILValue& aEndVal,
|
|||
// Helper methods
|
||||
|
||||
// Wrappers for nsISMILType::Init & ::Destroy that verify their postconditions
|
||||
nsresult
|
||||
void
|
||||
nsSMILValue::InitAndCheckPostcondition(const nsISMILType* aNewType)
|
||||
{
|
||||
nsresult rv = aNewType->Init(*this);
|
||||
NS_ABORT_IF_FALSE(mType == aNewType || (NS_FAILED(rv) && IsNull()),
|
||||
aNewType->Init(*this);
|
||||
NS_ABORT_IF_FALSE(mType == aNewType,
|
||||
"Post-condition of Init failed. nsSMILValue is invalid");
|
||||
return rv;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -163,9 +155,9 @@ nsSMILValue::DestroyAndCheckPostcondition()
|
|||
"nsSMILValue not null after destroying");
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsSMILValue::DestroyAndReinit(const nsISMILType* aNewType)
|
||||
{
|
||||
DestroyAndCheckPostcondition();
|
||||
return InitAndCheckPostcondition(aNewType);
|
||||
InitAndCheckPostcondition(aNewType);
|
||||
}
|
||||
|
|
|
@ -90,9 +90,9 @@ public:
|
|||
const nsISMILType* mType;
|
||||
|
||||
protected:
|
||||
nsresult InitAndCheckPostcondition(const nsISMILType* aNewType);
|
||||
void DestroyAndCheckPostcondition();
|
||||
nsresult DestroyAndReinit(const nsISMILType* aNewType);
|
||||
void InitAndCheckPostcondition(const nsISMILType* aNewType);
|
||||
void DestroyAndCheckPostcondition();
|
||||
void DestroyAndReinit(const nsISMILType* aNewType);
|
||||
};
|
||||
|
||||
#endif // NS_SMILVALUE_H_
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace mozilla {
|
|||
|
||||
/*static*/ SVGOrientSMILType SVGOrientSMILType::sSingleton;
|
||||
|
||||
nsresult
|
||||
void
|
||||
SVGOrientSMILType::Init(nsSMILValue& aValue) const
|
||||
{
|
||||
NS_ABORT_IF_FALSE(aValue.IsNull(), "Unexpected value type");
|
||||
|
@ -55,7 +55,6 @@ SVGOrientSMILType::Init(nsSMILValue& aValue) const
|
|||
aValue.mU.mOrient.mUnit = nsIDOMSVGAngle::SVG_ANGLETYPE_UNSPECIFIED;
|
||||
aValue.mU.mOrient.mOrientType = nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_ANGLE;
|
||||
aValue.mType = this;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
protected:
|
||||
// nsISMILType Methods
|
||||
// -------------------
|
||||
virtual nsresult Init(nsSMILValue& aValue) const;
|
||||
virtual void Init(nsSMILValue& aValue) const;
|
||||
virtual void Destroy(nsSMILValue&) const;
|
||||
virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
|
||||
virtual PRBool IsEqual(const nsSMILValue& aLeft,
|
||||
|
|
|
@ -44,17 +44,14 @@ namespace mozilla {
|
|||
|
||||
/*static*/ SVGViewBoxSMILType SVGViewBoxSMILType::sSingleton;
|
||||
|
||||
nsresult
|
||||
void
|
||||
SVGViewBoxSMILType::Init(nsSMILValue& aValue) const
|
||||
{
|
||||
NS_ABORT_IF_FALSE(aValue.IsNull(), "Unexpected value type");
|
||||
|
||||
nsSVGViewBoxRect* viewBox = new nsSVGViewBoxRect();
|
||||
NS_ENSURE_TRUE(viewBox, NS_ERROR_OUT_OF_MEMORY);
|
||||
aValue.mU.mPtr = viewBox;
|
||||
aValue.mType = this;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
protected:
|
||||
// nsISMILType Methods
|
||||
// -------------------
|
||||
virtual nsresult Init(nsSMILValue& aValue) const;
|
||||
virtual void Init(nsSMILValue& aValue) const;
|
||||
virtual void Destroy(nsSMILValue&) const;
|
||||
virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
|
||||
virtual PRBool IsEqual(const nsSMILValue& aLeft,
|
||||
|
|
|
@ -47,17 +47,14 @@ typedef nsTArray<nsSVGSMILTransform> TransformArray;
|
|||
//----------------------------------------------------------------------
|
||||
// nsISMILType implementation
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsSVGTransformSMILType::Init(nsSMILValue &aValue) const
|
||||
{
|
||||
NS_PRECONDITION(aValue.IsNull(), "Unexpected value type");
|
||||
|
||||
TransformArray* transforms = new TransformArray(1);
|
||||
NS_ENSURE_TRUE(transforms, NS_ERROR_OUT_OF_MEMORY);
|
||||
aValue.mU.mPtr = transforms;
|
||||
aValue.mType = this;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -112,7 +112,7 @@ public:
|
|||
protected:
|
||||
// nsISMILType Methods
|
||||
// -------------------
|
||||
virtual nsresult Init(nsSMILValue& aValue) const;
|
||||
virtual void Init(nsSMILValue& aValue) const;
|
||||
virtual void Destroy(nsSMILValue& aValue) const;
|
||||
virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
|
||||
virtual PRBool IsEqual(const nsSMILValue& aLeft,
|
||||
|
|
|
@ -462,9 +462,7 @@ nsXBLWindowKeyHandler::IsEditor()
|
|||
docShell->GetPresShell(getter_AddRefs(presShell));
|
||||
|
||||
if (presShell) {
|
||||
PRInt16 isEditor;
|
||||
presShell->GetSelectionFlags(&isEditor);
|
||||
return isEditor == nsISelectionDisplay::DISPLAY_ALL;
|
||||
return presShell->GetSelectionFlags() == nsISelectionDisplay::DISPLAY_ALL;
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
|
|
|
@ -126,7 +126,6 @@
|
|||
#include "nsXULPopupManager.h"
|
||||
#include "nsCCUncollectableMarker.h"
|
||||
#include "nsURILoader.h"
|
||||
#include "nsCSSFrameConstructor.h"
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//
|
||||
|
@ -223,7 +222,6 @@ nsRefMapEntry::RemoveContent(nsIContent* aContent)
|
|||
|
||||
nsXULDocument::nsXULDocument(void)
|
||||
: nsXMLDocument("application/vnd.mozilla.xul+xml"),
|
||||
mDocDirection(Direction_Uninitialized),
|
||||
mDocLWTheme(Doc_Theme_Uninitialized),
|
||||
mState(eState_Master),
|
||||
mResolutionPhase(nsForwardReference::eStart)
|
||||
|
@ -4607,75 +4605,68 @@ nsXULDocument::GetWindowRoot()
|
|||
PRBool
|
||||
nsXULDocument::IsDocumentRightToLeft()
|
||||
{
|
||||
if (mDocDirection == Direction_Uninitialized) {
|
||||
mDocDirection = Direction_LeftToRight; // default to ltr on failure
|
||||
|
||||
// setting the localedir attribute on the root element forces a
|
||||
// specific direction for the document.
|
||||
nsIContent* content = GetRootContent();
|
||||
if (content) {
|
||||
static nsIContent::AttrValuesArray strings[] =
|
||||
{&nsGkAtoms::ltr, &nsGkAtoms::rtl, nsnull};
|
||||
switch (content->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::localedir,
|
||||
strings, eCaseMatters)) {
|
||||
case 0: mDocDirection = Direction_LeftToRight; return PR_FALSE;
|
||||
case 1: mDocDirection = Direction_RightToLeft; return PR_TRUE;
|
||||
default: break;// otherwise, not a valid value, so fall through
|
||||
}
|
||||
}
|
||||
|
||||
// otherwise, get the locale from the chrome registry and
|
||||
// look up the intl.uidirection.<locale> preference
|
||||
nsCOMPtr<nsIXULChromeRegistry> reg =
|
||||
do_GetService(NS_CHROMEREGISTRY_CONTRACTID);
|
||||
if (reg) {
|
||||
nsCAutoString package;
|
||||
PRBool isChrome;
|
||||
if (NS_SUCCEEDED(mDocumentURI->SchemeIs("chrome", &isChrome)) &&
|
||||
isChrome) {
|
||||
mDocumentURI->GetHostPort(package);
|
||||
}
|
||||
else {
|
||||
// use the 'global' package for about and resource uris.
|
||||
// otherwise, just default to left-to-right.
|
||||
PRBool isAbout, isResource;
|
||||
if (NS_SUCCEEDED(mDocumentURI->SchemeIs("about", &isAbout)) &&
|
||||
isAbout) {
|
||||
package.AssignLiteral("global");
|
||||
}
|
||||
else if (NS_SUCCEEDED(mDocumentURI->SchemeIs("resource", &isResource)) &&
|
||||
isResource) {
|
||||
package.AssignLiteral("global");
|
||||
}
|
||||
else {
|
||||
return PR_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
PRBool isRTL = PR_FALSE;
|
||||
reg->IsLocaleRTL(package, &isRTL);
|
||||
mDocDirection = isRTL ?
|
||||
Direction_RightToLeft : Direction_LeftToRight;
|
||||
// setting the localedir attribute on the root element forces a
|
||||
// specific direction for the document.
|
||||
nsIContent* content = GetRootContent();
|
||||
if (content) {
|
||||
static nsIContent::AttrValuesArray strings[] =
|
||||
{&nsGkAtoms::ltr, &nsGkAtoms::rtl, nsnull};
|
||||
switch (content->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::localedir,
|
||||
strings, eCaseMatters)) {
|
||||
case 0: return PR_FALSE;
|
||||
case 1: return PR_TRUE;
|
||||
default: break; // otherwise, not a valid value, so fall through
|
||||
}
|
||||
}
|
||||
|
||||
return (mDocDirection == Direction_RightToLeft);
|
||||
// otherwise, get the locale from the chrome registry and
|
||||
// look up the intl.uidirection.<locale> preference
|
||||
nsCOMPtr<nsIXULChromeRegistry> reg =
|
||||
do_GetService(NS_CHROMEREGISTRY_CONTRACTID);
|
||||
if (!reg)
|
||||
return PR_FALSE;
|
||||
|
||||
nsCAutoString package;
|
||||
PRBool isChrome;
|
||||
if (NS_SUCCEEDED(mDocumentURI->SchemeIs("chrome", &isChrome)) &&
|
||||
isChrome) {
|
||||
mDocumentURI->GetHostPort(package);
|
||||
}
|
||||
else {
|
||||
// use the 'global' package for about and resource uris.
|
||||
// otherwise, just default to left-to-right.
|
||||
PRBool isAbout, isResource;
|
||||
if (NS_SUCCEEDED(mDocumentURI->SchemeIs("about", &isAbout)) &&
|
||||
isAbout) {
|
||||
package.AssignLiteral("global");
|
||||
}
|
||||
else if (NS_SUCCEEDED(mDocumentURI->SchemeIs("resource", &isResource)) &&
|
||||
isResource) {
|
||||
package.AssignLiteral("global");
|
||||
}
|
||||
else {
|
||||
return PR_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
PRBool isRTL = PR_FALSE;
|
||||
reg->IsLocaleRTL(package, &isRTL);
|
||||
return isRTL;
|
||||
}
|
||||
|
||||
void
|
||||
nsXULDocument::ResetDocumentDirection()
|
||||
{
|
||||
DocumentStatesChanged(NS_DOCUMENT_STATE_RTL_LOCALE);
|
||||
}
|
||||
|
||||
int
|
||||
nsXULDocument::DirectionChanged(const char* aPrefName, void* aData)
|
||||
{
|
||||
// reset the direction and reflow the document. This will happen if
|
||||
// the direction isn't actually being used, but that doesn't really
|
||||
// matter too much
|
||||
// Reset the direction and restyle the document if necessary.
|
||||
nsXULDocument* doc = (nsXULDocument *)aData;
|
||||
if (doc)
|
||||
if (doc) {
|
||||
doc->ResetDocumentDirection();
|
||||
|
||||
nsIPresShell *shell = doc->GetPrimaryShell();
|
||||
if (shell) {
|
||||
shell->FrameConstructor()->
|
||||
PostRestyleEvent(doc->GetRootContent(), eReStyle_Self, NS_STYLE_HINT_NONE);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -184,7 +184,7 @@ public:
|
|||
|
||||
virtual PRBool IsDocumentRightToLeft();
|
||||
|
||||
virtual void ResetDocumentDirection() { mDocDirection = Direction_Uninitialized; }
|
||||
virtual void ResetDocumentDirection();
|
||||
|
||||
virtual int GetDocumentLWTheme();
|
||||
|
||||
|
@ -329,17 +329,6 @@ protected:
|
|||
|
||||
nsCOMPtr<nsIDOMNode> mTooltipNode; // [OWNER] element triggering the tooltip
|
||||
|
||||
/**
|
||||
* document direction for use with the -moz-locale-dir property
|
||||
*/
|
||||
enum DocumentDirection {
|
||||
Direction_Uninitialized, // not determined yet
|
||||
Direction_LeftToRight,
|
||||
Direction_RightToLeft
|
||||
};
|
||||
|
||||
DocumentDirection mDocDirection;
|
||||
|
||||
/**
|
||||
* document lightweight theme for use with :-moz-lwtheme, :-moz-lwtheme-brighttext
|
||||
* and :-moz-lwtheme-darktext
|
||||
|
|
|
@ -282,12 +282,8 @@ nsBindingValues::GetAssignmentFor(nsXULTemplateResultRDF* aResult,
|
|||
nsCOMPtr<nsIRDFNode> subjectValue;
|
||||
aResult->GetAssignment(binding->mSubjectVariable,
|
||||
getter_AddRefs(subjectValue));
|
||||
|
||||
NS_ASSERTION(subjectValue, "Value of subject is not set");
|
||||
|
||||
if (subjectValue) {
|
||||
nsCOMPtr<nsIRDFResource> subject = do_QueryInterface(subjectValue);
|
||||
|
||||
ds->GetTarget(subject, binding->mPredicate, PR_TRUE, aValue);
|
||||
if (*aValue)
|
||||
mValues[idx] = *aValue;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
This is sqlite 3.6.22
|
||||
This is sqlite 3.6.23
|
||||
|
||||
-- Shawn Wilsher <me@shawnwilsher.com>, 01/2010
|
||||
-- Shawn Wilsher <me@shawnwilsher.com>, 03/2010
|
||||
|
||||
See http://www.sqlite.org/ for more info.
|
||||
|
||||
|
|
|
@ -100,6 +100,7 @@ CSRCS = \
|
|||
# don't have to vacuum to make sure the data is not visible in the file.
|
||||
# -DSQLITE_ENABLE_FTS3=1 enables the full-text index module.
|
||||
# -DSQLITE_CORE=1 statically links that module into the SQLite library.
|
||||
# Note: Be sure to update the configure.in checks when these change!
|
||||
DEFINES = \
|
||||
-DSQLITE_SECURE_DELETE=1 \
|
||||
-DSQLITE_THREADSAFE=1 \
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -107,13 +107,13 @@ extern "C" {
|
|||
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
||||
** [sqlite_version()] and [sqlite_source_id()].
|
||||
*/
|
||||
#define SQLITE_VERSION "3.6.22"
|
||||
#define SQLITE_VERSION_NUMBER 3006022
|
||||
#define SQLITE_SOURCE_ID "2010-01-05 15:30:36 28d0d7710761114a44a1a3a425a6883c661f06e7"
|
||||
#define SQLITE_VERSION "3.6.23"
|
||||
#define SQLITE_VERSION_NUMBER 3006023
|
||||
#define SQLITE_SOURCE_ID "2010-03-09 19:31:43 4ae453ea7be69018d8c16eb8dabe05617397dc4d"
|
||||
|
||||
/*
|
||||
** CAPI3REF: Run-Time Library Version Numbers
|
||||
** KEYWORDS: sqlite3_version
|
||||
** KEYWORDS: sqlite3_version, sqlite3_sourceid
|
||||
**
|
||||
** These interfaces provide the same information as the [SQLITE_VERSION],
|
||||
** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros
|
||||
|
@ -135,9 +135,9 @@ extern "C" {
|
|||
** function is provided for use in DLLs since DLL users usually do not have
|
||||
** direct access to string constants within the DLL. ^The
|
||||
** sqlite3_libversion_number() function returns an integer equal to
|
||||
** [SQLITE_VERSION_NUMBER]. ^The sqlite3_sourceid() function a pointer
|
||||
** to a string constant whose value is the same as the [SQLITE_SOURCE_ID]
|
||||
** C preprocessor macro.
|
||||
** [SQLITE_VERSION_NUMBER]. ^The sqlite3_sourceid() function returns
|
||||
** a pointer to a string constant whose value is the same as the
|
||||
** [SQLITE_SOURCE_ID] C preprocessor macro.
|
||||
**
|
||||
** See also: [sqlite_version()] and [sqlite_source_id()].
|
||||
*/
|
||||
|
@ -146,6 +146,33 @@ SQLITE_API const char *sqlite3_libversion(void);
|
|||
SQLITE_API const char *sqlite3_sourceid(void);
|
||||
SQLITE_API int sqlite3_libversion_number(void);
|
||||
|
||||
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
|
||||
/*
|
||||
** CAPI3REF: Run-Time Library Compilation Options Diagnostics
|
||||
**
|
||||
** ^The sqlite3_compileoption_used() function returns 0 or 1
|
||||
** indicating whether the specified option was defined at
|
||||
** compile time. ^The SQLITE_ prefix may be omitted from the
|
||||
** option name passed to sqlite3_compileoption_used().
|
||||
**
|
||||
** ^The sqlite3_compileoption_get() function allows interating
|
||||
** over the list of options that were defined at compile time by
|
||||
** returning the N-th compile time option string. ^If N is out of range,
|
||||
** sqlite3_compileoption_get() returns a NULL pointer. ^The SQLITE_
|
||||
** prefix is omitted from any strings returned by
|
||||
** sqlite3_compileoption_get().
|
||||
**
|
||||
** ^Support for the diagnostic functions sqlite3_compileoption_used()
|
||||
** and sqlite3_compileoption_get() may be omitted by specifing the
|
||||
** [SQLITE_OMIT_COMPILEOPTION_DIAGS] option at compile time.
|
||||
**
|
||||
** See also: SQL functions [sqlite_compileoption_used()] and
|
||||
** [sqlite_compileoption_get()] and the [compile_options pragma].
|
||||
*/
|
||||
SQLITE_API int sqlite3_compileoption_used(const char *zOptName);
|
||||
SQLITE_API const char *sqlite3_compileoption_get(int N);
|
||||
#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
|
||||
|
||||
/*
|
||||
** CAPI3REF: Test To See If The Library Is Threadsafe
|
||||
**
|
||||
|
@ -437,6 +464,7 @@ SQLITE_API int sqlite3_exec(
|
|||
#define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */
|
||||
#define SQLITE_OPEN_DELETEONCLOSE 0x00000008 /* VFS only */
|
||||
#define SQLITE_OPEN_EXCLUSIVE 0x00000010 /* VFS only */
|
||||
#define SQLITE_OPEN_AUTOPROXY 0x00000020 /* VFS only */
|
||||
#define SQLITE_OPEN_MAIN_DB 0x00000100 /* VFS only */
|
||||
#define SQLITE_OPEN_TEMP_DB 0x00000200 /* VFS only */
|
||||
#define SQLITE_OPEN_TRANSIENT_DB 0x00000400 /* VFS only */
|
||||
|
@ -918,7 +946,6 @@ SQLITE_API int sqlite3_os_end(void);
|
|||
|
||||
/*
|
||||
** CAPI3REF: Configuring The SQLite Library
|
||||
** EXPERIMENTAL
|
||||
**
|
||||
** The sqlite3_config() interface is used to make global configuration
|
||||
** changes to SQLite in order to tune SQLite to the specific needs of
|
||||
|
@ -1259,6 +1286,7 @@ struct sqlite3_mem_methods {
|
|||
#define SQLITE_CONFIG_LOOKASIDE 13 /* int int */
|
||||
#define SQLITE_CONFIG_PCACHE 14 /* sqlite3_pcache_methods* */
|
||||
#define SQLITE_CONFIG_GETPCACHE 15 /* sqlite3_pcache_methods* */
|
||||
#define SQLITE_CONFIG_LOG 16 /* xFunc, void* */
|
||||
|
||||
/*
|
||||
** CAPI3REF: Configuration Options
|
||||
|
@ -3661,6 +3689,7 @@ SQLITE_API int sqlite3_collation_needed16(
|
|||
void(*)(void*,sqlite3*,int eTextRep,const void*)
|
||||
);
|
||||
|
||||
#if SQLITE_HAS_CODEC
|
||||
/*
|
||||
** Specify the key for an encrypted database. This routine should be
|
||||
** called right after sqlite3_open().
|
||||
|
@ -3686,6 +3715,25 @@ SQLITE_API int sqlite3_rekey(
|
|||
const void *pKey, int nKey /* The new key */
|
||||
);
|
||||
|
||||
/*
|
||||
** Specify the activation key for a SEE database. Unless
|
||||
** activated, none of the SEE routines will work.
|
||||
*/
|
||||
SQLITE_API void sqlite3_activate_see(
|
||||
const char *zPassPhrase /* Activation phrase */
|
||||
);
|
||||
#endif
|
||||
|
||||
#ifdef SQLITE_ENABLE_CEROD
|
||||
/*
|
||||
** Specify the activation key for a CEROD database. Unless
|
||||
** activated, none of the CEROD routines will work.
|
||||
*/
|
||||
SQLITE_API void sqlite3_activate_cerod(
|
||||
const char *zPassPhrase /* Activation phrase */
|
||||
);
|
||||
#endif
|
||||
|
||||
/*
|
||||
** CAPI3REF: Suspend Execution For A Short Time
|
||||
**
|
||||
|
@ -5647,6 +5695,30 @@ SQLITE_API int sqlite3_unlock_notify(
|
|||
*/
|
||||
SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Error Logging Interface
|
||||
** EXPERIMENTAL
|
||||
**
|
||||
** ^The [sqlite3_log()] interface writes a message into the error log
|
||||
** established by the [SQLITE_CONFIG_LOG] option to [sqlite3_config()].
|
||||
** ^If logging is enabled, the zFormat string and subsequent arguments are
|
||||
** passed through to [sqlite3_vmprintf()] to generate the final output string.
|
||||
**
|
||||
** The sqlite3_log() interface is intended for use by extensions such as
|
||||
** virtual tables, collating functions, and SQL functions. While there is
|
||||
** nothing to prevent an application from calling sqlite3_log(), doing so
|
||||
** is considered bad form.
|
||||
**
|
||||
** The zFormat string must not be NULL.
|
||||
**
|
||||
** To avoid deadlocks and other threading problems, the sqlite3_log() routine
|
||||
** will not use dynamically allocated memory. The log message is stored in
|
||||
** a fixed-length buffer on the stack. If the log message is longer than
|
||||
** a few hundred characters, it will be truncated to the length of the
|
||||
** buffer.
|
||||
*/
|
||||
SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);
|
||||
|
||||
/*
|
||||
** Undo the hack that converts floating point types to integer for
|
||||
** builds on processors without floating point support.
|
||||
|
|
|
@ -6843,52 +6843,53 @@ nsGlobalWindow::GetLocation(nsIDOMLocation ** aLocation)
|
|||
void
|
||||
nsGlobalWindow::ActivateOrDeactivate(PRBool aActivate)
|
||||
{
|
||||
// Set / unset the "active" attribute on the documentElement
|
||||
// of the top level window
|
||||
// Set / unset mIsActive on the top level window, which is used for the
|
||||
// :-moz-window-inactive pseudoclass.
|
||||
nsCOMPtr<nsIWidget> mainWidget = GetMainWidget();
|
||||
if (mainWidget) {
|
||||
// Get the top level widget (if the main widget is a sheet, this will
|
||||
// be the sheet's top (non-sheet) parent).
|
||||
nsCOMPtr<nsIWidget> topLevelWidget = mainWidget->GetSheetWindowParent();
|
||||
if (!topLevelWidget)
|
||||
topLevelWidget = mainWidget;
|
||||
if (!mainWidget)
|
||||
return;
|
||||
|
||||
// Get the top level widget's nsGlobalWindow
|
||||
nsCOMPtr<nsIDOMWindowInternal> topLevelWindow;
|
||||
if (topLevelWidget == mainWidget) {
|
||||
topLevelWindow = static_cast<nsIDOMWindowInternal *>(this);
|
||||
} else {
|
||||
// This is a workaround for the following problem:
|
||||
// When a window with an open sheet loses focus, only the sheet window
|
||||
// receives the NS_DEACTIVATE event. However, it's not the sheet that
|
||||
// should lose the "active" attribute, but the containing top level window.
|
||||
void* clientData;
|
||||
topLevelWidget->GetClientData(clientData); // clientData is nsXULWindow
|
||||
nsISupports* data = static_cast<nsISupports*>(clientData);
|
||||
nsCOMPtr<nsIInterfaceRequestor> req(do_QueryInterface(data));
|
||||
topLevelWindow = do_GetInterface(req);
|
||||
}
|
||||
|
||||
if (topLevelWindow) {
|
||||
// Only set the attribute if the document is a XUL document and the
|
||||
// window is a chrome window
|
||||
nsCOMPtr<nsIDOMDocument> domDoc;
|
||||
topLevelWindow->GetDocument(getter_AddRefs(domDoc));
|
||||
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
|
||||
nsCOMPtr<nsIDOMXULDocument> xulDoc(do_QueryInterface(doc));
|
||||
nsCOMPtr<nsIDOMChromeWindow> chromeWin = do_QueryInterface(topLevelWindow);
|
||||
if (xulDoc && chromeWin) {
|
||||
nsCOMPtr<nsIContent> rootElem = doc->GetRootContent();
|
||||
if (rootElem) {
|
||||
if (aActivate)
|
||||
rootElem->SetAttr(kNameSpaceID_None, nsGkAtoms::active,
|
||||
NS_LITERAL_STRING("true"), PR_TRUE);
|
||||
else
|
||||
rootElem->UnsetAttr(kNameSpaceID_None, nsGkAtoms::active, PR_TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Get the top level widget (if the main widget is a sheet, this will
|
||||
// be the sheet's top (non-sheet) parent).
|
||||
nsCOMPtr<nsIWidget> topLevelWidget = mainWidget->GetSheetWindowParent();
|
||||
if (!topLevelWidget) {
|
||||
topLevelWidget = mainWidget;
|
||||
}
|
||||
|
||||
// Get the top level widget's nsGlobalWindow
|
||||
nsCOMPtr<nsIDOMWindowInternal> topLevelWindow;
|
||||
if (topLevelWidget == mainWidget) {
|
||||
topLevelWindow = static_cast<nsIDOMWindowInternal*>(this);
|
||||
} else {
|
||||
// This is a workaround for the following problem:
|
||||
// When a window with an open sheet loses focus, only the sheet window
|
||||
// receives the NS_DEACTIVATE event. However, it's not the sheet that
|
||||
// should lose the active styling, but the containing top level window.
|
||||
void* clientData;
|
||||
topLevelWidget->GetClientData(clientData); // clientData is nsXULWindow
|
||||
nsISupports* data = static_cast<nsISupports*>(clientData);
|
||||
nsCOMPtr<nsIInterfaceRequestor> req(do_QueryInterface(data));
|
||||
topLevelWindow = do_GetInterface(req);
|
||||
}
|
||||
if (topLevelWindow) {
|
||||
nsCOMPtr<nsPIDOMWindow> piWin(do_QueryInterface(topLevelWindow));
|
||||
piWin->SetActive(aActivate);
|
||||
}
|
||||
}
|
||||
|
||||
static PRBool
|
||||
NotifyDocumentTree(nsIDocument* aDocument, void* aData)
|
||||
{
|
||||
aDocument->EnumerateSubDocuments(NotifyDocumentTree, nsnull);
|
||||
aDocument->DocumentStatesChanged(NS_DOCUMENT_STATE_WINDOW_INACTIVE);
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
nsGlobalWindow::SetActive(PRBool aActive)
|
||||
{
|
||||
nsPIDOMWindow::SetActive(aActive);
|
||||
NotifyDocumentTree(mDoc, nsnull);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -289,6 +289,7 @@ public:
|
|||
// nsPIDOMWindow
|
||||
virtual NS_HIDDEN_(nsPIDOMWindow*) GetPrivateRoot();
|
||||
virtual NS_HIDDEN_(void) ActivateOrDeactivate(PRBool aActivate);
|
||||
virtual NS_HIDDEN_(void) SetActive(PRBool aActive);
|
||||
virtual NS_HIDDEN_(void) SetChromeEventHandler(nsPIDOMEventTarget* aChromeEventHandler);
|
||||
|
||||
virtual NS_HIDDEN_(void) SetOpenerScriptPrincipal(nsIPrincipal* aPrincipal);
|
||||
|
|
|
@ -78,8 +78,8 @@ class nsIArray;
|
|||
class nsPIWindowRoot;
|
||||
|
||||
#define NS_PIDOMWINDOW_IID \
|
||||
{ 0x81cdf500, 0x2183, 0x4af6, \
|
||||
{ 0xa4, 0x56, 0x35, 0x1f, 0x4a, 0x0d, 0x1a, 0x0b } }
|
||||
{ 0xC5CB154D, 0x17C0, 0x49E9, \
|
||||
{ 0x9C, 0x83, 0xFF, 0xC7, 0x2C, 0x93, 0xAF, 0x24 } }
|
||||
|
||||
class nsPIDOMWindow : public nsIDOMWindowInternal
|
||||
{
|
||||
|
@ -93,6 +93,16 @@ public:
|
|||
// this is called GetTopWindowRoot to avoid conflicts with nsIDOMWindow2::GetWindowRoot
|
||||
virtual already_AddRefed<nsPIWindowRoot> GetTopWindowRoot() = 0;
|
||||
|
||||
virtual void SetActive(PRBool aActive)
|
||||
{
|
||||
mIsActive = aActive;
|
||||
}
|
||||
|
||||
PRBool IsActive()
|
||||
{
|
||||
return mIsActive;
|
||||
}
|
||||
|
||||
nsPIDOMEventTarget* GetChromeEventHandler() const
|
||||
{
|
||||
return mChromeEventHandler;
|
||||
|
@ -490,8 +500,8 @@ protected:
|
|||
mRunningTimeout(nsnull), mMutationBits(0), mIsDocumentLoaded(PR_FALSE),
|
||||
mIsHandlingResizeEvent(PR_FALSE), mIsInnerWindow(aOuterWindow != nsnull),
|
||||
mMayHavePaintEventListener(PR_FALSE),
|
||||
mIsModalContentWindow(PR_FALSE), mInnerWindow(nsnull),
|
||||
mOuterWindow(aOuterWindow)
|
||||
mIsModalContentWindow(PR_FALSE), mIsActive(PR_FALSE),
|
||||
mInnerWindow(nsnull), mOuterWindow(aOuterWindow)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -525,6 +535,9 @@ protected:
|
|||
// should match).
|
||||
PRPackedBool mIsModalContentWindow;
|
||||
|
||||
// Tracks activation state that's used for :-moz-window-inactive.
|
||||
PRPackedBool mIsActive;
|
||||
|
||||
// And these are the references between inner and outer windows.
|
||||
nsPIDOMWindow *mInnerWindow;
|
||||
nsPIDOMWindow *mOuterWindow;
|
||||
|
|
|
@ -60,6 +60,8 @@ _TEST_FILES = \
|
|||
window_focus.xul \
|
||||
test_focused_link_scroll.xul \
|
||||
test_geolocation.xul \
|
||||
test_activation.xul \
|
||||
window_activation.xul \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(_TEST_FILES)
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
|
||||
<?xml-stylesheet href="data:text/css,
|
||||
|
||||
#box {
|
||||
background: blue;
|
||||
}
|
||||
|
||||
#box:-moz-window-inactive {
|
||||
background: cyan;
|
||||
}
|
||||
|
||||
" type="text/css"?>
|
||||
<!--
|
||||
Test for the :-moz-window-inactive pseudoclass
|
||||
-->
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
sizemode="fullscreen">
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
|
||||
<box id="box" height="100"/>
|
||||
|
||||
<script>
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
newwindow = window.open("window_activation.xul", "_blank","chrome,width=300,height=200");
|
||||
|
||||
function complete()
|
||||
{
|
||||
newwindow.close();
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
|
||||
|
||||
</window>
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="data:text/css,
|
||||
|
||||
#box {
|
||||
background: blue;
|
||||
}
|
||||
|
||||
#box:-moz-window-inactive {
|
||||
background: cyan;
|
||||
}
|
||||
|
||||
" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<box id="box" height="100"/>
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
|
||||
var ok = window.opener.wrappedJSObject.ok;
|
||||
var complete = window.opener.wrappedJSObject.complete;
|
||||
var openerDoc = window.opener.wrappedJSObject.document;
|
||||
|
||||
window.onfocus = function () {
|
||||
ok(getComputedStyle(document.getElementById("box"), "").backgroundColor, "rgb(0, 0, 255)");
|
||||
ok(getComputedStyle(openerDoc.getElementById("box"), "").backgroundColor, "rgb(0, 255, 255)");
|
||||
window.opener.focus();
|
||||
ok(getComputedStyle(document.getElementById("box"), "").backgroundColor, "rgb(0, 255, 255)");
|
||||
ok(getComputedStyle(openerDoc.getElementById("box"), "").backgroundColor, "rgb(0, 0, 255)");
|
||||
complete();
|
||||
}
|
||||
|
||||
]]></script>
|
||||
|
||||
</window>
|
|
@ -103,9 +103,8 @@ $(IFACES_DIR)::
|
|||
|
||||
GARBAGE_DIRS += $(IFACES_DIR)
|
||||
|
||||
# Don't include the interface nsIPref, since it depends on the obsolete
|
||||
# interface nsIFileSpec.
|
||||
IGNORE_IFACES_NAMES = nsIPref
|
||||
# exclude interfaces that we don't need
|
||||
IGNORE_IFACES_NAMES =
|
||||
ifneq (,$(IGNORE_IFACES_NAMES))
|
||||
IGNORE_IFACES = $(patsubst %, ! -name "*%.java", $(IGNORE_IFACES_NAMES))
|
||||
endif
|
||||
|
@ -123,7 +122,9 @@ $(IFACES_JAR): $(IFACES_DIR)/$(JAVA_IFACES_PKG_NAME)/nsISupports.class Makefile
|
|||
|
||||
$(IFACES_JAR_SRC): $(IFACES_JAR)
|
||||
$(JAR) cf $@ -C $(JAVA_DIST_DIR)/default org
|
||||
ifneq (,$(IGNORE_IFACES_NAMES))
|
||||
$(ZIP) -d $@ $(patsubst %, $(JAVA_IFACES_PKG_NAME)/%.java, $(IGNORE_IFACES_NAMES))
|
||||
endif
|
||||
|
||||
# Since we set NO_DIST_INSTALL above, the jars don't get copied into the SDK.
|
||||
# Handle that here.
|
||||
|
|
|
@ -937,6 +937,14 @@ _dwrite_draw_glyphs_to_gdi_surface_gdi(cairo_win32_surface_t *surface,
|
|||
area.bottom - area.top,
|
||||
&rt);
|
||||
|
||||
/**
|
||||
* We set the number of pixels per DIP to 1.0. This is because we always want
|
||||
* to draw in device pixels, and not device independent pixels. On high DPI
|
||||
* systems this value will be higher than 1.0 and automatically upscale
|
||||
* fonts, we don't want this since we do our own upscaling for various reasons.
|
||||
*/
|
||||
rt->SetPixelsPerDip(1.0);
|
||||
|
||||
if (transform) {
|
||||
rt->SetCurrentTransform(transform);
|
||||
}
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
#include "nsRect.h"
|
||||
#include "nsPoint.h"
|
||||
|
||||
class nsIntRegion;
|
||||
|
||||
/**
|
||||
* Implementation of regions.
|
||||
* A region is represented as circular double-linked list of nsRegion::RgnRect structures.
|
||||
|
@ -176,6 +178,7 @@ public:
|
|||
PRBool IsEqual (const nsRegion& aRegion) const;
|
||||
PRUint32 GetNumRects () const { return mRectCount; }
|
||||
const nsRect& GetBounds () const { return mBoundRect; }
|
||||
nsIntRegion ToOutsidePixels (nscoord aAppUnitsPerPixel) const;
|
||||
|
||||
/**
|
||||
* Make sure the region has at most aMaxRects by adding area to it
|
||||
|
|
|
@ -1288,6 +1288,17 @@ void nsRegion::MoveBy (nsPoint aPt)
|
|||
}
|
||||
}
|
||||
|
||||
nsIntRegion nsRegion::ToOutsidePixels(nscoord aAppUnitsPerPixel) const {
|
||||
nsIntRegion result;
|
||||
nsRegionRectIterator rgnIter(*this);
|
||||
const nsRect *currentRect;
|
||||
while (currentRect = rgnIter.Next()) {
|
||||
nsIntRect deviceRect = currentRect->ToOutsidePixels(aAppUnitsPerPixel);
|
||||
result.Or(result, deviceRect);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void nsRegion::SimplifyOutward (PRUint32 aMaxRects)
|
||||
{
|
||||
NS_ASSERTION(aMaxRects >= 1, "Invalid max rect count");
|
||||
|
|
|
@ -74,11 +74,12 @@ gfxDWriteFont::gfxDWriteFont(gfxFontEntry *aFontEntry,
|
|||
|
||||
rv = fe->CreateFontFace(getter_AddRefs(mFontFace), sims);
|
||||
|
||||
ComputeMetrics();
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
mIsValid = PR_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
ComputeMetrics();
|
||||
}
|
||||
|
||||
gfxDWriteFont::~gfxDWriteFont()
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "prtypes.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsTArray.h"
|
||||
#include "gfxMatrix.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( disable : 4800 )
|
||||
|
@ -281,6 +282,41 @@ struct ParamTraits<float>
|
|||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct ParamTraits<gfxMatrix>
|
||||
{
|
||||
typedef gfxMatrix paramType;
|
||||
|
||||
static void Write(Message* aMsg, const paramType& aParam)
|
||||
{
|
||||
WriteParam(aMsg, aParam.xx);
|
||||
WriteParam(aMsg, aParam.xy);
|
||||
WriteParam(aMsg, aParam.yx);
|
||||
WriteParam(aMsg, aParam.yy);
|
||||
WriteParam(aMsg, aParam.x0);
|
||||
WriteParam(aMsg, aParam.y0);
|
||||
}
|
||||
|
||||
static bool Read(const Message* aMsg, void** aIter, paramType* aResult)
|
||||
{
|
||||
if (ReadParam(aMsg, aIter, &aResult->xx) &&
|
||||
ReadParam(aMsg, aIter, &aResult->xy) &&
|
||||
ReadParam(aMsg, aIter, &aResult->yx) &&
|
||||
ReadParam(aMsg, aIter, &aResult->yy) &&
|
||||
ReadParam(aMsg, aIter, &aResult->x0) &&
|
||||
ReadParam(aMsg, aIter, &aResult->y0))
|
||||
return true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void Log(const paramType& aParam, std::wstring* aLog)
|
||||
{
|
||||
aLog->append(StringPrintf(L"[[%g %g] [%g %g] [%g %g]]", aParam.xx, aParam.xy, aParam.yx, aParam.yy,
|
||||
aParam.x0, aParam.y0));
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace IPC */
|
||||
|
||||
#endif /* __IPC_GLUE_IPCMESSAGEUTILS_H__ */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Patch libffi to fix bug 528129 and bug 538216.
|
||||
Patch libffi to fix bug 550602, bug 528129 and bug 538216.
|
||||
|
||||
diff --git a/js/ctypes/libffi/Makefile.in b/js/ctypes/libffi/Makefile.in
|
||||
--- a/js/ctypes/libffi/Makefile.in
|
||||
|
@ -22,6 +22,69 @@ diff --git a/js/ctypes/libffi/Makefile.in b/js/ctypes/libffi/Makefile.in
|
|||
TEXINFOS = doc/libffi.texi
|
||||
TEXI2DVI = texi2dvi
|
||||
TEXI2PDF = $(TEXI2DVI) --pdf --batch
|
||||
@@ -966,7 +966,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/win32.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/win64.Plo@am__quote@
|
||||
|
||||
-.S.o:
|
||||
+%.o: %.S
|
||||
@am__fastdepCCAS_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@@ -974,7 +974,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ $<
|
||||
|
||||
-.S.obj:
|
||||
+%.obj: %.S
|
||||
@am__fastdepCCAS_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||
@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||
@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@@ -982,7 +982,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
-.S.lo:
|
||||
+%.lo: %.S
|
||||
@am__fastdepCCAS_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||
@am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
|
||||
@@ -990,7 +990,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCCAS_FALSE@ $(LTCPPASCOMPILE) -c -o $@ $<
|
||||
|
||||
-.c.o:
|
||||
+%.o: %.c
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@@ -998,7 +998,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
|
||||
|
||||
-.c.obj:
|
||||
+%.obj: %.c
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@@ -1006,7 +1006,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
-.c.lo:
|
||||
+%.lo: %.c
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
|
||||
@@ -1108,7 +1108,7 @@ mostlyclean-vti:
|
||||
|
||||
maintainer-clean-vti:
|
||||
@MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/doc/stamp-vti $(srcdir)/doc/version.texi
|
||||
-.dvi.ps:
|
||||
+%.ps: %.dvi
|
||||
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
$(DVIPS) -o $@ $<
|
||||
|
||||
diff --git a/js/ctypes/libffi/configure b/js/ctypes/libffi/configure
|
||||
--- a/js/ctypes/libffi/configure
|
||||
+++ b/js/ctypes/libffi/configure
|
||||
|
|
|
@ -966,7 +966,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/win32.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/win64.Plo@am__quote@
|
||||
|
||||
.S.o:
|
||||
%.o: %.S
|
||||
@am__fastdepCCAS_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
|
@ -974,7 +974,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ $<
|
||||
|
||||
.S.obj:
|
||||
%.obj: %.S
|
||||
@am__fastdepCCAS_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||
@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||
@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
|
@ -982,7 +982,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.S.lo:
|
||||
%.lo: %.S
|
||||
@am__fastdepCCAS_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||
@am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
|
||||
|
@ -990,7 +990,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCCAS_FALSE@ $(LTCPPASCOMPILE) -c -o $@ $<
|
||||
|
||||
.c.o:
|
||||
%.o: %.c
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
|
@ -998,7 +998,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
%.obj: %.c
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
|
@ -1006,7 +1006,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
%.lo: %.c
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
|
||||
|
@ -1108,7 +1108,7 @@ mostlyclean-vti:
|
|||
|
||||
maintainer-clean-vti:
|
||||
@MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/doc/stamp-vti $(srcdir)/doc/version.texi
|
||||
.dvi.ps:
|
||||
%.ps: %.dvi
|
||||
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
$(DVIPS) -o $@ $<
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ def check(copy, original, ignore):
|
|||
relative_name = join(dirpath, filename)
|
||||
original_name = join(original, relative_name)
|
||||
if (os.path.exists(original_name)
|
||||
and filecmp.cmp(relative_name, original_name)):
|
||||
and filecmp.cmp(relative_name, original_name, False)):
|
||||
continue
|
||||
report(copy, original, relative_name)
|
||||
|
||||
|
|
|
@ -5827,8 +5827,7 @@ nsCSSFrameConstructor::FindFrameForContentSibling(nsIContent* aContent,
|
|||
// If the frame is out-of-flow, GetPrimaryFrame() will have returned the
|
||||
// out-of-flow frame; we want the placeholder.
|
||||
if (sibling->GetStateBits() & NS_FRAME_OUT_OF_FLOW) {
|
||||
nsIFrame* placeholderFrame;
|
||||
mPresShell->GetPlaceholderFrameFor(sibling, &placeholderFrame);
|
||||
nsIFrame* placeholderFrame = mPresShell->FrameManager()->GetPlaceholderFrameFor(sibling);
|
||||
NS_ASSERTION(placeholderFrame, "no placeholder for out-of-flow frame");
|
||||
sibling = placeholderFrame;
|
||||
}
|
||||
|
@ -8247,8 +8246,7 @@ nsCSSFrameConstructor::ReplicateFixedFrames(nsPageContentFrame* aParentFrame)
|
|||
// are within fixed frames, because that would cause duplicates on the new
|
||||
// page - bug 389619)
|
||||
for (nsIFrame* fixed = firstFixed; fixed; fixed = fixed->GetNextSibling()) {
|
||||
nsIFrame* prevPlaceholder = nsnull;
|
||||
mPresShell->GetPlaceholderFrameFor(fixed, &prevPlaceholder);
|
||||
nsIFrame* prevPlaceholder = mPresShell->FrameManager()->GetPlaceholderFrameFor(fixed);
|
||||
if (prevPlaceholder &&
|
||||
nsLayoutUtils::IsProperAncestorFrame(prevCanvasFrame, prevPlaceholder)) {
|
||||
nsresult rv = ConstructFrame(state, fixed->GetContent(),
|
||||
|
|
|
@ -943,9 +943,12 @@ DocumentViewerImpl::InitInternal(nsIWidget* aParentWidget,
|
|||
getter_AddRefs(window));
|
||||
|
||||
if (window) {
|
||||
window->SetNewDocument(mDocument, aState);
|
||||
|
||||
nsJSContext::LoadStart();
|
||||
nsCOMPtr<nsIDocument> curDoc =
|
||||
do_QueryInterface(window->GetExtantDocument());
|
||||
if (!mIsPageMode || curDoc != mDocument) {
|
||||
window->SetNewDocument(mDocument, aState);
|
||||
nsJSContext::LoadStart();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1274,7 +1277,7 @@ DocumentViewerImpl::PageHide(PRBool aIsUnload)
|
|||
|
||||
if (!window) {
|
||||
// Fail if no window is available...
|
||||
NS_ERROR("window not set for document!");
|
||||
NS_WARNING("window not set for document!");
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
|
@ -2368,7 +2371,7 @@ DocumentViewerImpl::FindContainerView()
|
|||
nsresult
|
||||
DocumentViewerImpl::CreateDeviceContext(nsIView* aContainerView)
|
||||
{
|
||||
NS_PRECONDITION(!mPresShell && !mPresContext && !mWindow,
|
||||
NS_PRECONDITION(!mPresShell && !mWindow,
|
||||
"This will screw up our existing presentation");
|
||||
NS_PRECONDITION(mDocument, "Gotta have a document here");
|
||||
|
||||
|
@ -2787,8 +2790,7 @@ DocumentViewerImpl::SetFullZoom(float aFullZoom)
|
|||
|
||||
mPrintPreviewZoom = aFullZoom;
|
||||
pc->SetPrintPreviewScale(aFullZoom * mOriginalPrintPreviewScale);
|
||||
nsIPageSequenceFrame* pf = nsnull;
|
||||
shell->GetPageSequenceFrame(&pf);
|
||||
nsIPageSequenceFrame* pf = shell->GetPageSequenceFrame();
|
||||
if (pf) {
|
||||
nsIFrame* f = do_QueryFrame(pf);
|
||||
shell->FrameNeedsReflow(f, nsIPresShell::eResize, NS_FRAME_IS_DIRTY);
|
||||
|
|
|
@ -514,8 +514,7 @@ nsFrameIterator::GetPlaceholderFrame(nsIFrame* aFrame)
|
|||
nsIFrame* result = aFrame;
|
||||
nsIPresShell *presShell = mPresContext->GetPresShell();
|
||||
if (presShell) {
|
||||
nsIFrame* placeholder = 0;
|
||||
presShell->GetPlaceholderFrameFor(aFrame, &placeholder);
|
||||
nsIFrame* placeholder = presShell->GetPlaceholderFrameFor(aFrame);
|
||||
if (placeholder)
|
||||
result = placeholder;
|
||||
}
|
||||
|
|
|
@ -127,8 +127,8 @@ typedef struct CapturingContentInfo {
|
|||
} CapturingContentInfo;
|
||||
|
||||
#define NS_IPRESSHELL_IID \
|
||||
{ 0x0e170e5f, 0xf6d4, 0x44c5, \
|
||||
{ 0xbc, 0x2c, 0x44, 0x94, 0x20, 0x7e, 0xcc, 0x30 } }
|
||||
{ 0x94c34e88, 0x2da3, 0x49d4, \
|
||||
{ 0xa5, 0x35, 0x51, 0xa4, 0x16, 0x92, 0xa5, 0x79 } }
|
||||
|
||||
// Constants for ScrollContentIntoView() function
|
||||
#define NS_PRESSHELL_SCROLL_TOP 0
|
||||
|
@ -182,11 +182,11 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIPresShell_base, NS_IPRESSHELL_IID)
|
|||
class nsIPresShell : public nsIPresShell_base
|
||||
{
|
||||
public:
|
||||
NS_IMETHOD Init(nsIDocument* aDocument,
|
||||
nsPresContext* aPresContext,
|
||||
nsIViewManager* aViewManager,
|
||||
nsStyleSet* aStyleSet,
|
||||
nsCompatibility aCompatMode) = 0;
|
||||
virtual NS_HIDDEN_(nsresult) Init(nsIDocument* aDocument,
|
||||
nsPresContext* aPresContext,
|
||||
nsIViewManager* aViewManager,
|
||||
nsStyleSet* aStyleSet,
|
||||
nsCompatibility aCompatMode) = 0;
|
||||
|
||||
/**
|
||||
* All callers are responsible for calling |Destroy| after calling
|
||||
|
@ -195,8 +195,8 @@ public:
|
|||
* content model and printing calls |EndObservingDocument| multiple
|
||||
* times to make form controls behave nicely when printed.
|
||||
*/
|
||||
NS_IMETHOD Destroy() = 0;
|
||||
|
||||
virtual NS_HIDDEN_(void) Destroy() = 0;
|
||||
|
||||
PRBool IsDestroying() { return mIsDestroying; }
|
||||
|
||||
// All frames owned by the shell are allocated from an arena. They
|
||||
|
@ -232,7 +232,7 @@ public:
|
|||
virtual void PushStackMemory() = 0;
|
||||
virtual void PopStackMemory() = 0;
|
||||
virtual void* AllocateStackMemory(size_t aSize) = 0;
|
||||
|
||||
|
||||
nsIDocument* GetDocument() const { return mDocument; }
|
||||
|
||||
nsPresContext* GetPresContext() { return mPresContext; }
|
||||
|
@ -288,7 +288,7 @@ public:
|
|||
*
|
||||
* - initially created for bugs 31816, 20760, 22963
|
||||
*/
|
||||
NS_IMETHOD SetPreferenceStyleRules(PRBool aForceReflow) = 0;
|
||||
virtual NS_HIDDEN_(nsresult) SetPreferenceStyleRules(PRBool aForceReflow) = 0;
|
||||
|
||||
/**
|
||||
* FrameSelection will return the Frame based selection API.
|
||||
|
@ -305,10 +305,10 @@ public:
|
|||
|
||||
// Make shell be a document observer. If called after Destroy() has
|
||||
// been called on the shell, this will be ignored.
|
||||
NS_IMETHOD BeginObservingDocument() = 0;
|
||||
virtual NS_HIDDEN_(void) BeginObservingDocument() = 0;
|
||||
|
||||
// Make shell stop being a document observer
|
||||
NS_IMETHOD EndObservingDocument() = 0;
|
||||
virtual NS_HIDDEN_(void) EndObservingDocument() = 0;
|
||||
|
||||
/**
|
||||
* Return whether InitialReflow() was previously called.
|
||||
|
@ -326,18 +326,18 @@ public:
|
|||
* is guaranteed to survive through arbitrary script execution.
|
||||
* Calling InitialReflow can execute arbitrary script.
|
||||
*/
|
||||
NS_IMETHOD InitialReflow(nscoord aWidth, nscoord aHeight) = 0;
|
||||
virtual NS_HIDDEN_(nsresult) InitialReflow(nscoord aWidth, nscoord aHeight) = 0;
|
||||
|
||||
/**
|
||||
* Reflow the frame model into a new width and height. The
|
||||
* coordinates for aWidth and aHeight must be in standard nscoord's.
|
||||
*/
|
||||
NS_IMETHOD ResizeReflow(nscoord aWidth, nscoord aHeight) = 0;
|
||||
virtual NS_HIDDEN_(nsresult) ResizeReflow(nscoord aWidth, nscoord aHeight) = 0;
|
||||
|
||||
/**
|
||||
* Reflow the frame model with a reflow reason of eReflowReason_StyleChange
|
||||
*/
|
||||
NS_IMETHOD StyleChangeReflow() = 0;
|
||||
virtual NS_HIDDEN_(void) StyleChangeReflow() = 0;
|
||||
|
||||
/**
|
||||
* This calls through to the frame manager to get the root frame.
|
||||
|
@ -376,7 +376,7 @@ public:
|
|||
* Returns the page sequence frame associated with the frame hierarchy.
|
||||
* Returns NULL if not a paginated view.
|
||||
*/
|
||||
NS_IMETHOD GetPageSequenceFrame(nsIPageSequenceFrame** aResult) const = 0;
|
||||
virtual NS_HIDDEN_(nsIPageSequenceFrame*) GetPageSequenceFrame() const = 0;
|
||||
|
||||
/**
|
||||
* Gets the real primary frame associated with the content object.
|
||||
|
@ -391,8 +391,7 @@ public:
|
|||
* Gets the placeholder frame associated with the specified frame. This is
|
||||
* a helper frame that forwards the request to the frame manager.
|
||||
*/
|
||||
NS_IMETHOD GetPlaceholderFrameFor(nsIFrame* aFrame,
|
||||
nsIFrame** aPlaceholderFrame) const = 0;
|
||||
virtual NS_HIDDEN_(nsIFrame*) GetPlaceholderFrameFor(nsIFrame* aFrame) const = 0;
|
||||
|
||||
/**
|
||||
* Tell the pres shell that a frame needs to be marked dirty and needs
|
||||
|
@ -407,9 +406,9 @@ public:
|
|||
eTreeChange, // mark intrinsic widths dirty on aFrame and its ancestors
|
||||
eStyleChange // Do eTreeChange, plus all of aFrame's descendants
|
||||
};
|
||||
NS_IMETHOD FrameNeedsReflow(nsIFrame *aFrame,
|
||||
IntrinsicDirty aIntrinsicDirty,
|
||||
nsFrameState aBitToAdd) = 0;
|
||||
virtual NS_HIDDEN_(void) FrameNeedsReflow(nsIFrame *aFrame,
|
||||
IntrinsicDirty aIntrinsicDirty,
|
||||
nsFrameState aBitToAdd) = 0;
|
||||
|
||||
/**
|
||||
* Tell the presshell that the given frame's reflow was interrupted. This
|
||||
|
@ -422,9 +421,9 @@ public:
|
|||
* method doesn't mark any intrinsic widths dirty and doesn't add any bits
|
||||
* other than NS_FRAME_HAS_DIRTY_CHILDREN.
|
||||
*/
|
||||
NS_IMETHOD_(void) FrameNeedsToContinueReflow(nsIFrame *aFrame) = 0;
|
||||
virtual NS_HIDDEN_(void) FrameNeedsToContinueReflow(nsIFrame *aFrame) = 0;
|
||||
|
||||
NS_IMETHOD CancelAllPendingReflows() = 0;
|
||||
virtual NS_HIDDEN_(void) CancelAllPendingReflows() = 0;
|
||||
|
||||
/**
|
||||
* Recreates the frames for a node
|
||||
|
@ -433,13 +432,13 @@ public:
|
|||
|
||||
void PostRecreateFramesFor(nsIContent* aContent);
|
||||
void RestyleForAnimation(nsIContent* aContent);
|
||||
|
||||
|
||||
/**
|
||||
* Determine if it is safe to flush all pending notifications
|
||||
* @param aIsSafeToFlush PR_TRUE if it is safe, PR_FALSE otherwise.
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD IsSafeToFlush(PRBool& aIsSafeToFlush) = 0;
|
||||
virtual NS_HIDDEN_(PRBool) IsSafeToFlush() = 0;
|
||||
|
||||
/**
|
||||
* Flush pending notifications of the type specified. This method
|
||||
|
@ -450,7 +449,7 @@ public:
|
|||
*
|
||||
* @param aType the type of notifications to flush
|
||||
*/
|
||||
NS_IMETHOD FlushPendingNotifications(mozFlushType aType) = 0;
|
||||
virtual NS_HIDDEN_(void) FlushPendingNotifications(mozFlushType aType) = 0;
|
||||
|
||||
/**
|
||||
* Callbacks will be called even if reflow itself fails for
|
||||
|
@ -611,21 +610,18 @@ public:
|
|||
* by the frames. Visual effects may not effect layout, only display.
|
||||
* Takes effect on next repaint, does not force a repaint itself.
|
||||
*
|
||||
* @param aEnabled if PR_TRUE, visual selection effects are enabled
|
||||
* if PR_FALSE visual selection effects are disabled
|
||||
* @return always NS_OK
|
||||
* @param aInEnable if PR_TRUE, visual selection effects are enabled
|
||||
* if PR_FALSE visual selection effects are disabled
|
||||
*/
|
||||
NS_IMETHOD SetSelectionFlags(PRInt16 aInEnable) = 0;
|
||||
|
||||
/**
|
||||
* Gets the current state of non text selection effects
|
||||
* @param aEnabled [OUT] set to the current state of non text selection,
|
||||
* as set by SetDisplayNonTextSelection
|
||||
* @return if aOutEnabled==null, returns NS_ERROR_INVALID_ARG
|
||||
* else NS_OK
|
||||
* @return current state of non text selection,
|
||||
* as set by SetDisplayNonTextSelection
|
||||
*/
|
||||
NS_IMETHOD GetSelectionFlags(PRInt16 *aOutEnabled) = 0;
|
||||
|
||||
virtual NS_HIDDEN_(PRInt16) GetSelectionFlags() = 0;
|
||||
|
||||
virtual nsISelection* GetCurrentSelection(SelectionType aType) = 0;
|
||||
|
||||
/**
|
||||
|
|
|
@ -217,11 +217,7 @@ void
|
|||
nsImageLoader::DoReflow()
|
||||
{
|
||||
nsIPresShell *shell = mFrame->PresContext()->GetPresShell();
|
||||
#ifdef DEBUG
|
||||
nsresult rv =
|
||||
#endif
|
||||
shell->FrameNeedsReflow(mFrame, nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY);
|
||||
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Could not reflow after loading border-image");
|
||||
shell->FrameNeedsReflow(mFrame, nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1229,6 +1229,12 @@ nsLayoutUtils::PaintFrame(nsIRenderingContext* aRenderingContext, nsIFrame* aFra
|
|||
PRUint32 flags = nsDisplayList::PAINT_DEFAULT;
|
||||
if (aFlags & PAINT_WIDGET_LAYERS) {
|
||||
flags |= nsDisplayList::PAINT_USE_WIDGET_LAYERS;
|
||||
nsIWidget *widget = aFrame->GetWindow();
|
||||
PRInt32 pixelRatio = widget->GetDeviceContext()->AppUnitsPerDevPixel();
|
||||
nsIntRegion visibleWindowRegion(visibleRegion.ToOutsidePixels(pixelRatio));
|
||||
nsIntRegion dirtyWindowRegion(aDirtyRegion.ToOutsidePixels(pixelRatio));
|
||||
|
||||
widget->UpdatePossiblyTransparentRegion(dirtyWindowRegion, visibleWindowRegion);
|
||||
}
|
||||
list.Paint(&builder, aRenderingContext, flags);
|
||||
// Flush the list so we don't trigger the IsEmpty-on-destruction assertion
|
||||
|
|
|
@ -1436,6 +1436,20 @@ nsPresContext::GetBidi() const
|
|||
}
|
||||
#endif //IBMBIDI
|
||||
|
||||
PRBool
|
||||
nsPresContext::IsTopLevelWindowInactive()
|
||||
{
|
||||
nsCOMPtr<nsIDocShellTreeItem> treeItem(do_QueryReferent(mContainer));
|
||||
if (!treeItem)
|
||||
return PR_FALSE;
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> rootItem;
|
||||
treeItem->GetRootTreeItem(getter_AddRefs(rootItem));
|
||||
nsCOMPtr<nsPIDOMWindow> domWindow(do_GetInterface(rootItem));
|
||||
|
||||
return domWindow && !domWindow->IsActive();
|
||||
}
|
||||
|
||||
nsITheme*
|
||||
nsPresContext::GetTheme()
|
||||
{
|
||||
|
|
|
@ -757,6 +757,8 @@ public:
|
|||
|
||||
PRBool IsRenderingOnlySelection() const { return mIsRenderingOnlySelection; }
|
||||
|
||||
NS_HIDDEN_(PRBool) IsTopLevelWindowInactive();
|
||||
|
||||
/*
|
||||
* Obtain a native them for rendering our widgets (both form controls and html)
|
||||
*/
|
||||
|
|
|
@ -659,12 +659,12 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIPresShell
|
||||
NS_IMETHOD Init(nsIDocument* aDocument,
|
||||
nsPresContext* aPresContext,
|
||||
nsIViewManager* aViewManager,
|
||||
nsStyleSet* aStyleSet,
|
||||
nsCompatibility aCompatMode);
|
||||
NS_IMETHOD Destroy();
|
||||
virtual NS_HIDDEN_(nsresult) Init(nsIDocument* aDocument,
|
||||
nsPresContext* aPresContext,
|
||||
nsIViewManager* aViewManager,
|
||||
nsStyleSet* aStyleSet,
|
||||
nsCompatibility aCompatMode);
|
||||
virtual NS_HIDDEN_(void) Destroy();
|
||||
|
||||
virtual NS_HIDDEN_(void*) AllocateFrame(nsQueryFrame::FrameIID aCode,
|
||||
size_t aSize);
|
||||
|
@ -679,8 +679,8 @@ public:
|
|||
virtual NS_HIDDEN_(void) PopStackMemory();
|
||||
virtual NS_HIDDEN_(void*) AllocateStackMemory(size_t aSize);
|
||||
|
||||
NS_IMETHOD SetPreferenceStyleRules(PRBool aForceReflow);
|
||||
|
||||
virtual NS_HIDDEN_(nsresult) SetPreferenceStyleRules(PRBool aForceReflow);
|
||||
|
||||
NS_IMETHOD GetSelection(SelectionType aType, nsISelection** aSelection);
|
||||
virtual nsISelection* GetCurrentSelection(SelectionType aType);
|
||||
|
||||
|
@ -689,23 +689,21 @@ public:
|
|||
NS_IMETHOD ScrollSelectionIntoView(SelectionType aType, SelectionRegion aRegion, PRBool aIsSynchronous);
|
||||
NS_IMETHOD RepaintSelection(SelectionType aType);
|
||||
|
||||
NS_IMETHOD BeginObservingDocument();
|
||||
NS_IMETHOD EndObservingDocument();
|
||||
NS_IMETHOD GetDidInitialReflow(PRBool *aDidInitialReflow);
|
||||
NS_IMETHOD InitialReflow(nscoord aWidth, nscoord aHeight);
|
||||
NS_IMETHOD ResizeReflow(nscoord aWidth, nscoord aHeight);
|
||||
NS_IMETHOD StyleChangeReflow();
|
||||
NS_IMETHOD GetPageSequenceFrame(nsIPageSequenceFrame** aResult) const;
|
||||
virtual NS_HIDDEN_(void) BeginObservingDocument();
|
||||
virtual NS_HIDDEN_(void) EndObservingDocument();
|
||||
virtual NS_HIDDEN_(nsresult) InitialReflow(nscoord aWidth, nscoord aHeight);
|
||||
virtual NS_HIDDEN_(nsresult) ResizeReflow(nscoord aWidth, nscoord aHeight);
|
||||
virtual NS_HIDDEN_(void) StyleChangeReflow();
|
||||
virtual NS_HIDDEN_(nsIPageSequenceFrame*) GetPageSequenceFrame() const;
|
||||
virtual NS_HIDDEN_(nsIFrame*) GetRealPrimaryFrameFor(nsIContent* aContent) const;
|
||||
|
||||
NS_IMETHOD GetPlaceholderFrameFor(nsIFrame* aFrame,
|
||||
nsIFrame** aPlaceholderFrame) const;
|
||||
NS_IMETHOD FrameNeedsReflow(nsIFrame *aFrame, IntrinsicDirty aIntrinsicDirty,
|
||||
nsFrameState aBitToAdd);
|
||||
NS_IMETHOD_(void) FrameNeedsToContinueReflow(nsIFrame *aFrame);
|
||||
NS_IMETHOD CancelAllPendingReflows();
|
||||
NS_IMETHOD IsSafeToFlush(PRBool& aIsSafeToFlush);
|
||||
NS_IMETHOD FlushPendingNotifications(mozFlushType aType);
|
||||
virtual NS_HIDDEN_(nsIFrame*) GetPlaceholderFrameFor(nsIFrame* aFrame) const;
|
||||
virtual NS_HIDDEN_(void) FrameNeedsReflow(nsIFrame *aFrame, IntrinsicDirty aIntrinsicDirty,
|
||||
nsFrameState aBitToAdd);
|
||||
virtual NS_HIDDEN_(void) FrameNeedsToContinueReflow(nsIFrame *aFrame);
|
||||
virtual NS_HIDDEN_(void) CancelAllPendingReflows();
|
||||
virtual NS_HIDDEN_(PRBool) IsSafeToFlush();
|
||||
virtual NS_HIDDEN_(void) FlushPendingNotifications(mozFlushType aType);
|
||||
|
||||
/**
|
||||
* Recreates the frames for a node
|
||||
|
@ -825,6 +823,7 @@ public:
|
|||
|
||||
NS_IMETHOD SetSelectionFlags(PRInt16 aInEnable);
|
||||
NS_IMETHOD GetSelectionFlags(PRInt16 *aOutEnable);
|
||||
virtual NS_HIDDEN_(PRInt16) GetSelectionFlags();
|
||||
|
||||
// nsISelectionController
|
||||
|
||||
|
@ -852,6 +851,8 @@ public:
|
|||
nsIContent* aContent1,
|
||||
nsIContent* aContent2,
|
||||
PRInt32 aStateMask);
|
||||
virtual void DocumentStatesChanged(nsIDocument* aDocument,
|
||||
PRInt32 aStateMask);
|
||||
virtual void StyleSheetAdded(nsIDocument* aDocument,
|
||||
nsIStyleSheet* aStyleSheet,
|
||||
PRBool aDocumentSheet);
|
||||
|
@ -1563,7 +1564,7 @@ PresShell::~PresShell()
|
|||
* Initialize the presentation shell. Create view manager and style
|
||||
* manager.
|
||||
*/
|
||||
NS_IMETHODIMP
|
||||
nsresult
|
||||
PresShell::Init(nsIDocument* aDocument,
|
||||
nsPresContext* aPresContext,
|
||||
nsIViewManager* aViewManager,
|
||||
|
@ -1704,10 +1705,19 @@ PresShell::Init(nsIDocument* aDocument,
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_SMIL
|
||||
if (mDocument->HasAnimationController()) {
|
||||
nsSMILAnimationController* animCtrl = mDocument->GetAnimationController();
|
||||
if (!animCtrl->IsPaused()) {
|
||||
animCtrl->StartSampling(GetPresContext()->RefreshDriver());
|
||||
}
|
||||
}
|
||||
#endif // MOZ_SMIL
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
PresShell::Destroy()
|
||||
{
|
||||
NS_ASSERTION(!nsContentUtils::IsSafeToRunScript(),
|
||||
|
@ -1722,7 +1732,7 @@ PresShell::Destroy()
|
|||
#endif
|
||||
|
||||
if (mHaveShutDown)
|
||||
return NS_OK;
|
||||
return;
|
||||
|
||||
MaybeReleaseCapturingContent();
|
||||
|
||||
|
@ -1767,7 +1777,7 @@ PresShell::Destroy()
|
|||
mCaret->Terminate();
|
||||
mCaret = nsnull;
|
||||
}
|
||||
|
||||
|
||||
if (mSelection) {
|
||||
mSelection->DisconnectFromPresShell();
|
||||
}
|
||||
|
@ -1813,10 +1823,15 @@ PresShell::Destroy()
|
|||
mDocument->DeleteShell();
|
||||
}
|
||||
|
||||
nsRefreshDriver* rd = GetPresContext()->RefreshDriver();
|
||||
if (mDocument->HasAnimationController()) {
|
||||
mDocument->GetAnimationController()->StopSampling(rd);
|
||||
}
|
||||
|
||||
// Revoke any pending events. We need to do this and cancel pending reflows
|
||||
// before we destroy the frame manager, since apparently frame destruction
|
||||
// sometimes spins the event queue when plug-ins are involved(!).
|
||||
GetPresContext()->RefreshDriver()->RemoveRefreshObserver(this, Flush_Layout);
|
||||
rd->RemoveRefreshObserver(this, Flush_Layout);
|
||||
mResizeEvent.Revoke();
|
||||
if (mAsyncResizeTimerIsActive) {
|
||||
mAsyncResizeEventTimer->Cancel();
|
||||
|
@ -1862,8 +1877,6 @@ PresShell::Destroy()
|
|||
}
|
||||
|
||||
mHaveShutDown = PR_TRUE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Dynamic stack memory allocation
|
||||
|
@ -1943,7 +1956,7 @@ nsIPresShell::GetAuthorStyleDisabled()
|
|||
return mStyleSet->GetAuthorStyleDisabled();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsresult
|
||||
PresShell::SetPreferenceStyleRules(PRBool aForceReflow)
|
||||
{
|
||||
if (!mDocument) {
|
||||
|
@ -2409,7 +2422,7 @@ PresShell::RepaintSelection(SelectionType aType)
|
|||
}
|
||||
|
||||
// Make shell be a document observer
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
PresShell::BeginObservingDocument()
|
||||
{
|
||||
if (mDocument && !mIsDestroying) {
|
||||
|
@ -2420,11 +2433,10 @@ PresShell::BeginObservingDocument()
|
|||
mIsDocumentGone = PR_FALSE;
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Make shell stop being a document observer
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
PresShell::EndObservingDocument()
|
||||
{
|
||||
// XXXbz do we need to tell the frame constructor that the document
|
||||
|
@ -2433,25 +2445,13 @@ PresShell::EndObservingDocument()
|
|||
if (mDocument) {
|
||||
mDocument->RemoveObserver(this);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_kipp
|
||||
char* nsPresShell_ReflowStackPointerTop;
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
PresShell::GetDidInitialReflow(PRBool *aDidInitialReflow)
|
||||
{
|
||||
if (!aDidInitialReflow)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
*aDidInitialReflow = mDidInitialReflow;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsresult
|
||||
PresShell::InitialReflow(nscoord aWidth, nscoord aHeight)
|
||||
{
|
||||
if (mIsDestroying) {
|
||||
|
@ -2612,7 +2612,7 @@ PresShell::AsyncResizeEventCallback(nsITimer* aTimer, void* aPresShell)
|
|||
static_cast<PresShell*>(aPresShell)->FireResizeEvent();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsresult
|
||||
PresShell::ResizeReflow(nscoord aWidth, nscoord aHeight)
|
||||
{
|
||||
NS_PRECONDITION(!mIsReflowing, "Shouldn't be in reflow here!");
|
||||
|
@ -2875,6 +2875,11 @@ NS_IMETHODIMP PresShell::GetSelectionFlags(PRInt16 *aOutEnable)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
PRInt16 PresShell::GetSelectionFlags()
|
||||
{
|
||||
return mSelectionFlags;
|
||||
}
|
||||
|
||||
//implementation of nsISelectionController
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -3068,16 +3073,16 @@ PresShell::CheckVisibility(nsIDOMNode *node, PRInt16 startOffset, PRInt16 EndOff
|
|||
//end implementations nsISelectionController
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
PresShell::StyleChangeReflow()
|
||||
{
|
||||
nsIFrame* rootFrame = FrameManager()->GetRootFrame();
|
||||
// At the moment at least, we don't have a root frame before the initial
|
||||
// reflow; it's safe to just ignore the request in that case
|
||||
if (!rootFrame)
|
||||
return NS_OK;
|
||||
return;
|
||||
|
||||
return FrameNeedsReflow(rootFrame, eStyleChange, NS_FRAME_IS_DIRTY);
|
||||
FrameNeedsReflow(rootFrame, eStyleChange, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
|
||||
nsIFrame*
|
||||
|
@ -3117,18 +3122,11 @@ nsIPresShell::GetRootScrollFrameAsScrollableExternal() const
|
|||
return GetRootScrollFrameAsScrollable();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PresShell::GetPageSequenceFrame(nsIPageSequenceFrame** aResult) const
|
||||
nsIPageSequenceFrame*
|
||||
PresShell::GetPageSequenceFrame() const
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aResult, "null ptr");
|
||||
if (nsnull == aResult) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
*aResult = nsnull;
|
||||
nsIFrame* frame = mFrameConstructor->GetPageSequenceFrame();
|
||||
*aResult = do_QueryFrame(frame);
|
||||
return *aResult ? NS_OK : NS_ERROR_FAILURE;
|
||||
return do_QueryFrame(frame);
|
||||
}
|
||||
|
||||
nsIFrame*
|
||||
|
@ -3239,7 +3237,7 @@ PresShell::VerifyHasDirtyRootAncestor(nsIFrame* aFrame)
|
|||
}
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
PresShell::FrameNeedsReflow(nsIFrame *aFrame, IntrinsicDirty aIntrinsicDirty,
|
||||
nsFrameState aBitToAdd)
|
||||
{
|
||||
|
@ -3255,17 +3253,16 @@ PresShell::FrameNeedsReflow(nsIFrame *aFrame, IntrinsicDirty aIntrinsicDirty,
|
|||
// If we've not yet done the initial reflow, then don't bother
|
||||
// enqueuing a reflow command yet.
|
||||
if (! mDidInitialReflow)
|
||||
return NS_OK;
|
||||
return;
|
||||
|
||||
// If we're already destroying, don't bother with this either.
|
||||
if (mIsDestroying)
|
||||
return NS_OK;
|
||||
return;
|
||||
|
||||
#ifdef DEBUG
|
||||
//printf("gShellCounter: %d\n", gShellCounter++);
|
||||
if (mInVerifyReflow) {
|
||||
return NS_OK;
|
||||
}
|
||||
if (mInVerifyReflow)
|
||||
return;
|
||||
|
||||
if (VERIFY_REFLOW_NOISY_RC & gVerifyReflowFlags) {
|
||||
printf("\nPresShell@%p: frame %p needs reflow\n", (void*)this, (void*)aFrame);
|
||||
|
@ -3381,11 +3378,9 @@ PresShell::FrameNeedsReflow(nsIFrame *aFrame, IntrinsicDirty aIntrinsicDirty,
|
|||
} while (subtrees.Length() != 0);
|
||||
|
||||
MaybeScheduleReflow();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(void)
|
||||
void
|
||||
PresShell::FrameNeedsToContinueReflow(nsIFrame *aFrame)
|
||||
{
|
||||
NS_ASSERTION(mIsReflowing, "Must be in reflow when marking path dirty.");
|
||||
|
@ -3447,7 +3442,7 @@ nsIPresShell::GetFrameToScrollAsScrollable(
|
|||
return scrollFrame;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
PresShell::CancelAllPendingReflows()
|
||||
{
|
||||
mDirtyRoots.Clear();
|
||||
|
@ -3458,8 +3453,6 @@ PresShell::CancelAllPendingReflows()
|
|||
}
|
||||
|
||||
ASSERT_REFLOW_SCHEDULED_STATE();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
|
@ -4586,36 +4579,35 @@ PresShell::HandlePostedReflowCallbacks(PRBool aInterruptible)
|
|||
FlushPendingNotifications(flushType);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PresShell::IsSafeToFlush(PRBool& aIsSafeToFlush)
|
||||
PRBool
|
||||
PresShell::IsSafeToFlush()
|
||||
{
|
||||
// Not safe if we are reflowing or in the middle of frame construction
|
||||
aIsSafeToFlush = !mIsReflowing &&
|
||||
!mChangeNestCount;
|
||||
PRBool isSafeToFlush = !mIsReflowing &&
|
||||
!mChangeNestCount;
|
||||
|
||||
if (aIsSafeToFlush) {
|
||||
if (isSafeToFlush) {
|
||||
// Not safe if we are painting
|
||||
nsIViewManager* viewManager = GetViewManager();
|
||||
if (viewManager) {
|
||||
PRBool isPainting = PR_FALSE;
|
||||
viewManager->IsPainting(isPainting);
|
||||
if (isPainting) {
|
||||
aIsSafeToFlush = PR_FALSE;
|
||||
isSafeToFlush = PR_FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
return isSafeToFlush;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
PresShell::FlushPendingNotifications(mozFlushType aType)
|
||||
{
|
||||
NS_ASSERTION(aType >= Flush_Frames, "Why did we get called?");
|
||||
|
||||
PRBool isSafeToFlush;
|
||||
IsSafeToFlush(isSafeToFlush);
|
||||
|
||||
PRBool isSafeToFlush = IsSafeToFlush();
|
||||
isSafeToFlush = isSafeToFlush && nsContentUtils::IsSafeToRunScript();
|
||||
|
||||
NS_ASSERTION(!isSafeToFlush || mViewManager, "Must have view manager");
|
||||
|
@ -4629,7 +4621,7 @@ PresShell::FlushPendingNotifications(mozFlushType aType)
|
|||
if (mResizeEvent.IsPending()) {
|
||||
FireResizeEvent();
|
||||
if (mIsDestroying) {
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4714,8 +4706,6 @@ PresShell::FlushPendingNotifications(mozFlushType aType)
|
|||
}
|
||||
batch.EndUpdateViewBatch(updateFlags);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -4781,6 +4771,23 @@ PresShell::ContentStatesChanged(nsIDocument* aDocument,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
PresShell::DocumentStatesChanged(nsIDocument* aDocument,
|
||||
PRInt32 aStateMask)
|
||||
{
|
||||
NS_PRECONDITION(!mIsDocumentGone, "Unexpected DocumentStatesChanged");
|
||||
NS_PRECONDITION(aDocument == mDocument, "Unexpected aDocument");
|
||||
|
||||
if (mDidInitialReflow &&
|
||||
mStyleSet->HasDocumentStateDependentStyle(mPresContext,
|
||||
mDocument->GetRootContent(),
|
||||
aStateMask)) {
|
||||
mFrameConstructor->PostRestyleEvent(mDocument->GetRootContent(),
|
||||
eReStyle_Self, NS_STYLE_HINT_NONE);
|
||||
VERIFY_STYLE_TREE;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
PresShell::AttributeWillChange(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
|
@ -5039,12 +5046,10 @@ PresShell::GetRealPrimaryFrameFor(nsIContent* aContent) const
|
|||
return nsPlaceholderFrame::GetRealFrameFor(primaryFrame);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PresShell::GetPlaceholderFrameFor(nsIFrame* aFrame,
|
||||
nsIFrame** aResult) const
|
||||
nsIFrame*
|
||||
PresShell::GetPlaceholderFrameFor(nsIFrame* aFrame) const
|
||||
{
|
||||
*aResult = FrameManager()->GetPlaceholderFrameFor(aFrame);
|
||||
return NS_OK;
|
||||
return FrameManager()->GetPlaceholderFrameFor(aFrame);
|
||||
}
|
||||
|
||||
//nsIViewObserver
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<html style="display: inline-table;"><body style="margin: 381500067712% 0pt;">T<div><span style="font-size: 4611686018427388000in;"><hr></span><span style="float: left;">P</span>,</div><div style="min-height: 197678in;"></div><span style="float: left;"></span></body></html>
|
|
@ -241,6 +241,7 @@ load 455171-3.html
|
|||
load 455643-1.xhtml
|
||||
load 457375.html
|
||||
load 457380-1.html
|
||||
load 461294-1.html
|
||||
load 463350-1.html
|
||||
load 463350-2.html
|
||||
load 463350-3.html
|
||||
|
|
|
@ -82,9 +82,11 @@ nsAbsoluteContainingBlock::AppendFrames(nsIFrame* aDelegatingFrame,
|
|||
|
||||
// no damage to intrinsic widths, since absolutely positioned frames can't
|
||||
// change them
|
||||
return aDelegatingFrame->PresContext()->PresShell()->
|
||||
aDelegatingFrame->PresContext()->PresShell()->
|
||||
FrameNeedsReflow(aDelegatingFrame, nsIPresShell::eResize,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -104,9 +106,11 @@ nsAbsoluteContainingBlock::InsertFrames(nsIFrame* aDelegatingFrame,
|
|||
|
||||
// no damage to intrinsic widths, since absolutely positioned frames can't
|
||||
// change them
|
||||
return aDelegatingFrame->PresContext()->PresShell()->
|
||||
aDelegatingFrame->PresContext()->PresShell()->
|
||||
FrameNeedsReflow(aDelegatingFrame, nsIPresShell::eResize,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -123,7 +123,7 @@ nsCanvasFrame::SetHasFocus(PRBool aHasFocus)
|
|||
|
||||
NS_IMETHODIMP
|
||||
nsCanvasFrame::SetInitialChildList(nsIAtom* aListName,
|
||||
nsFrameList& aChildList)
|
||||
nsFrameList& aChildList)
|
||||
{
|
||||
if (nsGkAtoms::absoluteList == aListName)
|
||||
return mAbsoluteContainer.SetInitialChildList(this, aListName, aChildList);
|
||||
|
@ -135,10 +135,8 @@ nsCanvasFrame::SetInitialChildList(nsIAtom* aListName,
|
|||
|
||||
NS_IMETHODIMP
|
||||
nsCanvasFrame::AppendFrames(nsIAtom* aListName,
|
||||
nsFrameList& aFrameList)
|
||||
nsFrameList& aFrameList)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
if (nsGkAtoms::absoluteList == aListName)
|
||||
return mAbsoluteContainer.AppendFrames(this, aListName, aFrameList);
|
||||
|
||||
|
@ -146,57 +144,50 @@ nsCanvasFrame::AppendFrames(nsIAtom* aListName,
|
|||
NS_PRECONDITION(mFrames.IsEmpty(), "already have a child frame");
|
||||
if (aListName) {
|
||||
// We only support unnamed principal child list
|
||||
rv = NS_ERROR_INVALID_ARG;
|
||||
|
||||
} else if (!mFrames.IsEmpty()) {
|
||||
// We only allow a single child frame
|
||||
rv = NS_ERROR_FAILURE;
|
||||
|
||||
} else {
|
||||
// Insert the new frames
|
||||
NS_ASSERTION(aFrameList.FirstChild() == aFrameList.LastChild(),
|
||||
"Only one principal child frame allowed");
|
||||
#ifdef NS_DEBUG
|
||||
nsFrame::VerifyDirtyBitSet(aFrameList);
|
||||
#endif
|
||||
mFrames.AppendFrames(nsnull, aFrameList);
|
||||
|
||||
rv = PresContext()->PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
return rv;
|
||||
if (!mFrames.IsEmpty()) {
|
||||
// We only allow a single child frame
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
// Insert the new frames
|
||||
NS_ASSERTION(aFrameList.FirstChild() == aFrameList.LastChild(),
|
||||
"Only one principal child frame allowed");
|
||||
#ifdef NS_DEBUG
|
||||
nsFrame::VerifyDirtyBitSet(aFrameList);
|
||||
#endif
|
||||
mFrames.AppendFrames(nsnull, aFrameList);
|
||||
|
||||
PresContext()->PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCanvasFrame::InsertFrames(nsIAtom* aListName,
|
||||
nsIFrame* aPrevFrame,
|
||||
nsFrameList& aFrameList)
|
||||
nsIFrame* aPrevFrame,
|
||||
nsFrameList& aFrameList)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
if (nsGkAtoms::absoluteList == aListName)
|
||||
return mAbsoluteContainer.InsertFrames(this, aListName, aPrevFrame, aFrameList);
|
||||
|
||||
// Because we only support a single child frame inserting is the same
|
||||
// as appending
|
||||
NS_PRECONDITION(!aPrevFrame, "unexpected previous sibling frame");
|
||||
if (aPrevFrame) {
|
||||
rv = NS_ERROR_UNEXPECTED;
|
||||
} else {
|
||||
rv = AppendFrames(aListName, aFrameList);
|
||||
}
|
||||
if (aPrevFrame)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
return rv;
|
||||
return AppendFrames(aListName, aFrameList);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCanvasFrame::RemoveFrame(nsIAtom* aListName,
|
||||
nsIFrame* aOldFrame)
|
||||
nsIFrame* aOldFrame)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
if (nsGkAtoms::absoluteList == aListName) {
|
||||
mAbsoluteContainer.RemoveFrame(this, aListName, aOldFrame);
|
||||
return NS_OK;
|
||||
|
@ -205,26 +196,25 @@ nsCanvasFrame::RemoveFrame(nsIAtom* aListName,
|
|||
NS_ASSERTION(!aListName, "unexpected child list name");
|
||||
if (aListName) {
|
||||
// We only support the unnamed principal child list
|
||||
rv = NS_ERROR_INVALID_ARG;
|
||||
|
||||
} else if (aOldFrame == mFrames.FirstChild()) {
|
||||
// It's our one and only child frame
|
||||
// Damage the area occupied by the deleted frame
|
||||
// The child of the canvas probably can't have an outline, but why bother
|
||||
// thinking about that?
|
||||
Invalidate(aOldFrame->GetOverflowRect() + aOldFrame->GetPosition());
|
||||
|
||||
// Remove the frame and destroy it
|
||||
mFrames.DestroyFrame(aOldFrame);
|
||||
|
||||
rv = PresContext()->PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
} else {
|
||||
rv = NS_ERROR_FAILURE;
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
return rv;
|
||||
if (aOldFrame != mFrames.FirstChild())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// It's our one and only child frame
|
||||
// Damage the area occupied by the deleted frame
|
||||
// The child of the canvas probably can't have an outline, but why bother
|
||||
// thinking about that?
|
||||
Invalidate(aOldFrame->GetOverflowRect() + aOldFrame->GetPosition());
|
||||
|
||||
// Remove the frame and destroy it
|
||||
mFrames.DestroyFrame(aOldFrame);
|
||||
|
||||
PresContext()->PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
|
@ -321,8 +311,8 @@ public:
|
|||
|
||||
NS_IMETHODIMP
|
||||
nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
|
|
|
@ -908,10 +908,7 @@ nsFrame::DisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
|
|||
if (!shell)
|
||||
return NS_OK;
|
||||
|
||||
PRInt16 displaySelection;
|
||||
nsresult rv = shell->GetSelectionFlags(&displaySelection);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
PRInt16 displaySelection = shell->GetSelectionFlags();
|
||||
if (!(displaySelection & aContentType))
|
||||
return NS_OK;
|
||||
|
||||
|
@ -1703,10 +1700,7 @@ nsFrame::GetDataForTableSelection(const nsFrameSelection *aFrameSelection,
|
|||
*aContentOffset = 0;
|
||||
*aTarget = 0;
|
||||
|
||||
PRInt16 displaySelection;
|
||||
nsresult result = aPresShell->GetSelectionFlags(&displaySelection);
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
PRInt16 displaySelection = aPresShell->GetSelectionFlags();
|
||||
|
||||
PRBool selectingTableCells = aFrameSelection->GetTableCellSelection();
|
||||
|
||||
|
@ -1748,9 +1742,7 @@ nsFrame::GetDataForTableSelection(const nsFrameSelection *aFrameSelection,
|
|||
//PRBool selectColumn = PR_FALSE;
|
||||
//PRBool selectRow = PR_FALSE;
|
||||
|
||||
result = NS_OK;
|
||||
|
||||
while (frame && NS_SUCCEEDED(result))
|
||||
while (frame)
|
||||
{
|
||||
// Check for a table cell by querying to a known CellFrame interface
|
||||
nsITableCellLayout *cellElement = do_QueryFrame(frame);
|
||||
|
@ -1775,7 +1767,6 @@ nsFrame::GetDataForTableSelection(const nsFrameSelection *aFrameSelection,
|
|||
break;
|
||||
} else {
|
||||
frame = frame->GetParent();
|
||||
result = NS_OK;
|
||||
// Stop if we have hit the selection's limiting content node
|
||||
if (frame && frame->GetContent() == limiter)
|
||||
break;
|
||||
|
@ -1910,9 +1901,8 @@ nsFrame::HandlePress(nsPresContext* aPresContext,
|
|||
// if we are in Navigator and the click is in a draggable node, we don't want
|
||||
// to start selection because we don't want to interfere with a potential
|
||||
// drag of said node and steal all its glory.
|
||||
PRInt16 isEditor = 0;
|
||||
shell->GetSelectionFlags ( &isEditor );
|
||||
//weaaak. only the editor can display frame selction not just text and images
|
||||
PRInt16 isEditor = shell->GetSelectionFlags();
|
||||
//weaaak. only the editor can display frame selection not just text and images
|
||||
isEditor = isEditor == nsISelectionDisplay::DISPLAY_ALL;
|
||||
|
||||
nsInputEvent* keyEvent = (nsInputEvent*)aEvent;
|
||||
|
@ -4683,13 +4673,12 @@ nsFrame::GetNextPrevLineFromeBlockFrame(nsPresContext* aPresContext,
|
|||
|
||||
//special check. if we allow non-text selection then we can allow a hit location to fall before a table.
|
||||
//otherwise there is no way to get and click signal to fall before a table (it being a line iterator itself)
|
||||
PRInt16 isEditor = 0;
|
||||
nsIPresShell *shell = aPresContext->GetPresShell();
|
||||
if (!shell)
|
||||
return NS_ERROR_FAILURE;
|
||||
shell->GetSelectionFlags ( &isEditor );
|
||||
PRInt16 isEditor = shell->GetSelectionFlags();
|
||||
isEditor = isEditor == nsISelectionDisplay::DISPLAY_ALL;
|
||||
if ( isEditor )
|
||||
if ( isEditor )
|
||||
{
|
||||
if (resultFrame->GetType() == nsGkAtoms::tableOuterFrame)
|
||||
{
|
||||
|
|
|
@ -1152,8 +1152,7 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsPresContext* aPresContext,
|
|||
// Get the placeholder frame
|
||||
nsIFrame* placeholderFrame;
|
||||
|
||||
aPresContext->PresShell()->GetPlaceholderFrameFor(outOfFlow,
|
||||
&placeholderFrame);
|
||||
placeholderFrame = aPresContext->PresShell()->GetPlaceholderFrameFor(outOfFlow);
|
||||
NS_ASSERTION(nsnull != placeholderFrame, "no placeholder frame");
|
||||
|
||||
// If both 'left' and 'right' are 'auto' or both 'top' and 'bottom' are
|
||||
|
|
|
@ -1258,12 +1258,9 @@ nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
|
||||
// XXX what on EARTH is this code for?
|
||||
PRInt16 displaySelection = 0;
|
||||
nsresult result;
|
||||
nsPresContext* presContext = PresContext();
|
||||
result = presContext->PresShell()->GetSelectionFlags(&displaySelection);
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
PRInt16 displaySelection = presContext->PresShell()->GetSelectionFlags();
|
||||
if (!(displaySelection & nsISelectionDisplay::DISPLAY_IMAGES))
|
||||
return NS_OK;//no need to check the blue border, we cannot be drawn selected
|
||||
//insert hook here for image selection drawing
|
||||
|
|
|
@ -1828,10 +1828,7 @@ nsFrameSelection::TakeFocus(nsIContent *aNewFocus,
|
|||
// BUT only do this in an editor
|
||||
|
||||
NS_ENSURE_STATE(mShell);
|
||||
PRInt16 displaySelection;
|
||||
nsresult result = mShell->GetSelectionFlags(&displaySelection);
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
PRInt16 displaySelection = mShell->GetSelectionFlags();
|
||||
|
||||
// Editor has DISPLAY_ALL selection type
|
||||
if (displaySelection == nsISelectionDisplay::DISPLAY_ALL)
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче