mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 10:15:41 +00:00
Merge inbound to mozilla-central. a=merge
This commit is contained in:
commit
6fc24b0495
@ -22,6 +22,7 @@
|
||||
testValue("pm1", "50%", 50, 0, 100, 0);
|
||||
testValue("pm2", "50%", 500, 0, 1000, 0);
|
||||
testValue("pm3", "", 0, 0, 100, 0);
|
||||
testValue("pm4", "", 0, 0, 100, 0);
|
||||
|
||||
// aria progressbar
|
||||
testValue("ariapb1", "500", 500, 0, 1000, 0);
|
||||
@ -50,9 +51,12 @@
|
||||
</body>
|
||||
|
||||
<!-- progressmeter -->
|
||||
<progressmeter id="pm1" value="50"/>
|
||||
<progressmeter id="pm2" value="500" max="1000"/>
|
||||
<progressmeter id="pm3"/>
|
||||
<vbox>
|
||||
<progressmeter id="pm1" value="50"/>
|
||||
<progressmeter id="pm2" value="500" max="1000"/>
|
||||
<progressmeter id="pm3"/>
|
||||
<progressmeter id="pm4" mode="undetermined"/>
|
||||
</vbox>
|
||||
|
||||
<!-- aria -->
|
||||
<description id="ariapb1" role="progressbar"
|
||||
|
@ -1,56 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!DOCTYPE html [
|
||||
<!ENTITY % htmlDTD
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"DTD/xhtml1-strict.dtd">
|
||||
%htmlDTD;
|
||||
<!ENTITY % globalDTD
|
||||
SYSTEM "chrome://global/locale/global.dtd">
|
||||
%globalDTD;
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
|
||||
%brandDTD;
|
||||
<!ENTITY % restartRequiredDTD
|
||||
SYSTEM "chrome://browser/locale/aboutRestartRequired.dtd">
|
||||
%restartRequiredDTD;
|
||||
]>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>&restartRequired.title;</title>
|
||||
<title data-l10n-id="restart-required-title"></title>
|
||||
<link rel="stylesheet" type="text/css" media="all"
|
||||
href="chrome://browser/skin/aboutRestartRequired.css"/>
|
||||
<!-- If the location of the favicon is changed here, the
|
||||
FAVICON_ERRORPAGE_URL symbol in
|
||||
toolkit/components/places/src/nsFaviconService.h should be updated. -->
|
||||
<link rel="icon" id="favicon"
|
||||
<link rel="icon" type="image/png" id="favicon"
|
||||
href="chrome://global/skin/icons/warning.svg"/>
|
||||
<link rel="localization" href="branding/brand.ftl"/>
|
||||
<link rel="localization" href="browser/aboutRestartRequired.ftl"/>
|
||||
</head>
|
||||
|
||||
<body dir="&locale.dir;">
|
||||
<body>
|
||||
<!-- PAGE CONTAINER (for styling purposes only) -->
|
||||
<div id="errorPageContainer">
|
||||
<div id="text-container">
|
||||
<div id="title">
|
||||
<h1 id="title-text">&restartRequired.header;</h1>
|
||||
<h1 id="title-text" data-l10n-id="restart-required-header"></h1>
|
||||
</div>
|
||||
<div id="errorLongContent">
|
||||
<div id="errorLongDesc">&restartRequired.description;</div>
|
||||
<div id="errorLongDesc">
|
||||
<p data-l10n-id="restart-required-intro"></p>
|
||||
<p data-l10n-id="restart-required-description"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Restart Button -->
|
||||
<div id="restartButtonContainer" class="button-container">
|
||||
<button id="restart" class="primary" autocomplete="off"
|
||||
onclick="AboutRestartRequired.restart();">
|
||||
&restartButton.label;
|
||||
</button>
|
||||
<button id="restart" data-l10n-id="restart-button-label" class="primary" autocomplete="off"
|
||||
onclick="AboutRestartRequired.restart();"></button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript"
|
||||
src="chrome://browser/content/aboutRestartRequired.js"/>
|
||||
src="chrome://browser/content/aboutRestartRequired.js"/>
|
||||
</html>
|
||||
|
@ -14,6 +14,7 @@ var EXPORTED_SYMBOLS = [
|
||||
];
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
@ -428,8 +429,15 @@ this.DownloadsViewUI.DownloadElementShell.prototype = {
|
||||
if (this.download.hasProgress) {
|
||||
this.element.setAttribute("progressmode", "normal");
|
||||
this.element.setAttribute("progress", this.download.progress);
|
||||
this.element.removeAttribute("progress-undetermined");
|
||||
} else {
|
||||
this.element.setAttribute("progressmode", "undetermined");
|
||||
// Suppress the progress animation on Linux for the Downloads Panel
|
||||
// progress bars when the file size is unknown.
|
||||
this.element.setAttribute("progressmode",
|
||||
AppConstants.platform == "linux" ? "normal" :
|
||||
"undetermined");
|
||||
this.element.setAttribute("progress-undetermined", "true");
|
||||
this.element.setAttribute("progress", "100");
|
||||
}
|
||||
|
||||
if (progressPaused) {
|
||||
|
@ -43,7 +43,7 @@
|
||||
class="downloadProgress"
|
||||
min="0"
|
||||
max="100"
|
||||
xbl:inherits="mode=progressmode,value=progress,paused=progresspaused"/>
|
||||
xbl:inherits="progress-undetermined,mode=progressmode,value=progress,paused=progresspaused"/>
|
||||
<xul:description class="downloadDetails downloadDetailsNormal"
|
||||
crop="end"
|
||||
xbl:inherits="value=status,tooltiptext=status"/>
|
||||
|
@ -1046,10 +1046,6 @@ var SessionStoreInternal = {
|
||||
this.resetEpoch(target);
|
||||
}
|
||||
break;
|
||||
case "BrowserWillChangeProcess":
|
||||
let promise = TabStateFlusher.flush(target);
|
||||
target.frameLoader.addProcessChangeBlockingPromise(promise);
|
||||
break;
|
||||
case "BrowserChangedProcess":
|
||||
let newEpoch = 1 + Math.max(this.getCurrentEpoch(target),
|
||||
this.getCurrentEpoch(aEvent.otherBrowser));
|
||||
@ -1125,7 +1121,6 @@ var SessionStoreInternal = {
|
||||
// Keep track of a browser's latest frameLoader.
|
||||
aWindow.gBrowser.addEventListener("XULFrameLoaderCreated", this);
|
||||
aWindow.gBrowser.addEventListener("BrowserChangedProcess", this);
|
||||
aWindow.gBrowser.addEventListener("BrowserWillChangeProcess", this);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1391,7 +1386,6 @@ var SessionStoreInternal = {
|
||||
|
||||
aWindow.gBrowser.removeEventListener("XULFrameLoaderCreated", this);
|
||||
aWindow.gBrowser.removeEventListener("BrowserChangedProcess", this);
|
||||
aWindow.gBrowser.removeEventListener("BrowserWillChangeProcess", this);
|
||||
|
||||
let winData = this._windows[aWindow.__SSi];
|
||||
|
||||
|
@ -243,7 +243,7 @@ skip-if = true
|
||||
|
||||
# Disabled on OS X:
|
||||
[browser_625016.js]
|
||||
skip-if = os == "mac" || (os == "linux" && debug) # linux, Bug 1348583
|
||||
skip-if = (os == "mac") || (os == "linux" && debug) || (os == "linux" && asan && bits == 64) # linux, Bug 1348583 # Bug 1430977
|
||||
|
||||
[browser_906076_lazy_tabs.js]
|
||||
[browser_911547.js]
|
||||
|
@ -1,6 +1,7 @@
|
||||
. "$topsrcdir/browser/config/mozconfigs/linux32/common-opt"
|
||||
|
||||
ac_add_options --enable-verify-mar
|
||||
ac_add_options --enable-dmd
|
||||
|
||||
ac_add_options --with-branding=browser/branding/nightly
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
ac_add_options --enable-dmd
|
||||
|
||||
. "$topsrcdir/browser/config/mozconfigs/linux32/nightly"
|
@ -1,6 +1,7 @@
|
||||
. $topsrcdir/browser/config/mozconfigs/linux32/nightly
|
||||
|
||||
ac_add_options --enable-valgrind
|
||||
ac_add_options --disable-dmd
|
||||
ac_add_options --disable-jemalloc
|
||||
ac_add_options --disable-install-strip
|
||||
ac_add_options --disable-gtest-in-build
|
||||
|
@ -1,6 +1,7 @@
|
||||
. "$topsrcdir/browser/config/mozconfigs/linux64/common-opt"
|
||||
|
||||
ac_add_options --enable-verify-mar
|
||||
ac_add_options --enable-dmd
|
||||
|
||||
ac_add_options --with-branding=browser/branding/nightly
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
ac_add_options --enable-dmd
|
||||
|
||||
. "$topsrcdir/browser/config/mozconfigs/linux64/nightly"
|
@ -1,6 +1,7 @@
|
||||
. $topsrcdir/browser/config/mozconfigs/linux64/nightly
|
||||
|
||||
ac_add_options --enable-valgrind
|
||||
ac_add_options --disable-dmd
|
||||
ac_add_options --disable-jemalloc
|
||||
ac_add_options --disable-install-strip
|
||||
ac_add_options --disable-gtest-in-build
|
||||
|
@ -3,6 +3,7 @@
|
||||
ac_add_options --disable-install-strip
|
||||
ac_add_options --enable-verify-mar
|
||||
ac_add_options --enable-instruments
|
||||
ac_add_options --enable-dmd
|
||||
|
||||
# Cross-compiled builds fail when dtrace is enabled
|
||||
if test `uname -s` != Linux; then
|
||||
|
@ -1,5 +0,0 @@
|
||||
ac_add_options --enable-dmd
|
||||
|
||||
. "$topsrcdir/browser/config/mozconfigs/macosx64/nightly"
|
||||
|
||||
ac_add_options --disable-lto
|
@ -9,6 +9,7 @@ all_platforms = ['win64', 'win32', 'linux32', 'linux64', 'macosx64']
|
||||
|
||||
for platform in all_platforms:
|
||||
whitelist['nightly'][platform] = [
|
||||
'ac_add_options --enable-dmd',
|
||||
'ac_add_options --with-branding=browser/branding/nightly',
|
||||
]
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
. "$topsrcdir/browser/config/mozconfigs/win32/common-opt"
|
||||
|
||||
ac_add_options --enable-verify-mar
|
||||
ac_add_options --enable-dmd
|
||||
|
||||
ac_add_options --with-branding=browser/branding/nightly
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
ac_add_options --enable-dmd
|
||||
|
||||
. "$topsrcdir/browser/config/mozconfigs/win32/nightly"
|
@ -3,6 +3,7 @@
|
||||
. "$topsrcdir/browser/config/mozconfigs/win64/common-opt"
|
||||
|
||||
ac_add_options --enable-verify-mar
|
||||
ac_add_options --enable-dmd
|
||||
|
||||
ac_add_options --with-branding=browser/branding/nightly
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
ac_add_options --enable-dmd
|
||||
|
||||
. "$topsrcdir/browser/config/mozconfigs/win64/nightly"
|
11
browser/locales/en-US/browser/aboutRestartRequired.ftl
Normal file
11
browser/locales/en-US/browser/aboutRestartRequired.ftl
Normal file
@ -0,0 +1,11 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
restart-required-title = Restart Required
|
||||
restart-required-header = Sorry. We just need to do one small thing to keep going.
|
||||
restart-required-intro = We have just installed an update in the background. Click Restart { -brand-short-name } to finish
|
||||
applying it.
|
||||
restart-required-description = We will restore all your pages, windows and tabs afterwards, so you can be on your way quickly.
|
||||
|
||||
restart-button-label = Restart { -brand-short-name }
|
@ -1,13 +0,0 @@
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!ENTITY restartRequired.title "Restart Required">
|
||||
|
||||
<!ENTITY restartRequired.header "Sorry. We just need to do one small thing to keep going.">
|
||||
<!ENTITY restartRequired.description "
|
||||
<p>We have just installed an update in the background. Click Restart &brandShortName; to finish applying it.</p>
|
||||
<p>We will restore all your pages, windows and tabs afterwards, so you can be on your way quickly.</p>
|
||||
">
|
||||
|
||||
<!ENTITY restartButton.label "Restart &brandShortName;">
|
@ -18,7 +18,6 @@
|
||||
locale/browser/aboutPrivateBrowsing.dtd (%chrome/browser/aboutPrivateBrowsing.dtd)
|
||||
locale/browser/aboutRobots.dtd (%chrome/browser/aboutRobots.dtd)
|
||||
locale/browser/accounts.properties (%chrome/browser/accounts.properties)
|
||||
locale/browser/aboutRestartRequired.dtd (%chrome/browser/aboutRestartRequired.dtd)
|
||||
locale/browser/aboutSearchReset.dtd (%chrome/browser/aboutSearchReset.dtd)
|
||||
locale/browser/aboutSessionRestore.dtd (%chrome/browser/aboutSessionRestore.dtd)
|
||||
locale/browser/aboutTabCrashed.dtd (%chrome/browser/aboutTabCrashed.dtd)
|
||||
|
@ -26,7 +26,7 @@
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
.sidebar-panel:not([lwt-sidebar]) .sidebar-placesTreechildren::-moz-tree-row(selected) {
|
||||
.sidebar-panel:not([lwt-sidebar]) .sidebar-placesTreechildren::-moz-tree-row(selected,blur) {
|
||||
-moz-appearance: -moz-mac-source-list-selection;
|
||||
-moz-font-smoothing-background-color: -moz-mac-source-list-selection;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ body:not([lwt-sidebar]) .content-container {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
body:not([lwt-sidebar]) .item.selected > .item-title-container {
|
||||
body:not([lwt-sidebar]) .item.selected:not(:focus) > .item-title-container {
|
||||
-moz-appearance: -moz-mac-source-list-selection;
|
||||
-moz-font-smoothing-background-color: -moz-mac-source-list-selection;
|
||||
}
|
||||
|
@ -13,11 +13,6 @@
|
||||
min-height: initial;
|
||||
}
|
||||
|
||||
.downloadProgress[mode="undetermined"] {
|
||||
/* for overriding rules on global.css in Linux. */
|
||||
-moz-binding: url("chrome://global/content/bindings/progressmeter.xml#progressmeter");
|
||||
}
|
||||
|
||||
.downloadProgress > .progress-bar {
|
||||
background-color: Highlight;
|
||||
|
||||
@ -29,7 +24,7 @@
|
||||
background-color: GrayText;
|
||||
}
|
||||
|
||||
.downloadProgress[mode="undetermined"] > .progress-bar {
|
||||
.downloadProgress[progress-undetermined] > .progress-bar {
|
||||
/* Make a white reflecting animation.
|
||||
Create a gradient with 2 identical pattern, and enlarge the size to 200%.
|
||||
This allows us to animate background-position with percentage. */
|
||||
@ -56,7 +51,7 @@
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
.downloadProgress > .progress-remainder[mode="undetermined"] {
|
||||
.downloadProgress[progress-undetermined] > .progress-remainder {
|
||||
border: none;
|
||||
}
|
||||
|
||||
|
@ -3,9 +3,8 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
const { PureComponent } = require("devtools/client/shared/vendor/react");
|
||||
const { PureComponent, createFactory } = require("devtools/client/shared/vendor/react");
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { createFactory } = require("devtools/client/shared/vendor/react");
|
||||
const MenuItem = createFactory(
|
||||
require("devtools/client/shared/components/menu/MenuItem")
|
||||
);
|
||||
@ -14,8 +13,9 @@ const MenuList = createFactory(
|
||||
);
|
||||
const dom = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
const { hr } = dom;
|
||||
const { openDocLink } = require("devtools/client/shared/link");
|
||||
const { assert } = require("devtools/shared/DevToolsUtils");
|
||||
|
||||
loader.lazyRequireGetter(this, "openDocLink", "devtools/client/shared/link", true);
|
||||
loader.lazyRequireGetter(this, "assert", "devtools/shared/DevToolsUtils", true);
|
||||
|
||||
const openDevToolsDocsLink = () => {
|
||||
openDocLink(
|
||||
|
@ -1274,11 +1274,17 @@ Navigator::RequestGamepadServiceTest()
|
||||
already_AddRefed<Promise>
|
||||
Navigator::GetVRDisplays(ErrorResult& aRv)
|
||||
{
|
||||
if (!mWindow || !mWindow->GetDocShell()) {
|
||||
if (!mWindow || !mWindow->GetDocShell() || !mWindow->GetExtantDoc()) {
|
||||
aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!FeaturePolicyUtils::IsFeatureAllowed(mWindow->GetExtantDoc(),
|
||||
NS_LITERAL_STRING("vr"))) {
|
||||
aRv.Throw(NS_ERROR_DOM_SECURITY_ERR);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsGlobalWindowInner* win = nsGlobalWindowInner::Cast(mWindow);
|
||||
win->NotifyVREventListenerAdded();
|
||||
|
||||
|
@ -95,7 +95,6 @@
|
||||
#include "mozilla/WebBrowserPersistLocalDocument.h"
|
||||
#include "mozilla/dom/Promise.h"
|
||||
#include "mozilla/dom/PromiseNativeHandler.h"
|
||||
#include "mozilla/dom/GroupedHistoryEvent.h"
|
||||
#include "mozilla/dom/ParentSHistory.h"
|
||||
#include "mozilla/dom/ChildSHistory.h"
|
||||
|
||||
@ -166,7 +165,6 @@ nsFrameLoader::nsFrameLoader(Element* aOwner, nsPIDOMWindowOuter* aOpener,
|
||||
, mRemoteBrowser(nullptr)
|
||||
, mChildID(0)
|
||||
, mJSPluginID(aJSPluginID)
|
||||
, mBrowserChangingProcessBlockers(nullptr)
|
||||
, mDepthTooGreat(false)
|
||||
, mIsTopLevelContent(false)
|
||||
, mDestroyCalled(false)
|
||||
@ -343,85 +341,6 @@ nsFrameLoader::LoadURI(nsIURI* aURI, nsIPrincipal* aTriggeringPrincipal,
|
||||
return rv;
|
||||
}
|
||||
|
||||
bool
|
||||
nsFrameLoader::SwapBrowsersAndNotify(nsFrameLoader* aOther)
|
||||
{
|
||||
// Cache the owner content before calling SwapBrowsers, which will change
|
||||
// these member variables.
|
||||
RefPtr<mozilla::dom::Element> primaryContent = mOwnerContent;
|
||||
RefPtr<mozilla::dom::Element> secondaryContent = aOther->mOwnerContent;
|
||||
|
||||
// Swap loaders through our owner, so the owner's listeners will be correctly
|
||||
// setup.
|
||||
nsCOMPtr<nsIBrowser> ourBrowser = do_QueryInterface(primaryContent);
|
||||
nsCOMPtr<nsIBrowser> otherBrowser = do_QueryInterface(secondaryContent);
|
||||
if (NS_WARN_IF(!ourBrowser || !otherBrowser)) {
|
||||
return false;
|
||||
}
|
||||
nsresult rv = ourBrowser->SwapBrowsers(otherBrowser, nsIBrowser::SWAP_KEEP_PERMANENT_KEY);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Dispatch the BrowserChangedProcess event to tell JS that the process swap
|
||||
// has occurred.
|
||||
GroupedHistoryEventInit eventInit;
|
||||
eventInit.mBubbles = true;
|
||||
eventInit.mCancelable= false;
|
||||
eventInit.mOtherBrowser = secondaryContent;
|
||||
RefPtr<GroupedHistoryEvent> event =
|
||||
GroupedHistoryEvent::Constructor(primaryContent,
|
||||
NS_LITERAL_STRING("BrowserChangedProcess"),
|
||||
eventInit);
|
||||
event->SetTrusted(true);
|
||||
primaryContent->DispatchEvent(*event);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
already_AddRefed<Promise>
|
||||
nsFrameLoader::FireWillChangeProcessEvent()
|
||||
{
|
||||
AutoJSAPI jsapi;
|
||||
if (NS_WARN_IF(!jsapi.Init(mOwnerContent->GetOwnerGlobal()))) {
|
||||
return nullptr;
|
||||
}
|
||||
JSContext* cx = jsapi.cx();
|
||||
|
||||
// Set our mBrowserChangingProcessBlockers property to refer to the blockers
|
||||
// list. We will synchronously dispatch a DOM event to collect this list of
|
||||
// blockers.
|
||||
nsTArray<RefPtr<Promise>> blockers;
|
||||
mBrowserChangingProcessBlockers = &blockers;
|
||||
|
||||
GroupedHistoryEventInit eventInit;
|
||||
eventInit.mBubbles = true;
|
||||
eventInit.mCancelable = false;
|
||||
eventInit.mOtherBrowser = nullptr;
|
||||
RefPtr<GroupedHistoryEvent> event =
|
||||
GroupedHistoryEvent::Constructor(mOwnerContent,
|
||||
NS_LITERAL_STRING("BrowserWillChangeProcess"),
|
||||
eventInit);
|
||||
event->SetTrusted(true);
|
||||
mOwnerContent->DispatchEvent(*event);
|
||||
|
||||
mBrowserChangingProcessBlockers = nullptr;
|
||||
|
||||
ErrorResult rv;
|
||||
RefPtr<Promise> allPromise = Promise::All(cx, blockers, rv);
|
||||
return allPromise.forget();
|
||||
}
|
||||
|
||||
void
|
||||
nsFrameLoader::AddProcessChangeBlockingPromise(Promise& aPromise, ErrorResult& aRv)
|
||||
{
|
||||
if (NS_WARN_IF(!mBrowserChangingProcessBlockers)) {
|
||||
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
|
||||
} else {
|
||||
mBrowserChangingProcessBlockers->AppendElement(&aPromise);
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsFrameLoader::ReallyStartLoading()
|
||||
{
|
||||
@ -3124,22 +3043,6 @@ nsFrameLoader::RequestNotifyAfterRemotePaint()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsFrameLoader::RequestFrameLoaderClose(ErrorResult& aRv)
|
||||
{
|
||||
nsCOMPtr<nsIBrowser> browser = do_QueryInterface(mOwnerContent);
|
||||
if (NS_WARN_IF(!browser)) {
|
||||
// OwnerElement other than nsIBrowser is not supported yet.
|
||||
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
|
||||
return;
|
||||
}
|
||||
|
||||
nsresult rv = browser->CloseBrowser();
|
||||
if (NS_FAILED(rv)) {
|
||||
aRv.Throw(rv);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsFrameLoader::RequestUpdatePosition(ErrorResult& aRv)
|
||||
{
|
||||
|
@ -139,8 +139,6 @@ public:
|
||||
nsresult LoadURI(nsIURI* aURI, nsIPrincipal* aTriggeringPrincipal,
|
||||
bool aOriginalSrc);
|
||||
|
||||
void AddProcessChangeBlockingPromise(mozilla::dom::Promise& aPromise, mozilla::ErrorResult& aRv);
|
||||
|
||||
/**
|
||||
* Destroy the frame loader and everything inside it. This will
|
||||
* clear the weak owner content reference.
|
||||
@ -166,8 +164,6 @@ public:
|
||||
|
||||
void RequestNotifyAfterRemotePaint();
|
||||
|
||||
void RequestFrameLoaderClose(mozilla::ErrorResult& aRv);
|
||||
|
||||
void RequestUpdatePosition(mozilla::ErrorResult& aRv);
|
||||
|
||||
void Print(uint64_t aOuterWindowID,
|
||||
@ -443,14 +439,6 @@ private:
|
||||
nsresult
|
||||
PopulateUserContextIdFromAttribute(mozilla::OriginAttributes& aAttr);
|
||||
|
||||
// Swap ourselves with the frameloader aOther, and notify chrome code with
|
||||
// a BrowserChangedProcess event.
|
||||
bool SwapBrowsersAndNotify(nsFrameLoader* aOther);
|
||||
|
||||
// Returns a promise which will be resolved once all of the blockers have
|
||||
// resolved which were added during the BrowserWillChangeProcess event.
|
||||
already_AddRefed<mozilla::dom::Promise> FireWillChangeProcessEvent();
|
||||
|
||||
nsCOMPtr<nsIDocShell> mDocShell;
|
||||
nsCOMPtr<nsIURI> mURIToLoad;
|
||||
nsCOMPtr<nsIPrincipal> mTriggeringPrincipal;
|
||||
@ -482,10 +470,6 @@ private:
|
||||
// Holds the last known size of the frame.
|
||||
mozilla::ScreenIntSize mLazySize;
|
||||
|
||||
// A stack-maintained reference to an array of promises which are blocking
|
||||
// grouped history navigation
|
||||
nsTArray<RefPtr<mozilla::dom::Promise>>* mBrowserChangingProcessBlockers;
|
||||
|
||||
RefPtr<mozilla::dom::ParentSHistory> mParentSHistory;
|
||||
|
||||
bool mDepthTooGreat : 1;
|
||||
|
@ -40,7 +40,6 @@ static FeatureMap sSupportedFeatures[] = {
|
||||
{ "payment", FeatureMap::eSelf },
|
||||
// TODO: not supported yet!!!
|
||||
{ "speaker", FeatureMap::eSelf },
|
||||
// TODO: not supported yet!!!
|
||||
{ "vr", FeatureMap::eSelf },
|
||||
};
|
||||
|
||||
|
@ -39,14 +39,6 @@ interface FrameLoader {
|
||||
*/
|
||||
readonly attribute ParentSHistory? parentSHistory;
|
||||
|
||||
/**
|
||||
* Adds a blocking promise for the current cross process navigation.
|
||||
* This method can only be called while the "BrowserWillChangeProcess" event
|
||||
* is being fired.
|
||||
*/
|
||||
[Throws]
|
||||
void addProcessChangeBlockingPromise(Promise<any> aPromise);
|
||||
|
||||
/**
|
||||
* Find out whether the loader's frame is at too great a depth in
|
||||
* the frame tree. This can be used to decide what operations may
|
||||
@ -97,12 +89,6 @@ interface FrameLoader {
|
||||
*/
|
||||
void requestNotifyAfterRemotePaint();
|
||||
|
||||
/**
|
||||
* Close the window through the ownerElement.
|
||||
*/
|
||||
[Throws]
|
||||
void requestFrameLoaderClose();
|
||||
|
||||
/**
|
||||
* Force a remote browser to recompute its dimension and screen position.
|
||||
*/
|
||||
@ -129,13 +115,6 @@ interface FrameLoader {
|
||||
*/
|
||||
attribute boolean clipSubdocument;
|
||||
|
||||
/**
|
||||
* If false, then the subdocument's scroll coordinates will not be clamped
|
||||
* to their scroll boundaries.
|
||||
* Defaults to true.
|
||||
*/
|
||||
attribute boolean clampScrollPosition;
|
||||
|
||||
/**
|
||||
* The element which owns this frame loader.
|
||||
*
|
||||
|
@ -1,17 +0,0 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
[ChromeOnly,
|
||||
Constructor(DOMString type, optional GroupedHistoryEventInit eventInitDict)]
|
||||
interface GroupedHistoryEvent : Event
|
||||
{
|
||||
readonly attribute Element? otherBrowser;
|
||||
};
|
||||
|
||||
dictionary GroupedHistoryEventInit : EventInit
|
||||
{
|
||||
Element? otherBrowser = null;
|
||||
};
|
@ -133,9 +133,6 @@ with Files("GetUserMediaRequest.webidl"):
|
||||
with Files("Grid.webidl"):
|
||||
BUG_COMPONENT = ("Core", "CSS Parsing and Computation")
|
||||
|
||||
with Files("GroupedHistoryEvent.webidl"):
|
||||
BUG_COMPONENT = ("Core", "Document Navigation")
|
||||
|
||||
with Files("HTML*"):
|
||||
BUG_COMPONENT = ("Core", "DOM: Core & HTML")
|
||||
|
||||
@ -1053,7 +1050,6 @@ GENERATED_EVENTS_WEBIDL_FILES = [
|
||||
'GamepadAxisMoveEvent.webidl',
|
||||
'GamepadButtonEvent.webidl',
|
||||
'GamepadEvent.webidl',
|
||||
'GroupedHistoryEvent.webidl',
|
||||
'HashChangeEvent.webidl',
|
||||
'HiddenPluginEvent.webidl',
|
||||
'ImageCaptureErrorEvent.webidl',
|
||||
|
@ -6686,34 +6686,44 @@ GetSharedObject(JSContext* cx, unsigned argc, Value* vp)
|
||||
// Flag was set in the sender; ensure it is set in the receiver.
|
||||
MOZ_ASSERT(cx->realm()->creationOptions().getSharedMemoryAndAtomicsEnabled());
|
||||
|
||||
// The protocol for creating a SAB requires the refcount to be
|
||||
// incremented prior to the SAB creation.
|
||||
|
||||
SharedArrayRawBuffer* buf = mbx->val.sarb.buffer;
|
||||
uint32_t length = mbx->val.sarb.length;
|
||||
if (!buf->addReference()) {
|
||||
JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_SC_SAB_REFCNT_OFLO);
|
||||
return false;
|
||||
}
|
||||
auto dropBuf = MakeScopeExit([buf] { buf->dropReference(); });
|
||||
|
||||
// If the allocation fails we must decrement the refcount before
|
||||
// returning.
|
||||
|
||||
Rooted<ArrayBufferObjectMaybeShared*> maybesab(cx, SharedArrayBufferObject::New(cx, buf, length));
|
||||
if (!maybesab) {
|
||||
buf->dropReference();
|
||||
return false;
|
||||
}
|
||||
|
||||
// At this point the SAB was created successfully and it owns the
|
||||
// refcount-increase on the buffer that we performed above. So even
|
||||
// if we fail to allocate along any path below we must not decrement
|
||||
// the refcount; the garbage collector must be allowed to handle
|
||||
// that via finalization of the orphaned SAB object.
|
||||
|
||||
if (mbx->tag == MailboxTag::SharedArrayBuffer) {
|
||||
newObj = maybesab;
|
||||
} else {
|
||||
if (!GlobalObject::ensureConstructor(cx, cx->global(), JSProto_WebAssembly)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
RootedObject proto(cx, &cx->global()->getPrototype(JSProto_WasmMemory).toObject());
|
||||
newObj = WasmMemoryObject::create(cx, maybesab, proto);
|
||||
MOZ_ASSERT_IF(newObj, newObj->as<WasmMemoryObject>().isShared());
|
||||
if (!newObj) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!newObj) {
|
||||
return false;
|
||||
}
|
||||
|
||||
dropBuf.release();
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -1848,6 +1848,8 @@ nsTreeBodyFrame::PrefillPropertyArray(int32_t aRowIndex, nsTreeColumn* aCol)
|
||||
// focus
|
||||
if (mFocused)
|
||||
mScratchArray.AppendElement(nsGkAtoms::focus);
|
||||
else
|
||||
mScratchArray.AppendElement(nsGkAtoms::blur);
|
||||
|
||||
// sort
|
||||
bool sorted = false;
|
||||
|
@ -332,7 +332,8 @@ def getDigestFromFile(args, inputFile):
|
||||
if args.filter_stacks_for_testing:
|
||||
# When running SmokeDMD.cpp, every stack trace should contain at
|
||||
# least one frame that contains 'DMD.cpp', from either |DMD.cpp| or
|
||||
# |SmokeDMD.cpp|. (Or 'dmd.cpp' on Windows.) If we see such a
|
||||
# |SmokeDMD.cpp|. (Or 'dmd.cpp' on Windows.) On builds without
|
||||
# debuginfo we expect just |SmokeDMD|. If we see such a
|
||||
# frame, we replace the entire stack trace with a single,
|
||||
# predictable frame. There is too much variation in the stack
|
||||
# traces across different machines and platforms to do more precise
|
||||
@ -340,7 +341,8 @@ def getDigestFromFile(args, inputFile):
|
||||
# stack fixing fails completely.
|
||||
for frameKey in frameKeys:
|
||||
frameDesc = frameTable[frameKey]
|
||||
if 'DMD.cpp' in frameDesc or 'dmd.cpp' in frameDesc:
|
||||
expected = ('DMD.cpp', 'dmd.cpp', 'SmokeDMD')
|
||||
if any(ex in frameDesc for ex in expected):
|
||||
return [fmt.format(1, ': ... DMD.cpp ...')]
|
||||
|
||||
# The frame number is always '#00' (see DMD.h for why), so we have to
|
||||
|
@ -31,4 +31,4 @@ support-files =
|
||||
|
||||
[test_dmd.js]
|
||||
dmd = true
|
||||
skip-if = !(os=='linux' || os=='win' || os=='mac')
|
||||
skip-if = !(os=='linux' || os=='mac' || (os=='win' && !pgo))
|
||||
|
@ -0,0 +1,25 @@
|
||||
# coding=utf8
|
||||
|
||||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
from __future__ import absolute_import
|
||||
import fluent.syntax.ast as FTL
|
||||
from fluent.migrate.helpers import transforms_from
|
||||
from fluent.migrate.helpers import TERM_REFERENCE
|
||||
from fluent.migrate import REPLACE
|
||||
|
||||
def migrate(ctx):
|
||||
"""Bug 1488788- Migrate about:restartrequired from DTD to Fluent, part {index}."""
|
||||
|
||||
ctx.add_transforms(
|
||||
"browser/browser/aboutRestartRequired.ftl",
|
||||
"browser/browser/aboutRestartRequired.ftl",
|
||||
transforms_from(
|
||||
"""
|
||||
restart-required-title = { COPY("browser/chrome/browser/aboutRestartRequired.dtd", "restartRequired.title") }
|
||||
|
||||
restart-required-header = { COPY("browser/chrome/browser/aboutRestartRequired.dtd", "restartRequired.header") }
|
||||
""")
|
||||
)
|
||||
|
@ -60,40 +60,6 @@ linux64-plain/opt:
|
||||
- linux64-node
|
||||
- linux64-cbindgen
|
||||
|
||||
linux64-dmd/opt:
|
||||
description: "Linux64 DMD Opt"
|
||||
index:
|
||||
product: firefox
|
||||
job-name: linux64-dmd-opt
|
||||
treeherder:
|
||||
platform: linux64-dmd/opt
|
||||
symbol: Bdmd
|
||||
tier: 2
|
||||
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
|
||||
worker:
|
||||
max-run-time: 3600
|
||||
run:
|
||||
using: mozharness
|
||||
actions: [get-secrets build check-test]
|
||||
config:
|
||||
- builds/releng_base_firefox.py
|
||||
- builds/releng_base_linux_64_builds.py
|
||||
script: "mozharness/scripts/fx_desktop_build.py"
|
||||
extra-config:
|
||||
mozconfig_variant: 'opt-dmd'
|
||||
secrets: true
|
||||
tooltool-downloads: public
|
||||
need-xvfb: true
|
||||
run-on-projects: []
|
||||
toolchains:
|
||||
- linux64-binutils
|
||||
- linux64-clang
|
||||
- linux64-rust
|
||||
- linux64-rust-size
|
||||
- linux64-cbindgen
|
||||
- linux64-sccache
|
||||
- linux64-node
|
||||
|
||||
linux64/pgo:
|
||||
description: "Linux64 PGO"
|
||||
index:
|
||||
|
@ -109,44 +109,6 @@ macosx64-asan-fuzzing/opt:
|
||||
- linux64-sccache
|
||||
- linux64-node
|
||||
|
||||
macosx64-dmd/opt:
|
||||
description: "MacOS X x64 DMD Cross-compile"
|
||||
index:
|
||||
product: firefox
|
||||
job-name: macosx64-dmd-opt
|
||||
treeherder:
|
||||
platform: osx-10-10-dmd/opt
|
||||
symbol: Bdmd
|
||||
tier: 2
|
||||
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
|
||||
worker:
|
||||
max-run-time: 3600
|
||||
env:
|
||||
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-releng.manifest"
|
||||
run:
|
||||
using: mozharness
|
||||
actions: [get-secrets build]
|
||||
config:
|
||||
- builds/releng_base_firefox.py
|
||||
- builds/releng_base_mac_64_cross_builds.py
|
||||
script: "mozharness/scripts/fx_desktop_build.py"
|
||||
extra-config:
|
||||
mozconfig_variant: 'opt-dmd'
|
||||
secrets: true
|
||||
tooltool-downloads: internal
|
||||
run-on-projects: []
|
||||
toolchains:
|
||||
- linux64-cctools-port
|
||||
- linux64-clang
|
||||
- linux64-hfsplus
|
||||
- linux64-libdmg
|
||||
- linux64-llvm-dsymutil
|
||||
- linux64-rust-macos
|
||||
- linux64-rust-size
|
||||
- linux64-cbindgen
|
||||
- linux64-sccache
|
||||
- linux64-node
|
||||
|
||||
macosx64-devedition-nightly/opt:
|
||||
description: "MacOS X Dev Edition x64 Nightly"
|
||||
attributes:
|
||||
|
@ -70,40 +70,6 @@ win32/opt:
|
||||
- win64-sccache
|
||||
- win64-node
|
||||
|
||||
win32-dmd/opt:
|
||||
description: "Win32 DMD Opt"
|
||||
index:
|
||||
product: firefox
|
||||
job-name: win32-dmd-opt
|
||||
treeherder:
|
||||
platform: windows2012-32-dmd/opt
|
||||
symbol: Bdmd
|
||||
tier: 2
|
||||
worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
|
||||
worker:
|
||||
max-run-time: 7200
|
||||
env:
|
||||
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/releng.manifest"
|
||||
run:
|
||||
using: mozharness
|
||||
options: [append-env-variables-from-configs]
|
||||
script: mozharness/scripts/fx_desktop_build.py
|
||||
config:
|
||||
- builds/releng_base_firefox.py
|
||||
- builds/taskcluster_base_windows.py
|
||||
- builds/taskcluster_base_win32.py
|
||||
- builds/taskcluster_sub_win32/opt.py
|
||||
extra-config:
|
||||
mozconfig_variant: 'opt-dmd'
|
||||
run-on-projects: []
|
||||
toolchains:
|
||||
- win64-clang-cl
|
||||
- win64-rust
|
||||
- win64-rust-size
|
||||
- win64-cbindgen
|
||||
- win64-sccache
|
||||
- win64-node
|
||||
|
||||
win32/pgo:
|
||||
description: "Win32 Opt PGO"
|
||||
index:
|
||||
@ -265,40 +231,6 @@ win64-plain/opt:
|
||||
- win64-node
|
||||
- win64-cbindgen
|
||||
|
||||
win64-dmd/opt:
|
||||
description: "Win64 DMD Opt"
|
||||
index:
|
||||
product: firefox
|
||||
job-name: win64-dmd-opt
|
||||
treeherder:
|
||||
platform: windows2012-64-dmd/opt
|
||||
symbol: Bdmd
|
||||
tier: 2
|
||||
worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
|
||||
worker:
|
||||
max-run-time: 7200
|
||||
env:
|
||||
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/releng.manifest"
|
||||
run:
|
||||
using: mozharness
|
||||
options: [append-env-variables-from-configs]
|
||||
script: mozharness/scripts/fx_desktop_build.py
|
||||
config:
|
||||
- builds/releng_base_firefox.py
|
||||
- builds/taskcluster_base_windows.py
|
||||
- builds/taskcluster_base_win64.py
|
||||
- builds/taskcluster_sub_win64/opt.py
|
||||
extra-config:
|
||||
mozconfig_variant: 'opt-dmd'
|
||||
run-on-projects: []
|
||||
toolchains:
|
||||
- win64-clang-cl
|
||||
- win64-rust
|
||||
- win64-rust-size
|
||||
- win64-cbindgen
|
||||
- win64-sccache
|
||||
- win64-node
|
||||
|
||||
win32-nightly/opt:
|
||||
description: "Win32 Nightly"
|
||||
index:
|
||||
|
@ -553,16 +553,6 @@ def target_tasks_nightly_desktop(full_task_graph, parameters, graph_config):
|
||||
)
|
||||
|
||||
|
||||
# Opt DMD builds should only run nightly
|
||||
@_target_task('nightly_dmd')
|
||||
def target_tasks_dmd(full_task_graph, parameters, graph_config):
|
||||
"""Target DMD that run nightly on the m-c branch."""
|
||||
def filter(task):
|
||||
platform = task.attributes.get('build_platform', '')
|
||||
return platform.endswith('-dmd')
|
||||
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
|
||||
|
||||
|
||||
# Run Searchfox analysis once daily.
|
||||
@_target_task('searchfox_index')
|
||||
def target_tasks_searchfox(full_task_graph, parameters, graph_config):
|
||||
|
@ -394,7 +394,6 @@ class BuildOptionParser(object):
|
||||
'artifact': 'builds/releng_sub_%s_configs/%s_artifact.py',
|
||||
'debug-artifact': 'builds/releng_sub_%s_configs/%s_debug_artifact.py',
|
||||
'devedition': 'builds/releng_sub_%s_configs/%s_devedition.py',
|
||||
'dmd': 'builds/releng_sub_%s_configs/%s_dmd.py',
|
||||
'tup': 'builds/releng_sub_%s_configs/%s_tup.py',
|
||||
}
|
||||
build_pool_cfg_file = 'builds/build_pool_specifics.py'
|
||||
|
@ -1 +1 @@
|
||||
prefs: [dom.vr.enabled:true]
|
||||
prefs: [dom.vr.enabled:true,dom.security.featurePolicy.enabled:true]
|
||||
|
@ -1,10 +0,0 @@
|
||||
[webvr-disabled-by-feature-policy.https.sub.html]
|
||||
[Feature-Policy header vr "none" disallows the top-level document.]
|
||||
expected: FAIL
|
||||
|
||||
[Feature-Policy header vr "none" disallows same-origin iframes.]
|
||||
expected: FAIL
|
||||
|
||||
[Feature-Policy header vr "none" disallows cross-origin iframes.]
|
||||
expected: FAIL
|
||||
|
@ -1,7 +0,0 @@
|
||||
[webvr-enabled-by-feature-policy-attribute-redirect-on-load.https.sub.html]
|
||||
[Feature-Policy allow="vr" attribute allows same-origin relocation]
|
||||
expected: FAIL
|
||||
|
||||
[Feature-Policy allow="vr" attribute disallows cross-origin relocation]
|
||||
expected: FAIL
|
||||
|
@ -1,7 +1,4 @@
|
||||
[webvr-enabled-by-feature-policy-attribute.https.sub.html]
|
||||
[Feature-Policy allow="vr" attribute allows same-origin iframe]
|
||||
expected: FAIL
|
||||
|
||||
[Feature-Policy allow="vr" attribute allows cross-origin iframe]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -1,4 +0,0 @@
|
||||
[webvr-enabled-on-self-origin-by-feature-policy.https.sub.html]
|
||||
[Feature-Policy header vr "self" disallows cross-origin iframes.]
|
||||
expected: FAIL
|
||||
|
@ -532,7 +532,7 @@
|
||||
},
|
||||
"FULLSCREEN_TRANSITION_BLACK_MS": {
|
||||
"record_in_processes": ["main", "content"],
|
||||
"alert_emails": ["xquan@mozilla.com"],
|
||||
"alert_emails": ["mozilla-telemetry@upsuper.org"],
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
"low": 100,
|
||||
@ -543,7 +543,7 @@
|
||||
},
|
||||
"FULLSCREEN_CHANGE_MS": {
|
||||
"record_in_processes": ["main", "content"],
|
||||
"alert_emails": ["xquan@mozilla.com"],
|
||||
"alert_emails": ["mozilla-telemetry@upsuper.org"],
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
"low": 100,
|
||||
@ -14185,7 +14185,7 @@
|
||||
},
|
||||
"HIDDEN_VIEWPORT_OVERFLOW_TYPE": {
|
||||
"record_in_processes": ["main", "content"],
|
||||
"alert_emails": ["xquan@mozilla.com", "botond@mozilla.com"],
|
||||
"alert_emails": ["mozilla-telemetry@upsuper.org", "botond@mozilla.com"],
|
||||
"bug_numbers": [1423013, 1423017],
|
||||
"expires_in_version": "65",
|
||||
"kind": "categorical",
|
||||
|
@ -201,6 +201,7 @@ const isDummyDocument = document.documentURI == "chrome://extensions/content/dum
|
||||
if (!isDummyDocument) {
|
||||
for (let script of [
|
||||
"chrome://global/content/elements/general.js",
|
||||
"chrome://global/content/elements/progressmeter.js",
|
||||
"chrome://global/content/elements/radio.js",
|
||||
"chrome://global/content/elements/textbox.js",
|
||||
"chrome://global/content/elements/tabbox.js",
|
||||
|
@ -82,7 +82,6 @@ toolkit.jar:
|
||||
content/global/bindings/notification.xml (widgets/notification.xml)
|
||||
content/global/bindings/numberbox.xml (widgets/numberbox.xml)
|
||||
content/global/bindings/popup.xml (widgets/popup.xml)
|
||||
content/global/bindings/progressmeter.xml (widgets/progressmeter.xml)
|
||||
content/global/bindings/radio.xml (widgets/radio.xml)
|
||||
content/global/bindings/richlistbox.xml (widgets/richlistbox.xml)
|
||||
content/global/bindings/scrollbox.xml (widgets/scrollbox.xml)
|
||||
@ -100,6 +99,7 @@ toolkit.jar:
|
||||
content/global/elements/findbar.js (widgets/findbar.js)
|
||||
content/global/elements/editor.js (widgets/editor.js)
|
||||
content/global/elements/general.js (widgets/general.js)
|
||||
content/global/elements/progressmeter.js (widgets/progressmeter.js)
|
||||
content/global/elements/radio.js (widgets/radio.js)
|
||||
content/global/elements/stringbundle.js (widgets/stringbundle.js)
|
||||
content/global/elements/tabbox.js (widgets/tabbox.js)
|
||||
|
@ -35,7 +35,7 @@ skip-if = toolkit == 'android' # Bug 1483656
|
||||
tags = fullscreen
|
||||
skip-if = toolkit == 'android' || (verify && debug && (os == 'linux')) #TIMED_OUT
|
||||
[test_videocontrols_keyhandler.html]
|
||||
skip-if = toolkit == 'android'
|
||||
skip-if = (toolkit == 'android') || (os == 'linux') #Bug 1366957
|
||||
[test_videocontrols_vtt.html]
|
||||
skip-if = toolkit == 'android' # Bug 1483656
|
||||
[test_videocontrols_iframe_fullscreen.html]
|
||||
|
149
toolkit/content/widgets/progressmeter.js
Normal file
149
toolkit/content/widgets/progressmeter.js
Normal file
@ -0,0 +1,149 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// This is loaded into chrome windows with the subscript loader. Wrap in
|
||||
// a block to prevent accidentally leaking globals onto `window`.
|
||||
{
|
||||
|
||||
/**
|
||||
* XUL progressmeter element.
|
||||
*/
|
||||
class MozProgressmeter extends MozXULElement {
|
||||
get mode() {
|
||||
return this.getAttribute("mode");
|
||||
}
|
||||
|
||||
set mode(val) {
|
||||
if (this.mode != val) {
|
||||
this.setAttribute("mode", val);
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
get value() {
|
||||
return this.getAttribute("value") || "0";
|
||||
}
|
||||
|
||||
set value(val) {
|
||||
let p = Math.round(val);
|
||||
let max = Math.round(this.max);
|
||||
if (p < 0) {
|
||||
p = 0;
|
||||
} else if (p > max) {
|
||||
p = max;
|
||||
}
|
||||
|
||||
let c = this.value;
|
||||
if (p != c) {
|
||||
let delta = p - c;
|
||||
if (delta < 0) {
|
||||
delta = -delta;
|
||||
}
|
||||
if (delta > 3 || p == 0 || p == max) {
|
||||
this.setAttribute("value", p);
|
||||
// Fire DOM event so that accessible value change events occur
|
||||
let event = document.createEvent("Events");
|
||||
event.initEvent("ValueChange", true, true);
|
||||
this.dispatchEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
get max() {
|
||||
return this.getAttribute("max") || "100";
|
||||
}
|
||||
|
||||
set max(val) {
|
||||
this.setAttribute("max", isNaN(val) ? 100 : Math.max(val, 1));
|
||||
this.value = this.value;
|
||||
return val;
|
||||
}
|
||||
|
||||
isUndetermined() {
|
||||
return this.getAttribute("mode") == "undetermined";
|
||||
}
|
||||
|
||||
connectedCallback() {
|
||||
this._initUI();
|
||||
}
|
||||
|
||||
disconnectedCallback() {
|
||||
this.runAnimation = false;
|
||||
}
|
||||
|
||||
static get observedAttributes() {
|
||||
return [ "mode" ];
|
||||
}
|
||||
|
||||
attributeChangedCallback(name, oldValue, newValue) {
|
||||
if (name === "mode" && oldValue != newValue) {
|
||||
this._initUI();
|
||||
}
|
||||
}
|
||||
|
||||
_initUI() {
|
||||
let isUndetermined = this.isUndetermined();
|
||||
let content = isUndetermined ?
|
||||
`
|
||||
<spacer class="progress-bar"/>
|
||||
<spacer class="progress-remainder"/>
|
||||
` :
|
||||
`
|
||||
<stack class="progress-remainder" flex="1" style="overflow: -moz-hidden-unscrollable;">
|
||||
<spacer class="progress-bar" top="0" style="margin-right: -1000px;"/>
|
||||
</stack>
|
||||
`;
|
||||
|
||||
this._stack = null;
|
||||
this._spacer = null;
|
||||
this._runAnimation = isUndetermined;
|
||||
|
||||
this.textContent = "";
|
||||
this.appendChild(MozXULElement.parseXULToFragment(content));
|
||||
|
||||
if (!isUndetermined) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._stack = this.querySelector(".progress-remainder");
|
||||
this._spacer = this.querySelector(".progress-bar");
|
||||
this._isLTR = document.defaultView.getComputedStyle(this).direction == "ltr";
|
||||
this._startTime = window.performance.now();
|
||||
|
||||
let nextStep = (t) => {
|
||||
if (!this._runAnimation) {
|
||||
return;
|
||||
}
|
||||
|
||||
let width = this._stack.boxObject.width;
|
||||
if (width) {
|
||||
let elapsedTime = t - this._startTime;
|
||||
|
||||
// Width of chunk is 1/5 (determined by the ratio 2000:400) of the
|
||||
// total width of the progress bar. The left edge of the chunk
|
||||
// starts at -1 and moves all the way to 4. It covers the distance
|
||||
// in 2 seconds.
|
||||
let position = this._isLTR ? ((elapsedTime % 2000) / 400) - 1 :
|
||||
((elapsedTime % 2000) / -400) + 4;
|
||||
|
||||
width = width >> 2;
|
||||
this._spacer.height = this._stack.boxObject.height;
|
||||
this._spacer.width = width;
|
||||
this._spacer.left = width * position;
|
||||
}
|
||||
|
||||
window.requestAnimationFrame(nextStep);
|
||||
};
|
||||
|
||||
window.requestAnimationFrame(nextStep);
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("progressmeter", MozProgressmeter);
|
||||
|
||||
}
|
@ -1,112 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
|
||||
<bindings id="progressmeterBindings"
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="progressmeter">
|
||||
<content>
|
||||
<xul:spacer class="progress-bar" xbl:inherits="mode"/>
|
||||
<xul:spacer class="progress-remainder" xbl:inherits="mode"/>
|
||||
</content>
|
||||
|
||||
<implementation>
|
||||
<property name="mode" onset="if (this.mode != val) this.setAttribute('mode', val); return val;"
|
||||
onget="return this.getAttribute('mode');"/>
|
||||
|
||||
<property name="value" onget="return this.getAttribute('value') || '0';">
|
||||
<setter><![CDATA[
|
||||
var p = Math.round(val);
|
||||
var max = Math.round(this.max);
|
||||
if (p < 0)
|
||||
p = 0;
|
||||
else if (p > max)
|
||||
p = max;
|
||||
var c = this.value;
|
||||
if (p != c) {
|
||||
var delta = p - c;
|
||||
if (delta < 0)
|
||||
delta = -delta;
|
||||
if (delta > 3 || p == 0 || p == max) {
|
||||
this.setAttribute("value", p);
|
||||
// Fire DOM event so that accessible value change events occur
|
||||
var event = document.createEvent("Events");
|
||||
event.initEvent("ValueChange", true, true);
|
||||
this.dispatchEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
return val;
|
||||
]]></setter>
|
||||
</property>
|
||||
<property name="max"
|
||||
onget="return this.getAttribute('max') || '100';"
|
||||
onset="this.setAttribute('max', isNaN(val) ? 100 : Math.max(val, 1));
|
||||
this.value = this.value;
|
||||
return val;" />
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
<binding id="progressmeter-undetermined"
|
||||
extends="chrome://global/content/bindings/progressmeter.xml#progressmeter">
|
||||
<content>
|
||||
<xul:stack class="progress-remainder" flex="1" anonid="stack" style="overflow: -moz-hidden-unscrollable;">
|
||||
<xul:spacer class="progress-bar" anonid="spacer" top="0" style="margin-right: -1000px;"/>
|
||||
</xul:stack>
|
||||
</content>
|
||||
|
||||
<implementation>
|
||||
<field name="_alive">true</field>
|
||||
<method name="_init">
|
||||
<body><![CDATA[
|
||||
var stack =
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "stack");
|
||||
var spacer =
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "spacer");
|
||||
var isLTR =
|
||||
document.defaultView.getComputedStyle(this).direction == "ltr";
|
||||
var startTime = performance.now();
|
||||
var self = this;
|
||||
|
||||
function nextStep(t) {
|
||||
try {
|
||||
var width = stack.boxObject.width;
|
||||
if (!width) {
|
||||
// Maybe we've been removed from the document.
|
||||
if (self._alive)
|
||||
requestAnimationFrame(nextStep);
|
||||
return;
|
||||
}
|
||||
|
||||
var elapsedTime = t - startTime;
|
||||
|
||||
// Width of chunk is 1/5 (determined by the ratio 2000:400) of the
|
||||
// total width of the progress bar. The left edge of the chunk
|
||||
// starts at -1 and moves all the way to 4. It covers the distance
|
||||
// in 2 seconds.
|
||||
var position = isLTR ? ((elapsedTime % 2000) / 400) - 1 :
|
||||
((elapsedTime % 2000) / -400) + 4;
|
||||
|
||||
width = width >> 2;
|
||||
spacer.height = stack.boxObject.height;
|
||||
spacer.width = width;
|
||||
spacer.left = width * position;
|
||||
|
||||
requestAnimationFrame(nextStep);
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
requestAnimationFrame(nextStep);
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<constructor>this._init();</constructor>
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
</bindings>
|
@ -588,12 +588,6 @@ tooltip[titletip="true"] {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
/********** progressmeter **********/
|
||||
|
||||
progressmeter {
|
||||
-moz-binding: url("chrome://global/content/bindings/progressmeter.xml#progressmeter");
|
||||
}
|
||||
|
||||
/********** basic rule for anonymous content that needs to pass box properties through
|
||||
********** to an insertion point parent that holds the real kids **************/
|
||||
|
||||
|
@ -18,10 +18,6 @@ menulist > menupopup {
|
||||
-moz-binding: url("chrome://global/content/bindings/popup.xml#popup-scrollbars");
|
||||
}
|
||||
|
||||
progressmeter[mode="undetermined"] {
|
||||
-moz-binding: url("chrome://global/content/bindings/progressmeter.xml#progressmeter-undetermined");
|
||||
}
|
||||
|
||||
@media (-moz-menubar-drag) {
|
||||
toolbar[type="menubar"]:not([autohide="true"]) {
|
||||
-moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar-drag");
|
||||
|
@ -165,6 +165,7 @@ STATIC_ATOMS = [
|
||||
Atom("bindToUntrustedContent", "bindToUntrustedContent"),
|
||||
Atom("block", "block"),
|
||||
Atom("blockquote", "blockquote"),
|
||||
Atom("blur", "blur"),
|
||||
Atom("body", "body"),
|
||||
Atom("boolean", "boolean"),
|
||||
Atom("border", "border"),
|
||||
|
Loading…
Reference in New Issue
Block a user