diff --git a/browser/base/content/browser-fullZoom.js b/browser/base/content/browser-fullZoom.js index d150f18f9b61..8ade7f68650e 100644 --- a/browser/base/content/browser-fullZoom.js +++ b/browser/base/content/browser-fullZoom.js @@ -333,13 +333,13 @@ var FullZoom = { * one. **/ _applyPrefToSetting: function FullZoom__applyPrefToSetting(aValue, aBrowser) { - if (!this.siteSpecific && !this._inPrivateBrowsing) + if ((!this.siteSpecific && !this._inPrivateBrowsing) || + gInPrintPreviewMode) return; var browser = aBrowser || gBrowser.selectedBrowser; try { - if (gInPrintPreviewMode || - browser.contentDocument instanceof Ci.nsIImageDocument || + if (browser.contentDocument instanceof Ci.nsIImageDocument || this._inPrivateBrowsing) ZoomManager.setZoomForBrowser(browser, 1); else if (typeof aValue != "undefined") diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 10a5b0be3b3e..37f5de130f33 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -1101,14 +1101,18 @@ function HandleAppCommandEvent(evt) { } function prepareForStartup() { + var os = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService); + gBrowser.addEventListener("DOMUpdatePageReport", gPopupBlockerObserver.onUpdatePageReport, false); // Note: we need to listen to untrusted events, because the pluginfinder XBL // binding can't fire trusted ones (runs with page privileges). gBrowser.addEventListener("PluginNotFound", gMissingPluginInstaller.newMissingPlugin, true, true); + gBrowser.addEventListener("PluginCrashed", gMissingPluginInstaller.pluginInstanceCrashed, true, true); gBrowser.addEventListener("PluginBlocklisted", gMissingPluginInstaller.newMissingPlugin, true, true); gBrowser.addEventListener("PluginOutdated", gMissingPluginInstaller.newMissingPlugin, true, true); gBrowser.addEventListener("PluginDisabled", gMissingPluginInstaller.newDisabledPlugin, true, true); gBrowser.addEventListener("NewPluginInstalled", gMissingPluginInstaller.refreshBrowser, false); + os.addObserver(gMissingPluginInstaller.pluginCrashed, "plugin-crashed", false); window.addEventListener("AppCommand", HandleAppCommandEvent, true); var webNavigation; @@ -1152,7 +1156,6 @@ function prepareForStartup() { // progress notifications for back/forward button updating webNavigation.sessionHistory = Components.classes["@mozilla.org/browser/shistory;1"] .createInstance(Components.interfaces.nsISHistory); - var os = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService); os.addObserver(gBrowser.browsers[0], "browser:purge-session-history", false); // remove the disablehistory attribute so the browser cleans up, as @@ -2536,11 +2539,34 @@ function BrowserReloadWithFlags(reloadFlags) { } var PrintPreviewListener = { + _printPreviewTab: null, + _tabBeforePrintPreview: null, + + getPrintPreviewBrowser: function () { + if (!this._printPreviewTab) { + this._tabBeforePrintPreview = gBrowser.selectedTab; + this._printPreviewTab = gBrowser.loadOneTab("about:blank", + { inBackground: false }); + gBrowser.selectedTab = this._printPreviewTab; + } + return gBrowser.getBrowserForTab(this._printPreviewTab); + }, + getSourceBrowser: function () { + return this._tabBeforePrintPreview ? + this._tabBeforePrintPreview.linkedBrowser : gBrowser.selectedBrowser; + }, + getNavToolbox: function () { + return gNavToolbox; + }, onEnter: function () { gInPrintPreviewMode = true; this._toggleAffectedChrome(); }, onExit: function () { + gBrowser.selectedTab = this._tabBeforePrintPreview; + this._tabBeforePrintPreview = null; + gBrowser.removeTab(this._printPreviewTab); + this._printPreviewTab = null; gInPrintPreviewMode = false; this._toggleAffectedChrome(); }, @@ -2572,8 +2598,7 @@ var PrintPreviewListener = { this._chromeState.sidebarOpen = !sidebar.hidden; this._sidebarCommand = sidebar.getAttribute("sidebarcommand"); - this._chromeState.hadTabStrip = gBrowser.getStripVisibility(); - gBrowser.setStripVisibilityTo(false); + gBrowser.mStrip.setAttribute("moz-collapsed", "true"); var notificationBox = gBrowser.getNotificationBox(); this._chromeState.notificationsOpen = !notificationBox.notificationsHidden; @@ -2588,8 +2613,7 @@ var PrintPreviewListener = { gFindBar.close(); }, _showChrome: function () { - if (this._chromeState.hadTabStrip) - gBrowser.setStripVisibilityTo(true); + gBrowser.mStrip.removeAttribute("moz-collapsed"); if (this._chromeState.notificationsOpen) gBrowser.getNotificationBox().notificationsHidden = false; @@ -2602,11 +2626,6 @@ var PrintPreviewListener = { } } -function getPPBrowser() -{ - return gBrowser; -} - function getMarkupDocumentViewer() { return gBrowser.markupDocumentViewer; @@ -5977,7 +5996,23 @@ function getPluginInfo(pluginElement) var gMissingPluginInstaller = { + get CrashSubmit() { + delete this.CrashSubmit; + Cu.import("resource://gre/modules/CrashSubmit.jsm", this); + return this.CrashSubmit; + }, + + get crashReportHelpURL() { + delete this.crashReportHelpURL; + let url = formatURL("app.support.baseURL", true); + url += "plugin-crashed"; + this.crashReportHelpURL = url; + return this.crashReportHelpURL; + }, + installSinglePlugin: function (aEvent) { + if (!aEvent.isTrusted) + return; var missingPluginsArray = {}; var pluginInfo = getPluginInfo(aEvent.target); @@ -5993,6 +6028,8 @@ var gMissingPluginInstaller = { }, managePlugins: function (aEvent) { + if (!aEvent.isTrusted) + return; BrowserOpenAddonsMgr("plugins"); aEvent.stopPropagation(); }, @@ -6014,6 +6051,11 @@ var gMissingPluginInstaller = { aEvent.target.addEventListener("click", gMissingPluginInstaller.installSinglePlugin, true); + aEvent.target.addEventListener("keydown", + function(evt) { if (evt.keyCode == evt.DOM_VK_RETURN) + gMissingPluginInstaller.installSinglePlugin(evt) }, + true); + } let hideBarPrefName = aEvent.type == "PluginOutdated" ? @@ -6137,6 +6179,133 @@ var gMissingPluginInstaller = { aEvent.target.addEventListener("click", gMissingPluginInstaller.managePlugins, true); + aEvent.target.addEventListener("keydown", + function(evt) { if (evt.keyCode == evt.DOM_VK_RETURN) + gMissingPluginInstaller.managePlugins(evt) }, + true); + }, + + // Crashed-plugin observer. Notified once per plugin crash, before events + // are dispatched to individual plugin instances. + pluginCrashed : function(subject, topic, data) { + let propertyBag = subject; + if (!(propertyBag instanceof Ci.nsIPropertyBag2) || + !(propertyBag instanceof Ci.nsIWritablePropertyBag2)) + return; + +#ifdef MOZ_CRASHREPORTER + let minidumpID = subject.getPropertyAsAString("minidumpID"); + let submitReports = gCrashReporter.submitReports; + // The crash reporter wants a DOM element it can append an IFRAME to, + // which it uses to submit a form. Let's just give it gBrowser. + if (submitReports) + gMissingPluginInstaller.CrashSubmit.submit(minidumpID, gBrowser, null, null); + propertyBag.setPropertyAsBool("submittedCrashReport", submitReports); +#endif + }, + + pluginInstanceCrashed: function (aEvent) { + // Evil content could fire a fake event at us, ignore them. + if (!aEvent.isTrusted) + return; + + if (!(aEvent instanceof Ci.nsIDOMDataContainerEvent)) + return; + + let submittedReport = aEvent.getData("submittedCrashReport"); + let pluginName = aEvent.getData("pluginName"); + + // We're expecting this to be a plugin. + let plugin = aEvent.target; + if (!(plugin instanceof Ci.nsIObjectLoadingContent)) + return; + + // Force a style flush, so that we ensure our binding is attached. + plugin.clientTop; + + let messageString = gNavigatorBundle.getFormattedString("crashedpluginsMessage.title", [pluginName]); + + // + // Configure the crashed-plugin placeholder. + // + let doc = plugin.ownerDocument; + let overlay = doc.getAnonymousElementByAttribute(plugin, "class", "mainBox"); + + // The binding has role="link" here, since missing/disabled/blocked + // plugin UI has a onclick handler on the whole thing. This isn't needed + // for the plugin-crashed UI, because we use actual HTML links in the text. + overlay.removeAttribute("role"); + +#ifdef MOZ_CRASHREPORTER + let helpClass = submittedReport ? "submitLink" : "notSubmitLink"; + let helpLink = doc.getAnonymousElementByAttribute(plugin, "class", helpClass); + helpLink.href = gMissingPluginInstaller.crashReportHelpURL; + let showClass = submittedReport ? "msg msgSubmitted" : "msg msgNotSubmitted"; + let textToShow = doc.getAnonymousElementByAttribute(plugin, "class", showClass); + textToShow.style.display = "block"; +#endif + + let crashText = doc.getAnonymousElementByAttribute(plugin, "class", "msg msgCrashed"); + crashText.textContent = messageString; + + let link = doc.getAnonymousElementByAttribute(plugin, "class", "reloadLink"); + link.addEventListener("click", function(e) { if (e.isTrusted) browser.reload(); }, true); + + let browser = gBrowser.getBrowserForDocument(plugin.ownerDocument + .defaultView.top.document); + let notificationBox = gBrowser.getNotificationBox(browser); + + // Is the 's size too small to hold what we want to show? + let pluginRect = plugin.getBoundingClientRect(); + // XXX bug 446693. The text-shadow on the submitted-report text at + // the bottom causes scrollHeight to be larger than it should be. + let isObjectTooSmall = (overlay.scrollWidth > pluginRect.width) || + (overlay.scrollHeight - 5 > pluginRect.height); + if (isObjectTooSmall) { + // Hide the overlay's contents. Use visibility style, so that it + // doesn't collapse down to 0x0. + overlay.style.visibility = "hidden"; + // If another plugin on the page was large enough to show our UI, we + // don't want to show a notification bar. + if (!doc.mozNoPluginCrashedNotification) + showNotificationBar(); + } else { + // If a previous plugin on the page was too small and resulted in + // adding a notification bar, then remove it because this plugin + // instance it big enough to serve as in-content notification. + hideNotificationBar(); + doc.mozNoPluginCrashedNotification = true; + } + + function hideNotificationBar() { + let notification = notificationBox.getNotificationWithValue("plugin-crashed"); + if (notification) + notificationBox.removeNotification(notification, true); + } + + function showNotificationBar() { + // If there's already an existing notification bar, don't do anything. + let notification = notificationBox.getNotificationWithValue("plugin-crashed"); + if (notification) + return; + + // Configure the notification bar + let priority = notificationBox.PRIORITY_WARNING_MEDIUM; + let iconURL = "chrome://mozapps/skin/plugins/pluginGeneric-16.png"; + let label = gNavigatorBundle.getString("crashedpluginsMessage.reloadButton.label"); + let accessKey = gNavigatorBundle.getString("crashedpluginsMessage.reloadButton.accesskey"); + + let buttons = [{ + label: label, + accessKey: accessKey, + popup: null, + callback: function() { browser.reload(); }, + }]; + + let notification = notificationBox.appendNotification(messageString, "plugin-crashed", + iconURL, priority, buttons); + } + }, refreshBrowser: function (aEvent) { diff --git a/browser/components/preferences/advanced.js b/browser/components/preferences/advanced.js index 980a69b8a005..d13150fa4f4b 100644 --- a/browser/components/preferences/advanced.js +++ b/browser/components/preferences/advanced.js @@ -66,6 +66,9 @@ var gAdvancedPane = { this.updateModeItems(); #endif this.updateOfflineApps(); +#ifdef MOZ_CRASHREPORTER + this.initSubmitCrashes(); +#endif }, /** @@ -139,6 +142,35 @@ var gAdvancedPane = { return checkbox.checked ? (this._storedSpellCheck == 2 ? 2 : 1) : 0; }, + /** + * + */ + initSubmitCrashes: function () + { + var checkbox = document.getElementById("submitCrashesBox"); + try { + var cr = Components.classes["@mozilla.org/toolkit/crash-reporter;1"]. + getService(Components.interfaces.nsICrashReporter); + checkbox.checked = cr.submitReports; + } catch (e) { + checkbox.style.display = "none"; + } + }, + + /** + * + */ + updateSubmitCrashes: function () + { + var checkbox = document.getElementById("submitCrashesBox"); + try { + var cr = Components.classes["@mozilla.org/toolkit/crash-reporter;1"]. + getService(Components.interfaces.nsICrashReporter); + cr.submitReports = checkbox.checked; + } catch (e) { } + }, + + // NETWORK TAB /* diff --git a/browser/components/preferences/advanced.xul b/browser/components/preferences/advanced.xul index 8ea529675241..fc758706848a 100644 --- a/browser/components/preferences/advanced.xul +++ b/browser/components/preferences/advanced.xul @@ -184,7 +184,7 @@ #ifdef HAVE_SHELL_SERVICE - + @@ -196,6 +196,11 @@ oncommand="gAdvancedPane.checkNow()" preference="pref.general.disable_button.default_browser"/> +#ifdef MOZ_CRASHREPORTER + +#endif #endif diff --git a/browser/locales/en-US/chrome/browser/browser.properties b/browser/locales/en-US/chrome/browser/browser.properties index 0550d4fcf5d6..19974e9a1021 100644 --- a/browser/locales/en-US/chrome/browser/browser.properties +++ b/browser/locales/en-US/chrome/browser/browser.properties @@ -74,6 +74,9 @@ blockedpluginsMessage.infoButton.label=Details… blockedpluginsMessage.infoButton.accesskey=D blockedpluginsMessage.searchButton.label=Update Plugins… blockedpluginsMessage.searchButton.accesskey=U +crashedpluginsMessage.title=The %S plugin has crashed. +crashedpluginsMessage.reloadButton.label=Reload page +crashedpluginsMessage.reloadButton.accesskey=R # Sanitize # LOCALIZATION NOTE (sanitizeDialog2.everything.title): When "Time range to diff --git a/browser/locales/en-US/chrome/browser/preferences/advanced.dtd b/browser/locales/en-US/chrome/browser/preferences/advanced.dtd index 71210c46152e..3cf951cabd7f 100644 --- a/browser/locales/en-US/chrome/browser/preferences/advanced.dtd +++ b/browser/locales/en-US/chrome/browser/preferences/advanced.dtd @@ -25,6 +25,8 @@ + + diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index 9850fcd593ac..39be5a405cbb 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -623,15 +623,9 @@ HAS_OGLES = @HAS_OGLES@ MOZ_DISTRIBUTION_ID = @MOZ_DISTRIBUTION_ID@ -NS_OSSO = @NS_OSSO@ -MOZ_PLATFORM_HILDON = @MOZ_PLATFORM_HILDON@ - -LIBHILDONMIME_CFLAGS = @LIBHILDONMIME_CFLAGS@ -LIBHILDONMIME_LIBS = @LIBHILDONMIME_LIBS@ -LIBOSSO_CFLAGS = @LIBOSSO_CFLAGS@ -LIBOSSO_LIBS = @LIBOSSO_LIBS@ -LIBHILDONFM_CFLAGS = @LIBHILDONFM_CFLAGS@ -LIBHILDONFM_LIBS = @LIBHILDONFM_LIBS@ +MOZ_PLATFORM_MAEMO = @MOZ_PLATFORM_MAEMO@ +MOZ_PLATFORM_MAEMO_CFLAGS = @MOZ_PLATFORM_MAEMO_CFLAGS@ +MOZ_PLATFORM_MAEMO_LIBS = @MOZ_PLATFORM_MAEMO_LIBS@ MOZ_ENABLE_LIBCONIC = @MOZ_ENABLE_LIBCONIC@ LIBCONIC_CFLAGS = @LIBCONIC_CFLAGS@ diff --git a/config/rules.mk b/config/rules.mk index 002650776f61..c6b6d742af41 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -380,6 +380,7 @@ _OBJS = \ $(JRI_STUB_CFILES) \ $(addsuffix .$(OBJ_SUFFIX), $(JMC_GEN)) \ $(CSRCS:.c=.$(OBJ_SUFFIX)) \ + $(SSRCS:.S=.$(OBJ_SUFFIX)) \ $(patsubst %.cc,%.$(OBJ_SUFFIX),$(CPPSRCS:.cpp=.$(OBJ_SUFFIX))) \ $(CMSRCS:.m=.$(OBJ_SUFFIX)) \ $(CMMSRCS:.mm=.$(OBJ_SUFFIX)) \ diff --git a/config/system-headers b/config/system-headers index 890ead5340bc..d695f52f1297 100644 --- a/config/system-headers +++ b/config/system-headers @@ -1009,12 +1009,10 @@ hunspell.hxx #if MOZ_NATIVE_BZ2==1 bzlib.h #endif -#ifdef MOZ_PLATFORM_HILDON +#if (MOZ_PLATFORM_MAEMO == 5) hildon-uri.h hildon-mime.h hildon-file-chooser-dialog.h -#endif -#ifdef NS_OSSO libosso.h osso-mem.h #endif diff --git a/configure.in b/configure.in index 0c7d4719c877..a641ea9572bf 100644 --- a/configure.in +++ b/configure.in @@ -403,28 +403,28 @@ else AC_CHECK_PROGS(STRIP, strip, :) AC_CHECK_PROGS(WINDRES, windres, :) if test -z "$HOST_CC"; then - HOST_CC="$CC" + HOST_CC='$(CC)' fi if test -z "$HOST_CFLAGS"; then - HOST_CFLAGS="$CFLAGS" + HOST_CFLAGS='$(CFLAGS)' fi if test -z "$HOST_CXX"; then - HOST_CXX="$CXX" + HOST_CXX='$(CXX)' fi if test -z "$HOST_CXXFLAGS"; then - HOST_CXXFLAGS="$CXXFLAGS" + HOST_CXXFLAGS='$(CXXFLAGS)' fi if test -z "$HOST_LDFLAGS"; then - HOST_LDFLAGS="$LDFLAGS" + HOST_LDFLAGS='$(LDFLAGS)' fi if test -z "$HOST_RANLIB"; then - HOST_RANLIB="$RANLIB" + HOST_RANLIB='$(RANLIB)' fi if test -z "$HOST_AR"; then - HOST_AR="$AR" + HOST_AR='$(AR)' fi if test -z "$HOST_AR_FLAGS"; then - HOST_AR_FLAGS="$AR_FLAGS" + HOST_AR_FLAGS='$(AR_FLAGS)' fi fi @@ -1730,7 +1730,6 @@ case "$host" in HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11" HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"' HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" - MOZ_FIX_LINK_PATHS='-Wl,-executable_path,$(LIBXUL_DIST)/bin' ;; *-linux*|*-kfreebsd*-gnu) @@ -1916,6 +1915,7 @@ case "$target" in LDFLAGS=$_SAVE_LDFLAGS fi + MOZ_FIX_LINK_PATHS='-Wl,-executable_path,$(LIBXUL_DIST)/bin' ;; *-freebsd*) @@ -4901,10 +4901,10 @@ cairo-cocoa) AC_DEFINE(XP_MACOSX) TK_LIBS='-framework Carbon -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework AddressBook' TK_CFLAGS="-DNO_X11" - LDFLAGS="$LDFLAGS -framework Cocoa" + LDFLAGS="$LDFLAGS -framework Cocoa -lobjc" CFLAGS="$CFLAGS $TK_CFLAGS" CXXFLAGS="$CXXFLAGS $TK_CFLAGS" - LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL -lobjc' + LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL' MOZ_FS_LAYOUT=bundle MOZ_WEBGL=1 ;; @@ -6408,47 +6408,78 @@ AC_SUBST(LIBCONIC_CFLAGS) AC_SUBST(LIBCONIC_LIBS) dnl ======================================================== -dnl = Hildon and OSSO checks +dnl = Maemo checks dnl ======================================================== -PKG_CHECK_MODULES(LIBHILDONMIME,libhildonmime, - MOZ_PLATFORM_HILDON=1, - MOZ_PLATFORM_HILDON=) -if test $MOZ_PLATFORM_HILDON; then - AC_DEFINE(MOZ_PLATFORM_HILDON) - X11_COMPOSITED_PLUGINS="yes" + +MAEMO_SDK_TARGET_VER=-1 + +MOZ_ARG_WITH_STRING(maemo-version, +[ --with-maemo-version=MAEMO_SDK_TARGET_VER + Maemo SDK Version], + MAEMO_SDK_TARGET_VER=$withval) + +case "$MAEMO_SDK_TARGET_VER" in +5) + MOZ_PLATFORM_MAEMO=5 + ;; + +6) + MOZ_PLATFORM_MAEMO=6 + ;; + +-1) + dnl We aren't compiling for Maemo, move on. + ;; +*) + AC_MSG_ERROR([Unknown Maemo Version. Try setting --with-maemo-version to 5 or 6.]) + ;; +esac + +if test $MOZ_PLATFORM_MAEMO; then + AC_DEFINE_UNQUOTED([MOZ_PLATFORM_MAEMO], $MOZ_PLATFORM_MAEMO) + + if test -z "$MOZ_ENABLE_DBUS"; then + AC_MSG_ERROR([DBus is required when building for Maemo]) + fi + + MOZ_GFX_OPTIMIZE_MOBILE=1 + MOZ_WEBGL_GLX= + + if test $MOZ_PLATFORM_MAEMO = 5; then + dnl if we have Xcomposite we should also have Xdamage and Xfixes + AC_CHECK_HEADERS([X11/extensions/Xdamage.h], [], + [AC_MSG_ERROR([Couldn't find X11/extensions/Xdamage.h which is required for composited plugins.])]) + AC_CHECK_LIB(Xcomposite, XCompositeRedirectWindow, [XCOMPOSITE_LIBS="-lXcomposite -lXdamage -lXfixes"], + [MISSING_X="$MISSING_X -lXcomposite"], $XLIBS) + + AC_SUBST(XCOMPOSITE_LIBS) + + PKG_CHECK_MODULES(LIBHILDONMIME,libhildonmime, _LIB_FOUND=1, _LIB_FOUND=) + MOZ_PLATFORM_MAEMO_LIBS="$MOZ_PLATFORM_MAEMO_LIBS $LIBHILDONMIME_LIBS" + MOZ_PLATFORM_MAEMO_CFLAGS="$MOZ_PLATFORM_MAEMO_CFLAGS $LIBHILDONMIME_CFLAGS" + if test -z "$_LIB_FOUND"; then + AC_MSG_ERROR([Hildon Mime is required when building for Maemo]) + fi + + + PKG_CHECK_MODULES(LIBOSSO,libosso, _LIB_FOUND=1, _LIB_FOUND=) + MOZ_PLATFORM_MAEMO_LIBS="$MOZ_PLATFORM_MAEMO_LIBS $LIBOSSO_LIBS" + MOZ_PLATFORM_MAEMO_CFLAGS="$MOZ_PLATFORM_MAEMO_CFLAGS $LIBOSSO_CFLAGS" + if test -z "$_LIB_FOUND"; then + AC_MSG_ERROR([LibOSSO is required when building for Maemo]) + fi + + PKG_CHECK_MODULES(LIBHILDONFM,hildon-fm-2, _LIB_FOUND=1, _LIB_FOUND=) + MOZ_PLATFORM_MAEMO_LIBS="$MOZ_PLATFORM_MAEMO_LIBS $LIBHILDONFM_LIBS" + MOZ_PLATFORM_MAEMO_CFLAGS="$MOZ_PLATFORM_MAEMO_CFLAGS $LIBHILDONFM_CFLAGS" + if test -z "$_LIB_FOUND"; then + AC_MSG_ERROR([Hildon FM-2 is required when building for Maemo]) + fi + fi + + AC_SUBST(MOZ_PLATFORM_MAEMO_LIBS) + AC_SUBST(MOZ_PLATFORM_MAEMO_CFLAGS) fi -AC_SUBST(LIBHILDONMIME_CFLAGS) -AC_SUBST(LIBHILDONMIME_LIBS) - -if test "$X11_COMPOSITED_PLUGINS" = "yes"; then - dnl if we have Xcomposite we should also have Xdamage and Xfixes - AC_CHECK_HEADERS([X11/extensions/Xdamage.h], [], - [AC_MSG_ERROR([Couldn't find X11/extentsions/Xdamage.h which is required for composited plugins.])]) - AC_CHECK_LIB(Xcomposite, XCompositeRedirectWindow, [XCOMPOSITE_LIBS="-lXcomposite -lXdamage -lXfixes"], - [MISSING_X="$MISSING_X -lXcomposite"], $XLIBS) -fi -AC_SUBST(XCOMPOSITE_LIBS) - -PKG_CHECK_MODULES(LIBOSSO,libosso, - NS_OSSO=1, - NS_OSSO=) - -if test $NS_OSSO; then - if test -z "$MOZ_ENABLE_DBUS"; then - AC_MSG_ERROR([DBus is required when building for OSSO]) - fi - AC_DEFINE(NS_OSSO) - MOZ_GFX_OPTIMIZE_MOBILE=1 - MOZ_WEBGL_GLX= -fi -AC_SUBST(LIBOSSO_CFLAGS) -AC_SUBST(LIBOSSO_LIBS) - -PKG_CHECK_MODULES(LIBHILDONFM,hildon-fm-2, - NS_HILDONFM=1, - NS_HILDONFM=) -AC_SUBST(LIBHILDONFM_CFLAGS) -AC_SUBST(LIBHILDONFM_LIBS) dnl ======================================================== dnl = faststripe theme @@ -8018,9 +8049,7 @@ AC_SUBST(NS_USE_NATIVE) AC_SUBST(MOZ_WIDGET_TOOLKIT) AC_SUBST(MOZ_UPDATE_XTERM) AC_SUBST(MINIMO) -AC_SUBST(MOZ_PLATFORM_HILDON) -AC_SUBST(NS_OSSO) -AC_SUBST(NS_MAEMO_LOCATION) +AC_SUBST(MOZ_PLATFORM_MAEMO) AC_SUBST(MOZ_AUTH_EXTENSION) AC_SUBST(MOZ_MATHML) AC_SUBST(MOZ_PERMISSIONS) diff --git a/content/base/public/nsIObjectLoadingContent.idl b/content/base/public/nsIObjectLoadingContent.idl index f0a83e888ce1..30234fd64084 100644 --- a/content/base/public/nsIObjectLoadingContent.idl +++ b/content/base/public/nsIObjectLoadingContent.idl @@ -124,5 +124,6 @@ interface nsIObjectLoadingContent : nsISupports */ [noscript] nsIFrame getPrintFrame(); - [noscript] void pluginCrashed(); + [noscript] void pluginCrashed(in AString pluginName, + in boolean submittedCrashReport); }; diff --git a/content/base/src/nsContentList.cpp b/content/base/src/nsContentList.cpp index d5b7b4862345..d795d56a94f4 100644 --- a/content/base/src/nsContentList.cpp +++ b/content/base/src/nsContentList.cpp @@ -296,6 +296,109 @@ NS_GetContentList(nsINode* aRootNode, nsIAtom* aMatchAtom, return list; } +// Hashtable for storing nsCacheableFuncStringContentList +static PLDHashTable gFuncStringContentListHashTable; + +struct FuncStringContentListHashEntry : public PLDHashEntryHdr +{ + nsCacheableFuncStringContentList* mContentList; +}; + +static PLDHashNumber +FuncStringContentListHashtableHashKey(PLDHashTable *table, const void *key) +{ + const nsFuncStringCacheKey* funcStringKey = + static_cast(key); + return funcStringKey->GetHash(); +} + +static PRBool +FuncStringContentListHashtableMatchEntry(PLDHashTable *table, + const PLDHashEntryHdr *entry, + const void *key) +{ + const FuncStringContentListHashEntry *e = + static_cast(entry); + const nsFuncStringCacheKey* ourKey = + static_cast(key); + + return e->mContentList->Equals(ourKey); +} + +already_AddRefed +NS_GetFuncStringContentList(nsINode* aRootNode, + nsContentListMatchFunc aFunc, + nsContentListDestroyFunc aDestroyFunc, + void* aData, + const nsAString& aString) +{ + NS_ASSERTION(aRootNode, "content list has to have a root"); + + nsCacheableFuncStringContentList* list = nsnull; + + static PLDHashTableOps hash_table_ops = + { + PL_DHashAllocTable, + PL_DHashFreeTable, + FuncStringContentListHashtableHashKey, + FuncStringContentListHashtableMatchEntry, + PL_DHashMoveEntryStub, + PL_DHashClearEntryStub, + PL_DHashFinalizeStub + }; + + // Initialize the hashtable if needed. + if (!gFuncStringContentListHashTable.ops) { + PRBool success = PL_DHashTableInit(&gFuncStringContentListHashTable, + &hash_table_ops, nsnull, + sizeof(FuncStringContentListHashEntry), + 16); + + if (!success) { + gFuncStringContentListHashTable.ops = nsnull; + } + } + + FuncStringContentListHashEntry *entry = nsnull; + // First we look in our hashtable. Then we create a content list if needed + if (gFuncStringContentListHashTable.ops) { + nsFuncStringCacheKey hashKey(aRootNode, aFunc, aString); + + // A PL_DHASH_ADD is equivalent to a PL_DHASH_LOOKUP for cases + // when the entry is already in the hashtable. + entry = static_cast + (PL_DHashTableOperate(&gFuncStringContentListHashTable, + &hashKey, + PL_DHASH_ADD)); + if (entry) + list = entry->mContentList; + } + + if (!list) { + // We need to create a ContentList and add it to our new entry, if + // we have an entry + list = new nsCacheableFuncStringContentList(aRootNode, aFunc, aDestroyFunc, aData, aString); + if (entry) { + if (list) + entry->mContentList = list; + else + PL_DHashTableRawRemove(&gContentListHashTable, entry); + } + + NS_ENSURE_TRUE(list, nsnull); + } else { + // List was already in the hashtable; clean up our new aData + if (aDestroyFunc) { + (*aDestroyFunc)(aData); + } + } + + NS_ADDREF(list); + + // Don't cache these lists globally + + return list; +} // nsContentList implementation @@ -450,7 +553,7 @@ nsContentList::NodeWillBeDestroyed(const nsINode* aNode) { // We shouldn't do anything useful from now on - RemoveFromHashtable(); + RemoveFromCaches(); mRootNode = nsnull; // We will get no more updates, so we can never know we're up to @@ -913,6 +1016,29 @@ nsContentList::BringSelfUpToDate(PRBool aDoFlush) "PopulateSelf dod not bring content list up to date!"); } +nsCacheableFuncStringContentList::~nsCacheableFuncStringContentList() +{ + RemoveFromFuncStringHashtable(); +} + +void +nsCacheableFuncStringContentList::RemoveFromFuncStringHashtable() +{ + if (!gFuncStringContentListHashTable.ops) { + return; + } + + nsFuncStringCacheKey key(mRootNode, mFunc, mString); + PL_DHashTableOperate(&gFuncStringContentListHashTable, + &key, + PL_DHASH_REMOVE); + + if (gFuncStringContentListHashTable.entryCount == 0) { + PL_DHashTableFinish(&gFuncStringContentListHashTable); + gFuncStringContentListHashTable.ops = nsnull; + } +} + #ifdef DEBUG_CONTENT_LIST void nsContentList::AssertInSync() diff --git a/content/base/src/nsContentList.h b/content/base/src/nsContentList.h index e5e49bdf789f..fe7e00fc6441 100644 --- a/content/base/src/nsContentList.h +++ b/content/base/src/nsContentList.h @@ -55,6 +55,7 @@ #include "nsINameSpaceManager.h" #include "nsCycleCollectionParticipant.h" #include "nsWrapperCache.h" +#include "nsCRT.h" // Magic namespace id that means "match all namespaces". This is // negative so it won't collide with actual namespace constants. @@ -396,6 +397,15 @@ protected: Reset(); } + /** + * To be called from non-destructor locations that want to remove from caches. + * Needed because if subclasses want to have cache behavior they can't just + * override RemoveFromHashtable(), since we call that in our destructor. + */ + virtual void RemoveFromCaches() { + RemoveFromHashtable(); + } + /** * Function to use to determine whether a piece of content matches * our criterion @@ -434,8 +444,69 @@ protected: #endif }; +/** + * A class of cacheable content list; cached on the combination of aRootNode + aFunc + aDataString + */ +class nsCacheableFuncStringContentList; + +class NS_STACK_CLASS nsFuncStringCacheKey { +public: + nsFuncStringCacheKey(nsINode* aRootNode, + nsContentListMatchFunc aFunc, + const nsAString& aString) : + mRootNode(aRootNode), + mFunc(aFunc), + mString(aString) + {} + + PRUint32 GetHash(void) const + { + return NS_PTR_TO_INT32(mRootNode) ^ (NS_PTR_TO_INT32(mFunc) << 12) ^ + nsCRT::HashCode(PromiseFlatString(mString).get()); + } + +private: + friend class nsCacheableFuncStringContentList; + + nsINode* const mRootNode; + const nsContentListMatchFunc mFunc; + const nsAString& mString; +}; + +class nsCacheableFuncStringContentList : public nsContentList { +public: + nsCacheableFuncStringContentList(nsINode* aRootNode, + nsContentListMatchFunc aFunc, + nsContentListDestroyFunc aDestroyFunc, + void* aData, + const nsAString& aString) : + nsContentList(aRootNode, aFunc, aDestroyFunc, aData), + mString(aString) + {} + + virtual ~nsCacheableFuncStringContentList(); + + PRBool Equals(const nsFuncStringCacheKey* aKey) { + return mRootNode == aKey->mRootNode && mFunc == aKey->mFunc && + mString == aKey->mString; + } +protected: + virtual void RemoveFromCaches() { + RemoveFromFuncStringHashtable(); + } + void RemoveFromFuncStringHashtable(); + + nsString mString; +}; + already_AddRefed NS_GetContentList(nsINode* aRootNode, nsIAtom* aMatchAtom, PRInt32 aMatchNameSpaceId); +already_AddRefed +NS_GetFuncStringContentList(nsINode* aRootNode, + nsContentListMatchFunc aFunc, + nsContentListDestroyFunc aDestroyFunc, + void* aData, + const nsAString& aString); #endif // nsContentList_h___ diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index f231c2662f2e..6958c4cc9275 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -1798,6 +1798,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsDocument) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mOnloadBlocker) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mFirstBaseNodeWithHref) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mDOMImplementation) + NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mOriginalDocument) // An element will only be in the linkmap as long as it's in the // document, so we'll traverse the table here instead of from the element. @@ -1851,6 +1852,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsDocument) NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mDisplayDocument) NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mFirstBaseNodeWithHref) NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mDOMImplementation) + NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mOriginalDocument) NS_IMPL_CYCLE_COLLECTION_UNLINK_USERDATA @@ -2859,21 +2861,24 @@ nsDocument::GetElementsByClassNameHelper(nsINode* aRootNode, aRootNode->GetOwnerDoc()->GetCompatibilityMode() == eCompatibility_NavQuirks ? eIgnoreCase : eCaseMatters; - - elements = new nsContentList(aRootNode, MatchClassNames, - DestroyClassNameArray, info); + + elements = + NS_GetFuncStringContentList(aRootNode, MatchClassNames, + DestroyClassNameArray, info, + aClasses).get(); } else { delete info; info = nsnull; elements = new nsBaseContentList(); + NS_IF_ADDREF(elements); } if (!elements) { delete info; return NS_ERROR_OUT_OF_MEMORY; } + // Transfer ownership *aReturn = elements; - NS_ADDREF(*aReturn); return NS_OK; } diff --git a/content/base/src/nsObjectLoadingContent.cpp b/content/base/src/nsObjectLoadingContent.cpp index 7618ae0a8e38..df5fd3a78a83 100644 --- a/content/base/src/nsObjectLoadingContent.cpp +++ b/content/base/src/nsObjectLoadingContent.cpp @@ -44,9 +44,13 @@ // Interface headers #include "imgILoader.h" +#include "nsEventDispatcher.h" #include "nsIContent.h" #include "nsIDocShell.h" #include "nsIDocument.h" +#include "nsIDOMDataContainerEvent.h" +#include "nsIDOMDocumentEvent.h" +#include "nsIDOMEventTarget.h" #include "nsIExternalProtocolHandler.h" #include "nsIEventStateManager.h" #include "nsIObjectFrame.h" @@ -54,6 +58,7 @@ #include "nsIPluginHost.h" #include "nsIPluginInstance.h" #include "nsIPresShell.h" +#include "nsIPrivateDOMEvent.h" #include "nsIScriptGlobalObject.h" #include "nsIScriptSecurityManager.h" #include "nsIStreamConverterService.h" @@ -79,6 +84,7 @@ #include "nsNetUtil.h" #include "nsMimeTypes.h" #include "nsStyleUtil.h" +#include "nsGUIEvent.h" // Concrete classes #include "nsFrameLoader.h" @@ -200,9 +206,6 @@ nsPluginErrorEvent::Run() case ePluginOutdated: type = NS_LITERAL_STRING("PluginOutdated"); break; - case ePluginCrashed: - type = NS_LITERAL_STRING("PluginCrashed"); - break; default: return NS_OK; } @@ -212,6 +215,79 @@ nsPluginErrorEvent::Run() return NS_OK; } +/** + * A task for firing PluginCrashed DOM Events. + */ +class nsPluginCrashedEvent : public nsRunnable { +public: + nsCOMPtr mContent; + nsString mPluginName; + PRBool mSubmittedCrashReport; + + nsPluginCrashedEvent(nsIContent* aContent, + const nsAString& aPluginName, + PRBool submittedCrashReport) + : mContent(aContent), + mPluginName(aPluginName), + mSubmittedCrashReport(submittedCrashReport) + {} + + ~nsPluginCrashedEvent() {} + + NS_IMETHOD Run(); +}; + +NS_IMETHODIMP +nsPluginCrashedEvent::Run() +{ + LOG(("OBJLC []: Firing plugin crashed event for content %p\n", + mContent.get())); + + nsCOMPtr domEventDoc = + do_QueryInterface(mContent->GetDocument()); + if (!domEventDoc) { + NS_WARNING("Couldn't get document for PluginCrashed event!"); + return NS_OK; + } + + nsCOMPtr event; + domEventDoc->CreateEvent(NS_LITERAL_STRING("datacontainerevents"), + getter_AddRefs(event)); + nsCOMPtr privateEvent(do_QueryInterface(event)); + nsCOMPtr containerEvent(do_QueryInterface(event)); + if (!privateEvent || !containerEvent) { + NS_WARNING("Couldn't QI event for PluginCrashed event!"); + return NS_OK; + } + + event->InitEvent(NS_LITERAL_STRING("PluginCrashed"), PR_TRUE, PR_TRUE); + privateEvent->SetTrusted(PR_TRUE); + privateEvent->GetInternalNSEvent()->flags |= NS_EVENT_FLAG_ONLY_CHROME_DISPATCH; + + nsCOMPtr variant; + + // add a "pluginName" property to this event + variant = do_CreateInstance("@mozilla.org/variant;1"); + if (!variant) { + NS_WARNING("Couldn't create pluginName variant for PluginCrashed event!"); + return NS_OK; + } + variant->SetAsAString(mPluginName); + containerEvent->SetData(NS_LITERAL_STRING("pluginName"), variant); + + // add a "submittedCrashReport" property to this event + variant = do_CreateInstance("@mozilla.org/variant;1"); + if (!variant) { + NS_WARNING("Couldn't create crashSubmit variant for PluginCrashed event!"); + return NS_OK; + } + variant->SetAsBool(mSubmittedCrashReport); + containerEvent->SetData(NS_LITERAL_STRING("submittedCrashReport"), variant); + + nsEventDispatcher::DispatchDOMEvent(mContent, nsnull, event, nsnull, nsnull); + return NS_OK; +} + class AutoNotifier { public: AutoNotifier(nsObjectLoadingContent* aContent, PRBool aNotify) : @@ -955,6 +1031,9 @@ nsObjectLoadingContent::ObjectState() const case ePluginBlocklisted: state |= NS_EVENT_STATE_HANDLER_BLOCKED; break; + case ePluginCrashed: + state |= NS_EVENT_STATE_HANDLER_CRASHED; + break; case ePluginUnsupported: state |= NS_EVENT_STATE_TYPE_UNSUPPORTED; break; @@ -1929,11 +2008,19 @@ nsObjectLoadingContent::SetAbsoluteScreenPosition(nsIDOMElement* element, } NS_IMETHODIMP -nsObjectLoadingContent::PluginCrashed() +nsObjectLoadingContent::PluginCrashed(const nsAString& pluginName, + PRBool submittedCrashReport) { + AutoNotifier notifier(this, PR_TRUE); UnloadContent(); mFallbackReason = ePluginCrashed; nsCOMPtr thisContent = do_QueryInterface(static_cast(this)); - FirePluginError(thisContent, mFallbackReason); + nsCOMPtr ev = new nsPluginCrashedEvent(thisContent, + pluginName, + submittedCrashReport); + nsresult rv = NS_DispatchToCurrentThread(ev); + if (NS_FAILED(rv)) { + NS_WARNING("failed to dispatch nsPluginCrashedEvent"); + } return NS_OK; } diff --git a/content/canvas/src/Makefile.in b/content/canvas/src/Makefile.in index 93b8412d79f6..da9dcfb6ee14 100644 --- a/content/canvas/src/Makefile.in +++ b/content/canvas/src/Makefile.in @@ -66,16 +66,15 @@ endif ifdef MOZ_WEBGL -ifeq (1_1,$(MOZ_X11)_$(NS_OSSO)) +ifdef MOZ_X11 +ifdef MOZ_PLATFORM_MAEMO WEBGL_PLATFORM = EGL DEFINES += -DUSE_GLES2 -endif - -ifeq (1_,$(MOZ_X11)_$(NS_OSSO)) +else WEBGL_PLATFORM = GLX EXTRA_DSO_LIBS += X11 endif - +endif ifeq (windows,$(MOZ_WIDGET_TOOLKIT)) ifdef WINCE diff --git a/content/canvas/src/nsGLPbufferEGL.cpp b/content/canvas/src/nsGLPbufferEGL.cpp index a850578bfbfc..f5ca1431f0aa 100644 --- a/content/canvas/src/nsGLPbufferEGL.cpp +++ b/content/canvas/src/nsGLPbufferEGL.cpp @@ -163,7 +163,7 @@ nsGLPbufferEGL::Init(mozilla::WebGLContext *priv) { mPriv = priv; -#ifdef NS_OSSO +#ifdef MOZ_PLATFORM_MAEMO // Maemo has missing DSO dependencies on their OpenGL libraries; // so ensure that the prerequisite libs are loaded in the process // before loading GL. An alternate approach is to use LD_PRELOAD. @@ -199,7 +199,7 @@ nsGLPbufferEGL::Init(mozilla::WebGLContext *priv) gEGLWrap.fBindAPI (EGL_OPENGL_ES_API); -#if defined(MOZ_X11) && defined(NS_OSSO) +#if defined(MOZ_X11) && defined(MOZ_PLATFORM_MAEMO) EGLint attribs[] = { EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_SURFACE_TYPE, EGL_PIXMAP_BIT, @@ -477,7 +477,7 @@ nsGLPbufferEGL::SwapBuffers() gfxASurface* nsGLPbufferEGL::ThebesSurface() { -#if defined(MOZ_X11) && defined(NS_OSSO) +#if defined(MOZ_X11) && defined(MOZ_PLATFORM_MAEMO) if (getenv("IMAGE")) return mThebesSurface; return mXlibSurface; diff --git a/content/events/public/nsIEventStateManager.h b/content/events/public/nsIEventStateManager.h index ebb866014b8e..e0f57b12e20d 100644 --- a/content/events/public/nsIEventStateManager.h +++ b/content/events/public/nsIEventStateManager.h @@ -197,4 +197,8 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIEventStateManager, NS_IEVENTSTATEMANAGER_IID) #define NS_EVENT_STATE_INDETERMINATE 0x04000000 // CSS3-Selectors +// Handler for the content has crashed +#define NS_EVENT_STATE_HANDLER_CRASHED \ + 0x08000000 + #endif // nsIEventStateManager_h__ diff --git a/content/events/src/nsEventStateManager.h b/content/events/src/nsEventStateManager.h index 893cde451034..e09e38f0150e 100644 --- a/content/events/src/nsEventStateManager.h +++ b/content/events/src/nsEventStateManager.h @@ -63,9 +63,9 @@ class imgIContainer; class nsDOMDataTransfer; // mac uses click-hold context menus, a holdover from 4.x -// touch screens (like hildon) could use this also, +// touch screens (like maemo) could use this also, // perhaps we should move to NS_TOUCHSCREEN -#if defined(XP_MACOSX) || defined(MOZ_PLATFORM_HILDON) +#if defined(XP_MACOSX) || defined(MOZ_PLATFORM_MAEMO) #define CLICK_HOLD_CONTEXT_MENUS 1 #endif diff --git a/content/html/content/src/nsHTMLInputElement.cpp b/content/html/content/src/nsHTMLInputElement.cpp index 7b51f8c4b9ee..fb6f3e8f4004 100644 --- a/content/html/content/src/nsHTMLInputElement.cpp +++ b/content/html/content/src/nsHTMLInputElement.cpp @@ -60,8 +60,6 @@ #include "nsIFormControl.h" #include "nsIForm.h" #include "nsIFormSubmission.h" -#include "nsITextControlFrame.h" -#include "nsIRadioControlFrame.h" #include "nsIDocument.h" #include "nsIPresShell.h" #include "nsIFormControlFrame.h" @@ -81,7 +79,6 @@ #include "nsIDOMNSEvent.h" #include "nsIDOMNodeList.h" #include "nsIDOMHTMLCollection.h" -#include "nsICheckboxControlFrame.h" #include "nsLinebreakConverter.h" //to strip out carriage returns #include "nsReadableUtils.h" #include "nsUnicharUtils.h" @@ -98,7 +95,6 @@ #include "nsRuleData.h" // input type=radio -#include "nsIRadioControlFrame.h" #include "nsIRadioGroupContainer.h" // input type=file @@ -1368,20 +1364,10 @@ nsHTMLInputElement::SetCheckedInternal(PRBool aChecked, PRBool aNotify) // // Notify the frame // - nsIFrame* frame = GetPrimaryFrame(); - if (frame) { - nsPresContext *presContext = GetPresContext(); - - if (mType == NS_FORM_INPUT_CHECKBOX) { - nsICheckboxControlFrame* checkboxFrame = do_QueryFrame(frame); - if (checkboxFrame) { - checkboxFrame->OnChecked(presContext, aChecked); - } - } else if (mType == NS_FORM_INPUT_RADIO) { - nsIRadioControlFrame* radioFrame = do_QueryFrame(frame); - if (radioFrame) { - radioFrame->OnChecked(presContext, aChecked); - } + if (mType == NS_FORM_INPUT_CHECKBOX || mType == NS_FORM_INPUT_RADIO) { + nsIFrame* frame = GetPrimaryFrame(); + if (frame) { + frame->InvalidateOverflowRect(); } } diff --git a/content/html/document/src/nsHTMLDocument.cpp b/content/html/document/src/nsHTMLDocument.cpp index 6d4c541248ce..36c3d930329a 100644 --- a/content/html/document/src/nsHTMLDocument.cpp +++ b/content/html/document/src/nsHTMLDocument.cpp @@ -2280,17 +2280,18 @@ NS_IMETHODIMP nsHTMLDocument::GetElementsByName(const nsAString& aElementName, nsIDOMNodeList** aReturn) { - void* elementNameData = new nsString(aElementName); + nsString* elementNameData = new nsString(aElementName); NS_ENSURE_TRUE(elementNameData, NS_ERROR_OUT_OF_MEMORY); nsContentList* elements = - new nsContentList(this, - MatchNameAttribute, - nsContentUtils::DestroyMatchString, - elementNameData); + NS_GetFuncStringContentList(this, + MatchNameAttribute, + nsContentUtils::DestroyMatchString, + elementNameData, + *elementNameData).get(); NS_ENSURE_TRUE(elements, NS_ERROR_OUT_OF_MEMORY); + // Transfer ownership *aReturn = elements; - NS_ADDREF(*aReturn); return NS_OK; } diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index db0abb87d1c7..e3fede4be1ab 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -2112,8 +2112,8 @@ nsDocShell::HistoryPurged(PRInt32 aNumEntries) // eviction. We need to adjust by the number of entries that we // just purged from history, so that we look at the right session history // entries during eviction. - mPreviousTransIndex = PR_MAX(-1, mPreviousTransIndex - aNumEntries); - mLoadedTransIndex = PR_MAX(0, mLoadedTransIndex - aNumEntries); + mPreviousTransIndex = NS_MAX(-1, mPreviousTransIndex - aNumEntries); + mLoadedTransIndex = NS_MAX(0, mLoadedTransIndex - aNumEntries); PRInt32 count = mChildList.Count(); for (PRInt32 i = 0; i < count; ++i) { diff --git a/docshell/build/Makefile.in b/docshell/build/Makefile.in index 992fae8d7098..fdd9b8ef5b7f 100644 --- a/docshell/build/Makefile.in +++ b/docshell/build/Makefile.in @@ -115,6 +115,6 @@ ifdef MOZ_ENABLE_DBUS EXTRA_DSO_LDOPTS += $(MOZ_DBUS_GLIB_LIBS) endif -ifdef MOZ_PLATFORM_HILDON -EXTRA_DSO_LDOPTS += $(LIBHILDONMIME_LIBS) +ifdef MOZ_PLATFORM_MAEMO +EXTRA_DSO_LDOPTS += $(MOZ_PLATFORM_MAEMO_LIBS) endif diff --git a/docshell/shistory/src/nsSHistory.cpp b/docshell/shistory/src/nsSHistory.cpp index ffd132642abf..9b946b96d148 100644 --- a/docshell/shistory/src/nsSHistory.cpp +++ b/docshell/shistory/src/nsSHistory.cpp @@ -551,7 +551,7 @@ nsSHistory::PurgeHistory(PRInt32 aEntries) if (mLength <= 0 || aEntries <= 0) return NS_ERROR_FAILURE; - aEntries = PR_MIN(aEntries, mLength); + aEntries = NS_MIN(aEntries, mLength); PRBool purgeHistory = PR_TRUE; // Notify the listener about the history purge @@ -813,13 +813,13 @@ nsSHistory::EvictWindowContentViewers(PRInt32 aFromIndex, PRInt32 aToIndex) if (endIndex <= 0) { return; } - startIndex = PR_MAX(0, aFromIndex - gHistoryMaxViewers); + startIndex = NS_MAX(0, aFromIndex - gHistoryMaxViewers); } else { // going backward startIndex = aToIndex + gHistoryMaxViewers + 1; if (startIndex >= mLength) { return; } - endIndex = PR_MIN(mLength, aFromIndex + gHistoryMaxViewers + 1); + endIndex = NS_MIN(mLength, aFromIndex + gHistoryMaxViewers + 1); } #ifdef DEBUG @@ -913,8 +913,8 @@ nsSHistory::EvictGlobalContentViewer() // viewer. There could be up to gHistoryMaxViewers content viewers, // but we don't know whether they are before or after the mIndex position // in the SHEntry list. Just check both sides, to be safe. - PRInt32 startIndex = PR_MAX(0, shist->mIndex - gHistoryMaxViewers); - PRInt32 endIndex = PR_MIN(shist->mLength - 1, + PRInt32 startIndex = NS_MAX(0, shist->mIndex - gHistoryMaxViewers); + PRInt32 endIndex = NS_MIN(shist->mLength - 1, shist->mIndex + gHistoryMaxViewers); nsCOMPtr trans; shist->GetTransactionAtIndex(startIndex, getter_AddRefs(trans)); @@ -1006,8 +1006,8 @@ nsSHistory::EvictGlobalContentViewer() NS_IMETHODIMP nsSHistory::EvictExpiredContentViewerForEntry(nsISHEntry *aEntry) { - PRInt32 startIndex = PR_MAX(0, mIndex - gHistoryMaxViewers); - PRInt32 endIndex = PR_MIN(mLength - 1, + PRInt32 startIndex = NS_MAX(0, mIndex - gHistoryMaxViewers); + PRInt32 endIndex = NS_MIN(mLength - 1, mIndex + gHistoryMaxViewers); nsCOMPtr trans; GetTransactionAtIndex(startIndex, getter_AddRefs(trans)); diff --git a/dom/plugins/PluginModuleParent.cpp b/dom/plugins/PluginModuleParent.cpp index 46e4c6915198..c02765e1f8f3 100644 --- a/dom/plugins/PluginModuleParent.cpp +++ b/dom/plugins/PluginModuleParent.cpp @@ -50,6 +50,24 @@ using namespace mozilla::plugins; PR_STATIC_ASSERT(sizeof(NPIdentifier) == sizeof(void*)); +class PluginCrashed : public nsRunnable +{ +public: + PluginCrashed(nsNPAPIPlugin* plugin, + const nsString& dumpID) + : mDumpID(dumpID), + mPlugin(plugin) { } + + NS_IMETHOD Run() { + mPlugin->PluginCrashed(mDumpID); + return NS_OK; + } + +private: + nsNPAPIPlugin* mPlugin; + nsString mDumpID; +}; + // static PluginLibrary* PluginModuleParent::LoadModule(const char* aFilePath) @@ -160,8 +178,13 @@ PluginModuleParent::ActorDestroy(ActorDestroyReason why) switch (why) { case AbnormalShutdown: { nsCOMPtr dump; + nsAutoString dumpID; if (GetMinidump(getter_AddRefs(dump))) { WriteExtraDataForMinidump(dump); + if (NS_SUCCEEDED(dump->GetLeafName(dumpID))) { + dumpID.Replace(dumpID.Length() - 4, 4, + NS_LITERAL_STRING("")); + } } else { NS_WARNING("[PluginModuleParent::ActorDestroy] abnormal shutdown without minidump!"); @@ -172,8 +195,7 @@ PluginModuleParent::ActorDestroy(ActorDestroyReason why) // and potentially modify the actor child list while enumerating it. if (mPlugin) { nsCOMPtr r = - new nsRunnableMethod( - mPlugin, &nsNPAPIPlugin::PluginCrashed); + new PluginCrashed(mPlugin, dumpID); NS_DispatchToMainThread(r); } break; diff --git a/gfx/cairo/libpixman/src/Makefile.in b/gfx/cairo/libpixman/src/Makefile.in index 86a0585ea5a7..925c494ddf71 100644 --- a/gfx/cairo/libpixman/src/Makefile.in +++ b/gfx/cairo/libpixman/src/Makefile.in @@ -92,8 +92,7 @@ ifdef HAVE_ARM_SIMD USE_ARM_SIMD_GCC=1 endif ifdef HAVE_ARM_NEON -# temporarily disabled to see if it fixes odd mobile build breakage -#USE_ARM_NEON_GCC=1 +USE_ARM_NEON_GCC=1 endif endif @@ -148,6 +147,7 @@ endif ifdef USE_ARM_NEON_GCC CSRCS += pixman-arm-neon.c +SSRCS += pixman-arm-neon-asm.S DEFINES += -DUSE_ARM_NEON ARM_NEON_CFLAGS = -mfloat-abi=softfp -mfpu=neon endif diff --git a/gfx/cairo/libpixman/src/pixman-arm-neon-asm.S b/gfx/cairo/libpixman/src/pixman-arm-neon-asm.S index 29868844235e..40c8ec4a9603 100644 --- a/gfx/cairo/libpixman/src/pixman-arm-neon-asm.S +++ b/gfx/cairo/libpixman/src/pixman-arm-neon-asm.S @@ -817,8 +817,8 @@ generate_composite_function \ vsli.u64 d0, d0, #8 vsli.u64 d0, d0, #16 vsli.u64 d0, d0, #32 - vmov d1, d0 - vmov q1, q0 + vorr d1, d0, d0 + vorr q1, q0, q0 .endm .macro pixman_composite_src_n_8_cleanup @@ -856,8 +856,8 @@ generate_composite_function \ vld1.32 {d0[0]}, [DUMMY] vsli.u64 d0, d0, #16 vsli.u64 d0, d0, #32 - vmov d1, d0 - vmov q1, q0 + vorr d1, d0, d0 + vorr q1, q0, q0 .endm .macro pixman_composite_src_n_0565_cleanup @@ -894,8 +894,8 @@ generate_composite_function \ add DUMMY, sp, #ARGS_STACK_OFFSET vld1.32 {d0[0]}, [DUMMY] vsli.u64 d0, d0, #32 - vmov d1, d0 - vmov q1, q0 + vorr d1, d0, d0 + vorr q1, q0, q0 .endm .macro pixman_composite_src_n_8888_cleanup diff --git a/js/src/config/rules.mk b/js/src/config/rules.mk index 002650776f61..c6b6d742af41 100644 --- a/js/src/config/rules.mk +++ b/js/src/config/rules.mk @@ -380,6 +380,7 @@ _OBJS = \ $(JRI_STUB_CFILES) \ $(addsuffix .$(OBJ_SUFFIX), $(JMC_GEN)) \ $(CSRCS:.c=.$(OBJ_SUFFIX)) \ + $(SSRCS:.S=.$(OBJ_SUFFIX)) \ $(patsubst %.cc,%.$(OBJ_SUFFIX),$(CPPSRCS:.cpp=.$(OBJ_SUFFIX))) \ $(CMSRCS:.m=.$(OBJ_SUFFIX)) \ $(CMMSRCS:.mm=.$(OBJ_SUFFIX)) \ diff --git a/js/src/config/system-headers b/js/src/config/system-headers index 890ead5340bc..d695f52f1297 100644 --- a/js/src/config/system-headers +++ b/js/src/config/system-headers @@ -1009,12 +1009,10 @@ hunspell.hxx #if MOZ_NATIVE_BZ2==1 bzlib.h #endif -#ifdef MOZ_PLATFORM_HILDON +#if (MOZ_PLATFORM_MAEMO == 5) hildon-uri.h hildon-mime.h hildon-file-chooser-dialog.h -#endif -#ifdef NS_OSSO libosso.h osso-mem.h #endif diff --git a/js/src/configure.in b/js/src/configure.in index 300fbfc31c7f..4e6780218310 100644 --- a/js/src/configure.in +++ b/js/src/configure.in @@ -358,28 +358,28 @@ else AC_CHECK_PROGS(STRIP, strip, :) AC_CHECK_PROGS(WINDRES, windres, :) if test -z "$HOST_CC"; then - HOST_CC="$CC" + HOST_CC='$(CC)' fi if test -z "$HOST_CFLAGS"; then - HOST_CFLAGS="$CFLAGS" + HOST_CFLAGS='$(CFLAGS)' fi if test -z "$HOST_CXX"; then - HOST_CXX="$CXX" + HOST_CXX='$(CXX)' fi if test -z "$HOST_CXXFLAGS"; then - HOST_CXXFLAGS="$CXXFLAGS" + HOST_CXXFLAGS='$(CXXFLAGS)' fi if test -z "$HOST_LDFLAGS"; then - HOST_LDFLAGS="$LDFLAGS" + HOST_LDFLAGS='$(LDFLAGS)' fi if test -z "$HOST_RANLIB"; then - HOST_RANLIB="$RANLIB" + HOST_RANLIB='$(RANLIB)' fi if test -z "$HOST_AR"; then - HOST_AR="$AR" + HOST_AR='$(AR)' fi if test -z "$HOST_AR_FLAGS"; then - HOST_AR_FLAGS="$AR_FLAGS" + HOST_AR_FLAGS='$(AR_FLAGS)' fi fi @@ -1508,8 +1508,8 @@ case "$host" in HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11" HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"' HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" - MOZ_FIX_LINK_PATHS='-Wl,-executable_path,$(LIBXUL_DIST)/bin' - LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL -lobjc' + LDFLAGS="$LDFLAGS -lobjc" + LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL' ;; *-linux*|*-kfreebsd*-gnu) @@ -1677,6 +1677,7 @@ case "$target" in LDFLAGS=$_SAVE_LDFLAGS fi + MOZ_FIX_LINK_PATHS='-Wl,-executable_path,$(LIBXUL_DIST)/bin' ;; *-freebsd*) diff --git a/js/src/xpconnect/loader/XPCOMUtils.jsm b/js/src/xpconnect/loader/XPCOMUtils.jsm index ac94054c42b0..2d5467e1acfc 100644 --- a/js/src/xpconnect/loader/XPCOMUtils.jsm +++ b/js/src/xpconnect/loader/XPCOMUtils.jsm @@ -281,6 +281,28 @@ var XPCOMUtils = { .getService(Ci.nsICategoryManager); }, + /** + * Helper which iterates over a nsISimpleEnumerator. + * @param e The nsISimpleEnumerator to iterate over. + * @param i The expected interface for each element. + */ + IterSimpleEnumerator: function XPCU_IterSimpleEnumerator(e, i) + { + while (e.hasMoreElements()) + yield e.getNext().QueryInterface(i); + }, + + /** + * Helper which iterates over a string enumerator. + * @param e The string enumerator (nsIUTF8StringEnumerator or + * nsIStringEnumerator) over which to iterate. + */ + IterStringEnumerator: function XPCU_IterStringEnumerator(e) + { + while (e.hasMore()) + yield e.getNext(); + }, + /** * Returns an nsIFactory for |component|. */ @@ -314,3 +336,4 @@ function makeQI(interfaceNames) { throw Cr.NS_ERROR_NO_INTERFACE; }; } + diff --git a/js/src/xpconnect/src/xpcwrappednativescope.cpp b/js/src/xpconnect/src/xpcwrappednativescope.cpp index 4fac6144fb02..ab5761b3b2ae 100644 --- a/js/src/xpconnect/src/xpcwrappednativescope.cpp +++ b/js/src/xpconnect/src/xpcwrappednativescope.cpp @@ -780,11 +780,7 @@ void DEBUG_CheckForComponentsInScope(JSContext* cx, JSObject* obj, // global properties of that document's window are *gone*. Generally this // indicates a problem that should be addressed in the design and use of the // callback code. -#ifdef I_FOOLISHLY_WANT_TO_IGNORE_THIS_LIKE_THE_OTHER_CRAP_WE_PRINTF - NS_WARNING("XPConnect is being called on a scope without a 'Components' property!"); -#else NS_ERROR("XPConnect is being called on a scope without a 'Components' property!"); -#endif } #else #define DEBUG_CheckForComponentsInScope(ccx, obj, OKIfNotInitialized, runtime) \ diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 32d0e2a7827e..321dcf7601ce 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -77,8 +77,6 @@ #include "nsIComboboxControlFrame.h" #include "nsIListControlFrame.h" #include "nsISelectControlFrame.h" -#include "nsIRadioControlFrame.h" -#include "nsICheckboxControlFrame.h" #include "nsIDOMCharacterData.h" #include "nsIDOMHTMLImageElement.h" #include "nsPlaceholderFrame.h" diff --git a/layout/forms/Makefile.in b/layout/forms/Makefile.in index e7b4cf91b772..228b7395cc14 100644 --- a/layout/forms/Makefile.in +++ b/layout/forms/Makefile.in @@ -58,8 +58,6 @@ EXPORTS = \ nsIListControlFrame.h \ nsIComboboxControlFrame.h \ nsIFormControlFrame.h \ - nsIRadioControlFrame.h \ - nsICheckboxControlFrame.h \ nsISelectControlFrame.h \ nsITextControlFrame.h \ $(NULL) diff --git a/layout/forms/nsGfxCheckboxControlFrame.cpp b/layout/forms/nsGfxCheckboxControlFrame.cpp index cc02e48bcd06..a2247e586af6 100644 --- a/layout/forms/nsGfxCheckboxControlFrame.cpp +++ b/layout/forms/nsGfxCheckboxControlFrame.cpp @@ -119,11 +119,6 @@ nsGfxCheckboxControlFrame::~nsGfxCheckboxControlFrame() { } - -NS_QUERYFRAME_HEAD(nsGfxCheckboxControlFrame) - NS_QUERYFRAME_ENTRY(nsICheckboxControlFrame) -NS_QUERYFRAME_TAIL_INHERITING(nsFormControlFrame) - #ifdef ACCESSIBILITY NS_IMETHODIMP nsGfxCheckboxControlFrame::GetAccessible(nsIAccessible** aAccessible) @@ -140,15 +135,6 @@ nsGfxCheckboxControlFrame::GetAccessible(nsIAccessible** aAccessible) } #endif -//------------------------------------------------------------ -NS_IMETHODIMP -nsGfxCheckboxControlFrame::OnChecked(nsPresContext* aPresContext, - PRBool aChecked) -{ - InvalidateOverflowRect(); - return NS_OK; -} - //------------------------------------------------------------ NS_IMETHODIMP nsGfxCheckboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, diff --git a/layout/forms/nsGfxCheckboxControlFrame.h b/layout/forms/nsGfxCheckboxControlFrame.h index 3cc8fb2b97cf..2727b5a8cad5 100644 --- a/layout/forms/nsGfxCheckboxControlFrame.h +++ b/layout/forms/nsGfxCheckboxControlFrame.h @@ -38,14 +38,12 @@ #define nsGfxCheckboxControlFrame_h___ #include "nsFormControlFrame.h" -#include "nsICheckboxControlFrame.h" #ifdef ACCESSIBILITY class nsIAccessible; #endif -class nsGfxCheckboxControlFrame : public nsFormControlFrame, - public nsICheckboxControlFrame +class nsGfxCheckboxControlFrame : public nsFormControlFrame { public: NS_DECL_FRAMEARENA_HELPERS @@ -67,11 +65,6 @@ public: NS_IMETHOD GetAccessible(nsIAccessible** aAccessible); #endif - //nsICheckboxControlFrame methods - NS_IMETHOD OnChecked(nsPresContext* aPresContext, PRBool aChecked); - - NS_DECL_QUERYFRAME - protected: PRBool IsChecked(); diff --git a/layout/forms/nsGfxRadioControlFrame.cpp b/layout/forms/nsGfxRadioControlFrame.cpp index b80cf6da00bf..4cd0ea05afef 100644 --- a/layout/forms/nsGfxRadioControlFrame.cpp +++ b/layout/forms/nsGfxRadioControlFrame.cpp @@ -64,10 +64,6 @@ nsGfxRadioControlFrame::~nsGfxRadioControlFrame() { } -NS_QUERYFRAME_HEAD(nsGfxRadioControlFrame) - NS_QUERYFRAME_ENTRY(nsIRadioControlFrame) -NS_QUERYFRAME_TAIL_INHERITING(nsFormControlFrame) - #ifdef ACCESSIBILITY NS_IMETHODIMP nsGfxRadioControlFrame::GetAccessible(nsIAccessible** aAccessible) @@ -126,11 +122,3 @@ nsGfxRadioControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, return aLists.Content()->AppendNewToTop(new (aBuilder) nsDisplayGeneric(this, PaintCheckedRadioButton, "CheckedRadioButton")); } - -NS_IMETHODIMP -nsGfxRadioControlFrame::OnChecked(nsPresContext* aPresContext, - PRBool aChecked) -{ - InvalidateOverflowRect(); - return NS_OK; -} diff --git a/layout/forms/nsGfxRadioControlFrame.h b/layout/forms/nsGfxRadioControlFrame.h index 52a46d31bf21..011131ef11e5 100644 --- a/layout/forms/nsGfxRadioControlFrame.h +++ b/layout/forms/nsGfxRadioControlFrame.h @@ -39,7 +39,6 @@ #define nsGfxRadioControlFrame_h___ #include "nsFormControlFrame.h" -#include "nsIRadioControlFrame.h" #ifdef ACCESSIBILITY class nsIAccessible; @@ -47,21 +46,17 @@ class nsIAccessible; // nsGfxRadioControlFrame -class nsGfxRadioControlFrame : public nsFormControlFrame, - public nsIRadioControlFrame - +class nsGfxRadioControlFrame : public nsFormControlFrame { public: nsGfxRadioControlFrame(nsStyleContext* aContext); ~nsGfxRadioControlFrame(); - NS_DECL_QUERYFRAME NS_DECL_FRAMEARENA_HELPERS #ifdef ACCESSIBILITY NS_IMETHOD GetAccessible(nsIAccessible** aAccessible); #endif - NS_IMETHOD OnChecked(nsPresContext* aPresContext, PRBool aChecked); NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder, const nsRect& aDirtyRect, diff --git a/layout/forms/nsICheckboxControlFrame.h b/layout/forms/nsICheckboxControlFrame.h deleted file mode 100644 index da9e26c00ae8..000000000000 --- a/layout/forms/nsICheckboxControlFrame.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** 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) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * 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 ***** */ - -#ifndef nsICheckControlFrame_h___ -#define nsICheckControlFrame_h___ - -#include "nsQueryFrame.h" -class nsStyleContext; -class nsPresContext; - -/** - * nsICheckControlFrame is the common interface radio buttons. - * @see nsFromControlFrame and its base classes for more info - */ -class nsICheckboxControlFrame -{ -public: - NS_DECL_QUERYFRAME_TARGET(nsICheckboxControlFrame) - - /** - * Called by content when checkbox "checked" changes - */ - NS_IMETHOD OnChecked(nsPresContext* aPresContext, PRBool aChecked) = 0; -}; - -#endif - diff --git a/layout/forms/nsIRadioControlFrame.h b/layout/forms/nsIRadioControlFrame.h deleted file mode 100644 index ee22d7e35d72..000000000000 --- a/layout/forms/nsIRadioControlFrame.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** 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) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * 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 ***** */ - -#ifndef nsIRadioControlFrame_h___ -#define nsIRadioControlFrame_h___ - -#include "nsQueryFrame.h" -class nsStyleContext; - -/** - * nsIRadioControlFrame is the common interface radio buttons. - * @see nsFormControlFrame and its base classes for more info - */ -class nsIRadioControlFrame -{ -public: - NS_DECL_QUERYFRAME_TARGET(nsIRadioControlFrame) - - /** - * Called by content when the radio button's state changes - */ - NS_IMETHOD OnChecked(nsPresContext* aPresContext, PRBool aChecked) = 0; -}; - -#endif - diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp index f1e97ef57537..dcee78aade22 100644 --- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -173,7 +173,7 @@ enum { XKeyPress = KeyPress }; #undef KeyPress #endif -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) #define MOZ_COMPOSITED_PLUGINS 1 #include "gfxXlibSurface.h" @@ -416,7 +416,7 @@ public: return strncmp(GetPluginName(), aPluginName, strlen(aPluginName)) == 0; } -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) nsresult SetAbsoluteScreenPosition(nsIDOMElement* element, nsIDOMClientRect* position, nsIDOMClientRect* clip); @@ -511,7 +511,7 @@ private: }; #endif -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) // On hildon, we attempt to use NPImageExpose which allows us faster // painting. @@ -1225,7 +1225,7 @@ nsObjectFrame::SetAbsoluteScreenPosition(nsIDOMElement* element, nsIDOMClientRect* position, nsIDOMClientRect* clip) { -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) if (!mInstanceOwner) return NS_ERROR_NOT_AVAILABLE; return mInstanceOwner->SetAbsoluteScreenPosition(element, position, clip); @@ -2137,7 +2137,7 @@ GetMIMEType(nsIPluginInstance *aPluginInstance) static PRBool DoDelayedStop(nsPluginInstanceOwner *aInstanceOwner, PRBool aDelayedStop) { -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO==5) // Don't delay stop on Maemo/Hildon (bug 530739). if (aDelayedStop && aInstanceOwner->MatchPluginName("Shockwave Flash")) return PR_FALSE; @@ -2455,7 +2455,7 @@ nsPluginInstanceOwner::nsPluginInstanceOwner() mLastPoint = nsIntPoint(0,0); #endif -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) mPluginSize = nsIntSize(0,0); mXlibSurfGC = None; mBlitWindow = nsnull; @@ -2525,7 +2525,7 @@ nsPluginInstanceOwner::~nsPluginInstanceOwner() mInstance->InvalidateOwner(); } -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) ReleaseXShm(); #endif } @@ -2737,7 +2737,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::InvalidateRect(NPRect *invalidRect) if (!mObjectFrame || !invalidRect || !mWidgetVisible) return NS_ERROR_FAILURE; -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) PRBool simpleImageRender = PR_FALSE; mInstance->GetValueFromPlugin(NPPVpluginWindowlessLocalBool, &simpleImageRender); @@ -4871,7 +4871,7 @@ void nsPluginInstanceOwner::Paint(gfxContext* aContext, if (!mInstance || !mObjectFrame) return; -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) // through to be able to paint the context passed in. This allows // us to handle plugins that do not self invalidate (slowly, but // accurately), and it allows us to reduce flicker. @@ -4960,7 +4960,7 @@ DepthOfVisual(const Screen* screen, const Visual* visual) } #endif -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) static GdkWindow* GetClosestWindow(nsIDOMElement *element) { @@ -5651,7 +5651,7 @@ void nsPluginInstanceOwner::SetPluginHost(nsIPluginHost* aHost) mPluginHost = aHost; } -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) PRBool nsPluginInstanceOwner::UpdateVisibility(PRBool aVisible) { // NOTE: Death grip must be held by caller. @@ -5815,7 +5815,7 @@ void nsPluginInstanceOwner::FixUpURLS(const nsString &name, nsAString &value) } } -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) nsresult nsPluginInstanceOwner::SetAbsoluteScreenPosition(nsIDOMElement* element, nsIDOMClientRect* position, diff --git a/layout/generic/nsQueryFrame.h b/layout/generic/nsQueryFrame.h index b3d5322a6222..8fb853eec66e 100644 --- a/layout/generic/nsQueryFrame.h +++ b/layout/generic/nsQueryFrame.h @@ -111,7 +111,6 @@ public: nsHTMLScrollFrame_id, nsIAnonymousContentCreator_id, nsICSSPseudoComparator_id, - nsICheckboxControlFrame_id, nsIComboboxControlFrame_id, nsIFormControlFrame_id, nsIFrame_id, @@ -123,7 +122,6 @@ public: nsIObjectFrame_id, nsIPageSequenceFrame_id, nsIPercentHeightObserver_id, - nsIRadioControlFrame_id, nsIRootBox_id, nsISVGChildFrame_id, nsISVGGlyphFragmentLeaf_id, diff --git a/layout/style/nsCSSPseudoClassList.h b/layout/style/nsCSSPseudoClassList.h index ac2c834849b0..3c2da8e678a1 100644 --- a/layout/style/nsCSSPseudoClassList.h +++ b/layout/style/nsCSSPseudoClassList.h @@ -114,6 +114,8 @@ CSS_STATE_PSEUDO_CLASS(mozHandlerDisabled, ":-moz-handler-disabled", NS_EVENT_STATE_HANDLER_DISABLED) CSS_STATE_PSEUDO_CLASS(mozHandlerBlocked, ":-moz-handler-blocked", NS_EVENT_STATE_HANDLER_BLOCKED) +CSS_STATE_PSEUDO_CLASS(mozHandlerCrashed, ":-moz-handler-crashed", + NS_EVENT_STATE_HANDLER_CRASHED) CSS_PSEUDO_CLASS(mozHasHandlerRef, ":-moz-has-handlerref") diff --git a/layout/style/test/test_selectors.html b/layout/style/test/test_selectors.html index f79a1aabb82b..7e92d1ae458e 100644 --- a/layout/style/test/test_selectors.html +++ b/layout/style/test/test_selectors.html @@ -704,6 +704,13 @@ function run() { test_balanced_unparseable(":-moz-tree-twisty(open())"); test_balanced_unparseable("::-moz-tree-twisty(hover ())"); + // Plugin pseudoclasses + test_parseable(":-moz-type-unsupported"); + test_parseable(":-moz-handler-disabled"); + test_parseable(":-moz-handler-blocked"); + test_parseable(":-moz-handler-crashed"); + test_parseable(":-moz-has-handlerref"); + // Case sensitivity of tag selectors function setup_cased_spans(body) { var data = [ diff --git a/modules/plugin/Makefile.in b/modules/plugin/Makefile.in index aef5287e3c4d..d1013d73f783 100644 --- a/modules/plugin/Makefile.in +++ b/modules/plugin/Makefile.in @@ -68,9 +68,11 @@ ifeq ($(OS_ARCH),OS2) TOOL_DIRS += default/os2 endif +ifdef PBBUILD ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa) TOOL_DIRS += default/mac endif +endif ifdef ENABLE_TESTS ifneq (,$(filter WINNT Darwin Linux OS2 SunOS,$(OS_ARCH))) diff --git a/modules/plugin/base/public/npapi.h b/modules/plugin/base/public/npapi.h index b8e943d54eb8..9622b7a9fc04 100644 --- a/modules/plugin/base/public/npapi.h +++ b/modules/plugin/base/public/npapi.h @@ -338,7 +338,7 @@ typedef enum { , NPPVpluginEventModel = 1001 #endif -#ifdef MOZ_PLATFORM_HILDON +#if (MOZ_PLATFORM_MAEMO == 5) , NPPVpluginWindowlessLocalBool = 2002 #endif } NPPVariable; @@ -383,7 +383,7 @@ typedef enum { #endif , NPNVsupportsCocoaBool = 3001 /* TRUE if the browser supports the Cocoa event model */ #endif -#ifdef MOZ_PLATFORM_HILDON +#if (MOZ_PLATFORM_MAEMO == 5) , NPNVSupportsWindowlessLocal = 2002 #endif } NPNVariable; diff --git a/modules/plugin/base/public/nsPluginNativeWindow.h b/modules/plugin/base/public/nsPluginNativeWindow.h index f85c9a00f239..c4e8e55059ce 100644 --- a/modules/plugin/base/public/nsPluginNativeWindow.h +++ b/modules/plugin/base/public/nsPluginNativeWindow.h @@ -103,7 +103,7 @@ public: SetPluginInstance(aPluginInstance); return NS_OK; } -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) #define MOZ_COMPOSITED_PLUGINS #endif #ifdef MOZ_COMPOSITED_PLUGINS diff --git a/modules/plugin/base/src/nsNPAPIPlugin.cpp b/modules/plugin/base/src/nsNPAPIPlugin.cpp index 1133a769467e..1482cd2dceb4 100644 --- a/modules/plugin/base/src/nsNPAPIPlugin.cpp +++ b/modules/plugin/base/src/nsNPAPIPlugin.cpp @@ -300,10 +300,10 @@ nsNPAPIPlugin::SetPluginRefNum(short aRefNum) #ifdef MOZ_IPC void -nsNPAPIPlugin::PluginCrashed() +nsNPAPIPlugin::PluginCrashed(const nsAString& dumpID) { nsRefPtr host = dont_AddRef(nsPluginHost::GetInst()); - host->PluginCrashed(this); + host->PluginCrashed(this, dumpID); } #endif @@ -2139,7 +2139,7 @@ _getvalue(NPP npp, NPNVariable variable, void *result) return NPERR_GENERIC_ERROR; } -#ifdef MOZ_PLATFORM_HILDON +#if (MOZ_PLATFORM_MAEMO == 5) case NPNVSupportsWindowlessLocal: { *(NPBool*)result = PR_TRUE; return NPERR_NO_ERROR; @@ -2277,7 +2277,7 @@ _setvalue(NPP npp, NPPVariable variable, void *result) return inst->SetWindowless(bWindowless); #endif } -#ifdef MOZ_PLATFORM_HILDON +#if (MOZ_PLATFORM_MAEMO == 5) case NPPVpluginWindowlessLocalBool: { NPBool bWindowlessLocal = (result != nsnull); return inst->SetWindowlessLocal(bWindowlessLocal); diff --git a/modules/plugin/base/src/nsNPAPIPlugin.h b/modules/plugin/base/src/nsNPAPIPlugin.h index 9671cbd7fd36..0d1fa83f5a9a 100644 --- a/modules/plugin/base/src/nsNPAPIPlugin.h +++ b/modules/plugin/base/src/nsNPAPIPlugin.h @@ -93,8 +93,9 @@ public: #ifdef MOZ_IPC // The IPC mechanism notifies the nsNPAPIPlugin if the plugin crashes and is - // no longer usable. - void PluginCrashed(); + // no longer usable. dumpID is the ID of a minidump that was written, + // or empty if no minidump was written. + void PluginCrashed(const nsAString& dumpID); #endif protected: diff --git a/modules/plugin/base/src/nsNPAPIPluginInstance.cpp b/modules/plugin/base/src/nsNPAPIPluginInstance.cpp index 32cfbf86ba11..b2110eb5b41d 100644 --- a/modules/plugin/base/src/nsNPAPIPluginInstance.cpp +++ b/modules/plugin/base/src/nsNPAPIPluginInstance.cpp @@ -1392,7 +1392,7 @@ NS_IMETHODIMP nsNPAPIPluginInstance::HandleEvent(void* event, PRBool* handled) NS_IMETHODIMP nsNPAPIPluginInstance::GetValueFromPlugin(NPPVariable variable, void* value) { -#ifdef MOZ_PLATFORM_HILDON +#if (MOZ_PLATFORM_MAEMO == 5) // The maemo flash plugin does not remember this. It sets the // value, but doesn't support the get value. if (variable == NPPVpluginWindowlessLocalBool) { diff --git a/modules/plugin/base/src/nsPluginHost.cpp b/modules/plugin/base/src/nsPluginHost.cpp index 72c9fb62de67..de3604687114 100644 --- a/modules/plugin/base/src/nsPluginHost.cpp +++ b/modules/plugin/base/src/nsPluginHost.cpp @@ -89,6 +89,7 @@ #include "nsVersionComparator.h" #include "nsIPrivateBrowsingService.h" #include "nsIObjectLoadingContent.h" +#include "nsIWritablePropertyBag2.h" #include "nsEnumeratorUtils.h" #include "nsXPCOM.h" @@ -5207,7 +5208,7 @@ NS_IMETHODIMP nsPluginHost::Notify(nsITimer* timer) #ifdef MOZ_IPC void -nsPluginHost::PluginCrashed(nsNPAPIPlugin* aPlugin) +nsPluginHost::PluginCrashed(nsNPAPIPlugin* aPlugin, const nsAString& dumpID) { nsPluginTag* pluginTag = FindTagForPlugin(aPlugin); if (!pluginTag) { @@ -5215,6 +5216,17 @@ nsPluginHost::PluginCrashed(nsNPAPIPlugin* aPlugin) return; } + // Notify the app's observer that a plugin crashed so it can submit a crashreport. + PRBool submittedCrashReport = PR_FALSE; + nsCOMPtr obsService = do_GetService("@mozilla.org/observer-service;1"); + nsCOMPtr propbag = do_CreateInstance("@mozilla.org/hash-property-bag;1"); + if (obsService && propbag) { + propbag->SetPropertyAsAString(NS_LITERAL_STRING("minidumpID"), dumpID); + obsService->NotifyObservers(propbag, "plugin-crashed", nsnull); + // see if an observer submitted a crash report. + propbag->GetPropertyAsBool(NS_LITERAL_STRING("submittedCrashReport"), &submittedCrashReport); + } + // Invalidate each nsPluginInstanceTag for the crashed plugin for (PRUint32 i = mInstanceTags.Length(); i > 0; i--) { @@ -5225,7 +5237,8 @@ nsPluginHost::PluginCrashed(nsNPAPIPlugin* aPlugin) instanceTag->mInstance->GetDOMElement(getter_AddRefs(domElement)); nsCOMPtr objectContent(do_QueryInterface(domElement)); if (objectContent) { - objectContent->PluginCrashed(); + objectContent->PluginCrashed(NS_ConvertUTF8toUTF16(pluginTag->mName), + submittedCrashReport); } instanceTag->mInstance->Stop(); diff --git a/modules/plugin/base/src/nsPluginHost.h b/modules/plugin/base/src/nsPluginHost.h index d187d665ab8f..1a3cf951d93e 100644 --- a/modules/plugin/base/src/nsPluginHost.h +++ b/modules/plugin/base/src/nsPluginHost.h @@ -160,7 +160,7 @@ public: void RemoveIdleTimeTarget(nsIPluginInstanceOwner* objectFrame); #ifdef MOZ_IPC - void PluginCrashed(nsNPAPIPlugin* plugin); + void PluginCrashed(nsNPAPIPlugin* plugin, const nsAString& dumpID); #endif nsPluginInstanceTag *FindInstanceTag(nsIPluginInstance *instance); diff --git a/modules/plugin/base/src/nsPluginNativeWindowGtk2.cpp b/modules/plugin/base/src/nsPluginNativeWindowGtk2.cpp index a86366a6fc82..a6fa4d66d0dc 100644 --- a/modules/plugin/base/src/nsPluginNativeWindowGtk2.cpp +++ b/modules/plugin/base/src/nsPluginNativeWindowGtk2.cpp @@ -49,7 +49,7 @@ #include #include -#ifdef MOZ_PLATFORM_HILDON +#if (MOZ_PLATFORM_MAEMO == 5) #define MOZ_COMPOSITED_PLUGINS #endif diff --git a/modules/plugin/test/mochitest/Makefile.in b/modules/plugin/test/mochitest/Makefile.in index 5ac19f15e1a9..4c11e61d5f17 100644 --- a/modules/plugin/test/mochitest/Makefile.in +++ b/modules/plugin/test/mochitest/Makefile.in @@ -45,68 +45,69 @@ include $(DEPTH)/config/autoconf.mk include $(topsrcdir)/config/rules.mk _MOCHITEST_FILES = \ - test_getauthenticationinfo.html \ - test_npobject_getters.html \ - test_npruntime_npnevaluate.html \ - test_npruntime_npninvoke.html \ - test_npruntime_npninvokedefault.html \ - loremipsum.txt \ - loremipsum_file.txt \ - post.sjs \ - pluginstream.js \ - plugin_window.html \ - test_painting.html \ - test_pluginstream_err.html \ - test_pluginstream_src.html \ - test_pluginstream_geturl.html \ - test_pluginstream_geturlnotify.html \ - test_pluginstream_asfile.html \ - test_pluginstream_asfileonly.html \ - test_pluginstream_post.html \ - test_pluginstream_poststream.html \ - test_pluginstream_seek.html \ - test_pluginstream_newstream.html \ - test_multipleinstanceobjects.html \ - test_streamNotify.html \ - test_instantiation.html \ - test_cookies.html \ - test_npn_timers.html \ - test_npn_asynccall.html \ - $(NULL) + test_getauthenticationinfo.html \ + test_npobject_getters.html \ + test_npruntime_npnevaluate.html \ + test_npruntime_npninvoke.html \ + test_npruntime_npninvokedefault.html \ + loremipsum.txt \ + loremipsum_file.txt \ + post.sjs \ + pluginstream.js \ + plugin_window.html \ + test_painting.html \ + test_pluginstream_err.html \ + test_pluginstream_src.html \ + test_pluginstream_geturl.html \ + test_pluginstream_geturlnotify.html \ + test_pluginstream_asfile.html \ + test_pluginstream_asfileonly.html \ + test_pluginstream_post.html \ + test_pluginstream_poststream.html \ + test_pluginstream_seek.html \ + test_pluginstream_newstream.html \ + test_multipleinstanceobjects.html \ + test_streamNotify.html \ + test_instantiation.html \ + test_cookies.html \ + test_npn_timers.html \ + test_npn_asynccall.html \ + $(NULL) -# test_npruntime_npnsetexception.html \ Disabled for e10s +# test_npruntime_npnsetexception.html \ Disabled for e10s ifdef MOZ_IPC _MOCHITEST_FILES += \ - test_crashing.html \ - test_crashing2.html \ - crashing_subpage.html \ - $(NULL) + test_crashing.html \ + test_crashing2.html \ + crashing_subpage.html \ + $(NULL) endif ifeq ($(OS_ARCH),WINNT) _MOCHITEST_FILES += \ - test_windowed_invalidate.html \ - $(NULL) + test_windowed_invalidate.html \ + $(NULL) endif _MOCHICHROME_FILES = \ - test_bug479979.xul \ - test_npruntime.xul \ - test_privatemode.xul \ - test_wmode.xul \ - $(NULL) + test_bug479979.xul \ + test_npruntime.xul \ + test_privatemode.xul \ + test_wmode.xul \ + $(NULL) ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) _MOCHICHROME_FILES += \ - test_convertpoint.xul \ - $(NULL) + test_convertpoint.xul \ + $(NULL) endif ifdef MOZ_IPC _MOCHICHROME_FILES += \ - test_crash_notify.xul \ - $(NULL) + test_crash_notify.xul \ + test_crash_notify_no_report.xul \ + $(NULL) endif libs:: $(_MOCHICHROME_FILES) diff --git a/modules/plugin/test/mochitest/test_crash_notify.xul b/modules/plugin/test/mochitest/test_crash_notify.xul index 68e1238d8e82..4106a840f279 100644 --- a/modules/plugin/test/mochitest/test_crash_notify.xul +++ b/modules/plugin/test/mochitest/test_crash_notify.xul @@ -19,12 +19,71 @@ SimpleTest.waitForExplicitFinish(); var success = false; +var observerFired = false; + +var testObserver = { + observe: function(subject, topic, data) { + observerFired = true; + ok(true, "Observer fired"); + netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); + is(topic, "plugin-crashed", "Checking correct topic"); + is(data, null, "Checking null data"); + ok((subject instanceof Components.interfaces.nsIPropertyBag2), "got Propbag"); + ok((subject instanceof Components.interfaces.nsIWritablePropertyBag2), +"got writable Propbag"); + + var id = subject.getPropertyAsAString("minidumpID"); + isnot(id, "", "got a non-empty crash id"); + let directoryService = + Components.classes["@mozilla.org/file/directory_service;1"]. + getService(Components.interfaces.nsIProperties); + let profD = directoryService.get("ProfD", Components.interfaces.nsIFile); + profD.append("minidumps"); + let dumpFile = profD.clone(); + dumpFile.append(id + ".dmp"); + ok(dumpFile.exists(), "minidump exists"); + let extraFile = profD.clone(); + extraFile.append(id + ".extra"); + ok(extraFile.exists(), "extra file exists"); + // cleanup, to be nice + dumpFile.remove(false); + extraFile.remove(false); + }, + + QueryInterface: function(iid) { + netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); + if (iid.equals(Components.interfaces.nsIObserver) || + iid.equals(Components.interfaces.nsISupportsWeakReference) || + iid.equals(Components.interfaces.nsISupports)) + return this; + throw Components.results.NS_NOINTERFACE; + } +}; + + function onPluginCrashed(aEvent) { ok(true, "Plugin crashed notification received"); + ok(observerFired, "Observer should have fired first"); + is(aEvent.type, "PluginCrashed", "event is correct type"); var pluginElement = document.getElementById("plugin1"); is (pluginElement, aEvent.target, "Plugin crashed event target is plugin element"); + netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); + + ok(aEvent instanceof Components.interfaces.nsIDOMDataContainerEvent, + "plugin crashed event has the right interface"); + var pluginName = aEvent.getData("pluginName"); + is(pluginName, "Test Plug-in"); + var didReport = aEvent.getData("submittedCrashReport"); + // The app itself may or may not have decided to submit the report, so + // allow either true or false here. + ok((didReport == true || didReport == false), "event said crash report was submitted"); + + var os = Components.classes["@mozilla.org/observer-service;1"]. + getService(Components.interfaces.nsIObserverService); + os.removeObserver(testObserver, "plugin-crashed"); + SimpleTest.finish(); } @@ -38,6 +97,10 @@ function runTests() { return; } + var os = Components.classes["@mozilla.org/observer-service;1"]. + getService(Components.interfaces.nsIObserverService); + os.addObserver(testObserver, "plugin-crashed", true); + document.addEventListener("PluginCrashed", onPluginCrashed, false); var pluginElement = document.getElementById("plugin1"); diff --git a/modules/plugin/test/mochitest/test_crash_notify_no_report.xul b/modules/plugin/test/mochitest/test_crash_notify_no_report.xul new file mode 100644 index 000000000000..18fde80ead3b --- /dev/null +++ b/modules/plugin/test/mochitest/test_crash_notify_no_report.xul @@ -0,0 +1,127 @@ + + + + + Plugin Crash Notification Test + + + + diff --git a/netwerk/cookie/src/nsCookieService.cpp b/netwerk/cookie/src/nsCookieService.cpp index 9492be6fba3b..83e95977c5b4 100644 --- a/netwerk/cookie/src/nsCookieService.cpp +++ b/netwerk/cookie/src/nsCookieService.cpp @@ -1727,11 +1727,7 @@ nsCookieService::AddInternal(const nsCString &aBaseDomain, ** Begin BNF: token = 1* - value = token-value | quoted-string - token-value = 1* - quoted-string = ( <"> *( qdtext | quoted-pair ) <"> ) - qdtext = > ; CR | LF removed by necko - quoted-pair = "\" ; CR | LF removed by necko + value = 1* separators = ";" | "=" value-sep = ";" cookie-sep = CR | LF @@ -1766,7 +1762,6 @@ nsCookieService::AddInternal(const nsCString &aBaseDomain, // helper functions for GetTokenValue static inline PRBool iswhitespace (char c) { return c == ' ' || c == '\t'; } static inline PRBool isterminator (char c) { return c == '\n' || c == '\r'; } -static inline PRBool isquoteterminator(char c) { return isterminator(c) || c == '"'; } static inline PRBool isvalueseparator (char c) { return isterminator(c) || c == ';'; } static inline PRBool istokenseparator (char c) { return isvalueseparator(c) || c == '='; } @@ -1806,39 +1801,16 @@ nsCookieService::GetTokenValue(nsASingleFragmentCString::const_char_iterator &aI start = aIter; - if (*aIter == '"') { - // process - // (note: cookie terminators, CR | LF, can't happen: - // they're removed by necko before the header gets here) - // assume value mangled if no terminating '"', return - while (++aIter != aEndIter && !isquoteterminator(*aIter)) { - // if (backwhacked char), skip over it. this allows '\"' in . - // we increment once over the backwhack, nullcheck, then continue to the 'while', - // which increments over the backwhacked char. one exception - we don't allow - // CR | LF here either (see above about necko) - if (*aIter == '\\' && (++aIter == aEndIter || isterminator(*aIter))) - break; - } + // process + // just look for ';' to terminate ('=' allowed) + while (aIter != aEndIter && !isvalueseparator(*aIter)) + ++aIter; - if (aIter != aEndIter && !isterminator(*aIter)) { - // include terminating quote in attribute string - aTokenValue.Rebind(start, ++aIter); - // skip to next ';' - while (aIter != aEndIter && !isvalueseparator(*aIter)) - ++aIter; - } - } else { - // process - // just look for ';' to terminate ('=' allowed) - while (aIter != aEndIter && !isvalueseparator(*aIter)) - ++aIter; - - // remove trailing ; first check we're not at the beginning - if (aIter != start) { - lastSpace = aIter; - while (--lastSpace != start && iswhitespace(*lastSpace)); - aTokenValue.Rebind(start, ++lastSpace); - } + // remove trailing ; first check we're not at the beginning + if (aIter != start) { + lastSpace = aIter; + while (--lastSpace != start && iswhitespace(*lastSpace)); + aTokenValue.Rebind(start, ++lastSpace); } } @@ -1900,10 +1872,6 @@ nsCookieService::ParseAttributes(nsDependentCString &aCookieHeader, if (!tokenValue.IsEmpty()) { tokenValue.BeginReading(tempBegin); tokenValue.EndReading(tempEnd); - if (*tempBegin == '"' && *--tempEnd == '"') { - // our parameter is a quoted-string; remove quotes for later parsing - tokenValue.Rebind(++tempBegin, tempEnd); - } } // decide which attribute we have, and copy the string @@ -2272,8 +2240,15 @@ nsCookieService::GetExpiry(nsCookieAttributes &aCookieAttributes, PRTime tempExpires; PRInt64 expires; + // For Expires, we trim leading and trailing " characters to maximize + // the compatibility of our date parsing. In principle, this processsing + // should be done in our date parser. + nsCString& expiresAttr = aCookieAttributes.expires; + if (!expiresAttr.IsEmpty() && expiresAttr.First() == '"' && expiresAttr.Last() == '"') + expiresAttr = Substring(expiresAttr.BeginReading() + 1, expiresAttr.EndReading() - 1); + // parse expiry time - if (PR_ParseTimeString(aCookieAttributes.expires.get(), PR_TRUE, &tempExpires) == PR_SUCCESS) { + if (PR_ParseTimeString(expiresAttr.get(), PR_TRUE, &tempExpires) == PR_SUCCESS) { expires = tempExpires / PR_USEC_PER_SEC; } else { return PR_TRUE; diff --git a/netwerk/test/TestCookie.cpp b/netwerk/test/TestCookie.cpp index f16438f66b75..525ad0e7ab6d 100644 --- a/netwerk/test/TestCookie.cpp +++ b/netwerk/test/TestCookie.cpp @@ -462,39 +462,45 @@ main(PRInt32 argc, char *argv[]) SetACookie(cookieService, "http://expireme.org/", nsnull, "test=expiry; expires=Thu, 10 Apr 1980 16:33:12 GMT", nsnull); GetACookie(cookieService, "http://expireme.org/", nsnull, getter_Copies(cookie)); rv[2] = CheckResult(cookie.get(), MUST_BE_NULL); - - SetACookie(cookieService, "http://expireme.org/", nsnull, "test=expiry; max-age=60", nsnull); + SetACookie(cookieService, "http://expireme.org/", nsnull, "test=expiry; expires=\"Thu, 10 Apr 1980 16:33:12 GMT", nsnull); GetACookie(cookieService, "http://expireme.org/", nsnull, getter_Copies(cookie)); - rv[3] = CheckResult(cookie.get(), MUST_EQUAL, "test=expiry"); - SetACookie(cookieService, "http://expireme.org/", nsnull, "test=expiry; max-age=-20", nsnull); + rv[3] = CheckResult(cookie.get(), MUST_BE_NULL); + SetACookie(cookieService, "http://expireme.org/", nsnull, "test=expiry; expires=\"Thu, 10 Apr 1980 16:33:12 GMT\"", nsnull); GetACookie(cookieService, "http://expireme.org/", nsnull, getter_Copies(cookie)); rv[4] = CheckResult(cookie.get(), MUST_BE_NULL); + SetACookie(cookieService, "http://expireme.org/", nsnull, "test=expiry; max-age=60", nsnull); GetACookie(cookieService, "http://expireme.org/", nsnull, getter_Copies(cookie)); rv[5] = CheckResult(cookie.get(), MUST_EQUAL, "test=expiry"); - SetACookie(cookieService, "http://expireme.org/", nsnull, "test=expiry; expires=Thu, 10 Apr 1980 16:33:12 GMT", nsnull); + SetACookie(cookieService, "http://expireme.org/", nsnull, "test=expiry; max-age=-20", nsnull); GetACookie(cookieService, "http://expireme.org/", nsnull, getter_Copies(cookie)); rv[6] = CheckResult(cookie.get(), MUST_BE_NULL); SetACookie(cookieService, "http://expireme.org/", nsnull, "test=expiry; max-age=60", nsnull); + GetACookie(cookieService, "http://expireme.org/", nsnull, getter_Copies(cookie)); + rv[7] = CheckResult(cookie.get(), MUST_EQUAL, "test=expiry"); + SetACookie(cookieService, "http://expireme.org/", nsnull, "test=expiry; expires=Thu, 10 Apr 1980 16:33:12 GMT", nsnull); + GetACookie(cookieService, "http://expireme.org/", nsnull, getter_Copies(cookie)); + rv[8] = CheckResult(cookie.get(), MUST_BE_NULL); + SetACookie(cookieService, "http://expireme.org/", nsnull, "test=expiry; max-age=60", nsnull); SetACookie(cookieService, "http://expireme.org/", nsnull, "newtest=expiry; max-age=60", nsnull); GetACookie(cookieService, "http://expireme.org/", nsnull, getter_Copies(cookie)); - rv[7] = CheckResult(cookie.get(), MUST_CONTAIN, "test=expiry"); - rv[8] = CheckResult(cookie.get(), MUST_CONTAIN, "newtest=expiry"); + rv[9] = CheckResult(cookie.get(), MUST_CONTAIN, "test=expiry"); + rv[10] = CheckResult(cookie.get(), MUST_CONTAIN, "newtest=expiry"); SetACookie(cookieService, "http://expireme.org/", nsnull, "test=differentvalue; max-age=0", nsnull); GetACookie(cookieService, "http://expireme.org/", nsnull, getter_Copies(cookie)); - rv[9] = CheckResult(cookie.get(), MUST_EQUAL, "newtest=expiry"); + rv[11] = CheckResult(cookie.get(), MUST_EQUAL, "newtest=expiry"); SetACookie(cookieService, "http://expireme.org/", nsnull, "newtest=evendifferentvalue; max-age=0", nsnull); GetACookie(cookieService, "http://expireme.org/", nsnull, getter_Copies(cookie)); - rv[10] = CheckResult(cookie.get(), MUST_BE_NULL); - - SetACookie(cookieService, "http://foo.expireme.org/", nsnull, "test=expiry; domain=.expireme.org; max-age=60", nsnull); - GetACookie(cookieService, "http://expireme.org/", nsnull, getter_Copies(cookie)); - rv[11] = CheckResult(cookie.get(), MUST_EQUAL, "test=expiry"); - SetACookie(cookieService, "http://bar.expireme.org/", nsnull, "test=differentvalue; domain=.expireme.org; max-age=0", nsnull); - GetACookie(cookieService, "http://expireme.org/", nsnull, getter_Copies(cookie)); rv[12] = CheckResult(cookie.get(), MUST_BE_NULL); - allTestsPassed = PrintResult(rv, 13) && allTestsPassed; + SetACookie(cookieService, "http://foo.expireme.org/", nsnull, "test=expiry; domain=.expireme.org; max-age=60", nsnull); + GetACookie(cookieService, "http://expireme.org/", nsnull, getter_Copies(cookie)); + rv[13] = CheckResult(cookie.get(), MUST_EQUAL, "test=expiry"); + SetACookie(cookieService, "http://bar.expireme.org/", nsnull, "test=differentvalue; domain=.expireme.org; max-age=0", nsnull); + GetACookie(cookieService, "http://expireme.org/", nsnull, getter_Copies(cookie)); + rv[14] = CheckResult(cookie.get(), MUST_BE_NULL); + + allTestsPassed = PrintResult(rv, 15) && allTestsPassed; // *** multiple cookie tests @@ -535,7 +541,7 @@ main(PRInt32 argc, char *argv[]) rv[1] = CheckResult(cookie.get(), MUST_BE_NULL); SetACookie(cookieService, "http://parser.test/", nsnull, "test=\"fubar! = foo;bar\\\";\" parser; domain=.parser.test; max-age=6\nfive; max-age=2.63,", nsnull); GetACookie(cookieService, "http://parser.test/", nsnull, getter_Copies(cookie)); - rv[2] = CheckResult(cookie.get(), MUST_CONTAIN, "test=\"fubar! = foo;bar\\\";\""); + rv[2] = CheckResult(cookie.get(), MUST_CONTAIN, "test=\"fubar! = foo"); rv[3] = CheckResult(cookie.get(), MUST_CONTAIN, "five"); SetACookie(cookieService, "http://parser.test/", nsnull, "test=kill; domain=.parser.test; max-age=0 \n five; max-age=0", nsnull); GetACookie(cookieService, "http://parser.test/", nsnull, getter_Copies(cookie)); diff --git a/netwerk/test/httpserver/httpd.js b/netwerk/test/httpserver/httpd.js index a141b3e0b658..41ae8465d27f 100644 --- a/netwerk/test/httpserver/httpd.js +++ b/netwerk/test/httpserver/httpd.js @@ -57,6 +57,9 @@ const PR_UINT32_MAX = Math.pow(2, 32) - 1; /** True if debugging output is enabled, false otherwise. */ var DEBUG = false; // non-const *only* so tweakable in server tests +/** True if debugging output should be timestamped. */ +var DEBUG_TIMESTAMP = false; // non-const so tweakable in server tests + var gGlobalObject = this; /** @@ -75,7 +78,7 @@ function NS_ASSERT(cond, msg) var stack = new Error().stack.split(/\n/); dumpn(stack.map(function(val) { return "###!!! " + val; }).join("\n")); - + throw Cr.NS_ERROR_ABORT; } } @@ -164,12 +167,32 @@ const HEADERS_SUFFIX = HIDDEN_CHAR + "headers" + HIDDEN_CHAR; /** Type used to denote SJS scripts for CGI-like functionality. */ const SJS_TYPE = "sjs"; +/** Base for relative timestamps produced by dumpn(). */ +var firstStamp = 0; -/** dump(str) with a trailing "\n" -- only outputs if DEBUG */ +/** dump(str) with a trailing "\n" -- only outputs if DEBUG. */ function dumpn(str) { if (DEBUG) - dump(str + "\n"); + { + var prefix = "HTTPD-INFO | "; + if (DEBUG_TIMESTAMP) + { + if (firstStamp === 0) + firstStamp = Date.now(); + + var elapsed = Date.now() - firstStamp; // milliseconds + var min = Math.floor(elapsed / 60000); + var sec = (elapsed % 60000) / 1000; + + if (sec < 10) + prefix += min + ":0" + sec.toFixed(3) + " | "; + else + prefix += min + ":" + sec.toFixed(3) + " | "; + } + + dump(prefix + str + "\n"); + } } /** Dumps the current JS stack if DEBUG. */ diff --git a/testing/mochitest/server.js b/testing/mochitest/server.js index bb88d5c5e826..4bb343a86f36 100644 --- a/testing/mochitest/server.js +++ b/testing/mochitest/server.js @@ -198,6 +198,7 @@ function createMochitestServer(serverBasePath) server.registerDirectory("/", serverBasePath); server.registerPathHandler("/server/shutdown", serverShutdown); + server.registerPathHandler("/server/debug", serverDebug); server.registerContentType("sjs", "sjs"); // .sjs == CGI-like functionality server.registerContentType("jar", "application/x-jar"); server.registerContentType("ogg", "application/ogg"); @@ -310,6 +311,39 @@ function serverShutdown(metadata, response) server.stop(serverStopped); } +// /server/debug?[012] +function serverDebug(metadata, response) +{ + response.setStatusLine(metadata.httpVersion, 400, "Bad debugging level"); + if (metadata.queryString.length !== 1) + return; + + var mode; + if (metadata.queryString === "0") { + // do this now so it gets logged with the old mode + dumpn("Server debug logs disabled."); + DEBUG = false; + DEBUG_TIMESTAMP = false; + mode = "disabled"; + } else if (metadata.queryString === "1") { + DEBUG = true; + DEBUG_TIMESTAMP = false; + mode = "enabled"; + } else if (metadata.queryString === "2") { + DEBUG = true; + DEBUG_TIMESTAMP = true; + mode = "enabled, with timestamps"; + } else { + return; + } + + response.setStatusLine(metadata.httpVersion, 200, "OK"); + response.setHeader("Content-type", "text/plain", false); + var body = "Server debug logs " + mode + "."; + response.bodyOutputStream.write(body, body.length); + dumpn(body); +} + // // DIRECTORY LISTINGS // diff --git a/testing/mochitest/tests/test_bug100533.html b/testing/mochitest/tests/test_bug100533.html deleted file mode 100644 index 6d9280f1917b..000000000000 --- a/testing/mochitest/tests/test_bug100533.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - Test for Bug 100533 - - - - - -Mozilla Bug 100533 -

-
- - - - -
-
-
-
- - - diff --git a/testing/mochitest/tests/test_bug1297.html b/testing/mochitest/tests/test_bug1297.html deleted file mode 100644 index 41b9bffba1d4..000000000000 --- a/testing/mochitest/tests/test_bug1297.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - Test for Bug 1297 - - - - - -Mozilla Bug 1297 -

- -
-
-
- - - diff --git a/testing/mochitest/tests/test_bug1366.html b/testing/mochitest/tests/test_bug1366.html deleted file mode 100644 index a66fa94fe3ed..000000000000 --- a/testing/mochitest/tests/test_bug1366.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - Test for Bug 1366 - - - - - -Mozilla Bug 1366 -

- -
-
-
- - - diff --git a/testing/mochitest/tests/test_bug1400.html b/testing/mochitest/tests/test_bug1400.html deleted file mode 100644 index 355844881ddf..000000000000 --- a/testing/mochitest/tests/test_bug1400.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - Test for Bug 1400 - - - - - -Mozilla Bug 1400 -

- -
-
-
- - - diff --git a/testing/mochitest/tests/test_bug1682.html b/testing/mochitest/tests/test_bug1682.html deleted file mode 100644 index 57edbc9bc432..000000000000 --- a/testing/mochitest/tests/test_bug1682.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - Test for Bug 1682 - - - - - -Mozilla Bug 1682 -

- -
-
-
- - - diff --git a/testing/mochitest/tests/test_bug172261.html b/testing/mochitest/tests/test_bug172261.html deleted file mode 100644 index d47de4159b92..000000000000 --- a/testing/mochitest/tests/test_bug172261.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - Test for Bug 172261 - - - - - -Mozilla Bug 172261 -

- -

- -
-
-
- - - diff --git a/testing/mochitest/tests/test_bug1823.html b/testing/mochitest/tests/test_bug1823.html deleted file mode 100644 index c319f98bf781..000000000000 --- a/testing/mochitest/tests/test_bug1823.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - Test for Bug 1823 - - - - - -Mozilla Bug 1823 -

- -
-
-
- - - diff --git a/testing/mochitest/tests/test_bug2082.html b/testing/mochitest/tests/test_bug2082.html deleted file mode 100644 index f429ce754c2b..000000000000 --- a/testing/mochitest/tests/test_bug2082.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - Test for Bug 2082 - - - - - -Mozilla Bug 2082 -

- -
-
-
- - - diff --git a/testing/mochitest/tests/test_bug218236.html b/testing/mochitest/tests/test_bug218236.html deleted file mode 100644 index 0e930393028d..000000000000 --- a/testing/mochitest/tests/test_bug218236.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - Test for Bug 218236 - - - - - -Mozilla Bug 218236 -

- -
-
-
- - - diff --git a/testing/mochitest/tests/test_bug218277.html b/testing/mochitest/tests/test_bug218277.html deleted file mode 100644 index e63f0188e528..000000000000 --- a/testing/mochitest/tests/test_bug218277.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - Test for Bug 218277 - - - - - -Mozilla Bug 218277 -

-
- -
-
-
-
- - - diff --git a/testing/mochitest/tests/test_bug237071.html b/testing/mochitest/tests/test_bug237071.html deleted file mode 100644 index ceb7ebd9fdac..000000000000 --- a/testing/mochitest/tests/test_bug237071.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - Test for Bug 237071 - - - - - -Mozilla Bug 237071 -

-
-
    -
  1. should be 22
  2. -
  3. should be 23
  4. -
-
-
-
-
- - - diff --git a/testing/mochitest/tests/test_bug238409.html b/testing/mochitest/tests/test_bug238409.html deleted file mode 100644 index c9b4f25a078b..000000000000 --- a/testing/mochitest/tests/test_bug238409.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - Test for Bug 238409 - - - - - -Mozilla Bug 238409 -

- -
-
-
- - - diff --git a/testing/mochitest/tests/test_bug24958.html b/testing/mochitest/tests/test_bug24958.html deleted file mode 100644 index 3cd04d1c513f..000000000000 --- a/testing/mochitest/tests/test_bug24958.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - Test for Bug 24958 - - - - - - -Mozilla Bug 24958 -

- -
-
-
- - - diff --git a/testing/mochitest/tests/test_bug277724.html b/testing/mochitest/tests/test_bug277724.html deleted file mode 100644 index ace086776b55..000000000000 --- a/testing/mochitest/tests/test_bug277724.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - Test for Bug 277724 - - - - - -Mozilla Bug 277724 -

-
-
-
- - - - - - diff --git a/testing/mochitest/tests/test_bug300691-1.html b/testing/mochitest/tests/test_bug300691-1.html deleted file mode 100644 index 39d63e57ae15..000000000000 --- a/testing/mochitest/tests/test_bug300691-1.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - Test for Bug 300691 - - - - - - -Mozilla Bug 300691 -

- -

- -
-
-
- - - diff --git a/testing/mochitest/tests/test_bug300691-2.html b/testing/mochitest/tests/test_bug300691-2.html deleted file mode 100644 index e2a4e4986dd8..000000000000 --- a/testing/mochitest/tests/test_bug300691-2.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - Test for Bug 300691 - - - - - -Mozilla Bug 300691 -

- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - diff --git a/testing/mochitest/tests/test_bug300691-3.xhtml b/testing/mochitest/tests/test_bug300691-3.xhtml deleted file mode 100644 index df20ff992d87..000000000000 --- a/testing/mochitest/tests/test_bug300691-3.xhtml +++ /dev/null @@ -1,51 +0,0 @@ - - - - Test for Bug 300691 - - - - - -Mozilla Bug 300691 -

- -
-
-
-
-
-
-
-
-
- - - diff --git a/testing/mochitest/tests/test_bug302186.html b/testing/mochitest/tests/test_bug302186.html deleted file mode 100644 index e6de785dbe34..000000000000 --- a/testing/mochitest/tests/test_bug302186.html +++ /dev/null @@ -1,423 +0,0 @@ - - - - - Test for Bug 302186 - - - - - - - -Mozilla Bug 302186 -

-
- - -
-
- There should be no red. -
-
- There should be no red. - -
-
- - -
-
- There should be no red. -
-
- There should be no red. -
-
- - -
-
- There should be no red. -
-
- There should be no red. - -
-
- - -
-
There should be no red. -
-
- There should be no red. - -
-
- - -
-
- There should be no red. -
-
- There should be no red. - -
-
- - -
-
- There should be no red. -
-
- There should be no red. - -
-
- - -
-
- There should be no red. -
-
- There should be no red. - -
-
- - -
-
- There should be no red. -
-
- There should be no red. - -
-
- - -
-
- There should be no red. -
-
- There should be no red. - -
-
- - -
-
- There should be no red. -
-
- There should be no red. - -
-
- - -
-
- There should be no red. -
-
- There should be no red. - -
-
- - -
-
- - There should be no red. -
-
- There should be no red. - -
-
- - -
-
- - There should be no red. -
-
- There should be no red. -
-
- - -
-
- - There should be no red. -
-
- There should be no red. - -
-
- - - - -
-
- There should be no red. -
-
- - -
-
- There should be no red. -
-
- -
- -
-
-
- - - diff --git a/testing/mochitest/tests/test_bug308484.html b/testing/mochitest/tests/test_bug308484.html deleted file mode 100644 index 014a570cc36a..000000000000 --- a/testing/mochitest/tests/test_bug308484.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - Test for Bug 308484 - - - - - -Mozilla Bug 308484 -

- -
-
-
- - diff --git a/testing/mochitest/tests/test_bug308856.html b/testing/mochitest/tests/test_bug308856.html deleted file mode 100644 index 9c2034188fee..000000000000 --- a/testing/mochitest/tests/test_bug308856.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - Test for Bug 308856 - - - - - -Mozilla Bug 308856 -

- -
-
-
- - - diff --git a/testing/mochitest/tests/test_bug311681.html b/testing/mochitest/tests/test_bug311681.html deleted file mode 100644 index 46fb7908c6e9..000000000000 --- a/testing/mochitest/tests/test_bug311681.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - Test for Bug 311681 - - - - - -Mozilla Bug 311681 - -

- -
-
- - - diff --git a/testing/mochitest/tests/test_bug311681.xhtml b/testing/mochitest/tests/test_bug311681.xhtml deleted file mode 100644 index d869cc3b3ba0..000000000000 --- a/testing/mochitest/tests/test_bug311681.xhtml +++ /dev/null @@ -1,105 +0,0 @@ - - - - Test for Bug 311681 - - - - - -Mozilla Bug 311681 - -

- -
-
- - - diff --git a/testing/mochitest/tests/test_bug311681.xml b/testing/mochitest/tests/test_bug311681.xml deleted file mode 100644 index 9e3dadedeca6..000000000000 --- a/testing/mochitest/tests/test_bug311681.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - Test for Bug 311681 - - - - - -Mozilla Bug 311681 - -

- -
-
- - - diff --git a/testing/mochitest/tests/test_bug311681.xul b/testing/mochitest/tests/test_bug311681.xul deleted file mode 100644 index 9c7f5af878da..000000000000 --- a/testing/mochitest/tests/test_bug311681.xul +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - Test for Bug 311681 - - - - -Mozilla Bug 311681 - -

- -
-
- - -
diff --git a/testing/mochitest/tests/test_bug319381.html b/testing/mochitest/tests/test_bug319381.html deleted file mode 100644 index 8ed87f86363a..000000000000 --- a/testing/mochitest/tests/test_bug319381.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - Test for Bug 319381 - - - - - -Mozilla Bug 319381 -

- -
-
-
- - - diff --git a/testing/mochitest/tests/test_bug332848.xhtml b/testing/mochitest/tests/test_bug332848.xhtml deleted file mode 100644 index 1087455867ff..000000000000 --- a/testing/mochitest/tests/test_bug332848.xhtml +++ /dev/null @@ -1,71 +0,0 @@ - - - - Test for Bug 332848 - - - - - -Mozilla Bug 332848 -

- -
-
-
-
- - - diff --git a/testing/mochitest/tests/test_bug333983.html b/testing/mochitest/tests/test_bug333983.html deleted file mode 100644 index 947ac1c73d91..000000000000 --- a/testing/mochitest/tests/test_bug333983.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - Test for Bug 333983 - - - - - -Mozilla Bug 333983 -

- -
-
-
- - - diff --git a/testing/mochitest/tests/test_bug3348.html b/testing/mochitest/tests/test_bug3348.html deleted file mode 100644 index 19968c02da6a..000000000000 --- a/testing/mochitest/tests/test_bug3348.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - Test for Bug 3348 - - - - - -Mozilla Bug 3348 -

- -
-
-
- - - diff --git a/testing/mochitest/tests/test_bug337124.html b/testing/mochitest/tests/test_bug337124.html deleted file mode 100644 index 99cc5c74159c..000000000000 --- a/testing/mochitest/tests/test_bug337124.html +++ /dev/null @@ -1,33 +0,0 @@ - -Test for Bug 337124 - - - - - -Mozilla Bug 337124 - - - - -
- -
- -
-
- - -
- 
-
- - \ No newline at end of file diff --git a/testing/mochitest/tests/test_bug337631.html b/testing/mochitest/tests/test_bug337631.html deleted file mode 100644 index b8e7bc41596a..000000000000 --- a/testing/mochitest/tests/test_bug337631.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - Test for Bug 337631 - - - - - -Mozilla Bug 337631 -

-
- -foo - -

adsfasdf

- -
-
-
-
- - - diff --git a/testing/mochitest/tests/test_bug338541.xhtml b/testing/mochitest/tests/test_bug338541.xhtml deleted file mode 100644 index fb61249dc7fc..000000000000 --- a/testing/mochitest/tests/test_bug338541.xhtml +++ /dev/null @@ -1,50 +0,0 @@ - - - - Test for Bug 338541 - - - - - -Mozilla Bug 338541 -

-
-
-
- - - - diff --git a/testing/mochitest/tests/test_bug338679.html b/testing/mochitest/tests/test_bug338679.html deleted file mode 100644 index 9f76beb72801..000000000000 --- a/testing/mochitest/tests/test_bug338679.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - -Testcase bug 338679 - - - - - -Mozilla Bug 338679 -
-
-
Actual result:
-
-
-    
-
- -
Expected result:
- -
-
-Previous:       width: 20em;
-New:            width: auto;
-    
-
-
-
-
-
-
- - diff --git a/testing/mochitest/tests/test_bug339350.xhtml b/testing/mochitest/tests/test_bug339350.xhtml deleted file mode 100644 index e856e45e9188..000000000000 --- a/testing/mochitest/tests/test_bug339350.xhtml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - diff --git a/testing/mochitest/tests/test_bug339494.html b/testing/mochitest/tests/test_bug339494.html deleted file mode 100644 index 5a65c21fa330..000000000000 --- a/testing/mochitest/tests/test_bug339494.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - Test for Bug 339494 - - - - - -Mozilla Bug 339494 -

- -
-
-
- - - diff --git a/testing/mochitest/tests/test_bug339494.xhtml b/testing/mochitest/tests/test_bug339494.xhtml deleted file mode 100644 index 92894e607f8e..000000000000 --- a/testing/mochitest/tests/test_bug339494.xhtml +++ /dev/null @@ -1,61 +0,0 @@ - - - - Test for Bug 339494 - - - - - -Mozilla Bug 339494 -

-