зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to autoland. CLOSED TREE
This commit is contained in:
Коммит
4173161363
|
@ -335,9 +335,6 @@ toolkit/components/reader/JSDOMParser.js
|
|||
# Uses preprocessing
|
||||
toolkit/components/reader/Readerable.jsm
|
||||
|
||||
# Should be going away soon
|
||||
toolkit/content/widgets/wizard.xml
|
||||
|
||||
# Uses preprocessing
|
||||
toolkit/mozapps/update/tests/data/xpcshellConstantsPP.js
|
||||
toolkit/modules/AppConstants.jsm
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
////////////////////////////////////////////////////////////////////////
|
||||
// 'labelled by'/'label for' relations for xul:tab and xul:tabpanel
|
||||
|
||||
var tabs = Array.from(tabBrowser().tabContainer.children);
|
||||
var tabs = Array.from(tabBrowser().tabContainer.allTabs);
|
||||
// For preloaded tabs, there might be items in this array where this relation
|
||||
// doesn't hold, so just deal with that:
|
||||
var panels = tabs.map(t => t.linkedBrowser.closest("tabpanels > *"));
|
||||
|
|
|
@ -87,7 +87,9 @@ Relation XULTabAccessible::RelationByType(RelationType aType) const {
|
|||
if (aType != RelationType::LABEL_FOR) return rel;
|
||||
|
||||
// Expose 'LABEL_FOR' relation on tab accessible for tabpanel accessible.
|
||||
nsIContent* parent = mContent->GetParent();
|
||||
ErrorResult rv;
|
||||
nsIContent* parent =
|
||||
mContent->AsElement()->Closest(NS_LITERAL_STRING("tabs"), rv);
|
||||
if (!parent) return rel;
|
||||
|
||||
nsCOMPtr<nsIDOMXULRelatedElement> tabsElm =
|
||||
|
|
|
@ -126,10 +126,6 @@ panelview[mainview] > .panel-header {
|
|||
transition: height var(--panelui-subview-transition-duration);
|
||||
}
|
||||
|
||||
#tabbrowser-tabs {
|
||||
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-tabs");
|
||||
}
|
||||
|
||||
@supports -moz-bool-pref("layout.css.emulate-moz-box-with-flex") {
|
||||
#tabbrowser-tabs {
|
||||
/* Without this, the tabs container width extends beyond the window width */
|
||||
|
@ -203,13 +199,13 @@ panelview[mainview] > .panel-header {
|
|||
}
|
||||
%endif
|
||||
|
||||
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned] {
|
||||
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-arrowscrollbox > .tabbrowser-tab[pinned] {
|
||||
position: fixed !important;
|
||||
display: block; /* position:fixed already does this (bug 579776), but let's be explicit */
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[movingtab] > .tabbrowser-tab[selected],
|
||||
#tabbrowser-tabs[movingtab] > .tabbrowser-tab[multiselected] {
|
||||
#tabbrowser-tabs[movingtab] > .tabbrowser-arrowscrollbox > .tabbrowser-tab[selected],
|
||||
#tabbrowser-tabs[movingtab] > .tabbrowser-arrowscrollbox > .tabbrowser-tab[multiselected] {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
pointer-events: none; /* avoid blocking dragover events on scroll buttons */
|
||||
|
@ -916,6 +912,14 @@ window[chromehidden~="toolbar"] toolbar:not(#nav-bar):not(#TabsToolbar):not(#pri
|
|||
background: black;
|
||||
}
|
||||
|
||||
html|*#fullscreen-and-pointerlock-wrapper {
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
top: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
html|*.pointerlockfswarning {
|
||||
position: fixed;
|
||||
z-index: 2147483647 !important;
|
||||
|
|
|
@ -95,6 +95,7 @@
|
|||
Services.scriptloader.loadSubScript("chrome://browser/content/browser-tabsintitlebar.js", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser.js", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser-tab.js", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser-tabs.js", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/search/autocomplete-popup.js", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/search/searchbar.js", this);
|
||||
|
||||
|
@ -723,11 +724,19 @@
|
|||
<hbox flex="1" align="end" class="toolbar-items">
|
||||
<hbox id="TabsToolbar-customization-target" flex="1">
|
||||
<tabs id="tabbrowser-tabs"
|
||||
is="tabbrowser-tabs"
|
||||
flex="1"
|
||||
setfocus="false"
|
||||
tooltip="tabbrowser-tab-tooltip"
|
||||
stopwatchid="FX_TAB_CLICK_MS">
|
||||
<tab is="tabbrowser-tab" class="tabbrowser-tab" selected="true" visuallyselected="true" fadein="true"/>
|
||||
<hbox class="tab-drop-indicator-box">
|
||||
<image class="tab-drop-indicator" hidden="true"/>
|
||||
</hbox>
|
||||
<arrowscrollbox orient="horizontal" flex="1" style="min-width: 1px;" clicktoscroll="true" class="tabbrowser-arrowscrollbox" scrolledtostart="true" scrolledtoend="true">
|
||||
<tab is="tabbrowser-tab" class="tabbrowser-tab" selected="true" visuallyselected="true" fadein="true"/>
|
||||
<toolbarbutton class="tabs-newtab-button toolbarbutton-1" command="cmd_newNavigatorTab" onclick="checkForMiddleClick(this, event);"/>
|
||||
<spacer class="closing-tabs-spacer" style="width: 0;"/>
|
||||
</arrowscrollbox>
|
||||
</tabs>
|
||||
|
||||
<toolbarbutton id="new-tab-button"
|
||||
|
@ -1338,35 +1347,10 @@
|
|||
#include ../../components/customizableui/content/customizeMode.inc.xul
|
||||
]]></box>
|
||||
|
||||
<html:div id="fullscreen-warning" class="pointerlockfswarning" hidden="true" renderroot="content">
|
||||
<html:div class="pointerlockfswarning-domain-text">
|
||||
&fullscreenWarning.beforeDomain.label;
|
||||
<html:span class="pointerlockfswarning-domain"/>
|
||||
&fullscreenWarning.afterDomain.label;
|
||||
</html:div>
|
||||
<html:div class="pointerlockfswarning-generic-text">
|
||||
&fullscreenWarning.generic.label;
|
||||
</html:div>
|
||||
<html:button id="fullscreen-exit-button"
|
||||
onclick="FullScreen.exitDomFullScreen();">
|
||||
#ifdef XP_MACOSX
|
||||
&exitDOMFullscreenMac.button;
|
||||
#else
|
||||
&exitDOMFullscreen.button;
|
||||
#endif
|
||||
</html:button>
|
||||
</html:div>
|
||||
|
||||
<html:div id="pointerlock-warning" class="pointerlockfswarning" hidden="true" renderroot="content">
|
||||
<html:div class="pointerlockfswarning-domain-text">
|
||||
&pointerlockWarning.beforeDomain.label;
|
||||
<html:span class="pointerlockfswarning-domain"/>
|
||||
&pointerlockWarning.afterDomain.label;
|
||||
</html:div>
|
||||
<html:div class="pointerlockfswarning-generic-text">
|
||||
&pointerlockWarning.generic.label;
|
||||
</html:div>
|
||||
</html:div>
|
||||
# Everything that needs to straddle the line between chrome and content, without being
|
||||
# its own widget-level window, needs to go in here, and set the renderroot="popover"
|
||||
# attribute, or it will fail to render properly in WebRender.
|
||||
#include popovers.inc
|
||||
|
||||
<vbox id="browser-bottombox" layer="true" renderroot="content">
|
||||
<!-- gNotificationBox will be added here lazily. -->
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
# 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 https://mozilla.org/MPL/2.0/.
|
||||
<html:div id="fullscreen-and-pointerlock-wrapper" renderroot="popover">
|
||||
<html:div id="fullscreen-warning" class="pointerlockfswarning" hidden="true">
|
||||
<html:div class="pointerlockfswarning-domain-text">
|
||||
&fullscreenWarning.beforeDomain.label;
|
||||
<html:span class="pointerlockfswarning-domain"/>
|
||||
&fullscreenWarning.afterDomain.label;
|
||||
</html:div>
|
||||
<html:div class="pointerlockfswarning-generic-text">
|
||||
&fullscreenWarning.generic.label;
|
||||
</html:div>
|
||||
<html:button id="fullscreen-exit-button"
|
||||
onclick="FullScreen.exitDomFullScreen();">
|
||||
#ifdef XP_MACOSX
|
||||
&exitDOMFullscreenMac.button;
|
||||
#else
|
||||
&exitDOMFullscreen.button;
|
||||
#endif
|
||||
</html:button>
|
||||
</html:div>
|
||||
|
||||
<html:div id="pointerlock-warning" class="pointerlockfswarning" hidden="true">
|
||||
<html:div class="pointerlockfswarning-domain-text">
|
||||
&pointerlockWarning.beforeDomain.label;
|
||||
<html:span class="pointerlockfswarning-domain"/>
|
||||
&pointerlockWarning.afterDomain.label;
|
||||
</html:div>
|
||||
<html:div class="pointerlockfswarning-generic-text">
|
||||
&pointerlockWarning.generic.label;
|
||||
</html:div>
|
||||
</html:div>
|
||||
</html:div>
|
|
@ -105,6 +105,10 @@ class MozTabbrowserTab extends MozElements.MozTab {
|
|||
}
|
||||
}
|
||||
|
||||
get container() {
|
||||
return gBrowser.tabContainer;
|
||||
}
|
||||
|
||||
set _visuallySelected(val) {
|
||||
if (val == (this.getAttribute("visuallyselected") == "true")) {
|
||||
return val;
|
||||
|
@ -271,7 +275,7 @@ class MozTabbrowserTab extends MozElements.MozTab {
|
|||
|
||||
on_mousedown(event) {
|
||||
let eventMaySelectTab = true;
|
||||
let tabContainer = this.parentNode;
|
||||
let tabContainer = this.container;
|
||||
|
||||
if (tabContainer._closeTabByDblclick &&
|
||||
event.button == 0 &&
|
||||
|
@ -392,7 +396,7 @@ class MozTabbrowserTab extends MozElements.MozTab {
|
|||
event.stopPropagation();
|
||||
}
|
||||
|
||||
let tabContainer = this.parentNode;
|
||||
let tabContainer = this.container;
|
||||
if (tabContainer._closeTabByDblclick &&
|
||||
this._selectedOnFirstMouseDown &&
|
||||
this.selected &&
|
||||
|
@ -416,7 +420,7 @@ class MozTabbrowserTab extends MozElements.MozTab {
|
|||
return;
|
||||
}
|
||||
|
||||
let tabContainer = this.parentNode;
|
||||
let tabContainer = this.container;
|
||||
let visibleTabs = tabContainer._getVisibleTabs();
|
||||
let tabIndex = visibleTabs.indexOf(this);
|
||||
|
||||
|
@ -464,7 +468,7 @@ class MozTabbrowserTab extends MozElements.MozTab {
|
|||
}
|
||||
|
||||
_mouseleave() {
|
||||
let tabContainer = this.parentNode;
|
||||
let tabContainer = this.container;
|
||||
if (tabContainer._beforeHoveredTab) {
|
||||
tabContainer._beforeHoveredTab.removeAttribute("beforehovered");
|
||||
tabContainer._beforeHoveredTab = null;
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
.tab-close-button[pinned],
|
||||
#tabbrowser-tabs[closebuttons="activetab"] > .tabbrowser-tab > .tab-stack > .tab-content > .tab-close-button:not([selected="true"]),
|
||||
#tabbrowser-tabs[closebuttons="activetab"] > .tabbrowser-arrowscrollbox > .tabbrowser-tab > .tab-stack > .tab-content > .tab-close-button:not([selected="true"]),
|
||||
.tab-icon-pending:not([pendingicon]),
|
||||
.tab-icon-pending[busy],
|
||||
.tab-icon-pending[pinned],
|
||||
|
|
|
@ -32,6 +32,7 @@ window._gBrowser = {
|
|||
window.addEventListener("occlusionstatechange", this);
|
||||
window.addEventListener("framefocusrequested", this);
|
||||
|
||||
this.tabContainer.init();
|
||||
this._setupInitialBrowserAndTab();
|
||||
|
||||
if (Services.prefs.getBoolPref("browser.display.use_system_colors")) {
|
||||
|
@ -67,6 +68,7 @@ window._gBrowser = {
|
|||
"toolkit.cosmeticAnimations.enabled");
|
||||
|
||||
this._setupEventListeners();
|
||||
this._initialized = true;
|
||||
},
|
||||
|
||||
ownerGlobal: window,
|
||||
|
@ -77,6 +79,8 @@ window._gBrowser = {
|
|||
|
||||
_visibleTabs: null,
|
||||
|
||||
_tabs: null,
|
||||
|
||||
_lastRelatedTabMap: new WeakMap(),
|
||||
|
||||
mProgressListeners: [],
|
||||
|
@ -205,8 +209,10 @@ window._gBrowser = {
|
|||
},
|
||||
|
||||
get tabs() {
|
||||
delete this.tabs;
|
||||
return this.tabs = this.tabContainer.children;
|
||||
if (!this._tabs) {
|
||||
this._tabs = this.tabContainer.allTabs;
|
||||
}
|
||||
return this._tabs;
|
||||
},
|
||||
|
||||
get tabbox() {
|
||||
|
@ -219,19 +225,16 @@ window._gBrowser = {
|
|||
return this.tabpanels = document.getElementById("tabbrowser-tabpanels");
|
||||
},
|
||||
|
||||
get addEventListener() {
|
||||
delete this.addEventListener;
|
||||
return this.addEventListener = this.tabpanels.addEventListener.bind(this.tabpanels);
|
||||
addEventListener(...args) {
|
||||
this.tabpanels.addEventListener(...args);
|
||||
},
|
||||
|
||||
get removeEventListener() {
|
||||
delete this.removeEventListener;
|
||||
return this.removeEventListener = this.tabpanels.removeEventListener.bind(this.tabpanels);
|
||||
removeEventListener(...args) {
|
||||
this.tabpanels.removeEventListener(...args);
|
||||
},
|
||||
|
||||
get dispatchEvent() {
|
||||
delete this.dispatchEvent;
|
||||
return this.dispatchEvent = this.tabpanels.dispatchEvent.bind(this.tabpanels);
|
||||
dispatchEvent(...args) {
|
||||
return this.tabpanels.dispatchEvent(...args);
|
||||
},
|
||||
|
||||
get visibleTabs() {
|
||||
|
@ -495,6 +498,11 @@ window._gBrowser = {
|
|||
return this.selectedBrowser.userTypedValue;
|
||||
},
|
||||
|
||||
_invalidateCachedTabs() {
|
||||
this._tabs = null;
|
||||
this._visibleTabs = null;
|
||||
},
|
||||
|
||||
_setFindbarData() {
|
||||
// Ensure we know what the find bar key is in the content process:
|
||||
let {sharedData} = Services.ppmm;
|
||||
|
@ -634,12 +642,12 @@ window._gBrowser = {
|
|||
|
||||
syncThrobberAnimations(aTab) {
|
||||
aTab.ownerGlobal.promiseDocumentFlushed(() => {
|
||||
if (!aTab.parentNode) {
|
||||
if (!aTab.container) {
|
||||
return;
|
||||
}
|
||||
|
||||
const animations =
|
||||
Array.from(aTab.parentNode.getElementsByTagName("tab"))
|
||||
Array.from(aTab.container.getElementsByTagName("tab"))
|
||||
.map(tab => {
|
||||
const throbber = tab.throbber;
|
||||
return throbber ? throbber.getAnimations({ subtree: true }) : [];
|
||||
|
@ -2367,9 +2375,6 @@ window._gBrowser = {
|
|||
}, 0, this.tabContainer);
|
||||
}
|
||||
|
||||
// invalidate cache
|
||||
this._visibleTabs = null;
|
||||
|
||||
let usingPreloadedContent = false;
|
||||
let b;
|
||||
|
||||
|
@ -2416,9 +2421,8 @@ window._gBrowser = {
|
|||
index = Math.min(index, this.tabs.length);
|
||||
}
|
||||
|
||||
// Use .item() instead of [] because we need .item() to return null in
|
||||
// order to append the tab at the end in case index == tabs.length.
|
||||
let tabAfter = this.tabs.item(index);
|
||||
let tabAfter = this.tabs[index] || null;
|
||||
this._invalidateCachedTabs();
|
||||
this.tabContainer.insertBefore(t, tabAfter);
|
||||
if (tabAfter) {
|
||||
this._updateTabsAfterInsert();
|
||||
|
@ -2842,7 +2846,7 @@ window._gBrowser = {
|
|||
aTab.removeAttribute("bursting");
|
||||
|
||||
setTimeout(function(tab, tabbrowser) {
|
||||
if (tab.parentNode &&
|
||||
if (tab.container &&
|
||||
window.getComputedStyle(tab).maxWidth == "0.1px") {
|
||||
console.assert(false, "Giving up waiting for the tab closing animation to finish (bug 608589)");
|
||||
tabbrowser._endRemoveTab(tab);
|
||||
|
@ -2962,7 +2966,7 @@ window._gBrowser = {
|
|||
|
||||
aTab.closing = true;
|
||||
this._removingTabs.push(aTab);
|
||||
this._visibleTabs = null; // invalidate cache
|
||||
this._invalidateCachedTabs();
|
||||
|
||||
// Invalidate hovered tab state tracking for this closing tab.
|
||||
if (this.tabContainer._hoveredTab == aTab)
|
||||
|
@ -3088,6 +3092,7 @@ window._gBrowser = {
|
|||
|
||||
// Remove the tab ...
|
||||
aTab.remove();
|
||||
this._invalidateCachedTabs();
|
||||
|
||||
// Update hashiddentabs if this tab was hidden.
|
||||
if (aTab.hidden)
|
||||
|
@ -3180,17 +3185,16 @@ window._gBrowser = {
|
|||
}
|
||||
|
||||
// Try to find a remaining tab that comes after the given tab
|
||||
let tab = aTab;
|
||||
do {
|
||||
tab = tab.nextElementSibling;
|
||||
} while (tab && !remainingTabs.includes(tab));
|
||||
let tab = this.tabContainer.findNextTab(aTab, {
|
||||
direction: 1,
|
||||
filter: _tab => remainingTabs.includes(_tab),
|
||||
});
|
||||
|
||||
if (!tab) {
|
||||
tab = aTab;
|
||||
|
||||
do {
|
||||
tab = tab.previousElementSibling;
|
||||
} while (tab && !remainingTabs.includes(tab));
|
||||
tab = this.tabContainer.findNextTab(aTab, {
|
||||
direction: -1,
|
||||
filter: _tab => remainingTabs.includes(_tab),
|
||||
});
|
||||
}
|
||||
|
||||
return tab;
|
||||
|
@ -3542,7 +3546,7 @@ window._gBrowser = {
|
|||
showTab(aTab) {
|
||||
if (aTab.hidden) {
|
||||
aTab.removeAttribute("hidden");
|
||||
this._visibleTabs = null; // invalidate cache
|
||||
this._invalidateCachedTabs();
|
||||
|
||||
this.tabContainer._updateCloseButtons();
|
||||
this.tabContainer._updateHiddenTabsStatus();
|
||||
|
@ -3560,7 +3564,7 @@ window._gBrowser = {
|
|||
if (!aTab.hidden && !aTab.pinned && !aTab.selected &&
|
||||
!aTab.closing && !aTab._sharingState) {
|
||||
aTab.setAttribute("hidden", "true");
|
||||
this._visibleTabs = null; // invalidate cache
|
||||
this._invalidateCachedTabs();
|
||||
|
||||
this.tabContainer._updateCloseButtons();
|
||||
this.tabContainer._updateHiddenTabsStatus();
|
||||
|
@ -3727,12 +3731,9 @@ window._gBrowser = {
|
|||
|
||||
aIndex = aIndex < aTab._tPos ? aIndex : aIndex + 1;
|
||||
|
||||
// invalidate cache
|
||||
this._visibleTabs = null;
|
||||
|
||||
// use .item() instead of [] because dragging to the end of the strip goes out of
|
||||
// bounds: .item() returns null (so it acts like appendChild), but [] throws
|
||||
this.tabContainer.insertBefore(aTab, this.tabs.item(aIndex));
|
||||
let neighbor = this.tabs[aIndex] || null;
|
||||
this._invalidateCachedTabs();
|
||||
this.tabContainer.insertBefore(aTab, neighbor);
|
||||
this._updateTabsAfterInsert();
|
||||
|
||||
if (wasFocused)
|
||||
|
@ -3751,9 +3752,10 @@ window._gBrowser = {
|
|||
},
|
||||
|
||||
moveTabForward() {
|
||||
let nextTab = this.selectedTab.nextElementSibling;
|
||||
while (nextTab && nextTab.hidden)
|
||||
nextTab = nextTab.nextElementSibling;
|
||||
let nextTab = this.tabContainer.findNextTab(this.selectedTab, {
|
||||
direction: 1,
|
||||
filter: tab => !tab.hidden,
|
||||
});
|
||||
|
||||
if (nextTab)
|
||||
this.moveTabTo(this.selectedTab, nextTab._tPos);
|
||||
|
@ -3797,7 +3799,7 @@ window._gBrowser = {
|
|||
let newTab = this.addWebTab("about:blank", params);
|
||||
let newBrowser = this.getBrowserForTab(newTab);
|
||||
|
||||
aTab.parentNode._finishAnimateTabMove();
|
||||
aTab.container._finishAnimateTabMove();
|
||||
|
||||
if (!createLazyBrowser) {
|
||||
// Stop the about:blank load.
|
||||
|
@ -3820,9 +3822,10 @@ window._gBrowser = {
|
|||
},
|
||||
|
||||
moveTabBackward() {
|
||||
let previousTab = this.selectedTab.previousElementSibling;
|
||||
while (previousTab && previousTab.hidden)
|
||||
previousTab = previousTab.previousElementSibling;
|
||||
let previousTab = this.tabContainer.findNextTab(this.selectedTab, {
|
||||
direction: -1,
|
||||
filter: tab => !tab.hidden,
|
||||
});
|
||||
|
||||
if (previousTab)
|
||||
this.moveTabTo(this.selectedTab, previousTab._tPos);
|
||||
|
@ -3893,7 +3896,7 @@ window._gBrowser = {
|
|||
return;
|
||||
}
|
||||
|
||||
const tabs = this._visibleTabs;
|
||||
const tabs = this.visibleTabs;
|
||||
const indexOfTab1 = tabs.indexOf(aTab1);
|
||||
const indexOfTab2 = tabs.indexOf(aTab2);
|
||||
|
||||
|
@ -4454,6 +4457,7 @@ window._gBrowser = {
|
|||
},
|
||||
|
||||
destroy() {
|
||||
this.tabContainer.destroy();
|
||||
Services.obs.removeObserver(this, "contextual-identity-updated");
|
||||
|
||||
for (let tab of this.tabs) {
|
||||
|
@ -5452,8 +5456,12 @@ var TabContextMenu = {
|
|||
let lastVisibleTab = visibleTabs[visibleTabs.length - 1];
|
||||
let tabsToMove = contextTabIsSelected ? selectedTabs : [this.contextTab];
|
||||
let lastTabToMove = tabsToMove[tabsToMove.length - 1];
|
||||
let isLastPinnedTab = lastTabToMove.pinned &&
|
||||
(!lastTabToMove.nextElementSibling || !lastTabToMove.nextElementSibling.pinned);
|
||||
|
||||
let isLastPinnedTab = false;
|
||||
if (lastTabToMove.pinned) {
|
||||
let sibling = gBrowser.tabContainer.findNextTab(lastTabToMove);
|
||||
isLastPinnedTab = !sibling || !sibling.pinned;
|
||||
}
|
||||
contextMoveTabToEnd.disabled = (lastTabToMove == lastVisibleTab || isLastPinnedTab) &&
|
||||
allSelectedTabsAdjacent;
|
||||
let contextMoveTabToStart = document.getElementById("context_moveToStart");
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -61,6 +61,7 @@ add_task(async function checkMitmAutoEnableEnterpriseRoots() {
|
|||
[PREF_MITM_PRIMING, true],
|
||||
[PREF_MITM_PRIMING_ENDPOINT, UNKNOWN_ISSUER],
|
||||
[PREF_MITM_AUTO_ENABLE_ENTERPRISE_ROOTS, true],
|
||||
[PREF_ENTERPRISE_ROOTS, false],
|
||||
]});
|
||||
|
||||
let browser;
|
||||
|
|
|
@ -2,7 +2,7 @@ add_task(async function() {
|
|||
var win = openDialog(AppConstants.BROWSER_CHROME_URL, "_blank", "chrome,all,dialog=no");
|
||||
await SimpleTest.promiseFocus(win);
|
||||
|
||||
let tab = win.gBrowser.tabContainer.firstElementChild;
|
||||
let tab = win.gBrowser.tabs[0];
|
||||
await promiseTabLoadEvent(tab, getRootDirectory(gTestPath) + "test_bug462673.html");
|
||||
|
||||
is(win.gBrowser.browsers.length, 2, "test_bug462673.html has opened a second tab");
|
||||
|
@ -17,7 +17,7 @@ add_task(async function() {
|
|||
var win = openDialog(AppConstants.BROWSER_CHROME_URL, "_blank", "chrome,all,dialog=no");
|
||||
await SimpleTest.promiseFocus(win);
|
||||
|
||||
let tab = win.gBrowser.tabContainer.firstElementChild;
|
||||
let tab = win.gBrowser.tabs[0];
|
||||
await promiseTabLoadEvent(tab, getRootDirectory(gTestPath) + "test_bug462673.html");
|
||||
|
||||
var newTab = BrowserTestUtils.addTab(win.gBrowser);
|
||||
|
@ -25,7 +25,7 @@ add_task(async function() {
|
|||
win.gBrowser.removeTab(tab);
|
||||
ok(!win.closed, "Window stays open");
|
||||
if (!win.closed) {
|
||||
is(win.gBrowser.tabContainer.childElementCount, 1, "Window has one tab");
|
||||
is(win.gBrowser.tabs.length, 1, "Window has one tab");
|
||||
is(win.gBrowser.browsers.length, 1, "Window has one browser");
|
||||
is(win.gBrowser.selectedTab, newTab, "Remaining tab is selected");
|
||||
is(win.gBrowser.selectedBrowser, newBrowser, "Browser for remaining tab is selected");
|
||||
|
|
|
@ -91,12 +91,12 @@ add_task(async function() {
|
|||
ok(selectedTab.selected,
|
||||
"Ctrl+Tab*2 -> Ctrl+W -> Ctrl+Shift+Tab*2 keeps the selected tab");
|
||||
}
|
||||
gBrowser.removeTab(gBrowser.tabContainer.lastElementChild);
|
||||
gBrowser.removeTab(gBrowser.tabs[gBrowser.tabs.length - 1]);
|
||||
checkTabs(2);
|
||||
|
||||
await ctrlTabTest([1], 1, 0);
|
||||
|
||||
gBrowser.removeTab(gBrowser.tabContainer.lastElementChild);
|
||||
gBrowser.removeTab(gBrowser.tabs[gBrowser.tabs.length - 1]);
|
||||
checkTabs(1);
|
||||
|
||||
{ // test for bug 445768
|
||||
|
|
|
@ -3,21 +3,20 @@ function test() {
|
|||
BrowserTestUtils.addTab(gBrowser);
|
||||
BrowserTestUtils.addTab(gBrowser);
|
||||
|
||||
var tabs = gBrowser.tabs;
|
||||
var owner;
|
||||
|
||||
is(tabs.length, 4, "4 tabs are open");
|
||||
is(gBrowser.tabs.length, 4, "4 tabs are open");
|
||||
|
||||
owner = gBrowser.selectedTab = tabs[2];
|
||||
owner = gBrowser.selectedTab = gBrowser.tabs[2];
|
||||
BrowserOpenTab();
|
||||
is(gBrowser.selectedTab, tabs[4], "newly opened tab is selected");
|
||||
is(gBrowser.selectedTab, gBrowser.tabs[4], "newly opened tab is selected");
|
||||
gBrowser.removeCurrentTab();
|
||||
is(gBrowser.selectedTab, owner, "owner is selected");
|
||||
|
||||
owner = gBrowser.selectedTab;
|
||||
BrowserOpenTab();
|
||||
gBrowser.selectedTab = tabs[1];
|
||||
gBrowser.selectedTab = tabs[4];
|
||||
gBrowser.selectedTab = gBrowser.tabs[1];
|
||||
gBrowser.selectedTab = gBrowser.tabs[4];
|
||||
gBrowser.removeCurrentTab();
|
||||
isnot(gBrowser.selectedTab, owner, "selecting a different tab clears the owner relation");
|
||||
|
||||
|
@ -25,8 +24,8 @@ function test() {
|
|||
BrowserOpenTab();
|
||||
gBrowser.moveTabTo(gBrowser.selectedTab, 0);
|
||||
gBrowser.removeCurrentTab();
|
||||
is(gBrowser.selectedTab, owner, "owner relatitionship persists when tab is moved");
|
||||
is(gBrowser.selectedTab, owner, "owner relationship persists when tab is moved");
|
||||
|
||||
while (tabs.length > 1)
|
||||
while (gBrowser.tabs.length > 1)
|
||||
gBrowser.removeCurrentTab();
|
||||
}
|
||||
|
|
|
@ -31,18 +31,6 @@ const whitelist = [
|
|||
platforms: ["linux", "win", "macosx"],
|
||||
},
|
||||
|
||||
{
|
||||
file: "chrome://browser/skin/tabbrowser/tabDragIndicator.png",
|
||||
hidpi: "chrome://browser/skin/tabbrowser/tabDragIndicator@2x.png",
|
||||
platforms: ["macosx"],
|
||||
},
|
||||
|
||||
{
|
||||
file: "chrome://browser/skin/tabbrowser/tabDragIndicator.png",
|
||||
hidpi: "<not loaded>",
|
||||
platforms: ["linux", "win"],
|
||||
},
|
||||
|
||||
{
|
||||
file: "resource://gre-resources/loading-image.png",
|
||||
platforms: ["win", "macosx"],
|
||||
|
|
|
@ -26,10 +26,8 @@ add_task(async function() {
|
|||
await BrowserTestUtils.waitForCondition(() => tab._fullyOpen);
|
||||
|
||||
let tabStripRect = gBrowser.tabContainer.arrowScrollbox.getBoundingClientRect();
|
||||
let newTabButtonRect =
|
||||
document.getAnonymousElementByAttribute(gBrowser.tabContainer,
|
||||
"anonid", "tabs-newtab-button")
|
||||
.getBoundingClientRect();
|
||||
let newTabButtonRect = gBrowser.tabContainer.newTabButton
|
||||
.getBoundingClientRect();
|
||||
let inRange = (val, min, max) => min <= val && val <= max;
|
||||
|
||||
// Add a reflow observer and open a new tab.
|
||||
|
|
|
@ -12,8 +12,9 @@
|
|||
const EXPECTED_REFLOWS = [
|
||||
{
|
||||
stack: [
|
||||
"clientX@chrome://browser/content/tabbrowser.xml",
|
||||
"onxbldragstart@chrome://browser/content/tabbrowser.xml",
|
||||
"clientX@chrome://browser/content/tabbrowser-tabs.js",
|
||||
"on_dragstart@chrome://browser/content/tabbrowser-tabs.js",
|
||||
"handleEvent@chrome://browser/content/tabbrowser-tabs.js",
|
||||
"synthesizeMouseAtPoint@chrome://mochikit/content/tests/SimpleTest/EventUtils.js",
|
||||
"synthesizeMouse@chrome://mochikit/content/tests/SimpleTest/EventUtils.js",
|
||||
"synthesizePlainDragAndDrop@chrome://mochikit/content/tests/SimpleTest/EventUtils.js",
|
||||
|
@ -23,7 +24,8 @@ const EXPECTED_REFLOWS = [
|
|||
|
||||
{
|
||||
stack: [
|
||||
"onxbldragstart@chrome://browser/content/tabbrowser.xml",
|
||||
"on_dragstart@chrome://browser/content/tabbrowser-tabs.js",
|
||||
"handleEvent@chrome://browser/content/tabbrowser-tabs.js",
|
||||
"synthesizeMouseAtPoint@chrome://mochikit/content/tests/SimpleTest/EventUtils.js",
|
||||
"synthesizeMouse@chrome://mochikit/content/tests/SimpleTest/EventUtils.js",
|
||||
"synthesizePlainDragAndDrop@chrome://mochikit/content/tests/SimpleTest/EventUtils.js",
|
||||
|
|
|
@ -114,7 +114,7 @@ add_task(async function() {
|
|||
|
||||
// Now switch to the first tab. We shouldn't flush layout at all.
|
||||
await withPerfObserver(async function() {
|
||||
let firstTab = gBrowser.tabContainer.firstElementChild;
|
||||
let firstTab = gBrowser.tabs[0];
|
||||
await BrowserTestUtils.switchTab(gBrowser, firstTab);
|
||||
await BrowserTestUtils.waitForCondition(() => {
|
||||
return gBrowser.tabContainer.arrowScrollbox.hasAttribute("scrolledtostart");
|
||||
|
@ -132,7 +132,7 @@ add_task(async function() {
|
|||
// removals to put the tab strip out of the overflow state, so we'll just
|
||||
// keep testing removals until that occurs.
|
||||
while (gBrowser.tabContainer.hasAttribute("overflow")) {
|
||||
lastTab = gBrowser.tabContainer.lastElementChild;
|
||||
lastTab = gBrowser.tabs[gBrowser.tabs.length - 1];
|
||||
if (gBrowser.selectedTab !== lastTab) {
|
||||
await BrowserTestUtils.switchTab(gBrowser, lastTab);
|
||||
}
|
||||
|
|
|
@ -278,9 +278,7 @@ async function ensureFocusedUrlbar() {
|
|||
*/
|
||||
function computeMaxTabCount() {
|
||||
let currentTabCount = gBrowser.tabs.length;
|
||||
let newTabButton =
|
||||
document.getAnonymousElementByAttribute(gBrowser.tabContainer,
|
||||
"anonid", "tabs-newtab-button");
|
||||
let newTabButton = gBrowser.tabContainer.newTabButton;
|
||||
let newTabRect = newTabButton.getBoundingClientRect();
|
||||
let tabStripRect = gBrowser.tabContainer.arrowScrollbox.getBoundingClientRect();
|
||||
let availableTabStripWidth = tabStripRect.width - newTabRect.width;
|
||||
|
|
|
@ -164,7 +164,7 @@ async function test_playing_icon_on_hidden_tab(tab) {
|
|||
await BrowserTestUtils.openNewForegroundTab(gBrowser, PAGE, true, true),
|
||||
await BrowserTestUtils.openNewForegroundTab(gBrowser, PAGE, true, true),
|
||||
];
|
||||
let tabContainer = tab.parentNode;
|
||||
let tabContainer = tab.container;
|
||||
let alltabsButton = document.getElementById("alltabs-button");
|
||||
let alltabsBadge = alltabsButton.badgeLabel;
|
||||
|
||||
|
|
|
@ -21,8 +21,7 @@ add_task(async function test() {
|
|||
|
||||
let metaKeyEvent = AppConstants.platform == "macosx" ? {metaKey: true} : {ctrlKey: true};
|
||||
|
||||
let tabs = document.getElementById("tabbrowser-tabs");
|
||||
let newTabButton = document.getAnonymousElementByAttribute(tabs, "anonid", "tabs-newtab-button");
|
||||
let newTabButton = gBrowser.tabContainer.newTabButton;
|
||||
let promiseTabOpened = BrowserTestUtils.waitForEvent(gBrowser.tabContainer, "TabOpen");
|
||||
EventUtils.synthesizeMouseAtCenter(newTabButton, metaKeyEvent);
|
||||
let openEvent = await promiseTabOpened;
|
||||
|
@ -59,9 +58,11 @@ add_task(async function test() {
|
|||
EventUtils.synthesizeMouseAtCenter(newTabButton, metaKeyEvent);
|
||||
openEvent = await promiseTabOpened;
|
||||
newTab = openEvent.target;
|
||||
is(newTab.previousElementSibling, tab3,
|
||||
"New tab should be opened after tab3 when tab1 and tab3 are selected");
|
||||
is(newTab.nextElementSibling, null,
|
||||
let previous = gBrowser.tabContainer.findNextTab(newTab, {direction: -1});
|
||||
is(previous, tab3,
|
||||
"New tab should be opened after tab3 when tab1 and tab3 are selected");
|
||||
let next = gBrowser.tabContainer.findNextTab(newTab, {direction: 1});
|
||||
is(next, null,
|
||||
"New tab should be opened at the end of the tabstrip when tab1 and tab3 are selected");
|
||||
BrowserTestUtils.removeTab(newTab);
|
||||
|
||||
|
@ -74,9 +75,11 @@ add_task(async function test() {
|
|||
EventUtils.synthesizeMouseAtCenter(newTabButton, {});
|
||||
openEvent = await promiseTabOpened;
|
||||
newTab = openEvent.target;
|
||||
is(newTab.previousElementSibling, tab3,
|
||||
previous = gBrowser.tabContainer.findNextTab(newTab, {direction: -1});
|
||||
is(previous, tab3,
|
||||
"New tab should be opened after tab3 when ctrlKey is not used without multiselection");
|
||||
is(newTab.nextElementSibling, null,
|
||||
next = gBrowser.tabContainer.findNextTab(newTab, {direction: 1});
|
||||
is(next, null,
|
||||
"New tab should be opened at the end of the tabstrip when ctrlKey is not used without multiselection");
|
||||
BrowserTestUtils.removeTab(newTab);
|
||||
|
||||
|
@ -90,9 +93,11 @@ add_task(async function test() {
|
|||
EventUtils.synthesizeMouseAtCenter(newTabButton, {});
|
||||
openEvent = await promiseTabOpened;
|
||||
newTab = openEvent.target;
|
||||
is(newTab.previousElementSibling, tab3,
|
||||
previous = gBrowser.tabContainer.findNextTab(newTab, {direction: -1});
|
||||
is(previous, tab3,
|
||||
"New tab should be opened after tab3 when ctrlKey is not used with multiselection");
|
||||
is(newTab.nextElementSibling, null,
|
||||
next = gBrowser.tabContainer.findNextTab(newTab, {direction: 1});
|
||||
is(next, null,
|
||||
"New tab should be opened at the end of the tabstrip when ctrlKey is not used with multiselection");
|
||||
BrowserTestUtils.removeTab(newTab);
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ add_task(async function() {
|
|||
let arrowScrollbox = gBrowser.tabContainer.arrowScrollbox;
|
||||
let scrollbox = arrowScrollbox.scrollbox;
|
||||
let originalSmoothScroll = arrowScrollbox.smoothScroll;
|
||||
let tabs = gBrowser.tabs;
|
||||
let tabMinWidth = parseInt(getComputedStyle(gBrowser.selectedTab, null).minWidth);
|
||||
|
||||
let rect = ele => ele.getBoundingClientRect();
|
||||
|
@ -25,7 +24,7 @@ add_task(async function() {
|
|||
let elementFromPoint = x => arrowScrollbox._elementFromPoint(x);
|
||||
let nextLeftElement = () => elementFromPoint(left(scrollbox) - 1);
|
||||
let nextRightElement = () => elementFromPoint(right(scrollbox) + 1);
|
||||
let firstScrollable = () => tabs[gBrowser._numPinnedTabs];
|
||||
let firstScrollable = () => gBrowser.tabs[gBrowser._numPinnedTabs];
|
||||
let waitForNextFrame = async function() {
|
||||
await window.promiseDocumentFlushed(() => {});
|
||||
await new Promise(resolve => Services.tm.dispatchToMainThread(resolve));
|
||||
|
@ -36,11 +35,11 @@ add_task(async function() {
|
|||
arrowScrollbox.smoothScroll = originalSmoothScroll;
|
||||
});
|
||||
|
||||
while (tabs.length < tabCountForOverflow) {
|
||||
while (gBrowser.tabs.length < tabCountForOverflow) {
|
||||
BrowserTestUtils.addTab(gBrowser, "about:blank", { skipAnimation: true });
|
||||
}
|
||||
|
||||
gBrowser.pinTab(tabs[0]);
|
||||
gBrowser.pinTab(gBrowser.tabs[0]);
|
||||
|
||||
await BrowserTestUtils.waitForCondition(() => {
|
||||
return Array.from(gBrowser.tabs).every(tab => tab._fullyOpen);
|
||||
|
@ -62,7 +61,7 @@ add_task(async function() {
|
|||
await waitForNextFrame();
|
||||
isRight(element, "Scrolled one tab to the right with a single click");
|
||||
|
||||
gBrowser.selectedTab = tabs[tabs.length - 1];
|
||||
gBrowser.selectedTab = gBrowser.tabs[gBrowser.tabs.length - 1];
|
||||
await waitForNextFrame();
|
||||
ok(right(gBrowser.selectedTab) <= right(scrollbox), "Selecting the last tab scrolls it into view " +
|
||||
"(" + right(gBrowser.selectedTab) + " <= " + right(scrollbox) + ")");
|
||||
|
@ -88,7 +87,7 @@ add_task(async function() {
|
|||
ok(left(scrollbox) <= firstScrollableLeft, "Scrolled to the start with a triple click " +
|
||||
"(" + left(scrollbox) + " <= " + firstScrollableLeft + ")");
|
||||
|
||||
while (tabs.length > 1) {
|
||||
while (gBrowser.tabs.length > 1) {
|
||||
BrowserTestUtils.removeTab(gBrowser.tabs[0]);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -9,7 +9,6 @@ add_task(async function() {
|
|||
let initialTabsLength = gBrowser.tabs.length;
|
||||
|
||||
let arrowScrollbox = gBrowser.tabContainer.arrowScrollbox;
|
||||
let tabs = gBrowser.tabs;
|
||||
let tabMinWidth = parseInt(getComputedStyle(gBrowser.selectedTab, null).minWidth);
|
||||
|
||||
let width = ele => ele.getBoundingClientRect().width;
|
||||
|
@ -20,24 +19,26 @@ add_task(async function() {
|
|||
let newTab2 = gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, "about:about", {skipAnimation: true});
|
||||
let newTab3 = gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, "about:config", {skipAnimation: true});
|
||||
|
||||
while (tabs.length < tabCountForOverflow) {
|
||||
while (gBrowser.tabs.length < tabCountForOverflow) {
|
||||
BrowserTestUtils.addTab(gBrowser, "about:blank", { skipAnimation: true });
|
||||
}
|
||||
|
||||
registerCleanupFunction(function() {
|
||||
while (tabs.length > initialTabsLength) {
|
||||
gBrowser.removeTab(gBrowser.tabs[initialTabsLength]);
|
||||
while (gBrowser.tabs.length > initialTabsLength) {
|
||||
gBrowser.removeTab(gBrowser.tabContainer.getItemAtIndex(initialTabsLength));
|
||||
}
|
||||
});
|
||||
|
||||
is(gBrowser.tabs.length, tabCountForOverflow, "new tabs are opened");
|
||||
is(gBrowser.tabs[initialTabsLength], newTab1, "newTab1 position is correct");
|
||||
is(gBrowser.tabs[initialTabsLength + 1], newTab2, "newTab2 position is correct");
|
||||
is(gBrowser.tabs[initialTabsLength + 2], newTab3, "newTab3 position is correct");
|
||||
let tabs = gBrowser.tabs;
|
||||
is(tabs.length, tabCountForOverflow, "new tabs are opened");
|
||||
is(tabs[initialTabsLength], newTab1, "newTab1 position is correct");
|
||||
is(tabs[initialTabsLength + 1], newTab2, "newTab2 position is correct");
|
||||
is(tabs[initialTabsLength + 2], newTab3, "newTab3 position is correct");
|
||||
|
||||
await dragAndDrop(newTab1, newTab2, false);
|
||||
is(gBrowser.tabs.length, tabCountForOverflow, "tabs are still there");
|
||||
is(gBrowser.tabs[initialTabsLength], newTab2, "newTab2 and newTab1 are swapped");
|
||||
is(gBrowser.tabs[initialTabsLength + 1], newTab1, "newTab1 and newTab2 are swapped");
|
||||
is(gBrowser.tabs[initialTabsLength + 2], newTab3, "newTab3 stays same place");
|
||||
tabs = gBrowser.tabs;
|
||||
is(tabs.length, tabCountForOverflow, "tabs are still there");
|
||||
is(tabs[initialTabsLength], newTab2, "newTab2 and newTab1 are swapped");
|
||||
is(tabs[initialTabsLength + 1], newTab1, "newTab1 and newTab2 are swapped");
|
||||
is(tabs[initialTabsLength + 2], newTab3, "newTab3 stays same place");
|
||||
});
|
||||
|
|
|
@ -92,7 +92,7 @@ browser.jar:
|
|||
content/browser/tabbrowser.css (content/tabbrowser.css)
|
||||
content/browser/tabbrowser.js (content/tabbrowser.js)
|
||||
content/browser/tabbrowser-tab.js (content/tabbrowser-tab.js)
|
||||
content/browser/tabbrowser.xml (content/tabbrowser.xml)
|
||||
content/browser/tabbrowser-tabs.js (content/tabbrowser-tabs.js)
|
||||
* content/browser/urlbarBindings.xml (content/urlbarBindings.xml)
|
||||
content/browser/utilityOverlay.js (content/utilityOverlay.js)
|
||||
content/browser/webext-panels.js (content/webext-panels.js)
|
||||
|
|
|
@ -3,18 +3,23 @@
|
|||
// Testing that when the user opens the add tab menu and clicks menu items
|
||||
// the correct context id is opened
|
||||
|
||||
function findPopup(browser = gBrowser) {
|
||||
return browser.tabContainer.querySelector(".new-tab-popup");
|
||||
}
|
||||
|
||||
add_task(async function test_menu_with_timeout() {
|
||||
await SpecialPowers.pushPrefEnv({"set": [
|
||||
["privacy.userContext.enabled", true],
|
||||
["privacy.userContext.longPressBehavior", 2],
|
||||
]});
|
||||
|
||||
let newTab = document.getElementById("tabbrowser-tabs");
|
||||
let newTabButton = document.getAnonymousElementByAttribute(newTab, "anonid", "tabs-newtab-button");
|
||||
let newTabButton = gBrowser.tabContainer.newTabButton;
|
||||
ok(newTabButton, "New tab button exists");
|
||||
ok(!newTabButton.hidden, "New tab button is visible");
|
||||
await BrowserTestUtils.waitForCondition(() => !!document.getAnonymousElementByAttribute(newTab, "anonid", "newtab-popup"), "Wait for popup to exist");
|
||||
let popup = document.getAnonymousElementByAttribute(newTab, "anonid", "newtab-popup");
|
||||
|
||||
await BrowserTestUtils.waitForCondition(() => !!findPopup(), "Wait for popup to exist");
|
||||
|
||||
let popup = findPopup();
|
||||
|
||||
for (let i = 1; i <= 4; i++) {
|
||||
let popupShownPromise = BrowserTestUtils.waitForEvent(popup, "popupshown");
|
||||
|
@ -41,12 +46,12 @@ add_task(async function test_menu_without_timeout() {
|
|||
["privacy.userContext.longPressBehavior", 1],
|
||||
]});
|
||||
|
||||
let newTab = document.getElementById("tabbrowser-tabs");
|
||||
let newTabButton = document.getAnonymousElementByAttribute(newTab, "anonid", "tabs-newtab-button");
|
||||
let newTabButton = gBrowser.tabContainer.newTabButton;
|
||||
ok(newTabButton, "New tab button exists");
|
||||
ok(!newTabButton.hidden, "New tab button is visible");
|
||||
await BrowserTestUtils.waitForCondition(() => !!document.getAnonymousElementByAttribute(newTab, "anonid", "newtab-popup"), "Wait for popup to exist");
|
||||
let popup = document.getAnonymousElementByAttribute(newTab, "anonid", "newtab-popup");
|
||||
|
||||
await BrowserTestUtils.waitForCondition(() => !!findPopup(), "Wait for popup to exist");
|
||||
let popup = findPopup();
|
||||
|
||||
let popupShownPromise = BrowserTestUtils.waitForEvent(popup, "popupshown");
|
||||
let popupHiddenPromise = BrowserTestUtils.waitForEvent(popup, "popuphidden");
|
||||
|
@ -88,11 +93,10 @@ add_task(async function test_no_menu() {
|
|||
["privacy.userContext.longPressBehavior", 0],
|
||||
]});
|
||||
|
||||
let newTab = document.getElementById("tabbrowser-tabs");
|
||||
let newTabButton = document.getAnonymousElementByAttribute(newTab, "anonid", "tabs-newtab-button");
|
||||
let newTabButton = gBrowser.tabContainer.newTabButton;
|
||||
ok(newTabButton, "New tab button exists");
|
||||
ok(!newTabButton.hidden, "New tab button is visible");
|
||||
let popup = document.getAnonymousElementByAttribute(newTab, "anonid", "newtab-popup");
|
||||
let popup = findPopup();
|
||||
ok(!popup, "new tab should not have a popup");
|
||||
});
|
||||
|
||||
|
@ -100,12 +104,13 @@ add_task(async function test_private_mode() {
|
|||
let privateWindow = await BrowserTestUtils.openNewBrowserWindow({private: true});
|
||||
let privateDocument = privateWindow.document;
|
||||
let {tabContainer} = privateWindow.gBrowser;
|
||||
let newTab = privateDocument.getAnonymousElementByAttribute(tabContainer, "anonid", "tabs-newtab-button");
|
||||
let newTab = tabContainer.newTabButton;
|
||||
let newTab2 = privateDocument.getElementById("new-tab-button");
|
||||
// Check to ensure we are talking about the right button
|
||||
ok(!!newTab.clientWidth, "new tab button should not be hidden");
|
||||
ok(!newTab2.clientWidth, "overflow new tab button should be hidden");
|
||||
let popup = privateDocument.getAnonymousElementByAttribute(newTab, "anonid", "newtab-popup");
|
||||
let popup = findPopup(privateWindow.gBrowser);
|
||||
ok(!popup, "new tab should not have a popup");
|
||||
await BrowserTestUtils.closeWindow(privateWindow);
|
||||
});
|
||||
|
||||
|
|
|
@ -52,8 +52,8 @@ add_task(async function test() {
|
|||
is(browser2.contentPrincipal.userContextId, 2, "Tab2 UCI must be 2");
|
||||
|
||||
let found = false;
|
||||
for (let i = 0; i < gBrowser.tabContainer.children.length; ++i) {
|
||||
let tab = gBrowser.tabContainer.children[i];
|
||||
for (let i = 0; i < gBrowser.tabs.length; ++i) {
|
||||
let tab = gBrowser.tabs[i];
|
||||
let browser = gBrowser.getBrowserForTab(tab);
|
||||
if (browser.contentTitle == "?new") {
|
||||
is(browser.contentPrincipal.userContextId, 1, "Tab3 UCI must be 1");
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*/
|
||||
|
||||
const kGlobalNewTabButton = document.getElementById("new-tab-button");
|
||||
const kInnerNewTabButton = document.getAnonymousElementByAttribute(gBrowser.tabContainer, "anonid", "tabs-newtab-button");
|
||||
const kInnerNewTabButton = gBrowser.tabContainer.newTabButton;
|
||||
|
||||
function assertNewTabButton(which) {
|
||||
if (which == "global") {
|
||||
|
|
|
@ -3,54 +3,78 @@
|
|||
"use strict";
|
||||
|
||||
add_task(async function() {
|
||||
await BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.net/");
|
||||
let window1 = await BrowserTestUtils.openNewBrowserWindow();
|
||||
await BrowserTestUtils.openNewForegroundTab(window1.gBrowser, "http://example.com/");
|
||||
let window2 = await BrowserTestUtils.openNewBrowserWindow({private: true});
|
||||
await BrowserTestUtils.openNewForegroundTab(window2.gBrowser, "http://example.com/");
|
||||
|
||||
let extension = ExtensionTestUtils.loadExtension({
|
||||
manifest: {
|
||||
"permissions": ["tabs"],
|
||||
},
|
||||
incognitoOverride: "spanning",
|
||||
async background() {
|
||||
let tabs = await browser.tabs.query({url: "<all_urls>"});
|
||||
let destination = tabs[0];
|
||||
let source = tabs[1]; // skip over about:blank in window1
|
||||
let privateTab = tabs[2];
|
||||
browser.test.assertTrue(privateTab.incognito, "have a private tab.");
|
||||
const URL = "http://example.com/";
|
||||
let mainWindow = await browser.windows.getCurrent();
|
||||
let newWindow = await browser.windows.create({
|
||||
url: [URL, URL],
|
||||
});
|
||||
let privateWindow = await browser.windows.create({
|
||||
incognito: true,
|
||||
url: [URL, URL],
|
||||
});
|
||||
|
||||
browser.tabs.onUpdated.addListener(() => {
|
||||
// Bug 1398272: Adding onUpdated listener broke tab IDs across windows.
|
||||
});
|
||||
|
||||
let tab = newWindow.tabs[0].id;
|
||||
let privateTab = privateWindow.tabs[0].id;
|
||||
|
||||
// Assuming that this windowId does not exist.
|
||||
await browser.test.assertRejects(
|
||||
browser.tabs.move(source.id, {windowId: 123144576, index: 0}),
|
||||
browser.tabs.move(tab, {windowId: 123144576, index: 0}),
|
||||
/Invalid window/,
|
||||
"Should receive invalid window error");
|
||||
|
||||
// Test that a tab cannot be moved to a private window.
|
||||
let moved = await browser.tabs.move(source.id, {windowId: privateTab.windowId, index: 0});
|
||||
let moved = await browser.tabs.move(tab, {windowId: privateWindow.id, index: 0});
|
||||
browser.test.assertEq(moved.length, 0, "tab was not moved to private window");
|
||||
// Test that a private tab cannot be moved to a non-private window.
|
||||
moved = await browser.tabs.move(privateTab.id, {windowId: source.windowId, index: 0});
|
||||
moved = await browser.tabs.move(privateTab,
|
||||
{windowId: newWindow.id, index: 0});
|
||||
browser.test.assertEq(moved.length, 0, "tab was not moved from private window");
|
||||
|
||||
// Verify tabs did not move between windows via another query.
|
||||
let tabs2 = await browser.tabs.query({url: "<all_urls>"});
|
||||
for (let i = 0; i < 3; i++) {
|
||||
browser.test.assertEq(tabs2[i].windowId, tabs[i].windowId, "tab was not moved to another window");
|
||||
browser.test.assertEq(tabs2[i].incognito, tabs[i].incognito, "tab privateness matches.");
|
||||
let windows = await browser.windows.getAll({populate: true});
|
||||
let newWin2 = windows.find(w => w.id === newWindow.id);
|
||||
browser.test.assertTrue(newWin2, "Found window");
|
||||
browser.test.assertEq(newWin2.tabs.length, 2, "Window still has two tabs");
|
||||
for (let origTab of newWindow.tabs) {
|
||||
browser.test.assertTrue(newWin2.tabs.find(t => t.id === origTab.id),
|
||||
`Window still has tab ${origTab.id}`);
|
||||
}
|
||||
|
||||
browser.tabs.move(source.id, {windowId: destination.windowId, index: 0});
|
||||
let privateWin2 = windows.find(w => w.id === privateWindow.id);
|
||||
browser.test.assertTrue(privateWin2 !== null, "Found private window");
|
||||
browser.test.assertEq(privateWin2.incognito, true,
|
||||
"Private window is still private");
|
||||
browser.test.assertEq(privateWin2.tabs.length, 2,
|
||||
"Private window still has two tabs");
|
||||
for (let origTab of privateWindow.tabs) {
|
||||
browser.test.assertTrue(privateWin2.tabs.find(t => t.id === origTab.id),
|
||||
`Private window still has tab ${origTab.id}`);
|
||||
}
|
||||
|
||||
tabs = await browser.tabs.query({url: "<all_urls>"});
|
||||
browser.test.assertEq(tabs[0].url, "http://example.com/");
|
||||
browser.test.assertEq(tabs[0].windowId, destination.windowId);
|
||||
browser.test.assertEq(tabs[0].id, source.id);
|
||||
// Move a tab from one non-private window to another
|
||||
await browser.tabs.move(tab, {windowId: mainWindow.id, index: 0});
|
||||
|
||||
mainWindow = await browser.windows.get(mainWindow.id, {populate: true});
|
||||
browser.test.assertTrue(mainWindow.tabs.find(t => t.id === tab),
|
||||
"Moved tab is in main window");
|
||||
|
||||
newWindow = await browser.windows.get(newWindow.id, {populate: true});
|
||||
browser.test.assertEq(newWindow.tabs.length, 1, "New window has 1 tab left");
|
||||
browser.test.assertTrue(newWindow.tabs[0].id != tab, "Moved tab is no longer in original window");
|
||||
|
||||
await browser.windows.remove(newWindow.id);
|
||||
await browser.windows.remove(privateWindow.id);
|
||||
await browser.tabs.remove(tab);
|
||||
|
||||
browser.test.notifyPass("tabs.move.window");
|
||||
},
|
||||
|
@ -59,12 +83,6 @@ add_task(async function() {
|
|||
await extension.startup();
|
||||
await extension.awaitFinish("tabs.move.window");
|
||||
await extension.unload();
|
||||
|
||||
for (let tab of window.gBrowser.tabs) {
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
}
|
||||
await BrowserTestUtils.closeWindow(window1);
|
||||
await BrowserTestUtils.closeWindow(window2);
|
||||
});
|
||||
|
||||
add_task(async function test_currentWindowAfterTabMoved() {
|
||||
|
|
|
@ -3,41 +3,46 @@
|
|||
"use strict";
|
||||
|
||||
add_task(async function() {
|
||||
let window1 = await BrowserTestUtils.openNewBrowserWindow();
|
||||
await BrowserTestUtils.openNewForegroundTab(window.gBrowser, "http://example.net/");
|
||||
await BrowserTestUtils.openNewForegroundTab(window.gBrowser, "http://example.com/");
|
||||
await BrowserTestUtils.openNewForegroundTab(window1.gBrowser, "http://example.net/");
|
||||
await BrowserTestUtils.openNewForegroundTab(window1.gBrowser, "http://example.com/");
|
||||
|
||||
let extension = ExtensionTestUtils.loadExtension({
|
||||
manifest: {
|
||||
"permissions": ["tabs"],
|
||||
},
|
||||
|
||||
background: function() {
|
||||
browser.tabs.query(
|
||||
{url: "<all_urls>"},
|
||||
tabs => {
|
||||
let move1 = tabs[1];
|
||||
let move3 = tabs[3];
|
||||
browser.tabs.move([move1.id, move3.id], {index: 0});
|
||||
browser.tabs.query(
|
||||
{url: "<all_urls>"},
|
||||
tabs => {
|
||||
browser.test.assertEq(tabs[0].url, move1.url);
|
||||
browser.test.assertEq(tabs[2].url, move3.url);
|
||||
browser.test.notifyPass("tabs.move.multiple");
|
||||
});
|
||||
});
|
||||
async background() {
|
||||
const URL = "http://example.com/";
|
||||
let mainWin = await browser.windows.getCurrent();
|
||||
let tab1 = await browser.tabs.create({url: URL});
|
||||
let tab2 = await browser.tabs.create({url: URL});
|
||||
|
||||
let newWin = await browser.windows.create({url: [URL, URL]});
|
||||
browser.test.assertEq(newWin.tabs.length, 2, "New window has 2 tabs");
|
||||
let [tab3, tab4] = newWin.tabs;
|
||||
|
||||
// move tabs in both windows to index 0 in a single call
|
||||
await browser.tabs.move([tab2.id, tab4.id], {index: 0});
|
||||
|
||||
tab1 = await browser.tabs.get(tab1.id);
|
||||
browser.test.assertEq(tab1.windowId, mainWin.id, "tab 1 is still in main window");
|
||||
|
||||
tab2 = await browser.tabs.get(tab2.id);
|
||||
browser.test.assertEq(tab2.windowId, mainWin.id, "tab 2 is still in main window");
|
||||
browser.test.assertEq(tab2.index, 0, "tab 2 moved to index 0");
|
||||
|
||||
tab3 = await browser.tabs.get(tab3.id);
|
||||
browser.test.assertEq(tab3.windowId, newWin.id, "tab 3 is still in new window");
|
||||
|
||||
tab4 = await browser.tabs.get(tab4.id);
|
||||
browser.test.assertEq(tab4.windowId, newWin.id, "tab 4 is still in new window");
|
||||
browser.test.assertEq(tab4.index, 0, "tab 4 moved to index 0");
|
||||
|
||||
await browser.tabs.remove([tab1.id, tab2.id]);
|
||||
await browser.windows.remove(newWin.id);
|
||||
|
||||
browser.test.notifyPass("tabs.move.multiple");
|
||||
},
|
||||
});
|
||||
|
||||
await extension.startup();
|
||||
await extension.awaitFinish("tabs.move.multiple");
|
||||
await extension.unload();
|
||||
|
||||
for (let tab of window.gBrowser.tabs) {
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
}
|
||||
await BrowserTestUtils.closeWindow(window1);
|
||||
});
|
||||
|
|
|
@ -3,40 +3,35 @@
|
|||
"use strict";
|
||||
|
||||
add_task(async function() {
|
||||
await BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.net/");
|
||||
let window1 = await BrowserTestUtils.openNewBrowserWindow();
|
||||
let tab1 = await BrowserTestUtils.openNewForegroundTab(window1.gBrowser, "http://example.com/");
|
||||
window1.gBrowser.pinTab(tab1);
|
||||
|
||||
let extension = ExtensionTestUtils.loadExtension({
|
||||
manifest: {
|
||||
"permissions": ["tabs"],
|
||||
},
|
||||
|
||||
background: function() {
|
||||
browser.tabs.query(
|
||||
{url: "<all_urls>"},
|
||||
tabs => {
|
||||
let destination = tabs[0];
|
||||
let source = tabs[1]; // remember, pinning moves it to the left.
|
||||
browser.tabs.move(source.id, {windowId: destination.windowId, index: 0});
|
||||
async background() {
|
||||
const URL = "http://example.com/";
|
||||
|
||||
browser.tabs.query(
|
||||
{url: "<all_urls>"},
|
||||
tabs => {
|
||||
browser.test.assertEq(true, tabs[0].pinned);
|
||||
browser.test.notifyPass("tabs.move.pin");
|
||||
});
|
||||
});
|
||||
let mainWin = await browser.windows.getCurrent();
|
||||
let tab = await browser.tabs.create({url: URL});
|
||||
|
||||
let newWin = await browser.windows.create({url: URL});
|
||||
let tab2 = newWin.tabs[0];
|
||||
await browser.tabs.update(tab2.id, {pinned: true});
|
||||
|
||||
// Try to move a tab before the pinned tab. The move should be ignored.
|
||||
let moved = await browser.tabs.move(tab.id, {windowId: newWin.id, index: 0});
|
||||
browser.test.assertEq(moved.length, 0, "move() returned no moved tab");
|
||||
|
||||
tab = await browser.tabs.get(tab.id);
|
||||
browser.test.assertEq(tab.windowId, mainWin.id, "Tab stayed in its original window");
|
||||
|
||||
await browser.tabs.remove(tab.id);
|
||||
await browser.windows.remove(newWin.id);
|
||||
browser.test.notifyPass("tabs.move.pin");
|
||||
},
|
||||
});
|
||||
|
||||
await extension.startup();
|
||||
await extension.awaitFinish("tabs.move.pin");
|
||||
await extension.unload();
|
||||
|
||||
for (let tab of window.gBrowser.tabs) {
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
}
|
||||
await BrowserTestUtils.closeWindow(window1);
|
||||
});
|
||||
|
|
|
@ -90,7 +90,7 @@ add_task(async function test_sidebarpanels_click() {
|
|||
|
||||
// Remove tabs created by sub-tests.
|
||||
while (gBrowser.tabs.length > 1) {
|
||||
gBrowser.removeTab(gBrowser.tabContainer.lastElementChild);
|
||||
gBrowser.removeTab(gBrowser.tabs[gBrowser.tabs.length - 1]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -150,7 +150,7 @@ function ensure_opentabs_match_db() {
|
|||
if (browserWin.closed)
|
||||
continue;
|
||||
|
||||
for (let i = 0; i < browserWin.gBrowser.tabContainer.childElementCount; i++) {
|
||||
for (let i = 0; i < browserWin.gBrowser.tabs.length; i++) {
|
||||
let browser = browserWin.gBrowser.getBrowserAtIndex(i);
|
||||
let url = browser.currentURI.spec;
|
||||
if (browserWin.isBlankPageURL(url))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
This is the PDF.js project output, https://github.com/mozilla/pdf.js
|
||||
|
||||
Current extension version is: 2.2.207
|
||||
Current extension version is: 2.2.213
|
||||
|
||||
Taken from upstream commit: 73482750
|
||||
Taken from upstream commit: 2cc0bfd1
|
||||
|
|
|
@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
"use strict";
|
||||
|
||||
|
||||
var pdfjsVersion = '2.2.207';
|
||||
var pdfjsBuild = '73482750';
|
||||
var pdfjsVersion = '2.2.213';
|
||||
var pdfjsBuild = '2cc0bfd1';
|
||||
|
||||
var pdfjsSharedUtil = __w_pdfjs_require__(1);
|
||||
|
||||
|
@ -1304,7 +1304,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
|
|||
|
||||
return worker.messageHandler.sendWithPromise('GetDocRequest', {
|
||||
docId,
|
||||
apiVersion: '2.2.207',
|
||||
apiVersion: '2.2.213',
|
||||
source: {
|
||||
data: source.data,
|
||||
url: source.url,
|
||||
|
@ -3100,9 +3100,9 @@ const InternalRenderTask = function InternalRenderTaskClosure() {
|
|||
return InternalRenderTask;
|
||||
}();
|
||||
|
||||
const version = '2.2.207';
|
||||
const version = '2.2.213';
|
||||
exports.version = version;
|
||||
const build = '73482750';
|
||||
const build = '2cc0bfd1';
|
||||
exports.build = build;
|
||||
|
||||
/***/ }),
|
||||
|
|
|
@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
"use strict";
|
||||
|
||||
|
||||
const pdfjsVersion = '2.2.207';
|
||||
const pdfjsBuild = '73482750';
|
||||
const pdfjsVersion = '2.2.213';
|
||||
const pdfjsBuild = '2cc0bfd1';
|
||||
|
||||
const pdfjsCoreWorker = __w_pdfjs_require__(1);
|
||||
|
||||
|
@ -152,6 +152,8 @@ var _is_node = _interopRequireDefault(__w_pdfjs_require__(47));
|
|||
|
||||
var _message_handler = __w_pdfjs_require__(48);
|
||||
|
||||
var _worker_stream = __w_pdfjs_require__(49);
|
||||
|
||||
var _core_utils = __w_pdfjs_require__(10);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
@ -187,146 +189,6 @@ var WorkerTask = function WorkerTaskClosure() {
|
|||
}();
|
||||
|
||||
exports.WorkerTask = WorkerTask;
|
||||
|
||||
var PDFWorkerStream = function PDFWorkerStreamClosure() {
|
||||
function PDFWorkerStream(msgHandler) {
|
||||
this._msgHandler = msgHandler;
|
||||
this._contentLength = null;
|
||||
this._fullRequestReader = null;
|
||||
this._rangeRequestReaders = [];
|
||||
}
|
||||
|
||||
PDFWorkerStream.prototype = {
|
||||
getFullReader() {
|
||||
(0, _util.assert)(!this._fullRequestReader);
|
||||
this._fullRequestReader = new PDFWorkerStreamReader(this._msgHandler);
|
||||
return this._fullRequestReader;
|
||||
},
|
||||
|
||||
getRangeReader(begin, end) {
|
||||
let reader = new PDFWorkerStreamRangeReader(begin, end, this._msgHandler);
|
||||
|
||||
this._rangeRequestReaders.push(reader);
|
||||
|
||||
return reader;
|
||||
},
|
||||
|
||||
cancelAllRequests(reason) {
|
||||
if (this._fullRequestReader) {
|
||||
this._fullRequestReader.cancel(reason);
|
||||
}
|
||||
|
||||
let readers = this._rangeRequestReaders.slice(0);
|
||||
|
||||
readers.forEach(function (reader) {
|
||||
reader.cancel(reason);
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
function PDFWorkerStreamReader(msgHandler) {
|
||||
this._msgHandler = msgHandler;
|
||||
this._contentLength = null;
|
||||
this._isRangeSupported = false;
|
||||
this._isStreamingSupported = false;
|
||||
|
||||
let readableStream = this._msgHandler.sendWithStream('GetReader');
|
||||
|
||||
this._reader = readableStream.getReader();
|
||||
this._headersReady = this._msgHandler.sendWithPromise('ReaderHeadersReady').then(data => {
|
||||
this._isStreamingSupported = data.isStreamingSupported;
|
||||
this._isRangeSupported = data.isRangeSupported;
|
||||
this._contentLength = data.contentLength;
|
||||
});
|
||||
}
|
||||
|
||||
PDFWorkerStreamReader.prototype = {
|
||||
get headersReady() {
|
||||
return this._headersReady;
|
||||
},
|
||||
|
||||
get contentLength() {
|
||||
return this._contentLength;
|
||||
},
|
||||
|
||||
get isStreamingSupported() {
|
||||
return this._isStreamingSupported;
|
||||
},
|
||||
|
||||
get isRangeSupported() {
|
||||
return this._isRangeSupported;
|
||||
},
|
||||
|
||||
read() {
|
||||
return this._reader.read().then(function ({
|
||||
value,
|
||||
done
|
||||
}) {
|
||||
if (done) {
|
||||
return {
|
||||
value: undefined,
|
||||
done: true
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
value: value.buffer,
|
||||
done: false
|
||||
};
|
||||
});
|
||||
},
|
||||
|
||||
cancel(reason) {
|
||||
this._reader.cancel(reason);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
function PDFWorkerStreamRangeReader(begin, end, msgHandler) {
|
||||
this._msgHandler = msgHandler;
|
||||
this.onProgress = null;
|
||||
|
||||
let readableStream = this._msgHandler.sendWithStream('GetRangeReader', {
|
||||
begin,
|
||||
end
|
||||
});
|
||||
|
||||
this._reader = readableStream.getReader();
|
||||
}
|
||||
|
||||
PDFWorkerStreamRangeReader.prototype = {
|
||||
get isStreamingSupported() {
|
||||
return false;
|
||||
},
|
||||
|
||||
read() {
|
||||
return this._reader.read().then(function ({
|
||||
value,
|
||||
done
|
||||
}) {
|
||||
if (done) {
|
||||
return {
|
||||
value: undefined,
|
||||
done: true
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
value: value.buffer,
|
||||
done: false
|
||||
};
|
||||
});
|
||||
},
|
||||
|
||||
cancel(reason) {
|
||||
this._reader.cancel(reason);
|
||||
}
|
||||
|
||||
};
|
||||
return PDFWorkerStream;
|
||||
}();
|
||||
|
||||
var WorkerMessageHandler = {
|
||||
setup(handler, port) {
|
||||
var testMessageProcessed = false;
|
||||
|
@ -378,7 +240,7 @@ var WorkerMessageHandler = {
|
|||
var WorkerTasks = [];
|
||||
const verbosity = (0, _util.getVerbosityLevel)();
|
||||
let apiVersion = docParams.apiVersion;
|
||||
let workerVersion = '2.2.207';
|
||||
let workerVersion = '2.2.213';
|
||||
|
||||
if (apiVersion !== workerVersion) {
|
||||
throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`);
|
||||
|
@ -442,7 +304,7 @@ var WorkerMessageHandler = {
|
|||
cachedChunks = [];
|
||||
|
||||
try {
|
||||
pdfStream = new PDFWorkerStream(handler);
|
||||
pdfStream = new _worker_stream.PDFWorkerStream(handler);
|
||||
} catch (ex) {
|
||||
pdfManagerCapability.reject(ex);
|
||||
return pdfManagerCapability.promise;
|
||||
|
@ -5196,7 +5058,12 @@ var XRef = function XRefClosure() {
|
|||
|
||||
for (i = 0, ii = trailers.length; i < ii; ++i) {
|
||||
stream.pos = trailers[i];
|
||||
var parser = new _parser.Parser(new _parser.Lexer(stream), true, this, true);
|
||||
const parser = new _parser.Parser({
|
||||
lexer: new _parser.Lexer(stream),
|
||||
xref: this,
|
||||
allowStreams: true,
|
||||
recoveryMode: true
|
||||
});
|
||||
var obj = parser.getObj();
|
||||
|
||||
if (!(0, _primitives.isCmd)(obj, 'trailer')) {
|
||||
|
@ -5254,7 +5121,11 @@ var XRef = function XRefClosure() {
|
|||
|
||||
startXRefParsedCache[startXRef] = true;
|
||||
stream.pos = startXRef + stream.start;
|
||||
var parser = new _parser.Parser(new _parser.Lexer(stream), true, this);
|
||||
const parser = new _parser.Parser({
|
||||
lexer: new _parser.Lexer(stream),
|
||||
xref: this,
|
||||
allowStreams: true
|
||||
});
|
||||
var obj = parser.getObj();
|
||||
var dict;
|
||||
|
||||
|
@ -5382,7 +5253,11 @@ var XRef = function XRefClosure() {
|
|||
}
|
||||
|
||||
var stream = this.stream.makeSubStream(xrefEntry.offset + this.stream.start);
|
||||
var parser = new _parser.Parser(new _parser.Lexer(stream), true, this);
|
||||
const parser = new _parser.Parser({
|
||||
lexer: new _parser.Lexer(stream),
|
||||
xref: this,
|
||||
allowStreams: true
|
||||
});
|
||||
var obj1 = parser.getObj();
|
||||
var obj2 = parser.getObj();
|
||||
var obj3 = parser.getObj();
|
||||
|
@ -5439,8 +5314,11 @@ var XRef = function XRefClosure() {
|
|||
throw new _util.FormatError('invalid first and n parameters for ObjStm stream');
|
||||
}
|
||||
|
||||
var parser = new _parser.Parser(new _parser.Lexer(stream), false, this);
|
||||
parser.allowStreams = true;
|
||||
const parser = new _parser.Parser({
|
||||
lexer: new _parser.Lexer(stream),
|
||||
xref: this,
|
||||
allowStreams: true
|
||||
});
|
||||
var i,
|
||||
entries = [],
|
||||
num,
|
||||
|
@ -5950,10 +5828,15 @@ function computeAdler32(bytes) {
|
|||
}
|
||||
|
||||
class Parser {
|
||||
constructor(lexer, allowStreams, xref, recoveryMode = false) {
|
||||
constructor({
|
||||
lexer,
|
||||
xref,
|
||||
allowStreams = false,
|
||||
recoveryMode = false
|
||||
}) {
|
||||
this.lexer = lexer;
|
||||
this.allowStreams = allowStreams;
|
||||
this.xref = xref;
|
||||
this.allowStreams = allowStreams;
|
||||
this.recoveryMode = recoveryMode;
|
||||
this.imageCache = Object.create(null);
|
||||
this.refill();
|
||||
|
@ -6648,7 +6531,7 @@ function toHexDigit(ch) {
|
|||
}
|
||||
|
||||
class Lexer {
|
||||
constructor(stream, knownCommands) {
|
||||
constructor(stream, knownCommands = null) {
|
||||
this.stream = stream;
|
||||
this.nextChar();
|
||||
this.strBuf = [];
|
||||
|
@ -7155,7 +7038,10 @@ class Linearization {
|
|||
throw new Error('Hint array in the linearization dictionary is invalid.');
|
||||
}
|
||||
|
||||
const parser = new Parser(new Lexer(stream), false, null);
|
||||
const parser = new Parser({
|
||||
lexer: new Lexer(stream),
|
||||
xref: null
|
||||
});
|
||||
const obj1 = parser.getObj();
|
||||
const obj2 = parser.getObj();
|
||||
const obj3 = parser.getObj();
|
||||
|
@ -23015,7 +22901,10 @@ var EvaluatorPreprocessor = function EvaluatorPreprocessorClosure() {
|
|||
|
||||
function EvaluatorPreprocessor(stream, xref, stateManager) {
|
||||
this.opMap = getOPMap();
|
||||
this.parser = new _parser.Parser(new _parser.Lexer(stream, this.opMap), false, xref);
|
||||
this.parser = new _parser.Parser({
|
||||
lexer: new _parser.Lexer(stream, this.opMap),
|
||||
xref
|
||||
});
|
||||
this.stateManager = stateManager;
|
||||
this.nonProcessedArgs = [];
|
||||
this._numInvalidPathOPS = 0;
|
||||
|
@ -45101,6 +44990,159 @@ MessageHandler.prototype = {
|
|||
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 49 */
|
||||
/***/ (function(module, exports, __w_pdfjs_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.PDFWorkerStream = void 0;
|
||||
|
||||
var _util = __w_pdfjs_require__(2);
|
||||
|
||||
class PDFWorkerStream {
|
||||
constructor(msgHandler) {
|
||||
this._msgHandler = msgHandler;
|
||||
this._contentLength = null;
|
||||
this._fullRequestReader = null;
|
||||
this._rangeRequestReaders = [];
|
||||
}
|
||||
|
||||
getFullReader() {
|
||||
(0, _util.assert)(!this._fullRequestReader);
|
||||
this._fullRequestReader = new PDFWorkerStreamReader(this._msgHandler);
|
||||
return this._fullRequestReader;
|
||||
}
|
||||
|
||||
getRangeReader(begin, end) {
|
||||
const reader = new PDFWorkerStreamRangeReader(begin, end, this._msgHandler);
|
||||
|
||||
this._rangeRequestReaders.push(reader);
|
||||
|
||||
return reader;
|
||||
}
|
||||
|
||||
cancelAllRequests(reason) {
|
||||
if (this._fullRequestReader) {
|
||||
this._fullRequestReader.cancel(reason);
|
||||
}
|
||||
|
||||
const readers = this._rangeRequestReaders.slice(0);
|
||||
|
||||
readers.forEach(function (reader) {
|
||||
reader.cancel(reason);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.PDFWorkerStream = PDFWorkerStream;
|
||||
|
||||
class PDFWorkerStreamReader {
|
||||
constructor(msgHandler) {
|
||||
this._msgHandler = msgHandler;
|
||||
this.onProgress = null;
|
||||
this._contentLength = null;
|
||||
this._isRangeSupported = false;
|
||||
this._isStreamingSupported = false;
|
||||
|
||||
const readableStream = this._msgHandler.sendWithStream('GetReader');
|
||||
|
||||
this._reader = readableStream.getReader();
|
||||
this._headersReady = this._msgHandler.sendWithPromise('ReaderHeadersReady').then(data => {
|
||||
this._isStreamingSupported = data.isStreamingSupported;
|
||||
this._isRangeSupported = data.isRangeSupported;
|
||||
this._contentLength = data.contentLength;
|
||||
});
|
||||
}
|
||||
|
||||
get headersReady() {
|
||||
return this._headersReady;
|
||||
}
|
||||
|
||||
get contentLength() {
|
||||
return this._contentLength;
|
||||
}
|
||||
|
||||
get isStreamingSupported() {
|
||||
return this._isStreamingSupported;
|
||||
}
|
||||
|
||||
get isRangeSupported() {
|
||||
return this._isRangeSupported;
|
||||
}
|
||||
|
||||
async read() {
|
||||
const {
|
||||
value,
|
||||
done
|
||||
} = await this._reader.read();
|
||||
|
||||
if (done) {
|
||||
return {
|
||||
value: undefined,
|
||||
done: true
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
value: value.buffer,
|
||||
done: false
|
||||
};
|
||||
}
|
||||
|
||||
cancel(reason) {
|
||||
this._reader.cancel(reason);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class PDFWorkerStreamRangeReader {
|
||||
constructor(begin, end, msgHandler) {
|
||||
this._msgHandler = msgHandler;
|
||||
this.onProgress = null;
|
||||
|
||||
const readableStream = this._msgHandler.sendWithStream('GetRangeReader', {
|
||||
begin,
|
||||
end
|
||||
});
|
||||
|
||||
this._reader = readableStream.getReader();
|
||||
}
|
||||
|
||||
get isStreamingSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
async read() {
|
||||
const {
|
||||
value,
|
||||
done
|
||||
} = await this._reader.read();
|
||||
|
||||
if (done) {
|
||||
return {
|
||||
value: undefined,
|
||||
done: true
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
value: value.buffer,
|
||||
done: false
|
||||
};
|
||||
}
|
||||
|
||||
cancel(reason) {
|
||||
this._reader.cancel(reason);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
});
|
|
@ -20,7 +20,7 @@ origin:
|
|||
|
||||
# Human-readable identifier for this version/release
|
||||
# Generally "version NNN", "tag SSS", "bookmark SSS"
|
||||
release: version 2.2.207
|
||||
release: version 2.2.213
|
||||
|
||||
# The package's license, where possible using the mnemonic from
|
||||
# https://spdx.org/licenses/
|
||||
|
|
|
@ -58,11 +58,11 @@ function test() {
|
|||
checkSelectedTab();
|
||||
|
||||
// Remove #3 (non active)
|
||||
gBrowser.removeTab(gBrowser.tabContainer.lastElementChild);
|
||||
gBrowser.removeTab(gBrowser.tabs[gBrowser.tabs.length - 1]);
|
||||
checkPreviews(2, "Expected number of previews after closing unselected via browser");
|
||||
|
||||
// Remove #1 (active)
|
||||
gBrowser.removeTab(gBrowser.tabContainer.firstElementChild);
|
||||
gBrowser.removeTab(gBrowser.tabs[0]);
|
||||
checkPreviews(1, "Expected number of previews after closing selected tab via browser");
|
||||
|
||||
// Add a new tab
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
#tabbrowser-tabs,
|
||||
#tabbrowser-tabs > .tabbrowser-arrowscrollbox,
|
||||
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned] {
|
||||
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-arrowscrollbox > .tabbrowser-tab[pinned] {
|
||||
min-height: var(--tab-min-height);
|
||||
}
|
||||
|
||||
|
@ -537,8 +537,8 @@
|
|||
*/
|
||||
|
||||
/* Lightweight theme on tabs */
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background[multiselected=true]:-moz-lwtheme,
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background[selected=true]:-moz-lwtheme {
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-arrowscrollbox > .tabbrowser-tab > .tab-stack > .tab-background[multiselected=true]:-moz-lwtheme,
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-arrowscrollbox > .tabbrowser-tab > .tab-stack > .tab-background[selected=true]:-moz-lwtheme {
|
||||
background-attachment: scroll, scroll, fixed;
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient(var(--lwt-selected-tab-background-color, transparent), var(--lwt-selected-tab-background-color, transparent)),
|
||||
|
@ -582,19 +582,19 @@
|
|||
/* Pinned tabs */
|
||||
|
||||
/* Pinned tab separators need position: absolute when positioned (during overflow). */
|
||||
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned]::after {
|
||||
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-arrowscrollbox > .tabbrowser-tab[pinned]::after {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned]:-moz-locale-dir(rtl)::after {
|
||||
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-arrowscrollbox > .tabbrowser-tab[pinned]:-moz-locale-dir(rtl)::after {
|
||||
right: unset;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned] > .tab-stack {
|
||||
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-arrowscrollbox > .tabbrowser-tab[pinned] > .tab-stack {
|
||||
border-inline-end: 1px solid transparent;
|
||||
}
|
||||
|
||||
|
@ -664,16 +664,16 @@
|
|||
%endif
|
||||
/* Show full height tab separators on hover and multiselection. */
|
||||
.tabbrowser-tab:hover::after,
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab[beforehovered]::after,
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-arrowscrollbox > .tabbrowser-tab[beforehovered]::after,
|
||||
.tabbrowser-tab[multiselected]::after,
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab[before-multiselected]::after {
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-arrowscrollbox > .tabbrowser-tab[before-multiselected]::after {
|
||||
margin-top: var(--tabs-top-border-width);
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* Show full height tab separators on selected tabs. */
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab[beforeselected-visible]::after,
|
||||
#tabbrowser-tabs[movingtab] > .tabbrowser-tab[visuallyselected]::before,
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-arrowscrollbox > .tabbrowser-tab[beforeselected-visible]::after,
|
||||
#tabbrowser-tabs[movingtab] > .tabbrowser-arrowscrollbox > .tabbrowser-tab[visuallyselected]::before,
|
||||
.tabbrowser-tab[visuallyselected]::after {
|
||||
border-color: var(--tabs-border-color);
|
||||
margin-top: 0;
|
||||
|
@ -683,7 +683,7 @@
|
|||
|
||||
.tabbrowser-tab::after,
|
||||
/* Also show separators beside the selected tab when dragging it. */
|
||||
#tabbrowser-tabs[movingtab] > .tabbrowser-tab[visuallyselected]::before {
|
||||
#tabbrowser-tabs[movingtab] > .tabbrowser-arrowscrollbox > .tabbrowser-tab[visuallyselected]::before {
|
||||
content: "";
|
||||
display: -moz-box;
|
||||
}
|
||||
|
|
|
@ -59,8 +59,7 @@ var Tabs = {
|
|||
browserWindow.gBrowser.selectTabAtIndex(5);
|
||||
hoverTab(browserWindow.gBrowser.tabs[2]);
|
||||
// also hover the new tab button
|
||||
let newTabButton = browserWindow.document.getAnonymousElementByAttribute(browserWindow.
|
||||
gBrowser.tabContainer, "anonid", "tabs-newtab-button");
|
||||
let newTabButton = browserWindow.gBrowser.tabContainer.newTabButton;
|
||||
hoverTab(newTabButton);
|
||||
browserWindow.gBrowser.tabs[browserWindow.gBrowser.tabs.length - 1].
|
||||
setAttribute("beforehovered", true);
|
||||
|
@ -197,7 +196,7 @@ function closeAllButOneTab(url = "about:blank") {
|
|||
});
|
||||
if (gBrowser.selectedTab.pinned)
|
||||
gBrowser.unpinTab(gBrowser.selectedTab);
|
||||
let newTabButton = browserWindow.document.getAnonymousElementByAttribute(browserWindow.gBrowser.tabContainer, "class", "tabs-newtab-button toolbarbutton-1");
|
||||
let newTabButton = gBrowser.tabContainer.newTabButton;
|
||||
hoverTab(newTabButton, false);
|
||||
}
|
||||
|
||||
|
|
|
@ -473,6 +473,37 @@ class MarkupContextMenu {
|
|||
return copySubmenu;
|
||||
}
|
||||
|
||||
_getDOMBreakpointSubmenu(isSelectionElement) {
|
||||
const menu = new Menu();
|
||||
const mutationBreakpoints = this.selection.nodeFront.mutationBreakpoints;
|
||||
|
||||
menu.append(new MenuItem({
|
||||
checked: mutationBreakpoints.subtree,
|
||||
click: () => this.markup.toggleMutationBreakpoint("subtree"),
|
||||
disabled: !isSelectionElement,
|
||||
label: INSPECTOR_L10N.getStr("inspectorSubtreeModification.label"),
|
||||
type: "checkbox",
|
||||
}));
|
||||
|
||||
menu.append(new MenuItem({
|
||||
checked: mutationBreakpoints.attribute,
|
||||
click: () => this.markup.toggleMutationBreakpoint("attribute"),
|
||||
disabled: !isSelectionElement,
|
||||
label: INSPECTOR_L10N.getStr("inspectorAttributeModification.label"),
|
||||
type: "checkbox",
|
||||
}));
|
||||
|
||||
menu.append(new MenuItem({
|
||||
checked: mutationBreakpoints.removal,
|
||||
click: () => this.markup.toggleMutationBreakpoint("removal"),
|
||||
disabled: !isSelectionElement,
|
||||
label: INSPECTOR_L10N.getStr("inspectorNodeRemoval.label"),
|
||||
type: "checkbox",
|
||||
}));
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
/**
|
||||
* Link menu items can be shown or hidden depending on the context and
|
||||
* selected node, and their labels can vary.
|
||||
|
@ -673,6 +704,14 @@ class MarkupContextMenu {
|
|||
type: "separator",
|
||||
}));
|
||||
|
||||
if (Services.prefs.getBoolPref("devtools.markup.mutationBreakpoints.enabled") &&
|
||||
this.selection.nodeFront.mutationBreakpoints) {
|
||||
menu.append(new MenuItem({
|
||||
label: INSPECTOR_L10N.getStr("inspectorBreakpointSubmenu.label"),
|
||||
submenu: this._getDOMBreakpointSubmenu(isSelectionElement),
|
||||
}));
|
||||
}
|
||||
|
||||
menu.append(new MenuItem({
|
||||
id: "node-menu-useinconsole",
|
||||
label: INSPECTOR_L10N.getStr("inspectorUseInConsole.label"),
|
||||
|
|
|
@ -1136,6 +1136,18 @@ MarkupView.prototype = {
|
|||
this.inspector.selection.nodeFront.scrollIntoView();
|
||||
},
|
||||
|
||||
async toggleMutationBreakpoint(name) {
|
||||
if (!this.inspector.selection.isElementNode()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const nodeFront = this.inspector.selection.nodeFront;
|
||||
const mutationBreakpoints = nodeFront.mutationBreakpoints;
|
||||
await this.walker.setMutationBreakpoints(nodeFront, {
|
||||
[name]: !mutationBreakpoints[name],
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* If an editable item is focused, select its container.
|
||||
*/
|
||||
|
|
|
@ -294,6 +294,25 @@ inspectorAddAttribute.accesskey=A
|
|||
# shown in the inspector contextual-menu for the sub-menu of the pseudo-classes.
|
||||
inspectorPseudoClassSubmenu.label=Change Pseudo-class
|
||||
|
||||
# LOCALIZATION NOTE (inspectorBreakpointSubmenu.label): This is the label
|
||||
# shown in the inspector contextual-menu for the sub-menu of the DOM breakpoints.
|
||||
inspectorBreakpointSubmenu.label=Break on…
|
||||
|
||||
# LOCALIZATION NOTE (inspectorSubtreeModification.label): This is the label shown
|
||||
# in the inspector contextual-menu for the item that lets users add a DOM breakpoint
|
||||
# for subtree modification.
|
||||
inspectorSubtreeModification.label=Subtree Modification
|
||||
|
||||
# LOCALIZATION NOTE (inspectorAttributeModification.label): This is the label shown
|
||||
# in the inspector contextual-menu for the item that lets users add a DOM breakpoint
|
||||
# for attribute modification.
|
||||
inspectorAttributeModification.label=Attribute Modification
|
||||
|
||||
# LOCALIZATION NOTE (inspectorNodeRemoval.label): This is the label shown
|
||||
# in the inspector contextual-menu for the item that lets users add a DOM breakpoint
|
||||
# for node removal.
|
||||
inspectorNodeRemoval.label=Node Removal
|
||||
|
||||
# LOCALIZATION NOTE (inspectorSearchHTML.label3): This is the label that is
|
||||
# shown as the placeholder for the markup view search in the inspector.
|
||||
inspectorSearchHTML.label3=Search HTML
|
||||
|
|
|
@ -81,12 +81,12 @@ pref("devtools.eyedropper.zoom", 6);
|
|||
|
||||
// Enable to collapse attributes that are too long.
|
||||
pref("devtools.markup.collapseAttributes", true);
|
||||
|
||||
// Length to collapse attributes
|
||||
pref("devtools.markup.collapseAttributeLength", 120);
|
||||
|
||||
// Whether to auto-beautify the HTML on copy.
|
||||
pref("devtools.markup.beautifyOnCopy", false);
|
||||
// Whether or not the DOM mutation breakpoints context menu are enabled in the markup view
|
||||
pref("devtools.markup.mutationBreakpoints.enabled", false);
|
||||
|
||||
// DevTools default color unit
|
||||
pref("devtools.defaultColorUnit", "authored");
|
||||
|
|
|
@ -534,16 +534,6 @@ const NodeActor = protocol.ActorClassWithSpec(nodeSpec, {
|
|||
innerHeight: win.innerHeight,
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* The breakpoint values to toggle off and on for this node. Only
|
||||
* breakpoint types specified in 'bps' will be toggled.
|
||||
*
|
||||
* @param {Object} bps The subset of bp types to set the state for.
|
||||
*/
|
||||
setMutationBreakpoints(bps) {
|
||||
this.walker.setMutationBreakpoints(this, bps);
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
@ -1784,9 +1784,9 @@ var WalkerActor = protocol.ActorClassWithSpec(walkerSpec, {
|
|||
const actor = this.getNode(rawNode);
|
||||
if (actor) {
|
||||
this.queueMutation({
|
||||
type: "mutationBreakpointUpdate",
|
||||
target: actor.actorID,
|
||||
mutationBreakpoints: this.getMutationBreakpoints(rawNode),
|
||||
type: "mutationBreakpoint",
|
||||
mutationBreakpoints: this.getMutationBreakpoints(actor),
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
@ -168,6 +168,8 @@ ReplayDebugger.prototype = {
|
|||
}
|
||||
},
|
||||
|
||||
getDebuggees() { return []; },
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
// Paused/running state
|
||||
/////////////////////////////////////////////////////////
|
||||
|
|
|
@ -218,6 +218,8 @@ class NodeFront extends FrontClassWithSpec(nodeSpec) {
|
|||
this._form.pseudoClassLocks = change.pseudoClassLocks;
|
||||
} else if (change.type === "events") {
|
||||
this._form.hasEventListeners = change.hasEventListeners;
|
||||
} else if (change.type === "mutationBreakpoint") {
|
||||
this._form.mutationBreakpoints = change.mutationBreakpoints;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -343,6 +345,10 @@ class NodeFront extends FrontClassWithSpec(nodeSpec) {
|
|||
return this._form.attrs;
|
||||
}
|
||||
|
||||
get mutationBreakpoints() {
|
||||
return this._form.mutationBreakpoints;
|
||||
}
|
||||
|
||||
get pseudoClassLocks() {
|
||||
return this._form.pseudoClassLocks || [];
|
||||
}
|
||||
|
|
|
@ -350,6 +350,15 @@ const walkerSpec = generateActorSpec({
|
|||
value: RetVal("boolean"),
|
||||
},
|
||||
},
|
||||
setMutationBreakpoints: {
|
||||
request: {
|
||||
node: Arg(0, "nullable:domnode"),
|
||||
subtree: Option(1, "nullable:boolean"),
|
||||
removal: Option(1, "nullable:boolean"),
|
||||
attribute: Option(1, "nullable:boolean"),
|
||||
},
|
||||
response: {},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -45,12 +45,6 @@ types.addDictType("disconnectedNodeArray", {
|
|||
newParents: "array:domnode",
|
||||
});
|
||||
|
||||
types.addDictType("mutationBreakpointsRequest", {
|
||||
subtree: "nullable:boolean",
|
||||
removal: "nullable:boolean",
|
||||
attribute: "nullable:boolean",
|
||||
});
|
||||
|
||||
const nodeListSpec = generateActorSpec({
|
||||
typeName: "domnodelist",
|
||||
|
||||
|
@ -140,13 +134,6 @@ const nodeSpec = generateActorSpec({
|
|||
request: {},
|
||||
response: RetVal("windowDimensions"),
|
||||
},
|
||||
|
||||
setMutationBreakpoints: {
|
||||
request: {
|
||||
breakpoints: Arg(0, "mutationBreakpointsRequest"),
|
||||
},
|
||||
response: {},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -389,7 +389,7 @@ nsresult TextInputProcessor::BeginInputTransactionInternal(
|
|||
|
||||
nsresult rv = NS_OK;
|
||||
if (aForTests) {
|
||||
bool isAPZAware = StaticPrefs::TestEventsAsyncEnabled();
|
||||
bool isAPZAware = StaticPrefs::test_events_async_enabled();
|
||||
rv = dispatcher->BeginTestInputTransaction(this, isAPZAware);
|
||||
} else {
|
||||
rv = dispatcher->BeginInputTransaction(this);
|
||||
|
|
|
@ -7845,7 +7845,7 @@ nsresult nsContentUtils::SendMouseEvent(
|
|||
}
|
||||
return presShell->HandleEvent(view->GetFrame(), &event, false, &status);
|
||||
}
|
||||
if (StaticPrefs::TestEventsAsyncEnabled()) {
|
||||
if (StaticPrefs::test_events_async_enabled()) {
|
||||
status = widget->DispatchInputEvent(&event);
|
||||
} else {
|
||||
nsresult rv = widget->DispatchEvent(&event, status);
|
||||
|
|
|
@ -470,7 +470,7 @@ nsDOMWindowUtils::SetDisplayPortForElement(float aXPx, float aYPx,
|
|||
new DisplayPortPropertyData(displayport, aPriority),
|
||||
nsINode::DeleteProperty<DisplayPortPropertyData>);
|
||||
|
||||
if (StaticPrefs::LayoutUseContainersForRootFrames()) {
|
||||
if (StaticPrefs::layout_scroll_root_frame_containers()) {
|
||||
nsIFrame* rootScrollFrame = presShell->GetRootScrollFrame();
|
||||
if (rootScrollFrame && aElement == rootScrollFrame->GetContent() &&
|
||||
nsLayoutUtils::UsesAsyncScrolling(rootScrollFrame)) {
|
||||
|
|
|
@ -186,7 +186,7 @@ PushRecord.prototype = {
|
|||
continue;
|
||||
}
|
||||
// `gBrowser` on Desktop; `BrowserApp` on Fennec.
|
||||
let tabs = window.gBrowser ? window.gBrowser.tabContainer.children :
|
||||
let tabs = window.gBrowser ? window.gBrowser.tabs :
|
||||
window.BrowserApp.tabs;
|
||||
for (let tab of tabs) {
|
||||
// `linkedBrowser` on Desktop; `browser` on Fennec.
|
||||
|
|
|
@ -1309,7 +1309,7 @@ void DrawTargetCairo::FillGlyphs(ScaledFont* aFont, const GlyphBuffer& aBuffer,
|
|||
}
|
||||
|
||||
if (!SupportsVariationSettings(mSurface) && aFont->HasVariationSettings() &&
|
||||
StaticPrefs::PrintFontVariationsAsPaths()) {
|
||||
StaticPrefs::print_font_variations_as_paths()) {
|
||||
cairo_set_fill_rule(mContext, CAIRO_FILL_RULE_WINDING);
|
||||
cairo_new_path(mContext);
|
||||
cairo_glyph_path(mContext, &glyphs[0], aBuffer.mNumGlyphs);
|
||||
|
|
|
@ -98,7 +98,7 @@ bool GLContextCGL::MakeCurrentImpl() const {
|
|||
// If swapInt is 1, then glSwapBuffers will block and wait for a vblank signal.
|
||||
// When we're iterating as fast as possible, however, we want a non-blocking
|
||||
// glSwapBuffers, which will happen when swapInt==0.
|
||||
GLint swapInt = StaticPrefs::LayoutFrameRate() == 0 ? 0 : 1;
|
||||
GLint swapInt = StaticPrefs::layout_frame_rate() == 0 ? 0 : 1;
|
||||
[mContext setValues:&swapInt forParameter:NSOpenGLCPSwapInterval];
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -597,7 +597,7 @@ bool GLContextGLX::MakeCurrentImpl() const {
|
|||
// Many GLX implementations default to blocking until the next
|
||||
// VBlank when calling glXSwapBuffers. We want to run unthrottled
|
||||
// in ASAP mode. See bug 1280744.
|
||||
const bool isASAP = (StaticPrefs::LayoutFrameRate() == 0);
|
||||
const bool isASAP = (StaticPrefs::layout_frame_rate() == 0);
|
||||
mGLX->fSwapInterval(mDisplay, mDrawable, isASAP ? 0 : 1);
|
||||
}
|
||||
return succeeded;
|
||||
|
|
|
@ -62,7 +62,7 @@ bool GPUProcessHost::WaitForLaunch() {
|
|||
return !!mGPUChild;
|
||||
}
|
||||
|
||||
int32_t timeoutMs = StaticPrefs::GPUProcessTimeoutMs();
|
||||
int32_t timeoutMs = StaticPrefs::layers_gpu_process_startup_timeout_ms();
|
||||
|
||||
// If one of the following environment variables are set we can effectively
|
||||
// ignore the timeout - as we can guarantee the compositor process will be
|
||||
|
|
|
@ -522,13 +522,15 @@ void GPUProcessManager::OnProcessUnexpectedShutdown(GPUProcessHost* aHost) {
|
|||
CompositorManagerChild::OnGPUProcessLost(aHost->GetProcessToken());
|
||||
DestroyProcess();
|
||||
|
||||
if (mNumProcessAttempts > uint32_t(StaticPrefs::GPUProcessMaxRestarts())) {
|
||||
if (mNumProcessAttempts >
|
||||
uint32_t(StaticPrefs::layers_gpu_process_max_restarts())) {
|
||||
char disableMessage[64];
|
||||
SprintfLiteral(disableMessage, "GPU process disabled after %d attempts",
|
||||
mNumProcessAttempts);
|
||||
DisableGPUProcess(disableMessage);
|
||||
} else if (mNumProcessAttempts >
|
||||
uint32_t(StaticPrefs::GPUProcessMaxRestartsWithDecoder()) &&
|
||||
uint32_t(StaticPrefs::
|
||||
layers_gpu_process_max_restarts_with_decoder()) &&
|
||||
mDecodeVideoOnGpuProcess) {
|
||||
mDecodeVideoOnGpuProcess = false;
|
||||
Telemetry::Accumulate(Telemetry::GPU_PROCESS_CRASH_FALLBACKS,
|
||||
|
|
|
@ -139,7 +139,7 @@ already_AddRefed<ImageContainer> LayerManager::CreateImageContainer(
|
|||
}
|
||||
|
||||
bool LayerManager::AreComponentAlphaLayersEnabled() {
|
||||
return StaticPrefs::ComponentAlphaEnabled();
|
||||
return StaticPrefs::layers_componentalpha_enabled();
|
||||
}
|
||||
|
||||
/*static*/
|
||||
|
|
|
@ -48,7 +48,7 @@ void PaintThread::AddRef() {}
|
|||
/* static */
|
||||
int32_t PaintThread::CalculatePaintWorkerCount() {
|
||||
int32_t cpuCores = PR_GetNumberOfProcessors();
|
||||
int32_t workerCount = StaticPrefs::LayersOMTPPaintWorkers();
|
||||
int32_t workerCount = StaticPrefs::layers_omtp_paint_workers();
|
||||
|
||||
// If not manually specified, default to (cpuCores * 3) / 4, and clamp
|
||||
// between 1 and 4. If a user wants more, they can manually specify it
|
||||
|
@ -162,7 +162,7 @@ void PaintThread::QueuePaintTask(UniquePtr<PaintTask>&& aTask) {
|
|||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aTask);
|
||||
|
||||
if (StaticPrefs::LayersOMTPDumpCapture() && aTask->mCapture) {
|
||||
if (StaticPrefs::layers_omtp_dump_capture() && aTask->mCapture) {
|
||||
aTask->mCapture->Dump();
|
||||
}
|
||||
|
||||
|
@ -207,7 +207,7 @@ void PaintThread::AsyncPaintTask(CompositorBridgeChild* aBridge,
|
|||
target->Flush();
|
||||
}
|
||||
|
||||
if (StaticPrefs::LayersOMTPReleaseCaptureOnMainThread()) {
|
||||
if (StaticPrefs::layers_omtp_release_capture_on_main_thread()) {
|
||||
// This should ensure the capture drawtarget, which may hold on to
|
||||
// UnscaledFont objects, gets destroyed on the main thread (See bug
|
||||
// 1404742). This assumes (unflushed) target DrawTargets do not themselves
|
||||
|
|
|
@ -107,7 +107,7 @@ PersistentBufferProviderShared::Create(gfx::IntSize aSize,
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
if (!StaticPrefs::PersistentBufferProviderSharedEnabled()) {
|
||||
if (!StaticPrefs::layers_shared_buffer_provider_enabled()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ void RotatedBuffer::BeginCapture() {
|
|||
MOZ_ASSERT(!mCapture);
|
||||
MOZ_ASSERT(target);
|
||||
mCapture = Factory::CreateCaptureDrawTargetForTarget(
|
||||
target, StaticPrefs::LayersOMTPCaptureLimit());
|
||||
target, StaticPrefs::layers_omtp_capture_limit());
|
||||
}
|
||||
|
||||
RefPtr<gfx::DrawTargetCapture> RotatedBuffer::EndCapture() {
|
||||
|
|
|
@ -3322,7 +3322,7 @@ LayerToParentLayerMatrix4x4 APZCTreeManager::ComputeTransformForScrollThumb(
|
|||
// content resolution, which requires some special handling.
|
||||
bool scrollbarSubjectToResolution =
|
||||
aMetrics.IsRootContent() &&
|
||||
StaticPrefs::LayoutUseContainersForRootFrames();
|
||||
StaticPrefs::layout_scroll_root_frame_containers();
|
||||
|
||||
// |asyncTransform| represents the amount by which we have scrolled and
|
||||
// zoomed since the last paint. Because the scrollbar was sized and positioned
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace layers {
|
|||
static bool WillHandleMouseEvent(const WidgetMouseEventBase& aEvent) {
|
||||
return aEvent.mMessage == eMouseMove || aEvent.mMessage == eMouseDown ||
|
||||
aEvent.mMessage == eMouseUp || aEvent.mMessage == eDragEnd ||
|
||||
(StaticPrefs::TestEventsAsyncEnabled() &&
|
||||
(StaticPrefs::test_events_async_enabled() &&
|
||||
aEvent.mMessage == eMouseHitTest);
|
||||
}
|
||||
|
||||
|
|
|
@ -1054,7 +1054,7 @@ nsEventStatus AsyncPanZoomController::HandleDragEvent(
|
|||
ScrollDirection direction = *scrollbarData.mDirection;
|
||||
|
||||
bool isMouseAwayFromThumb = false;
|
||||
if (int snapMultiplier = StaticPrefs::SliderSnapMultiplier()) {
|
||||
if (int snapMultiplier = StaticPrefs::slider_snapMultiplier()) {
|
||||
// It's fine to ignore the async component of the thumb's transform,
|
||||
// because any async transform of the thumb will be in the direction of
|
||||
// scrolling, but here we're interested in the other direction.
|
||||
|
@ -1964,7 +1964,8 @@ ParentLayerPoint AsyncPanZoomController::GetScrollWheelDelta(
|
|||
// EventStateManager::DeltaAccumulator::ComputeScrollAmountForDefaultAction
|
||||
// and WheelTransaction::OverrideSystemScrollSpeed. Note that we do *not*
|
||||
// restrict this to the root content, see bug 1217715 for discussion on this.
|
||||
if (StaticPrefs::MouseWheelHasRootScrollDeltaOverride() &&
|
||||
if (StaticPrefs::
|
||||
mousewheel_system_scroll_override_on_root_content_enabled() &&
|
||||
!aEvent.IsCustomizedByUserPrefs() &&
|
||||
aEvent.mDeltaType == ScrollWheelInput::SCROLLDELTA_LINE &&
|
||||
aEvent.mAllowToOverrideSystemScrollSpeed) {
|
||||
|
@ -1976,9 +1977,9 @@ ParentLayerPoint AsyncPanZoomController::GetScrollWheelDelta(
|
|||
// it might need extra acceleration. See WheelHandlingHelper.cpp.
|
||||
if (aEvent.mDeltaType == ScrollWheelInput::SCROLLDELTA_LINE &&
|
||||
aEvent.mScrollSeriesNumber > 0) {
|
||||
int32_t start = StaticPrefs::MouseWheelAccelerationStart();
|
||||
int32_t start = StaticPrefs::mousewheel_acceleration_start();
|
||||
if (start >= 0 && aEvent.mScrollSeriesNumber >= uint32_t(start)) {
|
||||
int32_t factor = StaticPrefs::MouseWheelAccelerationFactor();
|
||||
int32_t factor = StaticPrefs::mousewheel_acceleration_factor();
|
||||
if (factor > 0) {
|
||||
delta.x = ComputeAcceleratedWheelDelta(
|
||||
delta.x, aEvent.mScrollSeriesNumber, factor);
|
||||
|
@ -2112,7 +2113,8 @@ CSSPoint AsyncPanZoomController::GetKeyboardDestination(
|
|||
|
||||
switch (aAction.mType) {
|
||||
case KeyboardScrollAction::eScrollCharacter: {
|
||||
int32_t scrollDistance = StaticPrefs::ToolkitHorizontalScrollDistance();
|
||||
int32_t scrollDistance =
|
||||
StaticPrefs::toolkit_scrollbox_horizontalScrollDistance();
|
||||
|
||||
if (aAction.mForward) {
|
||||
scrollDestination.x += scrollDistance * lineScrollSize.width;
|
||||
|
@ -2122,7 +2124,8 @@ CSSPoint AsyncPanZoomController::GetKeyboardDestination(
|
|||
break;
|
||||
}
|
||||
case KeyboardScrollAction::eScrollLine: {
|
||||
int32_t scrollDistance = StaticPrefs::ToolkitVerticalScrollDistance();
|
||||
int32_t scrollDistance =
|
||||
StaticPrefs::toolkit_scrollbox_verticalScrollDistance();
|
||||
|
||||
if (aAction.mForward) {
|
||||
scrollDestination.y += scrollDistance * lineScrollSize.height;
|
||||
|
@ -2342,7 +2345,7 @@ nsEventStatus AsyncPanZoomController::OnScrollWheel(
|
|||
} else if ((delta.x || delta.y) && !CanScrollWithWheel(delta)) {
|
||||
// We can't scroll this apz anymore, so we simply drop the event.
|
||||
if (mInputQueue->GetActiveWheelTransaction() &&
|
||||
StaticPrefs::MouseScrollTestingEnabled()) {
|
||||
StaticPrefs::test_mousescroll()) {
|
||||
if (RefPtr<GeckoContentController> controller =
|
||||
GetGeckoContentController()) {
|
||||
controller->NotifyMozMouseScrollEvent(
|
||||
|
@ -3459,8 +3462,8 @@ void AsyncPanZoomController::SmoothScrollTo(const CSSPoint& aDestination) {
|
|||
|
||||
StartAnimation(new SmoothScrollAnimation(
|
||||
*this, initialPosition, initialVelocity, destination,
|
||||
StaticPrefs::ScrollBehaviorSpringConstant(),
|
||||
StaticPrefs::ScrollBehaviorDampingRatio()));
|
||||
StaticPrefs::layout_css_scroll_behavior_spring_constant(),
|
||||
StaticPrefs::layout_css_scroll_behavior_damping_ratio()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5205,7 +5208,7 @@ void AsyncPanZoomController::UpdateSharedCompositorFrameMetrics() {
|
|||
? static_cast<FrameMetrics*>(mSharedFrameMetricsBuffer->memory())
|
||||
: nullptr;
|
||||
|
||||
if (frame && mSharedLock && StaticPrefs::ProgressivePaint()) {
|
||||
if (frame && mSharedLock && StaticPrefs::layers_progressive_paint()) {
|
||||
mSharedLock->Lock();
|
||||
*frame = Metrics();
|
||||
mSharedLock->Unlock();
|
||||
|
@ -5219,7 +5222,7 @@ void AsyncPanZoomController::ShareCompositorFrameMetrics() {
|
|||
// we are using progressive tile painting, and we have a
|
||||
// controller to pass the shared memory back to the content process/thread.
|
||||
if (!mSharedFrameMetricsBuffer && mMetricsSharingController &&
|
||||
StaticPrefs::ProgressivePaint()) {
|
||||
StaticPrefs::layers_progressive_paint()) {
|
||||
// Create shared memory and initialize it with the current FrameMetrics
|
||||
// value
|
||||
mSharedFrameMetricsBuffer = new ipc::SharedMemoryBasic;
|
||||
|
|
|
@ -601,7 +601,7 @@ void GestureEventListener::CreateLongTapTimeoutTask() {
|
|||
|
||||
mLongTapTimeoutTask = task;
|
||||
mAsyncPanZoomController->PostDelayedTask(
|
||||
task.forget(), StaticPrefs::UiClickHoldContextMenusDelay());
|
||||
task.forget(), StaticPrefs::ui_click_hold_context_menus_delay());
|
||||
}
|
||||
|
||||
void GestureEventListener::CancelMaxTapTimeoutTask() {
|
||||
|
|
|
@ -84,7 +84,7 @@ class GestureEventListener final {
|
|||
|
||||
// A touch start with a single touch point has just happened.
|
||||
// After having gotten into this state we start timers for MAX_TAP_TIME and
|
||||
// StaticPrefs::UiClickHoldContextMenusDelay().
|
||||
// StaticPrefs::ui_click_hold_context_menus_delay().
|
||||
// Allowed next states: GESTURE_MULTI_TOUCH_DOWN, GESTURE_NONE,
|
||||
// GESTURE_FIRST_SINGLE_TOUCH_UP,
|
||||
// GESTURE_LONG_TOUCH_DOWN,
|
||||
|
@ -93,7 +93,7 @@ class GestureEventListener final {
|
|||
|
||||
// While in GESTURE_FIRST_SINGLE_TOUCH_DOWN state a MAX_TAP_TIME timer got
|
||||
// triggered. Now we'll trigger either a single tap if a user lifts her
|
||||
// finger or a long tap if StaticPrefs::UiClickHoldContextMenusDelay()
|
||||
// finger or a long tap if StaticPrefs::ui_click_hold_context_menus_delay()
|
||||
// happens first.
|
||||
// Allowed next states: GESTURE_MULTI_TOUCH_DOWN, GESTURE_NONE,
|
||||
// GESTURE_LONG_TOUCH_DOWN.
|
||||
|
|
|
@ -406,7 +406,7 @@ bool WheelBlockState::MaybeTimeout(const ScrollWheelInput& aEvent) {
|
|||
// early.
|
||||
TimeDuration duration = TimeStamp::Now() - mLastMouseMove;
|
||||
if (duration.ToMilliseconds() >=
|
||||
StaticPrefs::MouseWheelIgnoreMoveDelayMs()) {
|
||||
StaticPrefs::mousewheel_transaction_ignoremovedelay()) {
|
||||
TBS_LOG("%p wheel transaction timed out after mouse move\n", this);
|
||||
EndTransaction();
|
||||
return true;
|
||||
|
@ -423,13 +423,13 @@ bool WheelBlockState::MaybeTimeout(const TimeStamp& aTimeStamp) {
|
|||
// seen wheel event.
|
||||
TimeDuration duration = aTimeStamp - mLastEventTime;
|
||||
if (duration.ToMilliseconds() <
|
||||
StaticPrefs::MouseWheelTransactionTimeoutMs()) {
|
||||
StaticPrefs::mousewheel_transaction_timeout()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
TBS_LOG("%p wheel transaction timed out\n", this);
|
||||
|
||||
if (StaticPrefs::MouseScrollTestingEnabled()) {
|
||||
if (StaticPrefs::test_mousescroll()) {
|
||||
RefPtr<AsyncPanZoomController> apzc = GetTargetApzc();
|
||||
apzc->NotifyMozMouseScrollEvent(
|
||||
NS_LITERAL_STRING("MozMouseScrollTransactionTimeout"));
|
||||
|
@ -454,7 +454,7 @@ void WheelBlockState::OnMouseMove(const ScreenIntPoint& aPoint) {
|
|||
TimeStamp now = TimeStamp::Now();
|
||||
TimeDuration duration = now - mLastEventTime;
|
||||
if (duration.ToMilliseconds() >=
|
||||
StaticPrefs::MouseWheelIgnoreMoveDelayMs()) {
|
||||
StaticPrefs::mousewheel_transaction_ignoremovedelay()) {
|
||||
mLastMouseMove = now;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ TEST_F(APZCSnappingTester, Bug1265510) {
|
|||
// inner frame; we verify that it does by checking the inner scroll position.
|
||||
TimeStamp newTransactionTime =
|
||||
now + TimeDuration::FromMilliseconds(
|
||||
StaticPrefs::MouseWheelTransactionTimeoutMs() + 100);
|
||||
StaticPrefs::mousewheel_transaction_timeout() + 100);
|
||||
SmoothWheel(manager, ScreenIntPoint(50, 80), ScreenPoint(0, 6),
|
||||
newTransactionTime);
|
||||
inner->AdvanceAnimationsUntilEnd();
|
||||
|
|
|
@ -367,7 +367,7 @@ bool BasicCompositor::SupportsEffect(EffectTypes aEffect) {
|
|||
}
|
||||
|
||||
bool BasicCompositor::SupportsLayerGeometry() const {
|
||||
return StaticPrefs::BasicLayerGeometry();
|
||||
return StaticPrefs::layers_geometry_basic_enabled();
|
||||
}
|
||||
|
||||
static RefPtr<gfx::Path> BuildPathFromPolygon(const RefPtr<DrawTarget>& aDT,
|
||||
|
@ -1023,7 +1023,7 @@ void BasicCompositor::EndFrame() {
|
|||
// Pop aClipRectIn/bounds rect
|
||||
mRenderTarget->mDrawTarget->PopClip();
|
||||
|
||||
if (StaticPrefs::WidgetUpdateFlashing()) {
|
||||
if (StaticPrefs::nglayout_debug_widget_update_flashing()) {
|
||||
float r = float(rand()) / RAND_MAX;
|
||||
float g = float(rand()) / RAND_MAX;
|
||||
float b = float(rand()) / RAND_MAX;
|
||||
|
|
|
@ -661,7 +661,7 @@ bool BasicLayerManager::EndTransactionInternal(
|
|||
}
|
||||
|
||||
void BasicLayerManager::FlashWidgetUpdateArea(gfxContext* aContext) {
|
||||
if (StaticPrefs::WidgetUpdateFlashing()) {
|
||||
if (StaticPrefs::nglayout_debug_widget_update_flashing()) {
|
||||
float r = float(rand()) / RAND_MAX;
|
||||
float g = float(rand()) / RAND_MAX;
|
||||
float b = float(rand()) / RAND_MAX;
|
||||
|
|
|
@ -282,7 +282,7 @@ bool ClientLayerManager::EndTransactionInternal(
|
|||
PerfStats::AutoMetricRecording<PerfStats::Metric::Rasterizing> autoRecording;
|
||||
|
||||
Maybe<TimeStamp> startTime;
|
||||
if (StaticPrefs::LayersDrawFPS()) {
|
||||
if (StaticPrefs::layers_acceleration_draw_fps()) {
|
||||
startTime = Some(TimeStamp::Now());
|
||||
}
|
||||
|
||||
|
@ -617,7 +617,7 @@ void ClientLayerManager::FlushRendering() {
|
|||
if (mWidget) {
|
||||
if (CompositorBridgeChild* remoteRenderer = mWidget->GetRemoteRenderer()) {
|
||||
if (mWidget->SynchronouslyRepaintOnResize() ||
|
||||
StaticPrefs::LayersForceSynchronousResize()) {
|
||||
StaticPrefs::layers_force_synchronous_resize()) {
|
||||
remoteRenderer->SendFlushRendering();
|
||||
} else {
|
||||
remoteRenderer->SendFlushRenderingAsync();
|
||||
|
|
|
@ -85,7 +85,7 @@ static LayerToParentLayerMatrix4x4 GetTransformToAncestorsParentLayer(
|
|||
iter = iter.GetParent()) {
|
||||
transform = transform * iter.GetTransform();
|
||||
|
||||
if (StaticPrefs::LayoutUseContainersForRootFrames()) {
|
||||
if (StaticPrefs::layout_scroll_root_frame_containers()) {
|
||||
// When scrolling containers, layout adds a post-scale into the transform
|
||||
// of the displayport-ancestor (which we pick up in GetTransform() above)
|
||||
// to cancel out the pres shell resolution (for historical reasons). The
|
||||
|
@ -267,7 +267,7 @@ bool ClientTiledPaintedLayer::IsScrollingOnCompositor(
|
|||
}
|
||||
|
||||
bool ClientTiledPaintedLayer::UseProgressiveDraw() {
|
||||
if (!StaticPrefs::ProgressivePaint()) {
|
||||
if (!StaticPrefs::layers_progressive_paint()) {
|
||||
// pref is disabled, so never do progressive
|
||||
return false;
|
||||
}
|
||||
|
@ -479,7 +479,7 @@ void ClientTiledPaintedLayer::RenderLayer() {
|
|||
isHalfTileWidthOrHeight) &&
|
||||
SingleTiledContentClient::ClientSupportsLayerSize(layerSize,
|
||||
ClientManager()) &&
|
||||
StaticPrefs::LayersSingleTileEnabled();
|
||||
StaticPrefs::layers_single_tile_enabled();
|
||||
|
||||
if (mContentClient && mHaveSingleTiledContentClient &&
|
||||
!wantSingleTiledContentClient) {
|
||||
|
|
|
@ -23,8 +23,9 @@ MultiTiledContentClient::MultiTiledContentClient(
|
|||
mLowPrecisionTiledBuffer(aPaintedLayer, *this, aManager,
|
||||
&mSharedFrameMetricsHelper) {
|
||||
MOZ_COUNT_CTOR(MultiTiledContentClient);
|
||||
mLowPrecisionTiledBuffer.SetResolution(StaticPrefs::LowPrecisionResolution());
|
||||
mHasLowPrecision = StaticPrefs::UseLowPrecisionBuffer();
|
||||
mLowPrecisionTiledBuffer.SetResolution(
|
||||
StaticPrefs::layers_low_precision_resolution());
|
||||
mHasLowPrecision = StaticPrefs::layers_low_precision_buffer();
|
||||
}
|
||||
|
||||
void MultiTiledContentClient::ClearCachedResources() {
|
||||
|
@ -265,7 +266,7 @@ void ClientMultiTiledLayerBuffer::Update(const nsIntRegion& newValidRegion,
|
|||
ctx = nullptr;
|
||||
|
||||
// Edge padding allows us to avoid resampling artifacts
|
||||
if (StaticPrefs::TileEdgePaddingEnabled() && mResolution == 1) {
|
||||
if (StaticPrefs::layers_tiles_edge_padding() && mResolution == 1) {
|
||||
drawTarget->PadEdges(newValidRegion.MovedBy(-mTilingOrigin));
|
||||
}
|
||||
|
||||
|
|
|
@ -1456,7 +1456,7 @@ void TextureClient::PrintInfo(std::stringstream& aStream, const char* aPrefix) {
|
|||
AppendToString(aStream, mFlags, " [flags=", "]");
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
if (StaticPrefs::LayersDumpTexture()) {
|
||||
if (StaticPrefs::layers_dump_texture()) {
|
||||
nsAutoCString pfx(aPrefix);
|
||||
pfx += " ";
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ void TextureClientPool::AllocateTextureClient() {
|
|||
}
|
||||
|
||||
RefPtr<TextureClient> newClient;
|
||||
if (StaticPrefs::ForceShmemTiles()) {
|
||||
if (StaticPrefs::layers_force_shmem_tiles()) {
|
||||
// gfx::BackendType::NONE means use the content backend
|
||||
newClient = TextureClient::CreateForRawBufferAccess(
|
||||
mSurfaceAllocator, mFormat, mSize, gfx::BackendType::NONE, mBackend,
|
||||
|
|
|
@ -600,7 +600,7 @@ Maybe<AcquiredBackBuffer> TileClient::AcquireBackBuffer(
|
|||
// later (copying pixels and texture upload). But this could increase
|
||||
// our memory usage and lead to OOM more frequently from spikes in usage,
|
||||
// so we have this behavior behind a pref.
|
||||
if (!StaticPrefs::LayersTileRetainBackBuffer()) {
|
||||
if (!StaticPrefs::layers_tiles_retain_back_buffer()) {
|
||||
DiscardBackBuffer();
|
||||
}
|
||||
Flip();
|
||||
|
@ -678,7 +678,7 @@ Maybe<AcquiredBackBuffer> TileClient::AcquireBackBuffer(
|
|||
RefPtr<DrawTargetCapture> capture;
|
||||
if (aFlags & TilePaintFlags::Async) {
|
||||
capture = Factory::CreateCaptureDrawTargetForTarget(
|
||||
target, StaticPrefs::LayersOMTPCaptureLimit());
|
||||
target, StaticPrefs::layers_omtp_capture_limit());
|
||||
target = capture;
|
||||
}
|
||||
|
||||
|
|
|
@ -432,7 +432,7 @@ void RenderLayers(ContainerT* aContainer, LayerManagerComposite* aManager,
|
|||
continue;
|
||||
}
|
||||
|
||||
if (StaticPrefs::LayersDrawFPS()) {
|
||||
if (StaticPrefs::layers_acceleration_draw_fps()) {
|
||||
for (const auto& metadata : layer->GetAllScrollMetadata()) {
|
||||
if (metadata.IsApzForceDisabled()) {
|
||||
aManager->DisabledApzWarning();
|
||||
|
@ -473,11 +473,11 @@ void RenderLayers(ContainerT* aContainer, LayerManagerComposite* aManager,
|
|||
layerToRender->RenderLayer(clipRect, geometry);
|
||||
}
|
||||
|
||||
if (StaticPrefs::UniformityInfo()) {
|
||||
if (StaticPrefs::layers_uniformity_info()) {
|
||||
PrintUniformityInfo(layer);
|
||||
}
|
||||
|
||||
if (StaticPrefs::DrawLayerInfo()) {
|
||||
if (StaticPrefs::layers_draw_layer_info()) {
|
||||
DrawLayerInfo(preparedData.mClipRect, aManager, layer);
|
||||
}
|
||||
|
||||
|
@ -650,7 +650,7 @@ void ContainerRender(ContainerT* aContainer, LayerManagerComposite* aManager,
|
|||
// APZCs attached to it has a nonempty async transform, then that transform is
|
||||
// not applied to any visible content. Display a warning box (conditioned on
|
||||
// the FPS display being enabled).
|
||||
if (StaticPrefs::LayersDrawFPS() &&
|
||||
if (StaticPrefs::layers_acceleration_draw_fps() &&
|
||||
aContainer->IsScrollableWithoutContent()) {
|
||||
RefPtr<APZSampler> sampler =
|
||||
aManager->GetCompositor()->GetCompositorBridgeParent()->GetAPZSampler();
|
||||
|
|
|
@ -66,7 +66,7 @@ class Diagnostics {
|
|||
class Record {
|
||||
public:
|
||||
explicit Record(TimeStamp aStart = TimeStamp()) {
|
||||
if (StaticPrefs::LayersDrawFPS()) {
|
||||
if (StaticPrefs::layers_acceleration_draw_fps()) {
|
||||
mStart = aStart.IsNull() ? TimeStamp::Now() : aStart;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -259,7 +259,7 @@ double FPSCounter::GetStdDev(std::map<int, int> aHistogram) {
|
|||
}
|
||||
|
||||
void FPSCounter::PrintFPS() {
|
||||
if (!StaticPrefs::FPSPrintHistogram()) {
|
||||
if (!StaticPrefs::layers_acceleration_draw_fps_print_histogram()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -308,7 +308,7 @@ void FPSCounter::PrintHistogram(std::map<int, int>& aHistogram) {
|
|||
// Write FPS timestamp data to a file only if
|
||||
// draw-fps.write-to-file is true
|
||||
nsresult FPSCounter::WriteFrameTimeStamps() {
|
||||
if (!StaticPrefs::WriteFPSToFile()) {
|
||||
if (!StaticPrefs::layers_acceleration_draw_fps_write_to_file()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -622,7 +622,7 @@ LayerComposite* LayerManagerComposite::RootLayer() const {
|
|||
|
||||
void LayerManagerComposite::InvalidateDebugOverlay(nsIntRegion& aInvalidRegion,
|
||||
const IntRect& aBounds) {
|
||||
bool drawFps = StaticPrefs::LayersDrawFPS();
|
||||
bool drawFps = StaticPrefs::layers_acceleration_draw_fps();
|
||||
bool drawFrameColorBars = StaticPrefs::gfx_draw_color_bars();
|
||||
|
||||
if (drawFps) {
|
||||
|
@ -653,7 +653,7 @@ void LayerManagerComposite::DrawPaintTimes(Compositor* aCompositor) {
|
|||
|
||||
static uint16_t sFrameCount = 0;
|
||||
void LayerManagerComposite::RenderDebugOverlay(const IntRect& aBounds) {
|
||||
bool drawFps = StaticPrefs::LayersDrawFPS();
|
||||
bool drawFps = StaticPrefs::layers_acceleration_draw_fps();
|
||||
bool drawFrameColorBars = StaticPrefs::gfx_draw_color_bars();
|
||||
|
||||
// Don't draw diagnostic overlays if we want to snapshot the output.
|
||||
|
@ -775,9 +775,9 @@ RefPtr<CompositingRenderTarget>
|
|||
LayerManagerComposite::PushGroupForLayerEffects() {
|
||||
// This is currently true, so just making sure that any new use of this
|
||||
// method is flagged for investigation
|
||||
MOZ_ASSERT(StaticPrefs::LayersEffectInvert() ||
|
||||
StaticPrefs::LayersEffectGrayscale() ||
|
||||
StaticPrefs::LayersEffectContrast() != 0.0);
|
||||
MOZ_ASSERT(StaticPrefs::layers_effect_invert() ||
|
||||
StaticPrefs::layers_effect_grayscale() ||
|
||||
StaticPrefs::layers_effect_contrast() != 0.0);
|
||||
|
||||
RefPtr<CompositingRenderTarget> previousTarget =
|
||||
mCompositor->GetCurrentRenderTarget();
|
||||
|
@ -905,9 +905,9 @@ void LayerManagerComposite::Render(const nsIntRegion& aInvalidRegion,
|
|||
// permutations. However, may as well just get the values onces and
|
||||
// then use them, just in case the consistency becomes important in
|
||||
// the future.
|
||||
bool invertVal = StaticPrefs::LayersEffectInvert();
|
||||
bool grayscaleVal = StaticPrefs::LayersEffectGrayscale();
|
||||
float contrastVal = StaticPrefs::LayersEffectContrast();
|
||||
bool invertVal = StaticPrefs::layers_effect_invert();
|
||||
bool grayscaleVal = StaticPrefs::layers_effect_grayscale();
|
||||
float contrastVal = StaticPrefs::layers_effect_contrast();
|
||||
bool haveLayerEffects = (invertVal || grayscaleVal || contrastVal != 0.0);
|
||||
|
||||
// Set LayerScope begin/end frame
|
||||
|
@ -1423,7 +1423,7 @@ bool LayerManagerComposite::CanUseCanvasLayerForSize(const IntSize& aSize) {
|
|||
}
|
||||
|
||||
void LayerManagerComposite::NotifyShadowTreeTransaction() {
|
||||
if (StaticPrefs::LayersDrawFPS()) {
|
||||
if (StaticPrefs::layers_acceleration_draw_fps()) {
|
||||
mDiagnostics->AddTxnFrame();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -439,7 +439,7 @@ void TextureHost::PrintInfo(std::stringstream& aStream, const char* aPrefix) {
|
|||
}
|
||||
AppendToString(aStream, mFlags, " [flags=", "]");
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
if (StaticPrefs::LayersDumpTexture()) {
|
||||
if (StaticPrefs::layers_dump_texture()) {
|
||||
nsAutoCString pfx(aPrefix);
|
||||
pfx += " ";
|
||||
|
||||
|
|
|
@ -36,12 +36,12 @@ class Layer;
|
|||
|
||||
float TileHost::GetFadeInOpacity(float aOpacity) {
|
||||
TimeStamp now = TimeStamp::Now();
|
||||
if (!StaticPrefs::LayerTileFadeInEnabled() || mFadeStart.IsNull() ||
|
||||
if (!StaticPrefs::layers_tiles_fade_in_enabled() || mFadeStart.IsNull() ||
|
||||
now < mFadeStart) {
|
||||
return aOpacity;
|
||||
}
|
||||
|
||||
float duration = StaticPrefs::LayerTileFadeInDuration();
|
||||
float duration = StaticPrefs::layers_tiles_fade_in_duration_ms();
|
||||
float elapsed = (now - mFadeStart).ToMilliseconds();
|
||||
if (elapsed > duration) {
|
||||
mFadeStart = TimeStamp();
|
||||
|
@ -339,8 +339,9 @@ bool TiledLayerBufferComposite::UseTiles(const SurfaceDescriptorTiles& aTiles,
|
|||
tile.mFadeStart = TimeStamp::Now();
|
||||
|
||||
aLayerManager->CompositeUntil(
|
||||
tile.mFadeStart + TimeDuration::FromMilliseconds(
|
||||
StaticPrefs::LayerTileFadeInDuration()));
|
||||
tile.mFadeStart +
|
||||
TimeDuration::FromMilliseconds(
|
||||
StaticPrefs::layers_tiles_fade_in_duration_ms()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -423,7 +424,7 @@ void TiledContentHost::Composite(
|
|||
// we end up changing the expected overall transparency of the content,
|
||||
// and it just looks wrong.
|
||||
Color backgroundColor;
|
||||
if (aOpacity == 1.0f && StaticPrefs::LowPrecisionOpacity() < 1.0f) {
|
||||
if (aOpacity == 1.0f && StaticPrefs::layers_low_precision_opacity() < 1.0f) {
|
||||
// Background colors are only stored on scrollable layers. Grab
|
||||
// the one from the nearest scrollable ancestor layer.
|
||||
for (LayerMetricsWrapper ancestor(GetLayer(),
|
||||
|
@ -437,7 +438,7 @@ void TiledContentHost::Composite(
|
|||
}
|
||||
float lowPrecisionOpacityReduction =
|
||||
(aOpacity == 1.0f && backgroundColor.a == 1.0f)
|
||||
? StaticPrefs::LowPrecisionOpacity()
|
||||
? StaticPrefs::layers_low_precision_opacity()
|
||||
: 1.0f;
|
||||
|
||||
nsIntRegion tmpRegion;
|
||||
|
@ -632,7 +633,7 @@ void TiledContentHost::PrintInfo(std::stringstream& aStream,
|
|||
aStream << nsPrintfCString("TiledContentHost (0x%p)", this).get();
|
||||
|
||||
#if defined(MOZ_DUMP_PAINTING)
|
||||
if (StaticPrefs::LayersDumpTexture()) {
|
||||
if (StaticPrefs::layers_dump_texture()) {
|
||||
nsAutoCString pfx(aPrefix);
|
||||
pfx += " ";
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ void CompositorD3D11::SetVertexBuffer(ID3D11Buffer* aBuffer) {
|
|||
}
|
||||
|
||||
bool CompositorD3D11::SupportsLayerGeometry() const {
|
||||
return StaticPrefs::D3D11LayerGeometry();
|
||||
return StaticPrefs::layers_geometry_d3d11_enabled();
|
||||
}
|
||||
|
||||
bool CompositorD3D11::UpdateDynamicVertexBuffer(
|
||||
|
@ -1050,7 +1050,7 @@ void CompositorD3D11::DrawGeometry(const Geometry& aGeometry,
|
|||
mContext->PSSetShaderResources(TexSlot::Y, 3, srViews);
|
||||
} break;
|
||||
case EffectTypes::COMPONENT_ALPHA: {
|
||||
MOZ_ASSERT(StaticPrefs::ComponentAlphaEnabled());
|
||||
MOZ_ASSERT(StaticPrefs::layers_componentalpha_enabled());
|
||||
MOZ_ASSERT(mAttachments->mComponentBlendState);
|
||||
EffectComponentAlpha* effectComponentAlpha =
|
||||
static_cast<EffectComponentAlpha*>(aEffectChain.mPrimaryEffect.get());
|
||||
|
@ -1202,7 +1202,7 @@ void CompositorD3D11::BeginFrame(const nsIntRegion& aInvalidRegion,
|
|||
}
|
||||
}
|
||||
|
||||
if (StaticPrefs::LayersDrawFPS()) {
|
||||
if (StaticPrefs::layers_acceleration_draw_fps()) {
|
||||
uint32_t pixelsPerFrame = 0;
|
||||
for (auto iter = mBackBufferInvalid.RectIter(); !iter.Done(); iter.Next()) {
|
||||
pixelsPerFrame += iter.Get().Width() * iter.Get().Height();
|
||||
|
|
|
@ -179,7 +179,7 @@ bool DeviceAttachmentsD3D11::Initialize() {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (StaticPrefs::ComponentAlphaEnabled()) {
|
||||
if (StaticPrefs::layers_componentalpha_enabled()) {
|
||||
D3D11_RENDER_TARGET_BLEND_DESC rtBlendComponent = {
|
||||
TRUE,
|
||||
D3D11_BLEND_ONE,
|
||||
|
@ -275,7 +275,7 @@ bool DeviceAttachmentsD3D11::CreateShaders() {
|
|||
InitPixelShader(sYCbCrShaderMask, mYCbCrShader, MaskType::Mask);
|
||||
InitPixelShader(sNV12Shader, mNV12Shader, MaskType::MaskNone);
|
||||
InitPixelShader(sNV12ShaderMask, mNV12Shader, MaskType::Mask);
|
||||
if (StaticPrefs::ComponentAlphaEnabled()) {
|
||||
if (StaticPrefs::layers_componentalpha_enabled()) {
|
||||
InitPixelShader(sComponentAlphaShader, mComponentAlphaShader,
|
||||
MaskType::MaskNone);
|
||||
InitPixelShader(sComponentAlphaShaderMask, mComponentAlphaShader,
|
||||
|
|
|
@ -323,7 +323,7 @@ RefPtr<MLGRenderTarget> MLGSwapChainD3D11::AcquireBackBuffer() {
|
|||
|
||||
if (!mRT) {
|
||||
MLGRenderTargetFlags flags = MLGRenderTargetFlags::Default;
|
||||
if (StaticPrefs::AdvancedLayersEnableDepthBuffer()) {
|
||||
if (StaticPrefs::layers_mlgpu_enable_depth_buffer()) {
|
||||
flags |= MLGRenderTargetFlags::ZBuffer;
|
||||
}
|
||||
|
||||
|
|
|
@ -335,7 +335,7 @@ static void RunCompositorBench(Compositor* aCompositor,
|
|||
|
||||
void CompositorBench(Compositor* aCompositor, const gfx::IntRect& aScreenRect) {
|
||||
static bool sRanBenchmark = false;
|
||||
bool wantBenchmark = StaticPrefs::LayersBenchEnabled();
|
||||
bool wantBenchmark = StaticPrefs::layers_bench_enabled();
|
||||
if (wantBenchmark && !sRanBenchmark) {
|
||||
RunCompositorBench(aCompositor, aScreenRect);
|
||||
}
|
||||
|
|
|
@ -885,10 +885,10 @@ TextureClientPool* CompositorBridgeChild::GetTexturePool(
|
|||
aAllocator->GetCompositorBackendType(),
|
||||
aAllocator->SupportsTextureDirectMapping(),
|
||||
aAllocator->GetMaxTextureSize(), aFormat, gfx::gfxVars::TileSize(),
|
||||
aFlags, StaticPrefs::LayersTilePoolShrinkTimeout(),
|
||||
StaticPrefs::LayersTilePoolClearTimeout(),
|
||||
StaticPrefs::LayersTileInitialPoolSize(),
|
||||
StaticPrefs::LayersTilePoolUnusedSize(), this));
|
||||
aFlags, StaticPrefs::layers_tile_pool_shrink_timeout(),
|
||||
StaticPrefs::layers_tile_pool_clear_timeout(),
|
||||
StaticPrefs::layers_tile_initial_pool_size(),
|
||||
StaticPrefs::layers_tile_pool_unused_size(), this));
|
||||
|
||||
return mTexturePools.LastElement();
|
||||
}
|
||||
|
|
|
@ -294,10 +294,11 @@ static int32_t CalculateCompositionFrameRate() {
|
|||
// DEFAULT_FRAME_RATE in nsRefreshDriver.cpp.
|
||||
// TODO: This should actually return the vsync rate.
|
||||
const int32_t defaultFrameRate = 60;
|
||||
int32_t compositionFrameRatePref = StaticPrefs::LayersCompositionFrameRate();
|
||||
int32_t compositionFrameRatePref =
|
||||
StaticPrefs::layers_offmainthreadcomposition_frame_rate();
|
||||
if (compositionFrameRatePref < 0) {
|
||||
// Use the same frame rate for composition as for layout.
|
||||
int32_t layoutFrameRatePref = StaticPrefs::LayoutFrameRate();
|
||||
int32_t layoutFrameRatePref = StaticPrefs::layout_frame_rate();
|
||||
if (layoutFrameRatePref < 0) {
|
||||
// TODO: The main thread frame scheduling code consults the actual
|
||||
// monitor refresh rate in this case. We should do the same.
|
||||
|
@ -1004,7 +1005,7 @@ void CompositorBridgeParent::CompositeToTarget(VsyncId aId, DrawTarget* aTarget,
|
|||
|
||||
RenderTraceLayers(mLayerManager->GetRoot(), "0000");
|
||||
|
||||
if (StaticPrefs::DumpHostLayers() || StaticPrefs::LayersDump()) {
|
||||
if (StaticPrefs::layers_dump_host_layers() || StaticPrefs::layers_dump()) {
|
||||
printf_stderr("Painting --- compositing layer tree:\n");
|
||||
mLayerManager->Dump(/* aSorted = */ true);
|
||||
}
|
||||
|
@ -1043,7 +1044,7 @@ void CompositorBridgeParent::CompositeToTarget(VsyncId aId, DrawTarget* aTarget,
|
|||
#endif
|
||||
|
||||
// 0 -> Full-tilt composite
|
||||
if (StaticPrefs::LayersCompositionFrameRate() == 0 ||
|
||||
if (StaticPrefs::layers_offmainthreadcomposition_frame_rate() == 0 ||
|
||||
mLayerManager->AlwaysScheduleComposite()) {
|
||||
// Special full-tilt composite mode for performance testing
|
||||
ScheduleComposition();
|
||||
|
@ -1215,7 +1216,7 @@ void CompositorBridgeParent::ScheduleRotationOnCompositorThread(
|
|||
"layers::CompositorBridgeParent::ForceComposition", this,
|
||||
&CompositorBridgeParent::ForceComposition);
|
||||
mForceCompositionTask = task;
|
||||
ScheduleTask(task.forget(), StaticPrefs::OrientationSyncMillis());
|
||||
ScheduleTask(task.forget(), StaticPrefs::layers_orientation_sync_timeout());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1795,6 +1796,8 @@ PWebRenderBridgeParent* CompositorBridgeParent::AllocPWebRenderBridgeParent(
|
|||
if (StaticPrefs::gfx_webrender_split_render_roots()) {
|
||||
apis.AppendElement(
|
||||
apis[0]->CreateDocument(aSize, 1, wr::RenderRoot::Content));
|
||||
apis.AppendElement(
|
||||
apis[0]->CreateDocument(aSize, 2, wr::RenderRoot::Popover));
|
||||
}
|
||||
|
||||
InfallibleTArray<RefPtr<wr::WebRenderAPI>> clonedApis;
|
||||
|
|
|
@ -269,7 +269,7 @@ void CompositorManagerChild::SetReplyTimeout() {
|
|||
#ifndef DEBUG
|
||||
// Add a timeout for release builds to kill GPU process when it hangs.
|
||||
if (XRE_IsParentProcess() && GPUProcessManager::Get()->GetGPUChild()) {
|
||||
int32_t timeout = StaticPrefs::GPUProcessIPCReplyTimeoutMs();
|
||||
int32_t timeout = StaticPrefs::layers_gpu_process_ipc_reply_timeout_ms();
|
||||
SetReplyTimeoutMs(timeout);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -78,9 +78,10 @@ CompositorVsyncScheduler::CompositorVsyncScheduler(
|
|||
|
||||
// mAsapScheduling is set on the main thread during init,
|
||||
// but is only accessed after on the compositor thread.
|
||||
mAsapScheduling = StaticPrefs::LayersCompositionFrameRate() == 0 ||
|
||||
gfxPlatform::IsInLayoutAsapMode() ||
|
||||
recordreplay::IsRecordingOrReplaying();
|
||||
mAsapScheduling =
|
||||
StaticPrefs::layers_offmainthreadcomposition_frame_rate() == 0 ||
|
||||
gfxPlatform::IsInLayoutAsapMode() ||
|
||||
recordreplay::IsRecordingOrReplaying();
|
||||
}
|
||||
|
||||
CompositorVsyncScheduler::~CompositorVsyncScheduler() {
|
||||
|
|
|
@ -475,9 +475,10 @@ mozilla::ipc::IPCResult LayerTransactionParent::RecvUpdate(
|
|||
#endif
|
||||
|
||||
// Enable visual warning for long transaction when draw FPS option is enabled
|
||||
bool drawFps = StaticPrefs::LayersDrawFPS();
|
||||
bool drawFps = StaticPrefs::layers_acceleration_draw_fps();
|
||||
if (drawFps) {
|
||||
uint32_t visualWarningTrigger = StaticPrefs::LayerTransactionWarning();
|
||||
uint32_t visualWarningTrigger =
|
||||
StaticPrefs::layers_transaction_warning_ms();
|
||||
// The default theshold is 200ms to trigger, hit red when it take 4 times
|
||||
// longer
|
||||
TimeDuration latency = TimeStamp::Now() - aInfo.transactionStart();
|
||||
|
@ -754,7 +755,7 @@ mozilla::ipc::IPCResult LayerTransactionParent::RecvGetTransform(
|
|||
// containers are enabled, then the APZ transform might not be on |layer| but
|
||||
// instead would be on the parent of |layer|, if that is the root scrollable
|
||||
// metrics. So we special-case that behaviour.
|
||||
if (StaticPrefs::LayoutUseContainersForRootFrames() &&
|
||||
if (StaticPrefs::layout_scroll_root_frame_containers() &&
|
||||
!layer->HasScrollableFrameMetrics() && layer->GetParent() &&
|
||||
layer->GetParent()->HasRootScrollableFrameMetrics()) {
|
||||
transform *= layer->GetParent()->AsHostLayer()->GetShadowBaseTransform();
|
||||
|
|
|
@ -546,7 +546,7 @@ bool ShadowLayerForwarder::EndTransaction(
|
|||
}
|
||||
|
||||
Maybe<TimeStamp> startTime;
|
||||
if (StaticPrefs::LayersDrawFPS()) {
|
||||
if (StaticPrefs::layers_acceleration_draw_fps()) {
|
||||
startTime = Some(TimeStamp::Now());
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ bool ContainerLayerMLGPU::OnPrepareToRender(FrameBuilder* aBuilder) {
|
|||
mSurfaceCopyNeeded = surfaceCopyNeeded;
|
||||
|
||||
gfx::IntRect viewport(gfx::IntPoint(0, 0), mTargetSize);
|
||||
if (!mRenderTarget || !StaticPrefs::AdvancedLayersUseInvalidation() ||
|
||||
if (!mRenderTarget || !StaticPrefs::layers_mlgpu_enable_invalidation() ||
|
||||
mInvalidateEntireSurface) {
|
||||
// Fine-grained invalidation is disabled, invalidate everything.
|
||||
mInvalidRect = viewport;
|
||||
|
|
|
@ -263,8 +263,8 @@ void LayerManagerMLGPU::EndTransaction(const TimeStamp& aTimeStamp,
|
|||
}
|
||||
|
||||
// Don't draw the diagnostic overlay if we want to snapshot the output.
|
||||
mDrawDiagnostics = StaticPrefs::LayersDrawFPS() && !mTarget;
|
||||
mUsingInvalidation = StaticPrefs::AdvancedLayersUseInvalidation();
|
||||
mDrawDiagnostics = StaticPrefs::layers_acceleration_draw_fps() && !mTarget;
|
||||
mUsingInvalidation = StaticPrefs::layers_mlgpu_enable_invalidation();
|
||||
mDebugFrameNumber++;
|
||||
|
||||
AL_LOG("--- Compositing frame %d ---\n", mDebugFrameNumber);
|
||||
|
@ -551,7 +551,7 @@ void LayerManagerMLGPU::ClearCachedResources(Layer* aSubtree) {
|
|||
}
|
||||
|
||||
void LayerManagerMLGPU::NotifyShadowTreeTransaction() {
|
||||
if (StaticPrefs::LayersDrawFPS()) {
|
||||
if (StaticPrefs::layers_acceleration_draw_fps()) {
|
||||
mDiagnostics->AddTxnFrame();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ bool MLGDevice::Initialize() {
|
|||
|
||||
// We allow this to be pref'd off for testing. Switching it off enables
|
||||
// Direct3D 11.0/Windows 7/OpenGL-style buffer code paths.
|
||||
if (!StaticPrefs::AdvancedLayersEnableBufferSharing()) {
|
||||
if (!StaticPrefs::layers_mlgpu_enable_buffer_sharing()) {
|
||||
gfxConfig::EnableFallback(Fallback::NO_CONSTANT_BUFFER_OFFSETTING,
|
||||
"Disabled by pref");
|
||||
mCanUseConstantBufferOffsetBinding = false;
|
||||
|
@ -99,7 +99,7 @@ bool MLGDevice::Initialize() {
|
|||
// We allow this to be pref'd off for testing. Disabling it turns on
|
||||
// ID3D11DeviceContext1::ClearView support, which is present on
|
||||
// newer Windows 8+ drivers.
|
||||
if (!StaticPrefs::AdvancedLayersEnableClearView()) {
|
||||
if (!StaticPrefs::layers_mlgpu_enable_clear_view()) {
|
||||
mCanUseClearView = false;
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ bool MLGDevice::Initialize() {
|
|||
"Failed to allocate a shared shader buffer");
|
||||
}
|
||||
|
||||
if (StaticPrefs::AdvancedLayersEnableBufferCache()) {
|
||||
if (StaticPrefs::layers_mlgpu_enable_buffer_cache()) {
|
||||
mConstantBufferCache = MakeUnique<BufferCache>(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ RenderViewMLGPU::RenderViewMLGPU(FrameBuilder* aBuilder,
|
|||
mCurrentMaskRectBufferIndex(kInvalidResourceIndex),
|
||||
mCurrentDepthMode(MLGDepthTestMode::Disabled),
|
||||
mNextSortIndex(1),
|
||||
mUseDepthBuffer(StaticPrefs::AdvancedLayersEnableDepthBuffer()),
|
||||
mUseDepthBuffer(StaticPrefs::layers_mlgpu_enable_depth_buffer()),
|
||||
mDepthBufferNeedsClear(false) {
|
||||
if (aParent) {
|
||||
aParent->AddChild(this);
|
||||
|
@ -188,7 +188,7 @@ bool RenderViewMLGPU::UpdateVisibleRegion(ItemInfo& aItem) {
|
|||
// CPU-based occlusion culling as well, since the GPU will do most of our
|
||||
// culling work for us.
|
||||
if (mUseDepthBuffer || !aItem.translation ||
|
||||
!StaticPrefs::AdvancedLayersEnableCPUOcclusion()) {
|
||||
!StaticPrefs::layers_mlgpu_enable_cpu_occlusion()) {
|
||||
// Update the render region even if we won't compute visibility, since some
|
||||
// layer types (like Canvas and Image) need to have the visible region
|
||||
// clamped.
|
||||
|
|
|
@ -1233,8 +1233,8 @@ void CompositorOGL::DrawGeometry(const Geometry& aGeometry,
|
|||
|
||||
// Only apply DEAA to quads that have been transformed such that aliasing
|
||||
// could be visible
|
||||
bool bEnableAA =
|
||||
StaticPrefs::LayersDEAAEnabled() && !aTransform.Is2DIntegerTranslation();
|
||||
bool bEnableAA = StaticPrefs::layers_deaa_enabled() &&
|
||||
!aTransform.Is2DIntegerTranslation();
|
||||
|
||||
bool colorMatrix = aEffectChain.mSecondaryEffects[EffectTypes::COLOR_MATRIX];
|
||||
ShaderConfigOGL config =
|
||||
|
@ -1549,7 +1549,7 @@ void CompositorOGL::DrawGeometry(const Geometry& aGeometry,
|
|||
BindAndDrawGeometry(program, aGeometry);
|
||||
} break;
|
||||
case EffectTypes::COMPONENT_ALPHA: {
|
||||
MOZ_ASSERT(StaticPrefs::ComponentAlphaEnabled());
|
||||
MOZ_ASSERT(StaticPrefs::layers_componentalpha_enabled());
|
||||
MOZ_ASSERT(blendMode == gfx::CompositionOp::OP_OVER,
|
||||
"Can't support blend modes with component alpha!");
|
||||
EffectComponentAlpha* effectComponentAlpha =
|
||||
|
@ -2027,7 +2027,7 @@ void PerUnitTexturePoolOGL::DestroyTextures() {
|
|||
}
|
||||
|
||||
bool CompositorOGL::SupportsLayerGeometry() const {
|
||||
return StaticPrefs::OGLLayerGeometry();
|
||||
return StaticPrefs::layers_geometry_opengl_enabled();
|
||||
}
|
||||
|
||||
void CompositorOGL::RegisterTextureSource(TextureSource* aTextureSource) {
|
||||
|
|
|
@ -704,7 +704,7 @@ void WebRenderLayerManager::FlushRendering() {
|
|||
if (WrBridge()->GetCompositorUseDComp() && !resizing) {
|
||||
cBridge->SendFlushRenderingAsync();
|
||||
} else if (mWidget->SynchronouslyRepaintOnResize() ||
|
||||
StaticPrefs::LayersForceSynchronousResize()) {
|
||||
StaticPrefs::layers_force_synchronous_resize()) {
|
||||
cBridge->SendFlushRendering();
|
||||
} else {
|
||||
cBridge->SendFlushRenderingAsync();
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче