Merge mozilla-central to inbound. r=merge a=merge on CLOSED TREE
|
@ -340,20 +340,7 @@ toolbarpaletteitem {
|
|||
transition: 1.5s margin-top ease-out;
|
||||
}
|
||||
|
||||
/* Rules to help integrate SDK widgets */
|
||||
toolbaritem[sdkstylewidget="true"] > toolbarbutton,
|
||||
toolbarpaletteitem > toolbaritem[sdkstylewidget="true"] > iframe,
|
||||
toolbarpaletteitem > toolbaritem[sdkstylewidget="true"] > .toolbarbutton-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
toolbarpaletteitem:-moz-any([place="palette"], [place="panel"]) > toolbaritem[sdkstylewidget="true"] > toolbarbutton {
|
||||
display: -moz-box;
|
||||
}
|
||||
|
||||
toolbarpaletteitem > toolbaritem[sdkstylewidget="true"][cui-areatype="toolbar"] > .toolbarbutton-text {
|
||||
display: -moz-box;
|
||||
}
|
||||
/* Rules to help integrate WebExtension buttons */
|
||||
|
||||
.webextension-browser-action > .toolbarbutton-badge-stack > .toolbarbutton-icon {
|
||||
height: 16px;
|
||||
|
@ -1172,6 +1159,7 @@ toolbarpaletteitem[place="palette"] > #downloads-button[indicator] > #downloads-
|
|||
|
||||
#BMB_bookmarksPopup:not([animate="false"]) {
|
||||
opacity: 0;
|
||||
will-change: transform; /* workaround for bug 1414033 */
|
||||
transform: translateY(-70px);
|
||||
transition-property: transform, opacity;
|
||||
transition-duration: 0.18s, 0.18s;
|
||||
|
@ -1196,11 +1184,6 @@ toolbarpaletteitem[place="palette"] > #downloads-button[indicator] > #downloads-
|
|||
}
|
||||
%endif
|
||||
|
||||
/* Customize mode */
|
||||
#PanelUI-contents > .panel-customization-placeholder > .panel-customization-placeholder-child {
|
||||
list-style-image: none;
|
||||
}
|
||||
|
||||
/* Apply crisp rendering for favicons at exactly 2dppx resolution */
|
||||
@media (resolution: 2dppx) {
|
||||
#PanelUI-remotetabs-tabslist > toolbarbutton > .toolbarbutton-icon,
|
||||
|
|
|
@ -107,7 +107,6 @@ function CustomizeMode(aWindow) {
|
|||
// user. Then there's the visible palette, which gets populated and displayed
|
||||
// to the user when in customizing mode.
|
||||
this.visiblePalette = this.document.getElementById(kPaletteId);
|
||||
this.paletteEmptyNotice = this.document.getElementById("customization-empty");
|
||||
this.pongArena = this.document.getElementById("customization-pong-arena");
|
||||
if (Services.prefs.getCharPref("general.skins.selectedSkin") != "classic/1.0") {
|
||||
let lwthemeButton = this.document.getElementById("customization-lwtheme-button");
|
||||
|
@ -410,7 +409,6 @@ CustomizeMode.prototype = {
|
|||
let document = this.document;
|
||||
|
||||
this.togglePong(false);
|
||||
this.paletteEmptyNotice.hidden = true;
|
||||
|
||||
// Disable the reset and undo reset buttons while transitioning:
|
||||
let resetButton = this.document.getElementById("customization-reset-button");
|
||||
|
@ -1536,7 +1534,6 @@ CustomizeMode.prototype = {
|
|||
|
||||
_updateEmptyPaletteNotice() {
|
||||
let paletteItems = this.visiblePalette.getElementsByTagName("toolbarpaletteitem");
|
||||
this.paletteEmptyNotice.hidden = !!paletteItems.length;
|
||||
let whimsyButton = this.document.getElementById("whimsy-button");
|
||||
|
||||
if (paletteItems.length == 1 &&
|
||||
|
@ -2731,7 +2728,7 @@ CustomizeMode.prototype = {
|
|||
elements.score.textContent = score;
|
||||
elements.lives && elements.lives.setAttribute("lives", lives);
|
||||
elements.arena.setAttribute("score", score);
|
||||
elements.arena.setAttribute("lives", "0");
|
||||
elements.arena.setAttribute("lives", lives);
|
||||
} else {
|
||||
rAFHandle = window.requestAnimationFrame(animate);
|
||||
}
|
||||
|
|
|
@ -8,15 +8,6 @@
|
|||
<label id="customization-header">
|
||||
&customizeMode.menuAndToolbars.header3;
|
||||
</label>
|
||||
<hbox id="customization-empty" hidden="true">
|
||||
<label>&customizeMode.menuAndToolbars.empty;</label>
|
||||
<label onclick="BrowserOpenAddonsMgr('addons://discover/');"
|
||||
onkeypress="BrowserOpenAddonsMgr('addons://discover/');"
|
||||
id="customization-more-tools"
|
||||
class="text-link">
|
||||
&customizeMode.menuAndToolbars.emptyLink;
|
||||
</label>
|
||||
</hbox>
|
||||
<vbox id="customization-palette" class="customization-palette" hidden="true"/>
|
||||
<vbox id="customization-pong-arena" hidden="true"/>
|
||||
<spacer id="customization-spacer"/>
|
||||
|
|
|
@ -2,329 +2,6 @@
|
|||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<panel id="PanelUI-popup"
|
||||
role="group"
|
||||
type="arrow"
|
||||
hidden="true"
|
||||
flip="slide"
|
||||
position="bottomcenter topright"
|
||||
noautofocus="true">
|
||||
<panelmultiview id="PanelUI-multiView" mainViewId="PanelUI-mainView"
|
||||
viewCacheId="appMenu-viewCache">
|
||||
<panelview id="PanelUI-mainView" context="customizationPanelContextMenu"
|
||||
descriptionheightworkaround="true" blockinboxworkaround="true">
|
||||
<vbox id="PanelUI-contents-scroller">
|
||||
<vbox id="PanelUI-contents" class="panelUI-grid"/>
|
||||
</vbox>
|
||||
|
||||
<footer id="PanelUI-footer">
|
||||
<vbox id="PanelUI-footer-addons"></vbox>
|
||||
<toolbarbutton class="panel-banner-item"
|
||||
label-update-available="&updateAvailable.panelUI.label;"
|
||||
label-update-manual="&updateManual.panelUI.label;"
|
||||
label-update-restart="&updateRestart.panelUI.label2;"
|
||||
oncommand="PanelUI._onBannerItemSelected(event)"
|
||||
wrap="true"
|
||||
hidden="true"/>
|
||||
<hbox id="PanelUI-fxa-container">
|
||||
<hbox id="PanelUI-fxa-status"
|
||||
label="&fxaSignedIn.tooltip;"
|
||||
defaultlabel="&fxaSignIn.label;"
|
||||
signedinTooltiptext="&fxaSignedIn.tooltip;"
|
||||
tooltiptext="&fxaSignedIn.tooltip;"
|
||||
errorlabel="&fxaSignInError.label;"
|
||||
unverifiedlabel="&fxaUnverified.label;"
|
||||
onclick="if (event.which == 1) gSync.onMenuPanelCommand();">
|
||||
<image id="PanelUI-fxa-avatar"/>
|
||||
<toolbarbutton id="PanelUI-fxa-label"
|
||||
label="&fxaSignIn.label;"
|
||||
fxabrandname="&syncBrand.fxAccount.label;"/>
|
||||
</hbox>
|
||||
<toolbarseparator/>
|
||||
<toolbarbutton id="PanelUI-fxa-icon"
|
||||
oncommand="gSync.doSync();"
|
||||
closemenu="none">
|
||||
<observes element="sync-status" attribute="syncstatus"/>
|
||||
<observes element="sync-status" attribute="tooltiptext"/>
|
||||
</toolbarbutton>
|
||||
</hbox>
|
||||
|
||||
<hbox id="PanelUI-footer-inner">
|
||||
<toolbarbutton id="PanelUI-customize" label="&appMenuCustomize.label;"
|
||||
exitLabel="&appMenuCustomizeExit.label;"
|
||||
tooltiptext="&appMenuCustomize.tooltip;"
|
||||
exitTooltiptext="&appMenuCustomizeExit.tooltip;"
|
||||
closemenu="none"
|
||||
oncommand="gCustomizeMode.toggle();"/>
|
||||
<toolbarseparator/>
|
||||
<toolbarbutton id="PanelUI-help" label="&helpMenu.label;"
|
||||
closemenu="none"
|
||||
tooltiptext="&appMenuHelp.tooltip;"
|
||||
oncommand="PanelUI.showHelpView(this);"/>
|
||||
<toolbarseparator/>
|
||||
<toolbarbutton id="PanelUI-quit"
|
||||
#ifdef XP_WIN
|
||||
label="&quitApplicationCmdWin2.label;"
|
||||
tooltiptext="&quitApplicationCmdWin2.tooltip;"
|
||||
#else
|
||||
#ifdef XP_MACOSX
|
||||
label="&quitApplicationCmdMac2.label;"
|
||||
#else
|
||||
label="&quitApplicationCmd.label;"
|
||||
#endif
|
||||
#endif
|
||||
command="cmd_quitApplication"/>
|
||||
</hbox>
|
||||
</footer>
|
||||
</panelview>
|
||||
|
||||
<panelview id="PanelUI-history" flex="1">
|
||||
<vbox class="panel-subview-body">
|
||||
<toolbarbutton id="appMenuViewHistorySidebar"
|
||||
label="&appMenuHistory.viewSidebar.label;"
|
||||
type="checkbox"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
key="key_gotoHistory"
|
||||
oncommand="SidebarUI.toggle('viewHistorySidebar'); PanelUI.hide();">
|
||||
<observes element="viewHistorySidebar" attribute="checked"/>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton id="appMenuClearRecentHistory"
|
||||
label="&appMenuHistory.clearRecent.label;"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
command="Tools:Sanitize"/>
|
||||
<toolbarseparator/>
|
||||
<toolbarbutton id="appMenuRecentlyClosedTabs"
|
||||
label="&historyUndoMenu.label;"
|
||||
class="subviewbutton subviewbutton-iconic subviewbutton-nav"
|
||||
closemenu="none"
|
||||
oncommand="PanelUI.showSubView('appMenu-library-recentlyClosedTabs', this)"/>
|
||||
<toolbarbutton id="appMenuRecentlyClosedWindows"
|
||||
label="&historyUndoWindowMenu.label;"
|
||||
class="subviewbutton subviewbutton-iconic subviewbutton-nav"
|
||||
closemenu="none"
|
||||
oncommand="PanelUI.showSubView('appMenu-library-recentlyClosedWindows', this)"/>
|
||||
<toolbarseparator/>
|
||||
<label value="&appMenuHistory.recentHistory.label;"
|
||||
class="subview-subheader"/>
|
||||
<toolbaritem id="appMenu_historyMenu"
|
||||
orient="vertical"
|
||||
smoothscroll="false"
|
||||
flatList="true"
|
||||
tooltip="bhTooltip">
|
||||
<!-- history menu items will go here -->
|
||||
</toolbaritem>
|
||||
</vbox>
|
||||
<toolbarbutton id="PanelUI-historyMore"
|
||||
class="panel-subview-footer subviewbutton"
|
||||
label="&appMenuHistory.showAll.label;"
|
||||
oncommand="PlacesCommandHook.showPlacesOrganizer('History'); CustomizableUI.hidePanelForNode(this);"/>
|
||||
</panelview>
|
||||
|
||||
<panelview id="appMenu-library-recentlyClosedTabs"/>
|
||||
<panelview id="appMenu-library-recentlyClosedWindows"/>
|
||||
|
||||
<panelview id="PanelUI-remotetabs" flex="1" class="PanelUI-subView"
|
||||
descriptionheightworkaround="true">
|
||||
<vbox class="panel-subview-body">
|
||||
<!-- this widget has 3 boxes in the body, but only 1 is ever visible -->
|
||||
<!-- When Sync is ready to sync -->
|
||||
<vbox id="PanelUI-remotetabs-main" observes="sync-syncnow-state">
|
||||
<vbox id="PanelUI-remotetabs-buttons">
|
||||
<toolbarbutton id="PanelUI-remotetabs-view-sidebar"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
observes="viewTabsSidebar"
|
||||
label="&appMenuRemoteTabs.sidebar.label;"/>
|
||||
<toolbarbutton id="PanelUI-remotetabs-view-managedevices"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
label="&appMenuRemoteTabs.managedevices.label;"
|
||||
oncommand="gSync.openDevicesManagementPage('syncedtabs-menupanel');"/>
|
||||
<toolbarbutton id="PanelUI-remotetabs-syncnow"
|
||||
observes="sync-status"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
oncommand="gSync.doSync();"
|
||||
closemenu="none"/>
|
||||
<menuseparator id="PanelUI-remotetabs-separator"/>
|
||||
</vbox>
|
||||
<deck id="PanelUI-remotetabs-deck">
|
||||
<!-- Sync is ready to Sync and the "tabs" engine is enabled -->
|
||||
<vbox id="PanelUI-remotetabs-tabspane">
|
||||
<vbox id="PanelUI-remotetabs-tabslist"
|
||||
showAllLabel="&appMenuRemoteTabs.showAll.label;"
|
||||
showAllTooltipText="&appMenuRemoteTabs.showAll.tooltip;"
|
||||
showMoreLabel="&appMenuRemoteTabs.showMore.label;"
|
||||
showMoreTooltipText="&appMenuRemoteTabs.showMore.tooltip;"
|
||||
notabsforclientlabel="&appMenuRemoteTabs.notabs.label;"
|
||||
/>
|
||||
</vbox>
|
||||
<!-- Sync is ready to Sync but the "tabs" engine isn't enabled-->
|
||||
<hbox id="PanelUI-remotetabs-tabsdisabledpane" pack="center" flex="1">
|
||||
<vbox class="PanelUI-remotetabs-instruction-box" align="center">
|
||||
<hbox pack="center">
|
||||
<image class="fxaSyncIllustration"/>
|
||||
</hbox>
|
||||
<label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.tabsnotsyncing.label;</label>
|
||||
<hbox pack="center">
|
||||
<toolbarbutton class="PanelUI-remotetabs-prefs-button"
|
||||
label="&appMenuRemoteTabs.openprefs.label;"
|
||||
oncommand="gSync.openPrefs('synced-tabs');"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</hbox>
|
||||
<!-- Sync is ready to Sync but we are still fetching the tabs to show -->
|
||||
<vbox id="PanelUI-remotetabs-fetching">
|
||||
<!-- Show intentionally blank panel, see bug 1239845 -->
|
||||
</vbox>
|
||||
<!-- Sync has only 1 (ie, this) device connected -->
|
||||
<hbox id="PanelUI-remotetabs-nodevicespane" pack="center" flex="1">
|
||||
<vbox class="PanelUI-remotetabs-instruction-box">
|
||||
<hbox pack="center">
|
||||
<image class="fxaSyncIllustration"/>
|
||||
</hbox>
|
||||
<label class="PanelUI-remotetabs-instruction-title">&appMenuRemoteTabs.noclients.title;</label>
|
||||
<label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.noclients.subtitle;</label>
|
||||
<!-- The inner HTML for PanelUI-remotetabs-mobile-promo is built at runtime -->
|
||||
<label id="PanelUI-remotetabs-mobile-promo" fxAccountsBrand="&syncBrand.fxAccount.label;"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</deck>
|
||||
</vbox>
|
||||
<!-- a box to ensure contained boxes are centered horizonally -->
|
||||
<hbox pack="center" flex="1">
|
||||
<!-- When Sync is not configured -->
|
||||
<vbox id="PanelUI-remotetabs-setupsync"
|
||||
flex="1"
|
||||
align="center"
|
||||
class="PanelUI-remotetabs-instruction-box"
|
||||
observes="sync-setup-state">
|
||||
<image class="fxaSyncIllustration"/>
|
||||
<label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.notsignedin.label;</label>
|
||||
<toolbarbutton class="PanelUI-remotetabs-prefs-button"
|
||||
label="&appMenuRemoteTabs.signin.label;"
|
||||
oncommand="gSync.openPrefs('synced-tabs');"/>
|
||||
</vbox>
|
||||
<!-- When Sync needs re-authentication. This uses the exact same messaging
|
||||
as "Sync is not configured" but remains a separate box so we get
|
||||
the goodness of observing broadcasters to manage the hidden states -->
|
||||
<vbox id="PanelUI-remotetabs-reauthsync"
|
||||
flex="1"
|
||||
align="center"
|
||||
class="PanelUI-remotetabs-instruction-box"
|
||||
observes="sync-reauth-state">
|
||||
<image class="fxaSyncIllustration"/>
|
||||
<label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.notsignedin.label;</label>
|
||||
<toolbarbutton class="PanelUI-remotetabs-prefs-button"
|
||||
label="&appMenuRemoteTabs.signin.label;"
|
||||
oncommand="gSync.openPrefs('synced-tabs');"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</panelview>
|
||||
|
||||
<panelview id="PanelUI-bookmarks" flex="1" class="PanelUI-subView">
|
||||
<vbox class="panel-subview-body">
|
||||
<toolbarbutton id="panelMenuBookmarkThisPage"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
observes="bookmarkThisPageBroadcaster"
|
||||
command="Browser:AddBookmarkAs"
|
||||
onclick="PanelUI.hide();"/>
|
||||
<toolbarbutton id="panelMenu_bookmarkingTools"
|
||||
label="&bookmarkingTools.label;"
|
||||
class="subviewbutton subviewbutton-iconic subviewbutton-nav"
|
||||
closemenu="none"
|
||||
oncommand="BookmarkingUI.showBookmarkingTools(this);"/>
|
||||
<toolbarbutton id="panelMenu_searchBookmarks"
|
||||
label="&searchBookmarks.label;"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
oncommand="PlacesCommandHook.searchBookmarks(); PanelUI.hide();"/>
|
||||
<toolbarseparator/>
|
||||
<label id="panelMenu_recentBookmarks"
|
||||
value="&recentBookmarks.label;"
|
||||
class="subview-subheader"/>
|
||||
<toolbaritem id="panelMenu_bookmarksMenu"
|
||||
orient="vertical"
|
||||
smoothscroll="false"
|
||||
flatList="true"
|
||||
tooltip="bhTooltip">
|
||||
<!-- bookmarks menu items will go here -->
|
||||
</toolbaritem>
|
||||
</vbox>
|
||||
<toolbarbutton id="panelMenu_showAllBookmarks"
|
||||
label="&showAllBookmarks2.label;"
|
||||
class="subviewbutton panel-subview-footer"
|
||||
command="Browser:ShowAllBookmarks"
|
||||
onclick="PanelUI.hide();"/>
|
||||
</panelview>
|
||||
|
||||
<panelview id="PanelUI-feeds" flex="1" oncommand="FeedHandler.subscribeToFeed(null, event);">
|
||||
</panelview>
|
||||
|
||||
<panelview id="PanelUI-containers" flex="1">
|
||||
<vbox id="PanelUI-containersItems"/>
|
||||
</panelview>
|
||||
|
||||
<panelview id="PanelUI-helpView" flex="1" class="PanelUI-subView">
|
||||
<vbox id="PanelUI-helpItems" class="panel-subview-body"/>
|
||||
</panelview>
|
||||
|
||||
<panelview id="PanelUI-developer" flex="1">
|
||||
<vbox id="PanelUI-developerItems" class="panel-subview-body"/>
|
||||
</panelview>
|
||||
|
||||
<panelview id="PanelUI-characterEncodingView" flex="1">
|
||||
<vbox class="panel-subview-body">
|
||||
<vbox id="PanelUI-characterEncodingView-pinned"
|
||||
class="PanelUI-characterEncodingView-list"/>
|
||||
<toolbarseparator/>
|
||||
<vbox id="PanelUI-characterEncodingView-charsets"
|
||||
class="PanelUI-characterEncodingView-list"/>
|
||||
<toolbarseparator/>
|
||||
<vbox>
|
||||
<label id="PanelUI-characterEncodingView-autodetect-label"/>
|
||||
<vbox id="PanelUI-characterEncodingView-autodetect"
|
||||
class="PanelUI-characterEncodingView-list"/>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</panelview>
|
||||
|
||||
<panelview id="PanelUI-panicView" flex="1"
|
||||
descriptionheightworkaround="true">
|
||||
<vbox class="panel-subview-body">
|
||||
<hbox id="PanelUI-panic-timeframe">
|
||||
<image id="PanelUI-panic-timeframe-icon" alt=""/>
|
||||
<vbox flex="1">
|
||||
<hbox id="PanelUI-panic-header">
|
||||
<image id="PanelUI-panic-timeframe-icon-small" alt=""/>
|
||||
<description id="PanelUI-panic-mainDesc" flex="1">&panicButton.view.mainTimeframeDesc;</description>
|
||||
</hbox>
|
||||
<radiogroup id="PanelUI-panic-timeSpan" aria-labelledby="PanelUI-panic-mainDesc" closemenu="none">
|
||||
<radio id="PanelUI-panic-5min" label="&panicButton.view.5min;" selected="true"
|
||||
value="5" class="subviewradio"/>
|
||||
<radio id="PanelUI-panic-2hr" label="&panicButton.view.2hr;"
|
||||
value="2" class="subviewradio"/>
|
||||
<radio id="PanelUI-panic-day" label="&panicButton.view.day;"
|
||||
value="6" class="subviewradio"/>
|
||||
</radiogroup>
|
||||
</vbox>
|
||||
</hbox>
|
||||
<vbox id="PanelUI-panic-explanations">
|
||||
<label id="PanelUI-panic-actionlist-main-label">&panicButton.view.mainActionDesc;</label>
|
||||
|
||||
<label id="PanelUI-panic-actionlist-windows" class="PanelUI-panic-actionlist">&panicButton.view.deleteTabsAndWindows;</label>
|
||||
<label id="PanelUI-panic-actionlist-cookies" class="PanelUI-panic-actionlist">&panicButton.view.deleteCookies;</label>
|
||||
<label id="PanelUI-panic-actionlist-history" class="PanelUI-panic-actionlist">&panicButton.view.deleteHistory;</label>
|
||||
<label id="PanelUI-panic-actionlist-newwindow" class="PanelUI-panic-actionlist">&panicButton.view.openNewWindow;</label>
|
||||
|
||||
<label id="PanelUI-panic-warning">&panicButton.view.undoWarning;</label>
|
||||
</vbox>
|
||||
<button id="PanelUI-panic-view-button"
|
||||
label="&panicButton.view.forgetButton;"/>
|
||||
</vbox>
|
||||
</panelview>
|
||||
|
||||
</panelmultiview>
|
||||
|
||||
</panel>
|
||||
|
||||
<panel id="widget-overflow"
|
||||
role="group"
|
||||
type="arrow"
|
||||
|
@ -675,6 +352,249 @@
|
|||
#endif
|
||||
</vbox>
|
||||
</panelview>
|
||||
<panelview id="PanelUI-history" flex="1">
|
||||
<vbox class="panel-subview-body">
|
||||
<toolbarbutton id="appMenuViewHistorySidebar"
|
||||
label="&appMenuHistory.viewSidebar.label;"
|
||||
type="checkbox"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
key="key_gotoHistory"
|
||||
oncommand="SidebarUI.toggle('viewHistorySidebar'); PanelUI.hide();">
|
||||
<observes element="viewHistorySidebar" attribute="checked"/>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton id="appMenuClearRecentHistory"
|
||||
label="&appMenuHistory.clearRecent.label;"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
command="Tools:Sanitize"/>
|
||||
<toolbarseparator/>
|
||||
<toolbarbutton id="appMenuRecentlyClosedTabs"
|
||||
label="&historyUndoMenu.label;"
|
||||
class="subviewbutton subviewbutton-iconic subviewbutton-nav"
|
||||
closemenu="none"
|
||||
oncommand="PanelUI.showSubView('appMenu-library-recentlyClosedTabs', this)"/>
|
||||
<toolbarbutton id="appMenuRecentlyClosedWindows"
|
||||
label="&historyUndoWindowMenu.label;"
|
||||
class="subviewbutton subviewbutton-iconic subviewbutton-nav"
|
||||
closemenu="none"
|
||||
oncommand="PanelUI.showSubView('appMenu-library-recentlyClosedWindows', this)"/>
|
||||
<toolbarseparator/>
|
||||
<label value="&appMenuHistory.recentHistory.label;"
|
||||
class="subview-subheader"/>
|
||||
<toolbaritem id="appMenu_historyMenu"
|
||||
orient="vertical"
|
||||
smoothscroll="false"
|
||||
flatList="true"
|
||||
tooltip="bhTooltip">
|
||||
<!-- history menu items will go here -->
|
||||
</toolbaritem>
|
||||
</vbox>
|
||||
<toolbarbutton id="PanelUI-historyMore"
|
||||
class="panel-subview-footer subviewbutton"
|
||||
label="&appMenuHistory.showAll.label;"
|
||||
oncommand="PlacesCommandHook.showPlacesOrganizer('History'); CustomizableUI.hidePanelForNode(this);"/>
|
||||
</panelview>
|
||||
|
||||
<panelview id="appMenu-library-recentlyClosedTabs"/>
|
||||
<panelview id="appMenu-library-recentlyClosedWindows"/>
|
||||
|
||||
<panelview id="PanelUI-remotetabs" flex="1" class="PanelUI-subView"
|
||||
descriptionheightworkaround="true">
|
||||
<vbox class="panel-subview-body">
|
||||
<!-- this widget has 3 boxes in the body, but only 1 is ever visible -->
|
||||
<!-- When Sync is ready to sync -->
|
||||
<vbox id="PanelUI-remotetabs-main" observes="sync-syncnow-state">
|
||||
<vbox id="PanelUI-remotetabs-buttons">
|
||||
<toolbarbutton id="PanelUI-remotetabs-view-sidebar"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
observes="viewTabsSidebar"
|
||||
label="&appMenuRemoteTabs.sidebar.label;"/>
|
||||
<toolbarbutton id="PanelUI-remotetabs-view-managedevices"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
label="&appMenuRemoteTabs.managedevices.label;"
|
||||
oncommand="gSync.openDevicesManagementPage('syncedtabs-menupanel');"/>
|
||||
<toolbarbutton id="PanelUI-remotetabs-syncnow"
|
||||
observes="sync-status"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
oncommand="gSync.doSync();"
|
||||
closemenu="none"/>
|
||||
<menuseparator id="PanelUI-remotetabs-separator"/>
|
||||
</vbox>
|
||||
<deck id="PanelUI-remotetabs-deck">
|
||||
<!-- Sync is ready to Sync and the "tabs" engine is enabled -->
|
||||
<vbox id="PanelUI-remotetabs-tabspane">
|
||||
<vbox id="PanelUI-remotetabs-tabslist"
|
||||
showAllLabel="&appMenuRemoteTabs.showAll.label;"
|
||||
showAllTooltipText="&appMenuRemoteTabs.showAll.tooltip;"
|
||||
showMoreLabel="&appMenuRemoteTabs.showMore.label;"
|
||||
showMoreTooltipText="&appMenuRemoteTabs.showMore.tooltip;"
|
||||
notabsforclientlabel="&appMenuRemoteTabs.notabs.label;"
|
||||
/>
|
||||
</vbox>
|
||||
<!-- Sync is ready to Sync but the "tabs" engine isn't enabled-->
|
||||
<hbox id="PanelUI-remotetabs-tabsdisabledpane" pack="center" flex="1">
|
||||
<vbox class="PanelUI-remotetabs-instruction-box" align="center">
|
||||
<hbox pack="center">
|
||||
<image class="fxaSyncIllustration"/>
|
||||
</hbox>
|
||||
<label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.tabsnotsyncing.label;</label>
|
||||
<hbox pack="center">
|
||||
<toolbarbutton class="PanelUI-remotetabs-prefs-button"
|
||||
label="&appMenuRemoteTabs.openprefs.label;"
|
||||
oncommand="gSync.openPrefs('synced-tabs');"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</hbox>
|
||||
<!-- Sync is ready to Sync but we are still fetching the tabs to show -->
|
||||
<vbox id="PanelUI-remotetabs-fetching">
|
||||
<!-- Show intentionally blank panel, see bug 1239845 -->
|
||||
</vbox>
|
||||
<!-- Sync has only 1 (ie, this) device connected -->
|
||||
<hbox id="PanelUI-remotetabs-nodevicespane" pack="center" flex="1">
|
||||
<vbox class="PanelUI-remotetabs-instruction-box">
|
||||
<hbox pack="center">
|
||||
<image class="fxaSyncIllustration"/>
|
||||
</hbox>
|
||||
<label class="PanelUI-remotetabs-instruction-title">&appMenuRemoteTabs.noclients.title;</label>
|
||||
<label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.noclients.subtitle;</label>
|
||||
<!-- The inner HTML for PanelUI-remotetabs-mobile-promo is built at runtime -->
|
||||
<label id="PanelUI-remotetabs-mobile-promo" fxAccountsBrand="&syncBrand.fxAccount.label;"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</deck>
|
||||
</vbox>
|
||||
<!-- a box to ensure contained boxes are centered horizonally -->
|
||||
<hbox pack="center" flex="1">
|
||||
<!-- When Sync is not configured -->
|
||||
<vbox id="PanelUI-remotetabs-setupsync"
|
||||
flex="1"
|
||||
align="center"
|
||||
class="PanelUI-remotetabs-instruction-box"
|
||||
observes="sync-setup-state">
|
||||
<image class="fxaSyncIllustration"/>
|
||||
<label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.notsignedin.label;</label>
|
||||
<toolbarbutton class="PanelUI-remotetabs-prefs-button"
|
||||
label="&appMenuRemoteTabs.signin.label;"
|
||||
oncommand="gSync.openPrefs('synced-tabs');"/>
|
||||
</vbox>
|
||||
<!-- When Sync needs re-authentication. This uses the exact same messaging
|
||||
as "Sync is not configured" but remains a separate box so we get
|
||||
the goodness of observing broadcasters to manage the hidden states -->
|
||||
<vbox id="PanelUI-remotetabs-reauthsync"
|
||||
flex="1"
|
||||
align="center"
|
||||
class="PanelUI-remotetabs-instruction-box"
|
||||
observes="sync-reauth-state">
|
||||
<image class="fxaSyncIllustration"/>
|
||||
<label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.notsignedin.label;</label>
|
||||
<toolbarbutton class="PanelUI-remotetabs-prefs-button"
|
||||
label="&appMenuRemoteTabs.signin.label;"
|
||||
oncommand="gSync.openPrefs('synced-tabs');"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</panelview>
|
||||
|
||||
<panelview id="PanelUI-bookmarks" flex="1" class="PanelUI-subView">
|
||||
<vbox class="panel-subview-body">
|
||||
<toolbarbutton id="panelMenuBookmarkThisPage"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
observes="bookmarkThisPageBroadcaster"
|
||||
command="Browser:AddBookmarkAs"
|
||||
onclick="PanelUI.hide();"/>
|
||||
<toolbarbutton id="panelMenu_bookmarkingTools"
|
||||
label="&bookmarkingTools.label;"
|
||||
class="subviewbutton subviewbutton-iconic subviewbutton-nav"
|
||||
closemenu="none"
|
||||
oncommand="BookmarkingUI.showBookmarkingTools(this);"/>
|
||||
<toolbarbutton id="panelMenu_searchBookmarks"
|
||||
label="&searchBookmarks.label;"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
oncommand="PlacesCommandHook.searchBookmarks(); PanelUI.hide();"/>
|
||||
<toolbarseparator/>
|
||||
<label id="panelMenu_recentBookmarks"
|
||||
value="&recentBookmarks.label;"
|
||||
class="subview-subheader"/>
|
||||
<toolbaritem id="panelMenu_bookmarksMenu"
|
||||
orient="vertical"
|
||||
smoothscroll="false"
|
||||
flatList="true"
|
||||
tooltip="bhTooltip">
|
||||
<!-- bookmarks menu items will go here -->
|
||||
</toolbaritem>
|
||||
</vbox>
|
||||
<toolbarbutton id="panelMenu_showAllBookmarks"
|
||||
label="&showAllBookmarks2.label;"
|
||||
class="subviewbutton panel-subview-footer"
|
||||
command="Browser:ShowAllBookmarks"
|
||||
onclick="PanelUI.hide();"/>
|
||||
</panelview>
|
||||
|
||||
<panelview id="PanelUI-feeds" flex="1" oncommand="FeedHandler.subscribeToFeed(null, event);">
|
||||
</panelview>
|
||||
|
||||
<panelview id="PanelUI-containers" flex="1">
|
||||
<vbox id="PanelUI-containersItems"/>
|
||||
</panelview>
|
||||
|
||||
<panelview id="PanelUI-helpView" flex="1" class="PanelUI-subView">
|
||||
<vbox id="PanelUI-helpItems" class="panel-subview-body"/>
|
||||
</panelview>
|
||||
|
||||
<panelview id="PanelUI-developer" flex="1">
|
||||
<vbox id="PanelUI-developerItems" class="panel-subview-body"/>
|
||||
</panelview>
|
||||
|
||||
<panelview id="PanelUI-characterEncodingView" flex="1">
|
||||
<vbox class="panel-subview-body">
|
||||
<vbox id="PanelUI-characterEncodingView-pinned"
|
||||
class="PanelUI-characterEncodingView-list"/>
|
||||
<toolbarseparator/>
|
||||
<vbox id="PanelUI-characterEncodingView-charsets"
|
||||
class="PanelUI-characterEncodingView-list"/>
|
||||
<toolbarseparator/>
|
||||
<vbox>
|
||||
<label id="PanelUI-characterEncodingView-autodetect-label"/>
|
||||
<vbox id="PanelUI-characterEncodingView-autodetect"
|
||||
class="PanelUI-characterEncodingView-list"/>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</panelview>
|
||||
|
||||
<panelview id="PanelUI-panicView" flex="1"
|
||||
descriptionheightworkaround="true">
|
||||
<vbox class="panel-subview-body">
|
||||
<hbox id="PanelUI-panic-timeframe">
|
||||
<image id="PanelUI-panic-timeframe-icon" alt=""/>
|
||||
<vbox flex="1">
|
||||
<hbox id="PanelUI-panic-header">
|
||||
<image id="PanelUI-panic-timeframe-icon-small" alt=""/>
|
||||
<description id="PanelUI-panic-mainDesc" flex="1">&panicButton.view.mainTimeframeDesc;</description>
|
||||
</hbox>
|
||||
<radiogroup id="PanelUI-panic-timeSpan" aria-labelledby="PanelUI-panic-mainDesc" closemenu="none">
|
||||
<radio id="PanelUI-panic-5min" label="&panicButton.view.5min;" selected="true"
|
||||
value="5" class="subviewradio"/>
|
||||
<radio id="PanelUI-panic-2hr" label="&panicButton.view.2hr;"
|
||||
value="2" class="subviewradio"/>
|
||||
<radio id="PanelUI-panic-day" label="&panicButton.view.day;"
|
||||
value="6" class="subviewradio"/>
|
||||
</radiogroup>
|
||||
</vbox>
|
||||
</hbox>
|
||||
<vbox id="PanelUI-panic-explanations">
|
||||
<label id="PanelUI-panic-actionlist-main-label">&panicButton.view.mainActionDesc;</label>
|
||||
|
||||
<label id="PanelUI-panic-actionlist-windows" class="PanelUI-panic-actionlist">&panicButton.view.deleteTabsAndWindows;</label>
|
||||
<label id="PanelUI-panic-actionlist-cookies" class="PanelUI-panic-actionlist">&panicButton.view.deleteCookies;</label>
|
||||
<label id="PanelUI-panic-actionlist-history" class="PanelUI-panic-actionlist">&panicButton.view.deleteHistory;</label>
|
||||
<label id="PanelUI-panic-actionlist-newwindow" class="PanelUI-panic-actionlist">&panicButton.view.openNewWindow;</label>
|
||||
|
||||
<label id="PanelUI-panic-warning">&panicButton.view.undoWarning;</label>
|
||||
</vbox>
|
||||
<button id="PanelUI-panic-view-button"
|
||||
label="&panicButton.view.forgetButton;"/>
|
||||
</vbox>
|
||||
</panelview>
|
||||
|
||||
<panelview id="appMenu-moreView" title="&moreMenu.label;" class="PanelUI-subView">
|
||||
<vbox class="panel-subview-body">
|
||||
<toolbarbutton id="appMenu-characterencoding-button"
|
||||
|
|
|
@ -41,9 +41,6 @@ skip-if = os == "linux"
|
|||
[browser_923857_customize_mode_event_wrapping_during_reset.js]
|
||||
[browser_927717_customize_drag_empty_toolbar.js]
|
||||
|
||||
[browser_932928_show_notice_when_palette_empty.js]
|
||||
disabled=Bug 1163231 - Fails on all platforms
|
||||
|
||||
[browser_934113_menubar_removable.js]
|
||||
# Because this test is about the menubar, it can't be run on mac
|
||||
skip-if = os == "mac"
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// There should be an advert to get more addons when the palette is empty.
|
||||
add_task(async function() {
|
||||
await startCustomizing();
|
||||
let visiblePalette = document.getElementById("customization-palette");
|
||||
let emptyPaletteNotice = document.getElementById("customization-empty");
|
||||
is(emptyPaletteNotice.hidden, true, "The empty palette notice should not be shown when there are items in the palette.");
|
||||
|
||||
while (visiblePalette.childElementCount) {
|
||||
gCustomizeMode.addToToolbar(visiblePalette.children[0]);
|
||||
}
|
||||
is(visiblePalette.childElementCount, 0, "There shouldn't be any items remaining in the visible palette.");
|
||||
is(emptyPaletteNotice.hidden, false, "The empty palette notice should be shown when there are no items in the palette.");
|
||||
|
||||
await endCustomizing();
|
||||
await startCustomizing();
|
||||
visiblePalette = document.getElementById("customization-palette");
|
||||
emptyPaletteNotice = document.getElementById("customization-empty");
|
||||
is(emptyPaletteNotice.hidden, false,
|
||||
"The empty palette notice should be shown when there are no items in the palette and cust. mode is re-entered.");
|
||||
|
||||
gCustomizeMode.removeFromArea(document.getElementById("wrapper-home-button"));
|
||||
is(emptyPaletteNotice.hidden, true,
|
||||
"The empty palette notice should not be shown when there is at least one item in the palette.");
|
||||
});
|
||||
|
||||
add_task(async function asyncCleanup() {
|
||||
await endCustomizing();
|
||||
await resetCustomization();
|
||||
});
|
|
@ -28,7 +28,5 @@ add_task(async function() {
|
|||
for (let toolbar of customizableToolbars) {
|
||||
ok(!toolbar.hasAttribute("customizing"), "Toolbar " + toolbar.id + " is no longer customizing");
|
||||
}
|
||||
let menuitem = document.getElementById("PanelUI-customize");
|
||||
isnot(menuitem.getAttribute("label"), menuitem.getAttribute("exitLabel"), "Should have exited successfully");
|
||||
});
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ this.pageAction = class extends ExtensionAPI {
|
|||
this.browserPageAction = PageActions.addAction(new PageActions.Action({
|
||||
id: widgetId,
|
||||
title: this.defaults.title,
|
||||
iconURL: this.defaults.icon,
|
||||
iconURL: this.getIconData(this.defaults.icon),
|
||||
shownInUrlbar: true,
|
||||
disabled: true,
|
||||
onCommand: (event, buttonNode) => {
|
||||
|
@ -137,14 +137,23 @@ this.pageAction = class extends ExtensionAPI {
|
|||
if (typeof(tabData.icon) == "string") {
|
||||
iconURL = IconDetails.escapeUrl(tabData.icon);
|
||||
} else {
|
||||
iconURL = Object.entries(tabData.icon).reduce((memo, [size, url]) => {
|
||||
memo[size] = IconDetails.escapeUrl(url);
|
||||
return memo;
|
||||
}, {});
|
||||
iconURL = this.getIconData(tabData.icon);
|
||||
}
|
||||
this.browserPageAction.setIconURL(iconURL, window);
|
||||
}
|
||||
|
||||
getIconData(icons) {
|
||||
let getIcon = size => {
|
||||
let {icon} = IconDetails.getPreferredIcon(icons, this.extension, size);
|
||||
// TODO: implement theme based icon for pageAction (Bug 1398156)
|
||||
return IconDetails.escapeUrl(icon);
|
||||
};
|
||||
return {
|
||||
"16": getIcon(16),
|
||||
"32": getIcon(32),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers this page action for the given window, with the same effects as
|
||||
* if it were clicked by a user.
|
||||
|
|
|
@ -264,16 +264,20 @@ add_task(async function testDetailsObjects() {
|
|||
let browserActionWidget = getBrowserActionWidget(extension);
|
||||
|
||||
let tests = await extension.awaitMessage("ready");
|
||||
|
||||
// The initial icon should be the default icon since no icon is in the manifest.
|
||||
const DEFAULT_ICON = "chrome://browser/content/extension.svg";
|
||||
let browserActionButton = browserActionWidget.forWindow(window).node;
|
||||
let pageActionImage = document.getElementById(pageActionId);
|
||||
is(getListStyleImage(browserActionButton), DEFAULT_ICON, `browser action has the correct default image`);
|
||||
is(getListStyleImage(pageActionImage), DEFAULT_ICON, `page action has the correct default image`);
|
||||
|
||||
for (let test of tests) {
|
||||
extension.sendMessage("setIcon", test);
|
||||
await extension.awaitMessage("iconSet");
|
||||
|
||||
await promiseAnimationFrame();
|
||||
|
||||
let browserActionButton = browserActionWidget.forWindow(window).node;
|
||||
let pageActionImage = document.getElementById(pageActionId);
|
||||
|
||||
|
||||
// Test icon sizes in the toolbar/urlbar.
|
||||
for (let resolution of Object.keys(test.resolutions)) {
|
||||
await SpecialPowers.pushPrefEnv({set: [[RESOLUTION_PREF, resolution]]});
|
||||
|
|
|
@ -6,11 +6,6 @@
|
|||
/* import-globals-from ../../../../toolkit/mozapps/preferences/fontbuilder.js */
|
||||
/* import-globals-from ../../../base/content/aboutDialog-appUpdater.js */
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "ExtensionSettingsStore",
|
||||
"resource://gre/modules/ExtensionSettingsStore.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "AddonManager",
|
||||
"resource://gre/modules/AddonManager.jsm");
|
||||
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
Components.utils.import("resource://gre/modules/Downloads.jsm");
|
||||
Components.utils.import("resource://gre/modules/FileUtils.jsm");
|
||||
|
@ -41,6 +36,13 @@ const PREF_SHOW_PLUGINS_IN_LIST = "browser.download.show_plugins_in_list";
|
|||
const PREF_HIDE_PLUGINS_WITHOUT_EXTENSIONS =
|
||||
"browser.download.hide_plugins_without_extensions";
|
||||
|
||||
// Strings to identify ExtensionSettingsStore overrides
|
||||
const PREF_SETTING_TYPE = "prefs";
|
||||
const CONTAINERS_KEY = "privacy.containers";
|
||||
const HOMEPAGE_OVERRIDE_KEY = "homepage_override";
|
||||
const URL_OVERRIDES_TYPE = "url_overrides";
|
||||
const NEW_TAB_KEY = "newTabURL";
|
||||
|
||||
/*
|
||||
* Preferences where we store handling information about the feed type.
|
||||
*
|
||||
|
@ -218,10 +220,10 @@ var gMainPane = {
|
|||
|
||||
this.updateBrowserStartupLastSession();
|
||||
|
||||
handleControllingExtension("url_overrides", "newTabURL");
|
||||
handleControllingExtension(URL_OVERRIDES_TYPE, NEW_TAB_KEY);
|
||||
let newTabObserver = {
|
||||
observe(subject, topic, data) {
|
||||
handleControllingExtension("url_overrides", "newTabURL");
|
||||
handleControllingExtension(URL_OVERRIDES_TYPE, NEW_TAB_KEY);
|
||||
},
|
||||
};
|
||||
Services.obs.addObserver(newTabObserver, "newtab-url-changed");
|
||||
|
@ -260,11 +262,11 @@ var gMainPane = {
|
|||
setEventListener("restoreDefaultHomePage", "command",
|
||||
gMainPane.restoreDefaultHomePage);
|
||||
setEventListener("disableHomePageExtension", "command",
|
||||
gMainPane.makeDisableControllingExtension("prefs", "homepage_override"));
|
||||
makeDisableControllingExtension(PREF_SETTING_TYPE, HOMEPAGE_OVERRIDE_KEY));
|
||||
setEventListener("disableContainersExtension", "command",
|
||||
gMainPane.makeDisableControllingExtension("prefs", "privacy.containers"));
|
||||
makeDisableControllingExtension(PREF_SETTING_TYPE, CONTAINERS_KEY));
|
||||
setEventListener("disableNewTabExtension", "command",
|
||||
gMainPane.makeDisableControllingExtension("url_overrides", "newTabURL"));
|
||||
makeDisableControllingExtension(URL_OVERRIDES_TYPE, NEW_TAB_KEY));
|
||||
setEventListener("chooseLanguage", "command",
|
||||
gMainPane.showLanguages);
|
||||
setEventListener("translationAttributionImage", "click",
|
||||
|
@ -484,7 +486,7 @@ var gMainPane = {
|
|||
const containersEnabled = Services.prefs.getBoolPref("privacy.userContext.enabled");
|
||||
const containersCheckbox = document.getElementById("browserContainersCheckbox");
|
||||
containersCheckbox.checked = containersEnabled;
|
||||
handleControllingExtension("prefs", "privacy.containers")
|
||||
handleControllingExtension(PREF_SETTING_TYPE, CONTAINERS_KEY)
|
||||
.then((isControlled) => {
|
||||
containersCheckbox.disabled = isControlled;
|
||||
});
|
||||
|
@ -616,11 +618,11 @@ var gMainPane = {
|
|||
|
||||
if (homePref.locked) {
|
||||
// An extension can't control these settings if they're locked.
|
||||
hideControllingExtension("homepage_override");
|
||||
hideControllingExtension(HOMEPAGE_OVERRIDE_KEY);
|
||||
setInputDisabledStates(false);
|
||||
} else {
|
||||
// Asynchronously update the extension controlled UI.
|
||||
handleControllingExtension("prefs", "homepage_override")
|
||||
handleControllingExtension(PREF_SETTING_TYPE, HOMEPAGE_OVERRIDE_KEY)
|
||||
.then(setInputDisabledStates);
|
||||
}
|
||||
|
||||
|
@ -729,7 +731,7 @@ var gMainPane = {
|
|||
useCurrent.label = useCurrent.getAttribute("label1");
|
||||
|
||||
// If the homepage is controlled by an extension then you can't use this.
|
||||
if (await getControllingExtensionId("prefs", "homepage_override")) {
|
||||
if (await getControllingExtensionInfo(PREF_SETTING_TYPE, HOMEPAGE_OVERRIDE_KEY)) {
|
||||
useCurrent.disabled = true;
|
||||
return;
|
||||
}
|
||||
|
@ -775,14 +777,6 @@ var gMainPane = {
|
|||
homePage.value = homePage.defaultValue;
|
||||
},
|
||||
|
||||
makeDisableControllingExtension(type, settingName) {
|
||||
return async function disableExtension() {
|
||||
let id = await getControllingExtensionId(type, settingName);
|
||||
let addon = await AddonManager.getAddonByID(id);
|
||||
addon.userDisabled = true;
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Utility function to enable/disable the button specified by aButtonID based
|
||||
* on the value of the Boolean preference specified by aPreferenceID.
|
||||
|
@ -2589,75 +2583,6 @@ function getLocalHandlerApp(aFile) {
|
|||
return localHandlerApp;
|
||||
}
|
||||
|
||||
let extensionControlledContentIds = {
|
||||
"privacy.containers": "browserContainersExtensionContent",
|
||||
"homepage_override": "browserHomePageExtensionContent",
|
||||
"newTabURL": "browserNewTabExtensionContent",
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if a pref is being managed by an extension.
|
||||
*/
|
||||
async function getControllingExtensionId(type, settingName) {
|
||||
await ExtensionSettingsStore.initialize();
|
||||
return ExtensionSettingsStore.getTopExtensionId(type, settingName);
|
||||
}
|
||||
|
||||
function getControllingExtensionEl(settingName) {
|
||||
return document.getElementById(extensionControlledContentIds[settingName]);
|
||||
}
|
||||
|
||||
async function handleControllingExtension(type, settingName) {
|
||||
let controllingExtensionId = await getControllingExtensionId(type, settingName);
|
||||
let addon = controllingExtensionId
|
||||
&& await AddonManager.getAddonByID(controllingExtensionId);
|
||||
|
||||
// Sometimes the ExtensionSettingsStore gets in a bad state where it thinks
|
||||
// an extension is controlling a setting but the extension has been uninstalled
|
||||
// outside of the regular lifecycle. If the extension isn't currently installed
|
||||
// then we should treat the setting as not being controlled.
|
||||
// See https://bugzilla.mozilla.org/show_bug.cgi?id=1411046 for an example.
|
||||
if (addon) {
|
||||
showControllingExtension(settingName, addon);
|
||||
} else {
|
||||
hideControllingExtension(settingName);
|
||||
}
|
||||
|
||||
return !!addon;
|
||||
}
|
||||
|
||||
async function showControllingExtension(settingName, addon) {
|
||||
// Tell the user what extension is controlling the setting.
|
||||
let extensionControlledContent = getControllingExtensionEl(settingName);
|
||||
const defaultIcon = "chrome://mozapps/skin/extensions/extensionGeneric.svg";
|
||||
let stringParts = document
|
||||
.getElementById("bundlePreferences")
|
||||
.getString(`extensionControlled.${settingName}`)
|
||||
.split("%S");
|
||||
let description = extensionControlledContent.querySelector("description");
|
||||
|
||||
// Remove the old content from the description.
|
||||
while (description.firstChild) {
|
||||
description.firstChild.remove();
|
||||
}
|
||||
|
||||
// Populate the description.
|
||||
description.appendChild(document.createTextNode(stringParts[0]));
|
||||
let image = document.createElement("image");
|
||||
image.setAttribute("src", addon.iconURL || defaultIcon);
|
||||
image.classList.add("extension-controlled-icon");
|
||||
description.appendChild(image);
|
||||
description.appendChild(document.createTextNode(` ${addon.name}`));
|
||||
description.appendChild(document.createTextNode(stringParts[1]));
|
||||
|
||||
// Show the controlling extension row and hide the old label.
|
||||
extensionControlledContent.hidden = false;
|
||||
}
|
||||
|
||||
function hideControllingExtension(settingName) {
|
||||
getControllingExtensionEl(settingName).hidden = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* An enumeration of items in a JS array.
|
||||
*
|
||||
|
|
|
@ -23,6 +23,11 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
|||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/AppConstants.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "ExtensionSettingsStore",
|
||||
"resource://gre/modules/ExtensionSettingsStore.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "AddonManager",
|
||||
"resource://gre/modules/AddonManager.jsm");
|
||||
|
||||
var gLastHash = "";
|
||||
|
||||
var gCategoryInits = new Map();
|
||||
|
@ -322,3 +327,88 @@ function appendSearchKeywords(aId, keywords) {
|
|||
}
|
||||
element.setAttribute("searchkeywords", keywords.join(" "));
|
||||
}
|
||||
|
||||
let extensionControlledContentIds = {
|
||||
"privacy.containers": "browserContainersExtensionContent",
|
||||
"homepage_override": "browserHomePageExtensionContent",
|
||||
"newTabURL": "browserNewTabExtensionContent",
|
||||
"defaultSearch": "browserDefaultSearchExtensionContent",
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if a pref is being managed by an extension.
|
||||
*/
|
||||
async function getControllingExtensionInfo(type, settingName) {
|
||||
await ExtensionSettingsStore.initialize();
|
||||
return ExtensionSettingsStore.getSetting(type, settingName);
|
||||
}
|
||||
|
||||
function getControllingExtensionEl(settingName) {
|
||||
return document.getElementById(extensionControlledContentIds[settingName]);
|
||||
}
|
||||
|
||||
async function handleControllingExtension(type, settingName) {
|
||||
let info = await getControllingExtensionInfo(type, settingName);
|
||||
let addon = info && info.id
|
||||
&& await AddonManager.getAddonByID(info.id);
|
||||
|
||||
// Sometimes the ExtensionSettingsStore gets in a bad state where it thinks
|
||||
// an extension is controlling a setting but the extension has been uninstalled
|
||||
// outside of the regular lifecycle. If the extension isn't currently installed
|
||||
// then we should treat the setting as not being controlled.
|
||||
// See https://bugzilla.mozilla.org/show_bug.cgi?id=1411046 for an example.
|
||||
if (addon) {
|
||||
showControllingExtension(settingName, addon);
|
||||
} else {
|
||||
hideControllingExtension(settingName);
|
||||
}
|
||||
|
||||
return !!addon;
|
||||
}
|
||||
|
||||
async function showControllingExtension(settingName, addon) {
|
||||
// Tell the user what extension is controlling the setting.
|
||||
let extensionControlledContent = getControllingExtensionEl(settingName);
|
||||
extensionControlledContent.classList.remove("extension-controlled-disabled");
|
||||
const defaultIcon = "chrome://mozapps/skin/extensions/extensionGeneric.svg";
|
||||
let stringParts = document
|
||||
.getElementById("bundlePreferences")
|
||||
.getString(`extensionControlled.${settingName}`)
|
||||
.split("%S");
|
||||
let description = extensionControlledContent.querySelector("description");
|
||||
|
||||
// Remove the old content from the description.
|
||||
while (description.firstChild) {
|
||||
description.firstChild.remove();
|
||||
}
|
||||
|
||||
// Populate the description.
|
||||
description.appendChild(document.createTextNode(stringParts[0]));
|
||||
let image = document.createElement("image");
|
||||
image.setAttribute("src", addon.iconURL || defaultIcon);
|
||||
image.classList.add("extension-controlled-icon");
|
||||
description.appendChild(image);
|
||||
description.appendChild(document.createTextNode(` ${addon.name}`));
|
||||
description.appendChild(document.createTextNode(stringParts[1]));
|
||||
|
||||
let disableButton = extensionControlledContent.querySelector("button");
|
||||
if (disableButton) {
|
||||
disableButton.hidden = false;
|
||||
}
|
||||
|
||||
// Show the controlling extension row and hide the old label.
|
||||
extensionControlledContent.hidden = false;
|
||||
}
|
||||
|
||||
function hideControllingExtension(settingName) {
|
||||
getControllingExtensionEl(settingName).hidden = true;
|
||||
}
|
||||
|
||||
|
||||
function makeDisableControllingExtension(type, settingName) {
|
||||
return async function disableExtension() {
|
||||
let {id} = await getControllingExtensionInfo(type, settingName);
|
||||
let addon = await AddonManager.getAddonByID(id);
|
||||
addon.userDisabled = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,8 +7,12 @@
|
|||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "ExtensionSettingsStore",
|
||||
"resource://gre/modules/ExtensionSettingsStore.jsm");
|
||||
|
||||
const ENGINE_FLAVOR = "text/x-moz-search-engine";
|
||||
const SEARCH_TYPE = "default_search";
|
||||
const SEARCH_KEY = "defaultSearch";
|
||||
|
||||
var gEngineView = null;
|
||||
|
||||
|
@ -97,6 +101,17 @@ var gSearchPane = {
|
|||
if (e.name == currentEngine)
|
||||
list.selectedItem = item;
|
||||
});
|
||||
|
||||
handleControllingExtension(SEARCH_TYPE, SEARCH_KEY);
|
||||
let searchEngineListener = {
|
||||
observe(subject, topic, data) {
|
||||
handleControllingExtension(SEARCH_TYPE, SEARCH_KEY);
|
||||
},
|
||||
};
|
||||
Services.obs.addObserver(searchEngineListener, "browser-search-engine-modified");
|
||||
window.addEventListener("unload", () => {
|
||||
Services.obs.removeObserver(searchEngineListener, "browser-search-engine-modified");
|
||||
});
|
||||
},
|
||||
|
||||
handleEvent(aEvent) {
|
||||
|
@ -307,6 +322,7 @@ var gSearchPane = {
|
|||
setDefaultEngine() {
|
||||
Services.search.currentEngine =
|
||||
document.getElementById("defaultEngine").selectedItem.engine;
|
||||
ExtensionSettingsStore.setByUser(SEARCH_TYPE, SEARCH_KEY);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -44,6 +44,11 @@
|
|||
<groupbox id="defaultEngineGroup" data-category="paneSearch">
|
||||
<caption><label>&defaultSearchEngine.label;</label></caption>
|
||||
<description>&chooseYourDefaultSearchEngine2.label;</description>
|
||||
|
||||
<hbox id="browserDefaultSearchExtensionContent" align="center" hidden="true">
|
||||
<description control="disableDefaultSearchExtension" flex="1"/>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
|
||||
<hbox>
|
||||
|
@ -52,6 +57,7 @@
|
|||
</menulist>
|
||||
</hbox>
|
||||
</hbox>
|
||||
|
||||
<checkbox id="suggestionsInSearchFieldsCheckbox"
|
||||
label="&provideSearchSuggestions.label;"
|
||||
accesskey="&provideSearchSuggestions.accesskey;"
|
||||
|
|
|
@ -275,13 +275,108 @@ add_task(async function testExtensionControlledNewTab() {
|
|||
await waitForMessageHidden("browserNewTabExtensionContent");
|
||||
|
||||
ok(!aboutNewTabService.newTabURL.startsWith("moz-extension:"), "new tab page is set back to default");
|
||||
is(controlledContent.hidden, true, "The extension controlled row is hidden");
|
||||
is(controlledContent.hidden, true, "The extension controlled row is shown");
|
||||
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
let addon = await AddonManager.getAddonByID("@set_newtab");
|
||||
addon.uninstall();
|
||||
});
|
||||
|
||||
add_task(async function testExtensionControlledDefaultSearch() {
|
||||
await openPreferencesViaOpenPreferencesAPI("paneSearch", {leaveOpen: true});
|
||||
// eslint-disable-next-line mozilla/no-cpows-in-tests
|
||||
let doc = gBrowser.contentDocument;
|
||||
let extensionId = "@set_default_search";
|
||||
let manifest = {
|
||||
manifest_version: 2,
|
||||
name: "set_default_search",
|
||||
applications: {gecko: {id: extensionId}},
|
||||
description: "set_default_search description",
|
||||
permissions: [],
|
||||
chrome_settings_overrides: {
|
||||
search_provider: {
|
||||
name: "Yahoo",
|
||||
search_url: "https://search.yahoo.com/yhs/search?p=%s&ei=UTF-8&hspart=mozilla&hsimp=yhs-002",
|
||||
is_default: true,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
function setEngine(engine) {
|
||||
doc.querySelector(`#defaultEngine menuitem[label="${engine.name}"]`)
|
||||
.doCommand();
|
||||
}
|
||||
|
||||
is(gBrowser.currentURI.spec, "about:preferences#search",
|
||||
"#search should be in the URI for about:preferences");
|
||||
|
||||
let controlledContent = doc.getElementById("browserDefaultSearchExtensionContent");
|
||||
let initialEngine = Services.search.currentEngine;
|
||||
|
||||
// Ensure the controlled content is hidden when not controlled.
|
||||
is(controlledContent.hidden, true, "The extension controlled row is hidden");
|
||||
|
||||
// Install an extension that will set the default search engine.
|
||||
let originalExtension = ExtensionTestUtils.loadExtension({
|
||||
useAddonManager: "permanent",
|
||||
manifest: Object.assign({}, manifest, {version: "1.0"}),
|
||||
});
|
||||
|
||||
let messageShown = waitForMessageShown("browserDefaultSearchExtensionContent");
|
||||
await originalExtension.startup();
|
||||
await messageShown;
|
||||
|
||||
let addon = await AddonManager.getAddonByID(extensionId);
|
||||
is(addon.version, "1.0", "The addon has the expected version.");
|
||||
|
||||
// The default search engine has been set by the extension and the user is notified.
|
||||
let controlledLabel = controlledContent.querySelector("description");
|
||||
let extensionEngine = Services.search.currentEngine;
|
||||
ok(initialEngine != extensionEngine, "The default engine has changed.");
|
||||
// There are two spaces before "set_default_search" because it's " <image /> set_default_search".
|
||||
is(controlledLabel.textContent,
|
||||
"An extension, set_default_search, has set your default search engine.",
|
||||
"The user is notified that an extension is controlling the default search engine");
|
||||
is(controlledContent.hidden, false, "The extension controlled row is shown");
|
||||
|
||||
// Set the engine back to the initial one, ensure the message is hidden.
|
||||
setEngine(initialEngine);
|
||||
await waitForMessageHidden(controlledContent.id);
|
||||
|
||||
is(initialEngine, Services.search.currentEngine,
|
||||
"default search engine is set back to default");
|
||||
is(controlledContent.hidden, true, "The extension controlled row is hidden");
|
||||
|
||||
// Setting the engine back to the extension's engine does not show the message.
|
||||
setEngine(extensionEngine);
|
||||
|
||||
is(extensionEngine, Services.search.currentEngine,
|
||||
"default search engine is set back to extension");
|
||||
is(controlledContent.hidden, true, "The extension controlled row is still hidden");
|
||||
|
||||
// Set the engine to the initial one and verify an upgrade doesn't change it.
|
||||
setEngine(initialEngine);
|
||||
await waitForMessageHidden(controlledContent.id);
|
||||
|
||||
// Update the extension and wait for "ready".
|
||||
let updatedExtension = ExtensionTestUtils.loadExtension({
|
||||
useAddonManager: "permanent",
|
||||
manifest: Object.assign({}, manifest, {version: "2.0"}),
|
||||
});
|
||||
await updatedExtension.startup();
|
||||
addon = await AddonManager.getAddonByID(extensionId);
|
||||
|
||||
// Verify the extension is updated and search engine didn't change.
|
||||
is(addon.version, "2.0", "The updated addon has the expected version");
|
||||
is(controlledContent.hidden, true, "The extension controlled row is hidden after update");
|
||||
is(initialEngine, Services.search.currentEngine,
|
||||
"default search engine is still the initial engine after update");
|
||||
|
||||
await originalExtension.unload();
|
||||
await updatedExtension.unload();
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
||||
add_task(async function testExtensionControlledHomepageUninstalledAddon() {
|
||||
async function checkHomepageEnabled() {
|
||||
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
|
||||
|
|
|
@ -108,6 +108,7 @@ AutofillProfileAutoCompleteSearch.prototype = {
|
|||
FormAutofillUtils.isAutofillAddressesEnabled :
|
||||
FormAutofillUtils.isAutofillCreditCardsEnabled;
|
||||
|
||||
ProfileAutocomplete.lastProfileAutoCompleteFocusedInput = focusedInput;
|
||||
// Fallback to form-history if ...
|
||||
// - specified autofill feature is pref off.
|
||||
// - no profile can fill the currently-focused input.
|
||||
|
@ -126,7 +127,7 @@ AutofillProfileAutoCompleteSearch.prototype = {
|
|||
formHistory.startSearch(searchString, searchParam, previousResult, {
|
||||
onSearchResult: (search, result) => {
|
||||
listener.onSearchResult(this, result);
|
||||
ProfileAutocomplete.setProfileAutoCompleteResult(result);
|
||||
ProfileAutocomplete.lastProfileAutoCompleteResult = result;
|
||||
},
|
||||
});
|
||||
return;
|
||||
|
@ -166,7 +167,7 @@ AutofillProfileAutoCompleteSearch.prototype = {
|
|||
{isSecure});
|
||||
}
|
||||
listener.onSearchResult(this, result);
|
||||
ProfileAutocomplete.setProfileAutoCompleteResult(result);
|
||||
ProfileAutocomplete.lastProfileAutoCompleteResult = result;
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -174,7 +175,7 @@ AutofillProfileAutoCompleteSearch.prototype = {
|
|||
* Stops an asynchronous search that is in progress
|
||||
*/
|
||||
stopSearch() {
|
||||
ProfileAutocomplete.setProfileAutoCompleteResult(null);
|
||||
ProfileAutocomplete.lastProfileAutoCompleteResult = null;
|
||||
this.forceStop = true;
|
||||
},
|
||||
|
||||
|
@ -211,8 +212,8 @@ this.NSGetFactory = XPCOMUtils.generateNSGetFactory([AutofillProfileAutoComplete
|
|||
let ProfileAutocomplete = {
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
|
||||
|
||||
_lastAutoCompleteResult: null,
|
||||
_lastAutoCompleteFocusedInput: null,
|
||||
lastProfileAutoCompleteResult: null,
|
||||
lastProfileAutoCompleteFocusedInput: null,
|
||||
_registered: false,
|
||||
_factory: null,
|
||||
|
||||
|
@ -244,15 +245,6 @@ let ProfileAutocomplete = {
|
|||
Services.obs.removeObserver(this, "autocomplete-will-enter-text");
|
||||
},
|
||||
|
||||
getProfileAutoCompleteResult() {
|
||||
return this._lastAutoCompleteResult;
|
||||
},
|
||||
|
||||
setProfileAutoCompleteResult(result) {
|
||||
this._lastAutoCompleteResult = result;
|
||||
this._lastAutoCompleteFocusedInput = formFillController.focusedInput;
|
||||
},
|
||||
|
||||
observe(subject, topic, data) {
|
||||
switch (topic) {
|
||||
case "autocomplete-will-enter-text": {
|
||||
|
@ -293,19 +285,19 @@ let ProfileAutocomplete = {
|
|||
|
||||
let selectedIndex = this._getSelectedIndex(focusedInput.ownerGlobal);
|
||||
if (selectedIndex == -1 ||
|
||||
!this._lastAutoCompleteResult ||
|
||||
this._lastAutoCompleteResult.getStyleAt(selectedIndex) != "autofill-profile") {
|
||||
!this.lastProfileAutoCompleteResult ||
|
||||
this.lastProfileAutoCompleteResult.getStyleAt(selectedIndex) != "autofill-profile") {
|
||||
return;
|
||||
}
|
||||
|
||||
let profile = JSON.parse(this._lastAutoCompleteResult.getCommentAt(selectedIndex));
|
||||
let profile = JSON.parse(this.lastProfileAutoCompleteResult.getCommentAt(selectedIndex));
|
||||
let formHandler = FormAutofillContent.getFormHandler(focusedInput);
|
||||
|
||||
formHandler.autofillFormFields(profile, focusedInput);
|
||||
},
|
||||
|
||||
_clearProfilePreview() {
|
||||
let focusedInput = formFillController.focusedInput || this._lastAutoCompleteFocusedInput;
|
||||
let focusedInput = formFillController.focusedInput || this.lastProfileAutoCompleteFocusedInput;
|
||||
if (!focusedInput || !FormAutofillContent.getFormDetails(focusedInput)) {
|
||||
return;
|
||||
}
|
||||
|
@ -322,12 +314,12 @@ let ProfileAutocomplete = {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!this._lastAutoCompleteResult ||
|
||||
this._lastAutoCompleteResult.getStyleAt(selectedIndex) != "autofill-profile") {
|
||||
if (!this.lastProfileAutoCompleteResult ||
|
||||
this.lastProfileAutoCompleteResult.getStyleAt(selectedIndex) != "autofill-profile") {
|
||||
return;
|
||||
}
|
||||
|
||||
let profile = JSON.parse(this._lastAutoCompleteResult.getCommentAt(selectedIndex));
|
||||
let profile = JSON.parse(this.lastProfileAutoCompleteResult.getCommentAt(selectedIndex));
|
||||
let formHandler = FormAutofillContent.getFormHandler(focusedInput);
|
||||
|
||||
formHandler.previewFormFields(profile, focusedInput);
|
||||
|
@ -522,7 +514,7 @@ var FormAutofillContent = {
|
|||
previewProfile(doc) {
|
||||
let docWin = doc.ownerGlobal;
|
||||
let selectedIndex = ProfileAutocomplete._getSelectedIndex(docWin);
|
||||
let lastAutoCompleteResult = ProfileAutocomplete.getProfileAutoCompleteResult();
|
||||
let lastAutoCompleteResult = ProfileAutocomplete.lastProfileAutoCompleteResult;
|
||||
let focusedInput = formFillController.focusedInput;
|
||||
let mm = this._messageManagerFromWindow(docWin);
|
||||
|
||||
|
@ -550,6 +542,11 @@ var FormAutofillContent = {
|
|||
}
|
||||
},
|
||||
|
||||
onPopupClosed() {
|
||||
ProfileAutocomplete._clearProfilePreview();
|
||||
ProfileAutocomplete.lastProfileAutoCompleteResult = null;
|
||||
},
|
||||
|
||||
_markAsAutofillField(field) {
|
||||
// Since Form Autofill popup is only for input element, any non-Input
|
||||
// element should be excluded here.
|
||||
|
@ -569,10 +566,11 @@ var FormAutofillContent = {
|
|||
},
|
||||
|
||||
_onKeyDown(e) {
|
||||
let lastAutoCompleteResult = ProfileAutocomplete.getProfileAutoCompleteResult();
|
||||
let lastAutoCompleteResult = ProfileAutocomplete.lastProfileAutoCompleteResult;
|
||||
let focusedInput = formFillController.focusedInput;
|
||||
|
||||
if (e.keyCode != Ci.nsIDOMKeyEvent.DOM_VK_RETURN || !lastAutoCompleteResult || !focusedInput) {
|
||||
if (e.keyCode != Ci.nsIDOMKeyEvent.DOM_VK_RETURN || !lastAutoCompleteResult ||
|
||||
!focusedInput || focusedInput != ProfileAutocomplete.lastProfileAutoCompleteFocusedInput) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ var FormAutofillFrameScript = {
|
|||
break;
|
||||
}
|
||||
case "FormAutoComplete:PopupClosed": {
|
||||
FormAutofillContent.previewProfile(doc);
|
||||
FormAutofillContent.onPopupClosed();
|
||||
chromeEventHandler.removeEventListener("keydown", FormAutofillContent._onKeyDown,
|
||||
{capturing: true});
|
||||
break;
|
||||
|
|
|
@ -13,6 +13,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "LogManager",
|
|||
"resource://shield-recipe-client/lib/LogManager.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "ShieldRecipeClient",
|
||||
"resource://shield-recipe-client/lib/ShieldRecipeClient.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PreferenceExperiments",
|
||||
"resource://shield-recipe-client/lib/PreferenceExperiments.jsm");
|
||||
|
||||
// Act as both a normal bootstrap.js and a JS module so that we can test
|
||||
// startup methods without having to install/uninstall the add-on.
|
||||
|
@ -43,6 +45,8 @@ const log = Log.repository.getLogger(BOOTSTRAP_LOGGER_NAME);
|
|||
log.addAppender(new Log.ConsoleAppender(new Log.BasicFormatter()));
|
||||
log.level = Services.prefs.getIntPref(PREF_LOGGING_LEVEL, Log.Level.Warn);
|
||||
|
||||
let studyPrefsChanged = {};
|
||||
|
||||
this.Bootstrap = {
|
||||
initShieldPrefs(defaultPrefs) {
|
||||
const prefBranch = Services.prefs.getDefaultBranch("");
|
||||
|
@ -64,6 +68,7 @@ this.Bootstrap = {
|
|||
},
|
||||
|
||||
initExperimentPrefs() {
|
||||
studyPrefsChanged = {};
|
||||
const defaultBranch = Services.prefs.getDefaultBranch("");
|
||||
const experimentBranch = Services.prefs.getBranch(STARTUP_EXPERIMENT_PREFS_BRANCH);
|
||||
|
||||
|
@ -76,6 +81,30 @@ this.Bootstrap = {
|
|||
continue;
|
||||
}
|
||||
|
||||
// record the value of the default branch before setting it
|
||||
switch (realPrefType) {
|
||||
case Services.prefs.PREF_STRING:
|
||||
studyPrefsChanged[prefName] = defaultBranch.getCharPref(prefName);
|
||||
break;
|
||||
|
||||
case Services.prefs.PREF_INT:
|
||||
studyPrefsChanged[prefName] = defaultBranch.getIntPref(prefName);
|
||||
break;
|
||||
|
||||
case Services.prefs.PREF_BOOL:
|
||||
studyPrefsChanged[prefName] = defaultBranch.getBoolPref(prefName);
|
||||
break;
|
||||
|
||||
case Services.prefs.PREF_INVALID:
|
||||
studyPrefsChanged[prefName] = null;
|
||||
break;
|
||||
|
||||
default:
|
||||
// This should never happen
|
||||
log.error(`Error getting startup pref ${prefName}; unknown value type ${experimentPrefType}.`);
|
||||
}
|
||||
|
||||
// now set the new default value
|
||||
switch (experimentPrefType) {
|
||||
case Services.prefs.PREF_STRING:
|
||||
defaultBranch.setCharPref(prefName, experimentBranch.getCharPref(prefName));
|
||||
|
@ -104,7 +133,7 @@ this.Bootstrap = {
|
|||
observe(subject, topic, data) {
|
||||
if (topic === UI_AVAILABLE_NOTIFICATION) {
|
||||
Services.obs.removeObserver(this, UI_AVAILABLE_NOTIFICATION);
|
||||
ShieldRecipeClient.startup();
|
||||
this.finishStartup();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -122,10 +151,15 @@ this.Bootstrap = {
|
|||
if (reason === REASON_APP_STARTUP) {
|
||||
Services.obs.addObserver(this, UI_AVAILABLE_NOTIFICATION);
|
||||
} else {
|
||||
ShieldRecipeClient.startup();
|
||||
this.finishStartup();
|
||||
}
|
||||
},
|
||||
|
||||
async finishStartup() {
|
||||
await PreferenceExperiments.recordOriginalValues(studyPrefsChanged);
|
||||
ShieldRecipeClient.startup();
|
||||
},
|
||||
|
||||
async shutdown(data, reason) {
|
||||
// Wait for async write operations during shutdown before unloading modules.
|
||||
await ShieldRecipeClient.shutdown(reason);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<em:type>2</em:type>
|
||||
<em:bootstrap>true</em:bootstrap>
|
||||
<em:unpack>false</em:unpack>
|
||||
<em:version>76</em:version>
|
||||
<em:version>76.1</em:version>
|
||||
<em:name>Shield Recipe Client</em:name>
|
||||
<em:description>Client to download and run recipes for SHIELD, Heartbeat, etc.</em:description>
|
||||
<em:multiprocessCompatible>true</em:multiprocessCompatible>
|
||||
|
|
|
@ -102,16 +102,22 @@ const log = LogManager.getLogger("preference-experiments");
|
|||
let experimentObservers = new Map();
|
||||
CleanupManager.addCleanupHandler(() => PreferenceExperiments.stopAllObservers());
|
||||
|
||||
function getPref(prefBranch, prefName, prefType, defaultVal) {
|
||||
function getPref(prefBranch, prefName, prefType) {
|
||||
if (prefBranch.getPrefType(prefName) === 0) {
|
||||
// pref doesn't exist
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (prefType) {
|
||||
case "boolean":
|
||||
return prefBranch.getBoolPref(prefName, defaultVal);
|
||||
case "boolean": {
|
||||
return prefBranch.getBoolPref(prefName);
|
||||
}
|
||||
|
||||
case "string":
|
||||
return prefBranch.getStringPref(prefName, defaultVal);
|
||||
return prefBranch.getStringPref(prefName);
|
||||
|
||||
case "integer":
|
||||
return prefBranch.getIntPref(prefName, defaultVal);
|
||||
return prefBranch.getIntPref(prefName);
|
||||
|
||||
default:
|
||||
throw new TypeError(`Unexpected preference type (${prefType}) for ${prefName}.`);
|
||||
|
@ -138,6 +144,30 @@ function setPref(prefBranch, prefName, prefType, prefValue) {
|
|||
}
|
||||
|
||||
this.PreferenceExperiments = {
|
||||
/**
|
||||
* Update the the experiment storage with changes that happened during early startup.
|
||||
* @param {object} studyPrefsChanged Map from pref name to previous pref value
|
||||
*/
|
||||
async recordOriginalValues(studyPrefsChanged) {
|
||||
const store = await ensureStorage();
|
||||
|
||||
for (const experiment of Object.values(store.data)) {
|
||||
if (studyPrefsChanged.hasOwnProperty(experiment.preferenceName)) {
|
||||
if (experiment.expired) {
|
||||
log.warn("Expired preference experiment changed value during startup");
|
||||
}
|
||||
if (experiment.branch !== "default") {
|
||||
log.warn("Non-default branch preference experiment changed value during startup");
|
||||
}
|
||||
experiment.previousPreferenceValue = studyPrefsChanged[experiment.preferenceName];
|
||||
}
|
||||
}
|
||||
|
||||
// not calling store.saveSoon() because if the data doesn't get
|
||||
// written, it will get updated with fresher data next time the
|
||||
// browser starts.
|
||||
},
|
||||
|
||||
/**
|
||||
* Set the default preference value for active experiments that use the
|
||||
* default preference branch.
|
||||
|
@ -147,7 +177,7 @@ this.PreferenceExperiments = {
|
|||
|
||||
for (const experiment of await this.getAllActive()) {
|
||||
// Check that the current value of the preference is still what we set it to
|
||||
if (getPref(UserPreferences, experiment.preferenceName, experiment.preferenceType, undefined) !== experiment.preferenceValue) {
|
||||
if (getPref(UserPreferences, experiment.preferenceName, experiment.preferenceType) !== experiment.preferenceValue) {
|
||||
// if not, stop the experiment, and skip the remaining steps
|
||||
log.info(`Stopping experiment "${experiment.name}" because its value changed`);
|
||||
await this.stop(experiment.name, false);
|
||||
|
@ -275,7 +305,7 @@ this.PreferenceExperiments = {
|
|||
preferenceName,
|
||||
preferenceValue,
|
||||
preferenceType,
|
||||
previousPreferenceValue: getPref(preferences, preferenceName, preferenceType, undefined),
|
||||
previousPreferenceValue: getPref(preferences, preferenceName, preferenceType),
|
||||
preferenceBranchType,
|
||||
};
|
||||
|
||||
|
@ -323,7 +353,7 @@ this.PreferenceExperiments = {
|
|||
const observerInfo = {
|
||||
preferenceName,
|
||||
observer() {
|
||||
const newValue = getPref(UserPreferences, preferenceName, preferenceType, undefined);
|
||||
const newValue = getPref(UserPreferences, preferenceName, preferenceType);
|
||||
if (newValue !== preferenceValue) {
|
||||
PreferenceExperiments.stop(experimentName, false)
|
||||
.catch(Cu.reportError);
|
||||
|
@ -424,13 +454,19 @@ this.PreferenceExperiments = {
|
|||
if (resetValue) {
|
||||
const {preferenceName, preferenceType, previousPreferenceValue, preferenceBranchType} = experiment;
|
||||
const preferences = PreferenceBranchType[preferenceBranchType];
|
||||
if (previousPreferenceValue !== undefined) {
|
||||
|
||||
if (previousPreferenceValue !== null) {
|
||||
setPref(preferences, preferenceName, preferenceType, previousPreferenceValue);
|
||||
} else {
|
||||
// This does nothing if we're on the default branch, which is fine. The
|
||||
// preference will be reset on next restart, and most preferences should
|
||||
// have had a default value set before the experiment anyway.
|
||||
} else if (preferenceBranchType === "user") {
|
||||
// Remove the "user set" value (which Shield set), but leave the default intact.
|
||||
preferences.clearUserPref(preferenceName);
|
||||
} else {
|
||||
// Remove both the user and default branch preference. This
|
||||
// is ok because we only do this when studies expire, not
|
||||
// when users actively leave a study by changing the
|
||||
// preference, so there should not be a user branch value at
|
||||
// this point.
|
||||
Services.prefs.getDefaultBranch("").deleteBranch(preferenceName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -427,7 +427,7 @@ add_task(withMockExperiments(withMockPreferences(async function(experiments, moc
|
|||
preferenceName: "fake.preference",
|
||||
preferenceValue: "experimentvalue",
|
||||
preferenceType: "string",
|
||||
previousPreferenceValue: undefined,
|
||||
previousPreferenceValue: null,
|
||||
preferenceBranchType: "user",
|
||||
});
|
||||
|
||||
|
@ -693,3 +693,98 @@ decorate_task(
|
|||
);
|
||||
},
|
||||
);
|
||||
|
||||
// test that default branch prefs restore to the right value if the default pref changes
|
||||
decorate_task(
|
||||
withMockExperiments,
|
||||
withMockPreferences,
|
||||
withStub(PreferenceExperiments, "startObserver"),
|
||||
withStub(PreferenceExperiments, "stopObserver"),
|
||||
async function testDefaultBranchStop(mockExperiments, mockPreferences, stopObserverStub) {
|
||||
const prefName = "fake.preference";
|
||||
mockPreferences.set(prefName, "old version's value", "default");
|
||||
|
||||
// start an experiment
|
||||
await PreferenceExperiments.start({
|
||||
name: "test",
|
||||
branch: "branch",
|
||||
preferenceName: prefName,
|
||||
preferenceValue: "experiment value",
|
||||
preferenceBranchType: "default",
|
||||
preferenceType: "string",
|
||||
});
|
||||
|
||||
is(
|
||||
Services.prefs.getCharPref(prefName),
|
||||
"experiment value",
|
||||
"Starting an experiment should change the pref",
|
||||
);
|
||||
|
||||
// Now pretend that firefox has updated and restarted to a version
|
||||
// where the built-default value of fake.preference is something
|
||||
// else. Bootstrap has run and changed the pref to the
|
||||
// experimental value, and produced the call to
|
||||
// recordOriginalValues below.
|
||||
PreferenceExperiments.recordOriginalValues({ [prefName]: "new version's value" });
|
||||
is(
|
||||
Services.prefs.getCharPref(prefName),
|
||||
"experiment value",
|
||||
"Recording original values shouldn't affect the preference."
|
||||
);
|
||||
|
||||
// Now stop the experiment. It should revert to the new version's default, not the old.
|
||||
await PreferenceExperiments.stop("test");
|
||||
is(
|
||||
Services.prefs.getCharPref(prefName),
|
||||
"new version's value",
|
||||
"Preference should revert to new default",
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
// test that default branch prefs restore to the right value if the preference is removed
|
||||
decorate_task(
|
||||
withMockExperiments,
|
||||
withMockPreferences,
|
||||
withStub(PreferenceExperiments, "startObserver"),
|
||||
withStub(PreferenceExperiments, "stopObserver"),
|
||||
async function testDefaultBranchStop(mockExperiments, mockPreferences, stopObserverStub) {
|
||||
const prefName = "fake.preference";
|
||||
mockPreferences.set(prefName, "old version's value", "default");
|
||||
|
||||
// start an experiment
|
||||
await PreferenceExperiments.start({
|
||||
name: "test",
|
||||
branch: "branch",
|
||||
preferenceName: prefName,
|
||||
preferenceValue: "experiment value",
|
||||
preferenceBranchType: "default",
|
||||
preferenceType: "string",
|
||||
});
|
||||
|
||||
is(
|
||||
Services.prefs.getCharPref(prefName),
|
||||
"experiment value",
|
||||
"Starting an experiment should change the pref",
|
||||
);
|
||||
|
||||
// Now pretend that firefox has updated and restarted to a version
|
||||
// where fake.preference has been removed in the default pref set.
|
||||
// Bootstrap has run and changed the pref to the experimental
|
||||
// value, and produced the call to recordOriginalValues below.
|
||||
PreferenceExperiments.recordOriginalValues({ [prefName]: null });
|
||||
is(
|
||||
Services.prefs.getCharPref(prefName),
|
||||
"experiment value",
|
||||
"Recording original values shouldn't affect the preference."
|
||||
);
|
||||
|
||||
// Now stop the experiment. It should remove the preference
|
||||
await PreferenceExperiments.stop("test");
|
||||
is(
|
||||
Services.prefs.getCharPref(prefName, "DEFAULT"),
|
||||
"DEFAULT",
|
||||
"Preference should be absent",
|
||||
);
|
||||
},
|
||||
);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
Cu.import("resource://shield-recipe-client/lib/ShieldRecipeClient.jsm", this);
|
||||
Cu.import("resource://shield-recipe-client/lib/PreferenceExperiments.jsm", this);
|
||||
|
||||
// We can't import bootstrap.js directly since it isn't in the jar manifest, but
|
||||
// we can use Addon.getResourceURI to get a path to the file and import using
|
||||
|
@ -23,6 +24,12 @@ function withBootstrap(testFunction) {
|
|||
const initPref1 = "test.initShieldPrefs1";
|
||||
const initPref2 = "test.initShieldPrefs2";
|
||||
const initPref3 = "test.initShieldPrefs3";
|
||||
|
||||
const experimentPref1 = "test.initExperimentPrefs1";
|
||||
const experimentPref2 = "test.initExperimentPrefs2";
|
||||
const experimentPref3 = "test.initExperimentPrefs3";
|
||||
const experimentPref4 = "test.initExperimentPrefs4";
|
||||
|
||||
decorate_task(
|
||||
withPrefEnv({
|
||||
clear: [[initPref1], [initPref2], [initPref3]],
|
||||
|
@ -80,9 +87,6 @@ decorate_task(
|
|||
},
|
||||
);
|
||||
|
||||
const experimentPref1 = "test.initExperimentPrefs1";
|
||||
const experimentPref2 = "test.initExperimentPrefs2";
|
||||
const experimentPref3 = "test.initExperimentPrefs3";
|
||||
decorate_task(
|
||||
withPrefEnv({
|
||||
set: [
|
||||
|
@ -169,30 +173,82 @@ decorate_task(
|
|||
|
||||
decorate_task(
|
||||
withBootstrap,
|
||||
withStub(ShieldRecipeClient, "startup"),
|
||||
async function testStartupDelayed(Bootstrap, startupStub) {
|
||||
Bootstrap.startup(undefined, 1); // 1 == APP_STARTUP
|
||||
ok(
|
||||
!startupStub.called,
|
||||
"When started at app startup, do not call ShieldRecipeClient.startup immediately.",
|
||||
);
|
||||
async function testStartupDelayed(Bootstrap) {
|
||||
const finishStartupStub = sinon.stub(Bootstrap, "finishStartup");
|
||||
try {
|
||||
Bootstrap.startup(undefined, 1); // 1 == APP_STARTUP
|
||||
ok(
|
||||
!finishStartupStub.called,
|
||||
"When started at app startup, do not call ShieldRecipeClient.startup immediately.",
|
||||
);
|
||||
|
||||
Bootstrap.observe(null, "sessionstore-windows-restored");
|
||||
ok(
|
||||
startupStub.called,
|
||||
"Once the sessionstore-windows-restored event is observed, call ShieldRecipeClient.startup.",
|
||||
);
|
||||
Bootstrap.observe(null, "sessionstore-windows-restored");
|
||||
ok(
|
||||
finishStartupStub.called,
|
||||
"Once the sessionstore-windows-restored event is observed, call ShieldRecipeClient.startup.",
|
||||
);
|
||||
} finally {
|
||||
finishStartupStub.restore();
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
decorate_task(
|
||||
withBootstrap,
|
||||
withStub(ShieldRecipeClient, "startup"),
|
||||
async function testStartupDelayed(Bootstrap, startupStub) {
|
||||
Bootstrap.startup(undefined, 3); // 1 == ADDON_ENABLED
|
||||
ok(
|
||||
startupStub.called,
|
||||
"When the add-on is enabled outside app startup, call ShieldRecipeClient.startup immediately.",
|
||||
async function testStartupDelayed(Bootstrap) {
|
||||
const finishStartupStub = sinon.stub(Bootstrap, "finishStartup");
|
||||
try {
|
||||
Bootstrap.startup(undefined, 3); // 3 == ADDON_ENABLED
|
||||
ok(
|
||||
finishStartupStub.called,
|
||||
"When the add-on is enabled outside app startup, call ShieldRecipeClient.startup immediately.",
|
||||
);
|
||||
} finally {
|
||||
finishStartupStub.restore();
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
// During startup, preferences that are changed for experiments should
|
||||
// be record by calling PreferenceExperiments.recordOriginalValues.
|
||||
decorate_task(
|
||||
withPrefEnv({
|
||||
set: [
|
||||
[`extensions.shield-recipe-client.startupExperimentPrefs.${experimentPref1}`, true],
|
||||
[`extensions.shield-recipe-client.startupExperimentPrefs.${experimentPref2}`, 2],
|
||||
[`extensions.shield-recipe-client.startupExperimentPrefs.${experimentPref3}`, "string"],
|
||||
[`extensions.shield-recipe-client.startupExperimentPrefs.${experimentPref4}`, "another string"],
|
||||
],
|
||||
clear: [
|
||||
[experimentPref1],
|
||||
[experimentPref2],
|
||||
[experimentPref3],
|
||||
[experimentPref4],
|
||||
["extensions.shield-recipe-client.startupExperimentPrefs.existingPref"],
|
||||
],
|
||||
}),
|
||||
withBootstrap,
|
||||
withStub(PreferenceExperiments, "recordOriginalValues"),
|
||||
async function testInitExperimentPrefs(Bootstrap, recordOriginalValuesStub) {
|
||||
const defaultBranch = Services.prefs.getDefaultBranch("");
|
||||
|
||||
defaultBranch.setBoolPref(experimentPref1, false);
|
||||
defaultBranch.setIntPref(experimentPref2, 1);
|
||||
defaultBranch.setCharPref(experimentPref3, "original string");
|
||||
// experimentPref4 is left unset
|
||||
|
||||
Bootstrap.initExperimentPrefs();
|
||||
await Bootstrap.finishStartup();
|
||||
|
||||
Assert.deepEqual(
|
||||
recordOriginalValuesStub.getCall(0).args,
|
||||
[{
|
||||
[experimentPref1]: false,
|
||||
[experimentPref2]: 1,
|
||||
[experimentPref3]: "original string",
|
||||
[experimentPref4]: null, // null because it was not initially set.
|
||||
}],
|
||||
"finishStartup should record original values of the prefs initExperimentPrefs changed",
|
||||
);
|
||||
},
|
||||
);
|
||||
|
|
|
@ -1,24 +1,35 @@
|
|||
fbjs@0.8.16 MIT
|
||||
MIT License
|
||||
fbjs@0.8.14 BSD-3-Clause
|
||||
BSD License
|
||||
|
||||
For fbjs software
|
||||
|
||||
Copyright (c) 2013-present, Facebook, Inc.
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name Facebook nor the names of its contributors may be used to
|
||||
endorse or promote products derived from this software without specific
|
||||
prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
react-dom@15.6.1 BSD-3-Clause
|
||||
|
@ -146,28 +157,38 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
create-react-class@15.6.2 MIT
|
||||
MIT License
|
||||
create-react-class@15.6.0 BSD-3-Clause
|
||||
BSD License
|
||||
|
||||
For React software
|
||||
|
||||
Copyright (c) 2013-present, Facebook, Inc.
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name Facebook nor the names of its contributors may be used to
|
||||
endorse or promote products derived from this software without specific
|
||||
prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
mozjexl@1.1.5 MIT
|
||||
|
|
|
@ -348,17 +348,12 @@ These should match what Safari and other Apple applications use on OS X Lion. --
|
|||
<!ENTITY showAllHistoryCmd2.label "Show All History">
|
||||
<!ENTITY showAllHistoryCmd.commandkey "H">
|
||||
|
||||
<!ENTITY appMenuCustomize.label "Customize">
|
||||
<!ENTITY appMenuCustomize.tooltip "Customize the Menu and Toolbars">
|
||||
<!ENTITY appMenuCustomizeExit.label "Exit Customize">
|
||||
<!ENTITY appMenuCustomizeExit.tooltip "Finish Customizing">
|
||||
<!ENTITY appMenuHistory.showAll.label "Show All History">
|
||||
<!ENTITY appMenuHistory.clearRecent.label "Clear Recent History…">
|
||||
<!ENTITY appMenuHistory.restoreSession.label "Restore Previous Session">
|
||||
<!ENTITY appMenuHistory.viewSidebar.label "View History Sidebar">
|
||||
<!ENTITY appMenuHistory.recentHistory.label "Recent History">
|
||||
<!ENTITY appMenuHelp.label "Help">
|
||||
<!ENTITY appMenuHelp.tooltip "Open Help Menu">
|
||||
|
||||
<!ENTITY appMenuRemoteTabs.label "Synced Tabs">
|
||||
<!-- LOCALIZATION NOTE (appMenuRemoteTabs.notabs.label): This is shown beneath
|
||||
|
@ -831,8 +826,6 @@ you can use these alternative items. Otherwise, their values should be empty. -
|
|||
<!ENTITY syncToolbarButton.label "Sync">
|
||||
|
||||
<!ENTITY customizeMode.menuAndToolbars.header3 "Drag your favorite items into the toolbar or overflow menu.">
|
||||
<!ENTITY customizeMode.menuAndToolbars.empty "Want more tools?">
|
||||
<!ENTITY customizeMode.menuAndToolbars.emptyLink "Choose from thousands of add-ons">
|
||||
<!ENTITY customizeMode.restoreDefaults "Restore Defaults">
|
||||
<!ENTITY customizeMode.done "Done">
|
||||
<!ENTITY customizeMode.titlebar "Title Bar">
|
||||
|
|
|
@ -276,6 +276,11 @@ extensionControlled.homepage_override = An extension, %S, controls your home pag
|
|||
# This string is shown to notify the user that their new tab page is being controlled by an extension.
|
||||
extensionControlled.newTabURL = An extension, %S, controls your New Tab page.
|
||||
|
||||
# LOCALIZATION NOTE (extensionControlled.defaultSearch):
|
||||
# This string is shown to notify the user that the default search engine is being controlled
|
||||
# by an extension. %S is the icon and name of the extension.
|
||||
extensionControlled.defaultSearch = An extension, %S, has set your default search engine.
|
||||
|
||||
# LOCALIZATION NOTE (extensionControlled.privacy.containers):
|
||||
# This string is shown to notify the user that Container Tabs are being enabled by an extension
|
||||
# %S is the container addon controlling it
|
||||
|
|
|
@ -591,6 +591,13 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"oc": {
|
||||
"default": {
|
||||
"visibleDefaultEngines": [
|
||||
"google", "yahoo-france", "bing", "ddg", "twitter", "wikipedia-oc", "wiktionary-oc"
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"default": {
|
||||
"visibleDefaultEngines": [
|
||||
|
@ -636,7 +643,7 @@
|
|||
"ro": {
|
||||
"default": {
|
||||
"visibleDefaultEngines": [
|
||||
"google", "yahoo", "bing", "amazondotcom", "ddg", "wikipediaro"
|
||||
"google", "yahoo", "bing", "amazondotcom", "ddg", "wikipedia-ro"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
|
||||
<ShortName>Wikipèdia (oc)</ShortName>
|
||||
<Description>Wikipèdia, l'enciclopèdia liura</Description>
|
||||
<InputEncoding>UTF-8</InputEncoding>
|
||||
<Image width="16" height="16">resource://search-plugins/images/wikipedia.ico</Image>
|
||||
<Url type="application/x-suggestions+json" method="GET" template="https://oc.wikipedia.org/w/api.php">
|
||||
<Param name="action" value="opensearch"/>
|
||||
<Param name="search" value="{searchTerms}"/>
|
||||
</Url>
|
||||
<Url type="text/html" method="GET" template="https://oc.wikipedia.org/wiki/Especial:Recèrca"
|
||||
resultdomain="wikipedia.org" rel="searchform">
|
||||
<Param name="search" value="{searchTerms}"/>
|
||||
<Param name="sourceid" value="Mozilla-search"/>
|
||||
</Url>
|
||||
</SearchPlugin>
|
|
@ -0,0 +1,19 @@
|
|||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
|
||||
<ShortName>Wikiccionari (oc)</ShortName>
|
||||
<Description>Wikiccionari, lo diccionari liure</Description>
|
||||
<InputEncoding>UTF-8</InputEncoding>
|
||||
<Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAEAgQAhIOEAMjHyABIR0gA6ejpAGlqaQCpqKkAKCgoAPz9%2FAAZGBkAmJiYANjZ2ABXWFcAent6ALm6uQA8OjwAiIiIiIiIiIiIiI4oiL6IiIiIgzuIV4iIiIhndo53KIiIiB%2FWvXoYiIiIfEZfWBSIiIEGi%2FfoqoiIgzuL84i9iIjpGIoMiEHoiMkos3FojmiLlUipYliEWIF%2BiDe0GoRa7D6GPbjcu1yIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</Image>
|
||||
<Url type="application/x-suggestions+json" method="GET" template="https://oc.wiktionary.org/w/api.php">
|
||||
<Param name="action" value="opensearch"/>
|
||||
<Param name="search" value="{searchTerms}"/>
|
||||
<Param name="namespace" value="0"/>
|
||||
</Url>
|
||||
<Url type="text/html" method="get" template="https://oc.wiktionary.org/wiki/Especial:Recèrca"
|
||||
resultdomain="wiktionary.org" rel="searchform">
|
||||
<Param name="search" value="{searchTerms}"/>
|
||||
</Url>
|
||||
</SearchPlugin>
|
|
@ -11,12 +11,6 @@ browser.jar:
|
|||
* skin/classic/browser/syncedtabs/sidebar.css (syncedtabs/sidebar.css)
|
||||
* skin/classic/browser/browser.css
|
||||
* skin/classic/browser/compacttheme.css
|
||||
skin/classic/browser/menuPanel-customize.png
|
||||
skin/classic/browser/menuPanel-customize@2x.png
|
||||
skin/classic/browser/menuPanel-exit.png
|
||||
skin/classic/browser/menuPanel-exit@2x.png
|
||||
skin/classic/browser/menuPanel-help.png
|
||||
skin/classic/browser/menuPanel-help@2x.png
|
||||
skin/classic/browser/monitor.png
|
||||
skin/classic/browser/monitor_16-10.png
|
||||
* skin/classic/browser/pageInfo.css
|
||||
|
|
Двоичные данные
browser/themes/linux/menuPanel-customize.png
До Ширина: | Высота: | Размер: 883 B |
Двоичные данные
browser/themes/linux/menuPanel-customize@2x.png
До Ширина: | Высота: | Размер: 2.1 KiB |
Двоичные данные
browser/themes/linux/menuPanel-exit.png
До Ширина: | Высота: | Размер: 568 B |
Двоичные данные
browser/themes/linux/menuPanel-exit@2x.png
До Ширина: | Высота: | Размер: 1.1 KiB |
Двоичные данные
browser/themes/linux/menuPanel-help.png
До Ширина: | Высота: | Размер: 1.9 KiB |
Двоичные данные
browser/themes/linux/menuPanel-help@2x.png
До Ширина: | Высота: | Размер: 5.2 KiB |
|
@ -11,12 +11,6 @@ browser.jar:
|
|||
* skin/classic/browser/browser.css
|
||||
* skin/classic/browser/compacttheme.css
|
||||
skin/classic/browser/subtle-pattern.png
|
||||
skin/classic/browser/menuPanel-customize.png
|
||||
skin/classic/browser/menuPanel-customize@2x.png
|
||||
skin/classic/browser/menuPanel-exit.png
|
||||
skin/classic/browser/menuPanel-exit@2x.png
|
||||
skin/classic/browser/menuPanel-help.png
|
||||
skin/classic/browser/menuPanel-help@2x.png
|
||||
skin/classic/browser/panel-expander-closed.png
|
||||
skin/classic/browser/panel-expander-closed@2x.png
|
||||
skin/classic/browser/panel-expander-open.png
|
||||
|
@ -70,12 +64,6 @@ browser.jar:
|
|||
skin/classic/browser/tabbrowser/tabDragIndicator@2x.png (tabbrowser/tabDragIndicator@2x.png)
|
||||
skin/classic/browser/sync-desktopIcon.svg (../shared/sync-desktopIcon.svg)
|
||||
skin/classic/browser/sync-mobileIcon.svg (../shared/sync-mobileIcon.svg)
|
||||
skin/classic/browser/yosemite/menuPanel-customize.png (menuPanel-customize-yosemite.png)
|
||||
skin/classic/browser/yosemite/menuPanel-customize@2x.png (menuPanel-customize-yosemite@2x.png)
|
||||
skin/classic/browser/yosemite/menuPanel-exit.png (menuPanel-exit-yosemite.png)
|
||||
skin/classic/browser/yosemite/menuPanel-exit@2x.png (menuPanel-exit-yosemite@2x.png)
|
||||
skin/classic/browser/yosemite/menuPanel-help.png (menuPanel-help-yosemite.png)
|
||||
skin/classic/browser/yosemite/menuPanel-help@2x.png (menuPanel-help-yosemite@2x.png)
|
||||
skin/classic/browser/e10s-64@2x.png (../shared/e10s-64@2x.png)
|
||||
|
||||
[extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}] chrome.jar:
|
||||
|
@ -84,10 +72,3 @@ browser.jar:
|
|||
% override chrome://browser/skin/feeds/videoFeedIcon.png chrome://browser/skin/feeds/feedIcon.png
|
||||
% override chrome://browser/skin/feeds/videoFeedIcon16.png chrome://browser/skin/feeds/feedIcon16.png
|
||||
% override chrome://browser/skin/notification-icons/geo-detailed.svg chrome://browser/skin/notification-icons/geo.svg
|
||||
|
||||
% override chrome://browser/skin/menuPanel-customize.png chrome://browser/skin/yosemite/menuPanel-customize.png os=Darwin osversion>=10.10
|
||||
% override chrome://browser/skin/menuPanel-customize@2x.png chrome://browser/skin/yosemite/menuPanel-customize@2x.png os=Darwin osversion>=10.10
|
||||
% override chrome://browser/skin/menuPanel-exit.png chrome://browser/skin/yosemite/menuPanel-exit.png os=Darwin osversion>=10.10
|
||||
% override chrome://browser/skin/menuPanel-exit@2x.png chrome://browser/skin/yosemite/menuPanel-exit@2x.png os=Darwin osversion>=10.10
|
||||
% override chrome://browser/skin/menuPanel-help.png chrome://browser/skin/yosemite/menuPanel-help.png os=Darwin osversion>=10.10
|
||||
% override chrome://browser/skin/menuPanel-help@2x.png chrome://browser/skin/yosemite/menuPanel-help@2x.png os=Darwin osversion>=10.10
|
||||
|
|
Двоичные данные
browser/themes/osx/menu-forward.png
До Ширина: | Высота: | Размер: 213 B |
Двоичные данные
browser/themes/osx/menuPanel-customize-yosemite.png
До Ширина: | Высота: | Размер: 219 B |
Двоичные данные
browser/themes/osx/menuPanel-customize-yosemite@2x.png
До Ширина: | Высота: | Размер: 364 B |
Двоичные данные
browser/themes/osx/menuPanel-customize.png
До Ширина: | Высота: | Размер: 874 B |
Двоичные данные
browser/themes/osx/menuPanel-customize@2x.png
До Ширина: | Высота: | Размер: 2.1 KiB |
Двоичные данные
browser/themes/osx/menuPanel-exit-yosemite.png
До Ширина: | Высота: | Размер: 515 B |
Двоичные данные
browser/themes/osx/menuPanel-exit-yosemite@2x.png
До Ширина: | Высота: | Размер: 939 B |
Двоичные данные
browser/themes/osx/menuPanel-exit.png
До Ширина: | Высота: | Размер: 742 B |
Двоичные данные
browser/themes/osx/menuPanel-exit@2x.png
До Ширина: | Высота: | Размер: 1.6 KiB |
Двоичные данные
browser/themes/osx/menuPanel-help-yosemite.png
До Ширина: | Высота: | Размер: 1.9 KiB |
Двоичные данные
browser/themes/osx/menuPanel-help-yosemite@2x.png
До Ширина: | Высота: | Размер: 4.4 KiB |
Двоичные данные
browser/themes/osx/menuPanel-help.png
До Ширина: | Высота: | Размер: 2.0 KiB |
Двоичные данные
browser/themes/osx/menuPanel-help@2x.png
До Ширина: | Высота: | Размер: 5.2 KiB |
|
@ -195,7 +195,7 @@
|
|||
.identity-popup-host {
|
||||
word-wrap: break-word;
|
||||
/* 1em + 2em + 24px is #identity-popup-security-content padding
|
||||
* 30em is .panel-mainview:not([panelid="PanelUI-popup"]) width */
|
||||
* 30em is .panel-mainview width */
|
||||
max-width: calc(30rem - 3rem - 24px - @identityPopupExpanderWidth@);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,8 +24,7 @@
|
|||
background-image: linear-gradient(var(--toolbar-bgcolor), var(--toolbar-non-lwt-bgcolor) 45px);
|
||||
}
|
||||
|
||||
#customization-palette,
|
||||
#customization-empty {
|
||||
#customization-palette {
|
||||
padding: 5px 20px 20px;
|
||||
}
|
||||
|
||||
|
|
До Ширина: | Высота: | Размер: 337 B |
До Ширина: | Высота: | Размер: 625 B |
|
@ -29,69 +29,6 @@
|
|||
--appmenu-yellow-warning-active-color: #FFE38F;
|
||||
}
|
||||
|
||||
#PanelUI-popup #PanelUI-contents:empty {
|
||||
height: 128px;
|
||||
}
|
||||
|
||||
#PanelUI-popup #PanelUI-contents:empty::before {
|
||||
content: "";
|
||||
background-image: url(chrome://browser/skin/customizableui/whimsy.png);
|
||||
background-size: 64px 64px;
|
||||
display: block;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
position: absolute;
|
||||
transition: transform 1s ease-out;
|
||||
animation: whimsyMoveX 3.05s linear 0s infinite alternate,
|
||||
whimsyMoveY 3.4s linear 0s infinite alternate;
|
||||
}
|
||||
|
||||
#PanelUI-popup #PanelUI-contents:not(:hover):empty::before {
|
||||
filter: grayscale(100%);
|
||||
}
|
||||
|
||||
#PanelUI-popup #PanelUI-contents:active:empty::before {
|
||||
animation: whimsyMoveX 3.05s linear 0s infinite alternate,
|
||||
whimsyMoveY 3.4s linear 0s infinite alternate,
|
||||
whimsyRotate 1s linear 0s infinite normal;
|
||||
}
|
||||
|
||||
#PanelUI-popup #PanelUI-contents:-moz-locale-dir(rtl):empty::before {
|
||||
animation: whimsyMoveXRTL 3.05s linear 0s infinite alternate,
|
||||
whimsyMoveY 3.4s linear 0s infinite alternate;
|
||||
}
|
||||
|
||||
#PanelUI-popup #PanelUI-contents:-moz-locale-dir(rtl):active:empty::before {
|
||||
animation: whimsyMoveXRTL 3.05s linear 0s infinite alternate,
|
||||
whimsyMoveY 3.4s linear 0s infinite alternate,
|
||||
whimsyRotate 1s linear 0s infinite normal;
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
#PanelUI-popup #PanelUI-contents:empty::before {
|
||||
background-image: url(chrome://browser/skin/customizableui/whimsy@2x.png);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes whimsyMoveX {
|
||||
/* These values are adjusted for the padding on the panel. */
|
||||
from { margin-left: -15px; } to { margin-left: calc(100% - 49px); }
|
||||
}
|
||||
|
||||
@keyframes whimsyMoveXRTL {
|
||||
/* These values are adjusted for the padding on the panel. */
|
||||
from { margin-right: -15px; } to { margin-right: calc(100% - 49px); }
|
||||
}
|
||||
|
||||
@keyframes whimsyMoveY {
|
||||
/* These values are adjusted for the padding and height of the panel. */
|
||||
from { margin-top: -.5em; } to { margin-top: calc(64px - .5em); }
|
||||
}
|
||||
|
||||
@keyframes whimsyRotate {
|
||||
to { transform: perspective(5000px) rotateY(360deg); }
|
||||
}
|
||||
|
||||
:root:not([uidensity=compact]):not([chromehidden~="toolbar"]) #PanelUI-button {
|
||||
margin-inline-start: 3px;
|
||||
border-inline-start: 1px solid;
|
||||
|
@ -270,11 +207,6 @@ panelview {
|
|||
-moz-box-flex: 1;
|
||||
}
|
||||
|
||||
#PanelUI-popup .panel-subview-body {
|
||||
margin: -4px;
|
||||
padding: 4px 4px;
|
||||
}
|
||||
|
||||
.subviewbutton.panel-subview-footer {
|
||||
box-sizing: border-box;
|
||||
min-height: 41px;
|
||||
|
@ -288,13 +220,11 @@ panelview {
|
|||
-moz-box-flex: 1;
|
||||
}
|
||||
|
||||
#appMenu-popup > arrowscrollbox > autorepeatbutton,
|
||||
#PanelUI-popup > arrowscrollbox > autorepeatbutton {
|
||||
#appMenu-popup > arrowscrollbox > autorepeatbutton {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#appMenu-popup > arrowscrollbox > scrollbox,
|
||||
#PanelUI-popup > arrowscrollbox > scrollbox {
|
||||
#appMenu-popup > arrowscrollbox > scrollbox {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
|
@ -303,7 +233,6 @@ panel[photon] > .panel-arrowcontainer > .panel-arrowcontent {
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
#PanelUI-popup > .panel-arrowcontainer > .panel-arrowcontent,
|
||||
.cui-widget-panel > .panel-arrowcontainer > .panel-arrowcontent > .popup-internal-box {
|
||||
padding: 0;
|
||||
}
|
||||
|
@ -342,12 +271,8 @@ panel[photon] > .panel-arrowcontainer > .panel-arrowcontent {
|
|||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
#PanelUI-contents {
|
||||
max-width: @menuPanelWidth@;
|
||||
}
|
||||
|
||||
#BMB_bookmarksPopup,
|
||||
.panel-mainview:not([panelid="PanelUI-popup"]) {
|
||||
.panel-mainview {
|
||||
max-width: @standaloneSubviewWidth@;
|
||||
}
|
||||
|
||||
|
@ -551,11 +476,9 @@ toolbarpaletteitem[place=panel] > .toolbarbutton-1 {
|
|||
-moz-box-flex: 1;
|
||||
}
|
||||
|
||||
/* Help SDK buttons fit in. */
|
||||
/* Help webextension buttons fit in. */
|
||||
toolbarpaletteitem[place="palette"] > toolbarbutton[constrain-size="true"] > .toolbarbutton-icon,
|
||||
toolbarpaletteitem[place="palette"] > toolbarbutton[constrain-size="true"] > .toolbarbutton-badge-stack > .toolbarbutton-icon,
|
||||
toolbarpaletteitem[place="palette"] > toolbaritem[sdkstylewidget="true"] > .toolbarbutton-1 > .toolbarbutton-icon,
|
||||
toolbarpaletteitem[place="panel"] > toolbaritem[sdkstylewidget="true"] > .toolbarbutton-1 > .toolbarbutton-icon,
|
||||
toolbarbutton[constrain-size="true"][cui-areatype="menu-panel"] > .toolbarbutton-icon,
|
||||
toolbarbutton[constrain-size="true"][cui-areatype="menu-panel"] > .toolbarbutton-badge-stack > .toolbarbutton-icon {
|
||||
height: @panelPaletteIconSize@;
|
||||
|
@ -569,139 +492,6 @@ toolbarbutton[constrain-size="true"][cui-areatype="menu-panel"] > .toolbarbutton
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
.panelUI-grid .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||
-moz-appearance: none;
|
||||
-moz-box-orient: vertical;
|
||||
width: calc(@menuPanelButtonWidth@ - 2px);
|
||||
height: calc(49px + 2.2em);
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.panelUI-grid .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-text,
|
||||
.panelUI-grid .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-multiline-text {
|
||||
margin-top: 2px; /* Hack needed to get the label of type=menu-button aligned with other buttons */
|
||||
}
|
||||
|
||||
.panel-customization-placeholder-child {
|
||||
margin: 6px 0 0;
|
||||
padding: 2px 6px;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.panelUI-grid .toolbarbutton-1[type="menu"] {
|
||||
background-image: url("chrome://browser/skin/toolbarbutton-dropdown-arrow.png");
|
||||
background-position: right 3px top 16px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.panelUI-grid .toolbarbutton-1[type="menu"]:-moz-locale-dir(rtl) {
|
||||
background-position: left 3px top 16px;
|
||||
}
|
||||
|
||||
.panelUI-grid .toolbarbutton-1 > .toolbarbutton-menu-dropmarker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.panelUI-grid .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
|
||||
-moz-box-align: center;
|
||||
width: 16px;
|
||||
margin-inline-start: -16px;
|
||||
height: 51px;
|
||||
margin-bottom: 2.2em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.panelUI-grid .toolbarbutton-1:not([buttonover])@buttonStateHover@ > .toolbarbutton-menubutton-dropmarker {
|
||||
background-color: var(--arrowpanel-dimmed) !important;
|
||||
border-radius: 0 0 0 2px;
|
||||
}
|
||||
|
||||
.panelUI-grid .toolbarbutton-1:not([buttonover])@buttonStateHover@ > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(rtl) {
|
||||
border-radius: 0 0 2px 0;
|
||||
}
|
||||
|
||||
#main-window:not([customizing]) .panel-combined-button[disabled] > .toolbarbutton-icon {
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
toolbaritem[cui-areatype="menu-panel"][sdkstylewidget="true"]:not(.panel-wide-item) {
|
||||
width: calc(@menuPanelButtonWidth@);
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
toolbaritem[cui-areatype="menu-panel"][sdkstylewidget="true"]:not(.panel-wide-item) {
|
||||
-moz-box-align: center;
|
||||
-moz-box-pack: center;
|
||||
}
|
||||
|
||||
toolbaritem[cui-areatype="menu-panel"][sdkstylewidget="true"] > iframe {
|
||||
margin: 4px auto;
|
||||
}
|
||||
|
||||
#PanelUI-multiView[viewtype="subview"] > .panel-viewcontainer > .panel-viewstack > .panel-mainview > #PanelUI-mainView {
|
||||
background-color: var(--arrowpanel-dimmed);
|
||||
}
|
||||
|
||||
#PanelUI-multiView[viewtype="subview"] #PanelUI-mainView > #PanelUI-contents-scroller > #PanelUI-contents > .panel-wide-item,
|
||||
#PanelUI-multiView[viewtype="subview"] #PanelUI-mainView > #PanelUI-contents-scroller > #PanelUI-contents > .toolbarbutton-1:not([panel-multiview-anchor="true"]),
|
||||
#PanelUI-multiView[viewtype="subview"] #PanelUI-mainView > #PanelUI-footer > .panel-banner-item,
|
||||
#PanelUI-multiView[viewtype="subview"] #PanelUI-mainView > #PanelUI-footer > #PanelUI-fxa-container > #PanelUI-fxa-status > #PanelUI-fxa-avatar,
|
||||
#PanelUI-multiView[viewtype="subview"] #PanelUI-mainView > #PanelUI-footer > #PanelUI-fxa-container > #PanelUI-fxa-status > #PanelUI-fxa-label,
|
||||
#PanelUI-multiView[viewtype="subview"] #PanelUI-mainView > #PanelUI-footer > #PanelUI-fxa-container > #PanelUI-fxa-icon,
|
||||
#PanelUI-multiView[viewtype="subview"] #PanelUI-mainView > #PanelUI-footer > #PanelUI-footer-inner > #PanelUI-footer-inner > toolbarseparator,
|
||||
#PanelUI-multiView[viewtype="subview"] #PanelUI-mainView > #PanelUI-footer > #PanelUI-footer-inner > #PanelUI-customize,
|
||||
#PanelUI-multiView[viewtype="subview"] #PanelUI-mainView > #PanelUI-footer > #PanelUI-footer-inner > #PanelUI-help:not([panel-multiview-anchor="true"]) {
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
/*
|
||||
* XXXgijs: this is a workaround for a layout issue that was caused by these iframes,
|
||||
* which was affecting subview display. Because of this, we're hiding the iframe *only*
|
||||
* when displaying a subview. The discerning user might notice this, but it's not nearly
|
||||
* as bad as the brokenness.
|
||||
* This hack should be removed once https://bugzilla.mozilla.org/show_bug.cgi?id=975375
|
||||
* is addressed.
|
||||
*/
|
||||
#PanelUI-multiView[viewtype="subview"] toolbaritem[cui-areatype="menu-panel"][sdkstylewidget="true"]:not(.panel-wide-item) > iframe {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
toolbaritem[cui-areatype="menu-panel"][sdkstylewidget="true"]:not(.panel-wide-item) > .toolbarbutton-text {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.panelUI-grid .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
||||
.panelUI-grid .toolbarbutton-1 > .toolbarbutton-icon,
|
||||
.panelUI-grid .toolbarbutton-1 > .toolbarbutton-badge-stack,
|
||||
.customization-palette .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
||||
.customization-palette .toolbarbutton-1 > .toolbarbutton-icon,
|
||||
.customization-palette .toolbarbutton-1 > .toolbarbutton-badge-stack,
|
||||
.panel-customization-placeholder-child > .toolbarbutton-icon {
|
||||
width: @panelPaletteIconSize@;
|
||||
height: @panelPaletteIconSize@;
|
||||
min-width: @panelPaletteIconSize@;
|
||||
min-height: @panelPaletteIconSize@;
|
||||
}
|
||||
|
||||
.panelUI-grid .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
||||
.panelUI-grid .toolbarbutton-1 > .toolbarbutton-icon,
|
||||
.panelUI-grid .toolbarbutton-1 > .toolbarbutton-badge-stack,
|
||||
.panel-customization-placeholder-child > .toolbarbutton-icon {
|
||||
/* Explanation for the below formula (A / B - C)
|
||||
A
|
||||
Each button is @menuPanelButtonWidth@ wide
|
||||
B
|
||||
Each button has two margins.
|
||||
C (46px / 2 = 23px)
|
||||
The button icon is 32 pixels wide.
|
||||
The button has 12px of horizontal padding (6 on each side).
|
||||
The button has 2px of horizontal border (1 on each side).
|
||||
Total width of button's icon + button padding should therefore be 46px,
|
||||
which means each horizontal margin should be the half the button's width - (46/2) px.
|
||||
*/
|
||||
margin: 4px calc(@menuPanelButtonWidth@ / 2 - 23px);
|
||||
}
|
||||
|
||||
/* above we treat the container as the icon for the margins, that is so the
|
||||
/* badge itself is positioned correctly. Here we make sure that the icon itself
|
||||
/* has the minimum size we want, but no padding/margin. */
|
||||
|
@ -728,36 +518,6 @@ toolbaritem[cui-areatype="menu-panel"][sdkstylewidget="true"]:not(.panel-wide-it
|
|||
display: none;
|
||||
}
|
||||
|
||||
#PanelUI-footer {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
flex-direction: column;
|
||||
background-color: var(--arrowpanel-dimmed);
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#main-window[customizing] #PanelUI-fxa-container {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#PanelUI-fxa-container:not([fxastatus="signedin"]) > toolbarseparator,
|
||||
#PanelUI-fxa-container:not([fxastatus="signedin"]) > #PanelUI-fxa-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#PanelUI-fxa-container[fxastatus="login-failed"] > #PanelUI-fxa-status::after,
|
||||
#PanelUI-fxa-container[fxastatus="unverified"] > #PanelUI-fxa-status::after {
|
||||
content: url(chrome://browser/skin/warning.svg);
|
||||
filter: drop-shadow(0 1px 0 hsla(206,50%,10%,.15));
|
||||
width: 47px;
|
||||
padding-top: 1px;
|
||||
display: block;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
top: 25%;
|
||||
}
|
||||
|
||||
.addon-banner-item::after,
|
||||
.panel-banner-item::after {
|
||||
content: "";
|
||||
|
@ -776,6 +536,7 @@ toolbaritem[cui-areatype="menu-panel"][sdkstylewidget="true"]:not(.panel-wide-it
|
|||
width: calc(@menuPanelWidth@ + 30px);
|
||||
padding-inline-start: 15px;
|
||||
border-inline-start-style: none;
|
||||
-moz-image-region: rect(0, 16px, 16px, 0);
|
||||
}
|
||||
|
||||
.addon-banner-item:hover {
|
||||
|
@ -795,43 +556,8 @@ toolbaritem[cui-areatype="menu-panel"][sdkstylewidget="true"]:not(.panel-wide-it
|
|||
background: #FFBF00 url(chrome://browser/skin/update-badge-failed.svg) no-repeat center;
|
||||
}
|
||||
|
||||
#PanelUI-fxa-status {
|
||||
display: flex;
|
||||
flex: 1 1 0%;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
#PanelUI-footer-inner,
|
||||
#PanelUI-fxa-container:not([hidden]) {
|
||||
display: flex;
|
||||
border-top: 1px solid var(--panel-separator-color);
|
||||
}
|
||||
|
||||
#PanelUI-multiView[viewtype="subview"] #PanelUI-footer-inner,
|
||||
#PanelUI-multiView[viewtype="subview"] #PanelUI-fxa-container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#PanelUI-footer-inner > toolbarseparator,
|
||||
#PanelUI-fxa-container > toolbarseparator {
|
||||
border: 0;
|
||||
border-left: 1px solid var(--panel-separator-color);
|
||||
margin: 7px 0 7px;
|
||||
-moz-appearance: none;
|
||||
}
|
||||
|
||||
#PanelUI-footer-inner:hover > toolbarseparator,
|
||||
#PanelUI-fxa-container:hover > toolbarseparator {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.addon-banner-item,
|
||||
.panel-banner-item,
|
||||
#PanelUI-help,
|
||||
#PanelUI-fxa-label,
|
||||
#PanelUI-fxa-icon,
|
||||
#PanelUI-customize,
|
||||
#PanelUI-quit {
|
||||
.panel-banner-item {
|
||||
margin: 0;
|
||||
padding: 11px 0;
|
||||
box-sizing: border-box;
|
||||
|
@ -846,13 +572,6 @@ toolbaritem[cui-areatype="menu-panel"][sdkstylewidget="true"]:not(.panel-wide-it
|
|||
|
||||
.panel-banner-item {
|
||||
border-top: 1px solid var(--panel-separator-color);
|
||||
border-bottom: 1px solid transparent;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
|
||||
/* in Photon, we have a bottom border as well. Reconcile with the above rule
|
||||
* after photon launch. */
|
||||
#appMenu-mainView > .panel-subview-body > .panel-banner-item {
|
||||
border-bottom: 1px solid var(--panel-separator-color);
|
||||
margin-bottom: 3px;
|
||||
padding-inline-start: 12px;
|
||||
|
@ -866,6 +585,10 @@ toolbaritem[cui-areatype="menu-panel"][sdkstylewidget="true"]:not(.panel-wide-it
|
|||
width: 0; /* Fancy cropping solution for flexbox. */
|
||||
}
|
||||
|
||||
.panel-banner-item > .toolbarbutton-icon {
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
/* FxAccount indicator bits. */
|
||||
|
||||
/* Add the .toolbaritem-combined-buttons class to increase the specificity so as
|
||||
|
@ -946,61 +669,24 @@ toolbaritem[cui-areatype="menu-panel"][sdkstylewidget="true"]:not(.panel-wide-it
|
|||
background-color: var(--appmenu-yellow-warning-active-color);
|
||||
}
|
||||
|
||||
#PanelUI-help,
|
||||
#PanelUI-quit {
|
||||
min-width: 46px;
|
||||
}
|
||||
|
||||
.addon-banner-item > .toolbarbutton-text,
|
||||
.panel-banner-item > .toolbarbutton-text,
|
||||
#PanelUI-fxa-label > .toolbarbutton-text,
|
||||
#PanelUI-customize > .toolbarbutton-text {
|
||||
.panel-banner-item > .toolbarbutton-text {
|
||||
margin: 0;
|
||||
padding: 0 6px;
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
#PanelUI-help > .toolbarbutton-text,
|
||||
#PanelUI-quit > .toolbarbutton-text,
|
||||
#PanelUI-fxa-avatar > .toolbarbutton-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.addon-banner-item > .toolbarbutton-icon,
|
||||
.panel-banner-item > .toolbarbutton-icon,
|
||||
#PanelUI-fxa-label > .toolbarbutton-icon,
|
||||
#PanelUI-fxa-icon > .toolbarbutton-icon,
|
||||
#PanelUI-customize > .toolbarbutton-icon,
|
||||
#PanelUI-help > .toolbarbutton-icon,
|
||||
#PanelUI-quit > .toolbarbutton-icon {
|
||||
.panel-banner-item > .toolbarbutton-icon {
|
||||
margin-inline-end: 0;
|
||||
}
|
||||
|
||||
#PanelUI-fxa-icon {
|
||||
padding-inline-start: 15px;
|
||||
padding-inline-end: 15px;
|
||||
}
|
||||
|
||||
#PanelUI-fxa-label,
|
||||
.addon-banner-item,
|
||||
#PanelUI-customize {
|
||||
.addon-banner-item {
|
||||
flex: 1;
|
||||
padding-inline-start: 15px;
|
||||
border-inline-start-style: none;
|
||||
}
|
||||
|
||||
#PanelUI-fxa-container[fxastatus="signedin"] > #PanelUI-fxa-status > #PanelUI-fxa-label {
|
||||
padding-inline-start: 0px;
|
||||
}
|
||||
|
||||
/* descend from #PanelUI-footer to add specificity, or else the
|
||||
padding-inline-start will be overridden */
|
||||
#PanelUI-footer > .panel-banner-item {
|
||||
width: calc(@menuPanelWidth@ + 30px);
|
||||
padding-inline-start: 15px;
|
||||
border-inline-start-style: none;
|
||||
}
|
||||
|
||||
#PanelUI-remotetabs {
|
||||
--panel-ui-sync-illustration-height: 157.5px;
|
||||
}
|
||||
|
@ -1120,119 +806,6 @@ toolbaritem[cui-areatype="menu-panel"][sdkstylewidget="true"]:not(.panel-wide-it
|
|||
display: none;
|
||||
}
|
||||
|
||||
#PanelUI-customize {
|
||||
list-style-image: url(chrome://browser/skin/menuPanel-customize.png);
|
||||
}
|
||||
|
||||
#customization-panelHolder #PanelUI-customize {
|
||||
list-style-image: url(chrome://browser/skin/customizableui/menuPanel-customizeFinish.png);
|
||||
}
|
||||
|
||||
#PanelUI-help {
|
||||
list-style-image: url(chrome://browser/skin/menuPanel-help.png);
|
||||
}
|
||||
|
||||
#PanelUI-quit {
|
||||
border-inline-end-style: none;
|
||||
list-style-image: url(chrome://browser/skin/menuPanel-exit.png);
|
||||
}
|
||||
|
||||
#PanelUI-fxa-label,
|
||||
#PanelUI-fxa-icon,
|
||||
.addon-banner-item,
|
||||
#PanelUI-customize,
|
||||
#PanelUI-help,
|
||||
#PanelUI-quit {
|
||||
-moz-image-region: rect(0, 16px, 16px, 0);
|
||||
}
|
||||
|
||||
#PanelUI-fxa-container[fxastatus="signedin"] > #PanelUI-fxa-status > #PanelUI-fxa-label > .toolbarbutton-icon,
|
||||
#PanelUI-fxa-container:not([fxastatus="signedin"]) > #PanelUI-fxa-status > #PanelUI-fxa-avatar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#PanelUI-fxa-avatar {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0 0;
|
||||
background-size: contain;
|
||||
align-self: center;
|
||||
margin: 0px 7px;
|
||||
padding: 0px;
|
||||
border: 0px none;
|
||||
margin-inline-end: 0;
|
||||
}
|
||||
|
||||
#PanelUI-fxa-container > #PanelUI-fxa-status > #PanelUI-fxa-avatar {
|
||||
list-style-image: url(chrome://browser/skin/fxa/default-avatar.svg);
|
||||
}
|
||||
|
||||
#PanelUI-customize:hover,
|
||||
#PanelUI-help:not([disabled]):hover,
|
||||
#PanelUI-quit:not([disabled]):hover {
|
||||
-moz-image-region: rect(0, 32px, 16px, 16px);
|
||||
}
|
||||
|
||||
#PanelUI-customize:hover:active,
|
||||
#PanelUI-help:not([disabled]):hover:active,
|
||||
#PanelUI-quit:not([disabled]):hover:active {
|
||||
-moz-image-region: rect(0, 48px, 16px, 32px);
|
||||
}
|
||||
|
||||
#PanelUI-help[panel-multiview-anchor="true"] {
|
||||
-moz-image-region: rect(0, 64px, 16px, 48px);
|
||||
}
|
||||
|
||||
#PanelUI-help[disabled],
|
||||
#PanelUI-quit[disabled] {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
#PanelUI-fxa-status:hover,
|
||||
#PanelUI-fxa-icon:hover,
|
||||
#PanelUI-help:not([disabled]):hover,
|
||||
#PanelUI-customize:hover,
|
||||
#PanelUI-quit:not([disabled]):hover {
|
||||
outline: 1px solid var(--arrowpanel-dimmed);
|
||||
background-color: var(--arrowpanel-dimmed);
|
||||
}
|
||||
|
||||
#PanelUI-fxa-status:hover:active,
|
||||
#PanelUI-fxa-icon:hover:active,
|
||||
#PanelUI-help:not([disabled]):hover:active,
|
||||
#PanelUI-customize:hover:active,
|
||||
#PanelUI-quit:not([disabled]):hover:active {
|
||||
outline: 1px solid var(--arrowpanel-dimmed-further);
|
||||
background-color: var(--arrowpanel-dimmed-further);
|
||||
box-shadow: 0 1px 0 hsla(210,4%,10%,.05) inset;
|
||||
}
|
||||
|
||||
#PanelUI-fxa-status:hover,
|
||||
#PanelUI-fxa-status:hover:active,
|
||||
#PanelUI-fxa-icon:hover,
|
||||
#PanelUI-fxa-icon:hover:active {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#PanelUI-fxa-container[fxastatus="login-failed"],
|
||||
#PanelUI-fxa-container[fxastatus="unverified"] {
|
||||
background-color: hsl(42,94%,88%);
|
||||
border-top: 1px solid hsl(42,94%,70%);
|
||||
}
|
||||
|
||||
#PanelUI-fxa-container[fxastatus="login-failed"] > #PanelUI-fxa-status:hover,
|
||||
#PanelUI-fxa-container[fxastatus="unverified"] > #PanelUI-fxa-status:hover {
|
||||
background-color: hsl(42,94%,85%);
|
||||
}
|
||||
|
||||
#PanelUI-fxa-container[fxastatus="login-failed"] > #PanelUI-fxa-status:hover:active,
|
||||
#PanelUI-fxa-container[fxastatus="unverified"] > #PanelUI-fxa-status:hover:active {
|
||||
background-color: hsl(42,94%,82%);
|
||||
box-shadow: 0 1px 0 hsla(210,4%,10%,.05) inset;
|
||||
}
|
||||
|
||||
.panel-banner-item {
|
||||
color: black;
|
||||
background-color: hsla(96,65%,75%,.5);
|
||||
|
@ -1246,35 +819,6 @@ toolbaritem[cui-areatype="menu-panel"][sdkstylewidget="true"]:not(.panel-wide-it
|
|||
background-color: hsl(96,65%,75%);
|
||||
}
|
||||
|
||||
#PanelUI-quit:not([disabled]):hover {
|
||||
background-color: #d94141;
|
||||
outline-color: #c23a3a;
|
||||
}
|
||||
|
||||
#PanelUI-quit:not([disabled]):hover:active {
|
||||
background-color: #ad3434;
|
||||
outline-color: #992e2e;
|
||||
}
|
||||
|
||||
#customization-panelHolder #PanelUI-customize {
|
||||
color: white;
|
||||
background-color: hsl(108,66%,30%);
|
||||
text-shadow: none;
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
#customization-panelHolder #PanelUI-customize + toolbarseparator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#customization-panelHolder #PanelUI-customize:hover {
|
||||
background-color: hsl(109,65%,26%);
|
||||
}
|
||||
|
||||
#customization-panelHolder #PanelUI-customize:hover:active {
|
||||
background-color: hsl(109,65%,22%);
|
||||
}
|
||||
|
||||
#customization-palette .toolbarbutton-multiline-text,
|
||||
#customization-palette .toolbarbutton-text {
|
||||
display: none;
|
||||
|
@ -1424,6 +968,15 @@ panelview .toolbarbutton-1,
|
|||
|
||||
/* START photon adjustments */
|
||||
|
||||
.subviewbutton[checked="true"] {
|
||||
background: url(chrome://browser/skin/check.svg) center left 7px / 11px 11px no-repeat transparent;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
.subviewbutton[checked="true"]:-moz-locale-dir(rtl) {
|
||||
background-position: center right 7px;
|
||||
}
|
||||
|
||||
photonpanelmultiview .subviewbutton[checked="true"] {
|
||||
background: none;
|
||||
list-style-image: url(chrome://browser/skin/check.svg);
|
||||
|
@ -1667,53 +1220,6 @@ menuitem.panel-subview-footer@menuStateActive@,
|
|||
height: 16px;
|
||||
}
|
||||
|
||||
toolbarbutton[panel-multiview-anchor="true"],
|
||||
toolbarbutton[panel-multiview-anchor="true"] > .toolbarbutton-menubutton-button {
|
||||
color: HighlightText;
|
||||
background-color: Highlight;
|
||||
}
|
||||
|
||||
#PanelUI-help[panel-multiview-anchor="true"] + toolbarseparator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#PanelUI-help[panel-multiview-anchor="true"] {
|
||||
background-image: linear-gradient(rgba(255,255,255,0.3), transparent);
|
||||
background-position: 0;
|
||||
}
|
||||
|
||||
#PanelUI-help[panel-multiview-anchor="true"]::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
width: var(--panel-ui-exit-subview-gutter-width);
|
||||
background-image: url(chrome://browser/skin/customizableui/subView-arrow-back-inverted.png),
|
||||
linear-gradient(rgba(255,255,255,0.3), transparent);
|
||||
background-repeat: no-repeat;
|
||||
background-color: Highlight;
|
||||
background-position: left 10px center, 0;
|
||||
}
|
||||
|
||||
#PanelUI-help[panel-multiview-anchor="true"]:-moz-locale-dir(rtl)::after {
|
||||
background-image: url(chrome://browser/skin/customizableui/subView-arrow-back-inverted-rtl.png),
|
||||
linear-gradient(rgba(255,255,255,0.3), transparent);
|
||||
background-position: right 10px center, 0;
|
||||
}
|
||||
|
||||
toolbarbutton[panel-multiview-anchor="true"] {
|
||||
background-image: url(chrome://browser/skin/customizableui/subView-arrow-back-inverted.png),
|
||||
linear-gradient(rgba(255,255,255,0.3), transparent);
|
||||
background-position: right calc(@menuPanelButtonWidth@ / 2 - var(--panel-ui-exit-subview-gutter-width) + 2px) center;
|
||||
background-repeat: no-repeat, repeat;
|
||||
}
|
||||
|
||||
toolbarbutton[panel-multiview-anchor="true"]:-moz-locale-dir(rtl) {
|
||||
background-image: url(chrome://browser/skin/customizableui/subView-arrow-back-inverted-rtl.png),
|
||||
linear-gradient(rgba(255,255,255,0.3), transparent);
|
||||
background-position: left calc(@menuPanelButtonWidth@ / 2 - var(--panel-ui-exit-subview-gutter-width) + 2px) center;
|
||||
}
|
||||
|
||||
toolbarpaletteitem[place="palette"] > .toolbarbutton-1 > .toolbarbutton-menu-dropmarker,
|
||||
#bookmarks-menu-button[cui-areatype="menu-panel"] > .toolbarbutton-menu-dropmarker,
|
||||
#bookmarks-menu-button[overflowedItem] > .toolbarbutton-menu-dropmarker,
|
||||
|
@ -1829,6 +1335,7 @@ toolbaritem[overflowedItem=true],
|
|||
.widget-overflow-list .subviewbutton-nav:-moz-locale-dir(ltr)::after {
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
|
||||
.widget-overflow-list .subviewbutton-nav::after {
|
||||
margin-inline-start: 10px;
|
||||
-moz-context-properties: fill;
|
||||
|
@ -1846,14 +1353,6 @@ toolbarpaletteitem[place=panel] > .subviewbutton-nav::after {
|
|||
padding-inline-start: .5em;
|
||||
}
|
||||
|
||||
.subviewbutton[checked="true"] {
|
||||
background: url("chrome://global/skin/menu/shared-menu-check.png") center left 7px / 11px 11px no-repeat transparent;
|
||||
}
|
||||
|
||||
.subviewbutton[checked="true"]:-moz-locale-dir(rtl) {
|
||||
background-position: center right 7px;
|
||||
}
|
||||
|
||||
.subviewbutton > .menu-iconic-left {
|
||||
-moz-appearance: none;
|
||||
margin-inline-end: 3px;
|
||||
|
@ -2053,77 +1552,10 @@ menuitem[checked="true"].subviewbutton > .menu-iconic-left {
|
|||
}
|
||||
|
||||
@media (min-resolution: 1.1dppx) {
|
||||
#PanelUI-help[panel-multiview-anchor="true"]::after,
|
||||
toolbarbutton[panel-multiview-anchor="true"] {
|
||||
background-image: url(chrome://browser/skin/customizableui/subView-arrow-back-inverted@2x.png),
|
||||
linear-gradient(rgba(255,255,255,0.3), transparent);
|
||||
background-size: 16px, auto;
|
||||
}
|
||||
|
||||
#PanelUI-help[panel-multiview-anchor="true"]:-moz-locale-dir(rtl)::after,
|
||||
toolbarbutton[panel-multiview-anchor="true"]:-moz-locale-dir(rtl) {
|
||||
background-image: url(chrome://browser/skin/customizableui/subView-arrow-back-inverted-rtl@2x.png),
|
||||
linear-gradient(rgba(255,255,255,0.3), transparent);
|
||||
}
|
||||
|
||||
.panel-banner-item[notificationid^=update] {
|
||||
list-style-image: url(chrome://branding/content/icon32.png);
|
||||
}
|
||||
|
||||
#PanelUI-customize {
|
||||
list-style-image: url(chrome://browser/skin/menuPanel-customize@2x.png);
|
||||
}
|
||||
|
||||
#customization-panelHolder #PanelUI-customize {
|
||||
list-style-image: url(chrome://browser/skin/customizableui/menuPanel-customizeFinish@2x.png);
|
||||
}
|
||||
|
||||
#PanelUI-help {
|
||||
list-style-image: url(chrome://browser/skin/menuPanel-help@2x.png);
|
||||
}
|
||||
|
||||
#PanelUI-quit {
|
||||
list-style-image: url(chrome://browser/skin/menuPanel-exit@2x.png);
|
||||
}
|
||||
|
||||
#PanelUI-fxa-label,
|
||||
#PanelUI-fxa-icon,
|
||||
#PanelUI-customize,
|
||||
#PanelUI-help,
|
||||
#PanelUI-quit {
|
||||
-moz-image-region: rect(0, 32px, 32px, 0);
|
||||
}
|
||||
|
||||
.panel-banner-item > .toolbarbutton-icon,
|
||||
#PanelUI-fxa-label > .toolbarbutton-icon,
|
||||
#PanelUI-fxa-icon > .toolbarbutton-icon,
|
||||
#PanelUI-customize > .toolbarbutton-icon,
|
||||
#PanelUI-help > .toolbarbutton-icon,
|
||||
#PanelUI-quit > .toolbarbutton-icon {
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
#PanelUI-customize:hover,
|
||||
#PanelUI-help:not([disabled]):hover,
|
||||
#PanelUI-quit:not([disabled]):hover {
|
||||
-moz-image-region: rect(0, 64px, 32px, 32px);
|
||||
}
|
||||
|
||||
#PanelUI-customize:hover:active,
|
||||
#PanelUI-help:not([disabled]):hover:active,
|
||||
#PanelUI-quit:not([disabled]):hover:active {
|
||||
-moz-image-region: rect(0, 96px, 32px, 64px);
|
||||
}
|
||||
|
||||
#PanelUI-help[panel-multiview-anchor="true"] {
|
||||
-moz-image-region: rect(0, 128px, 32px, 96px);
|
||||
background-size: auto;
|
||||
}
|
||||
|
||||
.subviewbutton[checked="true"] {
|
||||
background-image: url("chrome://global/skin/menu/shared-menu-check@2x.png");
|
||||
}
|
||||
|
||||
#panic-button-success-icon,
|
||||
#PanelUI-panic-timeframe-icon {
|
||||
list-style-image: url(chrome://browser/skin/panic-panel/header@2x.png);
|
||||
|
|
До Ширина: | Высота: | Размер: 190 B |
До Ширина: | Высота: | Размер: 465 B |
До Ширина: | Высота: | Размер: 307 B |
До Ширина: | Высота: | Размер: 667 B |
Двоичные данные
browser/themes/shared/customizableui/whimsy@2x.png
До Ширина: | Высота: | Размер: 18 KiB |
|
@ -28,19 +28,12 @@
|
|||
* skin/classic/browser/controlcenter/tracking-protection.svg (../shared/controlcenter/tracking-protection.svg)
|
||||
skin/classic/browser/controlcenter/warning-gray.svg (../shared/controlcenter/warning-gray.svg)
|
||||
skin/classic/browser/controlcenter/warning-yellow.svg (../shared/controlcenter/warning-yellow.svg)
|
||||
skin/classic/browser/customizableui/menuPanel-customizeFinish.png (../shared/customizableui/menuPanel-customizeFinish.png)
|
||||
skin/classic/browser/customizableui/menuPanel-customizeFinish@2x.png (../shared/customizableui/menuPanel-customizeFinish@2x.png)
|
||||
skin/classic/browser/customizableui/empty-overflow-panel.png (../shared/customizableui/empty-overflow-panel.png)
|
||||
skin/classic/browser/customizableui/empty-overflow-panel@2x.png (../shared/customizableui/empty-overflow-panel@2x.png)
|
||||
skin/classic/browser/customizableui/density-compact.svg (../shared/customizableui/density-compact.svg)
|
||||
skin/classic/browser/customizableui/density-normal.svg (../shared/customizableui/density-normal.svg)
|
||||
skin/classic/browser/customizableui/density-touch.svg (../shared/customizableui/density-touch.svg)
|
||||
skin/classic/browser/customizableui/subView-arrow-back-inverted.png (../shared/customizableui/subView-arrow-back-inverted.png)
|
||||
skin/classic/browser/customizableui/subView-arrow-back-inverted@2x.png (../shared/customizableui/subView-arrow-back-inverted@2x.png)
|
||||
skin/classic/browser/customizableui/subView-arrow-back-inverted-rtl.png (../shared/customizableui/subView-arrow-back-inverted-rtl.png)
|
||||
skin/classic/browser/customizableui/subView-arrow-back-inverted-rtl@2x.png (../shared/customizableui/subView-arrow-back-inverted-rtl@2x.png)
|
||||
skin/classic/browser/customizableui/whimsy.png (../shared/customizableui/whimsy.png)
|
||||
skin/classic/browser/customizableui/whimsy@2x.png (../shared/customizableui/whimsy@2x.png)
|
||||
skin/classic/browser/downloads/contentAreaDownloadsView.css (../shared/downloads/contentAreaDownloadsView.css)
|
||||
skin/classic/browser/downloads/download-blocked.svg (../shared/downloads/download-blocked.svg)
|
||||
skin/classic/browser/downloads/download-summary.svg (../shared/downloads/download-summary.svg)
|
||||
|
@ -207,7 +200,6 @@
|
|||
skin/classic/browser/tabbrowser/tab-audio-small.svg (../shared/tabbrowser/tab-audio-small.svg)
|
||||
skin/classic/browser/tabbrowser/tab-overflow-indicator.png (../shared/tabbrowser/tab-overflow-indicator.png)
|
||||
|
||||
skin/classic/browser/toolbarbutton-dropdown-arrow.png (../shared/toolbarbutton-dropdown-arrow.png)
|
||||
skin/classic/browser/translating-16.png (../shared/translation/translating-16.png)
|
||||
skin/classic/browser/translating-16@2x.png (../shared/translation/translating-16@2x.png)
|
||||
skin/classic/browser/translation-16.png (../shared/translation/translation-16.png)
|
||||
|
|
|
@ -966,7 +966,11 @@ notification[value="translation"] {
|
|||
|
||||
notification[value="translation"] button[type="menu"] > .button-box > .button-menu-dropmarker,
|
||||
notification[value="translation"] menulist > .menulist-dropmarker {
|
||||
list-style-image: url("chrome://browser/skin/toolbarbutton-dropdown-arrow.png");
|
||||
list-style-image: url(chrome://global/skin/icons/arrow-dropdown-16.svg);
|
||||
}
|
||||
notification[value="translation"] menulist > .menulist-dropmarker > .dropmarker-icon {
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
}
|
||||
|
||||
notification[value="translation"] button > .button-box,
|
||||
|
|
|
@ -10,12 +10,6 @@ browser.jar:
|
|||
* skin/classic/browser/syncedtabs/sidebar.css (syncedtabs/sidebar.css)
|
||||
* skin/classic/browser/browser.css
|
||||
* skin/classic/browser/compacttheme.css
|
||||
skin/classic/browser/menuPanel-customize.png
|
||||
skin/classic/browser/menuPanel-customize@2x.png
|
||||
skin/classic/browser/menuPanel-exit.png
|
||||
skin/classic/browser/menuPanel-exit@2x.png
|
||||
skin/classic/browser/menuPanel-help.png
|
||||
skin/classic/browser/menuPanel-help@2x.png
|
||||
skin/classic/browser/monitor.png
|
||||
skin/classic/browser/monitor_16-10.png
|
||||
skin/classic/browser/pageInfo.css
|
||||
|
@ -25,7 +19,6 @@ browser.jar:
|
|||
skin/classic/browser/slowStartup-16.png
|
||||
skin/classic/browser/sync-desktopIcon.svg (../shared/sync-desktopIcon.svg)
|
||||
skin/classic/browser/sync-mobileIcon.svg (../shared/sync-mobileIcon.svg)
|
||||
skin/classic/browser/toolbarbutton-dropdown-arrow-win7.png
|
||||
skin/classic/browser/webRTC-indicator.css (../shared/webRTC-indicator.css)
|
||||
* skin/classic/browser/controlcenter/panel.css (controlcenter/panel.css)
|
||||
skin/classic/browser/customizableui/menu-arrow.svg (customizableui/menu-arrow.svg)
|
||||
|
@ -80,5 +73,3 @@ browser.jar:
|
|||
% override chrome://browser/skin/feeds/audioFeedIcon16.png chrome://browser/skin/feeds/feedIcon16.png
|
||||
% override chrome://browser/skin/feeds/videoFeedIcon.png chrome://browser/skin/feeds/feedIcon.png
|
||||
% override chrome://browser/skin/feeds/videoFeedIcon16.png chrome://browser/skin/feeds/feedIcon16.png
|
||||
|
||||
% override chrome://browser/skin/toolbarbutton-dropdown-arrow.png chrome://browser/skin/toolbarbutton-dropdown-arrow-win7.png os=WINNT osversion<=6.1
|
||||
|
|
Двоичные данные
browser/themes/windows/menu-forward.png
До Ширина: | Высота: | Размер: 434 B |
Двоичные данные
browser/themes/windows/menuPanel-customize.png
До Ширина: | Высота: | Размер: 874 B |
Двоичные данные
browser/themes/windows/menuPanel-customize@2x.png
До Ширина: | Высота: | Размер: 2.1 KiB |
Двоичные данные
browser/themes/windows/menuPanel-exit.png
До Ширина: | Высота: | Размер: 568 B |
Двоичные данные
browser/themes/windows/menuPanel-exit@2x.png
До Ширина: | Высота: | Размер: 1.1 KiB |
Двоичные данные
browser/themes/windows/menuPanel-help.png
До Ширина: | Высота: | Размер: 1.9 KiB |
Двоичные данные
browser/themes/windows/menuPanel-help@2x.png
До Ширина: | Высота: | Размер: 5.2 KiB |
|
@ -158,8 +158,8 @@ fi
|
|||
|
||||
AC_SUBST_LIST(CLANG_PLUGIN_FLAGS)
|
||||
AC_SUBST_LIST(LLVM_CXXFLAGS)
|
||||
AC_SUBST(LLVM_LDFLAGS)
|
||||
AC_SUBST(CLANG_LDFLAGS)
|
||||
AC_SUBST_LIST(LLVM_LDFLAGS)
|
||||
AC_SUBST_LIST(CLANG_LDFLAGS)
|
||||
|
||||
AC_SUBST(ENABLE_CLANG_PLUGIN)
|
||||
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# LLVM_CXXFLAGS comes with its own optimization flags.
|
||||
MOZ_OPTIMIZE =
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
# In the current moz.build world, we need to override essentially every
|
||||
|
@ -12,7 +9,6 @@ include $(topsrcdir)/config/config.mk
|
|||
ifneq ($(HOST_OS_ARCH),WINNT)
|
||||
DSO_LDOPTS := -shared
|
||||
endif
|
||||
OS_LDFLAGS := $(LLVM_LDFLAGS) $(CLANG_LDFLAGS)
|
||||
|
||||
ifeq ($(HOST_OS_ARCH)_$(OS_ARCH),Linux_Darwin)
|
||||
# Use the host compiler instead of the target compiler.
|
||||
|
@ -21,8 +17,6 @@ CXX := $(HOST_CXX)
|
|||
# and on cross linux/darwin builds, the options to give to the linker for file
|
||||
# lists differ between both, so don't use file lists.
|
||||
EXPAND_MKSHLIB_ARGS :=
|
||||
# Don't pass OSX linker arguments.
|
||||
MOZ_FIX_LINK_PATHS :=
|
||||
endif
|
||||
|
||||
# Use the default OS X deployment target to enable using the libc++ headers
|
||||
|
|
|
@ -75,3 +75,12 @@ COMPILE_FLAGS['CLANG_PLUGIN'] = []
|
|||
COMPILE_FLAGS['OPTIMIZE'] = []
|
||||
COMPILE_FLAGS['DEBUG'] = []
|
||||
COMPILE_FLAGS['OS_COMPILE_CXXFLAGS'] = []
|
||||
|
||||
LINK_FLAGS['OS'] = CONFIG['LLVM_LDFLAGS'] + CONFIG['CLANG_LDFLAGS']
|
||||
# The ldflags above override most other categories.
|
||||
for var in ('LINKER', 'OPTIMIZE'):
|
||||
LINK_FLAGS[var] = []
|
||||
|
||||
if CONFIG['HOST_OS_ARCH'] == 'Linux' and CONFIG['OS_ARCH'] == 'Darwin':
|
||||
# Don't pass OSX linker arguments.
|
||||
LINK_FLAGS['FIX_LINK_PATHS'] = []
|
||||
|
|
|
@ -136,7 +136,6 @@ PYTHON_PATH = $(PYTHON) $(topsrcdir)/config/pythonpath.py
|
|||
|
||||
# determine debug-related options
|
||||
_DEBUG_ASFLAGS :=
|
||||
_DEBUG_LDFLAGS :=
|
||||
|
||||
ifneq (,$(MOZ_DEBUG)$(MOZ_DEBUG_SYMBOLS))
|
||||
ifeq ($(AS),$(YASM))
|
||||
|
@ -150,37 +149,9 @@ ifneq (,$(MOZ_DEBUG)$(MOZ_DEBUG_SYMBOLS))
|
|||
else
|
||||
_DEBUG_ASFLAGS += $(MOZ_DEBUG_FLAGS)
|
||||
endif
|
||||
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
|
||||
endif
|
||||
|
||||
ASFLAGS += $(_DEBUG_ASFLAGS)
|
||||
OS_LDFLAGS += $(_DEBUG_LDFLAGS)
|
||||
|
||||
# XXX: What does this? Bug 482434 filed for better explanation.
|
||||
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
|
||||
ifndef MOZ_DEBUG
|
||||
|
||||
# MOZ_DEBUG_SYMBOLS generates debug symbols in separate PDB files.
|
||||
# Used for generating an optimized build with debugging symbols.
|
||||
# Used in the Windows nightlies to generate symbols for crash reporting.
|
||||
ifdef MOZ_DEBUG_SYMBOLS
|
||||
OS_LDFLAGS += -DEBUG
|
||||
endif
|
||||
|
||||
#
|
||||
# Handle DMD in optimized builds.
|
||||
#
|
||||
ifdef MOZ_DMD
|
||||
OS_LDFLAGS = -DEBUG
|
||||
endif # MOZ_DMD
|
||||
|
||||
ifdef MOZ_OPTIMIZE
|
||||
OS_LDFLAGS += -OPT:REF,ICF
|
||||
endif # MOZ_OPTIMIZE
|
||||
|
||||
endif # MOZ_DEBUG
|
||||
|
||||
endif # WINNT && !GNU_CC
|
||||
|
||||
#
|
||||
# Build using PIC by default
|
||||
|
@ -202,7 +173,7 @@ endif
|
|||
ifneq (1,$(NO_PROFILE_GUIDED_OPTIMIZE))
|
||||
ifdef MOZ_PROFILE_GENERATE
|
||||
PGO_CFLAGS += $(if $(filter $(notdir $<),$(notdir $(NO_PROFILE_GUIDED_OPTIMIZE))),,$(PROFILE_GEN_CFLAGS))
|
||||
OS_LDFLAGS += $(PROFILE_GEN_LDFLAGS)
|
||||
PGO_LDFLAGS += $(PROFILE_GEN_LDFLAGS)
|
||||
ifeq (WINNT,$(OS_ARCH))
|
||||
AR_FLAGS += -LTCG
|
||||
endif
|
||||
|
@ -210,16 +181,13 @@ endif # MOZ_PROFILE_GENERATE
|
|||
|
||||
ifdef MOZ_PROFILE_USE
|
||||
PGO_CFLAGS += $(if $(filter $(notdir $<),$(notdir $(NO_PROFILE_GUIDED_OPTIMIZE))),,$(PROFILE_USE_CFLAGS))
|
||||
OS_LDFLAGS += $(PROFILE_USE_LDFLAGS)
|
||||
PGO_LDFLAGS += $(PROFILE_USE_LDFLAGS)
|
||||
ifeq (WINNT,$(OS_ARCH))
|
||||
AR_FLAGS += -LTCG
|
||||
endif
|
||||
endif # MOZ_PROFILE_USE
|
||||
endif # NO_PROFILE_GUIDED_OPTIMIZE
|
||||
|
||||
# linker
|
||||
OS_LDFLAGS += $(LINKER_LDFLAGS)
|
||||
|
||||
MAKE_JARS_FLAGS = \
|
||||
-t $(topsrcdir) \
|
||||
-f $(MOZ_JAR_MAKER_FILE_FORMAT) \
|
||||
|
@ -251,11 +219,7 @@ INCLUDES = \
|
|||
|
||||
include $(MOZILLA_DIR)/config/static-checking-config.mk
|
||||
|
||||
LDFLAGS = $(OS_LDFLAGS) $(MOZBUILD_LDFLAGS) $(MOZ_FIX_LINK_PATHS)
|
||||
|
||||
ifdef MOZ_OPTIMIZE
|
||||
LDFLAGS += $(MOZ_OPTIMIZE_LDFLAGS)
|
||||
endif # MOZ_OPTIMIZE
|
||||
LDFLAGS = $(COMPUTED_LDFLAGS) $(PGO_LDFLAGS) $(MK_LDFLAGS)
|
||||
|
||||
COMPILE_CFLAGS = $(COMPUTED_CFLAGS) $(PGO_CFLAGS) $(_DEPEND_CFLAGS) $(MK_COMPILE_DEFINES)
|
||||
COMPILE_CXXFLAGS = $(COMPUTED_CXXFLAGS) $(PGO_CFLAGS) $(_DEPEND_CFLAGS) $(MK_COMPILE_DEFINES)
|
||||
|
|
|
@ -168,20 +168,10 @@ ifdef MOZ_DEBUG
|
|||
CODFILE=$(basename $(@F)).cod
|
||||
endif
|
||||
|
||||
ifdef DEFFILE
|
||||
OS_LDFLAGS += -DEF:$(call normalizepath,$(DEFFILE))
|
||||
EXTRA_DEPS += $(DEFFILE)
|
||||
endif
|
||||
|
||||
else #!GNU_CC
|
||||
|
||||
ifdef DEFFILE
|
||||
OS_LDFLAGS += $(call normalizepath,$(DEFFILE))
|
||||
EXTRA_DEPS += $(DEFFILE)
|
||||
endif
|
||||
|
||||
endif # !GNU_CC
|
||||
|
||||
EXTRA_DEPS += $(DEFFILE)
|
||||
|
||||
endif # WINNT
|
||||
|
||||
ifeq (arm-Darwin,$(CPU_ARCH)-$(OS_TARGET))
|
||||
|
|
|
@ -24,11 +24,10 @@
|
|||
#include <google/protobuf/arenastring.h>
|
||||
#include <google/protobuf/generated_message_table_driven.h>
|
||||
#include <google/protobuf/generated_message_util.h>
|
||||
#include <google/protobuf/metadata.h>
|
||||
#include <google/protobuf/message.h>
|
||||
#include <google/protobuf/metadata_lite.h>
|
||||
#include <google/protobuf/message_lite.h>
|
||||
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
|
||||
#include <google/protobuf/extension_set.h> // IWYU pragma: export
|
||||
#include <google/protobuf/unknown_field_set.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
namespace mozilla {
|
||||
namespace devtools {
|
||||
|
@ -73,7 +72,7 @@ void InitDefaults();
|
|||
|
||||
// ===================================================================
|
||||
|
||||
class Metadata : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:mozilla.devtools.protobuf.Metadata) */ {
|
||||
class Metadata : public ::google::protobuf::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.devtools.protobuf.Metadata) */ {
|
||||
public:
|
||||
Metadata();
|
||||
virtual ~Metadata();
|
||||
|
@ -99,14 +98,13 @@ class Metadata : public ::google::protobuf::Message /* @@protoc_insertion_point(
|
|||
return *this;
|
||||
}
|
||||
#endif
|
||||
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
|
||||
inline const ::std::string& unknown_fields() const {
|
||||
return _internal_metadata_.unknown_fields();
|
||||
}
|
||||
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
|
||||
inline ::std::string* mutable_unknown_fields() {
|
||||
return _internal_metadata_.mutable_unknown_fields();
|
||||
}
|
||||
|
||||
static const ::google::protobuf::Descriptor* descriptor();
|
||||
static const Metadata& default_instance();
|
||||
|
||||
static inline const Metadata* internal_default_instance() {
|
||||
|
@ -126,8 +124,8 @@ class Metadata : public ::google::protobuf::Message /* @@protoc_insertion_point(
|
|||
inline Metadata* New() const PROTOBUF_FINAL { return New(NULL); }
|
||||
|
||||
Metadata* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
|
||||
void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
|
||||
void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
|
||||
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from)
|
||||
PROTOBUF_FINAL;
|
||||
void CopyFrom(const Metadata& from);
|
||||
void MergeFrom(const Metadata& from);
|
||||
void Clear() PROTOBUF_FINAL;
|
||||
|
@ -138,13 +136,12 @@ class Metadata : public ::google::protobuf::Message /* @@protoc_insertion_point(
|
|||
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
|
||||
void SerializeWithCachedSizes(
|
||||
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
|
||||
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
|
||||
bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
|
||||
void DiscardUnknownFields();
|
||||
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
|
||||
private:
|
||||
void SharedCtor();
|
||||
void SharedDtor();
|
||||
void SetCachedSize(int size) const PROTOBUF_FINAL;
|
||||
void SetCachedSize(int size) const;
|
||||
void InternalSwap(Metadata* other);
|
||||
private:
|
||||
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
|
||||
|
@ -155,7 +152,7 @@ class Metadata : public ::google::protobuf::Message /* @@protoc_insertion_point(
|
|||
}
|
||||
public:
|
||||
|
||||
::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
|
||||
::std::string GetTypeName() const PROTOBUF_FINAL;
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
|
@ -173,7 +170,7 @@ class Metadata : public ::google::protobuf::Message /* @@protoc_insertion_point(
|
|||
void set_has_timestamp();
|
||||
void clear_has_timestamp();
|
||||
|
||||
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
|
||||
::google::protobuf::internal::InternalMetadataWithArenaLite _internal_metadata_;
|
||||
::google::protobuf::internal::HasBits<1> _has_bits_;
|
||||
mutable int _cached_size_;
|
||||
::google::protobuf::uint64 timestamp_;
|
||||
|
@ -181,7 +178,7 @@ class Metadata : public ::google::protobuf::Message /* @@protoc_insertion_point(
|
|||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class StackFrame_Data : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:mozilla.devtools.protobuf.StackFrame.Data) */ {
|
||||
class StackFrame_Data : public ::google::protobuf::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.devtools.protobuf.StackFrame.Data) */ {
|
||||
public:
|
||||
StackFrame_Data();
|
||||
virtual ~StackFrame_Data();
|
||||
|
@ -207,14 +204,13 @@ class StackFrame_Data : public ::google::protobuf::Message /* @@protoc_insertion
|
|||
return *this;
|
||||
}
|
||||
#endif
|
||||
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
|
||||
inline const ::std::string& unknown_fields() const {
|
||||
return _internal_metadata_.unknown_fields();
|
||||
}
|
||||
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
|
||||
inline ::std::string* mutable_unknown_fields() {
|
||||
return _internal_metadata_.mutable_unknown_fields();
|
||||
}
|
||||
|
||||
static const ::google::protobuf::Descriptor* descriptor();
|
||||
static const StackFrame_Data& default_instance();
|
||||
|
||||
enum SourceOrRefCase {
|
||||
|
@ -246,8 +242,8 @@ class StackFrame_Data : public ::google::protobuf::Message /* @@protoc_insertion
|
|||
inline StackFrame_Data* New() const PROTOBUF_FINAL { return New(NULL); }
|
||||
|
||||
StackFrame_Data* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
|
||||
void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
|
||||
void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
|
||||
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from)
|
||||
PROTOBUF_FINAL;
|
||||
void CopyFrom(const StackFrame_Data& from);
|
||||
void MergeFrom(const StackFrame_Data& from);
|
||||
void Clear() PROTOBUF_FINAL;
|
||||
|
@ -258,13 +254,12 @@ class StackFrame_Data : public ::google::protobuf::Message /* @@protoc_insertion
|
|||
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
|
||||
void SerializeWithCachedSizes(
|
||||
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
|
||||
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
|
||||
bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
|
||||
void DiscardUnknownFields();
|
||||
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
|
||||
private:
|
||||
void SharedCtor();
|
||||
void SharedDtor();
|
||||
void SetCachedSize(int size) const PROTOBUF_FINAL;
|
||||
void SetCachedSize(int size) const;
|
||||
void InternalSwap(StackFrame_Data* other);
|
||||
private:
|
||||
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
|
||||
|
@ -275,7 +270,7 @@ class StackFrame_Data : public ::google::protobuf::Message /* @@protoc_insertion
|
|||
}
|
||||
public:
|
||||
|
||||
::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
|
||||
::std::string GetTypeName() const PROTOBUF_FINAL;
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
|
@ -398,7 +393,7 @@ class StackFrame_Data : public ::google::protobuf::Message /* @@protoc_insertion
|
|||
void clear_FunctionDisplayNameOrRef();
|
||||
inline void clear_has_FunctionDisplayNameOrRef();
|
||||
|
||||
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
|
||||
::google::protobuf::internal::InternalMetadataWithArenaLite _internal_metadata_;
|
||||
::google::protobuf::internal::HasBits<1> _has_bits_;
|
||||
mutable int _cached_size_;
|
||||
::mozilla::devtools::protobuf::StackFrame* parent_;
|
||||
|
@ -423,7 +418,7 @@ class StackFrame_Data : public ::google::protobuf::Message /* @@protoc_insertion
|
|||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class StackFrame : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:mozilla.devtools.protobuf.StackFrame) */ {
|
||||
class StackFrame : public ::google::protobuf::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.devtools.protobuf.StackFrame) */ {
|
||||
public:
|
||||
StackFrame();
|
||||
virtual ~StackFrame();
|
||||
|
@ -449,14 +444,13 @@ class StackFrame : public ::google::protobuf::Message /* @@protoc_insertion_poin
|
|||
return *this;
|
||||
}
|
||||
#endif
|
||||
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
|
||||
inline const ::std::string& unknown_fields() const {
|
||||
return _internal_metadata_.unknown_fields();
|
||||
}
|
||||
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
|
||||
inline ::std::string* mutable_unknown_fields() {
|
||||
return _internal_metadata_.mutable_unknown_fields();
|
||||
}
|
||||
|
||||
static const ::google::protobuf::Descriptor* descriptor();
|
||||
static const StackFrame& default_instance();
|
||||
|
||||
enum StackFrameTypeCase {
|
||||
|
@ -482,8 +476,8 @@ class StackFrame : public ::google::protobuf::Message /* @@protoc_insertion_poin
|
|||
inline StackFrame* New() const PROTOBUF_FINAL { return New(NULL); }
|
||||
|
||||
StackFrame* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
|
||||
void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
|
||||
void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
|
||||
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from)
|
||||
PROTOBUF_FINAL;
|
||||
void CopyFrom(const StackFrame& from);
|
||||
void MergeFrom(const StackFrame& from);
|
||||
void Clear() PROTOBUF_FINAL;
|
||||
|
@ -494,13 +488,12 @@ class StackFrame : public ::google::protobuf::Message /* @@protoc_insertion_poin
|
|||
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
|
||||
void SerializeWithCachedSizes(
|
||||
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
|
||||
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
|
||||
bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
|
||||
void DiscardUnknownFields();
|
||||
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
|
||||
private:
|
||||
void SharedCtor();
|
||||
void SharedDtor();
|
||||
void SetCachedSize(int size) const PROTOBUF_FINAL;
|
||||
void SetCachedSize(int size) const;
|
||||
void InternalSwap(StackFrame* other);
|
||||
private:
|
||||
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
|
||||
|
@ -511,7 +504,7 @@ class StackFrame : public ::google::protobuf::Message /* @@protoc_insertion_poin
|
|||
}
|
||||
public:
|
||||
|
||||
::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
|
||||
::std::string GetTypeName() const PROTOBUF_FINAL;
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
|
@ -545,7 +538,7 @@ class StackFrame : public ::google::protobuf::Message /* @@protoc_insertion_poin
|
|||
void clear_StackFrameType();
|
||||
inline void clear_has_StackFrameType();
|
||||
|
||||
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
|
||||
::google::protobuf::internal::InternalMetadataWithArenaLite _internal_metadata_;
|
||||
::google::protobuf::internal::HasBits<1> _has_bits_;
|
||||
mutable int _cached_size_;
|
||||
union StackFrameTypeUnion {
|
||||
|
@ -559,7 +552,7 @@ class StackFrame : public ::google::protobuf::Message /* @@protoc_insertion_poin
|
|||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class Node : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:mozilla.devtools.protobuf.Node) */ {
|
||||
class Node : public ::google::protobuf::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.devtools.protobuf.Node) */ {
|
||||
public:
|
||||
Node();
|
||||
virtual ~Node();
|
||||
|
@ -585,14 +578,13 @@ class Node : public ::google::protobuf::Message /* @@protoc_insertion_point(clas
|
|||
return *this;
|
||||
}
|
||||
#endif
|
||||
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
|
||||
inline const ::std::string& unknown_fields() const {
|
||||
return _internal_metadata_.unknown_fields();
|
||||
}
|
||||
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
|
||||
inline ::std::string* mutable_unknown_fields() {
|
||||
return _internal_metadata_.mutable_unknown_fields();
|
||||
}
|
||||
|
||||
static const ::google::protobuf::Descriptor* descriptor();
|
||||
static const Node& default_instance();
|
||||
|
||||
enum TypeNameOrRefCase {
|
||||
|
@ -630,8 +622,8 @@ class Node : public ::google::protobuf::Message /* @@protoc_insertion_point(clas
|
|||
inline Node* New() const PROTOBUF_FINAL { return New(NULL); }
|
||||
|
||||
Node* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
|
||||
void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
|
||||
void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
|
||||
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from)
|
||||
PROTOBUF_FINAL;
|
||||
void CopyFrom(const Node& from);
|
||||
void MergeFrom(const Node& from);
|
||||
void Clear() PROTOBUF_FINAL;
|
||||
|
@ -642,13 +634,12 @@ class Node : public ::google::protobuf::Message /* @@protoc_insertion_point(clas
|
|||
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
|
||||
void SerializeWithCachedSizes(
|
||||
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
|
||||
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
|
||||
bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
|
||||
void DiscardUnknownFields();
|
||||
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
|
||||
private:
|
||||
void SharedCtor();
|
||||
void SharedDtor();
|
||||
void SetCachedSize(int size) const PROTOBUF_FINAL;
|
||||
void SetCachedSize(int size) const;
|
||||
void InternalSwap(Node* other);
|
||||
private:
|
||||
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
|
||||
|
@ -659,7 +650,7 @@ class Node : public ::google::protobuf::Message /* @@protoc_insertion_point(clas
|
|||
}
|
||||
public:
|
||||
|
||||
::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
|
||||
::std::string GetTypeName() const PROTOBUF_FINAL;
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
|
@ -805,7 +796,7 @@ class Node : public ::google::protobuf::Message /* @@protoc_insertion_point(clas
|
|||
void clear_ScriptFilenameOrRef();
|
||||
inline void clear_has_ScriptFilenameOrRef();
|
||||
|
||||
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
|
||||
::google::protobuf::internal::InternalMetadataWithArenaLite _internal_metadata_;
|
||||
::google::protobuf::internal::HasBits<1> _has_bits_;
|
||||
mutable int _cached_size_;
|
||||
::google::protobuf::RepeatedPtrField< ::mozilla::devtools::protobuf::Edge > edges_;
|
||||
|
@ -834,7 +825,7 @@ class Node : public ::google::protobuf::Message /* @@protoc_insertion_point(clas
|
|||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class Edge : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:mozilla.devtools.protobuf.Edge) */ {
|
||||
class Edge : public ::google::protobuf::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.devtools.protobuf.Edge) */ {
|
||||
public:
|
||||
Edge();
|
||||
virtual ~Edge();
|
||||
|
@ -860,14 +851,13 @@ class Edge : public ::google::protobuf::Message /* @@protoc_insertion_point(clas
|
|||
return *this;
|
||||
}
|
||||
#endif
|
||||
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
|
||||
inline const ::std::string& unknown_fields() const {
|
||||
return _internal_metadata_.unknown_fields();
|
||||
}
|
||||
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
|
||||
inline ::std::string* mutable_unknown_fields() {
|
||||
return _internal_metadata_.mutable_unknown_fields();
|
||||
}
|
||||
|
||||
static const ::google::protobuf::Descriptor* descriptor();
|
||||
static const Edge& default_instance();
|
||||
|
||||
enum EdgeNameOrRefCase {
|
||||
|
@ -893,8 +883,8 @@ class Edge : public ::google::protobuf::Message /* @@protoc_insertion_point(clas
|
|||
inline Edge* New() const PROTOBUF_FINAL { return New(NULL); }
|
||||
|
||||
Edge* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
|
||||
void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
|
||||
void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
|
||||
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from)
|
||||
PROTOBUF_FINAL;
|
||||
void CopyFrom(const Edge& from);
|
||||
void MergeFrom(const Edge& from);
|
||||
void Clear() PROTOBUF_FINAL;
|
||||
|
@ -905,13 +895,12 @@ class Edge : public ::google::protobuf::Message /* @@protoc_insertion_point(clas
|
|||
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
|
||||
void SerializeWithCachedSizes(
|
||||
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
|
||||
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
|
||||
bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
|
||||
void DiscardUnknownFields();
|
||||
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
|
||||
private:
|
||||
void SharedCtor();
|
||||
void SharedDtor();
|
||||
void SetCachedSize(int size) const PROTOBUF_FINAL;
|
||||
void SetCachedSize(int size) const;
|
||||
void InternalSwap(Edge* other);
|
||||
private:
|
||||
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
|
||||
|
@ -922,7 +911,7 @@ class Edge : public ::google::protobuf::Message /* @@protoc_insertion_point(clas
|
|||
}
|
||||
public:
|
||||
|
||||
::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
|
||||
::std::string GetTypeName() const PROTOBUF_FINAL;
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
|
@ -969,7 +958,7 @@ class Edge : public ::google::protobuf::Message /* @@protoc_insertion_point(clas
|
|||
void clear_EdgeNameOrRef();
|
||||
inline void clear_has_EdgeNameOrRef();
|
||||
|
||||
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
|
||||
::google::protobuf::internal::InternalMetadataWithArenaLite _internal_metadata_;
|
||||
::google::protobuf::internal::HasBits<1> _has_bits_;
|
||||
mutable int _cached_size_;
|
||||
::google::protobuf::uint64 referent_;
|
||||
|
|
|
@ -57,6 +57,9 @@
|
|||
// inline a messsage within another message and the child message must be
|
||||
// referenced by pointer. This leads to extra mallocs that we wish to avoid.
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
option optimize_for = LITE_RUNTIME;
|
||||
|
||||
package mozilla.devtools.protobuf;
|
||||
|
||||
|
|
|
@ -744,9 +744,10 @@ ChannelMediaResource::Resume()
|
|||
if (totalLength < 0 || GetOffset() < totalLength) {
|
||||
// There is (or may be) data to read, so start reading it.
|
||||
// Need to recreate the channel.
|
||||
Seek(mPendingSeekOffset != -1 ? mPendingSeekOffset : GetOffset(),
|
||||
false);
|
||||
int64_t offset =
|
||||
mPendingSeekOffset != -1 ? mPendingSeekOffset : GetOffset();
|
||||
mPendingSeekOffset = -1;
|
||||
Seek(offset, false);
|
||||
element->DownloadResumed();
|
||||
} else {
|
||||
// The channel remains dead. Do not notify DownloadResumed() which
|
||||
|
|
|
@ -197,6 +197,8 @@ skip-if = toolkit == 'android'
|
|||
skip-if = toolkit == 'android'
|
||||
[test_peerConnection_restartIceLocalAndRemoteRollback.html]
|
||||
skip-if = toolkit == 'android'
|
||||
[test_peerConnection_restartIceBadAnswer.html]
|
||||
skip-if = toolkit == 'android'
|
||||
[test_peerConnection_scaleResolution.html]
|
||||
skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
|
||||
[test_peerConnection_simulcastOffer.html]
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<script type="application/javascript" src="pc.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
createHTML({
|
||||
bug: "1413709",
|
||||
title: "Renegotiation: bad answer ICE credentials"
|
||||
});
|
||||
|
||||
var test;
|
||||
runNetworkTest(function (options) {
|
||||
test = new PeerConnectionTest(options);
|
||||
|
||||
addRenegotiation(test.chain,
|
||||
[
|
||||
function PC_LOCAL_ADD_SECOND_STREAM(test) {
|
||||
test.setMediaConstraints([{audio: true}],
|
||||
[]);
|
||||
return test.pcLocal.getAllUserMedia([{audio: true}]);
|
||||
},
|
||||
]
|
||||
);
|
||||
|
||||
// If the offerer hasn't indicated ICE restart, then an answer
|
||||
// arriving during renegotiation that has modified ICE credentials
|
||||
// should cause an error
|
||||
test.chain.replaceAfter("PC_LOCAL_GET_ANSWER",
|
||||
[
|
||||
function PC_LOCAL_REWRITE_REMOTE_SDP_ICE_CREDS(test) {
|
||||
test._remote_answer.sdp =
|
||||
test._remote_answer.sdp.replace(/a=ice-pwd:.*\r\n/g,
|
||||
"a=ice-pwd:bad-pwd\r\n")
|
||||
.replace(/a=ice-ufrag:.*\r\n/g,
|
||||
"a=ice-ufrag:bad-ufrag\r\n");
|
||||
},
|
||||
|
||||
function PC_LOCAL_EXPECT_SET_REMOTE_DESCRIPTION_FAIL(test) {
|
||||
return test.setRemoteDescription(test.pcLocal,
|
||||
test._remote_answer,
|
||||
STABLE)
|
||||
.then(() => ok(false, "setRemoteDescription must fail"),
|
||||
e => is(e.name, "InvalidSessionDescriptionError",
|
||||
"setRemoteDescription must fail and did"));
|
||||
}
|
||||
], 1 // replace after the second PC_LOCAL_GET_ANSWER
|
||||
);
|
||||
|
||||
test.setMediaConstraints([{audio: true}], []);
|
||||
test.run();
|
||||
});
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -7,6 +7,7 @@
|
|||
#include "mozilla/layers/SingleTiledContentClient.h"
|
||||
|
||||
#include "ClientTiledPaintedLayer.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
@ -201,31 +202,32 @@ ClientSingleTiledLayerBuffer::PaintThebes(const nsIntRegion& aNewValidRegion,
|
|||
if (!copyableRegion.IsEmpty()) {
|
||||
TextureClientAutoLock frontLock(discardedFrontBuffer,
|
||||
OpenMode::OPEN_READ);
|
||||
if (frontLock.Succeeded()) {
|
||||
Maybe<TextureClientAutoLock> frontOnWhiteLock;
|
||||
if (discardedFrontBufferOnWhite && backBufferOnWhite) {
|
||||
frontOnWhiteLock.emplace(discardedFrontBufferOnWhite, OpenMode::OPEN_READ);
|
||||
}
|
||||
|
||||
// Copy to both backBuffer and backBufferOnWhite if required, or copy to neither.
|
||||
if (frontLock.Succeeded() && (!frontOnWhiteLock || frontOnWhiteLock->Succeeded())) {
|
||||
for (auto iter = copyableRegion.RectIter(); !iter.Done(); iter.Next()) {
|
||||
const gfx::IntRect rect = iter.Get() - discardedValidRegion.GetBounds().TopLeft();
|
||||
const gfx::IntPoint dest = iter.Get().TopLeft() - mTilingOrigin;
|
||||
discardedFrontBuffer->CopyToTextureClient(backBuffer, &rect, &dest);
|
||||
}
|
||||
|
||||
if (discardedFrontBufferOnWhite && backBufferOnWhite) {
|
||||
TextureClientAutoLock frontOnWhiteLock(discardedFrontBufferOnWhite,
|
||||
OpenMode::OPEN_READ);
|
||||
if (frontOnWhiteLock.Succeeded()) {
|
||||
for (auto iter = copyableRegion.RectIter(); !iter.Done(); iter.Next()) {
|
||||
const gfx::IntRect rect = iter.Get() - discardedValidRegion.GetBounds().TopLeft();
|
||||
const gfx::IntPoint dest = iter.Get().TopLeft() - mTilingOrigin;
|
||||
|
||||
discardedFrontBufferOnWhite->CopyToTextureClient(backBufferOnWhite,
|
||||
&rect, &dest);
|
||||
}
|
||||
|
||||
TILING_LOG("TILING %p: Region copied from discarded frontbuffer %s\n", &mPaintedLayer, Stringify(copyableRegion).c_str());
|
||||
|
||||
// We don't need to repaint valid content that was just copied.
|
||||
paintRegion.SubOut(copyableRegion);
|
||||
if (frontOnWhiteLock) {
|
||||
for (auto iter = copyableRegion.RectIter(); !iter.Done(); iter.Next()) {
|
||||
const gfx::IntRect rect = iter.Get() - discardedValidRegion.GetBounds().TopLeft();
|
||||
const gfx::IntPoint dest = iter.Get().TopLeft() - mTilingOrigin;
|
||||
discardedFrontBufferOnWhite->CopyToTextureClient(backBufferOnWhite,
|
||||
&rect, &dest);
|
||||
}
|
||||
}
|
||||
|
||||
TILING_LOG("TILING %p: Region copied from discarded frontbuffer %s\n", &mPaintedLayer, Stringify(copyableRegion).c_str());
|
||||
|
||||
// We don't need to repaint valid content that was just copied.
|
||||
paintRegion.SubOut(copyableRegion);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
/* vim:set ts=2 sw=2 sts=2 et: */
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
option optimize_for = LITE_RUNTIME;
|
||||
|
||||
package mozilla.layers.layerscope;
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
# Ensure symbol versions of shared library on Linux do not conflict
|
||||
# with those in libxul.
|
||||
ifeq (Linux,$(OS_TARGET))
|
||||
OS_LDFLAGS += -Wl,-version-script,symverscript
|
||||
|
||||
symverscript: symverscript.in
|
||||
$(call py_action,preprocessor, \
|
||||
|
@ -29,7 +28,7 @@ check-vanilla-allocations-aggressive:
|
|||
$(PYTHON) $(topsrcdir)/config/check_vanilla_allocations.py --aggressive $(REAL_LIBRARY)
|
||||
|
||||
ifeq ($(OS_ARCH),Linux)
|
||||
ifeq (,$(filter -flto,$(COMPUTED_CFLAGS) $(COMPUTED_CXXFLAGS) $(LDFLAGS)))
|
||||
ifeq (,$(filter -flto,$(COMPUTED_CFLAGS) $(COMPUTED_CXXFLAGS) $(COMPUTED_LDFLAGS)))
|
||||
check:: check-vanilla-allocations
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -75,3 +75,8 @@ OS_LIBS += CONFIG['REALTIME_LIBS']
|
|||
NO_EXPAND_LIBS = True
|
||||
|
||||
DIST_INSTALL = True
|
||||
|
||||
# Ensure symbol versions of shared library on Linux do not conflict
|
||||
# with those in libxul.
|
||||
if CONFIG['OS_TARGET'] == 'Linux':
|
||||
LDFLAGS += ['-Wl,-version-script,symverscript']
|
||||
|
|
|
@ -1471,7 +1471,7 @@ fi # COMPILE_ENVIRONMENT
|
|||
|
||||
AC_SUBST_LIST(MOZ_FRAMEPTR_FLAGS)
|
||||
AC_SUBST_LIST(MOZ_OPTIMIZE_FLAGS)
|
||||
AC_SUBST(MOZ_OPTIMIZE_LDFLAGS)
|
||||
AC_SUBST_LIST(MOZ_OPTIMIZE_LDFLAGS)
|
||||
AC_SUBST_LIST(MOZ_PGO_OPTIMIZE_FLAGS)
|
||||
|
||||
dnl ========================================================
|
||||
|
@ -1920,7 +1920,7 @@ AC_SUBST(WINDRES)
|
|||
AC_SUBST(IMPLIB)
|
||||
AC_SUBST(FILTER)
|
||||
AC_SUBST(BIN_FLAGS)
|
||||
AC_SUBST(MOZ_DEBUG_LDFLAGS)
|
||||
AC_SUBST_LIST(MOZ_DEBUG_LDFLAGS)
|
||||
AC_SUBST(WARNINGS_AS_ERRORS)
|
||||
AC_SUBST(LIBICONV)
|
||||
|
||||
|
@ -1928,7 +1928,7 @@ AC_SUBST(ENABLE_STRIP)
|
|||
AC_SUBST(PKG_SKIP_STRIP)
|
||||
AC_SUBST(INCREMENTAL_LINKER)
|
||||
|
||||
AC_SUBST(MOZ_FIX_LINK_PATHS)
|
||||
AC_SUBST_LIST(MOZ_FIX_LINK_PATHS)
|
||||
|
||||
AC_SUBST(MOZ_POST_PROGRAM_COMMAND)
|
||||
|
||||
|
@ -1984,7 +1984,7 @@ AC_SUBST_LIST(OS_CXXFLAGS)
|
|||
AC_SUBST_LIST(OS_CPPFLAGS)
|
||||
AC_SUBST_LIST(OS_COMPILE_CFLAGS)
|
||||
AC_SUBST_LIST(OS_COMPILE_CXXFLAGS)
|
||||
AC_SUBST(OS_LDFLAGS)
|
||||
AC_SUBST_LIST(OS_LDFLAGS)
|
||||
AC_SUBST(OS_LIBS)
|
||||
|
||||
AC_SUBST(HOST_CC)
|
||||
|
|
|
@ -647,10 +647,10 @@ load 1275059.html
|
|||
load 1278007.html
|
||||
load 1278080.html
|
||||
load 1279814.html
|
||||
load large-border-radius-dashed.html
|
||||
load large-border-radius-dashed2.html
|
||||
load large-border-radius-dotted.html
|
||||
load large-border-radius-dotted2.html
|
||||
skip-if(webrender) load large-border-radius-dashed.html # see bug 1409243, not handled by webrender
|
||||
skip-if(webrender) load large-border-radius-dashed2.html # see bug 1409243, not handled by webrender
|
||||
skip-if(webrender) load large-border-radius-dotted.html # see bug 1409243, not handled by webrender
|
||||
skip-if(webrender) load large-border-radius-dotted2.html # see bug 1409243, not handled by webrender
|
||||
load 1278461-1.html
|
||||
load 1278461-2.html
|
||||
load 1281102.html
|
||||
|
|
|
@ -3591,11 +3591,6 @@ nsCSSBorderRenderer::CanCreateWebRenderCommands()
|
|||
if (mCompositeColors[i] != nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mBorderStyles[i] == NS_STYLE_BORDER_STYLE_DOTTED ||
|
||||
mBorderStyles[i] == NS_STYLE_BORDER_STYLE_DASHED) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#ifndef mozilla_layout_printing_DrawEventRecorder_h
|
||||
#define mozilla_layout_printing_DrawEventRecorder_h
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "mozilla/gfx/DrawEventRecorder.h"
|
||||
#include "mozilla/gfx/RecordingTypes.h"
|
||||
#include "prio.h"
|
||||
|
@ -15,18 +17,28 @@ namespace mozilla {
|
|||
namespace layout {
|
||||
|
||||
class PRFileDescStream : public mozilla::gfx::EventStream {
|
||||
// Most writes, as seen in the print IPC use case, are very small (<32 bytes),
|
||||
// with a small number of very large (>40KB) writes. Writes larger than this
|
||||
// value are not buffered.
|
||||
static const size_t kBufferSize = 1024;
|
||||
public:
|
||||
PRFileDescStream() : mFd(nullptr), mGood(true) {}
|
||||
PRFileDescStream() : mFd(nullptr), mBuffer(nullptr), mBufferPos(0),
|
||||
mGood(true) {}
|
||||
|
||||
void OpenFD(PRFileDesc* aFd) {
|
||||
MOZ_ASSERT(!IsOpen());
|
||||
mFd = aFd;
|
||||
mGood = true;
|
||||
mBuffer.reset(new uint8_t[kBufferSize]);
|
||||
mBufferPos = 0;
|
||||
}
|
||||
|
||||
void Close() {
|
||||
Flush();
|
||||
PR_Close(mFd);
|
||||
mFd = nullptr;
|
||||
mBuffer.reset();
|
||||
mBufferPos = 0;
|
||||
}
|
||||
|
||||
bool IsOpen() {
|
||||
|
@ -34,23 +46,46 @@ public:
|
|||
}
|
||||
|
||||
void Flush() {
|
||||
// For std::ostream this flushes any internal buffers. PRFileDesc's IO isn't
|
||||
// buffered, so nothing to do here.
|
||||
// We need to be API compatible with std::ostream, and so we silently handle
|
||||
// flushes on a closed FD.
|
||||
if (IsOpen() && mBufferPos > 0) {
|
||||
PR_Write(mFd, static_cast<const void*>(mBuffer.get()), mBufferPos);
|
||||
mBufferPos = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void Seek(PRInt32 aOffset, PRSeekWhence aWhence) {
|
||||
Flush();
|
||||
PR_Seek(mFd, aOffset, aWhence);
|
||||
}
|
||||
|
||||
void write(const char* aData, size_t aSize) {
|
||||
// We need to be API compatible with std::ostream, and so we silently handle
|
||||
// writes on a closed FD.
|
||||
// See comment in Flush().
|
||||
if (IsOpen()) {
|
||||
PR_Write(mFd, static_cast<const void*>(aData), aSize);
|
||||
// If we're writing more data than could ever fit in our buffer, flush the
|
||||
// buffer and write directly.
|
||||
if (aSize > kBufferSize) {
|
||||
Flush();
|
||||
PR_Write(mFd, static_cast<const void*>(aData), aSize);
|
||||
// If our write could fit in our buffer, but doesn't because the buffer is
|
||||
// partially full, write to the buffer, flush the buffer, and then write
|
||||
// the rest of the data to the buffer.
|
||||
} else if (aSize > AvailableBufferSpace()) {
|
||||
size_t length = AvailableBufferSpace();
|
||||
WriteToBuffer(aData, length);
|
||||
Flush();
|
||||
|
||||
MOZ_ASSERT(aSize <= kBufferSize);
|
||||
WriteToBuffer(aData + length, aSize - length);
|
||||
// Write fits in the buffer.
|
||||
} else {
|
||||
WriteToBuffer(aData, aSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void read(char* aOut, size_t aSize) {
|
||||
Flush();
|
||||
PRInt32 res = PR_Read(mFd, static_cast<void*>(aOut), aSize);
|
||||
mGood = res >= 0 && ((size_t)res == aSize);
|
||||
}
|
||||
|
@ -60,7 +95,19 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
size_t AvailableBufferSpace() {
|
||||
return kBufferSize - mBufferPos;
|
||||
}
|
||||
|
||||
void WriteToBuffer(const char* aData, size_t aSize) {
|
||||
MOZ_ASSERT(aSize <= AvailableBufferSpace());
|
||||
memcpy(mBuffer.get() + mBufferPos, aData, aSize);
|
||||
mBufferPos += aSize;
|
||||
}
|
||||
|
||||
PRFileDesc* mFd;
|
||||
std::unique_ptr<uint8_t[]> mBuffer;
|
||||
size_t mBufferPos;
|
||||
bool mGood;
|
||||
};
|
||||
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
|
||||
# XXX: We mark fails-if to these tests for now to enable styled border in WR.
|
||||
# We should remove them after Bug 1399485 is fixed.
|
||||
fuzzy(80,1500) == border-dotted-interaction.html masked.html
|
||||
fuzzy(80,1500) == border-dotted-no-radius.html masked.html
|
||||
fuzzy(80,1500) fails-if(webrender) == border-dotted-interaction.html masked.html
|
||||
fuzzy(80,1500) fails-if(webrender) == border-dotted-no-radius.html masked.html
|
||||
fuzzy(80,1500) fails-if(webrender) == border-dotted-radius.html masked.html
|
||||
fuzzy(80,1500) == border-dashed-no-radius.html masked.html
|
||||
fuzzy(80,1500) fails-if(webrender) == border-dashed-no-radius.html masked.html
|
||||
fuzzy(80,1500) fails-if(webrender) == border-dashed-radius.html masked.html
|
||||
fuzzy(80,1500) fails-if(webrender) == border-mixed.html masked.html
|
||||
fuzzy(80,1500) fails-if(webrender) == border-dashed-non-integer.html masked.html
|
||||
fuzzy(80,1500) fails-if(webrender) == border-dashed-radius-zoom.html masked-zoom.html
|
||||
fuzzy(80,1500) == border-dotted-radius-zero.html masked-small.html
|
||||
fuzzy(80,1500) fails-if(webrender) == border-dotted-radius-zero.html masked-small.html
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
default-preferences pref(layout.css.box-decoration-break.enabled,true)
|
||||
|
||||
== box-decoration-break-1.html box-decoration-break-1-ref.html
|
||||
fuzzy(1,20) fuzzy-if(skiaContent,1,700) fuzzy-if(webrender,4-4,292-292) == box-decoration-break-with-inset-box-shadow-1.html box-decoration-break-with-inset-box-shadow-1-ref.html
|
||||
fuzzy(1,20) fuzzy-if(skiaContent,1,700) fuzzy-if(webrender,6-6,250-250) == box-decoration-break-with-inset-box-shadow-1.html box-decoration-break-with-inset-box-shadow-1-ref.html
|
||||
fuzzy(45,460) fuzzy-if(skiaContent,57,439) fuzzy-if(Android,57,1330) fuzzy-if(styloVsGecko,45,1410) == box-decoration-break-with-outset-box-shadow-1.html box-decoration-break-with-outset-box-shadow-1-ref.html # Bug 1386543
|
||||
random-if(!gtkWidget) == box-decoration-break-border-image.html box-decoration-break-border-image-ref.html
|
||||
== box-decoration-break-block-border-padding.html box-decoration-break-block-border-padding-ref.html
|
||||
|
|
|
@ -83,9 +83,30 @@ protected:
|
|||
struct TransportData {
|
||||
std::string mIceUfrag;
|
||||
std::string mIcePwd;
|
||||
int iceCredentialSerial;
|
||||
std::map<std::string, std::vector<uint8_t> > mFingerprints;
|
||||
};
|
||||
|
||||
void
|
||||
GenerateNewIceCredentials(const JsepSessionImpl& session,
|
||||
TransportData& tdata)
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << session.GetName() << "-" << ++tdata.iceCredentialSerial;
|
||||
|
||||
// Values here semi-borrowed from JSEP draft.
|
||||
tdata.mIceUfrag = ostr.str() + "-ufrag";
|
||||
tdata.mIcePwd = ostr.str() + "-1234567890";
|
||||
}
|
||||
|
||||
void
|
||||
ModifyOffererIceCredentials()
|
||||
{
|
||||
GenerateNewIceCredentials(*mSessionOff, *mOffererTransport);
|
||||
mSessionOff->SetIceCredentials(mOffererTransport->mIceUfrag,
|
||||
mOffererTransport->mIcePwd);
|
||||
}
|
||||
|
||||
void
|
||||
AddDtlsFingerprint(const std::string& alg, JsepSessionImpl& session,
|
||||
TransportData& tdata)
|
||||
|
@ -100,9 +121,8 @@ protected:
|
|||
void
|
||||
AddTransportData(JsepSessionImpl& session, TransportData& tdata)
|
||||
{
|
||||
// Values here semi-borrowed from JSEP draft.
|
||||
tdata.mIceUfrag = session.GetName() + "-ufrag";
|
||||
tdata.mIcePwd = session.GetName() + "-1234567890";
|
||||
tdata.iceCredentialSerial = 0;
|
||||
GenerateNewIceCredentials(session, tdata);
|
||||
session.SetIceCredentials(tdata.mIceUfrag, tdata.mIcePwd);
|
||||
AddDtlsFingerprint("sha-1", session, tdata);
|
||||
AddDtlsFingerprint("sha-256", session, tdata);
|
||||
|
@ -524,6 +544,14 @@ protected:
|
|||
{
|
||||
JsepAnswerOptions options;
|
||||
std::string answer;
|
||||
|
||||
// detect ice restart and generate new ice credentials (like
|
||||
// PeerConnectionImpl does).
|
||||
if (mSessionAns->RemoteIceIsRestarting()) {
|
||||
GenerateNewIceCredentials(*mSessionAns, *mAnswererTransport);
|
||||
mSessionAns->SetIceCredentials(mAnswererTransport->mIceUfrag,
|
||||
mAnswererTransport->mIcePwd);
|
||||
}
|
||||
nsresult rv = mSessionAns->CreateAnswer(options, &answer);
|
||||
EXPECT_EQ(NS_OK, rv);
|
||||
|
||||
|
@ -4103,6 +4131,93 @@ TEST_F(JsepSessionTest, TestIceOptions)
|
|||
ASSERT_EQ("trickle", mSessionAns->GetIceOptions()[0]);
|
||||
}
|
||||
|
||||
TEST_F(JsepSessionTest, TestIceRestart)
|
||||
{
|
||||
AddTracks(*mSessionOff, "audio");
|
||||
AddTracks(*mSessionAns, "audio");
|
||||
std::string offer = CreateOffer();
|
||||
SetLocalOffer(offer, CHECK_SUCCESS);
|
||||
SetRemoteOffer(offer, CHECK_SUCCESS);
|
||||
std::string answer = CreateAnswer();
|
||||
SetLocalAnswer(answer, CHECK_SUCCESS);
|
||||
SetRemoteAnswer(answer, CHECK_SUCCESS);
|
||||
|
||||
JsepOfferOptions options;
|
||||
options.mIceRestart = Some(true);
|
||||
ModifyOffererIceCredentials();
|
||||
|
||||
std::string reoffer = CreateOffer(Some(options));
|
||||
SetLocalOffer(reoffer, CHECK_SUCCESS);
|
||||
SetRemoteOffer(reoffer, CHECK_SUCCESS);
|
||||
std::string reanswer = CreateAnswer();
|
||||
SetLocalAnswer(reanswer, CHECK_SUCCESS);
|
||||
SetRemoteAnswer(reanswer, CHECK_SUCCESS);
|
||||
|
||||
UniquePtr<Sdp> parsedOffer(Parse(offer));
|
||||
ASSERT_EQ(1U, parsedOffer->GetMediaSectionCount());
|
||||
UniquePtr<Sdp> parsedReoffer(Parse(reoffer));
|
||||
ASSERT_EQ(1U, parsedReoffer->GetMediaSectionCount());
|
||||
|
||||
UniquePtr<Sdp> parsedAnswer(Parse(answer));
|
||||
ASSERT_EQ(1U, parsedAnswer->GetMediaSectionCount());
|
||||
UniquePtr<Sdp> parsedReanswer(Parse(reanswer));
|
||||
ASSERT_EQ(1U, parsedReanswer->GetMediaSectionCount());
|
||||
|
||||
// verify ice pwd/ufrag are present in offer/answer and reoffer/reanswer
|
||||
auto& offerMediaAttrs = parsedOffer->GetMediaSection(0).GetAttributeList();
|
||||
ASSERT_TRUE(offerMediaAttrs.HasAttribute(SdpAttribute::kIcePwdAttribute));
|
||||
ASSERT_TRUE(offerMediaAttrs.HasAttribute(SdpAttribute::kIceUfragAttribute));
|
||||
|
||||
auto& reofferMediaAttrs = parsedReoffer->GetMediaSection(0).GetAttributeList();
|
||||
ASSERT_TRUE(reofferMediaAttrs.HasAttribute(SdpAttribute::kIcePwdAttribute));
|
||||
ASSERT_TRUE(reofferMediaAttrs.HasAttribute(SdpAttribute::kIceUfragAttribute));
|
||||
|
||||
auto& answerMediaAttrs = parsedAnswer->GetMediaSection(0).GetAttributeList();
|
||||
ASSERT_TRUE(answerMediaAttrs.HasAttribute(SdpAttribute::kIcePwdAttribute));
|
||||
ASSERT_TRUE(answerMediaAttrs.HasAttribute(SdpAttribute::kIceUfragAttribute));
|
||||
|
||||
auto& reanswerMediaAttrs = parsedReanswer->GetMediaSection(0).GetAttributeList();
|
||||
ASSERT_TRUE(reanswerMediaAttrs.HasAttribute(SdpAttribute::kIcePwdAttribute));
|
||||
ASSERT_TRUE(reanswerMediaAttrs.HasAttribute(SdpAttribute::kIceUfragAttribute));
|
||||
|
||||
// make sure offer/reoffer ice pwd/ufrag changed on ice restart
|
||||
ASSERT_NE(offerMediaAttrs.GetIcePwd().c_str(),
|
||||
reofferMediaAttrs.GetIcePwd().c_str());
|
||||
ASSERT_NE(offerMediaAttrs.GetIceUfrag().c_str(),
|
||||
reofferMediaAttrs.GetIceUfrag().c_str());
|
||||
|
||||
// make sure answer/reanswer ice pwd/ufrag changed on ice restart
|
||||
ASSERT_NE(answerMediaAttrs.GetIcePwd().c_str(),
|
||||
reanswerMediaAttrs.GetIcePwd().c_str());
|
||||
ASSERT_NE(answerMediaAttrs.GetIceUfrag().c_str(),
|
||||
reanswerMediaAttrs.GetIceUfrag().c_str());
|
||||
}
|
||||
|
||||
TEST_F(JsepSessionTest, TestAnswererIndicatingIceRestart)
|
||||
{
|
||||
AddTracks(*mSessionOff, "audio");
|
||||
AddTracks(*mSessionAns, "audio");
|
||||
std::string offer = CreateOffer();
|
||||
SetLocalOffer(offer, CHECK_SUCCESS);
|
||||
SetRemoteOffer(offer, CHECK_SUCCESS);
|
||||
std::string answer = CreateAnswer();
|
||||
SetLocalAnswer(answer, CHECK_SUCCESS);
|
||||
SetRemoteAnswer(answer, CHECK_SUCCESS);
|
||||
|
||||
// reoffer, but we'll improperly indicate an ice restart in the answer by
|
||||
// modifying the ice pwd and ufrag
|
||||
std::string reoffer = CreateOffer();
|
||||
SetLocalOffer(reoffer, CHECK_SUCCESS);
|
||||
SetRemoteOffer(reoffer, CHECK_SUCCESS);
|
||||
std::string reanswer = CreateAnswer();
|
||||
|
||||
// change the ice pwd and ufrag
|
||||
ReplaceInSdp(&reanswer, "Answerer-1-", "bad-2-");
|
||||
SetLocalAnswer(reanswer, CHECK_SUCCESS);
|
||||
nsresult rv = mSessionOff->SetRemoteDescription(kJsepSdpAnswer, reanswer);
|
||||
ASSERT_NE(NS_OK, rv); // NS_ERROR_INVALID_ARG
|
||||
}
|
||||
|
||||
TEST_F(JsepSessionTest, TestExtmap)
|
||||
{
|
||||
AddTracks(*mSessionOff, "audio");
|
||||
|
|
|
@ -462,12 +462,6 @@ static Mutex gInitLock = { PTHREAD_MUTEX_INITIALIZER };
|
|||
// ***************************************************************************
|
||||
// Statistics data structures.
|
||||
|
||||
struct malloc_bin_stats_t
|
||||
{
|
||||
// Current number of runs in this bin.
|
||||
unsigned long curruns;
|
||||
};
|
||||
|
||||
struct arena_stats_t
|
||||
{
|
||||
// Number of bytes currently mapped.
|
||||
|
@ -809,32 +803,32 @@ struct arena_bin_t
|
|||
{
|
||||
// Current run being used to service allocations of this bin's size
|
||||
// class.
|
||||
arena_run_t* runcur;
|
||||
arena_run_t* mCurrentRun;
|
||||
|
||||
// Tree of non-full runs. This tree is used when looking for an
|
||||
// existing run when runcur is no longer usable. We choose the
|
||||
// existing run when mCurrentRun is no longer usable. We choose the
|
||||
// non-full run that is lowest in memory; this policy tends to keep
|
||||
// objects packed well, and it can also help reduce the number of
|
||||
// almost-empty chunks.
|
||||
RedBlackTree<arena_chunk_map_t, ArenaRunTreeTrait> runs;
|
||||
RedBlackTree<arena_chunk_map_t, ArenaRunTreeTrait> mNonFullRuns;
|
||||
|
||||
// Size of regions in a run for this bin's size class.
|
||||
size_t reg_size;
|
||||
// Bin's size class.
|
||||
size_t mSizeClass;
|
||||
|
||||
// Total size of a run for this bin's size class.
|
||||
size_t run_size;
|
||||
size_t mRunSize;
|
||||
|
||||
// Total number of regions in a run for this bin's size class.
|
||||
uint32_t nregs;
|
||||
uint32_t mRunNumRegions;
|
||||
|
||||
// Number of elements in a run's regs_mask for this bin's size class.
|
||||
uint32_t regs_mask_nelms;
|
||||
uint32_t mRunNumRegionsMask;
|
||||
|
||||
// Offset of first region in a run for this bin's size class.
|
||||
uint32_t reg0_offset;
|
||||
uint32_t mRunFirstRegionOffset;
|
||||
|
||||
// Bin statistics.
|
||||
malloc_bin_stats_t stats;
|
||||
// Current number of runs in this bin, full or otherwise.
|
||||
unsigned long mNumRuns;
|
||||
};
|
||||
|
||||
struct arena_t
|
||||
|
@ -2208,7 +2202,7 @@ arena_run_reg_alloc(arena_run_t* run, arena_bin_t* bin)
|
|||
unsigned i, mask, bit, regind;
|
||||
|
||||
MOZ_DIAGNOSTIC_ASSERT(run->magic == ARENA_RUN_MAGIC);
|
||||
MOZ_ASSERT(run->regs_minelm < bin->regs_mask_nelms);
|
||||
MOZ_ASSERT(run->regs_minelm < bin->mRunNumRegionsMask);
|
||||
|
||||
// Move the first check outside the loop, so that run->regs_minelm can
|
||||
// be updated unconditionally, without the possibility of updating it
|
||||
|
@ -2220,9 +2214,9 @@ arena_run_reg_alloc(arena_run_t* run, arena_bin_t* bin)
|
|||
bit = CountTrailingZeroes32(mask);
|
||||
|
||||
regind = ((i << (LOG2(sizeof(int)) + 3)) + bit);
|
||||
MOZ_ASSERT(regind < bin->nregs);
|
||||
ret =
|
||||
(void*)(((uintptr_t)run) + bin->reg0_offset + (bin->reg_size * regind));
|
||||
MOZ_ASSERT(regind < bin->mRunNumRegions);
|
||||
ret = (void*)(((uintptr_t)run) + bin->mRunFirstRegionOffset +
|
||||
(bin->mSizeClass * regind));
|
||||
|
||||
// Clear bit.
|
||||
mask ^= (1U << bit);
|
||||
|
@ -2231,16 +2225,16 @@ arena_run_reg_alloc(arena_run_t* run, arena_bin_t* bin)
|
|||
return ret;
|
||||
}
|
||||
|
||||
for (i++; i < bin->regs_mask_nelms; i++) {
|
||||
for (i++; i < bin->mRunNumRegionsMask; i++) {
|
||||
mask = run->regs_mask[i];
|
||||
if (mask != 0) {
|
||||
// Usable allocation found.
|
||||
bit = CountTrailingZeroes32(mask);
|
||||
|
||||
regind = ((i << (LOG2(sizeof(int)) + 3)) + bit);
|
||||
MOZ_ASSERT(regind < bin->nregs);
|
||||
ret =
|
||||
(void*)(((uintptr_t)run) + bin->reg0_offset + (bin->reg_size * regind));
|
||||
MOZ_ASSERT(regind < bin->mRunNumRegions);
|
||||
ret = (void*)(((uintptr_t)run) + bin->mRunFirstRegionOffset +
|
||||
(bin->mSizeClass * regind));
|
||||
|
||||
// Clear bit.
|
||||
mask ^= (1U << bit);
|
||||
|
@ -2303,7 +2297,8 @@ arena_run_reg_dalloc(arena_run_t* run, arena_bin_t* bin, void* ptr, size_t size)
|
|||
|
||||
// Avoid doing division with a variable divisor if possible. Using
|
||||
// actual division here can reduce allocator throughput by over 20%!
|
||||
diff = (unsigned)((uintptr_t)ptr - (uintptr_t)run - bin->reg0_offset);
|
||||
diff =
|
||||
(unsigned)((uintptr_t)ptr - (uintptr_t)run - bin->mRunFirstRegionOffset);
|
||||
if ((size & (size - 1)) == 0) {
|
||||
// log2_table allows fast division of a power of two in the
|
||||
// [1..128] range.
|
||||
|
@ -2343,7 +2338,7 @@ arena_run_reg_dalloc(arena_run_t* run, arena_bin_t* bin, void* ptr, size_t size)
|
|||
regind = diff / size;
|
||||
};
|
||||
MOZ_DIAGNOSTIC_ASSERT(diff == regind * size);
|
||||
MOZ_DIAGNOSTIC_ASSERT(regind < bin->nregs);
|
||||
MOZ_DIAGNOSTIC_ASSERT(regind < bin->mRunNumRegions);
|
||||
|
||||
elm = regind >> (LOG2(sizeof(int)) + 3);
|
||||
if (elm < run->regs_minelm) {
|
||||
|
@ -2693,7 +2688,7 @@ arena_t::DallocRun(arena_run_t* aRun, bool aDirty)
|
|||
if ((chunk->map[run_ind].bits & CHUNK_MAP_LARGE) != 0) {
|
||||
size = chunk->map[run_ind].bits & ~pagesize_mask;
|
||||
} else {
|
||||
size = aRun->bin->run_size;
|
||||
size = aRun->bin->mRunSize;
|
||||
}
|
||||
run_pages = (size >> pagesize_2pow);
|
||||
|
||||
|
@ -2830,33 +2825,33 @@ arena_t::GetNonFullBinRun(arena_bin_t* aBin)
|
|||
unsigned i, remainder;
|
||||
|
||||
// Look for a usable run.
|
||||
mapelm = aBin->runs.First();
|
||||
mapelm = aBin->mNonFullRuns.First();
|
||||
if (mapelm) {
|
||||
// run is guaranteed to have available space.
|
||||
aBin->runs.Remove(mapelm);
|
||||
aBin->mNonFullRuns.Remove(mapelm);
|
||||
run = (arena_run_t*)(mapelm->bits & ~pagesize_mask);
|
||||
return run;
|
||||
}
|
||||
// No existing runs have any space available.
|
||||
|
||||
// Allocate a new run.
|
||||
run = AllocRun(aBin, aBin->run_size, false, false);
|
||||
run = AllocRun(aBin, aBin->mRunSize, false, false);
|
||||
if (!run) {
|
||||
return nullptr;
|
||||
}
|
||||
// Don't initialize if a race in arena_t::RunAlloc() allowed an existing
|
||||
// run to become usable.
|
||||
if (run == aBin->runcur) {
|
||||
if (run == aBin->mCurrentRun) {
|
||||
return run;
|
||||
}
|
||||
|
||||
// Initialize run internals.
|
||||
run->bin = aBin;
|
||||
|
||||
for (i = 0; i < aBin->regs_mask_nelms - 1; i++) {
|
||||
for (i = 0; i < aBin->mRunNumRegionsMask - 1; i++) {
|
||||
run->regs_mask[i] = UINT_MAX;
|
||||
}
|
||||
remainder = aBin->nregs & ((1U << (LOG2(sizeof(int)) + 3)) - 1);
|
||||
remainder = aBin->mRunNumRegions & ((1U << (LOG2(sizeof(int)) + 3)) - 1);
|
||||
if (remainder == 0) {
|
||||
run->regs_mask[i] = UINT_MAX;
|
||||
} else {
|
||||
|
@ -2867,16 +2862,16 @@ arena_t::GetNonFullBinRun(arena_bin_t* aBin)
|
|||
|
||||
run->regs_minelm = 0;
|
||||
|
||||
run->nfree = aBin->nregs;
|
||||
run->nfree = aBin->mRunNumRegions;
|
||||
#if defined(MOZ_DIAGNOSTIC_ASSERT_ENABLED)
|
||||
run->magic = ARENA_RUN_MAGIC;
|
||||
#endif
|
||||
|
||||
aBin->stats.curruns++;
|
||||
aBin->mNumRuns++;
|
||||
return run;
|
||||
}
|
||||
|
||||
// bin->runcur must have space available before this function is called.
|
||||
// bin->mCurrentRun must have space available before this function is called.
|
||||
void*
|
||||
arena_t::MallocBinEasy(arena_bin_t* aBin, arena_run_t* aRun)
|
||||
{
|
||||
|
@ -2892,28 +2887,28 @@ arena_t::MallocBinEasy(arena_bin_t* aBin, arena_run_t* aRun)
|
|||
return ret;
|
||||
}
|
||||
|
||||
// Re-fill aBin->runcur, then call arena_t::MallocBinEasy().
|
||||
// Re-fill aBin->mCurrentRun, then call arena_t::MallocBinEasy().
|
||||
void*
|
||||
arena_t::MallocBinHard(arena_bin_t* aBin)
|
||||
{
|
||||
aBin->runcur = GetNonFullBinRun(aBin);
|
||||
if (!aBin->runcur) {
|
||||
aBin->mCurrentRun = GetNonFullBinRun(aBin);
|
||||
if (!aBin->mCurrentRun) {
|
||||
return nullptr;
|
||||
}
|
||||
MOZ_DIAGNOSTIC_ASSERT(aBin->runcur->magic == ARENA_RUN_MAGIC);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aBin->runcur->nfree > 0);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aBin->mCurrentRun->magic == ARENA_RUN_MAGIC);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aBin->mCurrentRun->nfree > 0);
|
||||
|
||||
return MallocBinEasy(aBin, aBin->runcur);
|
||||
return MallocBinEasy(aBin, aBin->mCurrentRun);
|
||||
}
|
||||
|
||||
// Calculate bin->run_size such that it meets the following constraints:
|
||||
// Calculate bin->mRunSize such that it meets the following constraints:
|
||||
//
|
||||
// *) bin->run_size >= min_run_size
|
||||
// *) bin->run_size <= arena_maxclass
|
||||
// *) bin->run_size <= RUN_MAX_SMALL
|
||||
// *) bin->mRunSize >= min_run_size
|
||||
// *) bin->mRunSize <= arena_maxclass
|
||||
// *) bin->mRunSize <= RUN_MAX_SMALL
|
||||
// *) run header overhead <= RUN_MAX_OVRHD (or header overhead relaxed).
|
||||
//
|
||||
// bin->nregs, bin->regs_mask_nelms, and bin->reg0_offset are
|
||||
// bin->mRunNumRegions, bin->mRunNumRegionsMask, and bin->mRunFirstRegionOffset are
|
||||
// also calculated here, since these settings are all interdependent.
|
||||
static size_t
|
||||
arena_bin_run_size_calc(arena_bin_t* bin, size_t min_run_size)
|
||||
|
@ -2925,7 +2920,7 @@ arena_bin_run_size_calc(arena_bin_t* bin, size_t min_run_size)
|
|||
MOZ_ASSERT(min_run_size >= pagesize);
|
||||
MOZ_ASSERT(min_run_size <= arena_maxclass);
|
||||
|
||||
// Calculate known-valid settings before entering the run_size
|
||||
// Calculate known-valid settings before entering the mRunSize
|
||||
// expansion loop, so that the first part of the loop always copies
|
||||
// valid settings.
|
||||
//
|
||||
|
@ -2934,18 +2929,18 @@ arena_bin_run_size_calc(arena_bin_t* bin, size_t min_run_size)
|
|||
// would be quite messy, since there is an interdependency between the
|
||||
// header's mask length and the number of regions.
|
||||
try_run_size = min_run_size;
|
||||
try_nregs = ((try_run_size - sizeof(arena_run_t)) / bin->reg_size) +
|
||||
try_nregs = ((try_run_size - sizeof(arena_run_t)) / bin->mSizeClass) +
|
||||
1; // Counter-act try_nregs-- in loop.
|
||||
do {
|
||||
try_nregs--;
|
||||
try_mask_nelms =
|
||||
(try_nregs >> (LOG2(sizeof(int)) + 3)) +
|
||||
((try_nregs & ((1U << (LOG2(sizeof(int)) + 3)) - 1)) ? 1 : 0);
|
||||
try_reg0_offset = try_run_size - (try_nregs * bin->reg_size);
|
||||
try_reg0_offset = try_run_size - (try_nregs * bin->mSizeClass);
|
||||
} while (sizeof(arena_run_t) + (sizeof(unsigned) * (try_mask_nelms - 1)) >
|
||||
try_reg0_offset);
|
||||
|
||||
// run_size expansion loop.
|
||||
// mRunSize expansion loop.
|
||||
do {
|
||||
// Copy valid settings before trying more aggressive settings.
|
||||
good_run_size = try_run_size;
|
||||
|
@ -2955,18 +2950,18 @@ arena_bin_run_size_calc(arena_bin_t* bin, size_t min_run_size)
|
|||
|
||||
// Try more aggressive settings.
|
||||
try_run_size += pagesize;
|
||||
try_nregs = ((try_run_size - sizeof(arena_run_t)) / bin->reg_size) +
|
||||
try_nregs = ((try_run_size - sizeof(arena_run_t)) / bin->mSizeClass) +
|
||||
1; // Counter-act try_nregs-- in loop.
|
||||
do {
|
||||
try_nregs--;
|
||||
try_mask_nelms =
|
||||
(try_nregs >> (LOG2(sizeof(int)) + 3)) +
|
||||
((try_nregs & ((1U << (LOG2(sizeof(int)) + 3)) - 1)) ? 1 : 0);
|
||||
try_reg0_offset = try_run_size - (try_nregs * bin->reg_size);
|
||||
try_reg0_offset = try_run_size - (try_nregs * bin->mSizeClass);
|
||||
} while (sizeof(arena_run_t) + (sizeof(unsigned) * (try_mask_nelms - 1)) >
|
||||
try_reg0_offset);
|
||||
} while (try_run_size <= arena_maxclass &&
|
||||
RUN_MAX_OVRHD * (bin->reg_size << 3) > RUN_MAX_OVRHD_RELAX &&
|
||||
RUN_MAX_OVRHD * (bin->mSizeClass << 3) > RUN_MAX_OVRHD_RELAX &&
|
||||
(try_reg0_offset << RUN_BFP) > RUN_MAX_OVRHD * try_run_size);
|
||||
|
||||
MOZ_ASSERT(sizeof(arena_run_t) + (sizeof(unsigned) * (good_mask_nelms - 1)) <=
|
||||
|
@ -2974,10 +2969,10 @@ arena_bin_run_size_calc(arena_bin_t* bin, size_t min_run_size)
|
|||
MOZ_ASSERT((good_mask_nelms << (LOG2(sizeof(int)) + 3)) >= good_nregs);
|
||||
|
||||
// Copy final settings.
|
||||
bin->run_size = good_run_size;
|
||||
bin->nregs = good_nregs;
|
||||
bin->regs_mask_nelms = good_mask_nelms;
|
||||
bin->reg0_offset = good_reg0_offset;
|
||||
bin->mRunSize = good_run_size;
|
||||
bin->mRunNumRegions = good_nregs;
|
||||
bin->mRunNumRegionsMask = good_mask_nelms;
|
||||
bin->mRunFirstRegionOffset = good_reg0_offset;
|
||||
|
||||
return good_run_size;
|
||||
}
|
||||
|
@ -3006,11 +3001,11 @@ arena_t::MallocSmall(size_t aSize, bool aZero)
|
|||
bin = &mBins[ntbins + nqbins +
|
||||
(FloorLog2(aSize >> SMALL_MAX_2POW_DEFAULT) - 1)];
|
||||
}
|
||||
MOZ_DIAGNOSTIC_ASSERT(aSize == bin->reg_size);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aSize == bin->mSizeClass);
|
||||
|
||||
{
|
||||
MutexAutoLock lock(mLock);
|
||||
if ((run = bin->runcur) && run->nfree > 0) {
|
||||
if ((run = bin->mCurrentRun) && run->nfree > 0) {
|
||||
ret = MallocBinEasy(bin, run);
|
||||
} else {
|
||||
ret = MallocBinHard(bin);
|
||||
|
@ -3246,7 +3241,7 @@ arena_salloc(const void* ptr)
|
|||
if ((mapbits & CHUNK_MAP_LARGE) == 0) {
|
||||
arena_run_t* run = (arena_run_t*)(mapbits & ~pagesize_mask);
|
||||
MOZ_DIAGNOSTIC_ASSERT(run->magic == ARENA_RUN_MAGIC);
|
||||
ret = run->bin->reg_size;
|
||||
ret = run->bin->mSizeClass;
|
||||
} else {
|
||||
ret = mapbits & ~pagesize_mask;
|
||||
MOZ_DIAGNOSTIC_ASSERT(ret != 0);
|
||||
|
@ -3428,10 +3423,10 @@ MozJemalloc::jemalloc_ptr_info(const void* aPtr, jemalloc_ptr_info_t* aInfo)
|
|||
MOZ_DIAGNOSTIC_ASSERT(run->magic == ARENA_RUN_MAGIC);
|
||||
|
||||
// The allocation size is stored in the run metadata.
|
||||
size_t size = run->bin->reg_size;
|
||||
size_t size = run->bin->mSizeClass;
|
||||
|
||||
// Address of the first possible pointer in the run after its headers.
|
||||
uintptr_t reg0_addr = (uintptr_t)run + run->bin->reg0_offset;
|
||||
uintptr_t reg0_addr = (uintptr_t)run + run->bin->mRunFirstRegionOffset;
|
||||
if (aPtr < (void*)reg0_addr) {
|
||||
// In the run header.
|
||||
*aInfo = { TagUnknown, nullptr, 0 };
|
||||
|
@ -3476,21 +3471,23 @@ arena_t::DallocSmall(arena_chunk_t* aChunk,
|
|||
run = (arena_run_t*)(aMapElm->bits & ~pagesize_mask);
|
||||
MOZ_DIAGNOSTIC_ASSERT(run->magic == ARENA_RUN_MAGIC);
|
||||
bin = run->bin;
|
||||
size = bin->reg_size;
|
||||
MOZ_DIAGNOSTIC_ASSERT(uintptr_t(aPtr) >= uintptr_t(run) + bin->reg0_offset);
|
||||
size = bin->mSizeClass;
|
||||
MOZ_DIAGNOSTIC_ASSERT(uintptr_t(aPtr) >=
|
||||
uintptr_t(run) + bin->mRunFirstRegionOffset);
|
||||
MOZ_DIAGNOSTIC_ASSERT(
|
||||
(uintptr_t(aPtr) - (uintptr_t(run) + bin->reg0_offset)) % size == 0);
|
||||
(uintptr_t(aPtr) - (uintptr_t(run) + bin->mRunFirstRegionOffset)) % size ==
|
||||
0);
|
||||
|
||||
memset(aPtr, kAllocPoison, size);
|
||||
|
||||
arena_run_reg_dalloc(run, bin, aPtr, size);
|
||||
run->nfree++;
|
||||
|
||||
if (run->nfree == bin->nregs) {
|
||||
if (run->nfree == bin->mRunNumRegions) {
|
||||
// Deallocate run.
|
||||
if (run == bin->runcur) {
|
||||
bin->runcur = nullptr;
|
||||
} else if (bin->nregs != 1) {
|
||||
if (run == bin->mCurrentRun) {
|
||||
bin->mCurrentRun = nullptr;
|
||||
} else if (bin->mRunNumRegions != 1) {
|
||||
size_t run_pageind =
|
||||
(uintptr_t(run) - uintptr_t(aChunk)) >> pagesize_2pow;
|
||||
arena_chunk_map_t* run_mapelm = &aChunk->map[run_pageind];
|
||||
|
@ -3498,39 +3495,40 @@ arena_t::DallocSmall(arena_chunk_t* aChunk,
|
|||
// This block's conditional is necessary because if the
|
||||
// run only contains one region, then it never gets
|
||||
// inserted into the non-full runs tree.
|
||||
MOZ_DIAGNOSTIC_ASSERT(bin->runs.Search(run_mapelm) == run_mapelm);
|
||||
bin->runs.Remove(run_mapelm);
|
||||
MOZ_DIAGNOSTIC_ASSERT(bin->mNonFullRuns.Search(run_mapelm) == run_mapelm);
|
||||
bin->mNonFullRuns.Remove(run_mapelm);
|
||||
}
|
||||
#if defined(MOZ_DIAGNOSTIC_ASSERT_ENABLED)
|
||||
run->magic = 0;
|
||||
#endif
|
||||
DallocRun(run, true);
|
||||
bin->stats.curruns--;
|
||||
} else if (run->nfree == 1 && run != bin->runcur) {
|
||||
// Make sure that bin->runcur always refers to the lowest
|
||||
bin->mNumRuns--;
|
||||
} else if (run->nfree == 1 && run != bin->mCurrentRun) {
|
||||
// Make sure that bin->mCurrentRun always refers to the lowest
|
||||
// non-full run, if one exists.
|
||||
if (!bin->runcur) {
|
||||
bin->runcur = run;
|
||||
} else if (uintptr_t(run) < uintptr_t(bin->runcur)) {
|
||||
// Switch runcur.
|
||||
if (bin->runcur->nfree > 0) {
|
||||
arena_chunk_t* runcur_chunk = GetChunkForPtr(bin->runcur);
|
||||
if (!bin->mCurrentRun) {
|
||||
bin->mCurrentRun = run;
|
||||
} else if (uintptr_t(run) < uintptr_t(bin->mCurrentRun)) {
|
||||
// Switch mCurrentRun.
|
||||
if (bin->mCurrentRun->nfree > 0) {
|
||||
arena_chunk_t* runcur_chunk = GetChunkForPtr(bin->mCurrentRun);
|
||||
size_t runcur_pageind =
|
||||
(uintptr_t(bin->runcur) - uintptr_t(runcur_chunk)) >> pagesize_2pow;
|
||||
(uintptr_t(bin->mCurrentRun) - uintptr_t(runcur_chunk)) >>
|
||||
pagesize_2pow;
|
||||
arena_chunk_map_t* runcur_mapelm = &runcur_chunk->map[runcur_pageind];
|
||||
|
||||
// Insert runcur.
|
||||
MOZ_DIAGNOSTIC_ASSERT(!bin->runs.Search(runcur_mapelm));
|
||||
bin->runs.Insert(runcur_mapelm);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!bin->mNonFullRuns.Search(runcur_mapelm));
|
||||
bin->mNonFullRuns.Insert(runcur_mapelm);
|
||||
}
|
||||
bin->runcur = run;
|
||||
bin->mCurrentRun = run;
|
||||
} else {
|
||||
size_t run_pageind =
|
||||
(uintptr_t(run) - uintptr_t(aChunk)) >> pagesize_2pow;
|
||||
arena_chunk_map_t* run_mapelm = &aChunk->map[run_pageind];
|
||||
|
||||
MOZ_DIAGNOSTIC_ASSERT(bin->runs.Search(run_mapelm) == nullptr);
|
||||
bin->runs.Insert(run_mapelm);
|
||||
MOZ_DIAGNOSTIC_ASSERT(bin->mNonFullRuns.Search(run_mapelm) == nullptr);
|
||||
bin->mNonFullRuns.Insert(run_mapelm);
|
||||
}
|
||||
}
|
||||
mStats.allocated_small -= size;
|
||||
|
@ -3786,40 +3784,40 @@ arena_t::arena_t()
|
|||
// (2^n)-spaced tiny bins.
|
||||
for (i = 0; i < ntbins; i++) {
|
||||
bin = &mBins[i];
|
||||
bin->runcur = nullptr;
|
||||
bin->runs.Init();
|
||||
bin->mCurrentRun = nullptr;
|
||||
bin->mNonFullRuns.Init();
|
||||
|
||||
bin->reg_size = (1ULL << (TINY_MIN_2POW + i));
|
||||
bin->mSizeClass = (1ULL << (TINY_MIN_2POW + i));
|
||||
|
||||
prev_run_size = arena_bin_run_size_calc(bin, prev_run_size);
|
||||
|
||||
memset(&bin->stats, 0, sizeof(malloc_bin_stats_t));
|
||||
bin->mNumRuns = 0;
|
||||
}
|
||||
|
||||
// Quantum-spaced bins.
|
||||
for (; i < ntbins + nqbins; i++) {
|
||||
bin = &mBins[i];
|
||||
bin->runcur = nullptr;
|
||||
bin->runs.Init();
|
||||
bin->mCurrentRun = nullptr;
|
||||
bin->mNonFullRuns.Init();
|
||||
|
||||
bin->reg_size = quantum * (i - ntbins + 1);
|
||||
bin->mSizeClass = quantum * (i - ntbins + 1);
|
||||
|
||||
prev_run_size = arena_bin_run_size_calc(bin, prev_run_size);
|
||||
|
||||
memset(&bin->stats, 0, sizeof(malloc_bin_stats_t));
|
||||
bin->mNumRuns = 0;
|
||||
}
|
||||
|
||||
// (2^n)-spaced sub-page bins.
|
||||
for (; i < ntbins + nqbins + nsbins; i++) {
|
||||
bin = &mBins[i];
|
||||
bin->runcur = nullptr;
|
||||
bin->runs.Init();
|
||||
bin->mCurrentRun = nullptr;
|
||||
bin->mNonFullRuns.Init();
|
||||
|
||||
bin->reg_size = (small_max << (i - (ntbins + nqbins) + 1));
|
||||
bin->mSizeClass = (small_max << (i - (ntbins + nqbins) + 1));
|
||||
|
||||
prev_run_size = arena_bin_run_size_calc(bin, prev_run_size);
|
||||
|
||||
memset(&bin->stats, 0, sizeof(malloc_bin_stats_t));
|
||||
bin->mNumRuns = 0;
|
||||
}
|
||||
|
||||
#if defined(MOZ_DIAGNOSTIC_ASSERT_ENABLED)
|
||||
|
@ -4593,17 +4591,17 @@ MozJemalloc::jemalloc_stats(jemalloc_stats_t* aStats)
|
|||
arena_bin_t* bin = &arena->mBins[j];
|
||||
size_t bin_unused = 0;
|
||||
|
||||
for (auto mapelm : bin->runs.iter()) {
|
||||
for (auto mapelm : bin->mNonFullRuns.iter()) {
|
||||
run = (arena_run_t*)(mapelm->bits & ~pagesize_mask);
|
||||
bin_unused += run->nfree * bin->reg_size;
|
||||
bin_unused += run->nfree * bin->mSizeClass;
|
||||
}
|
||||
|
||||
if (bin->runcur) {
|
||||
bin_unused += bin->runcur->nfree * bin->reg_size;
|
||||
if (bin->mCurrentRun) {
|
||||
bin_unused += bin->mCurrentRun->nfree * bin->mSizeClass;
|
||||
}
|
||||
|
||||
arena_unused += bin_unused;
|
||||
arena_headers += bin->stats.curruns * bin->reg0_offset;
|
||||
arena_headers += bin->mNumRuns * bin->mRunFirstRegionOffset;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
include $(topsrcdir)/testing/testsuite-targets.mk
|
||||
|
||||
package-mobile-tests:
|
||||
$(MAKE) stage-mochitest DIST_BIN=$(DEPTH)/$(DIST)/bin/xulrunner
|
||||
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
|
||||
@(cd $(PKG_STAGE) && tar $(TAR_CREATE_FLAGS) - *) | bzip2 -f > $(DIST)/$(PKG_PATH)$(TEST_PACKAGE)
|
|
@ -542,3 +542,27 @@ android.applicationVariants.all { variant ->
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
android.applicationVariants.all { variant ->
|
||||
def processResourcesTask = tasks["process${variant.name.capitalize()}Resources"]
|
||||
def assembleTask = tasks["assemble${variant.name.capitalize()}"]
|
||||
|
||||
def dumpTask = task("dump${variant.name.capitalize()}RTxt", type: Copy) {
|
||||
from "${project.buildDir}/intermediates/symbols"
|
||||
into "${project.buildDir}/R/symbols-${System.env.AB_CD}"
|
||||
include "**/R.txt"
|
||||
|
||||
includeEmptyDirs = false
|
||||
|
||||
// Force task to run.
|
||||
outputs.upToDateWhen { false }
|
||||
|
||||
rename { filename ->
|
||||
filename.replace 'R.txt', "R-${new Date().format('yyyyMMddHHmmssSSS')}.txt"
|
||||
}
|
||||
|
||||
dependsOn processResourcesTask
|
||||
}
|
||||
|
||||
assembleTask.dependsOn dumpTask
|
||||
}
|
||||
|
|
|
@ -14,9 +14,6 @@ NO_NDK=1
|
|||
|
||||
. "$topsrcdir/mobile/android/config/mozconfigs/common"
|
||||
|
||||
ac_add_options --with-gradle="$topsrcdir/android-gradle-dependencies/gradle-dist/bin/gradle"
|
||||
export GRADLE_MAVEN_REPOSITORIES="file://$topsrcdir/android-gradle-dependencies/jcenter","file://$topsrcdir/android-gradle-dependencies/google"
|
||||
|
||||
unset HOST_CC
|
||||
unset HOST_CXX
|
||||
unset RUSTC
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
. "$topsrcdir/mobile/android/config/mozconfigs/android-api-16/nightly"
|
||||
|
||||
ac_add_options --with-gradle="$topsrcdir/android-gradle-dependencies/gradle-dist/bin/gradle"
|
||||
export GRADLE_MAVEN_REPOSITORIES="file://$topsrcdir/android-gradle-dependencies/jcenter","file://$topsrcdir/android-gradle-dependencies/google"
|
||||
ac_add_options --without-gradle
|
||||
|
||||
. "$topsrcdir/mobile/android/config/mozconfigs/common.override"
|
||||
|
|
|
@ -49,6 +49,9 @@ ANDROID_NDK_VERSION_32BIT="r8c"
|
|||
ac_add_options --enable-application=mobile/android
|
||||
ac_add_options --with-android-sdk="$topsrcdir/android-sdk-linux"
|
||||
|
||||
ac_add_options --with-gradle="$topsrcdir/android-gradle-dependencies/gradle-dist/bin/gradle"
|
||||
export GRADLE_MAVEN_REPOSITORIES="file://$topsrcdir/android-gradle-dependencies/jcenter","file://$topsrcdir/android-gradle-dependencies/google"
|
||||
|
||||
if [ -z "$NO_NDK" ]; then
|
||||
ac_add_options --with-android-ndk="$topsrcdir/android-ndk"
|
||||
fi
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[
|
||||
]
|
|
@ -1,2 +0,0 @@
|
|||
[
|
||||
]
|
|
@ -316,10 +316,20 @@ class MachCommands(MachCommandBase):
|
|||
# Android tools expect UTF-8: see
|
||||
# http://tools.android.com/knownissues/encoding. See
|
||||
# http://stackoverflow.com/a/21267635 for discussion of this approach.
|
||||
#
|
||||
# It's not even enough to set the encoding just for Gradle; it
|
||||
# needs to be for JVMs spawned by Gradle as well. This
|
||||
# happens during the maven deployment generating the GeckoView
|
||||
# documents; this works around "error: unmappable character
|
||||
# for encoding ASCII" in exoplayer2. See
|
||||
# https://discuss.gradle.org/t/unmappable-character-for-encoding-ascii-when-building-a-utf-8-project/10692/11
|
||||
# and especially https://stackoverflow.com/a/21755671.
|
||||
|
||||
return self.run_process([self.substs['GRADLE']] + gradle_flags + ['--console=plain'] + args,
|
||||
append_env={
|
||||
'GRADLE_OPTS': '-Dfile.encoding=utf-8',
|
||||
'JAVA_HOME': java_home,
|
||||
'JAVA_TOOL_OPTIONS': '-Dfile.encoding=utf-8',
|
||||
},
|
||||
pass_thru=True, # Allow user to run gradle interactively.
|
||||
ensure_exit_code=False, # Don't throw on non-zero exit code.
|
||||
|
|