diff --git a/accessible/src/atk/nsAccessibleWrap.cpp b/accessible/src/atk/nsAccessibleWrap.cpp index 64cfc554db7..dba70cecd6f 100644 --- a/accessible/src/atk/nsAccessibleWrap.cpp +++ b/accessible/src/atk/nsAccessibleWrap.cpp @@ -871,10 +871,11 @@ refChildCB(AtkObject *aAtkObj, gint aChildIndex) if (!childAtkObj) return nsnull; g_object_ref(childAtkObj); - - //this will addref parent + + if (aAtkObj != childAtkObj->accessible_parent) atk_object_set_parent(childAtkObj, aAtkObj); - return childAtkObj; + + return childAtkObj; } gint diff --git a/accessible/src/base/StyleInfo.cpp b/accessible/src/base/StyleInfo.cpp index ad00f76bafb..f79d819f84c 100644 --- a/accessible/src/base/StyleInfo.cpp +++ b/accessible/src/base/StyleInfo.cpp @@ -110,3 +110,16 @@ StyleInfo::Margin(css::Side aSide, nsAString& aValue) aValue.AppendFloat(nsPresContext::AppUnitsToFloatCSSPixels(coordVal)); aValue.AppendLiteral("px"); } + +void +StyleInfo::Format(const nscolor& aValue, nsString& aFormattedValue) +{ + // Combine the string like rgb(R, G, B) from nscolor. + aFormattedValue.AppendLiteral("rgb("); + aFormattedValue.AppendInt(NS_GET_R(aValue)); + aFormattedValue.AppendLiteral(", "); + aFormattedValue.AppendInt(NS_GET_G(aValue)); + aFormattedValue.AppendLiteral(", "); + aFormattedValue.AppendInt(NS_GET_B(aValue)); + aFormattedValue.Append(')'); +} diff --git a/accessible/src/base/StyleInfo.h b/accessible/src/base/StyleInfo.h index 87575ebf2cf..9b9d5aedf6d 100644 --- a/accessible/src/base/StyleInfo.h +++ b/accessible/src/base/StyleInfo.h @@ -60,6 +60,8 @@ public: void MarginTop(nsAString& aValue) { Margin(css::eSideTop, aValue); } void MarginBottom(nsAString& aValue) { Margin(css::eSideBottom, aValue); } + static void Format(const nscolor& aValue, nsString& aFormattedValue); + private: StyleInfo() MOZ_DELETE; StyleInfo(const StyleInfo&) MOZ_DELETE; diff --git a/accessible/src/base/nsAccDocManager.cpp b/accessible/src/base/nsAccDocManager.cpp index ddc0fe0817b..0f1cbe49746 100644 --- a/accessible/src/base/nsAccDocManager.cpp +++ b/accessible/src/base/nsAccDocManager.cpp @@ -364,9 +364,9 @@ nsAccDocManager::CreateDocOrRootAccessible(nsIDocument *aDocument) aDocument->IsResourceDoc() || !aDocument->IsActive()) return nsnull; - // Ignore documents without presshell. - nsIPresShell *presShell = aDocument->GetShell(); - if (!presShell) + // Ignore documents without presshell and not having root frame. + nsIPresShell* presShell = aDocument->GetShell(); + if (!presShell || !presShell->GetRootFrame()) return nsnull; // Do not create document accessible until role content is loaded, otherwise diff --git a/accessible/src/base/nsTextAttrs.cpp b/accessible/src/base/nsTextAttrs.cpp index 68286438a74..6d2243b18bc 100644 --- a/accessible/src/base/nsTextAttrs.cpp +++ b/accessible/src/base/nsTextAttrs.cpp @@ -41,12 +41,16 @@ #include "nsAccUtils.h" #include "nsCoreUtils.h" #include "nsHyperTextAccessibleWrap.h" +#include "StyleInfo.h" #include "gfxFont.h" #include "gfxUserFontSet.h" #include "nsFontMetrics.h" #include "nsLayoutUtils.h" +using namespace mozilla; +using namespace mozilla::a11y; + //////////////////////////////////////////////////////////////////////////////// // Constants and structures @@ -70,7 +74,6 @@ const char* const kCopyValue = nsnull; static nsCSSTextAttrMapItem gCSSTextAttrsMap[] = { // CSS name CSS value Attribute name Attribute value - { "color", kAnyValue, &nsGkAtoms::color, kCopyValue }, { "font-family", kAnyValue, &nsGkAtoms::font_family, kCopyValue }, { "font-style", kAnyValue, &nsGkAtoms::font_style, kCopyValue }, { "text-decoration", "line-through", &nsGkAtoms::textLineThroughStyle, "solid" }, @@ -154,34 +157,34 @@ nsTextAttrsMgr::GetAttributes(nsIPersistentProperties *aAttributes, nsLangTextAttr langTextAttr(mHyperTextAcc, hyperTextElm, offsetNode); textAttrArray.AppendElement(static_cast(&langTextAttr)); - // "color" text attribute - nsCSSTextAttr colorTextAttr(0, hyperTextElm, offsetElm); - textAttrArray.AppendElement(static_cast(&colorTextAttr)); - // "font-family" text attribute - nsCSSTextAttr fontFamilyTextAttr(1, hyperTextElm, offsetElm); + nsCSSTextAttr fontFamilyTextAttr(0, hyperTextElm, offsetElm); textAttrArray.AppendElement(static_cast(&fontFamilyTextAttr)); // "font-style" text attribute - nsCSSTextAttr fontStyleTextAttr(2, hyperTextElm, offsetElm); + nsCSSTextAttr fontStyleTextAttr(1, hyperTextElm, offsetElm); textAttrArray.AppendElement(static_cast(&fontStyleTextAttr)); // "text-line-through-style" text attribute - nsCSSTextAttr lineThroughTextAttr(3, hyperTextElm, offsetElm); + nsCSSTextAttr lineThroughTextAttr(2, hyperTextElm, offsetElm); textAttrArray.AppendElement(static_cast(&lineThroughTextAttr)); // "text-underline-style" text attribute - nsCSSTextAttr underlineTextAttr(4, hyperTextElm, offsetElm); + nsCSSTextAttr underlineTextAttr(3, hyperTextElm, offsetElm); textAttrArray.AppendElement(static_cast(&underlineTextAttr)); // "text-position" text attribute - nsCSSTextAttr posTextAttr(5, hyperTextElm, offsetElm); + nsCSSTextAttr posTextAttr(4, hyperTextElm, offsetElm); textAttrArray.AppendElement(static_cast(&posTextAttr)); // "background-color" text attribute nsBGColorTextAttr bgColorTextAttr(rootFrame, frame); textAttrArray.AppendElement(static_cast(&bgColorTextAttr)); + // "color" text attribute + ColorTextAttr colorTextAttr(rootFrame, frame); + textAttrArray.AppendElement(static_cast(&colorTextAttr)); + // "font-size" text attribute nsFontSizeTextAttr fontSizeTextAttr(rootFrame, frame); textAttrArray.AppendElement(static_cast(&fontSizeTextAttr)); @@ -363,7 +366,7 @@ nsCSSTextAttr::Format(const nsAutoString& aValue, nsAString& aFormattedValue) //////////////////////////////////////////////////////////////////////////////// -// nsBackgroundTextAttr +// nsBGColorTextAttr //////////////////////////////////////////////////////////////////////////////// nsBGColorTextAttr::nsBGColorTextAttr(nsIFrame *aRootFrame, nsIFrame *aFrame) : @@ -387,16 +390,8 @@ nsBGColorTextAttr::GetValueFor(nsIContent *aContent, nscolor *aValue) void nsBGColorTextAttr::Format(const nscolor& aValue, nsAString& aFormattedValue) { - // Combine the string like rgb(R, G, B) from nscolor. nsAutoString value; - value.AppendLiteral("rgb("); - value.AppendInt(NS_GET_R(aValue)); - value.AppendLiteral(", "); - value.AppendInt(NS_GET_G(aValue)); - value.AppendLiteral(", "); - value.AppendInt(NS_GET_B(aValue)); - value.Append(')'); - + StyleInfo::Format(aValue, value); aFormattedValue = value; } @@ -426,6 +421,43 @@ nsBGColorTextAttr::GetColor(nsIFrame *aFrame, nscolor *aColor) } +//////////////////////////////////////////////////////////////////////////////// +// ColorTextAttr +//////////////////////////////////////////////////////////////////////////////// + +ColorTextAttr::ColorTextAttr(nsIFrame* aRootFrame, nsIFrame* aFrame) : + nsTextAttr(!aFrame) +{ + mRootNativeValue = aRootFrame->GetStyleColor()->mColor; + mIsRootDefined = true; + + if (aFrame) { + mNativeValue = aFrame->GetStyleColor()->mColor; + mIsDefined = true; + } +} + +bool +ColorTextAttr::GetValueFor(nsIContent* aContent, nscolor* aValue) +{ + nsIFrame* frame = aContent->GetPrimaryFrame(); + if (frame) { + *aValue = frame->GetStyleColor()->mColor; + return true; + } + + return false; +} + +void +ColorTextAttr::Format(const nscolor& aValue, nsAString& aFormattedValue) +{ + nsAutoString value; + StyleInfo::Format(aValue, value); + aFormattedValue = value; +} + + //////////////////////////////////////////////////////////////////////////////// // nsFontSizeTextAttr //////////////////////////////////////////////////////////////////////////////// diff --git a/accessible/src/base/nsTextAttrs.h b/accessible/src/base/nsTextAttrs.h index 1ae84882bc9..9e527a3c75f 100644 --- a/accessible/src/base/nsTextAttrs.h +++ b/accessible/src/base/nsTextAttrs.h @@ -307,6 +307,25 @@ private: }; +/** + * Class is used for the work with 'color' text attribute in nsTextAttrsMgr + * class. + */ +class ColorTextAttr : public nsTextAttr +{ +public: + ColorTextAttr(nsIFrame* aRootFrame, nsIFrame* aFrame); + + // nsITextAttr + virtual nsIAtom* GetName() const { return nsGkAtoms::color; } + +protected: + // nsTextAttr + virtual bool GetValueFor(nsIContent* aContent, nscolor* aValue); + virtual void Format(const nscolor& aValue, nsAString& aFormattedValue); +}; + + /** * Class is used for the work with "font-size" text attribute in nsTextAttrsMgr * class. diff --git a/b2g/installer/package-manifest.in b/b2g/installer/package-manifest.in index 14653da7bb2..d8c60779378 100644 --- a/b2g/installer/package-manifest.in +++ b/b2g/installer/package-manifest.in @@ -192,6 +192,7 @@ @BINPATH@/components/find.xpt @BINPATH@/components/fuel.xpt @BINPATH@/components/gfx.xpt +@BINPATH@/components/html5.xpt @BINPATH@/components/htmlparser.xpt @BINPATH@/components/imglib2.xpt @BINPATH@/components/imgicon.xpt diff --git a/browser/components/sessionstore/src/nsSessionStore.js b/browser/components/sessionstore/src/nsSessionStore.js index f7599b75b53..ecf195d4af9 100644 --- a/browser/components/sessionstore/src/nsSessionStore.js +++ b/browser/components/sessionstore/src/nsSessionStore.js @@ -1681,11 +1681,16 @@ SessionStoreService.prototype = { // If we're still here, then the window is usable. Look at the open tabs in // comparison to home pages. If all the tabs are home pages then we'll end // up overwriting all of them. Otherwise we'll just close the tabs that - // match home pages. - let homePages = aWindow.gHomeButton.getHomePage().split("|"); + // match home pages. Tabs with the about:blank URI will always be + // overwritten. + let homePages = ["about:blank"]; let removableTabs = []; let tabbrowser = aWindow.gBrowser; let normalTabsLen = tabbrowser.tabs.length - tabbrowser._numPinnedTabs; + let startupPref = this._prefBranch.getIntPref("startup.page"); + if (startupPref == 1) + homePages = homePages.concat(aWindow.gHomeButton.getHomePage().split("|")); + for (let i = tabbrowser._numPinnedTabs; i < tabbrowser.tabs.length; i++) { let tab = tabbrowser.tabs[i]; if (homePages.indexOf(tab.linkedBrowser.currentURI.spec) != -1) { diff --git a/browser/config/mozconfigs/linux32/debug b/browser/config/mozconfigs/linux32/debug index 5b1874f7133..708e4a9917e 100644 --- a/browser/config/mozconfigs/linux32/debug +++ b/browser/config/mozconfigs/linux32/debug @@ -1,5 +1,6 @@ ac_add_options --enable-debug ac_add_options --enable-trace-malloc +ac_add_options --enable-signmar . $topsrcdir/build/unix/mozconfig.linux diff --git a/browser/config/mozconfigs/linux32/nightly b/browser/config/mozconfigs/linux32/nightly index bf97d38749e..ecc471b01ed 100644 --- a/browser/config/mozconfigs/linux32/nightly +++ b/browser/config/mozconfigs/linux32/nightly @@ -1,6 +1,7 @@ ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL} ac_add_options --enable-update-packaging ac_add_options --enable-codesighs +ac_add_options --enable-signmar # Nightlies only since this has a cost in performance ac_add_options --enable-js-diagnostics diff --git a/browser/config/mozconfigs/linux64/debug b/browser/config/mozconfigs/linux64/debug index 631d97006e7..e2965be08c1 100644 --- a/browser/config/mozconfigs/linux64/debug +++ b/browser/config/mozconfigs/linux64/debug @@ -1,5 +1,6 @@ ac_add_options --enable-debug ac_add_options --enable-trace-malloc +ac_add_options --enable-signmar . $topsrcdir/build/unix/mozconfig.linux diff --git a/browser/config/mozconfigs/linux64/nightly b/browser/config/mozconfigs/linux64/nightly index bf97d38749e..ecc471b01ed 100644 --- a/browser/config/mozconfigs/linux64/nightly +++ b/browser/config/mozconfigs/linux64/nightly @@ -1,6 +1,7 @@ ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL} ac_add_options --enable-update-packaging ac_add_options --enable-codesighs +ac_add_options --enable-signmar # Nightlies only since this has a cost in performance ac_add_options --enable-js-diagnostics diff --git a/browser/config/mozconfigs/macosx-lion-universal/nightly b/browser/config/mozconfigs/macosx-lion-universal/nightly index da575599dbd..571e8029610 100644 --- a/browser/config/mozconfigs/macosx-lion-universal/nightly +++ b/browser/config/mozconfigs/macosx-lion-universal/nightly @@ -7,6 +7,7 @@ ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL} ac_add_options --enable-update-packaging ac_add_options --enable-codesighs ac_add_options --disable-install-strip +ac_add_options --enable-signmar # Nightlies only since this has a cost in performance ac_add_options --enable-js-diagnostics diff --git a/browser/config/mozconfigs/macosx-universal/nightly b/browser/config/mozconfigs/macosx-universal/nightly index faf95eccd86..e695b59e7e4 100644 --- a/browser/config/mozconfigs/macosx-universal/nightly +++ b/browser/config/mozconfigs/macosx-universal/nightly @@ -7,6 +7,7 @@ ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL} ac_add_options --enable-update-packaging ac_add_options --enable-codesighs ac_add_options --disable-install-strip +ac_add_options --enable-signmar # Nightlies only since this has a cost in performance ac_add_options --enable-js-diagnostics diff --git a/browser/config/mozconfigs/macosx32-lion/debug b/browser/config/mozconfigs/macosx32-lion/debug index cc7a05b93b5..10dcda14498 100644 --- a/browser/config/mozconfigs/macosx32-lion/debug +++ b/browser/config/mozconfigs/macosx32-lion/debug @@ -1,6 +1,7 @@ . $topsrcdir/build/macosx/mozconfig.leopard ac_add_options --enable-debug ac_add_options --enable-trace-malloc +ac_add_options --enable-signmar # Enable parallel compiling mk_add_options MOZ_MAKE_FLAGS="-j12" diff --git a/browser/config/mozconfigs/macosx32/debug b/browser/config/mozconfigs/macosx32/debug index ed59b024405..31d2e357d7c 100644 --- a/browser/config/mozconfigs/macosx32/debug +++ b/browser/config/mozconfigs/macosx32/debug @@ -1,6 +1,7 @@ . $topsrcdir/build/macosx/mozconfig.leopard ac_add_options --enable-debug ac_add_options --enable-trace-malloc +ac_add_options --enable-signmar # Enable parallel compiling mk_add_options MOZ_MAKE_FLAGS="-j4" diff --git a/browser/config/mozconfigs/macosx64-lion/debug b/browser/config/mozconfigs/macosx64-lion/debug index 73cbd46a179..daa52c4ee59 100644 --- a/browser/config/mozconfigs/macosx64-lion/debug +++ b/browser/config/mozconfigs/macosx64-lion/debug @@ -3,6 +3,7 @@ ac_add_options --enable-debug ac_add_options --enable-trace-malloc ac_add_options --enable-accessibility +ac_add_options --enable-signmar # Enable parallel compiling mk_add_options MOZ_MAKE_FLAGS="-j12" diff --git a/browser/config/mozconfigs/macosx64/debug b/browser/config/mozconfigs/macosx64/debug index fe676468d5e..794d660c53b 100644 --- a/browser/config/mozconfigs/macosx64/debug +++ b/browser/config/mozconfigs/macosx64/debug @@ -3,6 +3,7 @@ ac_add_options --enable-debug ac_add_options --enable-trace-malloc ac_add_options --enable-accessibility +ac_add_options --enable-signmar # Enable parallel compiling mk_add_options MOZ_MAKE_FLAGS="-j4" diff --git a/browser/config/mozconfigs/win32/debug b/browser/config/mozconfigs/win32/debug index 1ae4e6f1bc4..2239bcd05b7 100644 --- a/browser/config/mozconfigs/win32/debug +++ b/browser/config/mozconfigs/win32/debug @@ -1,5 +1,6 @@ ac_add_options --enable-debug ac_add_options --enable-trace-malloc +ac_add_options --enable-signmar # Needed to enable breakpad in application.ini export MOZILLA_OFFICIAL=1 diff --git a/browser/config/mozconfigs/win32/nightly b/browser/config/mozconfigs/win32/nightly index 06767f1154c..402b48a186d 100644 --- a/browser/config/mozconfigs/win32/nightly +++ b/browser/config/mozconfigs/win32/nightly @@ -4,6 +4,7 @@ mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) $(MOZ_OBJDIR)/_profile/pgo/profiles ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL} ac_add_options --enable-update-packaging ac_add_options --enable-jemalloc +ac_add_options --enable-signmar # Nightlies only since this has a cost in performance ac_add_options --enable-js-diagnostics diff --git a/browser/config/mozconfigs/win64/debug b/browser/config/mozconfigs/win64/debug index 49dac31ba28..81de886d8d3 100644 --- a/browser/config/mozconfigs/win64/debug +++ b/browser/config/mozconfigs/win64/debug @@ -3,6 +3,7 @@ ac_add_options --host=x86_64-pc-mingw32 ac_add_options --enable-debug ac_add_options --enable-trace-malloc +ac_add_options --enable-signmar # Needed to enable breakpad in application.ini export MOZILLA_OFFICIAL=1 diff --git a/browser/config/mozconfigs/win64/nightly b/browser/config/mozconfigs/win64/nightly index e3d3ddd9c41..d9e61fb5a24 100644 --- a/browser/config/mozconfigs/win64/nightly +++ b/browser/config/mozconfigs/win64/nightly @@ -7,6 +7,7 @@ mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) $(MOZ_OBJDIR)/_profile/pgo/profiles ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL} ac_add_options --enable-update-packaging ac_add_options --enable-jemalloc +ac_add_options --enable-signmar # Nightlies only since this has a cost in performance ac_add_options --enable-js-diagnostics diff --git a/browser/devtools/scratchpad/scratchpad.js b/browser/devtools/scratchpad/scratchpad.js index 025d1d4e07a..baf73c11f79 100644 --- a/browser/devtools/scratchpad/scratchpad.js +++ b/browser/devtools/scratchpad/scratchpad.js @@ -75,6 +75,8 @@ const BUTTON_POSITION_DONT_SAVE = 2; * The scratchpad object handles the Scratchpad window functionality. */ var Scratchpad = { + _initialWindowTitle: document.title, + /** * The script execution context. This tells Scratchpad in which context the * script shall execute. @@ -151,7 +153,22 @@ var Scratchpad = { */ setFilename: function SP_setFilename(aFilename) { - document.title = this.filename = aFilename; + this.filename = aFilename; + this._updateTitle(); + }, + + /** + * Update the Scratchpad window title based on the current state. + * @private + */ + _updateTitle: function SP__updateTitle() + { + if (this.filename) { + document.title = (this.editor && this.editor.dirty ? "*" : "") + + this.filename; + } else { + document.title = this._initialWindowTitle; + } }, /** @@ -168,7 +185,7 @@ var Scratchpad = { filename: this.filename, text: this.getText(), executionContext: this.executionContext, - saved: this.saved + saved: !this.editor.dirty, }; }, @@ -184,7 +201,9 @@ var Scratchpad = { if (aState.filename) { this.setFilename(aState.filename); } - this.saved = aState.saved; + if (this.editor) { + this.editor.dirty = !aState.saved; + } if (aState.executionContext == SCRATCHPAD_CONTEXT_BROWSER) { this.setBrowserContext(); @@ -638,7 +657,7 @@ var Scratchpad = { fp.defaultString = ""; if (fp.show() != Ci.nsIFilePicker.returnCancel) { this.setFilename(fp.file.path); - this.importFromFile(fp.file, false, this.onTextSaved.bind(this)); + this.importFromFile(fp.file, false); } }, @@ -658,7 +677,9 @@ var Scratchpad = { file.initWithPath(this.filename); this.exportToFile(file, true, false, function(aStatus) { - this.onTextSaved(); + if (Components.isSuccessCode(aStatus)) { + this.editor.dirty = false; + } if (aCallback) { aCallback(aStatus); } @@ -681,7 +702,9 @@ var Scratchpad = { this.setFilename(fp.file.path); this.exportToFile(fp.file, true, false, function(aStatus) { - this.onTextSaved(); + if (Components.isSuccessCode(aStatus)) { + this.editor.dirty = false; + } if (aCallback) { aCallback(aStatus); } @@ -783,7 +806,6 @@ var Scratchpad = { if (aEvent.target != document) { return; } - let chrome = Services.prefs.getBoolPref(DEVTOOLS_CHROME_ENABLED); if (chrome) { let environmentMenu = document.getElementById("sp-environment-menu"); @@ -794,10 +816,11 @@ var Scratchpad = { errorConsoleCommand.removeAttribute("disabled"); } + let state = null; let initialText = this.strings.GetStringFromName("scratchpadIntro"); if ("arguments" in window && window.arguments[0] instanceof Ci.nsIDialogParamBlock) { - let state = JSON.parse(window.arguments[0].GetString(0)); + state = JSON.parse(window.arguments[0].GetString(0)); this.setState(state); initialText = state.text; } @@ -808,32 +831,34 @@ var Scratchpad = { mode: SourceEditor.MODES.JAVASCRIPT, showLineNumbers: true, initialText: initialText, + contextMenu: "scratchpad-text-popup", }; let editorPlaceholder = document.getElementById("scratchpad-editor"); - this.editor.init(editorPlaceholder, config, this.onEditorLoad.bind(this)); + this.editor.init(editorPlaceholder, config, + this._onEditorLoad.bind(this, state)); }, /** * The load event handler for the source editor. This method does post-load * editor initialization. + * + * @private + * @param object aState + * The initial Scratchpad state object. */ - onEditorLoad: function SP_onEditorLoad() + _onEditorLoad: function SP__onEditorLoad(aState) { - this.editor.addEventListener(SourceEditor.EVENTS.CONTEXT_MENU, - this.onContextMenu); + this.editor.addEventListener(SourceEditor.EVENTS.DIRTY_CHANGED, + this._onDirtyChanged); this.editor.focus(); this.editor.setCaretOffset(this.editor.getCharCount()); + if (aState) { + this.editor.dirty = !aState.saved; + } this.initialized = true; - if (this.filename && !this.saved) { - this.onTextChanged(); - } - else if (this.filename && this.saved) { - this.onTextSaved(); - } - this._triggerObservers("Ready"); }, @@ -851,36 +876,17 @@ var Scratchpad = { }, /** - * The contextmenu event handler for the source editor. This method opens the - * Scratchpad context menu popup at the pointer location. + * The Source Editor DirtyChanged event handler. This function updates the + * Scratchpad window title to show an asterisk when there are unsaved changes. * + * @private + * @see SourceEditor.EVENTS.DIRTY_CHANGED * @param object aEvent - * An event object coming from the SourceEditor. This object needs to - * hold the screenX and screenY properties. + * The DirtyChanged event object. */ - onContextMenu: function SP_onContextMenu(aEvent) + _onDirtyChanged: function SP__onDirtyChanged(aEvent) { - let menu = document.getElementById("scratchpad-text-popup"); - if (menu.state == "closed") { - menu.openPopupAtScreen(aEvent.screenX, aEvent.screenY, true); - } - }, - - /** - * The popupshowing event handler for the Edit menu. This method updates the - * enabled/disabled state of the Undo and Redo commands, based on the editor - * state such that the menu items render correctly for the user when the menu - * shows. - */ - onEditPopupShowing: function SP_onEditPopupShowing() - { - goUpdateGlobalEditMenuItems(); - - let undo = document.getElementById("sp-cmd-undo"); - undo.setAttribute("disabled", !this.editor.canUndo()); - - let redo = document.getElementById("sp-cmd-redo"); - redo.setAttribute("disabled", !this.editor.canRedo()); + Scratchpad._updateTitle(); }, /** @@ -899,36 +905,6 @@ var Scratchpad = { this.editor.redo(); }, - /** - * This method adds a listener to the editor for text changes. Called when - * a scratchpad is saved, opened from file, or restored from a saved file. - */ - onTextSaved: function SP_onTextSaved(aStatus) - { - if (aStatus && !Components.isSuccessCode(aStatus)) { - return; - } - if (!document || !this.initialized) { - return; // file saved to disk after window has closed - } - document.title = document.title.replace(/^\*/, ""); - this.saved = true; - this.editor.addEventListener(SourceEditor.EVENTS.TEXT_CHANGED, - this.onTextChanged); - }, - - /** - * The scratchpad handler for editor text change events. This handler - * indicates that there are unsaved changes in the UI. - */ - onTextChanged: function SP_onTextChanged() - { - document.title = "*" + document.title; - Scratchpad.saved = false; - Scratchpad.editor.removeEventListener(SourceEditor.EVENTS.TEXT_CHANGED, - Scratchpad.onTextChanged); - }, - /** * The Scratchpad window unload event handler. This method unloads/destroys * the source editor. @@ -942,8 +918,8 @@ var Scratchpad = { } this.resetContext(); - this.editor.removeEventListener(SourceEditor.EVENTS.CONTEXT_MENU, - this.onContextMenu); + this.editor.removeEventListener(SourceEditor.EVENTS.DIRTY_CHANGED, + this._onDirtyChanged); this.editor.destroy(); this.editor = null; this.initialized = false; @@ -953,13 +929,18 @@ var Scratchpad = { * Prompt to save scratchpad if it has unsaved changes. * * @param function aCallback - * Optional function you want to call when file is saved + * Optional function you want to call when file is saved. The callback + * receives three arguments: + * - toClose (boolean) - tells if the window should be closed. + * - saved (boolen) - tells if the file has been saved. + * - status (number) - the file save status result (if the file was + * saved). * @return boolean * Whether the window should be closed */ promptSave: function SP_promptSave(aCallback) { - if (this.filename && !this.saved) { + if (this.filename && this.editor.dirty) { let ps = Services.prompt; let flags = ps.BUTTON_POS_0 * ps.BUTTON_TITLE_SAVE + ps.BUTTON_POS_1 * ps.BUTTON_TITLE_CANCEL + @@ -971,12 +952,25 @@ var Scratchpad = { flags, null, null, null, null, {}); if (button == BUTTON_POSITION_CANCEL) { + if (aCallback) { + aCallback(false, false); + } return false; } + if (button == BUTTON_POSITION_SAVE) { - this.saveFile(aCallback); + this.saveFile(function(aStatus) { + if (aCallback) { + aCallback(true, true, aStatus); + } + }); + return true; } } + + if (aCallback) { + aCallback(true, false); + } return true; }, @@ -988,10 +982,22 @@ var Scratchpad = { */ onClose: function SP_onClose(aEvent) { - let toClose = this.promptSave(); - if (!toClose) { - aEvent.preventDefault(); + if (this._skipClosePrompt) { + return; } + + this.promptSave(function(aShouldClose, aSaved, aStatus) { + let shouldClose = aShouldClose; + if (aSaved && !Components.isSuccessCode(aStatus)) { + shouldClose = false; + } + + if (shouldClose) { + this._skipClosePrompt = true; + window.close(); + } + }.bind(this)); + aEvent.preventDefault(); }, /** @@ -1003,10 +1009,20 @@ var Scratchpad = { */ close: function SP_close(aCallback) { - let toClose = this.promptSave(aCallback); - if (toClose) { - window.close(); - } + this.promptSave(function(aShouldClose, aSaved, aStatus) { + let shouldClose = aShouldClose; + if (aSaved && !Components.isSuccessCode(aStatus)) { + shouldClose = false; + } + + if (shouldClose) { + this._skipClosePrompt = true; + window.close(); + } + if (aCallback) { + aCallback(); + } + }.bind(this)); }, _observers: [], diff --git a/browser/devtools/scratchpad/scratchpad.xul b/browser/devtools/scratchpad/scratchpad.xul index b0dc59960bb..7efe53bed14 100644 --- a/browser/devtools/scratchpad/scratchpad.xul +++ b/browser/devtools/scratchpad/scratchpad.xul @@ -81,11 +81,11 @@ - - + + + command="se-cmd-undo"/> + command="se-cmd-redo"/> #endif - @@ -223,17 +219,17 @@ + onpopupshowing="goUpdateGlobalEditMenuItems()"> + command="se-cmd-undo"/> + command="se-cmd-redo"/> - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/browser/devtools/sourceeditor/source-editor-ui.jsm b/browser/devtools/sourceeditor/source-editor-ui.jsm index 8833ac0e0ce..c28c590685d 100644 --- a/browser/devtools/sourceeditor/source-editor-ui.jsm +++ b/browser/devtools/sourceeditor/source-editor-ui.jsm @@ -50,6 +50,7 @@ var EXPORTED_SYMBOLS = ["SourceEditorUI"]; function SourceEditorUI(aEditor) { this.editor = aEditor; + this._onDirtyChanged = this._onDirtyChanged.bind(this); } SourceEditorUI.prototype = { @@ -72,6 +73,8 @@ SourceEditorUI.prototype = { if (this._ownerWindow.controllers) { this._controller = new SourceEditorController(this.editor); this._ownerWindow.controllers.insertControllerAt(0, this._controller); + this.editor.addEventListener(this.editor.EVENTS.DIRTY_CHANGED, + this._onDirtyChanged); } }, @@ -177,12 +180,40 @@ SourceEditorUI.prototype = { } }, + /** + * This is executed after each undo/redo operation. + * @private + */ + _onUndoRedo: function SEU__onUndoRedo() + { + if (this._ownerWindow.goUpdateCommand) { + this._ownerWindow.goUpdateCommand("se-cmd-undo"); + this._ownerWindow.goUpdateCommand("se-cmd-redo"); + } + }, + + /** + * The DirtyChanged event handler for the editor. This tracks the editor state + * changes to make sure the Source Editor overlay Undo/Redo commands are kept + * up to date. + * @private + */ + _onDirtyChanged: function SEU__onDirtyChanged() + { + this._onUndoRedo(); + }, + /** * Destroy the SourceEditorUI instance. This is called by the * SourceEditor.destroy() method. */ destroy: function SEU_destroy() { + if (this._ownerWindow.controllers) { + this.editor.removeEventListener(this.editor.EVENTS.DIRTY_CHANGED, + this._onDirtyChanged); + } + this._ownerWindow = null; this.editor = null; this._controller = null; @@ -220,6 +251,8 @@ SourceEditorController.prototype = { case "cmd_findAgain": case "cmd_findPrevious": case "cmd_gotoLine": + case "se-cmd-undo": + case "se-cmd-redo": result = true; break; default: @@ -251,6 +284,12 @@ SourceEditorController.prototype = { case "cmd_findPrevious": result = this._editor.lastFind && this._editor.lastFind.lastFound != -1; break; + case "se-cmd-undo": + result = this._editor.canUndo(); + break; + case "se-cmd-redo": + result = this._editor.canRedo(); + break; default: result = false; break; @@ -281,6 +320,12 @@ SourceEditorController.prototype = { case "cmd_gotoLine": this._editor.ui.gotoLine(); break; + case "se-cmd-undo": + this._editor.undo(); + break; + case "se-cmd-redo": + this._editor.redo(); + break; } }, diff --git a/browser/devtools/sourceeditor/source-editor.jsm b/browser/devtools/sourceeditor/source-editor.jsm index 2b174319336..ae02faea5a5 100644 --- a/browser/devtools/sourceeditor/source-editor.jsm +++ b/browser/devtools/sourceeditor/source-editor.jsm @@ -199,6 +199,22 @@ SourceEditor.DEFAULTS = { * @type array */ keys: null, + + /** + * The editor context menu you want to display when the user right-clicks + * within the editor. This property can be: + * - a string that tells the ID of the xul:menupopup you want. This needs to + * be available within the editor parentElement.ownerDocument. + * - an nsIDOMElement object reference pointing to the xul:menupopup you + * want to open when the contextmenu event is fired. + * + * Set this property to a falsey value to disable the default context menu. + * + * @see SourceEditor.EVENTS.CONTEXT_MENU for more control over the contextmenu + * event. + * @type string|nsIDOMElement + */ + contextMenu: "sourceEditorContextMenu", }; /** @@ -216,6 +232,8 @@ SourceEditor.EVENTS = { * This value comes from the DOM contextmenu event.screenX property. * - screenY - the pointer location on the y axis, relative to the screen. * This value comes from the DOM contextmenu event.screenY property. + * + * @see SourceEditor.DEFAULTS.contextMenu */ CONTEXT_MENU: "ContextMenu", @@ -282,6 +300,15 @@ SourceEditor.EVENTS = { * condition. */ BREAKPOINT_CHANGE: "BreakpointChange", + + /** + * The DirtyChanged event is fired when the dirty state of the editor is + * changed. The dirty state of the editor tells if the are text changes that + * have not been saved yet. Event object properties: oldValue and newValue. + * Both are booleans telling the old dirty state and the new state, + * respectively. + */ + DIRTY_CHANGED: "DirtyChanged", }; /** @@ -303,6 +330,12 @@ function extend(aDestination, aSource) * Add methods common to all components. */ extend(SourceEditor.prototype, { + // Expose the static constants on the SourceEditor instances. + EVENTS: SourceEditor.EVENTS, + MODES: SourceEditor.MODES, + THEMES: SourceEditor.THEMES, + DEFAULTS: SourceEditor.DEFAULTS, + _lastFind: null, /** diff --git a/browser/devtools/sourceeditor/test/Makefile.in b/browser/devtools/sourceeditor/test/Makefile.in index 65b20166b7a..eff7bde8d1a 100644 --- a/browser/devtools/sourceeditor/test/Makefile.in +++ b/browser/devtools/sourceeditor/test/Makefile.in @@ -58,6 +58,7 @@ _BROWSER_TEST_FILES = \ browser_bug725388_mouse_events.js \ browser_bug707987_debugger_breakpoints.js \ browser_bug712982_line_ruler_click.js \ + browser_bug700893_dirty_state.js \ head.js \ libs:: $(_BROWSER_TEST_FILES) diff --git a/browser/devtools/sourceeditor/test/browser_bug700893_dirty_state.js b/browser/devtools/sourceeditor/test/browser_bug700893_dirty_state.js new file mode 100644 index 00000000000..3b95526595e --- /dev/null +++ b/browser/devtools/sourceeditor/test/browser_bug700893_dirty_state.js @@ -0,0 +1,94 @@ +/* vim: set ts=2 et sw=2 tw=80: */ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +function test() { + + let temp = {}; + Cu.import("resource:///modules/source-editor.jsm", temp); + let SourceEditor = temp.SourceEditor; + + let component = Services.prefs.getCharPref(SourceEditor.PREFS.COMPONENT); + if (component == "textarea") { + ok(true, "skip test for bug 700893: only applicable for non-textarea components"); + return; + } + + waitForExplicitFinish(); + + let editor; + + const windowUrl = "data:text/xml," + + ""; + const windowFeatures = "chrome,titlebar,toolbar,centerscreen,resizable,dialog=no"; + + let testWin = Services.ww.openWindow(null, windowUrl, "_blank", windowFeatures, null); + testWin.addEventListener("load", function onWindowLoad() { + testWin.removeEventListener("load", onWindowLoad, false); + waitForFocus(initEditor, testWin); + }, false); + + function initEditor() + { + let hbox = testWin.document.querySelector("hbox"); + editor = new SourceEditor(); + editor.init(hbox, {initialText: "foobar"}, editorLoaded); + } + + function editorLoaded() + { + editor.focus(); + + is(editor.dirty, false, "editory is not dirty"); + + let event = null; + let eventHandler = function(aEvent) { + event = aEvent; + }; + editor.addEventListener(SourceEditor.EVENTS.DIRTY_CHANGED, eventHandler); + + editor.setText("omg"); + + is(editor.dirty, true, "editor is dirty"); + ok(event, "DirtyChanged event fired") + is(event.oldValue, false, "event.oldValue is correct"); + is(event.newValue, true, "event.newValue is correct"); + + event = null; + editor.setText("foo 2"); + ok(!event, "no DirtyChanged event fired"); + + editor.dirty = false; + + is(editor.dirty, false, "editor marked as clean"); + ok(event, "DirtyChanged event fired") + is(event.oldValue, true, "event.oldValue is correct"); + is(event.newValue, false, "event.newValue is correct"); + + event = null; + editor.setText("foo 3"); + + is(editor.dirty, true, "editor is dirty after changes"); + ok(event, "DirtyChanged event fired") + is(event.oldValue, false, "event.oldValue is correct"); + is(event.newValue, true, "event.newValue is correct"); + + editor.undo(); + is(editor.dirty, false, "editor is not dirty after undo"); + ok(event, "DirtyChanged event fired") + is(event.oldValue, true, "event.oldValue is correct"); + is(event.newValue, false, "event.newValue is correct"); + + editor.removeEventListener(SourceEditor.EVENTS.DIRTY_CHANGED, eventHandler); + + editor.destroy(); + + testWin.close(); + testWin = editor = null; + + waitForFocus(finish, window); + } +} diff --git a/browser/devtools/styleeditor/styleeditor.xul b/browser/devtools/styleeditor/styleeditor.xul index e84df003c0f..d27b9db46e1 100644 --- a/browser/devtools/styleeditor/styleeditor.xul +++ b/browser/devtools/styleeditor/styleeditor.xul @@ -45,6 +45,8 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/browser/locales/jar.mn b/browser/locales/jar.mn index 53e66a8a5ef..3f6ec78b062 100644 --- a/browser/locales/jar.mn +++ b/browser/locales/jar.mn @@ -30,6 +30,7 @@ locale/browser/devtools/styleinspector.dtd (%chrome/browser/devtools/styleinspector.dtd) locale/browser/devtools/webConsole.dtd (%chrome/browser/devtools/webConsole.dtd) locale/browser/devtools/sourceeditor.properties (%chrome/browser/devtools/sourceeditor.properties) + locale/browser/devtools/sourceeditor.dtd (%chrome/browser/devtools/sourceeditor.dtd) locale/browser/newTab.dtd (%chrome/browser/newTab.dtd) locale/browser/newTab.properties (%chrome/browser/newTab.properties) locale/browser/openLocation.dtd (%chrome/browser/openLocation.dtd) diff --git a/browser/themes/gnomestripe/preferences/preferences.css b/browser/themes/gnomestripe/preferences/preferences.css index 3a19fbb185c..37c045c8324 100644 --- a/browser/themes/gnomestripe/preferences/preferences.css +++ b/browser/themes/gnomestripe/preferences/preferences.css @@ -181,8 +181,4 @@ radio[pane=paneSync] { margin-bottom: 1em; } -#syncEnginesList { - height: 10em; -} - %endif diff --git a/browser/themes/pinstripe/preferences/preferences.css b/browser/themes/pinstripe/preferences/preferences.css index 9f6da01fdd9..40406e41a5a 100644 --- a/browser/themes/pinstripe/preferences/preferences.css +++ b/browser/themes/pinstripe/preferences/preferences.css @@ -239,8 +239,4 @@ caption { margin-bottom: 1em; } -#syncEnginesList { - height: 10em; -} - %endif diff --git a/browser/themes/winstripe/preferences/preferences.css b/browser/themes/winstripe/preferences/preferences.css index d36cb7c2857..ed9fe267194 100644 --- a/browser/themes/winstripe/preferences/preferences.css +++ b/browser/themes/winstripe/preferences/preferences.css @@ -169,10 +169,6 @@ radio[pane=paneSync] { #syncAddDeviceLabel { margin-top: 1em; margin-bottom: 1em; - } - -#syncEnginesList { - height: 11em; } %endif diff --git a/build/unix/build-toolchain/build-gcc.py b/build/unix/build-toolchain/build-gcc.py index 47ed4ccf11c..101e901f450 100755 --- a/build/unix/build-toolchain/build-gcc.py +++ b/build/unix/build-toolchain/build-gcc.py @@ -99,6 +99,33 @@ def build_linux_headers(inst_dir): build_linux_headers_aux(inst_dir) with_env({"PATH" : aux_inst_dir + "/bin:%s" % os.environ["PATH"]}, f) +def build_gcc(stage_dir, is_stage_one): + gcc_build_dir = stage_dir + '/gcc' + tool_inst_dir = stage_dir + '/inst' + lib_inst_dir = stage_dir + '/libinst' + gcc_configure_args = ["--prefix=%s" % tool_inst_dir, + "--enable-__cxa_atexit", + "--with-gmp=%s" % lib_inst_dir, + "--with-mpfr=%s" % lib_inst_dir, + "--with-mpc=%s" % lib_inst_dir, + "--enable-languages=c,c++", + "--disable-multilib", + "--disable-bootstrap"] + if is_stage_one: + # We build the stage1 gcc without shared libraries. Otherwise its + # libgcc.so would depend on the system libc.so, which causes problems + # when it tries to use that libgcc.so and the libc we are about to + # build. + gcc_configure_args.append("--disable-shared") + + build_package(gcc_source_dir, gcc_build_dir, gcc_configure_args) + + if is_stage_one: + # The glibc build system uses -lgcc_eh, but at least in this setup + # libgcc.a has all it needs. + d = tool_inst_dir + "/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/" + os.symlink(d + "libgcc.a", d + "libgcc_eh.a") + def build_one_stage(env, stage_dir, is_stage_one): def f(): build_one_stage_aux(stage_dir, is_stage_one) @@ -129,33 +156,18 @@ def build_one_stage_aux(stage_dir, is_stage_one): build_package(binutils_source_dir, binutils_build_dir, ["--prefix=%s" % tool_inst_dir]) - gcc_build_dir = stage_dir + '/gcc' - gcc_configure_args = ["--prefix=%s" % tool_inst_dir, - "--enable-__cxa_atexit", - "--with-gmp=%s" % lib_inst_dir, - "--with-mpfr=%s" % lib_inst_dir, - "--with-mpc=%s" % lib_inst_dir, - "--enable-languages=c,c++", - "--disable-multilib", - "--disable-bootstrap"] + # During stage one we have to build gcc first, this glibc doesn't even + # build with gcc 4.6. During stage two, we have to build glibc first. + # The problem is that libstdc++ is built with xgcc and if glibc has + # not been built yet xgcc will use the system one. if is_stage_one: - # We build the stage1 gcc without shared libraries. Otherwise its - # libgcc.so would depend on the system libc.so, which causes problems - # when it tries to use that libgcc.so and the libc we are about to - # build. - gcc_configure_args.append("--disable-shared") - - build_package(gcc_source_dir, gcc_build_dir, gcc_configure_args) - - if is_stage_one: - # The glibc build system uses -lgcc_eh, but at least in this setup - # libgcc.a has all it needs. - d = tool_inst_dir + "/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/" - os.symlink(d + "libgcc.a", d + "libgcc_eh.a") - - build_glibc({"CC" : tool_inst_dir + "/bin/gcc", - "CXX" : tool_inst_dir + "/bin/g++"}, - stage_dir, tool_inst_dir) + build_gcc(stage_dir, is_stage_one) + build_glibc({"CC" : tool_inst_dir + "/bin/gcc", + "CXX" : tool_inst_dir + "/bin/g++"}, + stage_dir, tool_inst_dir) + else: + build_glibc({}, stage_dir, tool_inst_dir) + build_gcc(stage_dir, is_stage_one) def build_tar_package(tar, name, base, directory): name = os.path.realpath(name) diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index fb8bfafc528..d0eeb0c7897 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -143,6 +143,7 @@ XPCOM_USE_LEA = @XPCOM_USE_LEA@ MOZ_INSTALLER = @MOZ_INSTALLER@ MOZ_MAINTENANCE_SERVICE = @MOZ_MAINTENANCE_SERVICE@ MOZ_VERIFY_MAR_SIGNATURE = @MOZ_VERIFY_MAR_SIGNATURE@ +MOZ_ENABLE_SIGNMAR = @MOZ_ENABLE_SIGNMAR@ MOZ_UPDATER = @MOZ_UPDATER@ MOZ_UPDATE_CHANNEL = @MOZ_UPDATE_CHANNEL@ MOZ_UPDATE_PACKAGING = @MOZ_UPDATE_PACKAGING@ diff --git a/configure.in b/configure.in index 81235d97640..964ea17efb4 100644 --- a/configure.in +++ b/configure.in @@ -318,7 +318,7 @@ if test -n "$gonkdir" ; then STLPORT_CPPFLAGS="-I$gonkdir/ndk/sources/cxx-stl/stlport/stlport/" STLPORT_LIBS="-lstlport" - CPPFLAGS="-DANDROID -isystem $gonkdir/bionic/libc/include/ -isystem $gonkdir/bionic/libc/kernel/common -isystem $gonkdir/bionic/libc/arch-arm/include -isystem $gonkdir/bionic/libc/kernel/arch-arm -isystem $gonkdir/bionic/libm/include -isystem $gonkdir/frameworks/base/opengl/include -isystem $gonkdir/frameworks/base/native/include -isystem $gonkdir/hardware/libhardware/include -isystem $gonkdir/hardware/libhardware_legacy/include -isystem $gonkdir/system/core/include -isystem $gonkdir/bionic -isystem $gonkdir/frameworks/base/include $STLPORT_CPPFLAGS $CPPFLAGS -isystem $gonkdir/frameworks/base/services/sensorservice" + CPPFLAGS="-DANDROID -I$gonkdir/bionic/libc/include/ -I$gonkdir/bionic/libc/kernel/common -I$gonkdir/bionic/libc/arch-arm/include -I$gonkdir/bionic/libc/kernel/arch-arm -I$gonkdir/bionic/libm/include -I$gonkdir/frameworks/base/opengl/include -I$gonkdir/frameworks/base/native/include -I$gonkdir/hardware/libhardware/include -I$gonkdir/hardware/libhardware_legacy/include -I$gonkdir/system/core/include -I$gonkdir/bionic -I$gonkdir/frameworks/base/include $STLPORT_CPPFLAGS $CPPFLAGS -I$gonkdir/frameworks/base/services/sensorservice" CFLAGS="-mandroid -fno-short-enums -fno-exceptions $CFLAGS" CXXFLAGS="-mandroid -fno-short-enums -fno-exceptions $CXXFLAGS" LIBS="$LIBS $STLPORT_LIBS" @@ -6499,6 +6499,23 @@ if test -n "$MOZ_VERIFY_MAR_SIGNATURE"; then fi fi +dnl ======================================================== +dnl Enable building the signmar program. +dnl This option is much different than the --enable-verify-mar option. +dnl --enable-verify-mar is for enabling the verification check on MAR +dnl files in the updater. The --enable-signmar option is for building +dnl the signmar program. +dnl ======================================================== + +MOZ_ARG_ENABLE_BOOL(sign-mar, +[ --enable-signmar Enable building the signmar program], + MOZ_ENABLE_SIGNMAR=1, + MOZ_ENABLE_SIGNMAR= ) + +if test -n "$MOZ_ENABLE_SIGNMAR"; then + AC_DEFINE(MOZ_ENABLE_SIGNMAR) +fi + dnl ======================================================== dnl Updater dnl ======================================================== @@ -8601,6 +8618,7 @@ AC_SUBST(MOZ_USER_DIR) AC_SUBST(MOZ_CRASHREPORTER) AC_SUBST(MOZ_MAINTENANCE_SERVICE) AC_SUBST(MOZ_VERIFY_MAR_SIGNATURE) +AC_SUBST(MOZ_ENABLE_SIGNMAR) AC_SUBST(MOZ_UPDATER) AC_SUBST(MOZ_ANGLE) AC_SUBST(MOZ_DIRECTX_SDK_PATH) diff --git a/content/base/public/nsContentUtils.h b/content/base/public/nsContentUtils.h index b3254f11bdb..009e337bcbc 100644 --- a/content/base/public/nsContentUtils.h +++ b/content/base/public/nsContentUtils.h @@ -1144,12 +1144,34 @@ public: * @param aSourceBuffer the string to parse as an HTML document * @param aTargetDocument the document object to parse into. Must not have * child nodes. + * @param aScriptingEnabledForNoscriptParsing whether