diff --git a/Makefile.in b/Makefile.in index f00b97fded0..b3a4c6312bc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -38,15 +38,29 @@ DIST_GARBAGE = config.cache config.log config.status* config-defs.h \ $(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out ifndef MOZ_PROFILE_USE +# One of the first things we do in the build is purge "unknown" files +# from the object directory. This serves two purposes: +# +# 1) Remove files from a previous build no longer accounted for in +# this build configuration. +# +# 2) Work around poor build system dependencies by forcing some +# rebuilds. +# +# Ideally #2 does not exist. Our reliance on this aspect should diminish +# over time. +# +# moz.build backend generation simply installs a set of "manifests" into +# a common directory. Each manifest is responsible for defining files in +# a specific subdirectory of the object directory. The invoked Python +# script simply iterates over all the manifests, purging files as +# necessary. To manage new directories or add files to the manifests, +# modify the backend generator. +# # We need to explicitly put backend.RecursiveMakeBackend.built here # otherwise the rule in rules.mk doesn't run early enough. default alldep all:: CLOBBER $(topsrcdir)/configure config.status backend.RecursiveMakeBackend.built - $(RM) -r $(DIST)/sdk - $(RM) -r $(DIST)/include - $(RM) -r $(DIST)/private - $(RM) -r $(DIST)/public - $(RM) -r $(DIST)/bin - $(RM) -r _tests + $(PYTHON) $(topsrcdir)/config/purge_directories.py -d _build_manifests/purge . endif CLOBBER: $(topsrcdir)/CLOBBER diff --git a/accessible/src/atk/AccessibleWrap.cpp b/accessible/src/atk/AccessibleWrap.cpp index da124020e0e..8fed8d615d1 100644 --- a/accessible/src/atk/AccessibleWrap.cpp +++ b/accessible/src/atk/AccessibleWrap.cpp @@ -680,8 +680,7 @@ getRoleCB(AtkObject *aAtkObj) switch (accWrap->Role()) { #include "RoleMap.h" default: - MOZ_NOT_REACHED("Unknown role."); - aAtkObj->role = ATK_ROLE_UNKNOWN; + MOZ_CRASH("Unknown role."); }; #undef ROLE diff --git a/accessible/src/base/nsCoreUtils.cpp b/accessible/src/base/nsCoreUtils.cpp index 2baaf14c2d9..b17e4021ad7 100644 --- a/accessible/src/base/nsCoreUtils.cpp +++ b/accessible/src/base/nsCoreUtils.cpp @@ -197,7 +197,7 @@ nsCoreUtils::GetDOMElementFor(nsIContent *aContent) return aContent; if (aContent->IsNodeOfType(nsINode::eTEXT)) - return aContent->GetParent(); + return aContent->GetFlattenedTreeParent(); return nullptr; } @@ -540,7 +540,7 @@ nsCoreUtils::GetTreeBoxObject(nsIContent *aContent) return treeBox.forget(); } } - currentContent = currentContent->GetParent(); + currentContent = currentContent->GetFlattenedTreeParent(); } return nullptr; diff --git a/accessible/src/base/nsTextEquivUtils.cpp b/accessible/src/base/nsTextEquivUtils.cpp index 9f0e366ac6f..f15c27d1999 100644 --- a/accessible/src/base/nsTextEquivUtils.cpp +++ b/accessible/src/base/nsTextEquivUtils.cpp @@ -136,7 +136,7 @@ nsTextEquivUtils::AppendTextEquivFromTextContent(nsIContent *aContent, if (aContent->IsNodeOfType(nsINode::eTEXT)) { bool isHTMLBlock = false; - nsIContent *parentContent = aContent->GetParent(); + nsIContent *parentContent = aContent->GetFlattenedTreeParent(); if (parentContent) { nsIFrame *frame = parentContent->GetPrimaryFrame(); if (frame) { @@ -394,7 +394,7 @@ nsTextEquivUtils::GetRoleRule(role aRole) switch (aRole) { #include "RoleMap.h" default: - MOZ_NOT_REACHED("Unknown role."); + MOZ_CRASH("Unknown role."); } #undef ROLE diff --git a/accessible/src/generic/DocAccessible.cpp b/accessible/src/generic/DocAccessible.cpp index 4e653c4e791..6adc79927b0 100644 --- a/accessible/src/generic/DocAccessible.cpp +++ b/accessible/src/generic/DocAccessible.cpp @@ -1377,8 +1377,9 @@ DocAccessible::RecreateAccessible(nsIContent* aContent) // coalescence with normal hide and show events. Note, in this case they // should be coalesced with normal show/hide events. - ContentRemoved(aContent->GetParent(), aContent); - ContentInserted(aContent->GetParent(), aContent, aContent->GetNextSibling()); + nsIContent* parent = aContent->GetFlattenedTreeParent(); + ContentRemoved(parent, aContent); + ContentInserted(parent, aContent, aContent->GetNextSibling()); } void diff --git a/accessible/src/html/HTMLTableAccessible.cpp b/accessible/src/html/HTMLTableAccessible.cpp index b8e6c8e1deb..207d1495277 100644 --- a/accessible/src/html/HTMLTableAccessible.cpp +++ b/accessible/src/html/HTMLTableAccessible.cpp @@ -314,6 +314,7 @@ HTMLTableHeaderCellAccessible::NativeRole() // Assume it's columnheader if there are headers in siblings, otherwise // rowheader. + // This should iterate the flattened tree nsIContent* parentContent = mContent->GetParent(); if (!parentContent) { NS_ERROR("Deattached content on alive accessible?"); diff --git a/accessible/src/windows/msaa/AccessibleWrap.cpp b/accessible/src/windows/msaa/AccessibleWrap.cpp index e220b030554..ac8a2d52530 100644 --- a/accessible/src/windows/msaa/AccessibleWrap.cpp +++ b/accessible/src/windows/msaa/AccessibleWrap.cpp @@ -378,7 +378,7 @@ AccessibleWrap::get_accRole( switch (geckoRole) { #include "RoleMap.h" default: - MOZ_NOT_REACHED("Unknown role."); + MOZ_CRASH("Unknown role."); }; #undef ROLE @@ -1181,7 +1181,7 @@ AccessibleWrap::role(long *aRole) switch (geckoRole) { #include "RoleMap.h" default: - MOZ_NOT_REACHED("Unknown role."); + MOZ_CRASH("Unknown role."); }; #undef ROLE diff --git a/accessible/src/xul/XULElementAccessibles.cpp b/accessible/src/xul/XULElementAccessibles.cpp index d3f98d9f13b..99c1f0b7c1e 100644 --- a/accessible/src/xul/XULElementAccessibles.cpp +++ b/accessible/src/xul/XULElementAccessibles.cpp @@ -95,7 +95,7 @@ XULLabelAccessible::RelationByType(uint32_t aType) Relation rel = HyperTextAccessibleWrap::RelationByType(aType); if (aType == nsIAccessibleRelation::RELATION_LABEL_FOR) { // Caption is the label for groupbox - nsIContent *parent = mContent->GetParent(); + nsIContent* parent = mContent->GetFlattenedTreeParent(); if (parent && parent->Tag() == nsGkAtoms::caption) { Accessible* parent = Parent(); if (parent && parent->Role() == roles::GROUPING) diff --git a/accessible/src/xul/XULFormControlAccessible.cpp b/accessible/src/xul/XULFormControlAccessible.cpp index 9a660b1723c..3fd32f1eb16 100644 --- a/accessible/src/xul/XULFormControlAccessible.cpp +++ b/accessible/src/xul/XULFormControlAccessible.cpp @@ -244,7 +244,7 @@ XULDropmarkerAccessible::DropmarkerOpen(bool aToggleOpen) bool isOpen = false; nsCOMPtr parentButtonElement = - do_QueryInterface(mContent->GetParent()); + do_QueryInterface(mContent->GetFlattenedTreeParent()); if (parentButtonElement) { parentButtonElement->GetOpen(&isOpen); diff --git a/accessible/src/xul/XULListboxAccessible.cpp b/accessible/src/xul/XULListboxAccessible.cpp index 65b424287d3..977100efe3d 100644 --- a/accessible/src/xul/XULListboxAccessible.cpp +++ b/accessible/src/xul/XULListboxAccessible.cpp @@ -103,7 +103,7 @@ XULListboxAccessible:: XULListboxAccessible(nsIContent* aContent, DocAccessible* aDoc) : XULSelectControlAccessible(aContent, aDoc), xpcAccessibleTable(this) { - nsIContent* parentContent = mContent->GetParent(); + nsIContent* parentContent = mContent->GetFlattenedTreeParent(); if (parentContent) { nsCOMPtr autoCompletePopupElm = do_QueryInterface(parentContent); diff --git a/accessible/src/xul/XULMenuAccessible.cpp b/accessible/src/xul/XULMenuAccessible.cpp index 5baca8ce5f0..68d551582db 100644 --- a/accessible/src/xul/XULMenuAccessible.cpp +++ b/accessible/src/xul/XULMenuAccessible.cpp @@ -439,7 +439,7 @@ XULMenupopupAccessible:: mType = eMenuPopupType; // May be the anonymous inside (a combobox) - mSelectControl = do_QueryInterface(mContent->GetParent()); + mSelectControl = do_QueryInterface(mContent->GetFlattenedTreeParent()); if (!mSelectControl) mGenericTypes &= ~eSelect; } @@ -477,7 +477,7 @@ XULMenupopupAccessible::NativeName(nsString& aName) nsIContent* content = mContent; while (content && aName.IsEmpty()) { content->GetAttr(kNameSpaceID_None, nsGkAtoms::label, aName); - content = content->GetParent(); + content = content->GetFlattenedTreeParent(); } return eNameOK; diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css index b634dbd9fd2..0b0bda7509b 100644 --- a/browser/base/content/browser.css +++ b/browser/base/content/browser.css @@ -386,6 +386,11 @@ window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(.chromeclass-m } /* Identity UI */ +#identity-popup-content-box:not(.chromeUI) > #identity-popup-brandName, +#identity-popup-content-box:not(.chromeUI) > #identity-popup-chromeLabel, +#identity-popup-content-box.chromeUI > .identity-popup-label:not(#identity-popup-brandName):not(#identity-popup-chromeLabel), +#identity-popup-content-box.chromeUI > .identity-popup-description, +#identity-popup-content-box.chromeUI > #identity-popup-button-container, #identity-popup-content-box.unknownIdentity > #identity-popup-connectedToLabel , #identity-popup-content-box.unknownIdentity > #identity-popup-runByLabel , #identity-popup-content-box.unknownIdentity > #identity-popup-content-host , @@ -662,6 +667,12 @@ chatbar { max-height: 0; } +/** See bug 872317 for why the following rule is necessary. */ + +#downloads-indicator { + -moz-binding: url("chrome://browser/content/downloads/download.xml#download-toolbarbutton"); +} + /* full screen chat window support */ chatbar:-moz-full-screen-ancestor, chatbox:-moz-full-screen-ancestor { diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 977a1be0bbb..30ee35765d8 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -143,6 +143,7 @@ let gInitialPages = [ "about:newtab", "about:home", "about:privatebrowsing", + "about:welcomeback", "about:sessionrestore" ]; @@ -6403,6 +6404,11 @@ var gIdentityHandler = { return this._identityPopupContentBox = document.getElementById("identity-popup-content-box"); }, + get _identityPopupChromeLabel () { + delete this._identityPopupChromeLabel; + return this._identityPopupChromeLabel = + document.getElementById("identity-popup-chromeLabel"); + }, get _identityPopupContentHost () { delete this._identityPopupContentHost; return this._identityPopupContentHost = @@ -6673,6 +6679,8 @@ var gIdentityHandler = { "rtl" : "ltr"; break; } case this.IDENTITY_MODE_CHROMEUI: + let brandBundle = document.getElementById("bundle_brand"); + icon_label = brandBundle.getString("brandShortName"); break; default: tooltip = gNavigatorBundle.getString("identity.unknown.tooltip"); @@ -6734,6 +6742,12 @@ var gIdentityHandler = { else if (iData.country) // Country only supplemental += iData.country; break; } + case this.IDENTITY_MODE_CHROMEUI: { + let brandBundle = document.getElementById("bundle_brand"); + let brandShortName = brandBundle.getString("brandShortName"); + this._identityPopupChromeLabel.textContent = gNavigatorBundle.getFormattedString("identity.chrome", + [brandShortName]); + break; } } // Push the appropriate strings out to the UI @@ -6761,10 +6775,8 @@ var gIdentityHandler = { return; // Left click, space or enter only } - // Don't allow left click, space or enter if the location - // is chrome UI or the location has been modified. - if (this._mode == this.IDENTITY_MODE_CHROMEUI || - gURLBar.getAttribute("pageproxystate") != "valid") { + // Don't allow left click, space or enter if the location has been modified. + if (gURLBar.getAttribute("pageproxystate") != "valid") { TelemetryStopwatch.cancel("FX_IDENTITY_POPUP_OPEN_MS"); return; } diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index a87e2edad5a..49eecf5946f 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -298,6 +298,11 @@ +