Merge mozilla-central into electrolysis.

This commit is contained in:
Benjamin Smedberg 2009-12-14 08:01:18 -05:00
commit a54e6acfd8
297 changed files with 16526 additions and 4331 deletions

View File

@ -285,7 +285,7 @@ nsIntRect nsHyperTextAccessible::GetBoundsForString(nsIFrame *aFrame, PRUint32 a
frame->GetOffsets(startFrameTextOffset, endFrameTextOffset);
PRInt32 frameTotalTextLength = endFrameTextOffset - startFrameTextOffset;
PRInt32 seekLength = endContentOffset - startContentOffset;
PRInt32 frameSubStringLength = PR_MIN(frameTotalTextLength - startContentOffsetInFrame, seekLength);
PRInt32 frameSubStringLength = NS_MIN(frameTotalTextLength - startContentOffsetInFrame, seekLength);
// Add the point where the string starts to the frameScreenRect
nsPoint frameTextStartPoint;

View File

@ -494,13 +494,13 @@
<menu id="historyUndoMenu"
label="&historyUndoMenu.label;"
disabled="true">
<menupopup id="historyUndoPopup"
<menupopup id="historyUndoPopup" placespopup="true"
onpopupshowing="HistoryMenu.populateUndoSubmenu();"/>
</menu>
<menu id="historyUndoWindowMenu"
label="&historyUndoWindowMenu.label;"
disabled="true">
<menupopup id="historyUndoWindowPopup"
<menupopup id="historyUndoWindowPopup" placespopup="true"
onpopupshowing="HistoryMenu.populateUndoWindowSubmenu();"/>
</menu>
</menupopup>

View File

@ -637,6 +637,14 @@ var HistoryMenu = {
m.setAttribute("class", "menuitem-iconic bookmark-item");
m.setAttribute("value", i);
m.setAttribute("oncommand", "undoCloseTab(" + i + ");");
// Set the targetURI attribute so it will be shown in tooltip and statusbar.
// SessionStore uses one-based indexes, so we need to normalize them.
let tabData = undoItems[i].state;
let activeIndex = (tabData.index || tabData.entries.length) - 1;
if (activeIndex >= 0 && tabData.entries[activeIndex])
m.setAttribute("targetURI", tabData.entries[activeIndex].url);
m.addEventListener("click", this._undoCloseMiddleClick, false);
if (i == 0)
m.setAttribute("key", "key_undoCloseTab");
@ -710,6 +718,13 @@ var HistoryMenu = {
}
m.setAttribute("class", "menuitem-iconic bookmark-item");
m.setAttribute("oncommand", "undoCloseWindow(" + i + ");");
// Set the targetURI attribute so it will be shown in tooltip and statusbar.
// SessionStore uses one-based indexes, so we need to normalize them.
let activeIndex = (selectedTab.index || selectedTab.entries.length) - 1;
if (activeIndex >= 0 && selectedTab.entries[activeIndex])
m.setAttribute("targetURI", selectedTab.entries[activeIndex].url);
if (i == 0)
m.setAttribute("key", "key_undoCloseWindow");
undoPopup.appendChild(m);

View File

@ -264,13 +264,7 @@ var ctrlTab = {
if (aPreview == this.showAllButton)
return;
if ((aPreview._tab || null) != aTab) {
if (aPreview._tab)
aPreview._tab.removeEventListener("DOMAttrModified", this, false);
aPreview._tab = aTab;
if (aTab)
aTab.addEventListener("DOMAttrModified", this, false);
}
aPreview._tab = aTab;
if (aPreview.firstChild)
aPreview.removeChild(aPreview.firstChild);
@ -505,8 +499,8 @@ var ctrlTab = {
handleEvent: function ctrlTab_handleEvent(event) {
switch (event.type) {
case "DOMAttrModified":
// tab attribute modified (e.g. label, crop, busy, image)
case "TabAttrModified":
// tab attribute modified (e.g. label, crop, busy, image, selected)
for (let i = this.previews.length - 1; i >= 0; i--) {
if (this.previews[i]._tab && this.previews[i]._tab == event.target) {
this.updatePreview(this.previews[i], event.target);
@ -541,6 +535,7 @@ var ctrlTab = {
var tabContainer = gBrowser.tabContainer;
tabContainer[toggleEventListener]("TabOpen", this, false);
tabContainer[toggleEventListener]("TabAttrModified", this, false);
tabContainer[toggleEventListener]("TabSelect", this, false);
tabContainer[toggleEventListener]("TabClose", this, false);
@ -590,6 +585,7 @@ var allTabs = {
}, this);
gBrowser.tabContainer.addEventListener("TabOpen", this, false);
gBrowser.tabContainer.addEventListener("TabAttrModified", this, false);
gBrowser.tabContainer.addEventListener("TabMove", this, false);
gBrowser.tabContainer.addEventListener("TabClose", this, false);
},
@ -599,6 +595,7 @@ var allTabs = {
return;
gBrowser.tabContainer.removeEventListener("TabOpen", this, false);
gBrowser.tabContainer.removeEventListener("TabAttrModified", this, false);
gBrowser.tabContainer.removeEventListener("TabMove", this, false);
gBrowser.tabContainer.removeEventListener("TabClose", this, false);
@ -661,13 +658,11 @@ var allTabs = {
}
if (matches < filter.length) {
preview.hidden = true;
tab.removeEventListener("DOMAttrModified", this, false);
}
else {
this._visible++;
this._updatePreview(preview);
preview.hidden = false;
tab.addEventListener("DOMAttrModified", this, false);
}
}, this);
@ -705,10 +700,6 @@ var allTabs = {
},
suspendGUI: function allTabs_suspendGUI() {
Array.forEach(this.container.childNodes, function (preview) {
preview._tab.removeEventListener("DOMAttrModified", this, false);
}, this);
this.filterField.removeAttribute("emptytext");
this.filterField.value = "";
this._currentFilter = null;
@ -722,9 +713,11 @@ var allTabs = {
handleEvent: function allTabs_handleEvent(event) {
switch (event.type) {
case "DOMAttrModified":
case "TabAttrModified":
// tab attribute modified (e.g. label, crop, busy, image)
this._updatePreview(this._getPreview(event.target));
let preview = this._getPreview(event.target);
if (!preview.hidden)
this._updatePreview(preview);
break;
case "TabOpen":
if (this.isOpen)
@ -832,7 +825,6 @@ var allTabs = {
_removePreview: function allTabs_removePreview(aPreview) {
var updateUI = (this.isOpen && !aPreview.hidden);
aPreview._tab.removeEventListener("DOMAttrModified", this, false);
aPreview._tab = null;
this.container.removeChild(aPreview);
if (updateUI) {

View File

@ -1299,14 +1299,12 @@ function delayedStartup(isLoadingBlank, mustLoadSidebar) {
NP.trackBrowserWindow(window);
// initialize the session-restore service (in case it's not already running)
if (document.documentElement.getAttribute("windowtype") == "navigator:browser") {
try {
var ss = Cc["@mozilla.org/browser/sessionstore;1"].
getService(Ci.nsISessionStore);
ss.init(window);
} catch(ex) {
dump("nsSessionStore could not be initialized: " + ex + "\n");
}
try {
Cc["@mozilla.org/browser/sessionstore;1"]
.getService(Ci.nsISessionStore)
.init(window);
} catch (ex) {
dump("nsSessionStore could not be initialized: " + ex + "\n");
}
// bookmark-all-tabs command

View File

@ -147,7 +147,7 @@ nsContextMenu.prototype = {
// Time to do some bad things and see if we've highlighted a URL that
// isn't actually linked.
var onPlainTextLink = false;
if (this.isTextSelected) {
if (this.isTextSelected && !this.onLink) {
// Ok, we have some text, let's figure out if it looks like a URL.
let selection = document.commandDispatcher.focusedWindow
.getSelection();

View File

@ -731,6 +731,7 @@
aTab.setAttribute("image", browser.mIconURL);
else
aTab.removeAttribute("image");
this._tabAttrModified(aTab);
]]>
</body>
</method>
@ -866,9 +867,11 @@
if (this.mCurrentBrowser == newBrowser && !aForceUpdate)
return;
var oldTab = this.mCurrentTab;
// Preview mode should not reset the owner
if (!this._previewMode && this.mCurrentTab != this.selectedTab)
this.mCurrentTab.owner = null;
if (!this._previewMode && oldTab != this.selectedTab)
oldTab.owner = null;
this._lastRelatedTab = null;
@ -966,6 +969,9 @@
event.initEvent("TabSelect", true, false);
this.mCurrentTab.dispatchEvent(event);
this._tabAttrModified(oldTab);
this._tabAttrModified(this.mCurrentTab);
// Change focus to the new browser unless the findbar is focused.
if (gFindBar.hidden ||
gFindBar.getElement("findbar-textbox").getAttribute("focused") != "true")
@ -975,6 +981,17 @@
</body>
</method>
<method name="_tabAttrModified">
<parameter name="aTab"/>
<body><![CDATA[
// This event should be dispatched when any of these attributes change:
// label, crop, busy, image, selected
var event = document.createEvent("Events");
event.initEvent("TabAttrModified", true, false);
aTab.dispatchEvent(event);
]]></body>
</method>
<method name="onTabClick">
<parameter name="event"/>
<body>
@ -1015,6 +1032,7 @@
<![CDATA[
aTab.label = this.mStringBundle.getString("tabs.loading");
aTab.setAttribute("crop", "end");
this._tabAttrModified(aTab);
]]>
</body>
</method>
@ -1055,6 +1073,7 @@
aTab.label = title;
aTab.setAttribute("crop", crop);
this._tabAttrModified(aTab);
]]>
</body>
</method>
@ -1724,6 +1743,7 @@
var isBusy = aOtherTab.hasAttribute("busy");
if (isBusy) {
aOurTab.setAttribute("busy", "true");
this._tabAttrModified(aOurTab);
if (aOurTab == this.selectedTab)
this.mIsBusy = true;
}
@ -3264,7 +3284,6 @@
<implementation implements="nsIDOMEventListener">
<method name="_menuItemOnCommand">
<parameter name="aEvent"/>
<body><![CDATA[
var tabcontainer = document.getBindingParent(this);
tabcontainer.selectedItem = aEvent.target.tab;
@ -3274,27 +3293,13 @@
<method name="_tabOnAttrModified">
<parameter name="aEvent"/>
<body><![CDATA[
var menuItem = aEvent.target.mCorrespondingMenuitem;
if (menuItem) {
var attrName = aEvent.attrName;
switch (attrName) {
case "label":
case "crop":
case "busy":
case "image":
case "selected":
if (aEvent.attrChange == aEvent.REMOVAL)
menuItem.removeAttribute(attrName);
else
menuItem.setAttribute(attrName, aEvent.newValue);
}
}
var tab = aEvent.target;
this._setMenuitemAttributes(tab.mCorrespondingMenuitem, tab);
]]></body>
</method>
<method name="_tabOnTabClose">
<parameter name="aEvent"/>
<body><![CDATA[
var menuItem = aEvent.target.mCorrespondingMenuitem;
if (menuItem)
@ -3312,7 +3317,7 @@
case "command":
this._menuItemOnCommand(aEvent);
break;
case "DOMAttrModified":
case "TabAttrModified":
this._tabOnAttrModified(aEvent);
break;
case "TabClose":
@ -3345,7 +3350,6 @@
this.childNodes[i].removeAttribute("tabIsVisible");
}
]]></body>
</method>
<method name="_createTabMenuItem">
@ -3357,20 +3361,11 @@
menuItem.setAttribute("class", "menuitem-iconic alltabs-item");
menuItem.setAttribute("label", aTab.label);
menuItem.setAttribute("crop", aTab.getAttribute("crop"));
menuItem.setAttribute("image", aTab.getAttribute("image"));
if (aTab.hasAttribute("busy"))
menuItem.setAttribute("busy", aTab.getAttribute("busy"));
if (aTab.selected)
menuItem.setAttribute("selected", "true");
this._setMenuitemAttributes(menuItem, aTab);
// Keep some attributes of the menuitem in sync with its
// corresponding tab (e.g. the tab label)
aTab.mCorrespondingMenuitem = menuItem;
aTab.addEventListener("DOMAttrModified", this, false);
aTab.addEventListener("TabClose", this, false);
menuItem.tab = aTab;
menuItem.addEventListener("command", this, false);
@ -3378,11 +3373,30 @@
return menuItem;
]]></body>
</method>
<method name="_setMenuitemAttributes">
<parameter name="aMenuitem"/>
<parameter name="aTab"/>
<body><![CDATA[
aMenuitem.setAttribute("label", aTab.label);
aMenuitem.setAttribute("crop", aTab.getAttribute("crop"));
aMenuitem.setAttribute("image", aTab.getAttribute("image"));
if (aTab.hasAttribute("busy"))
aMenuitem.setAttribute("busy", aTab.getAttribute("busy"));
else
aMenuitem.removeAttribute("busy");
if (aTab.selected)
aMenuitem.setAttribute("selected", "true");
else
aMenuitem.removeAttribute("selected");
]]></body>
</method>
</implementation>
<handlers>
<handler event="popupshowing">
<![CDATA[
// set up the menu popup
var tabcontainer = document.getBindingParent(this);
@ -3390,6 +3404,8 @@
// Listen for changes in the tab bar.
tabcontainer.addEventListener("TabOpen", this, false);
tabcontainer.addEventListener("TabAttrModified", this, false);
tabcontainer.addEventListener("TabClose", this, false);
tabcontainer.mTabstrip.addEventListener("scroll", this, false);
for (var i = 0; i < tabs.length; i++) {
@ -3404,14 +3420,14 @@
while (this.hasChildNodes()) {
var menuItem = this.lastChild;
menuItem.removeEventListener("command", this, false);
menuItem.tab.removeEventListener("DOMAttrModified", this, false);
menuItem.tab.removeEventListener("TabClose", this, false);
menuItem.tab.mCorrespondingMenuitem = null;
this.removeChild(menuItem);
}
var tabcontainer = document.getBindingParent(this);
tabcontainer.mTabstrip.removeEventListener("scroll", this, false);
tabcontainer.removeEventListener("TabOpen", this, false);
tabcontainer.removeEventListener("TabAttrModified", this, false);
tabcontainer.removeEventListener("TabClose", this, false);
]]></handler>
<handler event="DOMMenuItemActive">

View File

@ -6,21 +6,23 @@ function setSelection(el1, el2, index1, index2) {
selection.addRange(range);
}
function initContextMenu() {
document.popupNode = doc.getElementsByTagName("DIV")[0];
function initContextMenu(aNode) {
document.popupNode = aNode;
let contentAreaContextMenu = document.getElementById("contentAreaContextMenu");
let contextMenu = new nsContextMenu(contentAreaContextMenu, gBrowser);
return contextMenu;
}
function testExpected(expected, msg) {
initContextMenu();
function testExpected(expected, msg, aNode) {
let popupNode = aNode || doc.getElementsByTagName("DIV")[0];
initContextMenu(popupNode);
let linkMenuItem = document.getElementById("context-openlinkincurrent");
is(linkMenuItem.hidden, expected, msg);
}
function testLinkExpected(expected, msg) {
let contextMenu = initContextMenu();
function testLinkExpected(expected, msg, aNode) {
let popupNode = aNode || doc.getElementsByTagName("DIV")[0];
let contextMenu = initContextMenu(popupNode);
is(contextMenu.linkURL, expected, msg);
}
@ -31,16 +33,19 @@ function runSelectionTests() {
let span1 = doc.createElement("span");
let span2 = doc.createElement("span");
let span3 = doc.createElement("span");
let span4 = doc.createElement("span");
let p1 = doc.createElement("p");
let p2 = doc.createElement("p");
span1.textContent = "http://index.";
span2.textContent = "example.com example.com";
span3.textContent = " - Test";
span4.innerHTML = "<a href='http://www.example.com'>http://www.example.com/example</a>";
p1.textContent = "mailto:test.com ftp.example.com";
p2.textContent = "example.com -";
div.appendChild(span1);
div.appendChild(span2);
div.appendChild(span3);
div.appendChild(span4);
div.appendChild(p1);
div.appendChild(p2);
let p3 = doc.createElement("p");
@ -75,6 +80,8 @@ function runSelectionTests() {
testExpected(false, "Link options should show for www.example.com ");
selection.selectAllChildren(div2);
testExpected(false, "Link options should show for triple-click selections");
selection.selectAllChildren(span4);
testLinkExpected("http://www.example.com/", "Linkified text should open the correct link", span4.firstChild);
gBrowser.removeCurrentTab();
finish();
}

View File

@ -1201,8 +1201,16 @@ GeolocationPrompt.prototype = {
},
}];
var message = browserBundle.formatStringFromName("geolocation.siteWantsToKnow",
[request.requestingURI.host], 1);
var message;
// Different message/info if it is a local file
if (request.requestingURI.schemeIs("file")) {
message = browserBundle.formatStringFromName("geolocation.fileWantsToKnow",
[request.requestingURI.path], 1);
} else {
message = browserBundle.formatStringFromName("geolocation.siteWantsToKnow",
[request.requestingURI.host], 1);
}
var newBar = notificationBox.appendNotification(message,
"geolocation",
@ -1220,7 +1228,14 @@ GeolocationPrompt.prototype = {
var inPrivateBrowsing = Cc["@mozilla.org/privatebrowsing;1"].
getService(Ci.nsIPrivateBrowsingService).
privateBrowsingEnabled;
if (!inPrivateBrowsing) {
// don't show "Remember for this site" checkbox for file:
var host;
try {
host = request.requestingURI.host;
} catch (ex) {}
if (!inPrivateBrowsing && host) {
var checkbox = newBar.ownerDocument.createElementNS(XULNS, "checkbox");
checkbox.className = "rememberChoice";
checkbox.setAttribute("label", browserBundle.GetStringFromName("geolocation.remember"));

View File

@ -38,6 +38,10 @@
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
#ifndef XP_WIN
#define BROKEN_WM_Z_ORDER
#endif
////////////////////////////////////////////////////////////////////////////////
//// Utilities
@ -328,9 +332,37 @@ PrivateBrowsingService.prototype = {
},
_getBrowserWindow: function PBS__getBrowserWindow() {
return Cc["@mozilla.org/appshell/window-mediator;1"].
getService(Ci.nsIWindowMediator).
getMostRecentWindow("navigator:browser");
var wm = Cc["@mozilla.org/appshell/window-mediator;1"].
getService(Ci.nsIWindowMediator);
var win = wm.getMostRecentWindow("navigator:browser");
// We don't just return |win| now because of bug 528706.
if (!win)
return null;
if (!win.closed)
return win;
#ifdef BROKEN_WM_Z_ORDER
win = null;
var windowsEnum = wm.getEnumerator("navigator:browser");
// this is oldest to newest, so this gets a bit ugly
while (windowsEnum.hasMoreElements()) {
let nextWin = windowsEnum.getNext();
if (!nextWin.closed)
win = nextWin;
}
return win;
#else
var windowsEnum = wm.getZOrderDOMWindowEnumerator("navigator:browser", true);
while (windowsEnum.hasMoreElements()) {
win = windowsEnum.getNext();
if (!win.closed)
return win;
}
return null;
#endif
},
_ensureCanCloseWindows: function PBS__ensureCanCloseWindows() {
@ -345,12 +377,19 @@ PrivateBrowsingService.prototype = {
let windowMediator = Cc["@mozilla.org/appshell/window-mediator;1"].
getService(Ci.nsIWindowMediator);
let windowsEnum = windowMediator.getXULWindowEnumerator("navigator:browser");
let windowsEnum = windowMediator.getEnumerator("navigator:browser");
while (windowsEnum.hasMoreElements()) {
let win = windowsEnum.getNext().QueryInterface(Ci.nsIXULWindow);
if (win.docShell.contentViewer.permitUnload(true))
this._windowsToClose.push(win);
let win = windowsEnum.getNext();
if (win.closed)
continue;
let xulWin = win.QueryInterface(Ci.nsIInterfaceRequestor).
getInterface(Ci.nsIWebNavigation).
QueryInterface(Ci.nsIDocShellTreeItem).
treeOwner.QueryInterface(Ci.nsIInterfaceRequestor).
getInterface(Ci.nsIXULWindow);
if (xulWin.docShell.contentViewer.permitUnload(true))
this._windowsToClose.push(xulWin);
else
throw Cr.NS_ERROR_ABORT;
}

View File

@ -186,9 +186,6 @@ SessionStoreService.prototype = {
// whether we clearing history on shutdown
_clearingOnShutdown: false,
// List of windows that are being closed during setBrowserState.
_closingWindows: [],
#ifndef XP_MACOSX
// whether the last window was closed and should be restored
_restoreLastWindow: false,
@ -340,17 +337,9 @@ SessionStoreService.prototype = {
aSubject.addEventListener("load", function(aEvent) {
aEvent.currentTarget.removeEventListener("load", arguments.callee, false);
_this.onLoad(aEvent.currentTarget);
}, false);
}, false);
break;
case "domwindowclosed": // catch closed windows
if (this._closingWindows.length > 0) {
let index = this._closingWindows.indexOf(aSubject);
if (index != -1) {
this._closingWindows.splice(index, 1);
if (this._closingWindows.length == 0)
this._sendRestoreCompletedNotifications(true);
}
}
this.onClose(aSubject);
break;
case "quit-application-requested":
@ -901,6 +890,8 @@ SessionStoreService.prototype = {
},
setBrowserState: function sss_setBrowserState(aState) {
this._handleClosedWindows();
try {
var state = this._safeEval("(" + aState + ")");
}
@ -917,21 +908,20 @@ SessionStoreService.prototype = {
return;
}
// close all other browser windows
this._forEachBrowserWindow(function(aWindow) {
if (aWindow != window) {
aWindow.close();
this.onClose(aWindow);
}
});
// make sure closed window data isn't kept
this._closedWindows = [];
// determine how many windows are meant to be restored
this._restoreCount = state.windows ? state.windows.length : 0;
var self = this;
// close all other browser windows
this._forEachBrowserWindow(function(aWindow) {
if (aWindow != window) {
self._closingWindows.push(aWindow);
aWindow.close();
}
});
// restore to the given state
this.restoreWindow(window, state, true);
},
@ -1722,6 +1712,8 @@ SessionStoreService.prototype = {
* @returns string
*/
_getCurrentState: function sss_getCurrentState(aUpdateAll) {
this._handleClosedWindows();
var activeWindow = this._getMostRecentBrowserWindow();
if (this._loadState == STATE_RUNNING) {
@ -1735,7 +1727,7 @@ SessionStoreService.prototype = {
else { // always update the window features (whose change alone never triggers a save operation)
this._updateWindowFeatures(aWindow);
}
}, this);
});
this._dirtyWindows = [];
}
@ -2670,6 +2662,24 @@ SessionStoreService.prototype = {
#endif
},
/**
* Calls onClose for windows that are determined to be closed but aren't
* destroyed yet, which would otherwise cause getBrowserState and
* setBrowserState to treat them as open windows.
*/
_handleClosedWindows: function sss_handleClosedWindows() {
var windowMediator = Cc["@mozilla.org/appshell/window-mediator;1"].
getService(Ci.nsIWindowMediator);
var windowsEnum = windowMediator.getEnumerator("navigator:browser");
while (windowsEnum.hasMoreElements()) {
var window = windowsEnum.getNext();
if (window.closed) {
this.onClose(window);
}
}
},
/**
* open a new browser window for a given session state
* called when restoring a multi-window session
@ -2881,17 +2891,16 @@ SessionStoreService.prototype = {
return jsonString;
},
_sendRestoreCompletedNotifications:
function sss_sendRestoreCompletedNotifications(aOnWindowClose) {
if (this._restoreCount && !aOnWindowClose)
_sendRestoreCompletedNotifications: function sss_sendRestoreCompletedNotifications() {
if (this._restoreCount) {
this._restoreCount--;
if (this._restoreCount == 0 && this._closingWindows.length == 0) {
// This was the last window restored at startup, notify observers.
this._observerService.notifyObservers(null,
this._browserSetState ? NOTIFY_BROWSER_STATE_RESTORED : NOTIFY_WINDOWS_RESTORED,
"");
this._browserSetState = false;
if (this._restoreCount == 0) {
// This was the last window restored at startup, notify observers.
this._observerService.notifyObservers(null,
this._browserSetState ? NOTIFY_BROWSER_STATE_RESTORED : NOTIFY_WINDOWS_RESTORED,
"");
this._browserSetState = false;
}
}
},

View File

@ -45,6 +45,8 @@ relativesrcdir = browser/components/sessionstore/test/browser
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
# browser_526613.js is disabled because of frequent failures (bug 534489)
_BROWSER_TEST_FILES = \
browser_248970_a.js \
browser_248970_b.js \
@ -108,7 +110,7 @@ _BROWSER_TEST_FILES = \
browser_495495.js \
browser_514751.js \
browser_522545.js \
browser_526613.js \
browser_528776.js \
$(NULL)
libs:: $(_BROWSER_TEST_FILES)

View File

@ -105,7 +105,9 @@
* notifications. The latter won't.
*/
function browserWindowsCount() {
function browserWindowsCount(expected, msg) {
if (typeof expected == "number")
expected = [expected, expected];
let count = 0;
let e = Cc["@mozilla.org/appshell/window-mediator;1"]
.getService(Ci.nsIWindowMediator)
@ -114,11 +116,16 @@ function browserWindowsCount() {
if (!e.getNext().closed)
++count;
}
return count;
is(count, expected[0], msg + " (nsIWindowMediator)");
let state = Cc["@mozilla.org/browser/sessionstore;1"]
.getService(Ci.nsISessionStore)
.getBrowserState();
info(state);
is(JSON.parse(state).windows.length, expected[1], msg + " (getBrowserState)");
}
function test() {
is(browserWindowsCount(), 1, "Only one browser window should be open initially");
browserWindowsCount(1, "Only one browser window should be open initially");
waitForExplicitFinish();
@ -511,34 +518,35 @@ function test() {
setupTestsuite();
if (navigator.platform.match(/Mac/)) {
// Mac tests
testMacNotifications(
function() testNotificationCount(
function() {
cleanupTestsuite();
is(browserWindowsCount(), 1, "Only one browser window should be open eventually");
finish();
}
)
);
testMacNotifications(function () {
testNotificationCount(function () {
cleanupTestsuite();
browserWindowsCount(1, "Only one browser window should be open eventually");
finish();
});
});
}
else {
// Non-Mac Tests
testOpenCloseNormal(
function() testOpenClosePrivateBrowsing(
function() testOpenCloseWindowAndPopup(
function() testOpenCloseOnlyPopup(
function() testOpenCloseRestoreFromPopup (
function() testNotificationCount(
function() {
cleanupTestsuite();
is(browserWindowsCount(), 1, "Only one browser window should be open eventually");
finish();
}
)
)
)
)
)
);
testOpenCloseNormal(function () {
browserWindowsCount([0, 1], "browser windows after testOpenCloseNormal");
testOpenClosePrivateBrowsing(function () {
browserWindowsCount([0, 1], "browser windows after testOpenClosePrivateBrowsing");
testOpenCloseWindowAndPopup(function () {
browserWindowsCount([0, 1], "browser windows after testOpenCloseWindowAndPopup");
testOpenCloseOnlyPopup(function () {
browserWindowsCount([0, 1], "browser windows after testOpenCloseOnlyPopup");
testOpenCloseRestoreFromPopup (function () {
browserWindowsCount([0, 1], "browser windows after testOpenCloseRestoreFromPopup");
testNotificationCount(function () {
cleanupTestsuite();
browserWindowsCount(1, "browser windows after testNotificationCount");
finish();
});
});
});
});
});
});
}
}

View File

@ -47,28 +47,22 @@ function test() {
getService(Ci.nsIWindowMediator);
waitForExplicitFinish();
function browserWindowsCount() {
function browserWindowsCount(expected) {
let count = 0;
let e = wm.getEnumerator("navigator:browser");
while (e.hasMoreElements()) {
let win = e.getNext();
if (!win.closed) {
if (!e.getNext().closed)
++count;
if (win != window) {
try {
var tabs = win.gBrowser.mTabs.length;
} catch (e) {
info(e);
}
info("secondary window: " + [win.document.readyState, win.content.location, tabs]);
}
}
}
return count;
is(count, expected,
"number of open browser windows according to nsIWindowMediator");
let state = ss.getBrowserState();
info(state);
is(JSON.parse(state).windows.length, expected,
"number of open browser windows according to getBrowserState");
}
is(browserWindowsCount(), 1, "Only one browser window should be open initially");
browserWindowsCount(1);
// backup old state
let oldState = ss.getBrowserState();
@ -89,8 +83,8 @@ function test() {
is(aTopic, "sessionstore-browser-state-restored",
"The sessionstore-browser-state-restored notification was observed");
if (this.pass++ == 1) {
is(browserWindowsCount(), 2, "Two windows should exist at this point");
if (this.pass++ == 1) {
browserWindowsCount(2);
// let the first window be focused (see above)
function pollMostRecentWindow() {
@ -99,13 +93,13 @@ function test() {
} else {
info("waiting for the current window to become active");
setTimeout(pollMostRecentWindow, 0);
window.focus(); //XXX Why is this needed?
}
}
window.focus(); //XXX Why is this needed?
pollMostRecentWindow();
}
else {
is(browserWindowsCount(), 1, "Only one window should exist after cleanup");
browserWindowsCount(1);
ok(!window.closed, "Restoring the old state should have left this window open");
os.removeObserver(this, "sessionstore-browser-state-restored");
finish();

View File

@ -0,0 +1,29 @@
var ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
var wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
function browserWindowsCount(expected) {
var count = 0;
var e = wm.getEnumerator("navigator:browser");
while (e.hasMoreElements()) {
if (!e.getNext().closed)
++count;
}
is(count, expected,
"number of open browser windows according to nsIWindowMediator");
is(JSON.parse(ss.getBrowserState()).windows.length, expected,
"number of open browser windows according to getBrowserState");
}
function test() {
waitForExplicitFinish();
browserWindowsCount(1);
var win = openDialog(location, "", "chrome,all,dialog=no");
win.addEventListener("load", function () {
browserWindowsCount(2);
win.close();
browserWindowsCount(1);
finish();
}, false);
}

View File

@ -604,6 +604,7 @@ nsWindowsShellService::SetDesktopBackground(nsIDOMElement* aElement,
nsCOMPtr<nsIDOMHTMLImageElement> imgElement(do_QueryInterface(aElement));
if (!imgElement) {
// XXX write background loading stuff!
return NS_ERROR_NOT_AVAILABLE;
}
else {
nsCOMPtr<nsIImageLoadingContent> imageContent =

View File

@ -284,6 +284,7 @@
@BINPATH@/components/nsLoginManagerPrompter.js
@BINPATH@/components/storage-Legacy.js
@BINPATH@/components/storage-mozStorage.js
@BINPATH@/components/crypto-SDR.js
@BINPATH@/components/jsconsole-clhandler.js
#ifdef MOZ_GTK2
@BINPATH@/components/nsFilePicker.js

View File

@ -196,6 +196,7 @@ geolocation.shareLocation.accesskey=a
geolocation.dontShareLocation=Don't Share
geolocation.dontShareLocation.accesskey=o
geolocation.siteWantsToKnow=%S wants to know your location.
geolocation.fileWantsToKnow=The file %S wants to know your location.
# LOCALIZATION NOTE (geolocation.learnMore): Use the unicode ellipsis char, \u2026,
# or use "..." if \u2026 doesn't suit traditions in your locale.
geolocation.learnMore=Learn More…

View File

@ -73,13 +73,18 @@ REDIST_FILES = \
$(NULL)
endif
ifeq (1600,$(_MSC_VER))
REDIST_FILES = \
msvcp100.dll \
msvcr100.dll \
$(NULL)
endif
endif
ifdef REDIST_FILES
libs::
mkdir -p $(FINAL_TARGET)
for file in $(REDIST_FILES) ; do \
install --preserve-timestamps "$(WIN32_REDIST_DIR)"/$$file $(FINAL_TARGET) ; \
done
install --preserve-timestamps $(foreach f,$(REDIST_FILES),"$(WIN32_REDIST_DIR)"/$(f)) $(FINAL_TARGET)
endif

View File

@ -163,6 +163,7 @@ PYUNITS := \
unit-nsinstall.py \
unit-printprereleasesuffix.py \
unit-JarMaker.py \
unit-buildlist.py \
$(NULL)
check:: check-python-modules check-jar-mn

View File

@ -1,114 +0,0 @@
#!env perl
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Christopher Seawood <cls@seawood.org>
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
#
# A generic script to add entries to a file
# if the entry does not already exist
#
# Usage: $0 [-l] <filename> <entry> [<entry> <entry>]
#
# -l do not attempt flock the file.
use Fcntl qw(:DEFAULT :flock);
use Getopt::Std;
use mozLock;
sub usage() {
print "$0 [-l] <filename> <entry>\n";
exit(1);
}
$nofilelocks = 0;
getopts("l");
$nofilelocks = 1 if defined($::opt_l);
$file = shift;
undef @entrylist;
while (defined($entry = shift)) {
push @entrylist, $entry;
}
$lockfile = $file . ".lck";
# touch the file if it doesn't exist
if ( ! -e "$file") {
$now = time;
utime $now, $now, $file;
}
# This needs to be atomic
mozLock($lockfile) unless $nofilelocks;
# Read entire file into mem
undef @inbuf;
if ( -e "$file" ) {
open(IN, "$file") || die ("$file: $!\n");
binmode(IN);
while ($tmp = <IN>) {
chomp($tmp);
push @inbuf, $tmp;
}
close(IN);
}
undef @outbuf;
# Add each entry to file if it's not already there
foreach $entry (@entrylist) {
push @outbuf, $entry if (!grep(/^$entry$/, @inbuf));
}
$count = $#outbuf + 1;
# Append new entry to file
if ($count) {
open(OUT, ">>$file") || die ("$file: $!\n");
binmode(OUT);
foreach $entry (@outbuf) {
print OUT "$entry\n";
}
close(OUT);
}
mozUnlock($lockfile) unless $nofilelocks;
exit(0);

73
config/buildlist.py Normal file
View File

@ -0,0 +1,73 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is Mozilla build system.
#
# The Initial Developer of the Original Code is
# Mozilla Foundation.
# Portions created by the Initial Developer are Copyright (C) 2009
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Ted Mielczarek <ted.mielczarek@gmail.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisiwons above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
'''A generic script to add entries to a file
if the entry does not already exist.
Usage: buildlist.py <filename> <entry> [<entry> ...]
'''
import sys
import os
from utils import lockFile
def addEntriesToListFile(listFile, entries):
"""Given a file |listFile| containing one entry per line,
add each entry in |entries| to the file, unless it is already
present."""
lock = lockFile(listFile + ".lck")
try:
if os.path.exists(listFile):
f = open(listFile)
existing = set([x.strip() for x in f.readlines()])
f.close()
else:
existing = set()
f = open(listFile, 'a')
for e in entries:
if e not in existing:
f.write("%s\n" % e)
existing.add(e)
f.close()
finally:
lock = None
if __name__ == '__main__':
if len(sys.argv) < 3:
print >>sys.stderr, "Usage: buildlist.py <list file> <entry> [<entry> ...]"
sys.exit(1)
addEntriesToListFile(sys.argv[1], sys.argv[2:])

View File

@ -255,7 +255,7 @@ endif
ifdef MOZ_DEBUG_SYMBOLS
OS_CXXFLAGS += -Zi -UDEBUG -DNDEBUG
OS_CFLAGS += -Zi -UDEBUG -DNDEBUG
OS_LDFLAGS += -DEBUG -OPT:REF -OPT:nowin98
OS_LDFLAGS += -DEBUG -OPT:REF
endif
ifdef MOZ_QUANTIFY

View File

@ -155,7 +155,7 @@ SOLO_FILE ?= $(error Specify a test filename in SOLO_FILE when using check-inter
libs::
$(foreach dir,$(XPCSHELL_TESTS),$(_INSTALL_TESTS))
$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl \
$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py \
$(testxpcobjdir)/all-test-dirs.list \
$(addprefix $(MODULE)/,$(XPCSHELL_TESTS))
@ -824,13 +824,13 @@ ifdef LIBRARY_NAME
ifdef EXPORT_LIBRARY
ifdef IS_COMPONENT
ifdef BUILD_STATIC_LIBS
@$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_COMPS) $(STATIC_LIBRARY_NAME)
@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_LINK_COMPS) $(STATIC_LIBRARY_NAME)
ifdef MODULE_NAME
@$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_COMP_NAMES) $(MODULE_NAME)
@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_LINK_COMP_NAMES) $(MODULE_NAME)
endif
endif # BUILD_STATIC_LIBS
else # !IS_COMPONENT
$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_LIBS) $(STATIC_LIBRARY_NAME)
$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_LINK_LIBS) $(STATIC_LIBRARY_NAME)
endif # IS_COMPONENT
endif # EXPORT_LIBRARY
endif # LIBRARY_NAME
@ -890,7 +890,7 @@ ifdef SHARED_LIBRARY
ifdef IS_COMPONENT
$(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET)/components
$(ELF_DYNSTR_GC) $(FINAL_TARGET)/components/$(SHARED_LIBRARY)
@$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_TARGET)/components/components.list $(SHARED_LIBRARY)
@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/components.list $(SHARED_LIBRARY)
ifdef BEOS_ADDON_WORKAROUND
( cd $(FINAL_TARGET)/components && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) )
endif
@ -1785,7 +1785,7 @@ $(_JAVA_GEN_DIR):
$(JAVA_GEN_DIR)/.%.java.pp: %.idl $(XPIDL_COMPILE) $(_JAVA_GEN_DIR)
$(REPORT_BUILD)
$(ELOG) $(XPIDL_COMPILE) -m java -w -I$(srcdir) -I$(IDL_DIR) -o $(_JAVA_GEN_DIR)/$* $(_VPATH_SRCS)
$(ELOG) $(XPIDL_COMPILE) -m java -w $(XPIDL_FLAGS) -I$(srcdir) -I$(IDL_DIR) -o $(_JAVA_GEN_DIR)/$* $(_VPATH_SRCS)
@touch $@
# "Install" generated Java interfaces. We segregate them based on the XPI_NAME.
@ -1811,7 +1811,7 @@ ifdef EXTRA_COMPONENTS
libs:: $(EXTRA_COMPONENTS)
ifndef NO_DIST_INSTALL
$(INSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/components
@$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_TARGET)/components/components.list $(notdir $^)
@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/components.list $(notdir $^)
endif
endif
@ -1826,7 +1826,7 @@ ifndef NO_DIST_INSTALL
dest=$(FINAL_TARGET)/components/$${fname}; \
$(RM) -f $$dest; \
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $$i > $$dest; \
$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_TARGET)/components/components.list $$fname; \
$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/components.list $$fname; \
done
endif

View File

@ -76,6 +76,7 @@ byteswap.h
#define WRAP_CAIRO_HEADERS
#endif
#ifdef WRAP_CAIRO_HEADERS
pixman.h
cairo.h
cairo-atsui.h
cairo-beos.h

View File

@ -0,0 +1,80 @@
import unittest
import os, sys, os.path, time
from tempfile import mkdtemp
from shutil import rmtree
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from buildlist import addEntriesToListFile
class TestBuildList(unittest.TestCase):
"""
Unit tests for buildlist.py
"""
def setUp(self):
self.tmpdir = mkdtemp()
def tearDown(self):
rmtree(self.tmpdir)
# utility methods for tests
def touch(self, file, dir=None):
if dir is None:
dir = self.tmpdir
f = os.path.join(dir, file)
open(f, 'w').close()
return f
def assertFileContains(self, filename, l):
"""Assert that the lines in the file |filename| are equal
to the contents of the list |l|, in order."""
l = l[:]
f = open(filename, 'r')
lines = [line.rstrip() for line in f.readlines()]
f.close()
for line in lines:
self.assert_(len(l) > 0, "ran out of expected lines! (expected '%s', got '%s')" % (l, lines))
self.assertEqual(line, l.pop(0))
self.assert_(len(l) == 0, "not enough lines in file! (expected '%s', got '%s'" % (l, lines))
def test_basic(self):
"Test that addEntriesToListFile works when file doesn't exist."
testfile = os.path.join(self.tmpdir, "test.list")
l = ["a", "b", "c"]
addEntriesToListFile(testfile, l)
self.assertFileContains(testfile, l)
# ensure that attempting to add the same entries again doesn't change it
addEntriesToListFile(testfile, l)
self.assertFileContains(testfile, l)
def test_append(self):
"Test adding new entries."
testfile = os.path.join(self.tmpdir, "test.list")
l = ["a", "b", "c"]
addEntriesToListFile(testfile, l)
self.assertFileContains(testfile, l)
l2 = ["x","y","z"]
addEntriesToListFile(testfile, l2)
l.extend(l2)
self.assertFileContains(testfile, l)
def test_append_some(self):
"Test adding new entries mixed with existing entries."
testfile = os.path.join(self.tmpdir, "test.list")
l = ["a", "b", "c"]
addEntriesToListFile(testfile, l)
self.assertFileContains(testfile, l)
addEntriesToListFile(testfile, ["a", "x", "c", "z"])
self.assertFileContains(testfile, ["a", "b", "c", "x", "z"])
def test_add_multiple(self):
"""Test that attempting to add the same entry multiple times results in
only one entry being added."""
testfile = os.path.join(self.tmpdir, "test.list")
addEntriesToListFile(testfile, ["a","b","a","a","b"])
self.assertFileContains(testfile, ["a","b"])
addEntriesToListFile(testfile, ["c","a","c","b","c"])
self.assertFileContains(testfile, ["a","b","c"])
if __name__ == '__main__':
unittest.main()

View File

@ -576,6 +576,13 @@ case "$target" in
_USE_DYNAMICBASE=1
AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
elif test "$_CC_MAJOR_VERSION" = "16"; then
_CC_SUITE=10
CXXFLAGS="$CXXFLAGS -Zc:wchar_t-"
LDFLAGS="$LDFLAGS -MANIFESTUAC:NO"
_USE_DYNAMICBASE=1
AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
else
AC_MSG_ERROR([This version of the MSVC compiler, $CC_VERSION , is unsupported.])
fi
@ -1187,7 +1194,9 @@ esac
case "$OS_ARCH" in
WINNT)
OS_TEST=`uname -p`
if test -z "$CROSS_COMPILE" ; then
OS_TEST=`uname -p`
fi
;;
Windows_NT)
#
@ -2141,7 +2150,7 @@ case "$target" in
# Use temp file for windres (bug 213281)
RCFLAGS='-O coff --use-temp-file'
# mingw doesn't require kernel32, user32, and advapi32 explicitly
LIBS="$LIBS -lgdi32 -lwinmm -lwsock32"
LIBS="$LIBS -luuid -lgdi32 -lwinmm -lwsock32"
MOZ_JS_LIBS='-L$(LIBXUL_DIST)/lib -lmozjs'
MOZ_FIX_LINK_PATHS=
DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib -lxpcom -lxpcom_core'
@ -7645,7 +7654,7 @@ if test "$MOZ_TREE_CAIRO"; then
mv -f $CAIRO_FEATURES_H "$CAIRO_FEATURES_H".orig 2> /dev/null
else
PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION freetype2 fontconfig)
PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION pixman-1 freetype2 fontconfig)
MOZ_CAIRO_CFLAGS=$CAIRO_CFLAGS
MOZ_CAIRO_LIBS=$CAIRO_LIBS
if test "$MOZ_X11"; then

View File

@ -1778,6 +1778,9 @@ nsObjectLoadingContent::Instantiate(nsIObjectFrame* aFrame,
aURI = baseURI;
}
nsIFrame *nsiframe = do_QueryFrame(aFrame);
nsWeakFrame weakFrame(nsiframe);
// We'll always have a type or a URI by the time we get here
NS_ASSERTION(aURI || !typeToUse.IsEmpty(), "Need a URI or a type");
LOG(("OBJLC [%p]: Calling [%p]->Instantiate(<%s>, %p)\n", this, aFrame,
@ -1787,7 +1790,9 @@ nsObjectLoadingContent::Instantiate(nsIObjectFrame* aFrame,
mInstantiating = oldInstantiatingValue;
nsCOMPtr<nsIPluginInstance> pluginInstance;
aFrame->GetPluginInstance(*getter_AddRefs(pluginInstance));
if (weakFrame.IsAlive()) {
aFrame->GetPluginInstance(*getter_AddRefs(pluginInstance));
}
if (pluginInstance) {
nsCOMPtr<nsIPluginTag> pluginTag;
nsCOMPtr<nsIPluginHost> host(do_GetService(MOZ_PLUGIN_HOST_CONTRACTID));

View File

@ -1748,6 +1748,22 @@ nsHTMLInputElement::PostHandleEvent(nsEventChainPostVisitor& aVisitor)
if (!aVisitor.mPresContext) {
return NS_OK;
}
// ignore the activate event fired by the "Browse..." button
// (file input controls fire their own) (bug 500885)
if (mType == NS_FORM_INPUT_FILE) {
nsCOMPtr<nsIContent> maybeButton =
do_QueryInterface(aVisitor.mEvent->originalTarget);
if (maybeButton &&
maybeButton->IsRootOfNativeAnonymousSubtree() &&
maybeButton->AttrValueIs(kNameSpaceID_None,
nsGkAtoms::type,
nsGkAtoms::button,
eCaseMatters)) {
return NS_OK;
}
}
nsresult rv = NS_OK;
PRBool outerActivateEvent = !!(aVisitor.mItemFlags & NS_OUTER_ACTIVATE_EVENT);
PRBool originalCheckedValue =

View File

@ -136,6 +136,7 @@ _TEST_FILES = test_bug589.html \
347174transformable.xml \
347174transform.xsl \
test_bug481335.xhtml \
test_bug500885.html \
test_bug514856.html \
bug514856_iframe.html \
test_bug519987.html \

View File

@ -0,0 +1,98 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=500885
-->
<head>
<title>Test for Bug 500885</title>
<script type="text/javascript" src="/MochiKit/packed.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.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=500885">Mozilla Bug 500885</a>
<div>
<input id="file" type="file" />
</div>
<script type="text/javascript">
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
const Cm = Components.manager;
Cc["@mozilla.org/moz/jssubscript-loader;1"]
.getService(Ci.mozIJSSubScriptLoader)
.loadSubScript("chrome://mochikit/content/browser/toolkit/content/tests/browser/common/mockObjects.js", this);
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
function MockFilePicker() { };
MockFilePicker.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIFilePicker]),
init: function(aParent, aTitle, aMode) { },
appendFilters: function(aFilterMask) { },
appendFilter: function(aTitle, aFilter) { },
defaultString: "",
defaultExtension: "",
filterIndex: 0,
displayDirectory: null,
file: null,
get fileURL() {
throw Cr.NS_ERROR_NOT_IMPLEMENTED;
},
get files() {
throw Cr.NS_ERROR_NOT_IMPLEMENTED;
},
show: function MFP_show() {
return Ci.nsIFilePicker.returnOK;
}
};
var mockFilePickerRegisterer =
new MockObjectRegisterer("@mozilla.org/filepicker;1",MockFilePicker);
function test() {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var wu = window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils);
mockFilePickerRegisterer.register();
try {
var domActivateEvents;
var fileInput = document.getElementById("file");
var rect = fileInput.getBoundingClientRect();
fileInput.addEventListener ("DOMActivate", function () {
domActivateEvents++;
}, false);
domActivateEvents = 0;
wu.sendMouseEvent("mousedown", rect.left + 5, rect.top + 5, 0, 1, 0);
wu.sendMouseEvent("mouseup", rect.left + 5, rect.top + 5, 0, 1, 0);
is(domActivateEvents, 1, "click on text field should only fire 1 DOMActivate event");
domActivateEvents = 0;
wu.sendMouseEvent("mousedown", rect.right - 5, rect.top + 5, 0, 1, 0);
wu.sendMouseEvent("mouseup", rect.right - 5, rect.top + 5, 0, 1, 0);
is(domActivateEvents, 1, "click on button should only fire 1 DOMActivate event");
} finally {
mockFilePickerRegisterer.unregister();
}
SimpleTest.finish();
}
window.onload = function() {
SimpleTest.waitForExplicitFinish();
setTimeout(test, 0);
};
</script>
</body>
</html>

View File

@ -174,8 +174,7 @@ nsSVGScriptElement::GetType(nsAString & aType)
NS_IMETHODIMP
nsSVGScriptElement::SetType(const nsAString & aType)
{
NS_ERROR("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
return SetAttr(kNameSpaceID_None, nsGkAtoms::type, aType, PR_TRUE);
}
//----------------------------------------------------------------------

View File

@ -609,7 +609,7 @@ nsresult
nsXHTMLParanoidFragmentSink::AddAttributes(const PRUnichar** aAtts,
nsIContent* aContent)
{
nsresult rv;
nsresult rv = NS_OK;
// use this to check for safe URIs in the few attributes that allow them
nsIScriptSecurityManager* secMan = nsContentUtils::GetSecurityManager();

View File

@ -836,8 +836,8 @@ nsSHistory::EvictWindowContentViewers(PRInt32 aFromIndex, PRInt32 aToIndex)
nsCOMPtr<nsISHEntry> ownerEntry;
entry->GetAnyContentViewer(getter_AddRefs(ownerEntry),
getter_AddRefs(viewer));
NS_ASSERTION(!viewer,
"ContentViewer exists outside gHistoryMaxViewer range");
NS_WARN_IF_FALSE(!viewer,
"ContentViewer exists outside gHistoryMaxViewer range");
}
nsISHTransaction *temp = trans;

View File

@ -583,11 +583,8 @@ static nsDOMClassInfoData sClassInfoData[] = {
DEFAULT_SCRIPTABLE_FLAGS |
WINDOW_SCRIPTABLE_FLAGS)
// Don't allow modifications to Location.prototype
NS_DEFINE_CLASSINFO_DATA(Location, nsLocationSH,
(DOM_DEFAULT_SCRIPTABLE_FLAGS |
nsIXPCScriptable::WANT_PRECREATE) &
~nsIXPCScriptable::ALLOW_PROP_MODS_TO_PROTOTYPE)
DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(Navigator, nsNavigatorSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS |

View File

@ -7730,12 +7730,18 @@ nsGlobalWindow::SetTimeoutOrInterval(nsIScriptTimeoutHandler *aHandler,
}
PRUint32 nestingLevel = sNestingLevel + 1;
if (interval < DOM_MIN_TIMEOUT_VALUE &&
(aIsInterval || nestingLevel >= DOM_CLAMP_TIMEOUT_NESTING_LEVEL)) {
// Don't allow timeouts less than DOM_MIN_TIMEOUT_VALUE from
// now...
if (interval < DOM_MIN_TIMEOUT_VALUE) {
if (aIsInterval || nestingLevel >= DOM_CLAMP_TIMEOUT_NESTING_LEVEL) {
// Don't allow timeouts less than DOM_MIN_TIMEOUT_VALUE from
// now...
interval = DOM_MIN_TIMEOUT_VALUE;
interval = DOM_MIN_TIMEOUT_VALUE;
}
else if (interval < 0) {
// Clamp negative intervals to 0.
interval = 0;
}
}
NS_ASSERTION(interval >= 0, "DOM_MIN_TIMEOUT_VALUE lies");

View File

@ -4,8 +4,7 @@ function test() {
let fm = Components.classes["@mozilla.org/focus-manager;1"]
.getService(Components.interfaces.nsIFocusManager);
let tabs = [ gBrowser.mCurrentTab, gBrowser.addTab() ];
gBrowser.selectedTab = tabs[0];
let tabs = [ gBrowser.selectedTab, gBrowser.addTab() ];
let testingList = [
{ uri: "data:text/html,<body onload=\"setTimeout(function () { document.getElementById('target').focus(); }, 10);\"><input id='target'></body>",
@ -52,8 +51,7 @@ function test() {
function runNextTest() {
if (++testingIndex >= testingList.length) {
// cleaning-up...
let cleanTab = gBrowser.addTab();
gBrowser.selectedTab = cleanTab;
gBrowser.addTab();
for (let i = 0; i < tabs.length; i++) {
gBrowser.removeTab(tabs[i]);
}
@ -166,4 +164,4 @@ function test() {
}
runNextTest();
}
}

View File

@ -106,6 +106,9 @@ _TEST_FILES = \
child_bug260264.html \
grandchild_bug260264.html \
utils_bug260264.js \
test_bug534362.html \
iframe_bug534362.html \
test_bug531542.html \
$(NULL)
libs:: $(_TEST_FILES)

View File

@ -0,0 +1,19 @@
<html>
<head>
<title>Iframe test for bug 534362</title>
</head>
<body">
<script>
function locationSetter(_href)
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
parent.setterCalled = true;
};
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
parent.setterCalled = false;
location.__proto__.href setter = locationSetter;
location.href = "javascript:";
</script>
</body>
</html>

View File

@ -0,0 +1,41 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=531542
-->
<head>
<title>Test for Bug 531542</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=531542">Mozilla Bug 531542</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 531542 **/
var negativeTimeoutFired = false;
function negativeTimeout()
{
negativeTimeoutFired = true;
}
function testFinished()
{
ok(negativeTimeoutFired, "Timeout with negative delay should fire.");
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
setTimeout(negativeTimeout, -1);
setTimeout(testFinished, 0);
</script>
</pre>
</body>
</html>

View File

@ -0,0 +1,44 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=534362
-->
<head>
<title>Test for Bug 534362</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=534362">Mozilla Bug 534362</a>
<p id="display"></p>
<div id="content" style="display: none">
<iframe src="http://example.org/tests/dom/tests/mochitest/bugs/iframe_bug534362.html" name="testFrame" onload="changeLocation();"></iframe>
</div>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 534362 **/
function checkSetterCalled(called, shouldCall)
{
is(called, shouldCall, "Setter " + (called ? "" : "not ") + "called.");
if (!shouldCall) {
SimpleTest.finish();
}
}
function changeLocation()
{
checkSetterCalled(setterCalled, true);
setterCalled = false;
frames["testFrame"].location.href = "javascript:";
checkSetterCalled(setterCalled, false);
}
SimpleTest.waitForExplicitFinish();
</script>
</pre>
</body>
</html>

View File

@ -66,7 +66,7 @@ quartz-first-stop.patch: return the first stop for negative positions on the gra
pixman-neon.patch: add ARM NEON optimized compositing functions
endian.patch: include cairo-platform.h for endian macros
pixman-rename-and-endian.patch: include cairo-platform.h for renaming of external symbols and endian macros
==== disable printing patch ====

View File

@ -1,11 +0,0 @@
--- a/libpixman/src/pixman-private.h Fri Oct 19 14:55:56 2007
+++ b/libpixman/src/pixman-private.h Fri Oct 19 14:56:45 2007
@@ -5,6 +5,8 @@
#ifndef PIXMAN_PRIVATE_H
#define PIXMAN_PRIVATE_H
+#include "cairo-platform.h"
+
#include "pixman.h"
#include <time.h>

View File

@ -162,6 +162,20 @@ FORCE_STATIC_LIB = 1
# This library is used by other shared libs in a static build
FORCE_USE_PIC = 1
include $(topsrcdir)/config/config.mk
ifndef MOZ_ENABLE_LIBXUL
ifdef GNU_CC
# -fvisibility=hidden works fine but PIXMAN_EXPORT is not used in header
# files, so pixman.h needs to be included before
# "#pragma GCC visibility -push(hidden)".
ifdef WRAP_SYSTEM_INCLUDES
MY_VISIBILITY_FLAGS := -include pixman.h $(VISIBILITY_FLAGS)
COMPILE_CFLAGS += $(MY_VISIBILITY_FLAGS)
endif # WRAP_SYSTEM_INCLUDES
endif # GNU_CC
endif # !MOZ_ENABLE_LIBXUL
include $(topsrcdir)/config/rules.mk
CFLAGS += -DPACKAGE="mozpixman" -D_USE_MATH_DEFINES

View File

@ -5,8 +5,6 @@
#ifndef PIXMAN_PRIVATE_H
#define PIXMAN_PRIVATE_H
#include "cairo-platform.h"
#include "pixman.h"
#include <time.h>

View File

@ -69,6 +69,8 @@ SOFTWARE.
#ifndef PIXMAN_H__
#define PIXMAN_H__
#include "cairo-platform.h"
#include <pixman-version.h>
/*

View File

@ -0,0 +1,22 @@
diff --git a/gfx/cairo/libpixman/src/pixman.h b/gfx/cairo/libpixman/src/pixman.h
--- a/gfx/cairo/libpixman/src/pixman.h
+++ b/gfx/cairo/libpixman/src/pixman.h
@@ -64,16 +64,18 @@ SOFTWARE.
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef PIXMAN_H__
#define PIXMAN_H__
+#include "cairo-platform.h"
+
#include <pixman-version.h>
/*
* Standard integers
*/
#if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || defined (_sgi) || defined (__sun) || defined (sun) || defined (__digital__)
# include <inttypes.h>
#elif defined (_MSC_VER)

View File

@ -443,7 +443,7 @@ GetTextRunBoundingMetrics(gfxTextRun *aTextRun, PRUint32 aStart, PRUint32 aLengt
gfxTextRun::Metrics theMetrics =
aTextRun->MeasureText(aStart, aLength, gfxFont::TIGHT_HINTED_OUTLINE_EXTENTS,
aContext->ThebesContext(), &provider);
// note that TIGHT_UNHINTED_OUTLINE_EXTENTS can be expensive (on Windows)
// note that TIGHT_HINTED_OUTLINE_EXTENTS can be expensive (on Windows)
// but this is only used for MathML positioning so it's not critical
aBoundingMetrics.leftBearing = NSToCoordFloor(theMetrics.mBoundingBox.X());

View File

@ -116,7 +116,7 @@ public:
gfxFontEntry(aFaceName), mFontType(aFontType),
mForceGDI(PR_FALSE), mUnknownCMAP(PR_FALSE),
mUnicodeFont(PR_FALSE), mSymbolFont(PR_FALSE),
mCharset(0), mUnicodeRanges(0)
mCharset(), mUnicodeRanges()
{
mUserFontData = aUserFontData;
mItalic = aItalic;

View File

@ -260,7 +260,7 @@ gfxFontFamily::FindFontForStyle(const gfxFontStyle& aFontStyle, PRBool& aNeedsBo
}
}
gfxFontEntry *matchFE;
gfxFontEntry *matchFE = nsnull;
const PRInt8 absDistance = abs(weightDistance);
direction = (weightDistance >= 0) ? 1 : -1;
PRInt8 i, wghtSteps = 0;
@ -286,10 +286,6 @@ gfxFontFamily::FindFontForStyle(const gfxFontStyle& aFontStyle, PRBool& aNeedsBo
aNeedsBold = PR_TRUE;
}
if (!matchFE) {
matchFE = weightList[matchBaseWeight];
}
PR_LOG(gFontSelection, PR_LOG_DEBUG,
("(FindFontForStyle) name: %s, sty: %02x, wt: %d, sz: %.1f -> %s\n",
NS_ConvertUTF16toUTF8(mName).get(),

View File

@ -433,7 +433,7 @@ emit_adobe_app14 (j_compress_ptr cinfo)
*/
METHODDEF(void)
write_marker_header (j_compress_ptr cinfo, int16 marker, unsigned int datalen)
write_marker_header (j_compress_ptr cinfo, int marker, unsigned int datalen)
/* Emit an arbitrary marker header */
{
if (datalen > (unsigned int) 65533) /* safety check */
@ -445,10 +445,10 @@ write_marker_header (j_compress_ptr cinfo, int16 marker, unsigned int datalen)
}
METHODDEF(void)
write_marker_byte (j_compress_ptr cinfo, int16 val)
write_marker_byte (j_compress_ptr cinfo, int val)
/* Emit one byte of marker parameters following write_marker_header */
{
emit_byte(cinfo, val);
emit_byte(cinfo, (int16) val);
}

View File

@ -347,6 +347,12 @@ jsd_DebuggerOn(void);
extern void
jsd_DebuggerOff(JSDContext* jsdc);
extern void
jsd_DebuggerPause(JSDContext* jsdc, JSBool forceAllHooksOff);
extern void
jsd_DebuggerUnpause(JSDContext* jsdc);
extern void
jsd_SetUserCallbacks(JSRuntime* jsrt, JSD_UserCallbacks* callbacks, void* user);

View File

@ -203,15 +203,19 @@ jsd_DebuggerOnForUser(JSRuntime* jsrt,
if( ! jsdc )
return NULL;
/* set hooks here */
/*
* Set hooks here. The new/destroy script hooks are on even when
* the debugger is paused. The destroy hook so we'll clean up
* internal data structures when scripts are destroyed, and the
* newscript hook for backwards compatibility for now. We'd like
* to stop doing that.
*/
JS_SetNewScriptHookProc(jsdc->jsrt, jsd_NewScriptHookProc, jsdc);
JS_SetDestroyScriptHookProc(jsdc->jsrt, jsd_DestroyScriptHookProc, jsdc);
JS_SetDebuggerHandler(jsdc->jsrt, jsd_DebuggerHandler, jsdc);
JS_SetExecuteHook(jsdc->jsrt, jsd_TopLevelCallHook, jsdc);
JS_SetCallHook(jsdc->jsrt, jsd_FunctionCallHook, jsdc);
JS_SetObjectHook(jsdc->jsrt, jsd_ObjectHook, jsdc);
JS_SetThrowHook(jsdc->jsrt, jsd_ThrowHandler, jsdc);
JS_SetDebugErrorHook(jsdc->jsrt, jsd_DebugErrorHook, jsdc);
jsd_DebuggerUnpause(jsdc);
if (!(jsdc->flags & JSD_DISABLE_OBJECT_TRACE)) {
JS_SetObjectHook(jsdc->jsrt, jsd_ObjectHook, jsdc);
}
#ifdef LIVEWIRE
LWDBG_SetNewScriptHookProc(jsd_NewScriptHookProc, jsdc);
#endif
@ -231,15 +235,13 @@ jsd_DebuggerOn(void)
void
jsd_DebuggerOff(JSDContext* jsdc)
{
jsd_DebuggerPause(jsdc, JS_TRUE);
/* clear hooks here */
JS_SetNewScriptHookProc(jsdc->jsrt, NULL, NULL);
JS_SetDestroyScriptHookProc(jsdc->jsrt, NULL, NULL);
JS_SetDebuggerHandler(jsdc->jsrt, NULL, NULL);
JS_SetExecuteHook(jsdc->jsrt, NULL, NULL);
JS_SetCallHook(jsdc->jsrt, NULL, NULL);
/* Have to unset these too, since jsd_DebuggerPause only unsets
them conditionally */
JS_SetObjectHook(jsdc->jsrt, NULL, NULL);
JS_SetThrowHook(jsdc->jsrt, NULL, NULL);
JS_SetDebugErrorHook(jsdc->jsrt, NULL, NULL);
#ifdef LIVEWIRE
LWDBG_SetNewScriptHookProc(NULL,NULL);
#endif
@ -256,6 +258,30 @@ jsd_DebuggerOff(JSDContext* jsdc)
jsdc->userCallbacks.setContext(NULL, jsdc->user);
}
void
jsd_DebuggerPause(JSDContext* jsdc, JSBool forceAllHooksOff)
{
JS_SetDebuggerHandler(jsdc->jsrt, NULL, NULL);
if (forceAllHooksOff ||
(!(jsdc->flags & JSD_COLLECT_PROFILE_DATA) &&
(jsdc->flags & JSD_DISABLE_OBJECT_TRACE))) {
JS_SetExecuteHook(jsdc->jsrt, NULL, NULL);
JS_SetCallHook(jsdc->jsrt, NULL, NULL);
}
JS_SetThrowHook(jsdc->jsrt, NULL, NULL);
JS_SetDebugErrorHook(jsdc->jsrt, NULL, NULL);
}
void
jsd_DebuggerUnpause(JSDContext* jsdc)
{
JS_SetDebuggerHandler(jsdc->jsrt, jsd_DebuggerHandler, jsdc);
JS_SetExecuteHook(jsdc->jsrt, jsd_TopLevelCallHook, jsdc);
JS_SetCallHook(jsdc->jsrt, jsd_FunctionCallHook, jsdc);
JS_SetThrowHook(jsdc->jsrt, jsd_ThrowHandler, jsdc);
JS_SetDebugErrorHook(jsdc->jsrt, jsd_DebugErrorHook, jsdc);
}
void
jsd_SetUserCallbacks(JSRuntime* jsrt, JSD_UserCallbacks* callbacks, void* user)
{

View File

@ -245,10 +245,10 @@ jsds_RemoveEphemeral (LiveEphemeral **listHead, LiveEphemeral *item)
* utility functions for filters
*******************************************************************************/
void
jsds_FreeFilter (FilterRecord *filter)
jsds_FreeFilter (FilterRecord *rec)
{
NS_IF_RELEASE (filter->filterObject);
delete filter;
NS_IF_RELEASE (rec->filterObject);
PR_Free (rec);
}
/* copies appropriate |filter| attributes into |rec|.
@ -2656,6 +2656,7 @@ jsdService::Pause(PRUint32 *_rval)
JSD_ClearDebugBreakHook (mCx);
JSD_ClearTopLevelHook (mCx);
JSD_ClearFunctionHook (mCx);
JSD_DebuggerPause (mCx);
}
if (_rval)
@ -2677,6 +2678,7 @@ jsdService::UnPause(PRUint32 *_rval)
* was turned off while we were paused.
*/
if (--mPauseLevel == 0 && mOn) {
JSD_DebuggerUnpause (mCx);
if (mErrorHook)
JSD_SetErrorReporter (mCx, jsds_ErrorHookProc, NULL);
if (mThrowHook)

View File

@ -65,6 +65,19 @@ JSD_DebuggerOff(JSDContext* jsdc)
jsd_DebuggerOff(jsdc);
}
JSD_PUBLIC_API(void)
JSD_DebuggerPause(JSDContext* jsdc)
{
JSD_ASSERT_VALID_CONTEXT(jsdc);
jsd_DebuggerPause(jsdc, JS_FALSE);
}
JSD_PUBLIC_API(void)
JSD_DebuggerUnpause(JSDContext* jsdc)
{
JSD_ASSERT_VALID_CONTEXT(jsdc);
jsd_DebuggerUnpause(jsdc);
}
JSD_PUBLIC_API(uintN)
JSD_GetMajorVersion(void)
@ -122,8 +135,26 @@ JSD_ClearAllProfileData(JSDContext *jsdc)
JSD_PUBLIC_API(void)
JSD_SetContextFlags(JSDContext *jsdc, uint32 flags)
{
uint32 oldFlags = jsdc->flags;
JSD_ASSERT_VALID_CONTEXT(jsdc);
jsdc->flags = flags;
if ((flags & JSD_COLLECT_PROFILE_DATA) ||
!(flags & JSD_DISABLE_OBJECT_TRACE)) {
// Need to reenable our call hooks now
JS_SetExecuteHook(jsdc->jsrt, jsd_TopLevelCallHook, jsdc);
JS_SetCallHook(jsdc->jsrt, jsd_FunctionCallHook, jsdc);
}
if ((oldFlags ^ flags) & JSD_DISABLE_OBJECT_TRACE) {
// Changing our JSD_DISABLE_OBJECT_TRACE flag
if (!(flags & JSD_DISABLE_OBJECT_TRACE)) {
// Need to reenable our object hooks now
if (jsd_InitObjectManager(jsdc))
JS_SetObjectHook(jsdc->jsrt, jsd_ObjectHook, jsdc);
} else {
jsd_DestroyObjectManager(jsdc);
JS_SetObjectHook(jsdc->jsrt, NULL, NULL);
}
}
}
JSD_PUBLIC_API(uint32)

View File

@ -150,6 +150,18 @@ JSD_DebuggerOnForUser(JSRuntime* jsrt,
extern JSD_PUBLIC_API(void)
JSD_DebuggerOff(JSDContext* jsdc);
/*
* Pause JSD for this JSDContext
*/
extern JSD_PUBLIC_API(void)
JSD_DebuggerPause(JSDContext* jsdc);
/*
* Unpause JSD for this JSDContext
*/
extern JSD_PUBLIC_API(void)
JSD_DebuggerUnpause(JSDContext* jsdc);
/*
* Get the Major Version (initial JSD release used major version = 1)
*/

View File

@ -255,7 +255,7 @@ endif
ifdef MOZ_DEBUG_SYMBOLS
OS_CXXFLAGS += -Zi -UDEBUG -DNDEBUG
OS_CFLAGS += -Zi -UDEBUG -DNDEBUG
OS_LDFLAGS += -DEBUG -OPT:REF -OPT:nowin98
OS_LDFLAGS += -DEBUG -OPT:REF
endif
ifdef MOZ_QUANTIFY

View File

@ -155,7 +155,7 @@ SOLO_FILE ?= $(error Specify a test filename in SOLO_FILE when using check-inter
libs::
$(foreach dir,$(XPCSHELL_TESTS),$(_INSTALL_TESTS))
$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl \
$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py \
$(testxpcobjdir)/all-test-dirs.list \
$(addprefix $(MODULE)/,$(XPCSHELL_TESTS))
@ -824,13 +824,13 @@ ifdef LIBRARY_NAME
ifdef EXPORT_LIBRARY
ifdef IS_COMPONENT
ifdef BUILD_STATIC_LIBS
@$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_COMPS) $(STATIC_LIBRARY_NAME)
@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_LINK_COMPS) $(STATIC_LIBRARY_NAME)
ifdef MODULE_NAME
@$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_COMP_NAMES) $(MODULE_NAME)
@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_LINK_COMP_NAMES) $(MODULE_NAME)
endif
endif # BUILD_STATIC_LIBS
else # !IS_COMPONENT
$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_LIBS) $(STATIC_LIBRARY_NAME)
$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_LINK_LIBS) $(STATIC_LIBRARY_NAME)
endif # IS_COMPONENT
endif # EXPORT_LIBRARY
endif # LIBRARY_NAME
@ -890,7 +890,7 @@ ifdef SHARED_LIBRARY
ifdef IS_COMPONENT
$(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET)/components
$(ELF_DYNSTR_GC) $(FINAL_TARGET)/components/$(SHARED_LIBRARY)
@$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_TARGET)/components/components.list $(SHARED_LIBRARY)
@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/components.list $(SHARED_LIBRARY)
ifdef BEOS_ADDON_WORKAROUND
( cd $(FINAL_TARGET)/components && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) )
endif
@ -1785,7 +1785,7 @@ $(_JAVA_GEN_DIR):
$(JAVA_GEN_DIR)/.%.java.pp: %.idl $(XPIDL_COMPILE) $(_JAVA_GEN_DIR)
$(REPORT_BUILD)
$(ELOG) $(XPIDL_COMPILE) -m java -w -I$(srcdir) -I$(IDL_DIR) -o $(_JAVA_GEN_DIR)/$* $(_VPATH_SRCS)
$(ELOG) $(XPIDL_COMPILE) -m java -w $(XPIDL_FLAGS) -I$(srcdir) -I$(IDL_DIR) -o $(_JAVA_GEN_DIR)/$* $(_VPATH_SRCS)
@touch $@
# "Install" generated Java interfaces. We segregate them based on the XPI_NAME.
@ -1811,7 +1811,7 @@ ifdef EXTRA_COMPONENTS
libs:: $(EXTRA_COMPONENTS)
ifndef NO_DIST_INSTALL
$(INSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/components
@$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_TARGET)/components/components.list $(notdir $^)
@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/components.list $(notdir $^)
endif
endif
@ -1826,7 +1826,7 @@ ifndef NO_DIST_INSTALL
dest=$(FINAL_TARGET)/components/$${fname}; \
$(RM) -f $$dest; \
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $$i > $$dest; \
$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_TARGET)/components/components.list $$fname; \
$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/components.list $$fname; \
done
endif

View File

@ -76,6 +76,7 @@ byteswap.h
#define WRAP_CAIRO_HEADERS
#endif
#ifdef WRAP_CAIRO_HEADERS
pixman.h
cairo.h
cairo-atsui.h
cairo-beos.h

View File

@ -490,6 +490,13 @@ case "$target" in
_USE_DYNAMICBASE=1
AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
elif test "$_CC_MAJOR_VERSION" = "16"; then
_CC_SUITE=10
CXXFLAGS="$CXXFLAGS -Zc:wchar_t-"
LDFLAGS="$LDFLAGS -MANIFESTUAC:NO"
_USE_DYNAMICBASE=1
AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
else
AC_MSG_ERROR([This version of the MSVC compiler, $CC_VERSION , is unsupported.])
fi

View File

@ -114,7 +114,7 @@ script regress-295052.js
script regress-295666.js
script regress-299209.js
script regress-299641.js
skip-if(xulRuntime.XPCOMABI.match(/x86_64/)||xulRuntime.OS=="WINNT") script regress-303213.js # bug 524731
skip-if(!xulRuntime.shell) script regress-303213.js # bug 524731
script regress-306633.js
script regress-306727.js
script regress-306794.js

View File

@ -3,7 +3,7 @@ script math-trace-tests.js
script regress-451673.js # slow
script regress-451974-01.js
random script regress-451974-02.js # bug 524734
fails script regress-452498-01.js
random script regress-452498-01.js
script regress-458838.js
script regress-462459-01.js
script regress-462459-02.js

View File

@ -444,7 +444,8 @@ void XPCJSRuntime::UnrootContextGlobals()
{
NS_ASSERTION(!JS_HAS_OPTION(acx, JSOPTION_UNROOTED_GLOBAL),
"unrooted global should be set only during CC");
if(nsXPConnect::GetXPConnect()->GetRequestDepth(acx) == 0)
if(XPCPerThreadData::IsMainThreadContext(acx) &&
nsXPConnect::GetXPConnect()->GetRequestDepth(acx) == 0)
{
JS_ClearNewbornRoots(acx);
if(acx->globalObject)

View File

@ -3441,6 +3441,11 @@ public:
return GetDataImpl(cx);
}
static inline JSBool IsMainThreadContext(JSContext *cx)
{
return cx->thread == sMainJSThread;
}
static void CleanupAllThreads();
~XPCPerThreadData();

View File

@ -1466,7 +1466,9 @@ PRBool nsDisplayTransform::ComputeVisibility(nsDisplayListBuilder *aBuilder,
untransformedVisibleBeforeMove = untransformedVisible;
}
mStoredList.ComputeVisibility(aBuilder, &untransformedVisible,
&untransformedVisibleBeforeMove);
aVisibleRegionBeforeMove
? &untransformedVisibleBeforeMove
: nsnull);
return PR_TRUE;
}

View File

@ -758,7 +758,6 @@
#define NS_STYLE_GRADIENT_SIZE_FARTHEST_SIDE 2
#define NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER 3
#ifdef MOZ_SVG
// See nsStyleSVG
// dominant-baseline
@ -817,8 +816,6 @@
#define NS_STYLE_COLOR_INTERPOLATION_SRGB 1
#define NS_STYLE_COLOR_INTERPOLATION_LINEARRGB 2
#endif // MOZ_SVG
/*****************************************************************************
* Constants for media features. *
*****************************************************************************/

View File

@ -114,6 +114,20 @@ iframe {
src="data:text/html,<body class='testcase' style='margin:0; height:300px; background:-moz-linear-gradient(top, red, black);'>">
</iframe>
<div id="testHiddenTable" class="testcase">
<table style="position:fixed; visibility:hidden; width:200px; height:200px; background:blue;">
<tr><td>Hidden stuff</td></tr>
</table>
<div style="height:300px; background:-moz-linear-gradient(top, red, black);"></div>
</div>
<div id="testTableNoBackground" class="testcase">
<table style="position:fixed; width:200px; height:200px;">
<tr><td></td></tr>
</table>
<div style="height:300px; background:-moz-linear-gradient(top, red, black);"></div>
</div>
<script>
var testcases = document.querySelectorAll("div.testcase");
var tests = [];
@ -281,6 +295,20 @@ function testClipIFRAME2(blitRegion, paintRegion) {
// "Should repaint area that was scrolled into view: " + paintRegion.toString());
}
function testHiddenTable(blitRegion, paintRegion) {
ok(blitRegion.equalsRegion(new Region([[0,0,200,180]])),
"Should blit everything that was already visible: " + blitRegion.toString());
ok(paintRegion.equalsRegion(new Region([[0,180,200,200]])),
"Should repaint area that was scrolled into view: " + paintRegion.toString());
}
function testTableNoBackground(blitRegion, paintRegion) {
ok(blitRegion.equalsRegion(new Region([[0,0,200,180]])),
"Should blit everything that was already visible: " + blitRegion.toString());
ok(paintRegion.equalsRegion(new Region([[0,180,200,200]])),
"Should repaint area that was scrolled into view: " + paintRegion.toString());
}
function clientRectToRect(cr)
{
return [cr.left, cr.top, cr.right, cr.bottom];

View File

@ -980,7 +980,7 @@ nsBulletFrame::AppendCounterText(PRInt32 aListStyleType,
PRInt32 aOrdinal,
nsString& result)
{
PRBool success;
PRBool success = PR_TRUE;
switch (aListStyleType) {
case NS_STYLE_LIST_STYLE_NONE: // used by counters code only

View File

@ -928,7 +928,7 @@ nsIFrame::DisplayCaret(nsDisplayListBuilder* aBuilder,
}
PRBool
nsFrame::HasBorder() const
nsIFrame::HasBorder() const
{
// Border images contribute to the background of the content area
// even if there's no border proper.
@ -3814,6 +3814,7 @@ SetRectProperty(nsIFrame* aFrame, nsIAtom* aProp, const nsRect& aRect)
static nsRect
ComputeOutlineAndEffectsRect(nsIFrame* aFrame, PRBool* aAnyOutlineOrEffects,
const nsRect& aOverflowRect,
const nsSize& aNewSize,
PRBool aStoreRectProperties) {
nsRect r = aOverflowRect;
*aAnyOutlineOrEffects = PR_FALSE;
@ -3823,7 +3824,7 @@ ComputeOutlineAndEffectsRect(nsIFrame* aFrame, PRBool* aAnyOutlineOrEffects,
if (boxShadows) {
nsRect shadows;
for (PRUint32 i = 0; i < boxShadows->Length(); ++i) {
nsRect tmpRect = r;
nsRect tmpRect(nsPoint(0, 0), aNewSize);
nsCSSShadowItem* shadow = boxShadows->ShadowAt(i);
// inset shadows are never painted outside the frame
@ -3987,7 +3988,8 @@ nsIFrame::CheckInvalidateSizeChange(const nsRect& aOldRect,
// Invalidate the entire old frame+outline if the frame has an outline
PRBool anyOutlineOrEffects;
nsRect r = ComputeOutlineAndEffectsRect(this, &anyOutlineOrEffects,
aOldOverflowRect, PR_FALSE);
aOldOverflowRect, aNewDesiredSize,
PR_FALSE);
if (anyOutlineOrEffects) {
r.UnionRect(aOldOverflowRect, r);
InvalidateRectForFrameSizeChange(this, r);
@ -5558,7 +5560,7 @@ nsIFrame::GetAdditionalOverflow(const nsRect& aOverflowArea,
{
nsRect overflowRect =
ComputeOutlineAndEffectsRect(this, aHasOutlineOrEffects,
aOverflowArea, PR_TRUE);
aOverflowArea, aNewSize, PR_TRUE);
// Absolute position clipping
PRBool hasAbsPosClip;
@ -6309,6 +6311,12 @@ nsFrame::DoLayout(nsBoxLayoutState& aState)
}
}
// Should we do this if IsCollapsed() is true?
nsSize size(GetSize());
desiredSize.mOverflowArea.UnionRect(desiredSize.mOverflowArea,
nsRect(nsPoint(0, 0), size));
FinishAndStoreOverflow(&desiredSize.mOverflowArea, size);
SyncLayout(aState);
return rv;

View File

@ -540,11 +540,6 @@ protected:
nsFrame(nsStyleContext* aContext);
virtual ~nsFrame();
/**
* @return PR_FALSE if this frame definitely has no borders at all
*/
PRBool HasBorder() const;
/**
* To be called by |BuildDisplayLists| of this class or derived classes to add
* a translucent overlay if this frame's content is selected.

View File

@ -882,6 +882,9 @@ nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
state.mComputedBorder.TopBottom();
aDesiredSize.mOverflowArea = nsRect(0, 0, aDesiredSize.width, aDesiredSize.height);
CheckInvalidateSizeChange(aDesiredSize);
FinishAndStoreOverflow(&aDesiredSize);
if (!InInitialReflow() && !mInner.mHadNonInitialReflow) {

View File

@ -42,6 +42,8 @@
#include "nsContainerFrame.h"
#include "gfxPoint.h"
#include "nsIDeviceContext.h"
class nsString;
class nsAbsoluteFrame;
class nsPlaceholderFrame;
@ -54,10 +56,8 @@ class nsLineBox;
// Some macros for container classes to do sanity checking on
// width/height/x/y values computed during reflow.
#ifdef DEBUG
#define CRAZY_W 500000
// 100000 lines, approximately. Assumes p2t is 15 and 15 pixels per line
#define CRAZY_H 22500000
#define CRAZY_W (1000000*nsIDeviceContext::AppUnitsPerCSSPixel())
#define CRAZY_H CRAZY_W
#define CRAZY_WIDTH(_x) (((_x) < -CRAZY_W) || ((_x) > CRAZY_W))
#define CRAZY_HEIGHT(_y) (((_y) < -CRAZY_H) || ((_y) > CRAZY_H))

View File

@ -725,6 +725,11 @@ public:
// -moz-appearance and is not chrome
nsCSSShadowArray* GetEffectiveBoxShadows();
/**
* @return PR_FALSE if this frame definitely has no borders at all
*/
PRBool HasBorder() const;
/**
* Accessor functions for geometric parent
*/

View File

@ -177,13 +177,11 @@ nsLineLayout::BeginLineReflow(nscoord aX, nscoord aY,
"calculation");
#ifdef DEBUG
if ((aWidth != NS_UNCONSTRAINEDSIZE) && CRAZY_WIDTH(aWidth)) {
NS_NOTREACHED("bad width");
nsFrame::ListTag(stdout, mBlockReflowState->frame);
printf(": Init: bad caller: width WAS %d(0x%x)\n",
aWidth, aWidth);
}
if ((aHeight != NS_UNCONSTRAINEDSIZE) && CRAZY_HEIGHT(aHeight)) {
NS_NOTREACHED("bad height");
nsFrame::ListTag(stdout, mBlockReflowState->frame);
printf(": Init: bad caller: height WAS %d(0x%x)\n",
aHeight, aHeight);

View File

@ -3,7 +3,7 @@
characters (not surrogates)
Test 2 is a non-equality test to catch the case where a single missing
glyph box is shown with the high surrogate code point. The test page
contains U+0DDBAD and the reference page contains U+0DDB0D
contains U+0DDBAD (DB36 DF0D) and the reference page U+0DDB0D (DB36 DFAD)
-->
<html>
<head>

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>Testcase, bug 438537</title>
</head>
<body>
<div style="height:40px;border:solid 2px black;-moz-border-radius: 8px;overflow:hidden">
</div>
</body>
</html>

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<title>Testcase, bug 438537</title>
<script>
window.addEventListener("MozReftestInvalidate",
function() {
var div = document.getElementById("div");
div.style.height = "40px";
document.documentElement.className = "";
}, false);
</script>
</head>
<body>
<div id="div" style="height:20px;border:solid 2px black;-moz-border-radius: 8px;overflow:hidden">
</div>
</body>
</html>

View File

@ -1,8 +1,50 @@
<html>
<head>
<style type="text/css">
body { background-color: white; opacity: 0.5; }
p { border: 10px solid rgb(10%, 20%, 30%);
body { background-color: white; margin: 0; padding: 0; }
div.mask {
position: absolute;
width: 10px;
height: 10px;
background-color: white;
}
div.tr {
right: 10px;
}
div.tl {
left: 10px;
}
div.bl {
left: 10px;
margin-top: 20px;
}
div.br {
right: 10px;
margin-top: 20px;
}
p {
margin: 10px;
padding: 0;
border: 10px solid rgb(227, 207, 187);
height: 10px;
}
p.groove, p.ridge {
border-width: 5px;
height: 20px;
}
p.groove > span, p.ridge > span {
border: 5px solid;
margin: 0;
padding: 0;
display: block;
height: 10px;
}
p.inset, p.groove, p.ridge > span {
border-color: rgb(182, 171, 160) rgb(246, 240, 234) rgb(246, 240, 234) rgb(182, 171, 160);
}
p.outset, p.ridge, p.groove > span {
border-color: rgb(246, 240, 234) rgb(182, 171, 160) rgb(182, 171, 160) rgb(246, 240, 234);
}
</style>
</head>
<body>
@ -10,9 +52,17 @@
<p style="border-style: dashed;">&nbsp;</p>
<!-- <p style="border-style: dotted;">&nbsp;</p> -->
<p style="border-style: double;">&nbsp;</p>
<p style="border-style: ridge;">&nbsp;</p>
<p style="border-style: groove;">&nbsp;</p>
<p style="border-style: inset;">&nbsp;</p>
<p style="border-style: outset;">&nbsp;</p>
<div class="mask tr"></div>
<div class="mask bl"></div>
<p class="ridge"><span>&nbsp;</span></p>
<div class="mask tr"></div>
<div class="mask bl"></div>
<p class="groove"><span>&nbsp;</span></p>
<div class="mask tr"></div>
<div class="mask bl"></div>
<p class="inset">&nbsp;</p>
<div class="mask tr"></div>
<div class="mask bl"></div>
<p class="outset">&nbsp;</p>
</body>
</html>

View File

@ -1,8 +1,41 @@
<html>
<head>
<style type="text/css">
body { background-color: white; }
p { border: 10px solid rgba(10%, 20%, 30%, 0.5);
body { background-color: white; margin: 0; padding: 0; }
p {
margin: 10px;
padding: 0;
border: 10px solid rgba(200, 160, 120, 0.5);
height: 10px;
}
/**
* XXX we cannot test the corner by this testing because when the corner
* is joined with anti-aliased, the edge isn't matching with the
* reference. The dotted line's anti-aliasing is same.
*/
/* Cover the coners by the white div element */
div {
position: absolute;
width: 10px;
height: 10px;
background-color: white;
}
div.tr {
right: 10px;
}
div.tl {
left: 10px;
}
div.bl {
left: 10px;
margin-top: 20px;
}
div.br {
right: 10px;
margin-top: 20px;
}
</style>
</head>
<body>
@ -10,9 +43,17 @@
<p style="border-style: dashed;">&nbsp;</p>
<!-- <p style="border-style: dotted;">&nbsp;</p> -->
<p style="border-style: double;">&nbsp;</p>
<div class="tr"></div>
<div class="bl"></div>
<p style="border-style: ridge;">&nbsp;</p>
<div class="tr"></div>
<div class="bl"></div>
<p style="border-style: groove;">&nbsp;</p>
<div class="tr"></div>
<div class="bl"></div>
<p style="border-style: inset;">&nbsp;</p>
<div class="tr"></div>
<div class="bl"></div>
<p style="border-style: outset;">&nbsp;</p>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!DOCTYPE HTML>
<title>Testcase, bug 514917</title>
<style type="text/css">
body > div > div {
width: 100px;
height: 100px;
-moz-box-shadow: blue 50px 50px;
}
body > div > div > div {
width: 160px;
height: 160px;
border: medium solid;
}
</style>
<body>
<div><div><div></div></div></div>
</body>

View File

@ -0,0 +1,26 @@
<!DOCTYPE HTML>
<title>Testcase, bug 514917</title>
<style type="text/css">
body > div {
overflow: auto; /* to detect too much overflow, which is the bug here */
width: 200px;
height: 200px;
}
body > div > div {
width: 100px;
height: 100px;
-moz-box-shadow: blue 50px 50px;
}
body > div > div > div {
width: 160px;
height: 160px;
border: medium solid;
}
</style>
<body>
<div><div><div></div></div></div>
</body>

View File

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>Testcase, bug 526463</title>
</head>
<body>
<div style="-moz-border-radius: 50px;overflow:hidden;background:gold">
outer div
<div>inner div</div>
</div>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<title>Testcase, bug 526463</title>
<script>
window.addEventListener("MozReftestInvalidate",
function() {
var div = document.getElementById("div");
div.style.display = "";
document.documentElement.className = "";
}, false);
</script>
</head>
<body>
<div style="-moz-border-radius: 50px;overflow:hidden;background:gold">
outer div
<div id="div" style="display:none">inner div</div>
</div>
</body>
</html>

View File

@ -0,0 +1,7 @@
<!DOCTYPE HTML>
<style type="text/css">
html, body { margin: 0; padding: 0; border: none; }
</style>
<div style="position: absolute; width: 200px; height: 400px; top: 100px; left: 100px; -moz-box-shadow: 0 0 20px blue">A</div>
<div style="position: absolute; width: 100px; height: 400px; top: 100px; left: 400px; -moz-box-shadow: 0 0 20px blue">B</div>

View File

@ -0,0 +1,12 @@
<!DOCTYPE HTML>
<style type="text/css">
html, body { margin: 0; padding: 0; border: none; }
</style>
<div style="margin: 100px; height: 400px; width: 400px; display: -moz-box; -moz-box-orient: horizontal">
<div style="width: 200px; -moz-box-shadow: 0 0 20px blue">A</div>
<div style="width: 100px"></div>
<div style="-moz-box-flex: 1; -moz-box-shadow: 0 0 20px blue">B</div>
</div>

View File

@ -1059,6 +1059,7 @@ fails == 428810-3e-rtl-insets.html 428810-empty-rtl-insets-ref.html # bug 179596
== 431341-2.html 431341-2-ref.html
== 431520-1.html 431520-1-ref.html
== 431948-1.html 431948-1-ref.html
== 438537-1.html 438537-1-ref.html
== 440112.html 440112-ref.html
== 433640-1.html 433640-1-ref.html
== 433700.html 433700-ref.html
@ -1148,7 +1149,7 @@ fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 456147.xul 456147-ref.html # bug 458047
== 459613-1.html 459613-1-ref.html
== 460012-1.html 460012-1-ref.html
== 461266-1.html 461266-1-ref.html
fails == 461512-1.html 461512-1-ref.html # Bug 461512
== 461512-1.html 461512-1-ref.html
== 462844-1.html 462844-ref.html
== 462844-2.html 462844-ref.html
== 462844-3.html 462844-ref.html
@ -1329,6 +1330,7 @@ fails-if(MOZ_WIDGET_TOOLKIT!="cocoa") == 488692-1.html 488692-1-ref.html # needs
== 513318-1.xul 513318-1-ref.xul
!= 513318-2.xul 513318-2-ref.xul
!= 513318-3.xul 513318-3-ref.xul
== 514917-1.html 514917-1-ref.html
== 520421-1.html 520421-1-ref.html
== 520563-1.xhtml 520563-1-ref.xhtml
== 521525-1.html 521525-1-ref.html
@ -1339,6 +1341,7 @@ fails-if(MOZ_WIDGET_TOOLKIT!="cocoa") == 488692-1.html 488692-1-ref.html # needs
== 523096-1.html 523096-1-ref.html
== 523468-1.html 523468-1-ref.html
== 524175-1.html 524175-1-ref.html
== 526463-1.html 526463-1-ref.html
== 527464-1.html 527464-ref.html
== 528038-1a.html 528038-1-ref.html
== 528038-1b.html 528038-1-ref.html
@ -1348,4 +1351,5 @@ fails-if(MOZ_WIDGET_TOOLKIT!="cocoa") == 488692-1.html 488692-1-ref.html # needs
== 528038-1f.html 528038-1-ref.html
== 528038-2.html 528038-2-ref.html
== 530686-1.html 530686-1-ref.html
== 531098-1.html 531098-1-ref.html
== 531371-1.html 531371-1-ref.html

View File

@ -15,18 +15,18 @@ body {
@font-face {
font-family: test-regular;
src: local("Helvetica Neue"), local("Bitstream Vera Sans"), local("Bitstream Vera Sans Roman"), local("Arial");
src: local("Helvetica Neue"), local("Bitstream Vera Sans"), local("Bitstream Vera Sans Roman"), local("Free Sans"), local("Arial");
}
/* use Helvetica on the Mac, since Futura has no bold face on 10.4, 10.5 */
@font-face {
font-family: test-bold;
src: local("Helvetica Neue Bold"), local("Bitstream Vera Sans Bold"), local("Arial Bold");
src: local("Helvetica Neue Bold"), local("Bitstream Vera Sans Bold"), local("Free Sans Bold"), local("Arial Bold");
}
@font-face {
font-family: test-italic;
src: local("Helvetica Neue Italic"), local("Bitstream Vera Sans Oblique"), local("Arial Italic");
src: local("Helvetica Neue Italic"), local("Bitstream Vera Sans Oblique"), local("Free Sans Oblique"), local("Arial Italic");
}
.regular { font-family: test-regular, serif; }

View File

@ -13,7 +13,7 @@ body {
/* use full names */
p { font-family: Helvetica Neue, Bitstream Vera Sans, Arial, serif; }
p { font-family: Helvetica Neue, Bitstream Vera Sans, FreeSans, Arial, serif; }
.regular { }
.bold { font-weight: bold; }
@ -35,4 +35,4 @@ p { font-family: Helvetica Neue, Bitstream Vera Sans, Arial, serif; }
<p class="italic">This should be an italic sans-serif face</p>
</body>
</html>
</html>

View File

@ -15,18 +15,18 @@ body {
@font-face {
font-family: test-regular;
src: local(Helvetica Neue), local(Bitstream Vera Sans), local(Bitstream Vera Sans Roman), local(Arial);
src: local(Helvetica Neue), local(Bitstream Vera Sans), local(Bitstream Vera Sans Roman), local(Free Sans), local(Arial);
}
/* use Helvetica on the Mac, since Futura has no bold face on 10.4, 10.5 */
@font-face {
font-family: test-bold;
src: local(Helvetica Neue Bold), local(Bitstream Vera Sans Bold), local(Arial Bold);
src: local(Helvetica Neue Bold), local(Bitstream Vera Sans Bold), local(Free Sans Bold), local(Arial Bold);
}
@font-face {
font-family: test-italic;
src: local(Helvetica Neue Italic), local(Bitstream Vera Sans Oblique), local(Arial Italic);
src: local(Helvetica Neue Italic), local(Bitstream Vera Sans Oblique), local(Free Sans Oblique), local(Arial Italic);
}
.regular { font-family: test-regular, serif; }

View File

@ -51,3 +51,7 @@ fails == border-separate-opacity-table-column.html border-separate-opacity-table
== border-separate-opacity-table-row-group.html border-separate-opacity-table-row-group-ref.html
== border-separate-opacity-table-row.html border-separate-opacity-table-row-ref.html
== border-separate-opacity-table.html border-separate-opacity-table-ref.html
!= scrollable-rowgroup-collapse-background.html scrollable-rowgroup-collapse-notref.html
!= scrollable-rowgroup-collapse-border.html scrollable-rowgroup-collapse-notref.html
!= scrollable-rowgroup-separate-background.html scrollable-rowgroup-separate-notref.html
!= scrollable-rowgroup-separate-border.html scrollable-rowgroup-separate-notref.html

View File

@ -0,0 +1,6 @@
<title>Testcase for assertion fix in bug 531461</title>
<table style="border-collapse:collapse">
<tbody style="overflow:scroll; background:yellow">
<tr><td>Cell</td></tr>
</tbody>
</table>

View File

@ -0,0 +1,6 @@
<title>Testcase for assertion fix in bug 531461</title>
<table style="border-collapse:collapse">
<tbody style="overflow:scroll; border: medium solid black">
<tr><td>Cell</td></tr>
</tbody>
</table>

View File

@ -0,0 +1,6 @@
<title>Testcase for assertion fix in bug 531461</title>
<table style="border-collapse:collapse">
<tbody style="overflow:scroll">
<tr><td>Cell</td></tr>
</tbody>
</table>

View File

@ -0,0 +1,6 @@
<title>Testcase for assertion fix in bug 531461</title>
<table>
<tbody style="overflow:scroll; background:yellow">
<tr><td>Cell</td></tr>
</tbody>
</table>

View File

@ -0,0 +1,6 @@
<title>Testcase for assertion fix in bug 531461</title>
<table>
<tbody style="overflow:scroll; border: medium solid black">
<tr><td>Cell</td></tr>
</tbody>
</table>

View File

@ -0,0 +1,6 @@
<title>Testcase for assertion fix in bug 531461</title>
<table>
<tbody style="overflow:scroll">
<tr><td>Cell</td></tr>
</tbody>
</table>

View File

@ -216,9 +216,7 @@ public:
nsCSSPage mPage;
nsCSSBreaks mBreaks;
nsCSSXUL mXUL;
#ifdef MOZ_SVG
nsCSSSVG mSVG;
#endif
nsCSSColumn mColumn;
/**

View File

@ -1098,7 +1098,6 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty,
break;
}
#ifdef MOZ_SVG
case eCSSProperty_marker: {
const nsCSSValue &endValue =
*data->ValueStorageFor(eCSSProperty_marker_end);
@ -1110,7 +1109,6 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty,
AppendValueToString(eCSSProperty_marker_end, aValue);
break;
}
#endif
default:
NS_NOTREACHED("no other shorthands");
break;

View File

@ -592,7 +592,6 @@ CSS_KEY(-moz-win-communicationstext, _moz_win_communicationstext)
CSS_KEY(-moz-win-glass, _moz_win_glass)
CSS_KEY(-moz-mac-unified-toolbar, _moz_mac_unified_toolbar)
#ifdef MOZ_SVG
CSS_KEY(alphabetic, alphabetic)
CSS_KEY(bevel, bevel)
CSS_KEY(butt, butt)
@ -620,4 +619,3 @@ CSS_KEY(text-after-edge, text_after_edge)
CSS_KEY(text-before-edge, text_before_edge)
CSS_KEY(use-script, use_script)
CSS_KEY(-moz-crisp-edges, _moz_crisp_edges)
#endif

View File

@ -2697,7 +2697,6 @@ CSS_PROP_FONT(
#endif
#endif
#ifdef MOZ_SVG
// XXX treat SVG's CSS Properties as internal for now.
// Do we want to create an nsIDOMSVGCSS2Properties interface?
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
@ -3037,7 +3036,6 @@ CSS_PROP_SVG(
offsetof(nsStyleSVG, mTextRendering),
eStyleAnimType_EnumU8)
#endif /* !defined (CSS_PROP_LIST_EXCLUDE_INTERNAL) */
#endif
// Callers that want information on the properties that are in
// the style structs but not in the nsCSS* structs should define

Some files were not shown because too many files have changed in this diff Show More