Merge remote-tracking branch 'origin/master' into custom

This commit is contained in:
Roy Tam 2020-07-11 07:15:30 +08:00
commit a4875a589f
6 changed files with 25 additions and 4 deletions

View file

@ -5,7 +5,11 @@
<menubar id="main-menubar"
onpopupshowing="if (event.target.parentNode.parentNode == this &amp;&amp;
#ifdef MOZ_WIDGET_GTK
document.documentElement.getAttribute('shellshowingmenubar') != 'true')
#else
!('@mozilla.org/widget/nativemenuservice;1' in Cc))
#endif
this.setAttribute('openedwithkey',
event.target.parentNode.openedWithKey);"
style="border:0px;padding:0px;margin:0px;-moz-appearance:none">

View file

@ -4803,6 +4803,10 @@ function getTogglableToolbars() {
let toolbarNodes = Array.slice(gNavToolbox.childNodes);
toolbarNodes = toolbarNodes.concat(gNavToolbox.externalToolbars);
toolbarNodes = toolbarNodes.filter(node => node.getAttribute("toolbarname"));
#ifdef MOZ_WIDGET_GTK
if (document.documentElement.getAttribute("shellshowingmenubar") == "true")
toolbarNodes = toolbarNodes.filter(node => node.id != "toolbar-menubar");
#endif
return toolbarNodes;
}

View file

@ -892,11 +892,13 @@ UserContextIdNotifier.init();
#ifdef MOZ_WEBEXTENSIONS
ExtensionContent.init(this);
#endif
addEventListener("unload", () => {
#ifdef MOZ_WEBEXTENSIONS
ExtensionContent.uninit(this);
#endif
RefreshBlocker.uninit();
});
#endif
addMessageListener("AllowScriptsToClose", () => {
content.QueryInterface(Ci.nsIInterfaceRequestor)

View file

@ -156,8 +156,12 @@
#ifdef XP_MACOSX
<toolbarbutton type="menu" class="tabbable"
onpopupshowing="document.getElementById('placeContent').focus()"
#else
#ifdef MOZ_WIDGET_GTK
<menubar id="placesMenu" _moz-menubarkeeplocal="true">
#else
<menubar id="placesMenu">
#endif
<menu accesskey="&organize.accesskey;" class="menu-iconic"
#endif
id="organizeButton" label="&organize.label;"

View file

@ -646,7 +646,10 @@ class NativeObject : public ShapedObject
uint32_t slotSpan() const {
if (inDictionaryMode())
return lastProperty()->base()->slotSpan();
return lastProperty()->slotSpan();
// Get the class from the object group rather than the base shape to avoid a
// race between Shape::ensureOwnBaseShape and background sweeping.
return lastProperty()->slotSpan(getClass());
}
/* Whether a slot is at a fixed offset from this object. */

View file

@ -2747,12 +2747,16 @@ nsStandardURL::SetFilePath(const nsACString &input)
return SetSpec(spec);
}
else if (mPath.mLen > 1) {
if (mPath.mLen > 1) {
mSpec.Cut(mPath.mPos + 1, mFilepath.mLen - 1);
// left shift query, and ref
ShiftFromQuery(1 - mFilepath.mLen);
// One character for '/', and if we have a query or ref we add their
// length and one extra for each '?' or '#' characters
mPath.mLen = 1 + (mQuery.mLen >= 0 ? (mQuery.mLen + 1) : 0) +
(mRef.mLen >= 0 ? (mRef.mLen + 1) : 0);
// these contain only a '/'
mPath.mLen = 1;
mDirectory.mLen = 1;
mFilepath.mLen = 1;
// these are no longer defined