зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to inbound. a=merge CLOSED TREE
This commit is contained in:
Коммит
cb48453c36
|
@ -161,7 +161,6 @@ dom/base/test/*.*
|
|||
dom/base/test/unit/test_serializers_entities*.js
|
||||
dom/base/test/unit_ipc/**
|
||||
dom/base/test/jsmodules/**
|
||||
dom/bindings/**
|
||||
dom/canvas/**
|
||||
dom/encoding/**
|
||||
dom/events/**
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "Inflector"
|
||||
version = "0.11.2"
|
||||
|
@ -434,6 +432,7 @@ name = "cert_storage"
|
|||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"base64 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lmdb-rkv 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nserror 0.1.0",
|
||||
"nsstring 0.1.0",
|
||||
"rkv 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -833,6 +832,17 @@ dependencies = [
|
|||
"syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derive_common"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"darling 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derive_more"
|
||||
version = "0.13.0"
|
||||
|
@ -1177,6 +1187,7 @@ dependencies = [
|
|||
"smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"to_shmem 0.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2481,6 +2492,8 @@ dependencies = [
|
|||
"servo_arc 0.1.1",
|
||||
"smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"thin-slice 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"to_shmem 0.0.1",
|
||||
"to_shmem_derive 0.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2724,6 +2737,8 @@ dependencies = [
|
|||
"style_traits 0.0.1",
|
||||
"thin-slice 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"to_shmem 0.0.1",
|
||||
"to_shmem_derive 0.0.1",
|
||||
"toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"uluru 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2737,6 +2752,7 @@ name = "style_derive"
|
|||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"darling 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"derive_common 0.0.1",
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2755,6 +2771,8 @@ dependencies = [
|
|||
"malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"selectors 0.21.0",
|
||||
"servo_arc 0.1.1",
|
||||
"to_shmem 0.0.1",
|
||||
"to_shmem_derive 0.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2775,6 +2793,7 @@ dependencies = [
|
|||
"smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"to_shmem 0.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2924,6 +2943,29 @@ dependencies = [
|
|||
"winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "to_shmem"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"cssparser 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_arc 0.1.1",
|
||||
"smallbitvec 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"thin-slice 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "to_shmem_derive"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"darling 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"derive_common 0.0.1",
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "0.1.7"
|
||||
|
|
|
@ -10,6 +10,7 @@ FORCE_STATIC_LIB = True
|
|||
|
||||
UNIFIED_SOURCES += [
|
||||
'/ipc/mscom/ProcessRuntime.cpp',
|
||||
'/widget/windows/WindowsConsole.cpp',
|
||||
'DllBlocklistWin.cpp',
|
||||
'ErrorHandler.cpp',
|
||||
'LauncherProcessWin.cpp',
|
||||
|
@ -31,7 +32,6 @@ TEST_DIRS += [
|
|||
if CONFIG['MOZ_LAUNCHER_PROCESS']:
|
||||
UNIFIED_SOURCES += [
|
||||
'/toolkit/xre/LauncherRegistryInfo.cpp',
|
||||
'/widget/windows/WindowsConsole.cpp',
|
||||
]
|
||||
for var in ('MOZ_APP_BASENAME', 'MOZ_APP_VENDOR'):
|
||||
DEFINES[var] = '"%s"' % CONFIG[var]
|
||||
|
|
|
@ -619,31 +619,23 @@
|
|||
onpopupshowing="UpdateDynamicShortcutTooltipText(this);"/>
|
||||
|
||||
<menupopup id="SyncedTabsSidebarContext">
|
||||
<menuitem label="&syncedTabs.context.open.label;"
|
||||
accesskey="&syncedTabs.context.open.accesskey;"
|
||||
<menuitem data-lazy-l10n-id="synced-tabs-context-open"
|
||||
id="syncedTabsOpenSelected" where="current"/>
|
||||
<menuitem label="&syncedTabs.context.openInNewTab.label;"
|
||||
accesskey="&syncedTabs.context.openInNewTab.accesskey;"
|
||||
<menuitem data-lazy-l10n-id="synced-tabs-context-open-in-new-tab"
|
||||
id="syncedTabsOpenSelectedInTab" where="tab"/>
|
||||
<menuitem label="&syncedTabs.context.openInNewWindow.label;"
|
||||
accesskey="&syncedTabs.context.openInNewWindow.accesskey;"
|
||||
<menuitem data-lazy-l10n-id="synced-tabs-context-open-in-new-window"
|
||||
id="syncedTabsOpenSelectedInWindow" where="window"/>
|
||||
<menuitem label="&syncedTabs.context.openInNewPrivateWindow.label;"
|
||||
accesskey="&syncedTabs.context.openInNewPrivateWindow.accesskey;"
|
||||
<menuitem data-lazy-l10n-id="synced-tabs-context-open-in-new-private-window"
|
||||
id="syncedTabsOpenSelectedInPrivateWindow" where="window" private="true"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&syncedTabs.context.bookmarkSingleTab.label;"
|
||||
accesskey="&syncedTabs.context.bookmarkSingleTab.accesskey;"
|
||||
<menuitem data-lazy-l10n-id="synced-tabs-context-bookmark-single-tab"
|
||||
id="syncedTabsBookmarkSelected"/>
|
||||
<menuitem label="&syncedTabs.context.copy.label;"
|
||||
accesskey="&syncedTabs.context.copy.accesskey;"
|
||||
<menuitem data-lazy-l10n-id="synced-tabs-context-copy"
|
||||
id="syncedTabsCopySelected"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&syncedTabs.context.openAllInTabs.label;"
|
||||
accesskey="&syncedTabs.context.openAllInTabs.accesskey;"
|
||||
<menuitem data-lazy-l10n-id="synced-tabs-context-open-all-in-tabs"
|
||||
id="syncedTabsOpenAllInTabs"/>
|
||||
<menuitem label="&syncedTabs.context.managedevices.label;"
|
||||
accesskey="&syncedTabs.context.managedevices.accesskey;"
|
||||
<menuitem data-lazy-l10n-id="synced-tabs-context-manage-devices"
|
||||
id="syncedTabsManageDevices"
|
||||
oncommand="gSync.openDevicesManagementPage('syncedtabs-sidebar');"/>
|
||||
<menuitem label="&syncSyncNowItem.label;"
|
||||
|
|
|
@ -16,6 +16,11 @@ var syncedTabsDeckComponent = new SyncedTabsDeckComponent({window, SyncedTabs, f
|
|||
let themeListener;
|
||||
|
||||
let onLoaded = () => {
|
||||
window.top.MozXULElement.insertFTLIfNeeded("browser/syncedTabs.ftl");
|
||||
window.top.document.getElementById("SyncedTabsSidebarContext").querySelectorAll("[data-lazy-l10n-id]").forEach(el => {
|
||||
el.setAttribute("data-l10n-id", el.getAttribute("data-lazy-l10n-id"));
|
||||
el.removeAttribute("data-lazy-l10n-id");
|
||||
});
|
||||
themeListener = new LightweightThemeChild({
|
||||
content: window,
|
||||
chromeOuterWindowID: window.top.windowUtils.outerWindowID,
|
||||
|
|
|
@ -5,14 +5,6 @@
|
|||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" [
|
||||
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
|
||||
%browserDTD;
|
||||
<!ENTITY % globalDTD
|
||||
SYSTEM "chrome://global/locale/global.dtd">
|
||||
%globalDTD;
|
||||
<!ENTITY % syncBrandDTD
|
||||
SYSTEM "chrome://browser/locale/syncBrand.dtd">
|
||||
%syncBrandDTD;
|
||||
]>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
@ -25,10 +17,12 @@
|
|||
<link rel="stylesheet" type="text/css" media="all" href="chrome://global/skin/"/>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="chrome://global/skin/textbox.css"/>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="chrome://browser/content/browser.css"/>
|
||||
<title>&syncedTabs.sidebar.label;</title>
|
||||
<link rel="localization" href="browser/branding/sync-brand.ftl"/>
|
||||
<link rel="localization" href="browser/syncedTabs.ftl"/>
|
||||
<title data-l10n-id="synced-tabs-sidebar-title"></title>
|
||||
</head>
|
||||
|
||||
<body dir="&locale.dir;" role="application">
|
||||
<body role="application">
|
||||
<template id="client-template">
|
||||
<div class="item client" role="option" tabindex="-1">
|
||||
<div class="item-title-container">
|
||||
|
@ -50,7 +44,7 @@
|
|||
<div class="item empty" role="option" tabindex="-1">
|
||||
<div class="item-title-container">
|
||||
<div class="item-icon-container"></div>
|
||||
<p class="item-title">&syncedTabs.sidebar.notabs.label;</p>
|
||||
<p class="item-title" data-l10n-id="synced-tabs-sidebar-notabs"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -78,28 +72,28 @@
|
|||
</div>
|
||||
<div class="notAuthedInfo sync-state">
|
||||
<div class="syncIllustration"></div>
|
||||
<p class="instructions">&syncedTabs.sidebar.notsignedin.label;</p>
|
||||
<button class="button sync-prefs">&fxaSignIn.label;</button>
|
||||
<p class="instructions" data-l10n-id="synced-tabs-sidebar-notsignedin"></p>
|
||||
<button class="button sync-prefs" data-l10n-id="fxa-sign-in"></button>
|
||||
</div>
|
||||
<div class="reauth sync-state">
|
||||
<div class="syncIllustrationIssue"></div>
|
||||
<p class="instructions">&syncedTabs.sidebar.notsignedin.label;</p>
|
||||
<button class="button sync-prefs">&fxaSignIn.label;</button>
|
||||
<p class="instructions" data-l10n-id="synced-tabs-sidebar-notsignedin"></p>
|
||||
<button class="button sync-prefs" data-l10n-id="fxa-sign-in"></button>
|
||||
</div>
|
||||
<div class="unverified sync-state">
|
||||
<div class="syncIllustrationIssue"></div>
|
||||
<p class="instructions">&syncedTabs.sidebar.unverified.label;</p>
|
||||
<button class="button sync-prefs">&syncedTabs.sidebar.openprefs.label;</button>
|
||||
<p class="instructions" data-l10n-id="synced-tabs-sidebar-unverified"></p>
|
||||
<button class="button sync-prefs" data-l10n-id="synced-tabs-sidebar-openprefs"></button>
|
||||
</div>
|
||||
<div class="singleDeviceInfo sync-state">
|
||||
<div class="syncIllustrationIssue"></div>
|
||||
<p class="instructions">&syncedTabs.sidebar.noclients.subtitle;</p>
|
||||
<button class="button connect-device">&syncedTabs.sidebar.connectAnotherDevice;</button>
|
||||
<p class="instructions" data-l10n-id="synced-tabs-sidebar-noclients-subtitle"></p>
|
||||
<button class="button connect-device" data-l10n-id="synced-tabs-sidebar-connect-another-device"></button>
|
||||
</div>
|
||||
<div class="tabs-disabled sync-state">
|
||||
<div class="syncIllustrationIssue"></div>
|
||||
<p class="instructions">&syncedTabs.sidebar.tabsnotsyncing.label;</p>
|
||||
<button class="button sync-prefs">&syncedTabs.sidebar.openprefs.label;</button>
|
||||
<p class="instructions" data-l10n-id="synced-tabs-sidebar-tabsnotsyncing"></p>
|
||||
<button class="button sync-prefs" data-l10n-id="synced-tabs-sidebar-openprefs"></button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -112,7 +106,7 @@
|
|||
<div class="textbox-input-box">
|
||||
<input type="text"
|
||||
class="tabsFilter textbox-input"
|
||||
placeholder="&syncedTabs.sidebar.searchPlaceholder;"
|
||||
data-l10n-id="synced-tabs-sidebar-search"
|
||||
tabindex="1"/>
|
||||
<div class="textbox-search-icons">
|
||||
<a class="textbox-search-clear"></a>
|
||||
|
|
|
@ -343,7 +343,7 @@ class UrlbarView {
|
|||
|
||||
this._alignPanel();
|
||||
|
||||
this.panel.openPopup(this.input.textbox.closest("toolbar"), "after_end");
|
||||
this.panel.openPopup(this.input.textbox, "after_start");
|
||||
}
|
||||
|
||||
_alignPanel() {
|
||||
|
@ -390,6 +390,14 @@ class UrlbarView {
|
|||
this.panel.style.removeProperty("--item-padding-end");
|
||||
}
|
||||
this.panel.style.setProperty("--item-content-width", Math.round(contentWidth) + "px");
|
||||
|
||||
// Align the panel with the input's parent toolbar.
|
||||
let toolbarRect =
|
||||
this._getBoundsWithoutFlushing(this.input.textbox.closest("toolbar"));
|
||||
this.panel.style.marginInlineStart = this.window.RTL_UI ?
|
||||
inputRect.right - documentRect.right + "px" :
|
||||
documentRect.left - inputRect.left + "px";
|
||||
this.panel.style.marginTop = inputRect.top - toolbarRect.top + "px";
|
||||
}
|
||||
|
||||
_createRow() {
|
||||
|
@ -468,6 +476,7 @@ class UrlbarView {
|
|||
item._elements.get("title"), result.title, result.titleHighlights);
|
||||
|
||||
let tagsContainer = item._elements.get("tagsContainer");
|
||||
tagsContainer.textContent = "";
|
||||
if (result.payload.tags && result.payload.tags.length > 0) {
|
||||
tagsContainer.append(...result.payload.tags.map((tag, i) => {
|
||||
const element = this._createElement("span");
|
||||
|
@ -476,8 +485,6 @@ class UrlbarView {
|
|||
element, tag, result.payloadHighlights.tags[i]);
|
||||
return element;
|
||||
}));
|
||||
} else {
|
||||
tagsContainer.textContent = "";
|
||||
}
|
||||
|
||||
let action = "";
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
# 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/.
|
||||
|
||||
synced-tabs-sidebar-title = Synced Tabs
|
||||
synced-tabs-sidebar-noclients-subtitle = Want to see your tabs from other devices here?
|
||||
synced-tabs-sidebar-notsignedin = Sign in to view a list of tabs from your other devices.
|
||||
synced-tabs-sidebar-unverified = Your account needs to be verified.
|
||||
synced-tabs-sidebar-notabs = No open tabs
|
||||
synced-tabs-sidebar-openprefs = Open { -sync-brand-short-name } Preferences
|
||||
synced-tabs-sidebar-tabsnotsyncing = Turn on tab syncing to view a list of tabs from your other devices.
|
||||
synced-tabs-sidebar-connect-another-device = Connect Another Device
|
||||
synced-tabs-sidebar-search =
|
||||
.placeholder = Search synced tabs
|
||||
synced-tabs-context-open =
|
||||
.label = Open
|
||||
.accesskey = O
|
||||
synced-tabs-context-open-in-new-tab =
|
||||
.label = Open in a New Tab
|
||||
.accesskey = w
|
||||
synced-tabs-context-open-in-new-window =
|
||||
.label = Open in a New Window
|
||||
.accesskey = N
|
||||
synced-tabs-context-open-in-new-private-window =
|
||||
.label = Open in a New Private Window
|
||||
.accesskey = P
|
||||
synced-tabs-context-bookmark-single-tab =
|
||||
.label = Bookmark This Tab…
|
||||
.accesskey = B
|
||||
synced-tabs-context-copy =
|
||||
.label = Copy
|
||||
.accesskey = C
|
||||
synced-tabs-context-open-all-in-tabs =
|
||||
.label = Open All in Tabs
|
||||
.accesskey = O
|
||||
synced-tabs-context-manage-devices =
|
||||
.label = Manage Devices…
|
||||
.accesskey = D
|
||||
fxa-sign-in = Sign in to { -sync-brand-short-name }
|
|
@ -855,40 +855,6 @@ you can use these alternative items. Otherwise, their values should be empty. -
|
|||
<!ENTITY syncTabsMenu3.label "Synced Tabs">
|
||||
|
||||
<!ENTITY syncedTabs.sidebar.label "Synced Tabs">
|
||||
<!ENTITY syncedTabs.sidebar.noclients.label "Sign in to Firefox from your other devices to view their tabs here.">
|
||||
<!ENTITY syncedTabs.sidebar.noclients.subtitle "Want to see your tabs from other devices here?">
|
||||
<!ENTITY syncedTabs.sidebar.notsignedin.label "Sign in to view a list of tabs from your other devices.">
|
||||
<!ENTITY syncedTabs.sidebar.unverified.label "Your account needs to be verified.">
|
||||
<!ENTITY syncedTabs.sidebar.notabs.label "No open tabs">
|
||||
<!ENTITY syncedTabs.sidebar.openprefs.label "Open &syncBrand.shortName.label; Preferences">
|
||||
<!-- LOCALIZATION NOTE (syncedTabs.sidebar.tabsnotsyncing.label): This is shown
|
||||
when Sync is configured but syncing tabs is disabled. -->
|
||||
<!ENTITY syncedTabs.sidebar.tabsnotsyncing.label "Turn on tab syncing to view a list of tabs from your other devices.">
|
||||
<!ENTITY syncedTabs.sidebar.searchPlaceholder "Search synced tabs">
|
||||
<!ENTITY syncedTabs.sidebar.connectAnotherDevice "Connect Another Device">
|
||||
|
||||
<!-- LOCALIZATION NOTE (syncedTabs.context.open.accesskey,
|
||||
syncedTabs.context.openAllInTabs.accesskey):
|
||||
These access keys are identical because their associated menu items are
|
||||
mutually exclusive -->
|
||||
<!ENTITY syncedTabs.context.open.label "Open">
|
||||
<!ENTITY syncedTabs.context.open.accesskey "O">
|
||||
<!ENTITY syncedTabs.context.openInNewTab.label "Open in a New Tab">
|
||||
<!ENTITY syncedTabs.context.openInNewTab.accesskey "w">
|
||||
<!ENTITY syncedTabs.context.openInNewWindow.label "Open in a New Window">
|
||||
<!ENTITY syncedTabs.context.openInNewWindow.accesskey "N">
|
||||
<!ENTITY syncedTabs.context.openInNewPrivateWindow.label "Open in a New Private Window">
|
||||
<!ENTITY syncedTabs.context.openInNewPrivateWindow.accesskey "P">
|
||||
<!ENTITY syncedTabs.context.bookmarkSingleTab.label "Bookmark This Tab…">
|
||||
<!ENTITY syncedTabs.context.bookmarkSingleTab.accesskey "B">
|
||||
<!ENTITY syncedTabs.context.copy.label "Copy">
|
||||
<!ENTITY syncedTabs.context.copy.accesskey "C">
|
||||
|
||||
<!ENTITY syncedTabs.context.openAllInTabs.label "Open All in Tabs">
|
||||
<!ENTITY syncedTabs.context.openAllInTabs.accesskey "O">
|
||||
<!ENTITY syncedTabs.context.managedevices.label "Manage Devices…">
|
||||
<!ENTITY syncedTabs.context.managedevices.accesskey "D">
|
||||
|
||||
|
||||
<!ENTITY syncBrand.shortName.label "Sync">
|
||||
|
||||
|
|
|
@ -213,4 +213,5 @@ Zur's
|
|||
TravisCI
|
||||
Homebrew
|
||||
30-60minutes
|
||||
myScriptFunction
|
||||
myScriptFunction
|
||||
strict-ssl
|
||||
|
|
|
@ -16,7 +16,7 @@ const bundlePath = path.join(projectPath, "./dist");
|
|||
|
||||
const clientPath = path.join(projectPath, "../../");
|
||||
const watch = false;
|
||||
const updateAssets = false;
|
||||
const updateAssets = true;
|
||||
|
||||
process.env.NODE_ENV = "production";
|
||||
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -4,7 +4,7 @@
|
|||
"favicon": "images/favicon.png",
|
||||
"theme": "light",
|
||||
"dir": "ltr",
|
||||
"defaultURL": "https://devtools-html.github.io/debugger-examples/",
|
||||
"defaultURL": "https://firefox-devtools.github.io/debugger-examples/",
|
||||
"logging": {
|
||||
"firefoxProxy": false
|
||||
},
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -85,111 +85,6 @@ html[dir="rtl"] .tree-node button:not(.expanded) {
|
|||
.tree-node.focused button.arrow {
|
||||
background-color: currentColor;
|
||||
}
|
||||
/* vim:set ts=2 sw=2 sts=2 et: */
|
||||
/* 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/. */
|
||||
|
||||
.split-box {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.split-box.vert {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.split-box.horz {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.split-box > .uncontrolled {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.split-box > .controlled {
|
||||
display: flex;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.split-box > .splitter {
|
||||
background-image: none;
|
||||
border: 0;
|
||||
border-style: solid;
|
||||
border-color: transparent;
|
||||
background-color: var(--theme-splitter-color);
|
||||
background-clip: content-box;
|
||||
position: relative;
|
||||
|
||||
box-sizing: border-box;
|
||||
|
||||
/* Positive z-index positions the splitter on top of its siblings and makes
|
||||
it clickable on both sides. */
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.split-box.vert > .splitter {
|
||||
/* prettier-ignore */
|
||||
min-width: calc(var(--devtools-splitter-inline-start-width) +
|
||||
var(--devtools-splitter-inline-end-width) + 1px);
|
||||
|
||||
border-left-width: var(--devtools-splitter-inline-start-width);
|
||||
border-right-width: var(--devtools-splitter-inline-end-width);
|
||||
|
||||
margin-left: calc(-1 * var(--devtools-splitter-inline-start-width) - 1px);
|
||||
margin-right: calc(-1 * var(--devtools-splitter-inline-end-width));
|
||||
|
||||
cursor: ew-resize;
|
||||
}
|
||||
|
||||
.split-box.horz > .splitter {
|
||||
/* prettier-ignore */
|
||||
min-height: calc(var(--devtools-splitter-top-width) +
|
||||
var(--devtools-splitter-bottom-width) + 1px);
|
||||
border-top-width: var(--devtools-splitter-top-width);
|
||||
border-bottom-width: var(--devtools-splitter-bottom-width);
|
||||
|
||||
margin-top: calc(-1 * var(--devtools-splitter-top-width) - 1px);
|
||||
margin-bottom: calc(-1 * var(--devtools-splitter-bottom-width));
|
||||
|
||||
cursor: ns-resize;
|
||||
}
|
||||
|
||||
.split-box.disabled {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make sure splitter panels are not processing any mouse
|
||||
* events. This is good for performance during splitter
|
||||
* bar dragging.
|
||||
*/
|
||||
.split-box.dragging > .controlled,
|
||||
.split-box.dragging > .uncontrolled {
|
||||
pointer-events: none;
|
||||
}
|
||||
.container {
|
||||
background-color: lightgrey;
|
||||
border: 1px solid darkgrey;
|
||||
cursor: pointer;
|
||||
padding: 0 3px;
|
||||
}
|
||||
|
||||
.container[aria-selected=true] {
|
||||
background-color: white;
|
||||
}
|
||||
.container {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 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/. */
|
||||
|
@ -280,3 +175,108 @@ menuseparator {
|
|||
height: 100%;
|
||||
z-index: 999;
|
||||
}
|
||||
.container {
|
||||
background-color: lightgrey;
|
||||
border: 1px solid darkgrey;
|
||||
cursor: pointer;
|
||||
padding: 0 3px;
|
||||
}
|
||||
|
||||
.container[aria-selected=true] {
|
||||
background-color: white;
|
||||
}
|
||||
.container {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
/* vim:set ts=2 sw=2 sts=2 et: */
|
||||
/* 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/. */
|
||||
|
||||
.split-box {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.split-box.vert {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.split-box.horz {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.split-box > .uncontrolled {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.split-box > .controlled {
|
||||
display: flex;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.split-box > .splitter {
|
||||
background-image: none;
|
||||
border: 0;
|
||||
border-style: solid;
|
||||
border-color: transparent;
|
||||
background-color: var(--theme-splitter-color);
|
||||
background-clip: content-box;
|
||||
position: relative;
|
||||
|
||||
box-sizing: border-box;
|
||||
|
||||
/* Positive z-index positions the splitter on top of its siblings and makes
|
||||
it clickable on both sides. */
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.split-box.vert > .splitter {
|
||||
/* prettier-ignore */
|
||||
min-width: calc(var(--devtools-splitter-inline-start-width) +
|
||||
var(--devtools-splitter-inline-end-width) + 1px);
|
||||
|
||||
border-left-width: var(--devtools-splitter-inline-start-width);
|
||||
border-right-width: var(--devtools-splitter-inline-end-width);
|
||||
|
||||
margin-left: calc(-1 * var(--devtools-splitter-inline-start-width) - 1px);
|
||||
margin-right: calc(-1 * var(--devtools-splitter-inline-end-width));
|
||||
|
||||
cursor: ew-resize;
|
||||
}
|
||||
|
||||
.split-box.horz > .splitter {
|
||||
/* prettier-ignore */
|
||||
min-height: calc(var(--devtools-splitter-top-width) +
|
||||
var(--devtools-splitter-bottom-width) + 1px);
|
||||
border-top-width: var(--devtools-splitter-top-width);
|
||||
border-bottom-width: var(--devtools-splitter-bottom-width);
|
||||
|
||||
margin-top: calc(-1 * var(--devtools-splitter-top-width) - 1px);
|
||||
margin-bottom: calc(-1 * var(--devtools-splitter-bottom-width));
|
||||
|
||||
cursor: ns-resize;
|
||||
}
|
||||
|
||||
.split-box.disabled {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make sure splitter panels are not processing any mouse
|
||||
* events. This is good for performance during splitter
|
||||
* bar dragging.
|
||||
*/
|
||||
.split-box.dragging > .controlled,
|
||||
.split-box.dragging > .uncontrolled {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -53,7 +53,7 @@
|
|||
"babel-plugin-transform-imports": "^1.5.0",
|
||||
"codemirror": "^5.28.0",
|
||||
"devtools-environment": "^0.0.6",
|
||||
"devtools-launchpad": "^0.0.149",
|
||||
"devtools-launchpad": "^0.0.150",
|
||||
"devtools-linters": "^0.0.4",
|
||||
"devtools-reps": "0.23.0",
|
||||
"devtools-source-map": "0.16.0",
|
||||
|
|
|
@ -55,8 +55,7 @@
|
|||
}
|
||||
|
||||
.tree-node button.arrow {
|
||||
mask: url(resource://devtools/client/debugger/new/images/arrow.svg) no-repeat
|
||||
center;
|
||||
mask: url(/images/arrow.svg) no-repeat center;
|
||||
mask-size: 10px;
|
||||
vertical-align: -1px;
|
||||
width: 10px;
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
/* 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/. */
|
||||
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
|
||||
|
||||
const mapUrl = require("postcss-url-mapper");
|
||||
const MC_PATH = "resource://devtools/client/shared/components/reps/images/";
|
||||
const EXPRESS_PATH = "/devtools-reps/images/";
|
||||
const IMAGES = ["open-inspector.svg", "jump-definition.svg", "input.svg"];
|
||||
|
||||
|
||||
function mapUrlProduction(url, type) {
|
||||
for (const img of IMAGES) {
|
||||
url = url.replace(`/images/${img}`, `${MC_PATH}${img}`);
|
||||
url = url.replace(`^/images/${img}`, `${MC_PATH}${img}`);
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
function mapUrlDevelopment(url) {
|
||||
for (const img of IMAGES) {
|
||||
url = url.replace(`/images/${img}`, `${EXPRESS_PATH}${img}`);
|
||||
url = url.replace(`^/images/${img}`, `${EXPRESS_PATH}${img}`);
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
|
|
@ -243,7 +243,8 @@
|
|||
|
||||
button.open-accessibility-inspector,
|
||||
button.open-inspector {
|
||||
mask: url("/images/open-inspector.svg") no-repeat;
|
||||
mask: url("resource://devtools/client/shared/components/reps/images/open-inspector.svg")
|
||||
no-repeat;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
height: 15px;
|
||||
|
@ -267,7 +268,7 @@ button.open-inspector {
|
|||
/* Jump to definition button */
|
||||
|
||||
button.jump-definition {
|
||||
mask: url(resource://devtools/client/debugger/new/images/jump-definition.svg)
|
||||
mask: url(resource://devtools/client/shared/components/reps/images/jump-definition.svg)
|
||||
no-repeat;
|
||||
display: inline-block;
|
||||
background-color: var(--theme-icon-color);
|
||||
|
@ -284,7 +285,8 @@ button.jump-definition {
|
|||
/* Invoke getter button */
|
||||
|
||||
button.invoke-getter {
|
||||
mask: url(resource://devtools/client/debugger/new/images/input.svg) no-repeat;
|
||||
mask: url(resource://devtools/client/shared/components/reps/images/input.svg)
|
||||
no-repeat;
|
||||
display: inline-block;
|
||||
background-color: var(--theme-icon-color);
|
||||
height: 10px;
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
pointer-events: none;
|
||||
}
|
||||
|
||||
:not(.empty-line):not(.new-breakpoint)
|
||||
.editor-wrapper:not(.blackboxed) :not(.empty-line):not(.new-breakpoint)
|
||||
> .CodeMirror-gutter-wrapper:hover
|
||||
> .CodeMirror-linenumber::after {
|
||||
content: "";
|
||||
|
|
|
@ -639,9 +639,12 @@ class Editor extends PureComponent<Props, State> {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { selectedSource } = this.props;
|
||||
return (
|
||||
<div
|
||||
className={classnames("editor-wrapper")}
|
||||
className={classnames("editor-wrapper", {
|
||||
blackboxed: selectedSource && selectedSource.isBlackBoxed
|
||||
})}
|
||||
ref={c => (this.$editorWrapper = c)}
|
||||
>
|
||||
<div
|
||||
|
|
|
@ -233,6 +233,17 @@
|
|||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.thread-header .img.worker,
|
||||
.thread-header .img.file {
|
||||
margin-top: -1px;
|
||||
margin-inline-end: 4px;
|
||||
margin-inline-start: 2px;
|
||||
}
|
||||
|
||||
.thread-header .img.file {
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
.thread-header .label {
|
||||
line-height: 15px;
|
||||
}
|
||||
|
|
|
@ -31,9 +31,8 @@ export class Worker extends Component<Props> {
|
|||
render() {
|
||||
const { currentThread, isPaused, thread } = this.props;
|
||||
|
||||
const label = isWorker(thread)
|
||||
? getDisplayName(thread)
|
||||
: L10N.getStr("mainThread");
|
||||
const worker = isWorker(thread);
|
||||
const label = worker ? getDisplayName(thread) : L10N.getStr("mainThread");
|
||||
|
||||
return (
|
||||
<div
|
||||
|
@ -44,7 +43,7 @@ export class Worker extends Component<Props> {
|
|||
onClick={this.onSelectThread}
|
||||
>
|
||||
<div className="icon">
|
||||
<AccessibleImage className={isWorker ? "worker" : "file"} />
|
||||
<AccessibleImage className={worker ? "worker" : "file"} />
|
||||
</div>
|
||||
<div className="label">{label}</div>
|
||||
{isPaused ? (
|
||||
|
|
|
@ -26,6 +26,16 @@
|
|||
|
||||
.workers-list .icon {
|
||||
align-self: center;
|
||||
margin-inline-end: 4px;
|
||||
margin-inline-start: 2px;
|
||||
}
|
||||
|
||||
.workers-list .icon .img.worker {
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
.workers-list .icon .img.file {
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
.workers-list .label {
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,3 +1,90 @@
|
|||
/* 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/. */
|
||||
|
||||
/* We can remove the outline since we do add our own focus style on nodes */
|
||||
.tree:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.tree.inline {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.tree.nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tree.noselect {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-o-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.tree .tree-node {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.tree .tree-node:not(.focused):hover {
|
||||
background-color: var(--theme-selection-background-hover);
|
||||
}
|
||||
|
||||
.tree-indent {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
margin-inline-start: 5px;
|
||||
border-inline-start: 1px solid #a2d1ff;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Align with expandables siblings (where we have the arrow) */
|
||||
.tree-node[data-expandable="false"] .tree-indent:last-of-type {
|
||||
margin-inline-end: 15px;
|
||||
}
|
||||
|
||||
/* For non expandable root nodes, we don't have .tree-indent elements, so we declare
|
||||
the margin on the start of the node */
|
||||
.tree-node[data-expandable="false"][aria-level="1"] {
|
||||
padding-inline-start: 15px;
|
||||
}
|
||||
|
||||
.tree .tree-node[data-expandable="true"] {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.tree-node button.arrow {
|
||||
mask: url("resource://devtools/client/debugger/new/images/arrow.svg") no-repeat center;
|
||||
mask-size: 10px;
|
||||
vertical-align: -1px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
margin-inline-start: 1px;
|
||||
margin-inline-end: 4px;
|
||||
transform-origin: center center;
|
||||
transition: transform 125ms var(--animation-curve);
|
||||
background-color: var(--theme-icon-dimmed-color);
|
||||
}
|
||||
|
||||
.tree-node button.arrow:not(.expanded) {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
html[dir="rtl"] .tree-node button:not(.expanded) {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.tree .tree-node.focused {
|
||||
color: white;
|
||||
background-color: var(--theme-selection-background, #0a84ff);
|
||||
}
|
||||
|
||||
.tree-node.focused button.arrow {
|
||||
background-color: currentColor;
|
||||
}
|
||||
/* vim:set ts=2 sw=2 sts=2 et: */
|
||||
/* 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
|
||||
|
@ -243,7 +330,8 @@
|
|||
|
||||
button.open-accessibility-inspector,
|
||||
button.open-inspector {
|
||||
mask: url("resource://devtools/client/shared/components/reps/images/open-inspector.svg") no-repeat;
|
||||
mask: url("resource://devtools/client/shared/components/reps/images/open-inspector.svg")
|
||||
no-repeat;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
height: 15px;
|
||||
|
@ -267,7 +355,8 @@ button.open-inspector {
|
|||
/* Jump to definition button */
|
||||
|
||||
button.jump-definition {
|
||||
mask: url("resource://devtools/client/shared/components/reps/images/jump-definition.svg") no-repeat;
|
||||
mask: url("resource://devtools/client/shared/components/reps/images/jump-definition.svg")
|
||||
no-repeat;
|
||||
display: inline-block;
|
||||
background-color: var(--theme-icon-color);
|
||||
height: 16px;
|
||||
|
@ -283,7 +372,8 @@ button.jump-definition {
|
|||
/* Invoke getter button */
|
||||
|
||||
button.invoke-getter {
|
||||
mask: url("resource://devtools/client/shared/components/reps/images/input.svg") no-repeat;
|
||||
mask: url("resource://devtools/client/shared/components/reps/images/input.svg")
|
||||
no-repeat;
|
||||
display: inline-block;
|
||||
background-color: var(--theme-icon-color);
|
||||
height: 10px;
|
||||
|
@ -304,93 +394,6 @@ button.invoke-getter {
|
|||
* 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/. */
|
||||
|
||||
/* We can remove the outline since we do add our own focus style on nodes */
|
||||
.tree:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.tree.inline {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.tree.nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tree.noselect {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-o-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.tree .tree-node {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.tree .tree-node:not(.focused):hover {
|
||||
background-color: var(--theme-selection-background-hover);
|
||||
}
|
||||
|
||||
.tree-indent {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
margin-inline-start: 5px;
|
||||
border-inline-start: 1px solid #a2d1ff;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Align with expandables siblings (where we have the arrow) */
|
||||
.tree-node[data-expandable="false"] .tree-indent:last-of-type {
|
||||
margin-inline-end: 15px;
|
||||
}
|
||||
|
||||
/* For non expandable root nodes, we don't have .tree-indent elements, so we declare
|
||||
the margin on the start of the node */
|
||||
.tree-node[data-expandable="false"][aria-level="1"] {
|
||||
padding-inline-start: 15px;
|
||||
}
|
||||
|
||||
.tree .tree-node[data-expandable="true"] {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.tree-node button.arrow {
|
||||
mask: url("resource://devtools/client/debugger/new/images/arrow.svg") no-repeat center;
|
||||
mask-size: 10px;
|
||||
vertical-align: -1px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
margin-inline-start: 1px;
|
||||
margin-inline-end: 4px;
|
||||
transform-origin: center center;
|
||||
transition: transform 125ms var(--animation-curve);
|
||||
background-color: var(--theme-icon-dimmed-color);
|
||||
}
|
||||
|
||||
.tree-node button.arrow:not(.expanded) {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
html[dir="rtl"] .tree-node button:not(.expanded) {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.tree .tree-node.focused {
|
||||
color: white;
|
||||
background-color: var(--theme-selection-background, #0a84ff);
|
||||
}
|
||||
|
||||
.tree-node.focused button.arrow {
|
||||
background-color: currentColor;
|
||||
}
|
||||
/* 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/. */
|
||||
|
||||
.tree.object-inspector .node.object-node {
|
||||
display: inline-block;
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -70,141 +70,310 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
/******/ __webpack_require__.p = "/assets/build";
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 762);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 412);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ 14:
|
||||
/***/ 105:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
(function(){
|
||||
var crypt = __webpack_require__(106),
|
||||
utf8 = __webpack_require__(36).utf8,
|
||||
isBuffer = __webpack_require__(107),
|
||||
bin = __webpack_require__(36).bin,
|
||||
|
||||
// The core
|
||||
md5 = function (message, options) {
|
||||
// Convert to byte array
|
||||
if (message.constructor == String)
|
||||
if (options && options.encoding === 'binary')
|
||||
message = bin.stringToBytes(message);
|
||||
else
|
||||
message = utf8.stringToBytes(message);
|
||||
else if (isBuffer(message))
|
||||
message = Array.prototype.slice.call(message, 0);
|
||||
else if (!Array.isArray(message))
|
||||
message = message.toString();
|
||||
// else, assume byte array already
|
||||
|
||||
var m = crypt.bytesToWords(message),
|
||||
l = message.length * 8,
|
||||
a = 1732584193,
|
||||
b = -271733879,
|
||||
c = -1732584194,
|
||||
d = 271733878;
|
||||
|
||||
// Swap endian
|
||||
for (var i = 0; i < m.length; i++) {
|
||||
m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |
|
||||
((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;
|
||||
}
|
||||
|
||||
// Padding
|
||||
m[l >>> 5] |= 0x80 << (l % 32);
|
||||
m[(((l + 64) >>> 9) << 4) + 14] = l;
|
||||
|
||||
// Method shortcuts
|
||||
var FF = md5._ff,
|
||||
GG = md5._gg,
|
||||
HH = md5._hh,
|
||||
II = md5._ii;
|
||||
|
||||
for (var i = 0; i < m.length; i += 16) {
|
||||
|
||||
var aa = a,
|
||||
bb = b,
|
||||
cc = c,
|
||||
dd = d;
|
||||
|
||||
a = FF(a, b, c, d, m[i+ 0], 7, -680876936);
|
||||
d = FF(d, a, b, c, m[i+ 1], 12, -389564586);
|
||||
c = FF(c, d, a, b, m[i+ 2], 17, 606105819);
|
||||
b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);
|
||||
a = FF(a, b, c, d, m[i+ 4], 7, -176418897);
|
||||
d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);
|
||||
c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);
|
||||
b = FF(b, c, d, a, m[i+ 7], 22, -45705983);
|
||||
a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);
|
||||
d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);
|
||||
c = FF(c, d, a, b, m[i+10], 17, -42063);
|
||||
b = FF(b, c, d, a, m[i+11], 22, -1990404162);
|
||||
a = FF(a, b, c, d, m[i+12], 7, 1804603682);
|
||||
d = FF(d, a, b, c, m[i+13], 12, -40341101);
|
||||
c = FF(c, d, a, b, m[i+14], 17, -1502002290);
|
||||
b = FF(b, c, d, a, m[i+15], 22, 1236535329);
|
||||
|
||||
a = GG(a, b, c, d, m[i+ 1], 5, -165796510);
|
||||
d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);
|
||||
c = GG(c, d, a, b, m[i+11], 14, 643717713);
|
||||
b = GG(b, c, d, a, m[i+ 0], 20, -373897302);
|
||||
a = GG(a, b, c, d, m[i+ 5], 5, -701558691);
|
||||
d = GG(d, a, b, c, m[i+10], 9, 38016083);
|
||||
c = GG(c, d, a, b, m[i+15], 14, -660478335);
|
||||
b = GG(b, c, d, a, m[i+ 4], 20, -405537848);
|
||||
a = GG(a, b, c, d, m[i+ 9], 5, 568446438);
|
||||
d = GG(d, a, b, c, m[i+14], 9, -1019803690);
|
||||
c = GG(c, d, a, b, m[i+ 3], 14, -187363961);
|
||||
b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);
|
||||
a = GG(a, b, c, d, m[i+13], 5, -1444681467);
|
||||
d = GG(d, a, b, c, m[i+ 2], 9, -51403784);
|
||||
c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);
|
||||
b = GG(b, c, d, a, m[i+12], 20, -1926607734);
|
||||
|
||||
a = HH(a, b, c, d, m[i+ 5], 4, -378558);
|
||||
d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);
|
||||
c = HH(c, d, a, b, m[i+11], 16, 1839030562);
|
||||
b = HH(b, c, d, a, m[i+14], 23, -35309556);
|
||||
a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);
|
||||
d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);
|
||||
c = HH(c, d, a, b, m[i+ 7], 16, -155497632);
|
||||
b = HH(b, c, d, a, m[i+10], 23, -1094730640);
|
||||
a = HH(a, b, c, d, m[i+13], 4, 681279174);
|
||||
d = HH(d, a, b, c, m[i+ 0], 11, -358537222);
|
||||
c = HH(c, d, a, b, m[i+ 3], 16, -722521979);
|
||||
b = HH(b, c, d, a, m[i+ 6], 23, 76029189);
|
||||
a = HH(a, b, c, d, m[i+ 9], 4, -640364487);
|
||||
d = HH(d, a, b, c, m[i+12], 11, -421815835);
|
||||
c = HH(c, d, a, b, m[i+15], 16, 530742520);
|
||||
b = HH(b, c, d, a, m[i+ 2], 23, -995338651);
|
||||
|
||||
a = II(a, b, c, d, m[i+ 0], 6, -198630844);
|
||||
d = II(d, a, b, c, m[i+ 7], 10, 1126891415);
|
||||
c = II(c, d, a, b, m[i+14], 15, -1416354905);
|
||||
b = II(b, c, d, a, m[i+ 5], 21, -57434055);
|
||||
a = II(a, b, c, d, m[i+12], 6, 1700485571);
|
||||
d = II(d, a, b, c, m[i+ 3], 10, -1894986606);
|
||||
c = II(c, d, a, b, m[i+10], 15, -1051523);
|
||||
b = II(b, c, d, a, m[i+ 1], 21, -2054922799);
|
||||
a = II(a, b, c, d, m[i+ 8], 6, 1873313359);
|
||||
d = II(d, a, b, c, m[i+15], 10, -30611744);
|
||||
c = II(c, d, a, b, m[i+ 6], 15, -1560198380);
|
||||
b = II(b, c, d, a, m[i+13], 21, 1309151649);
|
||||
a = II(a, b, c, d, m[i+ 4], 6, -145523070);
|
||||
d = II(d, a, b, c, m[i+11], 10, -1120210379);
|
||||
c = II(c, d, a, b, m[i+ 2], 15, 718787259);
|
||||
b = II(b, c, d, a, m[i+ 9], 21, -343485551);
|
||||
|
||||
a = (a + aa) >>> 0;
|
||||
b = (b + bb) >>> 0;
|
||||
c = (c + cc) >>> 0;
|
||||
d = (d + dd) >>> 0;
|
||||
}
|
||||
|
||||
return crypt.endian([a, b, c, d]);
|
||||
};
|
||||
|
||||
// Auxiliary functions
|
||||
md5._ff = function (a, b, c, d, x, s, t) {
|
||||
var n = a + (b & c | ~b & d) + (x >>> 0) + t;
|
||||
return ((n << s) | (n >>> (32 - s))) + b;
|
||||
};
|
||||
md5._gg = function (a, b, c, d, x, s, t) {
|
||||
var n = a + (b & d | c & ~d) + (x >>> 0) + t;
|
||||
return ((n << s) | (n >>> (32 - s))) + b;
|
||||
};
|
||||
md5._hh = function (a, b, c, d, x, s, t) {
|
||||
var n = a + (b ^ c ^ d) + (x >>> 0) + t;
|
||||
return ((n << s) | (n >>> (32 - s))) + b;
|
||||
};
|
||||
md5._ii = function (a, b, c, d, x, s, t) {
|
||||
var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;
|
||||
return ((n << s) | (n >>> (32 - s))) + b;
|
||||
};
|
||||
|
||||
// Package private blocksize
|
||||
md5._blocksize = 16;
|
||||
md5._digestsize = 16;
|
||||
|
||||
module.exports = function (message, options) {
|
||||
if (message === undefined || message === null)
|
||||
throw new Error('Illegal argument ' + message);
|
||||
|
||||
var digestbytes = crypt.wordsToBytes(md5(message, options));
|
||||
return options && options.asBytes ? digestbytes :
|
||||
options && options.asString ? bin.bytesToString(digestbytes) :
|
||||
crypt.bytesToHex(digestbytes);
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.stopSourceMapWorker = exports.startSourceMapWorker = exports.isOriginalId = exports.isGeneratedId = exports.generatedToOriginalId = exports.originalToGeneratedId = exports.getOriginalStackFrames = exports.hasMappedSource = exports.clearSourceMaps = exports.applySourceMap = exports.getOriginalSourceText = exports.getLocationScopes = exports.getFileGeneratedRange = exports.getGeneratedRangesForOriginal = exports.getOriginalLocation = exports.getAllGeneratedLocations = exports.getGeneratedLocation = exports.getGeneratedRanges = exports.getOriginalRanges = exports.hasOriginalURL = exports.getOriginalURLs = exports.setAssetRootURL = exports.dispatcher = undefined;
|
||||
|
||||
var _utils = __webpack_require__(68);
|
||||
|
||||
Object.defineProperty(exports, "originalToGeneratedId", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _utils.originalToGeneratedId;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "generatedToOriginalId", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _utils.generatedToOriginalId;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isGeneratedId", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _utils.isGeneratedId;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isOriginalId", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _utils.isOriginalId;
|
||||
}
|
||||
});
|
||||
|
||||
var _devtoolsSourceMap = __webpack_require__(14);
|
||||
|
||||
var self = _interopRequireWildcard(_devtoolsSourceMap);
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
/* 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/>. */
|
||||
|
||||
const {
|
||||
workerUtils: { WorkerDispatcher }
|
||||
} = __webpack_require__(16);
|
||||
|
||||
const dispatcher = exports.dispatcher = new WorkerDispatcher();
|
||||
|
||||
const _getGeneratedRanges = dispatcher.task("getGeneratedRanges", {
|
||||
queue: true
|
||||
});
|
||||
|
||||
const _getGeneratedLocation = dispatcher.task("getGeneratedLocation", {
|
||||
queue: true
|
||||
});
|
||||
const _getAllGeneratedLocations = dispatcher.task("getAllGeneratedLocations", {
|
||||
queue: true
|
||||
});
|
||||
|
||||
const _getOriginalLocation = dispatcher.task("getOriginalLocation", {
|
||||
queue: true
|
||||
});
|
||||
|
||||
const setAssetRootURL = exports.setAssetRootURL = async assetRoot => dispatcher.invoke("setAssetRootURL", assetRoot);
|
||||
|
||||
const getOriginalURLs = exports.getOriginalURLs = async generatedSource => dispatcher.invoke("getOriginalURLs", generatedSource);
|
||||
|
||||
const hasOriginalURL = exports.hasOriginalURL = async url => dispatcher.invoke("hasOriginalURL", url);
|
||||
|
||||
const getOriginalRanges = exports.getOriginalRanges = async (sourceId, url) => dispatcher.invoke("getOriginalRanges", sourceId, url);
|
||||
const getGeneratedRanges = exports.getGeneratedRanges = async (location, originalSource) => _getGeneratedRanges(location, originalSource);
|
||||
|
||||
const getGeneratedLocation = exports.getGeneratedLocation = async (location, originalSource) => _getGeneratedLocation(location, originalSource);
|
||||
|
||||
const getAllGeneratedLocations = exports.getAllGeneratedLocations = async (location, originalSource) => _getAllGeneratedLocations(location, originalSource);
|
||||
|
||||
const getOriginalLocation = exports.getOriginalLocation = async (location, options = {}) => _getOriginalLocation(location, options);
|
||||
|
||||
const getOriginalLocations = exports.getOriginalLocations = async (locations, options = {}) => dispatcher.invoke("getOriginalLocations", locations, options);
|
||||
|
||||
const getGeneratedRangesForOriginal = exports.getGeneratedRangesForOriginal = async (sourceId, url, mergeUnmappedRegions) => dispatcher.invoke("getGeneratedRangesForOriginal", sourceId, url, mergeUnmappedRegions);
|
||||
|
||||
const getFileGeneratedRange = exports.getFileGeneratedRange = async originalSource => dispatcher.invoke("getFileGeneratedRange", originalSource);
|
||||
|
||||
const getLocationScopes = exports.getLocationScopes = dispatcher.task("getLocationScopes");
|
||||
|
||||
const getOriginalSourceText = exports.getOriginalSourceText = async originalSource => dispatcher.invoke("getOriginalSourceText", originalSource);
|
||||
|
||||
const applySourceMap = exports.applySourceMap = async (generatedId, url, code, mappings) => dispatcher.invoke("applySourceMap", generatedId, url, code, mappings);
|
||||
|
||||
const clearSourceMaps = exports.clearSourceMaps = async () => dispatcher.invoke("clearSourceMaps");
|
||||
|
||||
const hasMappedSource = exports.hasMappedSource = async location => dispatcher.invoke("hasMappedSource", location);
|
||||
|
||||
const getOriginalStackFrames = exports.getOriginalStackFrames = async generatedLocation => dispatcher.invoke("getOriginalStackFrames", generatedLocation);
|
||||
|
||||
const startSourceMapWorker = exports.startSourceMapWorker = (url, assetRoot) => {
|
||||
dispatcher.start(url);
|
||||
setAssetRootURL(assetRoot);
|
||||
};
|
||||
const stopSourceMapWorker = exports.stopSourceMapWorker = dispatcher.stop.bind(dispatcher);
|
||||
|
||||
exports.default = self;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 16:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
/***/ 106:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/* 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/. */
|
||||
(function() {
|
||||
var base64map
|
||||
= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
|
||||
|
||||
const networkRequest = __webpack_require__(25);
|
||||
const workerUtils = __webpack_require__(26);
|
||||
crypt = {
|
||||
// Bit-wise rotation left
|
||||
rotl: function(n, b) {
|
||||
return (n << b) | (n >>> (32 - b));
|
||||
},
|
||||
|
||||
// Bit-wise rotation right
|
||||
rotr: function(n, b) {
|
||||
return (n << (32 - b)) | (n >>> b);
|
||||
},
|
||||
|
||||
// Swap big-endian to little-endian and vice versa
|
||||
endian: function(n) {
|
||||
// If number given, swap endian
|
||||
if (n.constructor == Number) {
|
||||
return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;
|
||||
}
|
||||
|
||||
// Else, assume array and swap all items
|
||||
for (var i = 0; i < n.length; i++)
|
||||
n[i] = crypt.endian(n[i]);
|
||||
return n;
|
||||
},
|
||||
|
||||
// Generate an array of any length of random bytes
|
||||
randomBytes: function(n) {
|
||||
for (var bytes = []; n > 0; n--)
|
||||
bytes.push(Math.floor(Math.random() * 256));
|
||||
return bytes;
|
||||
},
|
||||
|
||||
// Convert a byte array to big-endian 32-bit words
|
||||
bytesToWords: function(bytes) {
|
||||
for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)
|
||||
words[b >>> 5] |= bytes[i] << (24 - b % 32);
|
||||
return words;
|
||||
},
|
||||
|
||||
// Convert big-endian 32-bit words to a byte array
|
||||
wordsToBytes: function(words) {
|
||||
for (var bytes = [], b = 0; b < words.length * 32; b += 8)
|
||||
bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
|
||||
return bytes;
|
||||
},
|
||||
|
||||
// Convert a byte array to a hex string
|
||||
bytesToHex: function(bytes) {
|
||||
for (var hex = [], i = 0; i < bytes.length; i++) {
|
||||
hex.push((bytes[i] >>> 4).toString(16));
|
||||
hex.push((bytes[i] & 0xF).toString(16));
|
||||
}
|
||||
return hex.join('');
|
||||
},
|
||||
|
||||
// Convert a hex string to a byte array
|
||||
hexToBytes: function(hex) {
|
||||
for (var bytes = [], c = 0; c < hex.length; c += 2)
|
||||
bytes.push(parseInt(hex.substr(c, 2), 16));
|
||||
return bytes;
|
||||
},
|
||||
|
||||
// Convert a byte array to a base-64 string
|
||||
bytesToBase64: function(bytes) {
|
||||
for (var base64 = [], i = 0; i < bytes.length; i += 3) {
|
||||
var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
|
||||
for (var j = 0; j < 4; j++)
|
||||
if (i * 8 + j * 6 <= bytes.length * 8)
|
||||
base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));
|
||||
else
|
||||
base64.push('=');
|
||||
}
|
||||
return base64.join('');
|
||||
},
|
||||
|
||||
// Convert a base-64 string to a byte array
|
||||
base64ToBytes: function(base64) {
|
||||
// Remove non-base-64 characters
|
||||
base64 = base64.replace(/[^A-Z0-9+\/]/ig, '');
|
||||
|
||||
for (var bytes = [], i = 0, imod4 = 0; i < base64.length;
|
||||
imod4 = ++i % 4) {
|
||||
if (imod4 == 0) continue;
|
||||
bytes.push(((base64map.indexOf(base64.charAt(i - 1))
|
||||
& (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))
|
||||
| (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));
|
||||
}
|
||||
return bytes;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = crypt;
|
||||
})();
|
||||
|
||||
module.exports = {
|
||||
networkRequest,
|
||||
workerUtils
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 25:
|
||||
/***/ 107:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/*!
|
||||
* Determine if an object is a Buffer
|
||||
*
|
||||
* @author Feross Aboukhadijeh <https://feross.org>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
// The _isBuffer check is for Safari 5-7 support, because it's missing
|
||||
// Object.prototype.constructor. Remove this eventually
|
||||
module.exports = function (obj) {
|
||||
return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
|
||||
}
|
||||
|
||||
function isBuffer (obj) {
|
||||
return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
|
||||
}
|
||||
|
||||
// For Node v0.10 support. Remove this eventually.
|
||||
function isSlowBuffer (obj) {
|
||||
return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 13:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
|
@ -232,7 +401,7 @@ module.exports = networkRequest;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 26:
|
||||
/***/ 14:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
|
||||
|
@ -410,7 +579,119 @@ module.exports = {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 50:
|
||||
/***/ 182:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.stopSourceMapWorker = exports.startSourceMapWorker = exports.isOriginalId = exports.isGeneratedId = exports.generatedToOriginalId = exports.originalToGeneratedId = exports.getOriginalStackFrames = exports.hasMappedSource = exports.clearSourceMaps = exports.applySourceMap = exports.getOriginalSourceText = exports.getLocationScopes = exports.getFileGeneratedRange = exports.getGeneratedRangesForOriginal = exports.getOriginalLocations = exports.getOriginalLocation = exports.getAllGeneratedLocations = exports.getGeneratedLocation = exports.getGeneratedRanges = exports.getOriginalRanges = exports.hasOriginalURL = exports.getOriginalURLs = exports.setAssetRootURL = exports.dispatcher = undefined;
|
||||
|
||||
var _utils = __webpack_require__(64);
|
||||
|
||||
Object.defineProperty(exports, "originalToGeneratedId", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _utils.originalToGeneratedId;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "generatedToOriginalId", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _utils.generatedToOriginalId;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isGeneratedId", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _utils.isGeneratedId;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isOriginalId", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _utils.isOriginalId;
|
||||
}
|
||||
});
|
||||
|
||||
var _devtoolsSourceMap = __webpack_require__(182);
|
||||
|
||||
var self = _interopRequireWildcard(_devtoolsSourceMap);
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
/* 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/>. */
|
||||
|
||||
const {
|
||||
workerUtils: { WorkerDispatcher }
|
||||
} = __webpack_require__(7);
|
||||
|
||||
const dispatcher = exports.dispatcher = new WorkerDispatcher();
|
||||
|
||||
const _getGeneratedRanges = dispatcher.task("getGeneratedRanges", {
|
||||
queue: true
|
||||
});
|
||||
|
||||
const _getGeneratedLocation = dispatcher.task("getGeneratedLocation", {
|
||||
queue: true
|
||||
});
|
||||
const _getAllGeneratedLocations = dispatcher.task("getAllGeneratedLocations", {
|
||||
queue: true
|
||||
});
|
||||
|
||||
const _getOriginalLocation = dispatcher.task("getOriginalLocation", {
|
||||
queue: true
|
||||
});
|
||||
|
||||
const setAssetRootURL = exports.setAssetRootURL = async assetRoot => dispatcher.invoke("setAssetRootURL", assetRoot);
|
||||
|
||||
const getOriginalURLs = exports.getOriginalURLs = async generatedSource => dispatcher.invoke("getOriginalURLs", generatedSource);
|
||||
|
||||
const hasOriginalURL = exports.hasOriginalURL = async url => dispatcher.invoke("hasOriginalURL", url);
|
||||
|
||||
const getOriginalRanges = exports.getOriginalRanges = async (sourceId, url) => dispatcher.invoke("getOriginalRanges", sourceId, url);
|
||||
const getGeneratedRanges = exports.getGeneratedRanges = async (location, originalSource) => _getGeneratedRanges(location, originalSource);
|
||||
|
||||
const getGeneratedLocation = exports.getGeneratedLocation = async (location, originalSource) => _getGeneratedLocation(location, originalSource);
|
||||
|
||||
const getAllGeneratedLocations = exports.getAllGeneratedLocations = async (location, originalSource) => _getAllGeneratedLocations(location, originalSource);
|
||||
|
||||
const getOriginalLocation = exports.getOriginalLocation = async (location, options = {}) => _getOriginalLocation(location, options);
|
||||
|
||||
const getOriginalLocations = exports.getOriginalLocations = async (locations, options = {}) => dispatcher.invoke("getOriginalLocations", locations, options);
|
||||
|
||||
const getGeneratedRangesForOriginal = exports.getGeneratedRangesForOriginal = async (sourceId, url, mergeUnmappedRegions) => dispatcher.invoke("getGeneratedRangesForOriginal", sourceId, url, mergeUnmappedRegions);
|
||||
|
||||
const getFileGeneratedRange = exports.getFileGeneratedRange = async originalSource => dispatcher.invoke("getFileGeneratedRange", originalSource);
|
||||
|
||||
const getLocationScopes = exports.getLocationScopes = dispatcher.task("getLocationScopes");
|
||||
|
||||
const getOriginalSourceText = exports.getOriginalSourceText = async originalSource => dispatcher.invoke("getOriginalSourceText", originalSource);
|
||||
|
||||
const applySourceMap = exports.applySourceMap = async (generatedId, url, code, mappings) => dispatcher.invoke("applySourceMap", generatedId, url, code, mappings);
|
||||
|
||||
const clearSourceMaps = exports.clearSourceMaps = async () => dispatcher.invoke("clearSourceMaps");
|
||||
|
||||
const hasMappedSource = exports.hasMappedSource = async location => dispatcher.invoke("hasMappedSource", location);
|
||||
|
||||
const getOriginalStackFrames = exports.getOriginalStackFrames = async generatedLocation => dispatcher.invoke("getOriginalStackFrames", generatedLocation);
|
||||
|
||||
const startSourceMapWorker = exports.startSourceMapWorker = (url, assetRoot) => {
|
||||
dispatcher.start(url);
|
||||
setAssetRootURL(assetRoot);
|
||||
};
|
||||
const stopSourceMapWorker = exports.stopSourceMapWorker = dispatcher.stop.bind(dispatcher);
|
||||
|
||||
exports.default = self;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 36:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var charenc = {
|
||||
|
@ -450,7 +731,15 @@ module.exports = charenc;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 68:
|
||||
/***/ 412:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = __webpack_require__(182);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 64:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -460,7 +749,7 @@ module.exports = charenc;
|
|||
* 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/>. */
|
||||
|
||||
const md5 = __webpack_require__(78);
|
||||
const md5 = __webpack_require__(105);
|
||||
|
||||
function originalToGeneratedId(originalId) {
|
||||
const match = originalId.match(/(.*)\/originalSource/);
|
||||
|
@ -538,309 +827,20 @@ module.exports = {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 762:
|
||||
/***/ 7:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = __webpack_require__(14);
|
||||
/* 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/. */
|
||||
|
||||
const networkRequest = __webpack_require__(13);
|
||||
const workerUtils = __webpack_require__(14);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 78:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
(function(){
|
||||
var crypt = __webpack_require__(79),
|
||||
utf8 = __webpack_require__(50).utf8,
|
||||
isBuffer = __webpack_require__(80),
|
||||
bin = __webpack_require__(50).bin,
|
||||
|
||||
// The core
|
||||
md5 = function (message, options) {
|
||||
// Convert to byte array
|
||||
if (message.constructor == String)
|
||||
if (options && options.encoding === 'binary')
|
||||
message = bin.stringToBytes(message);
|
||||
else
|
||||
message = utf8.stringToBytes(message);
|
||||
else if (isBuffer(message))
|
||||
message = Array.prototype.slice.call(message, 0);
|
||||
else if (!Array.isArray(message))
|
||||
message = message.toString();
|
||||
// else, assume byte array already
|
||||
|
||||
var m = crypt.bytesToWords(message),
|
||||
l = message.length * 8,
|
||||
a = 1732584193,
|
||||
b = -271733879,
|
||||
c = -1732584194,
|
||||
d = 271733878;
|
||||
|
||||
// Swap endian
|
||||
for (var i = 0; i < m.length; i++) {
|
||||
m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |
|
||||
((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;
|
||||
}
|
||||
|
||||
// Padding
|
||||
m[l >>> 5] |= 0x80 << (l % 32);
|
||||
m[(((l + 64) >>> 9) << 4) + 14] = l;
|
||||
|
||||
// Method shortcuts
|
||||
var FF = md5._ff,
|
||||
GG = md5._gg,
|
||||
HH = md5._hh,
|
||||
II = md5._ii;
|
||||
|
||||
for (var i = 0; i < m.length; i += 16) {
|
||||
|
||||
var aa = a,
|
||||
bb = b,
|
||||
cc = c,
|
||||
dd = d;
|
||||
|
||||
a = FF(a, b, c, d, m[i+ 0], 7, -680876936);
|
||||
d = FF(d, a, b, c, m[i+ 1], 12, -389564586);
|
||||
c = FF(c, d, a, b, m[i+ 2], 17, 606105819);
|
||||
b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);
|
||||
a = FF(a, b, c, d, m[i+ 4], 7, -176418897);
|
||||
d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);
|
||||
c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);
|
||||
b = FF(b, c, d, a, m[i+ 7], 22, -45705983);
|
||||
a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);
|
||||
d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);
|
||||
c = FF(c, d, a, b, m[i+10], 17, -42063);
|
||||
b = FF(b, c, d, a, m[i+11], 22, -1990404162);
|
||||
a = FF(a, b, c, d, m[i+12], 7, 1804603682);
|
||||
d = FF(d, a, b, c, m[i+13], 12, -40341101);
|
||||
c = FF(c, d, a, b, m[i+14], 17, -1502002290);
|
||||
b = FF(b, c, d, a, m[i+15], 22, 1236535329);
|
||||
|
||||
a = GG(a, b, c, d, m[i+ 1], 5, -165796510);
|
||||
d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);
|
||||
c = GG(c, d, a, b, m[i+11], 14, 643717713);
|
||||
b = GG(b, c, d, a, m[i+ 0], 20, -373897302);
|
||||
a = GG(a, b, c, d, m[i+ 5], 5, -701558691);
|
||||
d = GG(d, a, b, c, m[i+10], 9, 38016083);
|
||||
c = GG(c, d, a, b, m[i+15], 14, -660478335);
|
||||
b = GG(b, c, d, a, m[i+ 4], 20, -405537848);
|
||||
a = GG(a, b, c, d, m[i+ 9], 5, 568446438);
|
||||
d = GG(d, a, b, c, m[i+14], 9, -1019803690);
|
||||
c = GG(c, d, a, b, m[i+ 3], 14, -187363961);
|
||||
b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);
|
||||
a = GG(a, b, c, d, m[i+13], 5, -1444681467);
|
||||
d = GG(d, a, b, c, m[i+ 2], 9, -51403784);
|
||||
c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);
|
||||
b = GG(b, c, d, a, m[i+12], 20, -1926607734);
|
||||
|
||||
a = HH(a, b, c, d, m[i+ 5], 4, -378558);
|
||||
d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);
|
||||
c = HH(c, d, a, b, m[i+11], 16, 1839030562);
|
||||
b = HH(b, c, d, a, m[i+14], 23, -35309556);
|
||||
a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);
|
||||
d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);
|
||||
c = HH(c, d, a, b, m[i+ 7], 16, -155497632);
|
||||
b = HH(b, c, d, a, m[i+10], 23, -1094730640);
|
||||
a = HH(a, b, c, d, m[i+13], 4, 681279174);
|
||||
d = HH(d, a, b, c, m[i+ 0], 11, -358537222);
|
||||
c = HH(c, d, a, b, m[i+ 3], 16, -722521979);
|
||||
b = HH(b, c, d, a, m[i+ 6], 23, 76029189);
|
||||
a = HH(a, b, c, d, m[i+ 9], 4, -640364487);
|
||||
d = HH(d, a, b, c, m[i+12], 11, -421815835);
|
||||
c = HH(c, d, a, b, m[i+15], 16, 530742520);
|
||||
b = HH(b, c, d, a, m[i+ 2], 23, -995338651);
|
||||
|
||||
a = II(a, b, c, d, m[i+ 0], 6, -198630844);
|
||||
d = II(d, a, b, c, m[i+ 7], 10, 1126891415);
|
||||
c = II(c, d, a, b, m[i+14], 15, -1416354905);
|
||||
b = II(b, c, d, a, m[i+ 5], 21, -57434055);
|
||||
a = II(a, b, c, d, m[i+12], 6, 1700485571);
|
||||
d = II(d, a, b, c, m[i+ 3], 10, -1894986606);
|
||||
c = II(c, d, a, b, m[i+10], 15, -1051523);
|
||||
b = II(b, c, d, a, m[i+ 1], 21, -2054922799);
|
||||
a = II(a, b, c, d, m[i+ 8], 6, 1873313359);
|
||||
d = II(d, a, b, c, m[i+15], 10, -30611744);
|
||||
c = II(c, d, a, b, m[i+ 6], 15, -1560198380);
|
||||
b = II(b, c, d, a, m[i+13], 21, 1309151649);
|
||||
a = II(a, b, c, d, m[i+ 4], 6, -145523070);
|
||||
d = II(d, a, b, c, m[i+11], 10, -1120210379);
|
||||
c = II(c, d, a, b, m[i+ 2], 15, 718787259);
|
||||
b = II(b, c, d, a, m[i+ 9], 21, -343485551);
|
||||
|
||||
a = (a + aa) >>> 0;
|
||||
b = (b + bb) >>> 0;
|
||||
c = (c + cc) >>> 0;
|
||||
d = (d + dd) >>> 0;
|
||||
}
|
||||
|
||||
return crypt.endian([a, b, c, d]);
|
||||
};
|
||||
|
||||
// Auxiliary functions
|
||||
md5._ff = function (a, b, c, d, x, s, t) {
|
||||
var n = a + (b & c | ~b & d) + (x >>> 0) + t;
|
||||
return ((n << s) | (n >>> (32 - s))) + b;
|
||||
};
|
||||
md5._gg = function (a, b, c, d, x, s, t) {
|
||||
var n = a + (b & d | c & ~d) + (x >>> 0) + t;
|
||||
return ((n << s) | (n >>> (32 - s))) + b;
|
||||
};
|
||||
md5._hh = function (a, b, c, d, x, s, t) {
|
||||
var n = a + (b ^ c ^ d) + (x >>> 0) + t;
|
||||
return ((n << s) | (n >>> (32 - s))) + b;
|
||||
};
|
||||
md5._ii = function (a, b, c, d, x, s, t) {
|
||||
var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;
|
||||
return ((n << s) | (n >>> (32 - s))) + b;
|
||||
};
|
||||
|
||||
// Package private blocksize
|
||||
md5._blocksize = 16;
|
||||
md5._digestsize = 16;
|
||||
|
||||
module.exports = function (message, options) {
|
||||
if (message === undefined || message === null)
|
||||
throw new Error('Illegal argument ' + message);
|
||||
|
||||
var digestbytes = crypt.wordsToBytes(md5(message, options));
|
||||
return options && options.asBytes ? digestbytes :
|
||||
options && options.asString ? bin.bytesToString(digestbytes) :
|
||||
crypt.bytesToHex(digestbytes);
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 79:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
(function() {
|
||||
var base64map
|
||||
= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
|
||||
|
||||
crypt = {
|
||||
// Bit-wise rotation left
|
||||
rotl: function(n, b) {
|
||||
return (n << b) | (n >>> (32 - b));
|
||||
},
|
||||
|
||||
// Bit-wise rotation right
|
||||
rotr: function(n, b) {
|
||||
return (n << (32 - b)) | (n >>> b);
|
||||
},
|
||||
|
||||
// Swap big-endian to little-endian and vice versa
|
||||
endian: function(n) {
|
||||
// If number given, swap endian
|
||||
if (n.constructor == Number) {
|
||||
return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;
|
||||
}
|
||||
|
||||
// Else, assume array and swap all items
|
||||
for (var i = 0; i < n.length; i++)
|
||||
n[i] = crypt.endian(n[i]);
|
||||
return n;
|
||||
},
|
||||
|
||||
// Generate an array of any length of random bytes
|
||||
randomBytes: function(n) {
|
||||
for (var bytes = []; n > 0; n--)
|
||||
bytes.push(Math.floor(Math.random() * 256));
|
||||
return bytes;
|
||||
},
|
||||
|
||||
// Convert a byte array to big-endian 32-bit words
|
||||
bytesToWords: function(bytes) {
|
||||
for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)
|
||||
words[b >>> 5] |= bytes[i] << (24 - b % 32);
|
||||
return words;
|
||||
},
|
||||
|
||||
// Convert big-endian 32-bit words to a byte array
|
||||
wordsToBytes: function(words) {
|
||||
for (var bytes = [], b = 0; b < words.length * 32; b += 8)
|
||||
bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
|
||||
return bytes;
|
||||
},
|
||||
|
||||
// Convert a byte array to a hex string
|
||||
bytesToHex: function(bytes) {
|
||||
for (var hex = [], i = 0; i < bytes.length; i++) {
|
||||
hex.push((bytes[i] >>> 4).toString(16));
|
||||
hex.push((bytes[i] & 0xF).toString(16));
|
||||
}
|
||||
return hex.join('');
|
||||
},
|
||||
|
||||
// Convert a hex string to a byte array
|
||||
hexToBytes: function(hex) {
|
||||
for (var bytes = [], c = 0; c < hex.length; c += 2)
|
||||
bytes.push(parseInt(hex.substr(c, 2), 16));
|
||||
return bytes;
|
||||
},
|
||||
|
||||
// Convert a byte array to a base-64 string
|
||||
bytesToBase64: function(bytes) {
|
||||
for (var base64 = [], i = 0; i < bytes.length; i += 3) {
|
||||
var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
|
||||
for (var j = 0; j < 4; j++)
|
||||
if (i * 8 + j * 6 <= bytes.length * 8)
|
||||
base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));
|
||||
else
|
||||
base64.push('=');
|
||||
}
|
||||
return base64.join('');
|
||||
},
|
||||
|
||||
// Convert a base-64 string to a byte array
|
||||
base64ToBytes: function(base64) {
|
||||
// Remove non-base-64 characters
|
||||
base64 = base64.replace(/[^A-Z0-9+\/]/ig, '');
|
||||
|
||||
for (var bytes = [], i = 0, imod4 = 0; i < base64.length;
|
||||
imod4 = ++i % 4) {
|
||||
if (imod4 == 0) continue;
|
||||
bytes.push(((base64map.indexOf(base64.charAt(i - 1))
|
||||
& (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))
|
||||
| (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));
|
||||
}
|
||||
return bytes;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = crypt;
|
||||
})();
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 80:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/*!
|
||||
* Determine if an object is a Buffer
|
||||
*
|
||||
* @author Feross Aboukhadijeh <https://feross.org>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
// The _isBuffer check is for Safari 5-7 support, because it's missing
|
||||
// Object.prototype.constructor. Remove this eventually
|
||||
module.exports = function (obj) {
|
||||
return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
|
||||
}
|
||||
|
||||
function isBuffer (obj) {
|
||||
return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
|
||||
}
|
||||
|
||||
// For Node v0.10 support. Remove this eventually.
|
||||
function isSlowBuffer (obj) {
|
||||
return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
networkRequest,
|
||||
workerUtils
|
||||
};
|
||||
|
||||
/***/ })
|
||||
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -58,6 +58,23 @@ bool nsDocShellEditorData::GetEditable() {
|
|||
return mMakeEditable || (mHTMLEditor != nullptr);
|
||||
}
|
||||
|
||||
nsresult nsDocShellEditorData::CreateEditor() {
|
||||
nsCOMPtr<nsIEditingSession> editingSession;
|
||||
nsresult rv = GetEditingSession(getter_AddRefs(editingSession));
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsPIDOMWindowOuter> domWindow =
|
||||
mDocShell ? mDocShell->GetWindow() : nullptr;
|
||||
rv = editingSession->SetupEditorOnWindow(domWindow);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsDocShellEditorData::GetEditingSession(nsIEditingSession** aResult) {
|
||||
EnsureEditingSession();
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ class nsDocShellEditorData {
|
|||
|
||||
nsresult MakeEditable(bool aWaitForUriLoad);
|
||||
bool GetEditable();
|
||||
nsresult CreateEditor();
|
||||
nsresult GetEditingSession(nsIEditingSession** aResult);
|
||||
mozilla::HTMLEditor* GetHTMLEditor() const { return mHTMLEditor; }
|
||||
nsresult SetHTMLEditor(mozilla::HTMLEditor* aHTMLEditor);
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
/* 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/. */
|
||||
/* global noSuchMethodExistsYo1, noSuchMethodExistsYo2, noSuchMethodExistsYo3 */
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -15,9 +16,9 @@ TestInterfaceJS.prototype = {
|
|||
contractID: "@mozilla.org/dom/test-interface-js;1",
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer, Ci.mozITestInterfaceJS]),
|
||||
|
||||
init: function(win) { this._win = win; },
|
||||
init(win) { this._win = win; },
|
||||
|
||||
__init: function (anyArg, objectArg, dictionaryArg) {
|
||||
__init(anyArg, objectArg, dictionaryArg) {
|
||||
this._anyAttr = undefined;
|
||||
this._objectAttr = null;
|
||||
this._anyArg = anyArg;
|
||||
|
@ -27,116 +28,116 @@ TestInterfaceJS.prototype = {
|
|||
|
||||
get anyArg() { return this._anyArg; },
|
||||
get objectArg() { return this._objectArg; },
|
||||
getDictionaryArg: function() { return this._dictionaryArg; },
|
||||
getDictionaryArg() { return this._dictionaryArg; },
|
||||
get anyAttr() { return this._anyAttr; },
|
||||
set anyAttr(val) { this._anyAttr = val; },
|
||||
get objectAttr() { return this._objectAttr; },
|
||||
set objectAttr(val) { this._objectAttr = val; },
|
||||
getDictionaryAttr: function() { return this._dictionaryAttr; },
|
||||
setDictionaryAttr: function(val) { this._dictionaryAttr = val; },
|
||||
pingPongAny: function(any) { return any; },
|
||||
pingPongObject: function(obj) { return obj; },
|
||||
pingPongObjectOrString: function(objectOrString) { return objectOrString; },
|
||||
pingPongDictionary: function(dict) { return dict; },
|
||||
pingPongDictionaryOrLong: function(dictOrLong) { return dictOrLong.anyMember || dictOrLong; },
|
||||
pingPongRecord: function(rec) { return JSON.stringify(rec); },
|
||||
objectSequenceLength: function(seq) { return seq.length; },
|
||||
anySequenceLength: function(seq) { return seq.length; },
|
||||
getDictionaryAttr() { return this._dictionaryAttr; },
|
||||
setDictionaryAttr(val) { this._dictionaryAttr = val; },
|
||||
pingPongAny(any) { return any; },
|
||||
pingPongObject(obj) { return obj; },
|
||||
pingPongObjectOrString(objectOrString) { return objectOrString; },
|
||||
pingPongDictionary(dict) { return dict; },
|
||||
pingPongDictionaryOrLong(dictOrLong) { return dictOrLong.anyMember || dictOrLong; },
|
||||
pingPongRecord(rec) { return JSON.stringify(rec); },
|
||||
objectSequenceLength(seq) { return seq.length; },
|
||||
anySequenceLength(seq) { return seq.length; },
|
||||
|
||||
|
||||
getCallerPrincipal: function() { return Cu.getWebIDLCallerPrincipal().origin; },
|
||||
getCallerPrincipal() { return Cu.getWebIDLCallerPrincipal().origin; },
|
||||
|
||||
convertSVS: function(svs) { return svs; },
|
||||
convertSVS(svs) { return svs; },
|
||||
|
||||
pingPongUnion: function(x) { return x; },
|
||||
pingPongUnionContainingNull: function(x) { return x; },
|
||||
pingPongNullableUnion: function(x) { return x; },
|
||||
returnBadUnion: function(x) { return 3; },
|
||||
pingPongUnion(x) { return x; },
|
||||
pingPongUnionContainingNull(x) { return x; },
|
||||
pingPongNullableUnion(x) { return x; },
|
||||
returnBadUnion(x) { return 3; },
|
||||
|
||||
testSequenceOverload: function(arg) {},
|
||||
testSequenceUnion: function(arg) {},
|
||||
testSequenceOverload(arg) {},
|
||||
testSequenceUnion(arg) {},
|
||||
|
||||
testThrowError: function() {
|
||||
testThrowError() {
|
||||
throw new this._win.Error("We are an Error");
|
||||
},
|
||||
|
||||
testThrowDOMException: function() {
|
||||
testThrowDOMException() {
|
||||
throw new this._win.DOMException("We are a DOMException",
|
||||
"NotSupportedError");
|
||||
},
|
||||
|
||||
testThrowTypeError: function() {
|
||||
testThrowTypeError() {
|
||||
throw new this._win.TypeError("We are a TypeError");
|
||||
},
|
||||
|
||||
testThrowNsresult: function() {
|
||||
testThrowNsresult() {
|
||||
throw Cr.NS_BINDING_ABORTED;
|
||||
},
|
||||
|
||||
testThrowNsresultFromNative: function(x) {
|
||||
testThrowNsresultFromNative(x) {
|
||||
// We want to throw an exception that we generate from an nsresult thrown
|
||||
// by a C++ component.
|
||||
Services.netUtils.notImplemented();
|
||||
},
|
||||
|
||||
testThrowCallbackError: function(callback) {
|
||||
testThrowCallbackError(callback) {
|
||||
callback();
|
||||
},
|
||||
|
||||
testThrowXraySelfHosted: function() {
|
||||
testThrowXraySelfHosted() {
|
||||
this._win.Array.indexOf();
|
||||
},
|
||||
|
||||
testThrowSelfHosted: function() {
|
||||
testThrowSelfHosted() {
|
||||
Array.indexOf();
|
||||
},
|
||||
|
||||
testPromiseWithThrowingChromePromiseInit: function() {
|
||||
testPromiseWithThrowingChromePromiseInit() {
|
||||
return new this._win.Promise(function() {
|
||||
noSuchMethodExistsYo1();
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
testPromiseWithThrowingContentPromiseInit: function(func) {
|
||||
testPromiseWithThrowingContentPromiseInit(func) {
|
||||
return new this._win.Promise(func);
|
||||
},
|
||||
|
||||
testPromiseWithDOMExceptionThrowingPromiseInit: function() {
|
||||
testPromiseWithDOMExceptionThrowingPromiseInit() {
|
||||
return new this._win.Promise(() => {
|
||||
throw new this._win.DOMException("We are a second DOMException",
|
||||
"NotFoundError");
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
testPromiseWithThrowingChromeThenFunction: function() {
|
||||
testPromiseWithThrowingChromeThenFunction() {
|
||||
return this._win.Promise.resolve(5).then(function() {
|
||||
noSuchMethodExistsYo2();
|
||||
});
|
||||
},
|
||||
|
||||
testPromiseWithThrowingContentThenFunction: function(func) {
|
||||
testPromiseWithThrowingContentThenFunction(func) {
|
||||
return this._win.Promise.resolve(10).then(func);
|
||||
},
|
||||
|
||||
testPromiseWithDOMExceptionThrowingThenFunction: function() {
|
||||
testPromiseWithDOMExceptionThrowingThenFunction() {
|
||||
return this._win.Promise.resolve(5).then(() => {
|
||||
throw new this._win.DOMException("We are a third DOMException",
|
||||
"NetworkError");
|
||||
});
|
||||
},
|
||||
|
||||
testPromiseWithThrowingChromeThenable: function() {
|
||||
testPromiseWithThrowingChromeThenable() {
|
||||
var thenable = {
|
||||
then: function() {
|
||||
noSuchMethodExistsYo3()
|
||||
}
|
||||
then() {
|
||||
noSuchMethodExistsYo3();
|
||||
},
|
||||
};
|
||||
return new this._win.Promise(function(resolve) {
|
||||
resolve(thenable)
|
||||
resolve(thenable);
|
||||
});
|
||||
},
|
||||
|
||||
testPromiseWithThrowingContentThenable: function(thenable) {
|
||||
testPromiseWithThrowingContentThenable(thenable) {
|
||||
// Waive Xrays on the thenable, because we're calling resolve() in the
|
||||
// chrome compartment, so that's the compartment the "then" property get
|
||||
// will happen in, and if we leave the Xray in place the function-valued
|
||||
|
@ -144,15 +145,15 @@ TestInterfaceJS.prototype = {
|
|||
return this._win.Promise.resolve(Cu.waiveXrays(thenable));
|
||||
},
|
||||
|
||||
testPromiseWithDOMExceptionThrowingThenable: function() {
|
||||
testPromiseWithDOMExceptionThrowingThenable() {
|
||||
var thenable = {
|
||||
then: () => {
|
||||
throw new this._win.DOMException("We are a fourth DOMException",
|
||||
"TypeMismatchError");
|
||||
}
|
||||
},
|
||||
};
|
||||
return new this._win.Promise(function(resolve) {
|
||||
resolve(thenable)
|
||||
resolve(thenable);
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -162,7 +163,7 @@ TestInterfaceJS.prototype = {
|
|||
|
||||
set onsomething(val) {
|
||||
this.__DOM_IMPL__.setEventHandler("onsomething", val);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([TestInterfaceJS])
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([TestInterfaceJS]);
|
||||
|
|
|
@ -14,25 +14,25 @@ TestInterfaceJSMaplike.prototype = {
|
|||
contractID: "@mozilla.org/dom/test-interface-js-maplike;1",
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer]),
|
||||
|
||||
init: function(win) { this._win = win; },
|
||||
init(win) { this._win = win; },
|
||||
|
||||
__init: function () {},
|
||||
__init() {},
|
||||
|
||||
setInternal: function(aKey, aValue) {
|
||||
setInternal(aKey, aValue) {
|
||||
return this.__DOM_IMPL__.__set(aKey, aValue);
|
||||
},
|
||||
|
||||
deleteInternal: function(aKey) {
|
||||
deleteInternal(aKey) {
|
||||
return this.__DOM_IMPL__.__delete(aKey);
|
||||
},
|
||||
|
||||
clearInternal: function() {
|
||||
clearInternal() {
|
||||
return this.__DOM_IMPL__.__clear();
|
||||
},
|
||||
|
||||
__onget: function(key, value) {
|
||||
__onget(key, value) {
|
||||
/* no-op */
|
||||
},
|
||||
};
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([TestInterfaceJSMaplike])
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([TestInterfaceJSMaplike]);
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
<html>
|
||||
<body>
|
||||
<script type="application/javascript">
|
||||
function runTest()
|
||||
{
|
||||
function runTest() {
|
||||
return [ parent.HTMLElement.prototype instanceof Element,
|
||||
parent.HTMLElement.prototype instanceof parent.Element ];
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<body>
|
||||
<script>
|
||||
worker = new Worker("a");
|
||||
var worker = new Worker("a");
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
iframe: { value: 42 },
|
||||
document: { value: 42 },
|
||||
addEventListener: { value: 42 },
|
||||
toString: { value: 42 }
|
||||
toString: { value: 42 },
|
||||
}));
|
||||
window.documentElement.expando = 42;
|
||||
Object.defineProperty(window.documentElement, "version", { value: 42 });
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<script>
|
||||
document.x = 5
|
||||
document.x = 5;
|
||||
</script>
|
||||
<img id="y" name="y"></div>
|
||||
<img id="z" name="z"></div>
|
||||
|
|
|
@ -17,11 +17,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=796850
|
|||
|
||||
/** Test for Bug 796850 **/
|
||||
var xhr = new XMLHttpRequest();
|
||||
caught = false;
|
||||
var caught = false;
|
||||
try {
|
||||
xhr.open("\u5427", "about:mozilla", true);
|
||||
}
|
||||
catch (TypeError) {
|
||||
} catch (TypeError) {
|
||||
caught = true;
|
||||
}
|
||||
ok(caught, "Character values > 255 not rejected for ByteString");
|
||||
|
|
|
@ -21,11 +21,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=748983
|
|||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function runTest()
|
||||
{
|
||||
ok(document instanceof EventTarget, "document is an event target")
|
||||
function runTest() {
|
||||
ok(document instanceof EventTarget, "document is an event target");
|
||||
ok(new XMLHttpRequest() instanceof XMLHttpRequest, "instanceof should work on XHR");
|
||||
ok(HTMLElement.prototype instanceof Node, "instanceof needs to walk the prototype chain")
|
||||
ok(HTMLElement.prototype instanceof Node, "instanceof needs to walk the prototype chain");
|
||||
|
||||
var otherWin = document.getElementById("testFrame").contentWindow;
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
/* global test, assert_array_equals */
|
||||
test(function() {
|
||||
var props = Object.getOwnPropertyNames(Object.prototype);
|
||||
// If you change this list, make sure it continues to match the list in
|
||||
|
@ -13,7 +14,7 @@ test(function() {
|
|||
"constructor", "toSource", "toString", "toLocaleString", "valueOf",
|
||||
"hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable",
|
||||
"__defineGetter__", "__defineSetter__", "__lookupGetter__",
|
||||
"__lookupSetter__", "__proto__"
|
||||
"__lookupSetter__", "__proto__",
|
||||
];
|
||||
assert_array_equals(props.sort(), expected.sort());
|
||||
}, "Own properties of Object.prototype");
|
||||
|
|
|
@ -9,6 +9,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1148593
|
|||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript">
|
||||
/* global noSuchFunction */
|
||||
|
||||
/** Test for Bug 1148593 **/
|
||||
|
||||
|
@ -91,7 +92,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1148593
|
|||
|
||||
addLoadEvent(function() {
|
||||
SpecialPowers.pushPrefEnv(
|
||||
{"set": [['javascript.options.asyncstack', true]]},
|
||||
{"set": [["javascript.options.asyncstack", true]]},
|
||||
runTests);
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -19,13 +19,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=936056
|
|||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
get = desc.get;
|
||||
var get = desc.get;
|
||||
ok(get, "Couldn't find document getter");
|
||||
Object.defineProperty(frames[0], "foo", { get: get, configurable: true });
|
||||
Object.defineProperty(frames[0], "foo", { get, configurable: true });
|
||||
|
||||
var barewordFunc = frames[0].eval("(function (count) { var doc; for (var i = 0; i < count; ++i) doc = foo; return doc.documentElement; })");
|
||||
var qualifiedFunc = frames[0].eval("(function (count) { var doc; for (var i = 0; i < count; ++i) doc = window.document; return doc.documentElement; })");
|
||||
document.querySelector("iframe").onload = function () {
|
||||
document.querySelector("iframe").onload = function() {
|
||||
// interp
|
||||
is(barewordFunc(1).innerText, "OLD", "Bareword should see own inner 1");
|
||||
is(qualifiedFunc(1).innerText, "NEW",
|
||||
|
@ -39,9 +39,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=936056
|
|||
is(qualifiedFunc(10000).innerText, "NEW",
|
||||
"Qualified should see current inner 2");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
};
|
||||
frames[0].location = "file_barewordGetsWindow_frame2.html";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1036214
|
|||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript">
|
||||
/* global TestInterfaceJS */
|
||||
|
||||
/** Test for subsumes-checking |any| and |object| for js-implemented WebIDL. **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
@ -19,7 +20,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1036214
|
|||
xoObjects.push(SpecialPowers.unwrap(SpecialPowers.wrap(window[0]).document));
|
||||
xoObjects.push(SpecialPowers);
|
||||
xoObjects.push(SpecialPowers.wrap);
|
||||
SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]}, go);
|
||||
SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]}, go);
|
||||
}
|
||||
|
||||
function checkThrows(f, msg) {
|
||||
|
@ -33,7 +34,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1036214
|
|||
}
|
||||
|
||||
function go() {
|
||||
|
||||
//
|
||||
// Test the basics of the test interface.
|
||||
//
|
||||
|
@ -51,7 +51,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1036214
|
|||
is(t.objectArg, obj, "objectArg is correct");
|
||||
is(t.getDictionaryArg().anyMember, 42, "dictionaryArg looks correct");
|
||||
is(t.getDictionaryArg().objectMember.answer, 42, "dictionaryArg looks correct");
|
||||
is(t.getDictionaryArg().objectRecordMember["key"].answer, "fortytwo", "dictionaryArg looks correct");
|
||||
is(t.getDictionaryArg().objectRecordMember.key.answer, "fortytwo", "dictionaryArg looks correct");
|
||||
is(t.getDictionaryArg().objectRecordMember.key.answer, "fortytwo", "dictionaryArg looks correct");
|
||||
t.anyAttr = 2;
|
||||
is(t.anyAttr, 2, "ping-pong any attribute works");
|
||||
|
@ -60,7 +60,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1036214
|
|||
t.setDictionaryAttr(myDict);
|
||||
is(t.getDictionaryAttr().anyMember, 42, "ping-pong dictionary works");
|
||||
is(t.getDictionaryAttr().objectMember.answer, 42, "ping-pong dictionary works");
|
||||
is(t.getDictionaryAttr().objectRecordMember["key"].answer, "fortytwo", "ping-pong dictionary works");
|
||||
is(t.getDictionaryAttr().objectRecordMember.key.answer, "fortytwo", "ping-pong dictionary works");
|
||||
is(t.getDictionaryAttr().objectRecordMember.key.answer, "fortytwo", "ping-pong dictionary works");
|
||||
|
||||
is(any, t.pingPongAny(any), "ping-pong works with any");
|
||||
|
@ -71,27 +71,27 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1036214
|
|||
is(t.pingPongDictionary(myDict).objectMember.answer, 42, "ping pong works with dict");
|
||||
is(t.pingPongDictionary(myDict).objectOrStringMember.answer, "anobject", "ping pong works with dict");
|
||||
is(t.pingPongDictionary(myDict).anySequenceMember[2], "thirdinsequence", "ping pong works with dict");
|
||||
is(t.pingPongDictionary(myDict).objectRecordMember["key"].answer, "fortytwo", "ping pong works with dict");
|
||||
is(t.pingPongDictionary(myDict).objectRecordMember.key.answer, "fortytwo", "ping pong works with dict");
|
||||
is(t.pingPongDictionary(myDict).objectRecordMember.key.answer, "fortytwo", "ping pong works with dict");
|
||||
is(t.pingPongDictionary(myDict).innerDictionary.innerObject.answer, "rabbithole", "ping pong works with layered dicts");
|
||||
is(t.pingPongDictionaryOrLong({anyMember: 42}), 42, "ping pong (dict or long) works with dict");
|
||||
is(t.pingPongDictionaryOrLong(42), 42, "ping pong (dict or long) works with long");
|
||||
ok(/canary/.test(t.pingPongRecord({ someVal: 42, someOtherVal: "canary" })), "ping pong works with record");
|
||||
is(t.objectSequenceLength([{}, {}, {}]), 3, "ping pong works with object sequence");
|
||||
is(t.anySequenceLength([42, 'string', {}, undefined]), 4, "ping pong works with any sequence");
|
||||
is(t.anySequenceLength([42, "string", {}, undefined]), 4, "ping pong works with any sequence");
|
||||
|
||||
//
|
||||
// Test that we throw in the cross-origin cases.
|
||||
//
|
||||
|
||||
xoObjects.forEach(function(xoObj) {
|
||||
var blank = new TestInterfaceJS();
|
||||
new TestInterfaceJS();
|
||||
checkThrows(() => new TestInterfaceJS(xoObj, undefined), "any param for constructor");
|
||||
checkThrows(() => new TestInterfaceJS(undefined, xoObj), "obj param for constructor");
|
||||
checkThrows(() => new TestInterfaceJS(undefined, undefined, { anyMember: xoObj }), "any dict param for constructor");
|
||||
checkThrows(() => new TestInterfaceJS(undefined, undefined, { objectMember: xoObj }), "object dict param for constructor");
|
||||
checkThrows(() => new TestInterfaceJS(undefined, undefined, { objectOrStringMember: xoObj }), "union dict param for constructor");
|
||||
checkThrows(() => new TestInterfaceJS(undefined, undefined, { anySequenceMember: [0, xoObj, 'hi' ] }), "sequence dict param for constructor");
|
||||
checkThrows(() => new TestInterfaceJS(undefined, undefined, { anySequenceMember: [0, xoObj, "hi" ] }), "sequence dict param for constructor");
|
||||
checkThrows(() => new TestInterfaceJS(undefined, undefined, { innerDictionary: { innerObject: xoObj } }), "inner dict param for constructor");
|
||||
checkThrows(() => t.anyAttr = xoObj, "anyAttr");
|
||||
checkThrows(() => t.objectAttr = xoObj, "objAttr");
|
||||
|
@ -109,7 +109,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1036214
|
|||
checkThrows(() => t.pingPongDictionaryOrLong({ anyMember: xoObj }), "unionable dictionary");
|
||||
checkThrows(() => t.pingPongRecord({ someMember: 42, someOtherMember: {}, crossOriginMember: xoObj }), "record");
|
||||
checkThrows(() => t.objectSequenceLength([{}, {}, xoObj, {}]), "object sequence");
|
||||
checkThrows(() => t.anySequenceLength([42, 'someString', xoObj, {}]), "any sequence");
|
||||
checkThrows(() => t.anySequenceLength([42, "someString", xoObj, {}]), "any sequence");
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -9,21 +9,20 @@
|
|||
</head>
|
||||
<body>
|
||||
<script class="testbody" type="application/javascript">
|
||||
/* global TestInterfaceMaplike, TestInterfaceSetlike, TestInterfaceMaplikeObject, TestInterfaceJSMaplike */
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]}, function() {
|
||||
|
||||
base_properties = [["has", "function", 1],
|
||||
["entries", "function", 0],
|
||||
["keys", "function", 0],
|
||||
["values", "function", 0],
|
||||
["forEach", "function", 1],
|
||||
["size", "number"]];
|
||||
maplike_properties = base_properties.concat([["set", "function", 2]]);
|
||||
setlike_properties = base_properties;
|
||||
rw_properties = [["clear", "function", 0],
|
||||
["delete", "function", 1]];
|
||||
setlike_rw_properties = base_properties.concat(rw_properties).concat([["add", "function", 1]]);
|
||||
maplike_rw_properties = maplike_properties.concat(rw_properties).concat([["get", "function",1]]);
|
||||
SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]}, function() {
|
||||
var base_properties = [["has", "function", 1],
|
||||
["entries", "function", 0],
|
||||
["keys", "function", 0],
|
||||
["values", "function", 0],
|
||||
["forEach", "function", 1],
|
||||
["size", "number"]];
|
||||
var maplike_properties = base_properties.concat([["set", "function", 2]]);
|
||||
var rw_properties = [["clear", "function", 0],
|
||||
["delete", "function", 1]];
|
||||
var setlike_rw_properties = base_properties.concat(rw_properties).concat([["add", "function", 1]]);
|
||||
var maplike_rw_properties = maplike_properties.concat(rw_properties).concat([["get", "function", 1]]);
|
||||
var testExistence = function testExistence(prefix, obj, properties) {
|
||||
for (var [name, type, args] of properties) {
|
||||
// Properties are somewhere up the proto chain, hasOwnProperty won't work
|
||||
|
@ -52,11 +51,12 @@
|
|||
owner = Object.getPrototypeOf(owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var m;
|
||||
var testSet;
|
||||
var testIndex;
|
||||
|
||||
// Simple map creation and functionality test
|
||||
info("SimpleMap: Testing simple map creation and functionality");
|
||||
m = new TestInterfaceMaplike();
|
||||
|
@ -65,12 +65,12 @@
|
|||
is(m.size, 0, "SimpleMap: size should be zero");
|
||||
ok(!m.has("test"), "SimpleMap: maplike has should return false");
|
||||
is(m.get("test"), undefined, "SimpleMap: maplike get should return undefined on bogus lookup");
|
||||
m1 = m.set("test", 1);
|
||||
var m1 = m.set("test", 1);
|
||||
is(m, m1, "SimpleMap: return from set should be map object");
|
||||
is(m.size, 1, "SimpleMap: size should be 1");
|
||||
ok(m.has("test"), "SimpleMap: maplike has should return true");
|
||||
is(m.get("test"), 1, "SimpleMap: maplike get should return value entered");
|
||||
m2 = m.set("test2", 2);
|
||||
m.set("test2", 2);
|
||||
is(m.size, 2, "SimpleMap: size should be 2");
|
||||
testSet = [["test", 1], ["test2", 2]];
|
||||
testIndex = 0;
|
||||
|
@ -86,8 +86,8 @@
|
|||
is(m.get("test2"), 2, "SimpleMap: maplike get should return value entered");
|
||||
is(m.delete("test2"), true, "SimpleMap: maplike deletion should return boolean");
|
||||
is(m.size, 1, "SimpleMap: size should be 1");
|
||||
iterable = false;
|
||||
for (var e of m) {
|
||||
var iterable = false;
|
||||
for (let e of m) {
|
||||
iterable = true;
|
||||
is(e[0], "test", "SimpleMap: iterable first array element should be key");
|
||||
is(e[1], 1, "SimpleMap: iterable second array element should be value");
|
||||
|
@ -96,13 +96,13 @@
|
|||
is(m[Symbol.iterator].name, "entries", "SimpleMap: @@iterator symbol has correct name");
|
||||
is(m[Symbol.iterator], m.entries, 'SimpleMap: @@iterator is an alias for "entries"');
|
||||
ok(iterable, "SimpleMap: @@iterator symbol resolved correctly");
|
||||
for (var k of m.keys()) {
|
||||
for (let k of m.keys()) {
|
||||
is(k, "test", "SimpleMap: first keys element should be 'test'");
|
||||
}
|
||||
for (var v of m.values()) {
|
||||
for (let v of m.values()) {
|
||||
is(v, 1, "SimpleMap: first values elements should be 1");
|
||||
}
|
||||
for (var e of m.entries()) {
|
||||
for (let e of m.entries()) {
|
||||
is(e[0], "test", "SimpleMap: entries first array element should be 'test'");
|
||||
is(e[1], 1, "SimpleMap: entries second array element should be 1");
|
||||
}
|
||||
|
@ -120,7 +120,7 @@
|
|||
is(m, m1, "SimpleSet: return from set should be map object");
|
||||
is(m.size, 1, "SimpleSet: size should be 1");
|
||||
ok(m.has("test"), "SimpleSet: maplike has should return true");
|
||||
m2 = m.add("test2");
|
||||
m.add("test2");
|
||||
is(m.size, 2, "SimpleSet: size should be 2");
|
||||
testSet = ["test", "test2"];
|
||||
testIndex = 0;
|
||||
|
@ -135,7 +135,7 @@
|
|||
is(m.delete("test2"), true, "SimpleSet: maplike deletion should return true");
|
||||
is(m.size, 1, "SimpleSet: size should be 1");
|
||||
iterable = false;
|
||||
for (var e of m) {
|
||||
for (let e of m) {
|
||||
iterable = true;
|
||||
is(e, "test", "SimpleSet: iterable first array element should be key");
|
||||
}
|
||||
|
@ -143,13 +143,13 @@
|
|||
is(m[Symbol.iterator].name, "values", "SimpleSet: @@iterator symbol has correct name");
|
||||
is(m[Symbol.iterator], m.values, 'SimpleSet: @@iterator is an alias for "values"');
|
||||
ok(iterable, "SimpleSet: @@iterator symbol resolved correctly");
|
||||
for (var k of m.keys()) {
|
||||
for (let k of m.keys()) {
|
||||
is(k, "test", "SimpleSet: first keys element should be 'test'");
|
||||
}
|
||||
for (var v of m.values()) {
|
||||
for (let v of m.values()) {
|
||||
is(v, "test", "SimpleSet: first values elements should be 'test'");
|
||||
}
|
||||
for (var e of m.entries()) {
|
||||
for (let e of m.entries()) {
|
||||
is(e[0], "test", "SimpleSet: Entries first array element should be 'test'");
|
||||
is(e[1], "test", "SimpleSet: Entries second array element should be 'test'");
|
||||
}
|
||||
|
@ -166,7 +166,7 @@
|
|||
is(m.size, 1, "MapConvenience: size should be 1");
|
||||
ok(m.hasInternal("test"), "MapConvenience: maplike hasInternal should return true");
|
||||
is(m.get("test"), 1, "MapConvenience: maplike get should return value entered");
|
||||
m2 = m.setInternal("test2", 2);
|
||||
m.setInternal("test2", 2);
|
||||
is(m.size, 2, "size should be 2");
|
||||
ok(m.hasInternal("test2"), "MapConvenience: maplike hasInternal should return true");
|
||||
is(m.get("test2"), 2, "MapConvenience: maplike get should return value entered");
|
||||
|
@ -181,14 +181,14 @@
|
|||
m = new TestInterfaceMaplikeObject();
|
||||
ok(m, "ReadOnlyMapConvenience: got a TestInterfaceMaplikeObject object");
|
||||
is(m.size, 0, "ReadOnlyMapConvenience: size should be zero");
|
||||
is(m["set"], undefined, "ReadOnlyMapConvenience: readonly map, should be no set function");
|
||||
is(m["clear"], undefined, "ReadOnlyMapConvenience: readonly map, should be no clear function");
|
||||
is(m["delete"], undefined, "ReadOnlyMapConvenience: readonly map, should be no delete function");
|
||||
is(m.set, undefined, "ReadOnlyMapConvenience: readonly map, should be no set function");
|
||||
is(m.clear, undefined, "ReadOnlyMapConvenience: readonly map, should be no clear function");
|
||||
is(m.delete, undefined, "ReadOnlyMapConvenience: readonly map, should be no delete function");
|
||||
ok(!m.hasInternal("test"), "ReadOnlyMapConvenience: maplike hasInternal should return false");
|
||||
m.setInternal("test");
|
||||
is(m.size, 1, "size should be 1");
|
||||
ok(m.hasInternal("test"), "ReadOnlyMapConvenience: maplike hasInternal should return true");
|
||||
m2 = m.setInternal("test2");
|
||||
m.setInternal("test2");
|
||||
is(m.size, 2, "size should be 2");
|
||||
ok(m.hasInternal("test2"), "ReadOnlyMapConvenience: maplike hasInternal should return true");
|
||||
is(m.deleteInternal("test2"), true, "ReadOnlyMapConvenience: maplike deleteInternal should return true");
|
||||
|
@ -207,19 +207,19 @@
|
|||
is(m.size, 1, "JSMapConvenience: size should be 1");
|
||||
ok(m.has("test"), "JSMapConvenience: maplike has should return true");
|
||||
is(m.get("test"), 1, "JSMapConvenience: maplike get should return value entered");
|
||||
m2 = m.setInternal("test2", 2);
|
||||
m.setInternal("test2", 2);
|
||||
is(m.size, 2, "JSMapConvenience: size should be 2");
|
||||
ok(m.has("test2"), "JSMapConvenience: maplike has should return true");
|
||||
is(m.get("test2"), 2, "JSMapConvenience: maplike get should return value entered");
|
||||
is(m.deleteInternal("test2"), true, "JSMapConvenience: maplike deleteInternal should return true");
|
||||
is(m.size, 1, "JSMapConvenience: size should be 1");
|
||||
for (var k of m.keys()) {
|
||||
for (let k of m.keys()) {
|
||||
is(k, "test", "JSMapConvenience: first keys element should be 'test'");
|
||||
}
|
||||
for (var v of m.values()) {
|
||||
for (let v of m.values()) {
|
||||
is(v, 1, "JSMapConvenience: first values elements should be 1");
|
||||
}
|
||||
for (var e of m.entries()) {
|
||||
for (let e of m.entries()) {
|
||||
is(e[0], "test", "JSMapConvenience: entries first array element should be 'test'");
|
||||
is(e[1], 1, "JSMapConvenience: entries second array element should be 1");
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<script src=/resources/testharnessreport.js></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
/* global test, assert_throws */
|
||||
test(() => {
|
||||
assert_throws(new TypeError, () => {
|
||||
"use strict";
|
||||
|
|
|
@ -17,13 +17,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1287912
|
|||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
function test()
|
||||
{
|
||||
function test() {
|
||||
var win = document.getElementById("t").contentWindow;
|
||||
is(Object.getPrototypeOf(win.Image), win.Function.prototype, "The __proto__ of a named constructor is Function.prototype");
|
||||
is(win.Image.prototype, win.HTMLImageElement.prototype, "The prototype property of a named constructor is the interface prototype object");
|
||||
is(win.HTMLImageElement['foo'], undefined, "Should not have a property named foo on the HTMLImageElement interface object");
|
||||
is(win.Image['foo'], undefined, "Should not have a property named foo on the Image named constructor");
|
||||
is(win.HTMLImageElement.foo, undefined, "Should not have a property named foo on the HTMLImageElement interface object");
|
||||
is(win.Image.foo, undefined, "Should not have a property named foo on the Image named constructor");
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ function doTest() {
|
|||
var ctx = document.createElement("canvas").getContext("2d");
|
||||
try {
|
||||
ctx.drawImage({}, 0, 0);
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
if (e instanceof TypeError) {
|
||||
gotTypeError = true;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
<script src=/resources/testharnessreport.js></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
/* global test */
|
||||
|
||||
test(function() {
|
||||
new Worker("data:text/javascript,new XMLHttpRequest(42)");
|
||||
}, "Should not crash")
|
||||
}, "Should not crash");
|
||||
</script>
|
||||
|
|
|
@ -13,15 +13,14 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=775543
|
|||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=775543">Mozilla Bug 775543</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
<iframe id="t" src="http://example.org/tests/dom/bindings/test/file_bug775543.html" onload="test();"></iframe>
|
||||
<iframe id="t" src="http://example.org/tests/dom/bindings/test/file_bug775543.html" onload="test();"></iframe>
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
/* global XPCNativeWrapper */
|
||||
/** Test for Bug 775543 **/
|
||||
|
||||
function test()
|
||||
{
|
||||
function test() {
|
||||
var a = XPCNativeWrapper(document.getElementById("t").contentWindow.wrappedJSObject.worker);
|
||||
isnot(XPCNativeWrapper.unwrap(a), a, "XPCNativeWrapper(Worker) should be an Xray wrapper");
|
||||
a.toString();
|
||||
|
|
|
@ -19,7 +19,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=788369
|
|||
|
||||
/** Test for Bug 788369 **/
|
||||
try {
|
||||
var xhr = new(window.ActiveXObject || XMLHttpRequest)("Microsoft.XMLHTTP");
|
||||
var xhr = new (window.ActiveXObject || XMLHttpRequest)("Microsoft.XMLHTTP");
|
||||
ok(xhr instanceof XMLHttpRequest, "Should have an XHR object");
|
||||
} catch (e) {
|
||||
ok(false, "Should not throw exception when constructing: " + e);
|
||||
|
|
|
@ -12,14 +12,14 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=852846
|
|||
|
||||
/** Test for Bug 852846 **/
|
||||
var elem = document.createElement("div");
|
||||
is(elem.style.color, "", "Shouldn't have color set on HTML element")
|
||||
is(elem.style.color, "", "Shouldn't have color set on HTML element");
|
||||
elem.style = "color: green";
|
||||
is(elem.style.color, "green", "Should have color set on HTML element")
|
||||
is(elem.style.color, "green", "Should have color set on HTML element");
|
||||
|
||||
elem = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
||||
is(elem.style.color, "", "Shouldn't have color set on SVG element")
|
||||
is(elem.style.color, "", "Shouldn't have color set on SVG element");
|
||||
elem.style = "color: green";
|
||||
is(elem.style.color, "green", "Should have color set on SVG element")
|
||||
is(elem.style.color, "green", "Should have color set on SVG element");
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -13,12 +13,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=862092
|
|||
/** Test for Bug 862092 **/
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function runTest()
|
||||
{
|
||||
function runTest() {
|
||||
var frameDoc = document.getElementById("f").contentDocument;
|
||||
var a = document.createElement("select");
|
||||
a.expando = "test";
|
||||
a = frameDoc.adoptNode(a)
|
||||
a = frameDoc.adoptNode(a);
|
||||
is(a.expando, "test", "adoptNode needs to preserve expandos");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<div id="log"></div>
|
||||
<iframe srcdoc='<script>function f() { parent.callCount++; }</script>'></iframe>
|
||||
<script>
|
||||
/* global async_test, assert_equals */
|
||||
var callCount = 0;
|
||||
var t = async_test("A test of callback invocation in a no-longer-current window with a still-active document");
|
||||
window.addEventListener("load", t.step_func_done(function() {
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
/* global promise_test, promise_rejects */
|
||||
|
||||
promise_test(function(t) {
|
||||
var iterator = document.createNodeIterator(document, NodeFilter.SHOW_ALL, JSON.parse);
|
||||
return promise_rejects(t, new SyntaxError,
|
||||
|
@ -12,6 +14,6 @@ promise_test(function(t) {
|
|||
}, "Trying to use JSON.parse as filter should throw a catchable SyntaxError exception even when the filter is invoked async");
|
||||
|
||||
promise_test(function(t) {
|
||||
return promise_rejects(t, new SyntaxError, Promise.resolve('{').then(JSON.parse));
|
||||
return promise_rejects(t, new SyntaxError, Promise.resolve("{").then(JSON.parse));
|
||||
}, "Trying to use JSON.parse as a promise callback should allow the next promise to handle the resulting exception.");
|
||||
</script>
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
<div id="log"></div>
|
||||
<iframe src="http://www1.w3c-test.org/common/blank.html"></iframe>
|
||||
<script>
|
||||
async_test(function (t) {
|
||||
/* global async_test, assert_equals, assert_throws */
|
||||
|
||||
async_test(function(t) {
|
||||
window.addEventListener("load", t.step_func(
|
||||
function() {
|
||||
assert_equals(document.querySelector("iframe").contentDocument, null, "Should have a crossorigin frame");
|
||||
|
|
|
@ -84,7 +84,7 @@ function namedSetNonStrict(obj) {
|
|||
ok(threw,
|
||||
"Should throw in non-strict mode when defining named property on " + obj);
|
||||
}
|
||||
for (var obj of [ document, document.forms ]) {
|
||||
for (let obj of [ document, document.forms ]) {
|
||||
namedSetStrict(obj);
|
||||
namedSetNonStrict(obj);
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ function indexedSetNonStrict(obj) {
|
|||
ok(threw,
|
||||
"Should throw in non-strict mode when defining indexed property on " + obj);
|
||||
}
|
||||
for (var obj of [ document.forms, document.childNodes ]) {
|
||||
for (let obj of [ document.forms, document.childNodes ]) {
|
||||
indexedSetStrict(obj);
|
||||
indexedSetNonStrict(obj);
|
||||
}
|
||||
|
|
|
@ -20,8 +20,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=905493
|
|||
|
||||
/** Test for Bug 905493 **/
|
||||
|
||||
function test()
|
||||
{
|
||||
function test() {
|
||||
var doc = document.getElementById("t").contentWindow.document;
|
||||
ok(!("x" in doc), "Should have an Xray here");
|
||||
is(doc.x, undefined, "Really should have an Xray here");
|
||||
|
|
|
@ -20,8 +20,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1041731
|
|||
|
||||
/** Test for Bug 1041731 **/
|
||||
|
||||
function test()
|
||||
{
|
||||
function test() {
|
||||
var loc = document.getElementById("t").contentWindow.document.location;
|
||||
is(loc.toString, loc.toString, "Unforgeable method on the Xray should be cached");
|
||||
SimpleTest.finish();
|
||||
|
|
|
@ -23,8 +23,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=787070
|
|||
// values should contain the values that the property should have on each of
|
||||
// the objects on the prototype chain of obj. A value of undefined signals
|
||||
// that the value should not be present on that prototype.
|
||||
function checkXrayProperty(obj, name, values)
|
||||
{
|
||||
function checkXrayProperty(obj, name, values) {
|
||||
var instance = obj;
|
||||
do {
|
||||
var value = values.shift();
|
||||
|
@ -33,7 +32,7 @@ function checkXrayProperty(obj, name, values)
|
|||
is(Object.getOwnPropertyDescriptor(obj, name), undefined, "getOwnPropertyDescriptor shouldn't see \"" + name + "\" through Xrays");
|
||||
ok(!Object.keys(obj).includes(name), "Enumerating the Xray should not return \"" + name + "\"");
|
||||
ok(!Object.getOwnPropertyNames(obj).includes(name),
|
||||
`The Xray's property names should not include ${name}`)
|
||||
`The Xray's property names should not include ${name}`);
|
||||
} else {
|
||||
ok(obj.hasOwnProperty(name), "hasOwnProperty should see \"" + name + "\" through Xrays");
|
||||
var pd = Object.getOwnPropertyDescriptor(obj, name);
|
||||
|
@ -48,19 +47,17 @@ function checkXrayProperty(obj, name, values)
|
|||
ok(Object.keys(obj).indexOf("" + name) > -1, "Enumerating the Xray should return \"" + name + "\"");
|
||||
}
|
||||
ok(Object.getOwnPropertyNames(obj).indexOf("" + name) > -1,
|
||||
`The Xray's property names should include ${name}`)
|
||||
`The Xray's property names should include ${name}`);
|
||||
}
|
||||
}
|
||||
} while ((obj = Object.getPrototypeOf(obj)));
|
||||
}
|
||||
|
||||
function checkWindowXrayProperty(obj, name, windowValue, windowPrototypeValue, namedPropertiesValue, eventTargetValue)
|
||||
{
|
||||
function checkWindowXrayProperty(obj, name, windowValue, windowPrototypeValue, namedPropertiesValue, eventTargetValue) {
|
||||
checkXrayProperty(obj, name, [ windowValue, windowPrototypeValue, namedPropertiesValue, eventTargetValue ]);
|
||||
}
|
||||
|
||||
function test()
|
||||
{
|
||||
function test() {
|
||||
// Window
|
||||
var win = document.getElementById("t").contentWindow;
|
||||
var doc = document.getElementById("t").contentDocument;
|
||||
|
@ -96,6 +93,7 @@ function test()
|
|||
|
||||
// Object.prototype is at the end of the prototype chain.
|
||||
var obj = win;
|
||||
var proto;
|
||||
while ((proto = Object.getPrototypeOf(obj))) {
|
||||
obj = proto;
|
||||
}
|
||||
|
@ -109,10 +107,10 @@ function test()
|
|||
|
||||
// WebIDL interface names should be exposed.
|
||||
var waivedWin = Cu.waiveXrays(win);
|
||||
checkWindowXrayProperty(win, "Element", Cu.unwaiveXrays(waivedWin.Element))
|
||||
checkWindowXrayProperty(win, "Element", Cu.unwaiveXrays(waivedWin.Element));
|
||||
|
||||
// JS standard classes should be exposed.
|
||||
checkWindowXrayProperty(win, "Array", Cu.unwaiveXrays(waivedWin.Array))
|
||||
checkWindowXrayProperty(win, "Array", Cu.unwaiveXrays(waivedWin.Array));
|
||||
|
||||
// HTMLDocument
|
||||
// Unforgeable properties live on the instance.
|
||||
|
@ -194,24 +192,24 @@ function test()
|
|||
"includes()");
|
||||
|
||||
// Check that deleters work correctly in the [OverrideBuiltins] case.
|
||||
var elem = win.document.documentElement;
|
||||
elem = win.document.documentElement;
|
||||
var dataset = elem.dataset;
|
||||
is(dataset.foo, undefined, "Should not have a 'foo' property");
|
||||
ok(!('foo' in dataset), "Really should not have a 'foo' property");
|
||||
ok(!("foo" in dataset), "Really should not have a 'foo' property");
|
||||
is(elem.getAttribute("data-foo"), null,
|
||||
"Should not have a 'data-foo' attribute");
|
||||
ok(!elem.hasAttribute("data-foo"),
|
||||
"Really should not have a 'data-foo' attribute");
|
||||
dataset.foo = "bar";
|
||||
is(dataset.foo, "bar", "Should now have a 'foo' property");
|
||||
ok('foo' in dataset, "Really should have a 'foo' property");
|
||||
ok("foo" in dataset, "Really should have a 'foo' property");
|
||||
is(elem.getAttribute("data-foo"), "bar",
|
||||
"Should have a 'data-foo' attribute");
|
||||
ok(elem.hasAttribute("data-foo"),
|
||||
"Really should have a 'data-foo' attribute");
|
||||
delete dataset.foo;
|
||||
is(dataset.foo, undefined, "Should not have a 'foo' property again");
|
||||
ok(!('foo' in dataset), "Really should not have a 'foo' property again");
|
||||
ok(!("foo" in dataset), "Really should not have a 'foo' property again");
|
||||
is(elem.getAttribute("data-foo"), null,
|
||||
"Should not have a 'data-foo' attribute again");
|
||||
ok(!elem.hasAttribute("data-foo"),
|
||||
|
@ -220,15 +218,15 @@ function test()
|
|||
// Check that deleters work correctly in the non-[OverrideBuiltins] case.
|
||||
var storage = win.sessionStorage;
|
||||
is(storage.foo, undefined, "Should not have a 'foo' property");
|
||||
ok(!('foo' in storage), "Really should not have a 'foo' property");
|
||||
ok(!("foo" in storage), "Really should not have a 'foo' property");
|
||||
is(storage.getItem("foo"), null, "Should not have an item named 'foo'");
|
||||
storage.foo = "bar";
|
||||
is(storage.foo, "bar", "Should have a 'foo' property");
|
||||
ok('foo' in storage, "Really should have a 'foo' property");
|
||||
ok("foo" in storage, "Really should have a 'foo' property");
|
||||
is(storage.getItem("foo"), "bar", "Should have an item named 'foo'");
|
||||
delete storage.foo
|
||||
delete storage.foo;
|
||||
is(storage.foo, undefined, "Should not have a 'foo' property again");
|
||||
ok(!('foo' in storage), "Really should not have a 'foo' property again");
|
||||
ok(!("foo" in storage), "Really should not have a 'foo' property again");
|
||||
is(storage.getItem("foo"), null, "Should not have an item named 'foo' again");
|
||||
|
||||
// Non-static properties are not exposed on interface objects or instances.
|
||||
|
@ -252,9 +250,9 @@ function test()
|
|||
"Should see static property on interface objects");
|
||||
isnot(Object.getOwnPropertyNames(win.URL).indexOf("createObjectURL"), -1,
|
||||
"Should see static property on interface objects");
|
||||
is(new URL('http://example.org').createObjectURL, undefined,
|
||||
is(new URL("http://example.org").createObjectURL, undefined,
|
||||
"Shouldn't see static property on instances and prototype ojbects");
|
||||
is(Object.getOwnPropertyDescriptor(new URL('http://example.org'), "createObjectURL"), undefined,
|
||||
is(Object.getOwnPropertyDescriptor(new URL("http://example.org"), "createObjectURL"), undefined,
|
||||
"Shouldn't see static property on instances");
|
||||
is(Object.getOwnPropertyDescriptor(win.URL.prototype, "createObjectURL"), undefined,
|
||||
"Shouldn't see static property on prototype objects");
|
||||
|
@ -289,7 +287,7 @@ function test()
|
|||
"Should see constant property on prototype objects");
|
||||
|
||||
// Adopting nodes should not lose expandos.
|
||||
var elem = doc.createElement("span");
|
||||
elem = doc.createElement("span");
|
||||
elem.expando = 5;
|
||||
is(elem.expando, 5, "We just set this property");
|
||||
document.adoptNode(elem);
|
||||
|
|
|
@ -5,9 +5,10 @@
|
|||
<script src=/resources/testharnessreport.js></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
/* global test, assert_equals */
|
||||
test(function() {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("get", "foo")
|
||||
xhr.open("get", "foo");
|
||||
assert_equals(xhr.responseType, "");
|
||||
xhr.responseType = "foo";
|
||||
assert_equals(xhr.responseType, "");
|
||||
|
|
|
@ -18,37 +18,33 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1295322
|
|||
<pre id="test">
|
||||
</pre>
|
||||
<script type="application/javascript">
|
||||
|
||||
/* global TestFunctions */
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
async function runTests() {
|
||||
await SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]});
|
||||
await SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]});
|
||||
|
||||
var t = new TestFunctions();
|
||||
|
||||
try {
|
||||
t.testThrowNsresult();
|
||||
t.testThrowNsresult();
|
||||
} catch (e) {
|
||||
try {
|
||||
is(e.name, "NS_BINDING_ABORTED",
|
||||
"Should have the right exception");
|
||||
is(e.filename, location.href,
|
||||
"Should not be seeing where the exception really came from");
|
||||
} catch (e2) {
|
||||
ok(false, "Should be able to work with the exception");
|
||||
}
|
||||
try {
|
||||
is(e.name, "NS_BINDING_ABORTED", "Should have the right exception");
|
||||
is(e.filename, location.href, "Should not be seeing where the exception really came from");
|
||||
} catch (e2) {
|
||||
ok(false, "Should be able to work with the exception");
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
t.testThrowNsresultFromNative();
|
||||
t.testThrowNsresultFromNative();
|
||||
} catch (e) {
|
||||
try {
|
||||
is(e.name, "NS_ERROR_UNEXPECTED",
|
||||
"Should have the right exception");
|
||||
is(e.filename, location.href,
|
||||
"Should not be seeing where the exception really came from");
|
||||
} catch (e2) {
|
||||
ok(false, "Should be able to work with the exception");
|
||||
}
|
||||
is(e.name, "NS_ERROR_UNEXPECTED", "Should have the right exception");
|
||||
is(e.filename, location.href, "Should not be seeing where the exception really came from");
|
||||
} catch (e2) {
|
||||
ok(false, "Should be able to work with the exception");
|
||||
}
|
||||
}
|
||||
|
||||
SimpleTest.finish();
|
||||
|
|
|
@ -13,31 +13,31 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=847119
|
|||
/** Test for Bug 847119 **/
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
var domthrows = function() { xhr.open(); }
|
||||
var domthrows = function() { xhr.open(); };
|
||||
|
||||
var count = 20000;
|
||||
|
||||
|
||||
function f() {
|
||||
var k = 0;
|
||||
for (var j = 0; j < count; ++j) {
|
||||
try { domthrows(); } catch(e) { ++k; }
|
||||
try { domthrows(); } catch (e) { ++k; }
|
||||
}
|
||||
return k;
|
||||
}
|
||||
function g() { return count; }
|
||||
|
||||
is(f(), count, "Should get count exceptions");
|
||||
for (var h of [f, g]) {
|
||||
for (let h of [f, g]) {
|
||||
try { is(h(), count, "Should get count exceptions here too"); } catch (e) {}
|
||||
}
|
||||
ok(true, "We should get here");
|
||||
|
||||
var domthrows = function() { xhr.withCredentials = false; }
|
||||
domthrows = function() { xhr.withCredentials = false; };
|
||||
xhr.open("GET", "");
|
||||
xhr.send();
|
||||
|
||||
is(f(), count, "Should get count exceptions from getter");
|
||||
for (var h of [f, g]) {
|
||||
for (let h of [f, g]) {
|
||||
try { is(h(), count, "Should get count exceptions from getter here too"); } catch (e) {}
|
||||
}
|
||||
ok(true, "We should get here too");
|
||||
|
|
|
@ -14,7 +14,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=882653
|
|||
// Each test is a string to eval, the expected exception message, and the
|
||||
// test description.
|
||||
var tests = [
|
||||
[ 'document.documentElement.appendChild.call({}, new Image())',
|
||||
[ "document.documentElement.appendChild.call({}, new Image())",
|
||||
"'appendChild' called on an object that does not implement interface Node.",
|
||||
"bogus method this object" ],
|
||||
[ 'Object.getOwnPropertyDescriptor(Document.prototype, "documentElement").get.call({})',
|
||||
|
@ -23,31 +23,31 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=882653
|
|||
[ 'Object.getOwnPropertyDescriptor(Element.prototype, "innerHTML").set.call({})',
|
||||
"'set innerHTML' called on an object that does not implement interface Element.",
|
||||
"bogus setter this object" ],
|
||||
[ 'document.documentElement.appendChild(5)',
|
||||
[ "document.documentElement.appendChild(5)",
|
||||
"Argument 1 of Node.appendChild is not an object.",
|
||||
"bogus interface argument" ],
|
||||
[ 'document.documentElement.appendChild(null)',
|
||||
[ "document.documentElement.appendChild(null)",
|
||||
"Argument 1 of Node.appendChild is not an object.",
|
||||
"null interface argument" ],
|
||||
[ 'document.createTreeWalker(document).currentNode = 5',
|
||||
[ "document.createTreeWalker(document).currentNode = 5",
|
||||
"Value being assigned to TreeWalker.currentNode is not an object.",
|
||||
"interface setter call" ],
|
||||
[ 'document.documentElement.appendChild({})',
|
||||
[ "document.documentElement.appendChild({})",
|
||||
"Argument 1 of Node.appendChild does not implement interface Node.",
|
||||
"wrong interface argument" ],
|
||||
[ 'document.createTreeWalker(document).currentNode = {}',
|
||||
[ "document.createTreeWalker(document).currentNode = {}",
|
||||
"Value being assigned to TreeWalker.currentNode does not implement interface Node.",
|
||||
"wrong interface setter call" ],
|
||||
[ 'document.createElement("canvas").getContext("2d").fill("bogus")',
|
||||
"Argument 1 of CanvasRenderingContext2D.fill 'bogus' is not a valid value for enumeration CanvasWindingRule.",
|
||||
"bogus enum value" ],
|
||||
[ 'document.createTreeWalker(document, 0xFFFFFFFF, { acceptNode: 5 }).nextNode()',
|
||||
[ "document.createTreeWalker(document, 0xFFFFFFFF, { acceptNode: 5 }).nextNode()",
|
||||
"Property 'acceptNode' is not callable.",
|
||||
"non-callable callback interface operation property" ],
|
||||
[ '(new TextDecoder).decode(new Uint8Array(), 5)',
|
||||
[ "(new TextDecoder).decode(new Uint8Array(), 5)",
|
||||
"Argument 2 of TextDecoder.decode can't be converted to a dictionary.",
|
||||
"primitive passed for a dictionary" ],
|
||||
[ 'URL.createObjectURL(null)',
|
||||
[ "URL.createObjectURL(null)",
|
||||
"Argument 1 is not valid for any of the 1-argument overloads of URL.createObjectURL.",
|
||||
"overload resolution failure" ],
|
||||
[ 'document.createElement("select").add({})',
|
||||
|
@ -55,12 +55,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=882653
|
|||
"invalid value passed for union" ],
|
||||
[ 'document.createElement("canvas").getContext("2d").createLinearGradient(0, 1, 0, 1).addColorStop(NaN, "")',
|
||||
"Argument 1 of CanvasGradient.addColorStop is not a finite floating-point value.",
|
||||
"invalid float" ]
|
||||
"invalid float" ],
|
||||
];
|
||||
|
||||
for (var i = 0; i < tests.length; ++i) {
|
||||
msg = "Correct exception should be thrown for " + tests[i][2];
|
||||
var msg = "Correct exception should be thrown for " + tests[i][2];
|
||||
try {
|
||||
// eslint-disable-next-line no-eval
|
||||
eval(tests[i][0]);
|
||||
ok(false, msg);
|
||||
} catch (e) {
|
||||
|
|
|
@ -9,7 +9,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1107592
|
|||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript">
|
||||
|
||||
/* global TestInterfaceJS */
|
||||
/** Test for Bug 1107592 **/
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
@ -89,7 +89,7 @@ ${asyncFrame}`,
|
|||
}
|
||||
|
||||
try {
|
||||
t.testThrowCallbackError(function() { Array.indexOf() });
|
||||
t.testThrowCallbackError(function() { Array.indexOf(); });
|
||||
} catch (e) {
|
||||
ok(e instanceof TypeError, "Should have a TypeError here (3)");
|
||||
ok(!(e instanceof DOMException), "Should not have DOMException here (3)");
|
||||
|
@ -150,7 +150,7 @@ ${asyncFrame}`,
|
|||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]},
|
||||
SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]},
|
||||
doTest);
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -13,7 +13,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=725907
|
|||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=725907">Mozilla Bug 725907</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
|
||||
</div>
|
||||
<div id="basket">
|
||||
<span id="egg0"></span>
|
||||
|
@ -25,23 +25,23 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=725907
|
|||
|
||||
/** Test for Bug 725907 **/
|
||||
|
||||
|
||||
function runTestsForDocument(document, msgSuffix) {
|
||||
function is(a, b, msg) { SimpleTest.is(a, b, msg + msgSuffix); }
|
||||
function isnot(a, b, msg) { SimpleTest.isnot(a, b, msg + msgSuffix); }
|
||||
|
||||
var basket = document.getElementById("basket");
|
||||
var egg3 = document.createElement("span");
|
||||
egg3.id = "egg3";
|
||||
|
||||
var log = '';
|
||||
for (var x of basket.childNodes) {
|
||||
var log = "";
|
||||
for (let x of basket.childNodes) {
|
||||
if (x.nodeType != x.TEXT_NODE)
|
||||
log += x.id + ";";
|
||||
}
|
||||
is(log, "egg0;egg1;egg2;", "'for (x of div.childNodes)' should iterate over child nodes");
|
||||
|
||||
log = '';
|
||||
for (var x of basket.childNodes) {
|
||||
log = "";
|
||||
for (let x of basket.childNodes) {
|
||||
if (x.nodeType != x.TEXT_NODE) {
|
||||
log += x.id + ";";
|
||||
if (x.id == "egg1")
|
||||
|
@ -50,19 +50,20 @@ function runTestsForDocument(document, msgSuffix) {
|
|||
}
|
||||
is(log, "egg0;egg1;egg2;egg3;", "'for (x of div.childNodes)' should see elements added during iteration");
|
||||
|
||||
log = '';
|
||||
log = "";
|
||||
basket.appendChild(document.createTextNode("some text"));
|
||||
for (var x of basket.children)
|
||||
for (let x of basket.children)
|
||||
log += x.id + ";";
|
||||
is(log, "egg0;egg1;egg2;egg3;", "'for (x of div.children)' should iterate over child elements");
|
||||
|
||||
var count = 0;
|
||||
for (var x of document.getElementsByClassName("hazardous-materials"))
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
for (let x of document.getElementsByClassName("hazardous-materials"))
|
||||
count++;
|
||||
is(count, 0, "'for (x of emptyNodeList)' loop should run zero times");
|
||||
|
||||
var log = '';
|
||||
for (var x of document.querySelectorAll("span"))
|
||||
log = "";
|
||||
for (let x of document.querySelectorAll("span"))
|
||||
log += x.id + ";";
|
||||
is(log, "egg0;egg1;duckling1;egg2;egg3;", "for-of loop should work with a querySelectorAll() NodeList");
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
todo(false, "WebGL not supported");
|
||||
return;
|
||||
}
|
||||
var error = gl.getError()
|
||||
var error = gl.getError();
|
||||
|
||||
// on the b2g emulator we get GL_INVALID_FRAMEBUFFER_OPERATION
|
||||
if (error == 0x0506) // GL_INVALID_FRAMEBUFFER_OPERATION
|
||||
|
|
|
@ -26,8 +26,7 @@ try {
|
|||
is(eventTargetToString, nativeToString,
|
||||
"Stringifying a DOM interface object should return the same string" +
|
||||
"as stringifying a native function.");
|
||||
}
|
||||
catch (e) {
|
||||
} catch (e) {
|
||||
ok(false, "Stringifying a DOM interface object shouldn't throw.");
|
||||
}
|
||||
|
||||
|
@ -36,8 +35,7 @@ try {
|
|||
is(eventTargetToString, nativeToString,
|
||||
"Stringifying a DOM interface object via Function.prototype.toString " +
|
||||
"should return the same string as stringifying a native function.");
|
||||
}
|
||||
catch (e) {
|
||||
} catch (e) {
|
||||
ok(false, "Stringifying a DOM interface object shouldn't throw.");
|
||||
}
|
||||
|
||||
|
|
|
@ -9,13 +9,14 @@
|
|||
</head>
|
||||
<body>
|
||||
<script class="testbody" type="application/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]}, function() {
|
||||
/* global TestInterfaceIterableSingle, TestInterfaceIterableDouble, TestInterfaceIterableDoubleUnion */
|
||||
|
||||
base_properties = [["entries", "function", 0],
|
||||
["keys", "function", 0],
|
||||
["values", "function", 0],
|
||||
["forEach", "function", 1]]
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]}, function() {
|
||||
var base_properties = [["entries", "function", 0],
|
||||
["keys", "function", 0],
|
||||
["values", "function", 0],
|
||||
["forEach", "function", 1]];
|
||||
var testExistence = function testExistence(prefix, obj, properties) {
|
||||
for (var [name, type, args] of properties) {
|
||||
// Properties are somewhere up the proto chain, hasOwnProperty won't work
|
||||
|
@ -44,10 +45,9 @@
|
|||
owner = Object.getPrototypeOf(owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var itr;
|
||||
// Simple single type iterable creation and functionality test
|
||||
info("IterableSingle: Testing simple iterable creation and functionality");
|
||||
itr = new TestInterfaceIterableSingle();
|
||||
testExistence("IterableSingle: ", itr, base_properties);
|
||||
|
@ -67,10 +67,10 @@
|
|||
var key_itr = itr.keys();
|
||||
var value_itr = itr.values();
|
||||
var entries_itr = itr.entries();
|
||||
for (var i = 0; i < 3; ++i) {
|
||||
var key = key_itr.next();
|
||||
var value = value_itr.next();
|
||||
var entry = entries_itr.next();
|
||||
for (let i = 0; i < 3; ++i) {
|
||||
let key = key_itr.next();
|
||||
let value = value_itr.next();
|
||||
let entry = entries_itr.next();
|
||||
is(key.value, i, "IterableSingle: Key iterator value should be " + i);
|
||||
is(key.value, keys[i],
|
||||
"IterableSingle: Key iterator value should match destructuring " + i);
|
||||
|
@ -87,10 +87,10 @@
|
|||
|
||||
var callsToForEachCallback = 0;
|
||||
var thisArg = {};
|
||||
itr.forEach(function(value, index, obj) {
|
||||
itr.forEach(function(value1, index, obj) {
|
||||
is(index, callsToForEachCallback,
|
||||
`IterableSingle: Should have the right index at ${callsToForEachCallback} calls to forEach callback`);
|
||||
is(value, values[index],
|
||||
is(value1, values[index],
|
||||
`IterableSingle: Should have the right value at ${callsToForEachCallback} calls to forEach callback`);
|
||||
is(this, thisArg,
|
||||
"IterableSingle: Should have the right this value for forEach callback");
|
||||
|
@ -101,9 +101,9 @@
|
|||
is(callsToForEachCallback, 3,
|
||||
"IterableSingle: Should have right total number of calls to forEach callback");
|
||||
|
||||
var key = key_itr.next();
|
||||
var value = value_itr.next();
|
||||
var entry = entries_itr.next();
|
||||
let key = key_itr.next();
|
||||
let value = value_itr.next();
|
||||
let entry = entries_itr.next();
|
||||
is(key.value, undefined, "IterableSingle: Key iterator value should be undefined");
|
||||
is(key.done, true, "IterableSingle: Key iterator done should be true");
|
||||
is(value.value, undefined, "IterableSingle: Value iterator value should be undefined");
|
||||
|
@ -120,17 +120,17 @@
|
|||
testExistence("IterableDouble: ", itr, base_properties);
|
||||
is(itr.entries, itr[Symbol.iterator],
|
||||
"IterableDouble: Should be using @@iterator for 'entries'");
|
||||
var elements = [["a", "b"], ["c", "d"], ["e", "f"]]
|
||||
var keys = [...itr.keys()];
|
||||
var values = [...itr.values()];
|
||||
var entries = [...itr.entries()];
|
||||
var key_itr = itr.keys();
|
||||
var value_itr = itr.values();
|
||||
var entries_itr = itr.entries();
|
||||
for (var i = 0; i < 3; ++i) {
|
||||
var key = key_itr.next();
|
||||
var value = value_itr.next();
|
||||
var entry = entries_itr.next();
|
||||
var elements = [["a", "b"], ["c", "d"], ["e", "f"]];
|
||||
keys = [...itr.keys()];
|
||||
values = [...itr.values()];
|
||||
entries = [...itr.entries()];
|
||||
key_itr = itr.keys();
|
||||
value_itr = itr.values();
|
||||
entries_itr = itr.entries();
|
||||
for (let i = 0; i < 3; ++i) {
|
||||
key = key_itr.next();
|
||||
value = value_itr.next();
|
||||
entry = entries_itr.next();
|
||||
is(key.value, elements[i][0], "IterableDouble: Key iterator value should be " + elements[i][0]);
|
||||
is(key.value, keys[i],
|
||||
"IterableDouble: Key iterator value should match destructuring " + i);
|
||||
|
@ -147,10 +147,10 @@
|
|||
|
||||
callsToForEachCallback = 0;
|
||||
thisArg = {};
|
||||
itr.forEach(function(value, key, obj) {
|
||||
is(key, keys[callsToForEachCallback],
|
||||
itr.forEach(function(value1, key1, obj) {
|
||||
is(key1, keys[callsToForEachCallback],
|
||||
`IterableDouble: Should have the right key at ${callsToForEachCallback} calls to forEach callback`);
|
||||
is(value, values[callsToForEachCallback],
|
||||
is(value1, values[callsToForEachCallback],
|
||||
`IterableDouble: Should have the right value at ${callsToForEachCallback} calls to forEach callback`);
|
||||
is(this, thisArg,
|
||||
"IterableDouble: Should have the right this value for forEach callback");
|
||||
|
@ -161,9 +161,9 @@
|
|||
is(callsToForEachCallback, 3,
|
||||
"IterableDouble: Should have right total number of calls to forEach callback");
|
||||
|
||||
var key = key_itr.next();
|
||||
var value = value_itr.next();
|
||||
var entry = entries_itr.next()
|
||||
key = key_itr.next();
|
||||
value = value_itr.next();
|
||||
entry = entries_itr.next();
|
||||
is(key.value, undefined, "IterableDouble: Key iterator value should be undefined");
|
||||
is(key.done, true, "IterableDouble: Key iterator done should be true");
|
||||
is(value.value, undefined, "IterableDouble: Value iterator value should be undefined");
|
||||
|
@ -180,17 +180,17 @@
|
|||
testExistence("IterableDoubleUnion: ", itr, base_properties);
|
||||
is(itr.entries, itr[Symbol.iterator],
|
||||
"IterableDoubleUnion: Should be using @@iterator for 'entries'");
|
||||
var elements = [["long", 1], ["string", "a"]]
|
||||
var keys = [...itr.keys()];
|
||||
var values = [...itr.values()];
|
||||
var entries = [...itr.entries()];
|
||||
var key_itr = itr.keys();
|
||||
var value_itr = itr.values();
|
||||
var entries_itr = itr.entries();
|
||||
for (var i = 0; i < elements.length; ++i) {
|
||||
var key = key_itr.next();
|
||||
var value = value_itr.next();
|
||||
var entry = entries_itr.next();
|
||||
elements = [["long", 1], ["string", "a"]];
|
||||
keys = [...itr.keys()];
|
||||
values = [...itr.values()];
|
||||
entries = [...itr.entries()];
|
||||
key_itr = itr.keys();
|
||||
value_itr = itr.values();
|
||||
entries_itr = itr.entries();
|
||||
for (let i = 0; i < elements.length; ++i) {
|
||||
key = key_itr.next();
|
||||
value = value_itr.next();
|
||||
entry = entries_itr.next();
|
||||
is(key.value, elements[i][0], "IterableDoubleUnion: Key iterator value should be " + elements[i][0]);
|
||||
is(key.value, keys[i],
|
||||
"IterableDoubleUnion: Key iterator value should match destructuring " + i);
|
||||
|
@ -207,10 +207,10 @@
|
|||
|
||||
callsToForEachCallback = 0;
|
||||
thisArg = {};
|
||||
itr.forEach(function(value, key, obj) {
|
||||
is(key, keys[callsToForEachCallback],
|
||||
itr.forEach(function(value1, key1, obj) {
|
||||
is(key1, keys[callsToForEachCallback],
|
||||
`IterableDoubleUnion: Should have the right key at ${callsToForEachCallback} calls to forEach callback`);
|
||||
is(value, values[callsToForEachCallback],
|
||||
is(value1, values[callsToForEachCallback],
|
||||
`IterableDoubleUnion: Should have the right value at ${callsToForEachCallback} calls to forEach callback`);
|
||||
is(this, thisArg,
|
||||
"IterableDoubleUnion: Should have the right this value for forEach callback");
|
||||
|
@ -221,9 +221,9 @@
|
|||
is(callsToForEachCallback, 2,
|
||||
"IterableDoubleUnion: Should have right total number of calls to forEach callback");
|
||||
|
||||
var key = key_itr.next();
|
||||
var value = value_itr.next();
|
||||
var entry = entries_itr.next()
|
||||
key = key_itr.next();
|
||||
value = value_itr.next();
|
||||
entry = entries_itr.next();
|
||||
is(key.value, undefined, "IterableDoubleUnion: Key iterator value should be undefined");
|
||||
is(key.done, true, "IterableDoubleUnion: Key iterator done should be true");
|
||||
is(value.value, undefined, "IterableDoubleUnion: Value iterator value should be undefined");
|
||||
|
|
|
@ -19,6 +19,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1464374-->
|
|||
|
||||
<iframe></iframe>
|
||||
<script type="application/javascript">
|
||||
/* global TestInterfaceJS */
|
||||
/** Test for Bug 1464374 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
|
@ -28,14 +29,14 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1464374-->
|
|||
var ex;
|
||||
try {
|
||||
TestInterfaceJS.prototype.testThrowTypeError.call(obj);
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
ex = e;
|
||||
}
|
||||
ok(ex, "Should have an exception");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]},
|
||||
SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]},
|
||||
doTest);
|
||||
</script>
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1186696
|
|||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript">
|
||||
|
||||
/* global TestInterfaceJS */
|
||||
/** Test for Bug 1186696 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
|
@ -31,7 +31,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1186696
|
|||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]},
|
||||
SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]},
|
||||
doTest);
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<script src=/resources/testharnessreport.js></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
/* global test, assert_equals */
|
||||
function noop1() { }
|
||||
function noop2() { }
|
||||
|
||||
|
|
|
@ -20,9 +20,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=462428
|
|||
/** Test for Bug 462428 **/
|
||||
var x = new XMLHttpRequest;
|
||||
x.open("GET", "");
|
||||
var getter = x.__lookupGetter__('readyState');
|
||||
var getter = x.__lookupGetter__("readyState");
|
||||
ok(getter !== undefined, "But able to look it up the normal way");
|
||||
ok(!x.hasOwnProperty('readyState'), "property should still be on the prototype");
|
||||
ok(!x.hasOwnProperty("readyState"), "property should still be on the prototype");
|
||||
|
||||
var sawProp = false;
|
||||
for (var i in x) {
|
||||
|
@ -35,11 +35,11 @@ ok(sawProp, "property should be enumerable");
|
|||
|
||||
is(getter.call(x), 1, "the getter actually works");
|
||||
|
||||
Object.getPrototypeOf(x).__defineSetter__('readyState', function() {});
|
||||
Object.getPrototypeOf(x).__defineSetter__("readyState", function() {});
|
||||
is(getter.call(x), 1, "the getter works after defineSetter");
|
||||
|
||||
is(x.responseType, "", "Should have correct responseType up front");
|
||||
var setter = x.__lookupSetter__('responseType');
|
||||
var setter = x.__lookupSetter__("responseType");
|
||||
setter.call(x, "document");
|
||||
is(x.responseType, "document", "the setter is bound correctly");
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ is($("content").dataset["1"], "foo",
|
|||
"Indexed props as strings should work like named on dataset");
|
||||
is($("content").dataset.bar, "baz",
|
||||
"Named props should work on dataset");
|
||||
is($("content").dataset['bar'], "baz",
|
||||
is($("content").dataset.bar, "baz",
|
||||
"Named props as strings should work on dataset");
|
||||
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
/* global test, assert_equals, assert_true, assert_false, assert_not_equals */
|
||||
test(function() {
|
||||
var list = document.getElementsByTagName("div");
|
||||
var desc = Object.getOwnPropertyDescriptor(list, "0");
|
||||
|
@ -16,7 +17,7 @@ test(function() {
|
|||
}, "Correct getOwnPropertyDescriptor behavior");
|
||||
test(function() {
|
||||
var list = document.getElementsByTagName("div");
|
||||
props = [];
|
||||
var props = [];
|
||||
for (var prop in list) {
|
||||
props.push(prop);
|
||||
}
|
||||
|
@ -25,13 +26,13 @@ test(function() {
|
|||
}, "Correct enumeration behavior");
|
||||
test(function() {
|
||||
var list = document.getElementsByTagName("div");
|
||||
props = Object.keys(list)
|
||||
var props = Object.keys(list);
|
||||
assert_not_equals(props.indexOf("0"), -1, "Keys should contain '0'");
|
||||
assert_equals(props.indexOf("log"), -1, "Keys should not contain 'log'");
|
||||
}, "Correct keys() behavior");
|
||||
test(function() {
|
||||
var list = document.getElementsByTagName("div");
|
||||
props = Object.getOwnPropertyNames(list)
|
||||
var props = Object.getOwnPropertyNames(list);
|
||||
assert_not_equals(props.indexOf("0"), -1,
|
||||
"own prop names should contain '0'");
|
||||
assert_not_equals(props.indexOf("log"), -1,
|
||||
|
|
|
@ -13,22 +13,21 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=603201
|
|||
/** Test for Bug 603201 **/
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function runTest()
|
||||
{
|
||||
function runTest() {
|
||||
var nodes = document.body.childNodes;
|
||||
|
||||
Object.setPrototypeOf(Number.prototype, nodes);
|
||||
|
||||
Object.defineProperty(nodes, "getter", {get: function() {
|
||||
"use strict";
|
||||
is(this, 1);
|
||||
return "getter";
|
||||
}});
|
||||
Object.defineProperty(Object.getPrototypeOf(nodes), "getter2", {get: function() {
|
||||
"use strict";
|
||||
is(this, 1);
|
||||
return "getter2";
|
||||
}});
|
||||
Object.defineProperty(nodes, "getter", {get() {
|
||||
"use strict";
|
||||
is(this, 1);
|
||||
return "getter";
|
||||
}});
|
||||
Object.defineProperty(Object.getPrototypeOf(nodes), "getter2", {get() {
|
||||
"use strict";
|
||||
is(this, 1);
|
||||
return "getter2";
|
||||
}});
|
||||
|
||||
var number = 1;
|
||||
is(number.getter, "getter");
|
||||
|
|
|
@ -9,7 +9,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1107592
|
|||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript">
|
||||
|
||||
/* global TestInterfaceJS, thereIsNoSuchContentFunction1, thereIsNoSuchContentFunction2, thereIsNoSuchContentFunction3 */
|
||||
/** Test for Bug 1107592 **/
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
@ -87,13 +87,13 @@ doTest@${ourFile}:56:9
|
|||
` +
|
||||
parentFrame) : "")),
|
||||
t.testPromiseWithThrowingContentThenable({
|
||||
then: function() { thereIsNoSuchContentFunction3(); }
|
||||
then() { thereIsNoSuchContentFunction3(); },
|
||||
}).then(
|
||||
ensurePromiseFail.bind(null, 6),
|
||||
checkExn.bind(null, 90, "ReferenceError",
|
||||
"thereIsNoSuchContentFunction3 is not defined",
|
||||
undefined, ourFile, 6,
|
||||
`then@${ourFile}:90:32
|
||||
`then@${ourFile}:90:22
|
||||
` + (asyncStack ? `Async*doTest@${ourFile}:89:9\n` + parentFrame : ""))),
|
||||
t.testPromiseWithDOMExceptionThrowingPromiseInit().then(
|
||||
ensurePromiseFail.bind(null, 7),
|
||||
|
@ -122,12 +122,12 @@ doTest@${ourFile}:56:9
|
|||
parentFrame : ""))),
|
||||
]).then(SimpleTest.finish,
|
||||
function(err) {
|
||||
ok(false, "One of our catch statements totally failed with err" + err + ', stack: ' + (err ? err.stack : ''));
|
||||
ok(false, "One of our catch statements totally failed with err" + err + ", stack: " + (err ? err.stack : ""));
|
||||
SimpleTest.finish();
|
||||
});
|
||||
}
|
||||
|
||||
SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]},
|
||||
SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]},
|
||||
doTest);
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -20,8 +20,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1021066
|
|||
|
||||
/** Test for Bug 1021066 **/
|
||||
|
||||
function test()
|
||||
{
|
||||
function test() {
|
||||
"use strict"; // So we'll get exceptions on sets
|
||||
var doc = document.getElementById("t").contentWindow.document;
|
||||
ok(!("x" in doc), "Should have an Xray here");
|
||||
|
@ -78,13 +77,13 @@ function test()
|
|||
|
||||
// Test non-overridebuiltins binding with named setter
|
||||
var s = doc.defaultView.localStorage;
|
||||
s["test_proxies_via_xray"] = "bar";
|
||||
s.test_proxies_via_xray = "bar";
|
||||
// Check that this actually got passed on to the underlying object.
|
||||
is(s.wrappedJSObject["test_proxies_via_xray"], "bar",
|
||||
is(s.wrappedJSObject.test_proxies_via_xray, "bar",
|
||||
"Set should get forwarded to the underlying object without overridebuiltins");
|
||||
s["test_proxies_via_xray"] = "baz";
|
||||
s.test_proxies_via_xray = "baz";
|
||||
// Check that this actually got passed on to the underlying object.
|
||||
is(s.wrappedJSObject["test_proxies_via_xray"], "baz",
|
||||
is(s.wrappedJSObject.test_proxies_via_xray, "baz",
|
||||
"Set should get forwarded to the underlying object again without overridebuiltins");
|
||||
|
||||
SimpleTest.finish();
|
||||
|
|
|
@ -35,12 +35,12 @@ function getPropTests(obj) {
|
|||
// Now change it to a scripted getter/setter.
|
||||
var count = 0;
|
||||
var getterSetterVal = 0;
|
||||
Object.defineProperty(obj, "foo", {configurable: true, get: function() {
|
||||
Object.defineProperty(obj, "foo", {configurable: true, get() {
|
||||
is(this, obj, "Getter should have the proxy as |this|");
|
||||
is(arguments.length, 0, "Shouldn't pass arguments to getters");
|
||||
count++;
|
||||
return getterSetterVal;
|
||||
}, set: function(v) {
|
||||
}, set(v) {
|
||||
is(this, obj, "Setter should have the proxy as |this|");
|
||||
is(arguments.length, 1, "Should pass 1 argument to setters");
|
||||
getterSetterVal = v;
|
||||
|
@ -60,8 +60,8 @@ function getElemTests(obj) {
|
|||
var count = 0, getterSetterVal = 0;
|
||||
obj.elem1 = 1;
|
||||
Object.defineProperty(obj, "elem2", {
|
||||
get: function() { count++; return getterSetterVal; },
|
||||
set: function(v) { getterSetterVal = v; count++; }
|
||||
get() { count++; return getterSetterVal; },
|
||||
set(v) { getterSetterVal = v; count++; },
|
||||
});
|
||||
for (var i = 0; i < iterations; i++) {
|
||||
var prop = ((i & 1) == 0) ? "elem1" : "elem2";
|
||||
|
|
|
@ -9,10 +9,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1048659
|
|||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript">
|
||||
|
||||
/* global TestInterfaceJS */
|
||||
/** Test for returning unions from JS-implemented WebIDL. **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]}, go);
|
||||
SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]}, go);
|
||||
|
||||
function go() {
|
||||
var t = new TestInterfaceJS();
|
||||
|
|
|
@ -9,10 +9,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1066432
|
|||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript">
|
||||
|
||||
/* global TestInterfaceJS */
|
||||
/** Test for Bug 1066432 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]}, function() {
|
||||
SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]}, function() {
|
||||
var testInterfaceJS = new TestInterfaceJS();
|
||||
ok(testInterfaceJS, "got a TestInterfaceJS object");
|
||||
|
||||
|
@ -20,7 +20,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1066432
|
|||
|
||||
try {
|
||||
testInterfaceJS.testSequenceOverload(nonIterableObject);
|
||||
ok(false, "Should have thrown in the overload case"); // see long comment above!
|
||||
ok(false, "Should have thrown in the overload case"); // see long comment above!
|
||||
} catch (e) {
|
||||
is(e.name, "TypeError", "Should get a TypeError for the overload case");
|
||||
ok(e.message.includes("not iterable"),
|
||||
|
|
|
@ -28,19 +28,19 @@ function doTest() {
|
|||
}
|
||||
var setterCalled = false;
|
||||
|
||||
extLength = gl.getSupportedExtensions().length;
|
||||
var extLength = gl.getSupportedExtensions().length;
|
||||
ok(extLength > 0,
|
||||
"This test won't work right if we have no supported extensions");
|
||||
|
||||
Object.defineProperty(Array.prototype, "0",
|
||||
{
|
||||
set: function(val) {
|
||||
set(val) {
|
||||
setterCalled = true;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
// Test that our property got defined correctly
|
||||
var arr = []
|
||||
var arr = [];
|
||||
arr[0] = 5;
|
||||
is(setterCalled, true, "Setter should be called when setting prop on array");
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1334537
|
|||
var asShortAString = t.getStringDataAsAString(substringLength);
|
||||
var asAString = t.getStringDataAsAString();
|
||||
|
||||
is(asShortAString, shortTestString, "Short DOMString should be short");
|
||||
is(asShortDOMString, shortTestString, "Short DOMString should be short");
|
||||
is(asFullDOMString, testString, "Full DOMString should be test string");
|
||||
is(asShortAString, shortTestString, "Short AString should be short");
|
||||
is(asAString, testString, "Full AString should be test string");
|
||||
|
@ -42,7 +42,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1334537
|
|||
}
|
||||
|
||||
addLoadEvent(function() {
|
||||
SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]},
|
||||
SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]},
|
||||
go);
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -5,22 +5,25 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
/* global test, assert_true */
|
||||
test(function() {
|
||||
function test(root) {
|
||||
var threw = false;
|
||||
try {
|
||||
root.querySelectorAll("");
|
||||
} catch(e){ threw = true; };
|
||||
} catch (e) { threw = true; }
|
||||
// Hot loop to make sure the JIT heuristics ion-compile this function even
|
||||
// though it's throwing exceptions (which would normally make us back off
|
||||
// of ion compilation).
|
||||
for (var i=0; i<1500; i++) {}
|
||||
for (var i = 0; i < 1500; i++) {
|
||||
// empty
|
||||
}
|
||||
return threw;
|
||||
}
|
||||
|
||||
var threw = false;
|
||||
var el = document.createElement("div");
|
||||
for (var i=0; i<200; i++)
|
||||
for (var i = 0; i < 200; i++)
|
||||
threw = test(el);
|
||||
assert_true(threw);
|
||||
}, "Shouldn't optimize away throwing functions");
|
||||
|
|
|
@ -18,11 +18,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1465602
|
|||
<pre id="test">
|
||||
</pre>
|
||||
<script type="application/javascript">
|
||||
|
||||
/* global TestFunctions */
|
||||
/** Test for Bug 1465602 **/
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]}, go);
|
||||
SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]}, go);
|
||||
|
||||
function go() {
|
||||
var ourObj = new TestFunctions();
|
||||
|
|
|
@ -14,7 +14,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=952365
|
|||
|
||||
var onvolumechange;
|
||||
var x = {};
|
||||
|
||||
|
||||
(function() {
|
||||
onvolumechange = x;
|
||||
is(onvolumechange, x,
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<div id="log"></div>
|
||||
<img name="location">
|
||||
<script>
|
||||
/* global test, assert_equals */
|
||||
test(function() {
|
||||
assert_equals(document.location, window.location,
|
||||
'The <img name="location"> should not override the location getter');
|
||||
|
|
|
@ -9,8 +9,10 @@
|
|||
</head>
|
||||
<body>
|
||||
<script class="testbody" type="application/javascript">
|
||||
/* global TestInterfaceJS */
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]}, function() {
|
||||
SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]}, function() {
|
||||
var testInterfaceJS = new TestInterfaceJS();
|
||||
ok(testInterfaceJS, "got a TestInterfaceJS object");
|
||||
// For expected values, see algorithm definition here:
|
||||
|
@ -29,7 +31,7 @@ SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]}, functio
|
|||
{ string: "Missing high surrogate with trailer: \udf0e!!",
|
||||
expected: "Missing high surrogate with trailer: \ufffd!!" },
|
||||
{ string: "U+2070E after malformed: \udf0e\ud841\udf0e",
|
||||
expected: "U+2070E after malformed: \ufffd\ud841\udf0e" }
|
||||
expected: "U+2070E after malformed: \ufffd\ud841\udf0e" },
|
||||
];
|
||||
testList.forEach(function(test) {
|
||||
is(testInterfaceJS.convertSVS(test.string), test.expected, "Convert '" + test.string + "'");
|
||||
|
|
|
@ -40,10 +40,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1127206
|
|||
SimpleTest.finish();
|
||||
} else {
|
||||
is(e.data, expectedResults[curIndex],
|
||||
"Message " + (curIndex+1) + " should be correct");
|
||||
"Message " + (curIndex + 1) + " should be correct");
|
||||
++curIndex;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -5243,13 +5243,7 @@ void EventStateManager::UpdateAncestorState(nsIContent* aStartNode,
|
|||
|
||||
bool EventStateManager::SetContentState(nsIContent* aContent,
|
||||
EventStates aState) {
|
||||
// We manage 4 states here: ACTIVE, HOVER, DRAGOVER, URLTARGET
|
||||
// The input must be exactly one of them.
|
||||
MOZ_ASSERT(aState == NS_EVENT_STATE_ACTIVE ||
|
||||
aState == NS_EVENT_STATE_HOVER ||
|
||||
aState == NS_EVENT_STATE_DRAGOVER ||
|
||||
aState == NS_EVENT_STATE_URLTARGET,
|
||||
"Unexpected state");
|
||||
MOZ_ASSERT(ManagesState(aState), "Unexpected state");
|
||||
|
||||
nsCOMPtr<nsIContent> notifyContent1;
|
||||
nsCOMPtr<nsIContent> notifyContent2;
|
||||
|
|
|
@ -131,6 +131,14 @@ class EventStateManager : public nsSupportsWeakReference, public nsIObserver {
|
|||
nsIFrame* GetEventTarget();
|
||||
already_AddRefed<nsIContent> GetEventTargetContent(WidgetEvent* aEvent);
|
||||
|
||||
// We manage 4 states here: ACTIVE, HOVER, DRAGOVER, URLTARGET
|
||||
static bool ManagesState(EventStates aState) {
|
||||
return aState == NS_EVENT_STATE_ACTIVE ||
|
||||
aState == NS_EVENT_STATE_HOVER ||
|
||||
aState == NS_EVENT_STATE_DRAGOVER ||
|
||||
aState == NS_EVENT_STATE_URLTARGET;
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify that the given NS_EVENT_STATE_* bit has changed for this content.
|
||||
* @param aContent Content which has changed states
|
||||
|
|
|
@ -1345,10 +1345,8 @@ nsresult nsTextEditorState::PrepareEditor(const nsAString* aValue) {
|
|||
// already does the relevant security checks.
|
||||
AutoNoJSAPI nojsapi;
|
||||
|
||||
RefPtr<Element> rootElement = GetRootNode();
|
||||
RefPtr<nsTextInputSelectionImpl> selectionController = mSelCon;
|
||||
rv = newTextEditor->Init(*doc, rootElement, selectionController,
|
||||
editorFlags, defaultValue);
|
||||
rv = newTextEditor->Init(*doc, GetRootNode(), mSelCon, editorFlags,
|
||||
defaultValue);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
|
|
|
@ -591,7 +591,9 @@ NS_INTERFACE_MAP_END
|
|||
mozilla::ipc::IPCResult ContentChild::RecvSetXPCOMProcessAttributes(
|
||||
const XPCOMInitData& aXPCOMInit, const StructuredCloneData& aInitialData,
|
||||
nsTArray<LookAndFeelInt>&& aLookAndFeelIntCache,
|
||||
nsTArray<SystemFontListEntry>&& aFontList) {
|
||||
nsTArray<SystemFontListEntry>&& aFontList,
|
||||
const Maybe<SharedMemoryHandle>& aSharedUASheetHandle,
|
||||
const uintptr_t& aSharedUASheetAddress) {
|
||||
if (!sShutdownCanary) {
|
||||
return IPC_OK();
|
||||
}
|
||||
|
@ -599,6 +601,7 @@ mozilla::ipc::IPCResult ContentChild::RecvSetXPCOMProcessAttributes(
|
|||
mLookAndFeelCache = std::move(aLookAndFeelIntCache);
|
||||
mFontList = std::move(aFontList);
|
||||
gfx::gfxVars::SetValuesForInitialize(aXPCOMInit.gfxNonDefaultVarUpdates());
|
||||
InitSharedUASheets(aSharedUASheetHandle, aSharedUASheetAddress);
|
||||
InitXPCOM(aXPCOMInit, aInitialData);
|
||||
InitGraphicsDeviceData(aXPCOMInit.contentDeviceData());
|
||||
|
||||
|
@ -1198,6 +1201,20 @@ void ContentChild::InitGraphicsDeviceData(const ContentDeviceData& aData) {
|
|||
gfxPlatform::InitChild(aData);
|
||||
}
|
||||
|
||||
void ContentChild::InitSharedUASheets(const Maybe<SharedMemoryHandle>& aHandle,
|
||||
uintptr_t aAddress) {
|
||||
MOZ_ASSERT_IF(!aHandle, !aAddress);
|
||||
|
||||
if (!aAddress) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Map the shared memory storing the user agent style sheets. Do this as
|
||||
// early as possible to maximize the chance of being able to map at the
|
||||
// address we want.
|
||||
nsLayoutStylesheetCache::SetSharedMemory(*aHandle, aAddress);
|
||||
}
|
||||
|
||||
void ContentChild::InitXPCOM(
|
||||
const XPCOMInitData& aXPCOMInit,
|
||||
const mozilla::dom::ipc::StructuredCloneData& aInitialData) {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#ifndef mozilla_dom_ContentChild_h
|
||||
#define mozilla_dom_ContentChild_h
|
||||
|
||||
#include "base/shared_memory.h"
|
||||
#include "mozilla/Atomics.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/PBrowserOrId.h"
|
||||
|
@ -125,6 +126,9 @@ class ContentChild final : public PContentChild,
|
|||
void InitXPCOM(const XPCOMInitData& aXPCOMInit,
|
||||
const mozilla::dom::ipc::StructuredCloneData& aInitialData);
|
||||
|
||||
void InitSharedUASheets(const Maybe<base::SharedMemoryHandle>& aHandle,
|
||||
uintptr_t aAddress);
|
||||
|
||||
void InitGraphicsDeviceData(const ContentDeviceData& aData);
|
||||
|
||||
static ContentChild* GetSingleton() { return sSingleton; }
|
||||
|
@ -585,7 +589,9 @@ class ContentChild final : public PContentChild,
|
|||
mozilla::ipc::IPCResult RecvSetXPCOMProcessAttributes(
|
||||
const XPCOMInitData& aXPCOMInit, const StructuredCloneData& aInitialData,
|
||||
nsTArray<LookAndFeelInt>&& aLookAndFeelIntCache,
|
||||
nsTArray<SystemFontListEntry>&& aFontList);
|
||||
nsTArray<SystemFontListEntry>&& aFontList,
|
||||
const Maybe<base::SharedMemoryHandle>& aSharedUASheetHandle,
|
||||
const uintptr_t& aSharedUASheetAddress);
|
||||
|
||||
mozilla::ipc::IPCResult RecvProvideAnonymousTemporaryFile(
|
||||
const uint64_t& aID, const FileDescOrError& aFD);
|
||||
|
|
|
@ -134,6 +134,7 @@
|
|||
#include "nsFrameMessageManager.h"
|
||||
#include "nsHashPropertyBag.h"
|
||||
#include "nsIAlertsService.h"
|
||||
#include "nsIAppStartup.h"
|
||||
#include "nsIClipboard.h"
|
||||
#include "nsICookie.h"
|
||||
#include "nsContentPermissionHelper.h"
|
||||
|
@ -2267,7 +2268,6 @@ ContentParent::ContentParent(ContentParent* aOpener,
|
|||
mRemoteWorkerActors(0),
|
||||
mNumDestroyingTabs(0),
|
||||
mLifecycleState(LifecycleState::LAUNCHING),
|
||||
mShuttingDown(false),
|
||||
mIsForBrowser(!mRemoteType.IsEmpty()),
|
||||
mRecordReplayState(aRecordReplayState),
|
||||
mRecordingFile(aRecordingFile),
|
||||
|
@ -2464,8 +2464,21 @@ void ContentParent::InitInternal(ProcessPriority aInitialPriority) {
|
|||
ScreenManager& screenManager = ScreenManager::GetSingleton();
|
||||
screenManager.CopyScreensToRemote(this);
|
||||
|
||||
// Send the UA sheet shared memory buffer and the address it is mapped at.
|
||||
auto cache = nsLayoutStylesheetCache::Singleton();
|
||||
Maybe<SharedMemoryHandle> sharedUASheetHandle;
|
||||
uintptr_t sharedUASheetAddress = cache->GetSharedMemoryAddress();
|
||||
|
||||
SharedMemoryHandle handle;
|
||||
if (cache->ShareToProcess(OtherPid(), &handle)) {
|
||||
sharedUASheetHandle.emplace(handle);
|
||||
} else {
|
||||
sharedUASheetAddress = 0;
|
||||
}
|
||||
|
||||
Unused << SendSetXPCOMProcessAttributes(xpcomInit, initialData, lnfCache,
|
||||
fontList);
|
||||
fontList, sharedUASheetHandle,
|
||||
sharedUASheetAddress);
|
||||
|
||||
ipc::WritableSharedMap* sharedData =
|
||||
nsFrameMessageManager::sParentProcessManager->SharedData();
|
||||
|
@ -2958,8 +2971,6 @@ ContentParent::Observe(nsISupports* aSubject, const char* aTopic,
|
|||
const char16_t* aData) {
|
||||
if (mSubprocess && (!strcmp(aTopic, "profile-before-change") ||
|
||||
!strcmp(aTopic, "xpcom-shutdown"))) {
|
||||
mShuttingDown = true;
|
||||
|
||||
// Make sure that our process will get scheduled.
|
||||
ProcessPriorityManager::SetProcessPriority(this,
|
||||
PROCESS_PRIORITY_FOREGROUND);
|
||||
|
@ -3379,7 +3390,8 @@ void ContentParent::GeneratePairedMinidump(const char* aReason) {
|
|||
// Something has gone wrong to get us here, so we generate a minidump
|
||||
// of the parent and child for submission to the crash server unless we're
|
||||
// already shutting down.
|
||||
if (mCrashReporter && !mShuttingDown &&
|
||||
nsCOMPtr<nsIAppStartup> appStartup = components::AppStartup::Service();
|
||||
if (mCrashReporter && !appStartup->GetShuttingDown() &&
|
||||
Preferences::GetBool("dom.ipc.tabs.createKillHardCrashReports", false)) {
|
||||
// GeneratePairedMinidump creates two minidumps for us - the main
|
||||
// one is for the content process we're about to kill, and the other
|
||||
|
|
|
@ -1236,7 +1236,6 @@ class ContentParent final : public PContentParent,
|
|||
|
||||
LifecycleState mLifecycleState;
|
||||
|
||||
bool mShuttingDown;
|
||||
bool mIsForBrowser;
|
||||
|
||||
// Whether this process is recording or replaying its execution, and any
|
||||
|
|
|
@ -101,6 +101,7 @@ using mozilla::dom::BrowsingContextId from "mozilla/dom/ipc/IdType.h";
|
|||
using mozilla::dom::BrowsingContextTransaction from "mozilla/dom/BrowsingContext.h";
|
||||
using mozilla::dom::BrowsingContextFieldEpochs from "mozilla/dom/BrowsingContext.h";
|
||||
using mozilla::dom::BrowsingContextInitializer from "mozilla/dom/BrowsingContext.h";
|
||||
using base::SharedMemoryHandle from "base/shared_memory.h";
|
||||
|
||||
union ChromeRegistryItem
|
||||
{
|
||||
|
@ -563,7 +564,9 @@ child:
|
|||
StructuredCloneData initialData,
|
||||
LookAndFeelInt[] lookAndFeelIntCache,
|
||||
/* used on MacOSX and Linux only: */
|
||||
SystemFontListEntry[] systemFontList);
|
||||
SystemFontListEntry[] systemFontList,
|
||||
SharedMemoryHandle? sharedUASheetHandle,
|
||||
uintptr_t sharedUASheetAddress);
|
||||
|
||||
// Notify child that last-pb-context-exited notification was observed
|
||||
async LastPrivateDocShellDestroyed();
|
||||
|
|
|
@ -800,10 +800,13 @@ void ParticularProcessPriorityManager::SetPriorityNow(
|
|||
|
||||
mPriority = aPriority;
|
||||
|
||||
if (oldPriority < mPriority) {
|
||||
// We skip incrementing the DOM_CONTENTPROCESS_OS_PRIORITY_RAISED if we're
|
||||
// transitioning from the PROCESS_PRIORITY_UNKNOWN level, which is where
|
||||
// we initialize at.
|
||||
if (oldPriority < mPriority && oldPriority != PROCESS_PRIORITY_UNKNOWN) {
|
||||
Telemetry::ScalarAdd(
|
||||
Telemetry::ScalarID::DOM_CONTENTPROCESS_OS_PRIORITY_RAISED, 1);
|
||||
} else {
|
||||
} else if (oldPriority > mPriority) {
|
||||
Telemetry::ScalarAdd(
|
||||
Telemetry::ScalarID::DOM_CONTENTPROCESS_OS_PRIORITY_LOWERED, 1);
|
||||
}
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче