зеркало из https://github.com/mozilla/gecko-dev.git
Merge autoland to mozilla-central. a=merge
This commit is contained in:
Коммит
d827211c4e
|
@ -14,15 +14,10 @@
|
|||
<!ENTITY % aboutDialogDTD SYSTEM "chrome://browser/locale/aboutDialog.dtd" >
|
||||
%aboutDialogDTD;
|
||||
#ifdef XP_MACOSX
|
||||
<!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd">
|
||||
%baseMenuOverlayDTD;
|
||||
#include browser-doctype.inc
|
||||
#endif
|
||||
]>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
|
||||
#endif
|
||||
|
||||
<window xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
id="aboutDialog"
|
||||
|
@ -39,7 +34,9 @@
|
|||
role="dialog"
|
||||
aria-describedby="version distribution distributionId communityDesc contributeDesc trademark"
|
||||
>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include macWindow.inc.xul
|
||||
#endif
|
||||
<script type="application/javascript" src="chrome://browser/content/aboutDialog.js"/>
|
||||
#ifdef MOZ_UPDATER
|
||||
<script type="application/javascript" src="chrome://browser/content/aboutDialog-appUpdater.js"/>
|
||||
|
@ -150,7 +147,4 @@
|
|||
<key keycode="VK_ESCAPE" oncommand="window.close();"/>
|
||||
</keyset>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include browserMountPoints.inc
|
||||
#endif
|
||||
</window>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<!DOCTYPE window [
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
|
||||
%brandDTD;
|
||||
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd" >
|
||||
|
@ -23,5 +22,3 @@
|
|||
%reportphishDTD;
|
||||
<!ENTITY % editBookmarkOverlayDTD SYSTEM "chrome://browser/locale/places/editBookmarkOverlay.dtd">
|
||||
%editBookmarkOverlayDTD;
|
||||
]>
|
||||
|
||||
|
|
|
@ -1974,7 +1974,7 @@ var gBrowserInit = {
|
|||
if (AppConstants.platform == "macosx") {
|
||||
// nonBrowserWindowStartup(), nonBrowserWindowDelayedStartup(), and
|
||||
// nonBrowserWindowShutdown() are used for non-browser windows in
|
||||
// macBrowserOverlay
|
||||
// macWindow.inc.xul
|
||||
gBrowserInit.nonBrowserWindowStartup = function() {
|
||||
// Disable inappropriate commands / submenus
|
||||
var disabledItems = ["Browser:SavePage",
|
||||
|
|
|
@ -20,7 +20,9 @@
|
|||
|
||||
# All DTD information is stored in a separate file so that it can be shared by
|
||||
# hiddenWindow.xul.
|
||||
<!DOCTYPE window [
|
||||
#include browser-doctype.inc
|
||||
]>
|
||||
|
||||
<window id="main-window"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
|
@ -60,9 +62,9 @@
|
|||
retargetdocumentfocus="urlbar"
|
||||
persist="screenX screenY width height sizemode">
|
||||
|
||||
# All JS files which are not content (only) dependent that browser.xul
|
||||
# wishes to include *must* go into the global-scripts.inc file
|
||||
# so that they can be shared by macBrowserOverlay.xul.
|
||||
# All JS files which are needed by browser.xul and other top level windows to
|
||||
# support MacOS specific features *must* go into the global-scripts.inc file so
|
||||
# that they can be shared with macWindow.inc.xul.
|
||||
#include global-scripts.inc
|
||||
|
||||
<script type="application/javascript">
|
||||
|
@ -84,8 +86,9 @@
|
|||
"chrome://browser/content/places/controller.js");
|
||||
</script>
|
||||
|
||||
# All sets except for popupsets (commands, keys, stringbundles and broadcasters) *must* go into the
|
||||
# browser-sets.inc file for sharing with hiddenWindow.xul.
|
||||
# All sets except for popupsets (commands, keys, stringbundles and broadcasters)
|
||||
# *must* go into the browser-sets.inc file so that they can be shared with other
|
||||
# top level windows in macWindow.inc.xul.
|
||||
#define FULL_BROWSER_WINDOW
|
||||
#include browser-sets.inc
|
||||
#undef FULL_BROWSER_WINDOW
|
||||
|
@ -631,8 +634,8 @@
|
|||
#endif
|
||||
context="toolbar-context-menu">
|
||||
<toolbaritem id="menubar-items" align="center">
|
||||
# The entire main menubar is placed into browser-menubar.inc, so that it can be shared by
|
||||
# hiddenWindow.xul.
|
||||
# The entire main menubar is placed into browser-menubar.inc, so that it can be
|
||||
# shared with other top level windows in macWindow.inc.xul.
|
||||
#include browser-menubar.inc
|
||||
</toolbaritem>
|
||||
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<commandset id="mainCommandSet"/>
|
||||
<commandset id="placesCommands"/>
|
||||
|
||||
<broadcasterset id="mainBroadcasterSet"/>
|
||||
|
||||
<keyset id="mainKeyset"/>
|
||||
|
||||
<menubar id="main-menubar"/>
|
|
@ -6,19 +6,17 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/webRTC-indicator.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd">
|
||||
%baseMenuOverlayDTD;
|
||||
#include browser-doctype.inc
|
||||
]>
|
||||
|
||||
<window id="main-window"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
#include browserMountPoints.inc
|
||||
#include macWindow.inc.xul
|
||||
|
||||
</window>
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<?xml version="1.0"?>
|
||||
# -*- Mode: HTML -*-
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
|
@ -7,20 +6,15 @@
|
|||
|
||||
#define MAC_NON_BROWSER_WINDOW
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
|
||||
# This include file should only contain things that are needed to support MacOS
|
||||
# specific features that are needed for all top level windows. If the feature is
|
||||
# also needed in browser.xul, it should go in one of the various include files
|
||||
# below that are shared with browser.xul. When including this file,
|
||||
# browser-doctype.inc must also be included.
|
||||
|
||||
# All DTD information is stored in a separate file so that it can be shared by
|
||||
# hiddenWindow.xul.
|
||||
#include browser-doctype.inc
|
||||
|
||||
<overlay id="hidden-overlay"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
# All JS files which are not content (only) dependent that browser.xul
|
||||
# wishes to include *must* go into the global-scripts.inc file
|
||||
# so that they can be shared by this overlay.
|
||||
# All JS files which are needed by browser.xul and other top level windows to
|
||||
# support MacOS specific features *must* go into the global-scripts.inc file so
|
||||
# that they can be shared with browser.xul.
|
||||
#include global-scripts.inc
|
||||
|
||||
<script type="application/javascript">
|
||||
|
@ -54,12 +48,13 @@
|
|||
"chrome://browser/content/places/controller.js");
|
||||
</script>
|
||||
|
||||
# All sets except for popupsets (commands, keys, stringbundles and broadcasters) *must* go into the
|
||||
# browser-sets.inc file for sharing with hiddenWindow.xul.
|
||||
# All sets except for popupsets (commands, keys, stringbundles and broadcasters)
|
||||
# *must* go into the browser-sets.inc file so that they can be shared with
|
||||
# browser.xul
|
||||
#include browser-sets.inc
|
||||
|
||||
# The entire main menubar is placed into browser-menubar.inc, so that it can be shared by
|
||||
# hiddenWindow.xul.
|
||||
# The entire main menubar is placed into browser-menubar.inc, so that it can be
|
||||
# shared with browser.xul.
|
||||
#include browser-menubar.inc
|
||||
|
||||
<!-- Dock menu -->
|
||||
|
@ -73,5 +68,3 @@
|
|||
id="macDockMenuNewPrivateWindow" />
|
||||
</menupopup>
|
||||
</popupset>
|
||||
|
||||
</overlay>
|
|
@ -152,7 +152,7 @@ with Files("*.svg"):
|
|||
with Files("hiddenWindow.xul"):
|
||||
BUG_COMPONENT = ("Firefox", "Device Permissions")
|
||||
|
||||
with Files("macBrowserOverlay.xul"):
|
||||
with Files("macWindow.inc.xul"):
|
||||
BUG_COMPONENT = ("Firefox", "Shell Integration")
|
||||
|
||||
with Files("tabbrowser*"):
|
||||
|
|
|
@ -10,15 +10,10 @@
|
|||
<!ENTITY % pageInfoDTD SYSTEM "chrome://browser/locale/pageInfo.dtd">
|
||||
%pageInfoDTD;
|
||||
#ifdef XP_MACOSX
|
||||
<!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd">
|
||||
%baseMenuOverlayDTD;
|
||||
#include ../browser-doctype.inc
|
||||
#endif
|
||||
]>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
|
||||
#endif
|
||||
|
||||
<window id="main-window"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
windowtype="Browser:page-info"
|
||||
|
@ -29,6 +24,10 @@
|
|||
width="&pageInfoWindow.width;" height="&pageInfoWindow.height;"
|
||||
persist="screenX screenY width height sizemode">
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include ../macWindow.inc.xul
|
||||
#endif
|
||||
|
||||
<script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
|
||||
<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
|
||||
<script type="application/javascript" src="chrome://global/content/treeUtils.js"/>
|
||||
|
@ -416,8 +415,4 @@
|
|||
<!-- Others added by overlay -->
|
||||
</deck>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include ../browserMountPoints.inc
|
||||
#endif
|
||||
|
||||
</window>
|
||||
|
|
|
@ -124,9 +124,6 @@ browser.jar:
|
|||
content/browser/nsContextMenu.js (content/nsContextMenu.js)
|
||||
# XXX: We should exclude this one as well (bug 71895)
|
||||
* content/browser/hiddenWindow.xul (content/hiddenWindow.xul)
|
||||
#ifdef XP_MACOSX
|
||||
* content/browser/macBrowserOverlay.xul (content/macBrowserOverlay.xul)
|
||||
#endif
|
||||
#ifndef XP_MACOSX
|
||||
* content/browser/webrtcIndicator.xul (content/webrtcIndicator.xul)
|
||||
content/browser/webrtcIndicator.js (content/webrtcIndicator.js)
|
||||
|
|
|
@ -12,9 +12,6 @@
|
|||
<?xml-stylesheet href="chrome://browser/skin/places/organizer.css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css"?>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
|
||||
#endif
|
||||
<?xul-overlay href="chrome://browser/content/downloads/allDownloadsViewOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE window [
|
||||
|
@ -29,8 +26,7 @@
|
|||
<!ENTITY % editBookmarkOverlayDTD SYSTEM "chrome://browser/locale/places/editBookmarkOverlay.dtd">
|
||||
%editBookmarkOverlayDTD;
|
||||
#ifdef XP_MACOSX
|
||||
<!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd">
|
||||
%baseMenuOverlayDTD;
|
||||
#include ../../../base/content/browser-doctype.inc
|
||||
#endif
|
||||
]>
|
||||
|
||||
|
@ -49,13 +45,15 @@
|
|||
<script type="application/javascript"
|
||||
src="chrome://browser/content/places/places.js"/>
|
||||
#ifndef XP_MACOSX
|
||||
<!-- On Mac, these are included via macBrowserOverlay.xul -> browser.js -> defineLazyScriptGetter -->
|
||||
<!-- On Mac, this is included via macWindow.inc.xul -> global-scripts.inc -> browser.js -> defineLazyScriptGetter -->
|
||||
<script type="application/javascript"
|
||||
src="chrome://browser/content/places/editBookmark.js"/>
|
||||
<!-- On Mac, thes are included via macWindow.inc.xul -> global-scripts.inc -->
|
||||
<script type="application/javascript"
|
||||
src="chrome://global/content/globalOverlay.js"/>
|
||||
<script type="application/javascript"
|
||||
src="chrome://browser/content/utilityOverlay.js"/>
|
||||
<!-- On Mac, these are included via macWindow.inc.xul -->
|
||||
<script type="application/javascript"><![CDATA[
|
||||
ChromeUtils.defineModuleGetter(window,
|
||||
"PlacesUtils", "resource://gre/modules/PlacesUtils.jsm");
|
||||
|
@ -79,7 +77,7 @@
|
|||
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include ../../../base/content/browserMountPoints.inc
|
||||
#include ../../../base/content/macWindow.inc.xul
|
||||
#else
|
||||
#include ../../../../toolkit/content/editMenuCommands.inc.xul
|
||||
#include placesCommands.inc.xul
|
||||
|
|
|
@ -12,15 +12,10 @@
|
|||
<!ENTITY % setDesktopBackgroundDTD SYSTEM "chrome://browser/locale/setDesktopBackground.dtd">
|
||||
%setDesktopBackgroundDTD;
|
||||
#ifdef XP_MACOSX
|
||||
<!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd">
|
||||
%baseMenuOverlayDTD;
|
||||
#include ../../../base/content/browser-doctype.inc
|
||||
#endif
|
||||
]>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
|
||||
#endif
|
||||
|
||||
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
windowtype="Shell:SetDesktopBackground"
|
||||
|
@ -35,6 +30,10 @@
|
|||
title="&setDesktopBackground.title;"
|
||||
style="width: 30em;">
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include ../../../base/content/macWindow.inc.xul
|
||||
#endif
|
||||
|
||||
<stringbundle id="backgroundBundle"
|
||||
src="chrome://browser/locale/shellservice.properties"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
|
||||
|
@ -85,8 +84,4 @@
|
|||
</hbox>
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include ../../../base/content/browserMountPoints.inc
|
||||
#endif
|
||||
|
||||
</dialog>
|
||||
|
|
|
@ -10,6 +10,8 @@ const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
|||
|
||||
const FontPreview = createFactory(require("./FontPreview"));
|
||||
|
||||
loader.lazyRequireGetter(this, "clipboardHelper", "devtools/shared/platform/clipboard");
|
||||
|
||||
const { getStr } = require("../utils/l10n");
|
||||
const Types = require("../types");
|
||||
|
||||
|
@ -30,6 +32,7 @@ class Font extends PureComponent {
|
|||
};
|
||||
|
||||
this.onFontFaceRuleToggle = this.onFontFaceRuleToggle.bind(this);
|
||||
this.onCopyURL = this.onCopyURL.bind(this);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(newProps) {
|
||||
|
@ -42,6 +45,10 @@ class Font extends PureComponent {
|
|||
});
|
||||
}
|
||||
|
||||
onCopyURL() {
|
||||
clipboardHelper.copyString(this.props.font.URI);
|
||||
}
|
||||
|
||||
onFontFaceRuleToggle(event) {
|
||||
this.setState({
|
||||
isFontFaceRuleExpanded: !this.state.isFontFaceRuleExpanded
|
||||
|
@ -81,11 +88,11 @@ class Font extends PureComponent {
|
|||
);
|
||||
}
|
||||
|
||||
renderFontTypeAndURL(url, format) {
|
||||
renderFontOrigin(url) {
|
||||
if (!url) {
|
||||
return dom.p(
|
||||
{
|
||||
className: "font-format-url"
|
||||
className: "font-origin system"
|
||||
},
|
||||
getStr("fontinspector.system")
|
||||
);
|
||||
|
@ -93,15 +100,21 @@ class Font extends PureComponent {
|
|||
|
||||
return dom.p(
|
||||
{
|
||||
className: "font-format-url"
|
||||
className: "font-origin remote",
|
||||
},
|
||||
getStr("fontinspector.remote"),
|
||||
dom.a(
|
||||
dom.span(
|
||||
{
|
||||
className: "font-url",
|
||||
href: url
|
||||
className: "url",
|
||||
title: url
|
||||
},
|
||||
format
|
||||
url
|
||||
),
|
||||
dom.button(
|
||||
{
|
||||
className: "copy-icon",
|
||||
onClick: this.onCopyURL,
|
||||
title: getStr("fontinspector.copyURL"),
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -139,7 +152,6 @@ class Font extends PureComponent {
|
|||
let { previewText } = fontOptions;
|
||||
|
||||
let {
|
||||
format,
|
||||
name,
|
||||
previewUrl,
|
||||
rule,
|
||||
|
@ -153,7 +165,7 @@ class Font extends PureComponent {
|
|||
},
|
||||
this.renderFontName(name),
|
||||
FontPreview({ previewText, previewUrl, onPreviewFonts }),
|
||||
this.renderFontTypeAndURL(URI, format),
|
||||
this.renderFontOrigin(URI),
|
||||
this.renderFontCSSCode(rule, ruleText)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -15,6 +15,9 @@ support-files =
|
|||
!/devtools/client/shared/test/test-actor-registry.js
|
||||
|
||||
[browser_fontinspector.js]
|
||||
[browser_fontinspector_copy-URL.js]
|
||||
skip-if = !e10s # too slow on !e10s, logging fully serialized actors (Bug 1446595)
|
||||
subsuite = clipboard
|
||||
[browser_fontinspector_edit-previews.js]
|
||||
[browser_fontinspector_expand-css-code.js]
|
||||
[browser_fontinspector_other-fonts.js]
|
||||
|
|
|
@ -10,25 +10,21 @@ const FONTS = [{
|
|||
name: "Ostrich Sans Medium",
|
||||
remote: true,
|
||||
url: URL_ROOT + "ostrich-regular.ttf",
|
||||
format: "truetype",
|
||||
cssName: "bar"
|
||||
}, {
|
||||
name: "Ostrich Sans Black",
|
||||
remote: true,
|
||||
url: URL_ROOT + "ostrich-black.ttf",
|
||||
format: "",
|
||||
cssName: "bar"
|
||||
}, {
|
||||
name: "Ostrich Sans Black",
|
||||
remote: true,
|
||||
url: URL_ROOT + "ostrich-black.ttf",
|
||||
format: "",
|
||||
cssName: "bar"
|
||||
}, {
|
||||
name: "Ostrich Sans Medium",
|
||||
remote: true,
|
||||
url: URL_ROOT + "ostrich-regular.ttf",
|
||||
format: "",
|
||||
cssName: "barnormal"
|
||||
}];
|
||||
|
||||
|
@ -43,16 +39,7 @@ add_task(function* () {
|
|||
});
|
||||
|
||||
function isRemote(fontLi) {
|
||||
return fontLi.querySelectorAll(".font-format-url a").length === 1;
|
||||
}
|
||||
|
||||
function getFormat(fontLi) {
|
||||
let link = fontLi.querySelector(".font-format-url a");
|
||||
if (!link) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return link.textContent;
|
||||
return fontLi.querySelector(".font-origin").classList.contains("remote");
|
||||
}
|
||||
|
||||
function* testBodyFonts(inspector, viewDoc) {
|
||||
|
@ -63,10 +50,9 @@ function* testBodyFonts(inspector, viewDoc) {
|
|||
let li = lis[i];
|
||||
let font = FONTS[i];
|
||||
|
||||
is(getName(li), font.name, "font " + i + " right font name");
|
||||
is(isRemote(li), font.remote, "font " + i + " remote value correct");
|
||||
is(li.querySelector(".font-url").href, font.url, "font " + i + " url correct");
|
||||
is(getFormat(li), font.format, "font " + i + " format correct");
|
||||
is(getName(li), font.name, `font ${i} right font name`);
|
||||
is(isRemote(li), font.remote, `font ${i} remote value correct`);
|
||||
is(li.querySelector(".font-origin").textContent, font.url, `font ${i} url correct`);
|
||||
}
|
||||
|
||||
// test that the bold and regular fonts have different previews
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Test that an icon appears next to web font URLs, and that clicking it copies the URL
|
||||
// to the clipboard thanks to it.
|
||||
|
||||
const TEST_URI = URL_ROOT + "browser_fontinspector.html";
|
||||
|
||||
add_task(async function() {
|
||||
let { view } = await openFontInspectorForURL(TEST_URI);
|
||||
let viewDoc = view.document;
|
||||
|
||||
let fontEl = getUsedFontsEls(viewDoc)[0];
|
||||
let linkEl = fontEl.querySelector(".font-origin");
|
||||
let iconEl = linkEl.querySelector(".copy-icon");
|
||||
|
||||
ok(iconEl, "The icon is displayed");
|
||||
is(iconEl.getAttribute("title"), "Copy URL", "This is the right icon");
|
||||
|
||||
info("Clicking the button and waiting for the clipboard to receive the URL");
|
||||
await waitForClipboardPromise(() => iconEl.click(), linkEl.textContent);
|
||||
});
|
|
@ -123,6 +123,7 @@ devtools.jar:
|
|||
skin/images/pseudo-class.svg (themes/images/pseudo-class.svg)
|
||||
skin/images/controls.png (themes/images/controls.png)
|
||||
skin/images/controls@2x.png (themes/images/controls@2x.png)
|
||||
skin/images/copy.svg (themes/images/copy.svg)
|
||||
skin/images/animation-fast-track.svg (themes/images/animation-fast-track.svg)
|
||||
skin/images/performance-details-waterfall.svg (themes/images/performance-details-waterfall.svg)
|
||||
skin/images/performance-details-call-tree.svg (themes/images/performance-details-call-tree.svg)
|
||||
|
|
|
@ -9,10 +9,6 @@
|
|||
# system font.
|
||||
fontinspector.system=system
|
||||
|
||||
# LOCALIZATION NOTE (fontinspector.remote) This label indicates that the font is a remote
|
||||
# font.
|
||||
fontinspector.remote=remote
|
||||
|
||||
# LOCALIZATION NOTE (fontinspector.noFontsOnSelectedElement): This label is shown when
|
||||
# no fonts found on the selected element.
|
||||
fontinspector.noFontsOnSelectedElement=No fonts were found for the current element.
|
||||
|
@ -25,3 +21,8 @@ fontinspector.otherFontsInPageHeader=Other fonts in page
|
|||
# tooltip on hover of a font preview string. Clicking on the string opens a text input
|
||||
# where users can type to change the preview text.
|
||||
fontinspector.editPreview=Click to edit preview
|
||||
|
||||
# LOCALIZATION NOTE (fontinspector.copyURL): This is the text that appears in a tooltip
|
||||
# displayed when the user hovers over the copy icon next to the font URL.
|
||||
# Clicking the copy icon copies the full font URL to the user's clipboard
|
||||
fontinspector.copyURL=Copy URL
|
||||
|
|
|
@ -13,6 +13,16 @@ function sortObjectKeys(object) {
|
|||
if (object == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (Array.isArray(object)) {
|
||||
for (let i = 0; i < object.length; i++) {
|
||||
if (typeof object[i] === "object") {
|
||||
object[i] = sortObjectKeys(object[i]);
|
||||
}
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
return Object.keys(object).sort(function(left, right) {
|
||||
return left.toLowerCase().localeCompare(right.toLowerCase());
|
||||
}).reduce((acc, key) => {
|
||||
|
|
|
@ -27,6 +27,7 @@ support-files =
|
|||
html_params-test-page.html
|
||||
html_pause-test-page.html
|
||||
html_post-data-test-page.html
|
||||
html_post-array-data-test-page.html
|
||||
html_post-json-test-page.html
|
||||
html_post-raw-test-page.html
|
||||
html_post-raw-with-headers-test-page.html
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
/**
|
||||
* Tests whether keys in Params panel are sorted.
|
||||
*/
|
||||
|
||||
add_task(async function() {
|
||||
let { tab, monitor } = await initNetMonitor(POST_DATA_URL);
|
||||
let { tab, monitor } = await initNetMonitor(POST_ARRAY_DATA_URL);
|
||||
info("Starting test... ");
|
||||
|
||||
let { document, store, windowRequire } = monitor.panelWin;
|
||||
|
@ -16,7 +15,7 @@ add_task(async function() {
|
|||
|
||||
store.dispatch(Actions.batchEnable(false));
|
||||
|
||||
let wait = waitForNetworkEvents(monitor, 2);
|
||||
let wait = waitForNetworkEvents(monitor, 1);
|
||||
await ContentTask.spawn(tab.linkedBrowser, {}, async function() {
|
||||
content.wrappedJSObject.performRequests();
|
||||
});
|
||||
|
@ -30,9 +29,38 @@ add_task(async function() {
|
|||
EventUtils.sendMouseEvent({ type: "click" },
|
||||
document.querySelector("#params-tab"));
|
||||
|
||||
let actualKeys = document.querySelectorAll(".treeLabel");
|
||||
let expectedKeys = ["Query string", "baz", "foo", "type",
|
||||
"Form data", "baz", "foo"];
|
||||
// The Params panel should render the following
|
||||
// POSTed JSON data structure:
|
||||
//
|
||||
// ▼ JSON
|
||||
// ▼ watches: […]
|
||||
// 0: hello
|
||||
// 1: how
|
||||
// 2: are
|
||||
// 3: you
|
||||
// ▼ 4: {…}
|
||||
// a: 10
|
||||
// ▼ b: […]
|
||||
// 0: "a"
|
||||
// 1: "c"
|
||||
// 2: "b"
|
||||
// c: 15
|
||||
let actualKeys = document.querySelectorAll(".treeTable .treeRow");
|
||||
let expectedKeys = [
|
||||
"JSON",
|
||||
"watches: [...]",
|
||||
"0: hello",
|
||||
"1: how",
|
||||
"2: are",
|
||||
"3: you",
|
||||
"4: {...}",
|
||||
"a: 10",
|
||||
"b: [...]",
|
||||
"0: a",
|
||||
"1: c",
|
||||
"2: b",
|
||||
"c: 15",
|
||||
];
|
||||
|
||||
for (let i = 0; i < actualKeys.length; i++) {
|
||||
is(actualKeys[i].innerText, expectedKeys[i],
|
||||
|
|
|
@ -40,6 +40,7 @@ const CONTENT_TYPE_WITHOUT_CACHE_REQUESTS = 8;
|
|||
const CYRILLIC_URL = EXAMPLE_URL + "html_cyrillic-test-page.html";
|
||||
const STATUS_CODES_URL = EXAMPLE_URL + "html_status-codes-test-page.html";
|
||||
const POST_DATA_URL = EXAMPLE_URL + "html_post-data-test-page.html";
|
||||
const POST_ARRAY_DATA_URL = EXAMPLE_URL + "html_post-array-data-test-page.html";
|
||||
const POST_JSON_URL = EXAMPLE_URL + "html_post-json-test-page.html";
|
||||
const POST_RAW_URL = EXAMPLE_URL + "html_post-raw-test-page.html";
|
||||
const POST_RAW_WITH_HEADERS_URL = EXAMPLE_URL + "html_post-raw-with-headers-test-page.html";
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<!-- Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ -->
|
||||
<!doctype html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<title>Network Monitor test page</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
/* exported performRequests */
|
||||
"use strict";
|
||||
|
||||
function performRequests() {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", "sjs_simple-test-server.sjs", true);
|
||||
|
||||
let postData = JSON.stringify({
|
||||
watches: ["hello", "how", "are", "you", {
|
||||
a: 10,
|
||||
c: 15,
|
||||
b: ["a", "c", "b"]
|
||||
}],
|
||||
});
|
||||
xhr.send(postData);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -314,7 +314,11 @@ pref("devtools.webconsole.autoMultiline", true);
|
|||
pref("devtools.webconsole.new-frontend-enabled", true);
|
||||
|
||||
// Enable the new webconsole frontend in the browser console
|
||||
#if defined(NIGHTLY_BUILD)
|
||||
pref("devtools.browserconsole.new-frontend-enabled", true);
|
||||
#else
|
||||
pref("devtools.browserconsole.new-frontend-enabled", false);
|
||||
#endif
|
||||
|
||||
// Enable the webconsole sidebar toggle
|
||||
pref("devtools.webconsole.sidebarToggle", false);
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
border-width: 0 1px 1px 0;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto;
|
||||
grid-column-gap: 10px;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
|
@ -108,33 +109,42 @@
|
|||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.font-format-url {
|
||||
text-transform: capitalize;
|
||||
.font-origin {
|
||||
margin-top: .2em;
|
||||
color: var(--grey-50);
|
||||
justify-self: start;
|
||||
}
|
||||
|
||||
.font-url {
|
||||
margin-inline-start: .5em;
|
||||
text-decoration: underline;
|
||||
color: var(--theme-highlight-blue);
|
||||
background: transparent;
|
||||
border: none;
|
||||
.font-origin.system {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.font-origin.remote {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 20px;
|
||||
}
|
||||
|
||||
.font-origin.remote .url {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.font-origin .copy-icon {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
place-self: center;
|
||||
|
||||
.font-url::after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
height: 13px;
|
||||
width: 13px;
|
||||
margin: -.3rem .15rem 0 0.25rem;
|
||||
vertical-align: middle;
|
||||
background-image: url(chrome://devtools-shim/content/aboutdevtools/images/external-link.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 13px 13px;
|
||||
background: url(chrome://devtools/skin/images/copy.svg) no-repeat;
|
||||
background-size: 12px;
|
||||
background-position-x: -1px;
|
||||
-moz-context-properties: fill;
|
||||
fill: var(--blue-60);
|
||||
fill: var(--theme-toolbar-color);
|
||||
|
||||
}
|
||||
|
||||
#font-container .devtools-sidepanel-no-result + .accordion {
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<!-- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" fill="context-fill #0b0b0b">
|
||||
<path d="M5.70001221,11.125 L5.70001221,4.625 L7.66001225,4.625 L7.66001225,6.94642857 C7.66001225,7.20271429 7.87953225,7.41071429 8.15001225,7.41071429 L10.6000123,7.41071429 L10.6000123,11.125 L5.70001221,11.125 Z M4.7,5.475 L4.7,7.275 L2,7.275 L2,0.975 L3.8,0.975 L3.8,3.225 C3.8,3.4734 4.0016,3.675 4.25,3.675 L6.5,3.675 C5.5064,3.675 4.7,4.4814 4.7,5.475 Z M6.84002447,3.00050006 L4.65002441,3.00050006 L4.65002441,0.8105 L6.84002447,3.00050006 Z M10.5,6.6000061 L8.5,6.6000061 L8.5,4.6000061 L10.5,6.6000061 Z M11.28025,6.21975 L9.03025,3.96975 C8.89,3.82875 8.6995,3.75 8.5,3.75 L7.75,3.75 L7.75,3 C7.75,2.80125 7.67125,2.61 7.53025,2.46975 L5.28025,0.21975 C5.14,0.07875 4.94875,0 4.75,0 L2.5,0 C1.672,0 1,0.672 1,1.5 L1,6.75 C1,7.578 1.672,8.25 2.5,8.25 L4.75,8.25 L4.75,10.5 C4.75,11.328 5.422,12 6.25,12 L10,12 C10.828,12 11.5,11.328 11.5,10.5 L11.5,6.75 C11.5,6.55125 11.42125,6.36 11.28025,6.21975 Z"></path>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 1.2 KiB |
|
@ -181,8 +181,6 @@ skip-if = true # Bug 1437843
|
|||
[browser_console_webconsole_ctrlw_close_tab.js]
|
||||
[browser_console_webconsole_iframe_messages.js]
|
||||
[browser_console_webconsole_private_browsing.js]
|
||||
skip-if = true # Bug 1403188
|
||||
# old console skip-if = e10s # Bug 1042253 - webconsole e10s tests
|
||||
[browser_jsterm_accessibility.js]
|
||||
[browser_jsterm_add_edited_input_to_history.js]
|
||||
[browser_jsterm_autocomplete_array_no_index.js]
|
||||
|
|
|
@ -10,186 +10,106 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
function test() {
|
||||
const TEST_URI = "data:text/html;charset=utf8,<p>hello world! bug 874061" +
|
||||
"<button onclick='console.log(\"foobar bug 874061\");" +
|
||||
"fooBazBaz.yummy()'>click</button>";
|
||||
let ConsoleAPIStorage = Cc["@mozilla.org/consoleAPI-storage;1"]
|
||||
.getService(Ci.nsIConsoleAPIStorage);
|
||||
let privateWindow, privateBrowser, privateTab, privateContent;
|
||||
let hud, expectedMessages, nonPrivateMessage;
|
||||
const NON_PRIVATE_MESSAGE = "This is not a private message";
|
||||
const PRIVATE_MESSAGE = "This is a private message";
|
||||
const PRIVATE_UNDEFINED_FN = "privateException";
|
||||
const PRIVATE_EXCEPTION = `${PRIVATE_UNDEFINED_FN} is not defined`;
|
||||
|
||||
// This test is slightly more involved: it opens the web console twice,
|
||||
// a new private window once, and the browser console twice. We can get
|
||||
// a timeout with debug builds on slower machines.
|
||||
requestLongerTimeout(2);
|
||||
start();
|
||||
const NON_PRIVATE_TEST_URI = "data:text/html;charset=utf8,Not private";
|
||||
const PRIVATE_TEST_URI = `data:text/html;charset=utf8,Test console in private windows
|
||||
<script>
|
||||
function logMessages() {
|
||||
/* Wrap the exception so we don't throw in ContentTask. */
|
||||
setTimeout(() => {
|
||||
console.log("${PRIVATE_MESSAGE}");
|
||||
${PRIVATE_UNDEFINED_FN}();
|
||||
}, 10);
|
||||
}
|
||||
</script>`;
|
||||
|
||||
function start() {
|
||||
gBrowser.selectedTab =
|
||||
BrowserTestUtils.addTab(gBrowser, "data:text/html;charset=utf8," +
|
||||
"<p>hello world! I am not private!");
|
||||
gBrowser.selectedBrowser.addEventListener("load", onLoadTab, true);
|
||||
}
|
||||
add_task(async function() {
|
||||
await addTab(NON_PRIVATE_TEST_URI);
|
||||
|
||||
function onLoadTab() {
|
||||
gBrowser.selectedBrowser.removeEventListener("load", onLoadTab, true);
|
||||
info("onLoadTab()");
|
||||
const privateWindow = await openNewBrowserWindow({ private: true });
|
||||
ok(PrivateBrowsingUtils.isWindowPrivate(privateWindow), "window is private");
|
||||
const privateBrowser = privateWindow.gBrowser;
|
||||
privateBrowser.selectedTab = privateBrowser.addTab(PRIVATE_TEST_URI);
|
||||
const privateTab = privateBrowser.selectedTab;
|
||||
|
||||
// Make sure we have a clean state to start with.
|
||||
Services.console.reset();
|
||||
ConsoleAPIStorage.clearEvents();
|
||||
info("private tab opened");
|
||||
ok(PrivateBrowsingUtils.isBrowserPrivate(privateBrowser.selectedBrowser),
|
||||
"tab window is private");
|
||||
|
||||
// Add a non-private message to the browser console.
|
||||
ContentTask.spawn(gBrowser.selectedBrowser, null, async function() {
|
||||
content.console.log("bug874061-not-private");
|
||||
});
|
||||
let hud = await openConsole(privateTab);
|
||||
ok(hud, "web console opened");
|
||||
|
||||
nonPrivateMessage = {
|
||||
name: "console message from a non-private window",
|
||||
text: "bug874061-not-private",
|
||||
category: CATEGORY_WEBDEV,
|
||||
severity: SEVERITY_LOG,
|
||||
};
|
||||
const onLogMessage = waitForMessage(hud, PRIVATE_MESSAGE);
|
||||
const onErrorMessage = waitForMessage(hud, PRIVATE_EXCEPTION, ".error");
|
||||
logPrivateMessages(privateBrowser.selectedBrowser);
|
||||
|
||||
privateWindow = OpenBrowserWindow({ private: true });
|
||||
ok(privateWindow, "new private window");
|
||||
ok(PrivateBrowsingUtils.isWindowPrivate(privateWindow), "window's private");
|
||||
await onLogMessage;
|
||||
await onErrorMessage;
|
||||
ok(true, "Messages are displayed as expected");
|
||||
|
||||
whenDelayedStartupFinished(privateWindow, onPrivateWindowReady);
|
||||
}
|
||||
info("test cached messages");
|
||||
await closeConsole(privateTab);
|
||||
info("web console closed");
|
||||
hud = await openConsole(privateTab);
|
||||
ok(hud, "web console reopened");
|
||||
|
||||
function onPrivateWindowReady() {
|
||||
info("private browser window opened");
|
||||
privateBrowser = privateWindow.gBrowser;
|
||||
await waitFor(() => findMessage(hud, PRIVATE_MESSAGE));
|
||||
await waitFor(() => findMessage(hud, PRIVATE_EXCEPTION, ".message.error"));
|
||||
ok(true, "Messages are still displayed after closing and reopening the console");
|
||||
|
||||
privateTab = privateBrowser.selectedTab = privateBrowser.addTab(TEST_URI);
|
||||
privateBrowser.selectedBrowser.addEventListener("load", function onLoad() {
|
||||
info("private tab opened");
|
||||
privateBrowser.selectedBrowser.removeEventListener("load", onLoad, true);
|
||||
privateContent = privateBrowser.selectedBrowser.contentWindow;
|
||||
ok(PrivateBrowsingUtils.isBrowserPrivate(privateBrowser.selectedBrowser),
|
||||
"tab window is private");
|
||||
openConsole(privateTab).then(consoleOpened);
|
||||
}, true);
|
||||
}
|
||||
info("Test browser console");
|
||||
await closeConsole(privateTab);
|
||||
info("web console closed");
|
||||
hud = await HUDService.toggleBrowserConsole();
|
||||
|
||||
function addMessages() {
|
||||
let button = privateContent.document.querySelector("button");
|
||||
ok(button, "button in page");
|
||||
EventUtils.synthesizeMouse(button, 2, 2, {}, privateContent);
|
||||
}
|
||||
// Make sure that the cached messages from private tabs are not displayed in the
|
||||
// browser console.
|
||||
assertNoPrivateMessages(hud);
|
||||
|
||||
function consoleOpened(injectedHud) {
|
||||
hud = injectedHud;
|
||||
ok(hud, "web console opened");
|
||||
// Add a non-private message to the console.
|
||||
const onBrowserConsoleNonPrivateMessage = waitForMessage(hud, NON_PRIVATE_MESSAGE);
|
||||
ContentTask.spawn(gBrowser.selectedBrowser, NON_PRIVATE_MESSAGE, function(msg) {
|
||||
content.console.log(msg);
|
||||
});
|
||||
await onBrowserConsoleNonPrivateMessage;
|
||||
|
||||
addMessages();
|
||||
expectedMessages = [
|
||||
{
|
||||
name: "script error",
|
||||
text: "fooBazBaz is not defined",
|
||||
category: CATEGORY_JS,
|
||||
severity: SEVERITY_ERROR,
|
||||
},
|
||||
{
|
||||
name: "console message",
|
||||
text: "foobar bug 874061",
|
||||
category: CATEGORY_WEBDEV,
|
||||
severity: SEVERITY_LOG,
|
||||
},
|
||||
];
|
||||
const onBrowserConsolePrivateLogMessage = waitForMessage(hud, PRIVATE_MESSAGE);
|
||||
const onBrowserConsolePrivateErrorMessage =
|
||||
waitForMessage(hud, PRIVATE_EXCEPTION, ".error");
|
||||
logPrivateMessages(privateBrowser.selectedBrowser);
|
||||
|
||||
// Make sure messages are displayed in the web console as they happen, even
|
||||
// if this is a private tab.
|
||||
waitForMessages({
|
||||
webconsole: hud,
|
||||
messages: expectedMessages,
|
||||
}).then(testCachedMessages);
|
||||
}
|
||||
await onBrowserConsolePrivateLogMessage;
|
||||
await onBrowserConsolePrivateErrorMessage;
|
||||
ok(true, "Messages are displayed as expected");
|
||||
|
||||
function testCachedMessages() {
|
||||
info("testCachedMessages()");
|
||||
closeConsole(privateTab).then(() => {
|
||||
info("web console closed");
|
||||
openConsole(privateTab).then(consoleReopened);
|
||||
});
|
||||
}
|
||||
info("close the private window and check if private messages are removed");
|
||||
const onPrivateMessagesCleared = hud.jsterm.once("private-messages-cleared");
|
||||
privateWindow.BrowserTryToCloseWindow();
|
||||
await onPrivateMessagesCleared;
|
||||
|
||||
function consoleReopened(injectedHud) {
|
||||
hud = injectedHud;
|
||||
ok(hud, "web console reopened");
|
||||
ok(findMessage(hud, NON_PRIVATE_MESSAGE),
|
||||
"non-private messages are still shown after private window closed");
|
||||
assertNoPrivateMessages(hud);
|
||||
|
||||
// Make sure that cached messages are displayed in the web console, even
|
||||
// if this is a private tab.
|
||||
waitForMessages({
|
||||
webconsole: hud,
|
||||
messages: expectedMessages,
|
||||
}).then(testBrowserConsole);
|
||||
}
|
||||
info("close the browser console");
|
||||
await HUDService.toggleBrowserConsole();
|
||||
|
||||
function testBrowserConsole() {
|
||||
info("testBrowserConsole()");
|
||||
closeConsole(privateTab).then(() => {
|
||||
info("web console closed");
|
||||
HUDService.toggleBrowserConsole().then(onBrowserConsoleOpen);
|
||||
});
|
||||
}
|
||||
info("reopen the browser console");
|
||||
hud = await HUDService.toggleBrowserConsole();
|
||||
ok(hud, "browser console reopened");
|
||||
|
||||
// Make sure that the cached messages from private tabs are not displayed in
|
||||
// the browser console.
|
||||
function checkNoPrivateMessages() {
|
||||
let text = hud.outputNode.textContent;
|
||||
is(text.indexOf("fooBazBaz"), -1, "no exception displayed");
|
||||
is(text.indexOf("bug 874061"), -1, "no console message displayed");
|
||||
}
|
||||
assertNoPrivateMessages(hud);
|
||||
});
|
||||
|
||||
function onBrowserConsoleOpen(injectedHud) {
|
||||
hud = injectedHud;
|
||||
ok(hud, "browser console opened");
|
||||
|
||||
checkNoPrivateMessages();
|
||||
addMessages();
|
||||
expectedMessages.push(nonPrivateMessage);
|
||||
|
||||
// Make sure that live messages are displayed in the browser console, even
|
||||
// from private tabs.
|
||||
waitForMessages({
|
||||
webconsole: hud,
|
||||
messages: expectedMessages,
|
||||
}).then(testPrivateWindowClose);
|
||||
}
|
||||
|
||||
function testPrivateWindowClose() {
|
||||
info("close the private window and check if private messages are removed");
|
||||
hud.jsterm.once("private-messages-cleared", () => {
|
||||
isnot(hud.outputNode.textContent.indexOf("bug874061-not-private"), -1,
|
||||
"non-private messages are still shown after private window closed");
|
||||
checkNoPrivateMessages();
|
||||
|
||||
info("close the browser console");
|
||||
HUDService.toggleBrowserConsole().then(() => {
|
||||
info("reopen the browser console");
|
||||
executeSoon(() =>
|
||||
HUDService.toggleBrowserConsole().then(onBrowserConsoleReopen));
|
||||
});
|
||||
});
|
||||
privateWindow.BrowserTryToCloseWindow();
|
||||
}
|
||||
|
||||
function onBrowserConsoleReopen(injectedHud) {
|
||||
hud = injectedHud;
|
||||
ok(hud, "browser console reopened");
|
||||
|
||||
// Make sure that the non-private message is still shown after reopen.
|
||||
waitForMessages({
|
||||
webconsole: hud,
|
||||
messages: [nonPrivateMessage],
|
||||
}).then(() => {
|
||||
// Make sure that no private message is displayed after closing the
|
||||
// private window and reopening the Browser Console.
|
||||
checkNoPrivateMessages();
|
||||
executeSoon(finishTest);
|
||||
});
|
||||
}
|
||||
function logPrivateMessages(browser) {
|
||||
ContentTask.spawn(browser, null, () => content.wrappedJSObject.logMessages());
|
||||
}
|
||||
|
||||
function assertNoPrivateMessages(hud) {
|
||||
is(findMessage(hud, PRIVATE_MESSAGE), null, "no console message displayed");
|
||||
is(findMessage(hud, PRIVATE_EXCEPTION), null, "no exception displayed");
|
||||
}
|
||||
|
|
|
@ -525,11 +525,12 @@ function simulateLinkClick(element, clickEventProps) {
|
|||
* Open a new browser window and return a promise that resolves when the new window has
|
||||
* fired the "browser-delayed-startup-finished" event.
|
||||
*
|
||||
* @param {Object} options: An options object that will be passed to OpenBrowserWindow.
|
||||
* @returns Promise
|
||||
* A Promise that resolves when the window is ready.
|
||||
*/
|
||||
function openNewBrowserWindow() {
|
||||
let win = OpenBrowserWindow();
|
||||
function openNewBrowserWindow(options) {
|
||||
let win = OpenBrowserWindow(options);
|
||||
return new Promise(resolve => {
|
||||
Services.obs.addObserver(function observer(subject, topic) {
|
||||
if (win == subject) {
|
||||
|
|
|
@ -45,6 +45,11 @@ const DOCS_GA_PARAMS = "?utm_source=mozilla" +
|
|||
|
||||
flags.testing = true;
|
||||
|
||||
Services.prefs.setBoolPref("devtools.browserconsole.new-frontend-enabled", false);
|
||||
registerCleanupFunction(async function () {
|
||||
Services.prefs.clearUserPref("devtools.browserconsole.new-frontend-enabled");
|
||||
});
|
||||
|
||||
function loadTab(url, preferredRemoteType) {
|
||||
return addTab(url, { preferredRemoteType }).then( tab => {
|
||||
return { tab, browser: tab.linkedBrowser };
|
||||
|
|
|
@ -1336,6 +1336,7 @@ var WalkerActor = protocol.ActorClassWithSpec(walkerSpec, {
|
|||
} else {
|
||||
range.selectNodeContents(rawNode);
|
||||
}
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
let docFrag = range.createContextualFragment(value);
|
||||
let newRawNodes = Array.from(docFrag.childNodes);
|
||||
switch (position) {
|
||||
|
|
|
@ -105,8 +105,6 @@ ShadowRoot::CloneInternalDataFrom(ShadowRoot* aOther)
|
|||
sheet->Clone(nullptr, nullptr, nullptr, nullptr);
|
||||
if (clonedSheet) {
|
||||
AppendStyleSheet(*clonedSheet.get());
|
||||
Servo_AuthorStyles_AppendStyleSheet(mServoStyles.get(),
|
||||
clonedSheet->AsServo());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -241,15 +239,42 @@ ShadowRoot::RemoveSlot(HTMLSlotElement* aSlot)
|
|||
}
|
||||
}
|
||||
|
||||
// FIXME(emilio): There's a bit of code duplication between this and the
|
||||
// equivalent ServoStyleSet methods, it'd be nice to not duplicate it...
|
||||
void
|
||||
ShadowRoot::StyleSheetChanged()
|
||||
ShadowRoot::RuleAdded(StyleSheet& aSheet, css::Rule& aRule)
|
||||
{
|
||||
// FIXME(emilio): This is not needed to handle sheet additions / removals,
|
||||
// only for CSSOM mutations, we should distinguish both.
|
||||
if (mStyleRuleMap) {
|
||||
mStyleRuleMap->RuleAdded(*aSheet.AsServo(), aRule);
|
||||
}
|
||||
|
||||
Servo_AuthorStyles_ForceDirty(mServoStyles.get());
|
||||
// FIXME(emilio): Similarly, we should notify of the particular mutation to
|
||||
// the rule map, instead of this...
|
||||
mStyleRuleMap.reset(nullptr);
|
||||
ApplicableRulesChanged();
|
||||
}
|
||||
|
||||
void
|
||||
ShadowRoot::RuleRemoved(StyleSheet& aSheet, css::Rule& aRule)
|
||||
{
|
||||
if (mStyleRuleMap) {
|
||||
mStyleRuleMap->RuleRemoved(*aSheet.AsServo(), aRule);
|
||||
}
|
||||
|
||||
Servo_AuthorStyles_ForceDirty(mServoStyles.get());
|
||||
ApplicableRulesChanged();
|
||||
}
|
||||
|
||||
void
|
||||
ShadowRoot::RuleChanged(StyleSheet&, css::Rule*) {
|
||||
Servo_AuthorStyles_ForceDirty(mServoStyles.get());
|
||||
ApplicableRulesChanged();
|
||||
}
|
||||
|
||||
void
|
||||
ShadowRoot::ApplicableRulesChanged()
|
||||
{
|
||||
if (!IsComposedDocParticipant()) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsIDocument* doc = OwnerDoc();
|
||||
if (nsIPresShell* shell = doc->GetShell()) {
|
||||
|
@ -260,6 +285,28 @@ ShadowRoot::StyleSheetChanged()
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
ShadowRoot::InsertSheetAt(size_t aIndex, StyleSheet& aSheet)
|
||||
{
|
||||
DocumentOrShadowRoot::InsertSheetAt(aIndex, aSheet);
|
||||
if (aSheet.IsApplicable()) {
|
||||
InsertSheetIntoAuthorData(aIndex, aSheet);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ShadowRoot::AppendStyleSheet(StyleSheet& aSheet)
|
||||
{
|
||||
DocumentOrShadowRoot::AppendStyleSheet(aSheet);
|
||||
if (aSheet.IsApplicable()) {
|
||||
Servo_AuthorStyles_AppendStyleSheet(mServoStyles.get(), aSheet.AsServo());
|
||||
if (mStyleRuleMap) {
|
||||
mStyleRuleMap->SheetAdded(*aSheet.AsServo());
|
||||
}
|
||||
ApplicableRulesChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ShadowRoot::InsertSheet(StyleSheet* aSheet, nsIContent* aLinkingContent)
|
||||
{
|
||||
|
@ -277,22 +324,58 @@ ShadowRoot::InsertSheet(StyleSheet* aSheet, nsIContent* aLinkingContent)
|
|||
for (size_t i = 0; i <= SheetCount(); i++) {
|
||||
if (i == SheetCount()) {
|
||||
AppendStyleSheet(*aSheet);
|
||||
Servo_AuthorStyles_AppendStyleSheet(mServoStyles.get(), aSheet->AsServo());
|
||||
break;
|
||||
return;
|
||||
}
|
||||
|
||||
StyleSheet* sheet = SheetAt(i);
|
||||
nsINode* sheetOwningNode = sheet->GetOwnerNode();
|
||||
if (nsContentUtils::PositionIsBefore(aLinkingContent, sheetOwningNode)) {
|
||||
InsertSheetAt(i, *aSheet);
|
||||
Servo_AuthorStyles_InsertStyleSheetBefore(
|
||||
mServoStyles.get(), aSheet->AsServo(), sheet->AsServo());
|
||||
break;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (aSheet->IsApplicable()) {
|
||||
StyleSheetChanged();
|
||||
void
|
||||
ShadowRoot::InsertSheetIntoAuthorData(size_t aIndex, StyleSheet& aSheet)
|
||||
{
|
||||
MOZ_ASSERT(SheetAt(aIndex) == &aSheet);
|
||||
MOZ_ASSERT(aSheet.IsApplicable());
|
||||
|
||||
if (mStyleRuleMap) {
|
||||
mStyleRuleMap->SheetAdded(*aSheet.AsServo());
|
||||
}
|
||||
|
||||
for (size_t i = aIndex + 1; i < SheetCount(); ++i) {
|
||||
StyleSheet* beforeSheet = SheetAt(i);
|
||||
if (!beforeSheet->IsApplicable()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Servo_AuthorStyles_InsertStyleSheetBefore(
|
||||
mServoStyles.get(), aSheet.AsServo(), beforeSheet->AsServo());
|
||||
ApplicableRulesChanged();
|
||||
return;
|
||||
}
|
||||
|
||||
Servo_AuthorStyles_AppendStyleSheet(mServoStyles.get(), aSheet.AsServo());
|
||||
ApplicableRulesChanged();
|
||||
}
|
||||
|
||||
void
|
||||
ShadowRoot::StyleSheetApplicableStateChanged(StyleSheet& aSheet, bool aApplicable)
|
||||
{
|
||||
MOZ_ASSERT(mStyleSheets.Contains(&aSheet));
|
||||
if (aApplicable) {
|
||||
int32_t index = IndexOfSheet(aSheet);
|
||||
MOZ_RELEASE_ASSERT(index >= 0);
|
||||
InsertSheetIntoAuthorData(size_t(index), aSheet);
|
||||
} else {
|
||||
if (mStyleRuleMap) {
|
||||
mStyleRuleMap->SheetRemoved(*aSheet.AsServo());
|
||||
}
|
||||
Servo_AuthorStyles_RemoveStyleSheet(mServoStyles.get(), aSheet.AsServo());
|
||||
ApplicableRulesChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -300,10 +383,12 @@ void
|
|||
ShadowRoot::RemoveSheet(StyleSheet* aSheet)
|
||||
{
|
||||
DocumentOrShadowRoot::RemoveSheet(*aSheet);
|
||||
Servo_AuthorStyles_RemoveStyleSheet(mServoStyles.get(), aSheet->AsServo());
|
||||
|
||||
if (aSheet->IsApplicable()) {
|
||||
StyleSheetChanged();
|
||||
if (mStyleRuleMap) {
|
||||
mStyleRuleMap->SheetRemoved(*aSheet->AsServo());
|
||||
}
|
||||
Servo_AuthorStyles_RemoveStyleSheet(mServoStyles.get(), aSheet->AsServo());
|
||||
ApplicableRulesChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,10 @@ namespace mozilla {
|
|||
|
||||
class EventChainPreVisitor;
|
||||
|
||||
namespace css {
|
||||
class Rule;
|
||||
}
|
||||
|
||||
namespace dom {
|
||||
|
||||
class Element;
|
||||
|
@ -81,9 +85,13 @@ public:
|
|||
return mMode == ShadowRootMode::Closed;
|
||||
}
|
||||
|
||||
// [deprecated] Shadow DOM v0
|
||||
void InsertSheet(StyleSheet* aSheet, nsIContent* aLinkingContent);
|
||||
void RemoveSheet(StyleSheet* aSheet);
|
||||
void RuleAdded(StyleSheet&, css::Rule&);
|
||||
void RuleRemoved(StyleSheet&, css::Rule&);
|
||||
void RuleChanged(StyleSheet&, css::Rule*);
|
||||
void StyleSheetApplicableStateChanged(StyleSheet&, bool aApplicable);
|
||||
|
||||
StyleSheetList* StyleSheets()
|
||||
{
|
||||
return &DocumentOrShadowRoot::EnsureDOMStyleSheets();
|
||||
|
@ -94,6 +102,10 @@ public:
|
|||
*/
|
||||
void CloneInternalDataFrom(ShadowRoot* aOther);
|
||||
private:
|
||||
void InsertSheetIntoAuthorData(size_t aIndex, StyleSheet&);
|
||||
|
||||
void InsertSheetAt(size_t aIndex, StyleSheet&);
|
||||
void AppendStyleSheet(StyleSheet&);
|
||||
|
||||
/**
|
||||
* Try to reassign an element to a slot and returns whether the assignment
|
||||
|
@ -155,9 +167,6 @@ public:
|
|||
return mServoStyles.get();
|
||||
}
|
||||
|
||||
// FIXME(emilio): This will need to become more fine-grained.
|
||||
void StyleSheetChanged();
|
||||
|
||||
mozilla::ServoStyleRuleMap& ServoStyleRuleMap();
|
||||
|
||||
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
@ -185,6 +194,9 @@ public:
|
|||
nsresult GetEventTargetParent(EventChainPreVisitor& aVisitor) override;
|
||||
|
||||
protected:
|
||||
// FIXME(emilio): This will need to become more fine-grained.
|
||||
void ApplicableRulesChanged();
|
||||
|
||||
virtual ~ShadowRoot();
|
||||
|
||||
const ShadowRootMode mMode;
|
||||
|
|
|
@ -167,6 +167,7 @@ const char* mozilla::dom::ContentPrefs::gEarlyPrefs[] = {
|
|||
"layout.css.isolation.enabled",
|
||||
"layout.css.mix-blend-mode.enabled",
|
||||
"layout.css.moz-document.content.enabled",
|
||||
"layout.css.moz-document.url-prefix-hack.enabled",
|
||||
"layout.css.osx-font-smoothing.enabled",
|
||||
"layout.css.overflow-clip-box.enabled",
|
||||
"layout.css.overscroll-behavior.enabled",
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "FileMediaResource.h"
|
||||
|
||||
#include "mozilla/AbstractThread.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsHostObjectProtocolHandler.h"
|
||||
#include "nsIFileChannel.h"
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "mozilla/SharedThreadPool.h"
|
||||
#include "mozilla/Unused.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include <math.h>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#ifndef mozilla_dom_MediaKeySession_h
|
||||
#define mozilla_dom_MediaKeySession_h
|
||||
|
||||
#include "DecoderDoctorLogger.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
|
|
|
@ -69,13 +69,10 @@ GetCSSFloatValue(nsComputedDOMStyle* aComputedStyle,
|
|||
return 0;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(value.Length() > 2, "Should always have a `px` suffix");
|
||||
|
||||
// We only care about resolved values, not a big deal if the element is
|
||||
// undisplayed, for example, and the value is "auto" or what not.
|
||||
int32_t val = value.ToInteger(&rv);
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv),
|
||||
"These properties should only get resolved values");
|
||||
|
||||
return val;
|
||||
return NS_SUCCEEDED(rv) ? val : 0;
|
||||
}
|
||||
|
||||
class ElementDeletionObserver final : public nsStubMutationObserver
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<script>
|
||||
function go() {
|
||||
document.execCommand("insertImage", false, "o")
|
||||
}
|
||||
</script>
|
||||
<body onload=go()>
|
||||
<meter contenteditable="true">
|
||||
<dialog>
|
|
@ -97,3 +97,4 @@ load 1408170.html
|
|||
load 1414581.html
|
||||
load 1415231.html
|
||||
load 1425091.html
|
||||
load 1446451.html
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "mozilla/Logging.h"
|
||||
#include "mozilla/intl/LocaleService.h"
|
||||
#include "mozilla/intl/MozLocale.h"
|
||||
#include "mozilla/intl/OSPreferences.h"
|
||||
|
||||
#include "gfxPlatformFontList.h"
|
||||
|
@ -33,6 +34,7 @@
|
|||
|
||||
using namespace mozilla;
|
||||
using mozilla::intl::LocaleService;
|
||||
using mozilla::intl::Locale;
|
||||
using mozilla::intl::OSPreferences;
|
||||
|
||||
#define LOG_FONTLIST(args) MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
|
||||
|
@ -1243,19 +1245,18 @@ gfxPlatformFontList::AppendCJKPrefLangs(eFontPrefLang aPrefLangs[], uint32_t &aL
|
|||
LocaleService::GetInstance()->GetAppLocaleAsLangTag(localeStr);
|
||||
|
||||
{
|
||||
const nsACString& lang = Substring(localeStr, 0, 2);
|
||||
if (lang.EqualsLiteral("ja")) {
|
||||
Locale locale(localeStr);
|
||||
if (locale.GetLanguage().Equals("ja")) {
|
||||
AppendPrefLang(tempPrefLangs, tempLen, eFontPrefLang_Japanese);
|
||||
} else if (lang.EqualsLiteral("zh")) {
|
||||
const nsACString& region = Substring(localeStr, 3, 2);
|
||||
if (region.EqualsLiteral("CN")) {
|
||||
} else if (locale.GetLanguage().Equals("zh")) {
|
||||
if (locale.GetRegion().Equals("CN")) {
|
||||
AppendPrefLang(tempPrefLangs, tempLen, eFontPrefLang_ChineseCN);
|
||||
} else if (region.EqualsLiteral("TW")) {
|
||||
} else if (locale.GetRegion().Equals("TW")) {
|
||||
AppendPrefLang(tempPrefLangs, tempLen, eFontPrefLang_ChineseTW);
|
||||
} else if (region.EqualsLiteral("HK")) {
|
||||
} else if (locale.GetRegion().Equals("HK")) {
|
||||
AppendPrefLang(tempPrefLangs, tempLen, eFontPrefLang_ChineseHK);
|
||||
}
|
||||
} else if (lang.EqualsLiteral("ko")) {
|
||||
} else if (locale.GetLanguage().Equals("ko")) {
|
||||
AppendPrefLang(tempPrefLangs, tempLen, eFontPrefLang_Korean);
|
||||
}
|
||||
}
|
||||
|
@ -1270,28 +1271,28 @@ gfxPlatformFontList::AppendCJKPrefLangs(eFontPrefLang aPrefLangs[], uint32_t &aL
|
|||
|
||||
AutoTArray<nsCString,16> sysLocales;
|
||||
AutoTArray<nsCString,16> negLocales;
|
||||
if (OSPreferences::GetInstance()->GetSystemLocales(sysLocales) &&
|
||||
if (OSPreferences::GetInstance()->GetSystemLocales(sysLocales)) {
|
||||
LocaleService::GetInstance()->NegotiateLanguages(
|
||||
sysLocales, prefLocales, NS_LITERAL_CSTRING(""),
|
||||
LocaleService::LangNegStrategy::Filtering, negLocales)) {
|
||||
LocaleService::LangNegStrategy::Filtering, negLocales);
|
||||
for (const auto& localeStr : negLocales) {
|
||||
const nsACString& lang = Substring(localeStr, 0, 2);
|
||||
if (lang.EqualsLiteral("ja")) {
|
||||
Locale locale(localeStr);
|
||||
|
||||
if (locale.GetLanguage().Equals("ja")) {
|
||||
AppendPrefLang(tempPrefLangs, tempLen,
|
||||
eFontPrefLang_Japanese);
|
||||
} else if (lang.EqualsLiteral("zh")) {
|
||||
const nsACString& region = Substring(localeStr, 3, 2);
|
||||
if (region.EqualsLiteral("CN")) {
|
||||
} else if (locale.GetLanguage().Equals("zh")) {
|
||||
if (locale.GetRegion().Equals("CN")) {
|
||||
AppendPrefLang(tempPrefLangs, tempLen,
|
||||
eFontPrefLang_ChineseCN);
|
||||
} else if (region.EqualsLiteral("TW")) {
|
||||
} else if (locale.GetRegion().Equals("TW")) {
|
||||
AppendPrefLang(tempPrefLangs, tempLen,
|
||||
eFontPrefLang_ChineseTW);
|
||||
} else if (region.EqualsLiteral("HK")) {
|
||||
} else if (locale.GetRegion().Equals("HK")) {
|
||||
AppendPrefLang(tempPrefLangs, tempLen,
|
||||
eFontPrefLang_ChineseHK);
|
||||
}
|
||||
} else if (lang.EqualsLiteral("ko")) {
|
||||
} else if (locale.GetLanguage().Equals("ko")) {
|
||||
AppendPrefLang(tempPrefLangs, tempLen,
|
||||
eFontPrefLang_Korean);
|
||||
}
|
||||
|
|
|
@ -432,6 +432,7 @@ LocaleService::FilterMatches(const nsTArray<nsCString>& aRequested,
|
|||
|
||||
for (auto& requested : aRequested) {
|
||||
if (requested.IsEmpty()) {
|
||||
MOZ_ASSERT(!requested.IsEmpty(), "Locale string cannot be empty.");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -504,32 +505,41 @@ LocaleService::FilterMatches(const nsTArray<nsCString>& aRequested,
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
LocaleService::NegotiateLanguages(const nsTArray<nsCString>& aRequested,
|
||||
const nsTArray<nsCString>& aAvailable,
|
||||
const nsACString& aDefaultLocale,
|
||||
LangNegStrategy aStrategy,
|
||||
nsTArray<nsCString>& aRetVal)
|
||||
{
|
||||
// If the strategy is Lookup, we require the defaultLocale to be set.
|
||||
MOZ_ASSERT(aDefaultLocale.IsEmpty() || Locale(aDefaultLocale).IsValid(),
|
||||
"If specified, default locale must be a valid BCP47 language tag.");
|
||||
|
||||
if (aStrategy == LangNegStrategy::Lookup && aDefaultLocale.IsEmpty()) {
|
||||
return false;
|
||||
NS_WARNING("Default locale should be specified when using lookup strategy.");
|
||||
}
|
||||
|
||||
FilterMatches(aRequested, aAvailable, aStrategy, aRetVal);
|
||||
|
||||
if (aStrategy == LangNegStrategy::Lookup) {
|
||||
// If the strategy is Lookup and Filtering returned no matches, use
|
||||
// the default locale.
|
||||
if (aRetVal.Length() == 0) {
|
||||
// If the strategy is Lookup and Filtering returned no matches, use
|
||||
// the default locale.
|
||||
aRetVal.AppendElement(aDefaultLocale);
|
||||
// If the default locale is empty, we already issued a warning, so
|
||||
// now we will just pick up the LocaleService's defaultLocale.
|
||||
if (aDefaultLocale.IsEmpty()) {
|
||||
nsAutoCString defaultLocale;
|
||||
GetDefaultLocale(defaultLocale);
|
||||
aRetVal.AppendElement(defaultLocale);
|
||||
} else {
|
||||
aRetVal.AppendElement(aDefaultLocale);
|
||||
}
|
||||
}
|
||||
} else if (!aDefaultLocale.IsEmpty() && !aRetVal.Contains(aDefaultLocale)) {
|
||||
// If it's not a Lookup strategy, add the default locale only if it's
|
||||
// set and it's not in the results already.
|
||||
aRetVal.AppendElement(aDefaultLocale);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -835,12 +845,8 @@ LocaleService::NegotiateLanguages(const char** aRequested,
|
|||
LangNegStrategy strategy = ToLangNegStrategy(aStrategy);
|
||||
|
||||
AutoTArray<nsCString, 100> supportedLocales;
|
||||
bool result = NegotiateLanguages(requestedLocales, availableLocales,
|
||||
defaultLocale, strategy, supportedLocales);
|
||||
|
||||
if (!result) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
NegotiateLanguages(requestedLocales, availableLocales,
|
||||
defaultLocale, strategy, supportedLocales);
|
||||
|
||||
*aRetVal =
|
||||
static_cast<char**>(moz_xmalloc(sizeof(char*) * supportedLocales.Length()));
|
||||
|
|
|
@ -243,7 +243,7 @@ public:
|
|||
*
|
||||
* (See mozILocaleService.idl for a JS-callable version of this.)
|
||||
*/
|
||||
bool NegotiateLanguages(const nsTArray<nsCString>& aRequested,
|
||||
void NegotiateLanguages(const nsTArray<nsCString>& aRequested,
|
||||
const nsTArray<nsCString>& aAvailable,
|
||||
const nsACString& aDefaultLocale,
|
||||
LangNegStrategy aLangNegStrategy,
|
||||
|
|
|
@ -18,6 +18,8 @@ using namespace mozilla::intl;
|
|||
*/
|
||||
Locale::Locale(const nsACString& aLocale)
|
||||
{
|
||||
MOZ_ASSERT(!aLocale.IsEmpty(), "Locale string cannot be empty");
|
||||
|
||||
int32_t position = 0;
|
||||
|
||||
if (!IsASCII(aLocale)) {
|
||||
|
|
|
@ -30,3 +30,24 @@ TEST(Intl_Locale_LocaleService, Negotiate) {
|
|||
ASSERT_TRUE(supportedLocales[0].EqualsLiteral("sr-Cyrl"));
|
||||
ASSERT_TRUE(supportedLocales[1].EqualsLiteral("en-US"));
|
||||
}
|
||||
|
||||
TEST(Intl_Locale_LocaleService, UseLSDefaultLocale) {
|
||||
nsTArray<nsCString> requestedLocales;
|
||||
nsTArray<nsCString> availableLocales;
|
||||
nsTArray<nsCString> supportedLocales;
|
||||
nsAutoCString defaultLocale("");
|
||||
LocaleService::LangNegStrategy strategy =
|
||||
LocaleService::LangNegStrategy::Lookup;
|
||||
|
||||
requestedLocales.AppendElement(NS_LITERAL_CSTRING("sr"));
|
||||
|
||||
availableLocales.AppendElement(NS_LITERAL_CSTRING("de"));
|
||||
|
||||
LocaleService::GetInstance()->NegotiateLanguages(
|
||||
requestedLocales, availableLocales, defaultLocale, strategy, supportedLocales);
|
||||
|
||||
nsAutoCString lsDefaultLocale;
|
||||
LocaleService::GetInstance()->GetDefaultLocale(lsDefaultLocale);
|
||||
ASSERT_TRUE(supportedLocales.Length() == 1);
|
||||
ASSERT_TRUE(supportedLocales[0].Equals(lsDefaultLocale));
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!doctype html>
|
||||
<style>
|
||||
div { color: green; }
|
||||
@-moz-document url-prefix() {
|
||||
@-moz-document url-prefix(foo) {
|
||||
div { color: red; }
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<!doctype html>
|
||||
<style>
|
||||
div { color: green; }
|
||||
@-moz-document url-prefix() {
|
||||
div { color: red; }
|
||||
}
|
||||
</style>
|
||||
<div>Should be green</div>
|
|
@ -0,0 +1,8 @@
|
|||
<!doctype html>
|
||||
<style>
|
||||
div { color: red; }
|
||||
@-moz-document url-prefix() {
|
||||
div { color: green; }
|
||||
}
|
||||
</style>
|
||||
<div>Should be green</div>
|
|
@ -2063,3 +2063,5 @@ test-pref(font.size.systemFontScale,200) == 1412743.html 1412743-ref.html
|
|||
fuzzy(74,2234) random-if(webrender) == 1425243-1.html 1425243-1-ref.html
|
||||
fuzzy-if(Android,66,574) fuzzy-if(d2d,89,777) fuzzy-if(!Android&&!d2d,1,31219) == 1425243-2.html 1425243-2-ref.html
|
||||
== 1432541.html 1432541-ref.html
|
||||
pref(layout.css.moz-document.url-prefix-hack.enabled,true) fails-if(!stylo||styloVsGecko) == 1446470.html 1035091-ref.html
|
||||
pref(layout.css.moz-document.url-prefix-hack.enabled,false) == 1446470-2.html 1035091-ref.html
|
||||
|
|
|
@ -20,6 +20,7 @@ bool StylePrefs::sFramesTimingFunctionEnabled;
|
|||
bool StylePrefs::sUnprefixedFullscreenApiEnabled;
|
||||
bool StylePrefs::sVisitedLinksEnabled;
|
||||
bool StylePrefs::sMozDocumentEnabledInContent;
|
||||
bool StylePrefs::sMozDocumentURLPrefixHackEnabled;
|
||||
bool StylePrefs::sGridTemplateSubgridValueEnabled;
|
||||
bool StylePrefs::sFontVariationsEnabled;
|
||||
bool StylePrefs::sEmulateMozBoxWithFlex;
|
||||
|
@ -47,6 +48,8 @@ StylePrefs::Init()
|
|||
"layout.css.visited_links_enabled");
|
||||
Preferences::AddBoolVarCache(&sMozDocumentEnabledInContent,
|
||||
"layout.css.moz-document.content.enabled");
|
||||
Preferences::AddBoolVarCache(&sMozDocumentURLPrefixHackEnabled,
|
||||
"layout.css.moz-document.url-prefix-hack.enabled");
|
||||
Preferences::AddBoolVarCache(&sGridTemplateSubgridValueEnabled,
|
||||
"layout.css.grid-template-subgrid-value.enabled");
|
||||
Preferences::AddBoolVarCache(&sFontVariationsEnabled,
|
||||
|
|
|
@ -23,6 +23,7 @@ struct StylePrefs
|
|||
static bool sUnprefixedFullscreenApiEnabled;
|
||||
static bool sVisitedLinksEnabled;
|
||||
static bool sMozDocumentEnabledInContent;
|
||||
static bool sMozDocumentURLPrefixHackEnabled;
|
||||
static bool sGridTemplateSubgridValueEnabled;
|
||||
static bool sFontVariationsEnabled;
|
||||
static bool sEmulateMozBoxWithFlex;
|
||||
|
|
|
@ -212,18 +212,22 @@ StyleSheet::SetComplete()
|
|||
"Can't complete a sheet that's already been forced "
|
||||
"unique.");
|
||||
SheetInfo().mComplete = true;
|
||||
if (mDocument && !mDisabled) {
|
||||
// Let the document know
|
||||
if (!mDisabled) {
|
||||
ApplicableStateChanged(true);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
StyleSheet::ApplicableStateChanged(bool aApplicable)
|
||||
{
|
||||
if (mDocument) {
|
||||
mDocument->BeginUpdate(UPDATE_STYLE);
|
||||
mDocument->SetStyleSheetApplicableState(this, true);
|
||||
mDocument->SetStyleSheetApplicableState(this, aApplicable);
|
||||
mDocument->EndUpdate(UPDATE_STYLE);
|
||||
}
|
||||
|
||||
if (mOwningNode && !mDisabled &&
|
||||
mOwningNode->HasFlag(NODE_IS_IN_SHADOW_TREE) &&
|
||||
mOwningNode->IsContent()) {
|
||||
dom::ShadowRoot* shadowRoot = mOwningNode->AsContent()->GetContainingShadow();
|
||||
shadowRoot->StyleSheetChanged();
|
||||
if (dom::ShadowRoot* shadow = GetContainingShadow()) {
|
||||
shadow->StyleSheetApplicableStateChanged(*this, aApplicable);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -236,10 +240,7 @@ StyleSheet::SetEnabled(bool aEnabled)
|
|||
|
||||
if (IsComplete() && oldDisabled != mDisabled) {
|
||||
EnabledStateChanged();
|
||||
|
||||
if (mDocument) {
|
||||
mDocument->SetStyleSheetApplicableState(this, !mDisabled);
|
||||
}
|
||||
ApplicableStateChanged(!mDisabled);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -551,12 +552,25 @@ StyleSheet::DeleteRuleFromGroup(css::GroupRule* aGroup, uint32_t aIndex)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#define NOTIFY_STYLE_SETS(function_, args_) do { \
|
||||
dom::ShadowRoot*
|
||||
StyleSheet::GetContainingShadow() const
|
||||
{
|
||||
if (!mOwningNode || !mOwningNode->IsContent()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return mOwningNode->AsContent()->GetContainingShadow();
|
||||
}
|
||||
|
||||
#define NOTIFY(function_, args_) do { \
|
||||
StyleSheet* current = this; \
|
||||
do { \
|
||||
for (StyleSetHandle handle : current->mStyleSets) { \
|
||||
handle->function_ args_; \
|
||||
} \
|
||||
if (auto* shadow = current->GetContainingShadow()) { \
|
||||
shadow->function_ args_; \
|
||||
} \
|
||||
current = current->mParent; \
|
||||
} while (current); \
|
||||
} while (0)
|
||||
|
@ -566,7 +580,7 @@ StyleSheet::RuleAdded(css::Rule& aRule)
|
|||
{
|
||||
DidDirty();
|
||||
mDirtyFlags |= MODIFIED_RULES;
|
||||
NOTIFY_STYLE_SETS(RuleAdded, (*this, aRule));
|
||||
NOTIFY(RuleAdded, (*this, aRule));
|
||||
|
||||
if (mDocument) {
|
||||
mDocument->StyleRuleAdded(this, &aRule);
|
||||
|
@ -578,7 +592,7 @@ StyleSheet::RuleRemoved(css::Rule& aRule)
|
|||
{
|
||||
DidDirty();
|
||||
mDirtyFlags |= MODIFIED_RULES;
|
||||
NOTIFY_STYLE_SETS(RuleRemoved, (*this, aRule));
|
||||
NOTIFY(RuleRemoved, (*this, aRule));
|
||||
|
||||
if (mDocument) {
|
||||
mDocument->StyleRuleRemoved(this, &aRule);
|
||||
|
@ -590,7 +604,7 @@ StyleSheet::RuleChanged(css::Rule* aRule)
|
|||
{
|
||||
DidDirty();
|
||||
mDirtyFlags |= MODIFIED_RULES;
|
||||
NOTIFY_STYLE_SETS(RuleChanged, (*this, aRule));
|
||||
NOTIFY(RuleChanged, (*this, aRule));
|
||||
|
||||
if (mDocument) {
|
||||
mDocument->StyleRuleChanged(this, aRule);
|
||||
|
|
|
@ -33,6 +33,7 @@ namespace dom {
|
|||
class CSSImportRule;
|
||||
class CSSRuleList;
|
||||
class MediaList;
|
||||
class ShadowRoot;
|
||||
class SRIMetadata;
|
||||
} // namespace dom
|
||||
|
||||
|
@ -278,6 +279,8 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
dom::ShadowRoot* GetContainingShadow() const;
|
||||
|
||||
// Get a handle to the various stylesheet bits which live on the 'inner' for
|
||||
// gecko stylesheets and live on the StyleSheet for Servo stylesheets.
|
||||
inline StyleSheetInfo& SheetInfo();
|
||||
|
@ -297,6 +300,8 @@ protected:
|
|||
// Called when a rule is added to the sheet from CSSOM.
|
||||
void RuleRemoved(css::Rule&);
|
||||
|
||||
void ApplicableStateChanged(bool aApplicable);
|
||||
|
||||
// Called from SetEnabled when the enabled state changed.
|
||||
void EnabledStateChanged();
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<script>
|
||||
function go() {
|
||||
let host = document.createElement('div');
|
||||
let style_1 = document.createElement('style');
|
||||
let style_2 = document.createElement('style');
|
||||
let otherElement = document.createElement('div');
|
||||
let shadowRoot = host.attachShadow({mode: "open"});
|
||||
style_1.title = 'x';
|
||||
style_2.title = 'y';
|
||||
document.head.appendChild(style_1);
|
||||
shadowRoot.appendChild(style_2);
|
||||
document.documentElement.appendChild(otherElement);
|
||||
otherElement.before('', host, '');
|
||||
}
|
||||
window.addEventListener('load', go)
|
||||
</script>
|
|
@ -271,3 +271,4 @@ pref(dom.webcomponents.shadowdom.enabled,true) load 1419554.html
|
|||
load 1426312.html
|
||||
load 1439793.html
|
||||
load 1409183.html
|
||||
pref(dom.webcomponents.shadowdom.enabled,true) load 1445682.html
|
||||
|
|
|
@ -67,6 +67,13 @@ list of domains:
|
|||
* Remove any URL shorteners and redirecters.
|
||||
* Remove any content/CDN domains. Some sites use separate domains to store images and other static
|
||||
content.
|
||||
* Remove any site that routinely publish fake or misleading content.
|
||||
* Remove any site that degrades, intimidates, incites violence against, or encourages prejudicial
|
||||
action against someone or a group based on age, gender, race, ethnicity, national origin,
|
||||
religion, sexual orientation, disability, religion, geographic location or other protected
|
||||
category or constitutes hate speech.
|
||||
* Remove any site that harms users such as by using viruses, spyware or malware, worms, trojan
|
||||
horses, time bombs or any other such malicious codes or instructions.
|
||||
|
||||
Guidelines for Adult Content
|
||||
============================
|
||||
|
|
|
@ -225,7 +225,11 @@ pref("dom.gamepad.haptic_feedback.enabled", true);
|
|||
// If this is true, TextEventDispatcher dispatches keydown and keyup events
|
||||
// even during composition (keypress events are never fired during composition
|
||||
// even if this is true).
|
||||
#ifdef EARLY_BETA_OR_EARLIER
|
||||
pref("dom.keyboardevent.dispatch_during_composition", true);
|
||||
#else
|
||||
pref("dom.keyboardevent.dispatch_during_composition", false);
|
||||
#endif
|
||||
|
||||
// If this is true, TextEventDispatcher dispatches keypress event with setting
|
||||
// WidgetEvent::mFlags::mOnlySystemGroupDispatchInContent to true if it won't
|
||||
|
@ -2958,6 +2962,14 @@ pref("layout.css.visited_links_enabled", true);
|
|||
// Pref to control whether @-moz-document rules are enabled in content pages.
|
||||
pref("layout.css.moz-document.content.enabled", false);
|
||||
|
||||
// Pref to control whether @-moz-document url-prefix() is parsed in content
|
||||
// pages. Only effective when layout.css.moz-document.content.enabled is false.
|
||||
#ifdef EARLY_BETA_OR_EARLIER
|
||||
pref("layout.css.moz-document.url-prefix-hack.enabled", false);
|
||||
#else
|
||||
pref("layout.css.moz-document.url-prefix-hack.enabled", true);
|
||||
#endif
|
||||
|
||||
// Override DPI. A value of -1 means use the maximum of 96 and the system DPI.
|
||||
// A value of 0 means use the system DPI. A positive value is used as the DPI.
|
||||
// This sets the physical size of a device pixel and thus controls the
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"acorn": {
|
||||
"version": "5.4.1",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.4.1.tgz",
|
||||
"integrity": "sha512-XLmq3H/BVvW6/GbxKryGxWORz1ebilSsUDlyC27bXhWGWAZWkGwS6FLHjOlwFXNFoWFQEO/Df4u0YYd0K3BQgQ=="
|
||||
"version": "5.5.3",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz",
|
||||
"integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ=="
|
||||
},
|
||||
"acorn-jsx": {
|
||||
"version": "3.0.1",
|
||||
|
@ -29,7 +29,7 @@
|
|||
"integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
|
||||
"requires": {
|
||||
"co": "4.6.0",
|
||||
"fast-deep-equal": "1.0.0",
|
||||
"fast-deep-equal": "1.1.0",
|
||||
"fast-json-stable-stringify": "2.0.0",
|
||||
"json-schema-traverse": "0.3.1"
|
||||
}
|
||||
|
@ -140,27 +140,27 @@
|
|||
"integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo="
|
||||
},
|
||||
"chalk": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz",
|
||||
"integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==",
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz",
|
||||
"integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==",
|
||||
"requires": {
|
||||
"ansi-styles": "3.2.0",
|
||||
"ansi-styles": "3.2.1",
|
||||
"escape-string-regexp": "1.0.5",
|
||||
"supports-color": "5.2.0"
|
||||
"supports-color": "5.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-styles": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz",
|
||||
"integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==",
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||
"requires": {
|
||||
"color-convert": "1.9.1"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz",
|
||||
"integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==",
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz",
|
||||
"integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==",
|
||||
"requires": {
|
||||
"has-flag": "3.0.0"
|
||||
}
|
||||
|
@ -195,11 +195,6 @@
|
|||
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
|
||||
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
|
||||
},
|
||||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
|
||||
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz",
|
||||
|
@ -219,12 +214,12 @@
|
|||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||
},
|
||||
"concat-stream": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz",
|
||||
"integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=",
|
||||
"version": "1.6.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz",
|
||||
"integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==",
|
||||
"requires": {
|
||||
"inherits": "2.0.3",
|
||||
"readable-stream": "2.3.4",
|
||||
"readable-stream": "2.3.5",
|
||||
"typedarray": "0.0.6"
|
||||
}
|
||||
},
|
||||
|
@ -238,19 +233,11 @@
|
|||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
|
||||
"integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
|
||||
"requires": {
|
||||
"lru-cache": "4.1.1",
|
||||
"lru-cache": "4.1.2",
|
||||
"shebang-command": "1.2.0",
|
||||
"which": "1.3.0"
|
||||
}
|
||||
},
|
||||
"d": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
|
||||
"integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
|
||||
"requires": {
|
||||
"es5-ext": "0.10.39"
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
|
||||
|
@ -329,101 +316,26 @@
|
|||
"resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz",
|
||||
"integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA="
|
||||
},
|
||||
"es5-ext": {
|
||||
"version": "0.10.39",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.39.tgz",
|
||||
"integrity": "sha512-AlaXZhPHl0po/uxMx1tyrlt1O86M6D5iVaDH8UgLfgek4kXTX6vzsRfJQWC2Ku+aG8pkw1XWzh9eTkwfVrsD5g==",
|
||||
"requires": {
|
||||
"es6-iterator": "2.0.3",
|
||||
"es6-symbol": "3.1.1"
|
||||
}
|
||||
},
|
||||
"es6-iterator": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
|
||||
"integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
|
||||
"requires": {
|
||||
"d": "1.0.0",
|
||||
"es5-ext": "0.10.39",
|
||||
"es6-symbol": "3.1.1"
|
||||
}
|
||||
},
|
||||
"es6-map": {
|
||||
"version": "0.1.5",
|
||||
"resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz",
|
||||
"integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=",
|
||||
"requires": {
|
||||
"d": "1.0.0",
|
||||
"es5-ext": "0.10.39",
|
||||
"es6-iterator": "2.0.3",
|
||||
"es6-set": "0.1.5",
|
||||
"es6-symbol": "3.1.1",
|
||||
"event-emitter": "0.3.5"
|
||||
}
|
||||
},
|
||||
"es6-set": {
|
||||
"version": "0.1.5",
|
||||
"resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz",
|
||||
"integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=",
|
||||
"requires": {
|
||||
"d": "1.0.0",
|
||||
"es5-ext": "0.10.39",
|
||||
"es6-iterator": "2.0.3",
|
||||
"es6-symbol": "3.1.1",
|
||||
"event-emitter": "0.3.5"
|
||||
}
|
||||
},
|
||||
"es6-symbol": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
|
||||
"integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
|
||||
"requires": {
|
||||
"d": "1.0.0",
|
||||
"es5-ext": "0.10.39"
|
||||
}
|
||||
},
|
||||
"es6-weak-map": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz",
|
||||
"integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=",
|
||||
"requires": {
|
||||
"d": "1.0.0",
|
||||
"es5-ext": "0.10.39",
|
||||
"es6-iterator": "2.0.3",
|
||||
"es6-symbol": "3.1.1"
|
||||
}
|
||||
},
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
|
||||
},
|
||||
"escope": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz",
|
||||
"integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=",
|
||||
"requires": {
|
||||
"es6-map": "0.1.5",
|
||||
"es6-weak-map": "2.0.2",
|
||||
"esrecurse": "4.2.0",
|
||||
"estraverse": "4.2.0"
|
||||
}
|
||||
},
|
||||
"eslint": {
|
||||
"version": "4.18.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-4.18.1.tgz",
|
||||
"integrity": "sha512-gPSfpSRCHre1GLxGmO68tZNxOlL2y7xBd95VcLD+Eo4S2js31YoMum3CAQIOaxY24hqYOMksMvW38xuuWKQTgw==",
|
||||
"version": "4.18.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-4.18.2.tgz",
|
||||
"integrity": "sha512-qy4i3wODqKMYfz9LUI8N2qYDkHkoieTbiHpMrYUI/WbjhXJQr7lI4VngixTgaG+yHX+NBCv7nW4hA0ShbvaNKw==",
|
||||
"requires": {
|
||||
"ajv": "5.5.2",
|
||||
"babel-code-frame": "6.26.0",
|
||||
"chalk": "2.3.1",
|
||||
"concat-stream": "1.6.0",
|
||||
"chalk": "2.3.2",
|
||||
"concat-stream": "1.6.1",
|
||||
"cross-spawn": "5.1.0",
|
||||
"debug": "3.1.0",
|
||||
"doctrine": "2.1.0",
|
||||
"eslint-scope": "3.7.1",
|
||||
"eslint-visitor-keys": "1.0.0",
|
||||
"espree": "3.5.3",
|
||||
"espree": "3.5.4",
|
||||
"esquery": "1.0.0",
|
||||
"esutils": "2.0.2",
|
||||
"file-entry-cache": "2.0.0",
|
||||
|
@ -434,7 +346,7 @@
|
|||
"imurmurhash": "0.1.4",
|
||||
"inquirer": "3.3.0",
|
||||
"is-resolvable": "1.1.0",
|
||||
"js-yaml": "3.10.0",
|
||||
"js-yaml": "3.11.0",
|
||||
"json-stable-stringify-without-jsonify": "1.0.1",
|
||||
"levn": "0.3.0",
|
||||
"lodash": "4.17.5",
|
||||
|
@ -469,247 +381,9 @@
|
|||
}
|
||||
},
|
||||
"eslint-plugin-no-unsanitized": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-no-unsanitized/-/eslint-plugin-no-unsanitized-2.0.2.tgz",
|
||||
"integrity": "sha1-pCqDybPZOGEB1v1pFcQXWfp6N/c=",
|
||||
"requires": {
|
||||
"eslint": "3.19.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ajv": {
|
||||
"version": "4.11.8",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
|
||||
"integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=",
|
||||
"requires": {
|
||||
"co": "4.6.0",
|
||||
"json-stable-stringify": "1.0.1"
|
||||
}
|
||||
},
|
||||
"ajv-keywords": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz",
|
||||
"integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw="
|
||||
},
|
||||
"ansi-escapes": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz",
|
||||
"integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4="
|
||||
},
|
||||
"chalk": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
||||
"requires": {
|
||||
"ansi-styles": "2.2.1",
|
||||
"escape-string-regexp": "1.0.5",
|
||||
"has-ansi": "2.0.0",
|
||||
"strip-ansi": "3.0.1",
|
||||
"supports-color": "2.0.0"
|
||||
}
|
||||
},
|
||||
"cli-cursor": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz",
|
||||
"integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=",
|
||||
"requires": {
|
||||
"restore-cursor": "1.0.1"
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"eslint": {
|
||||
"version": "3.19.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-3.19.0.tgz",
|
||||
"integrity": "sha1-yPxiAcf0DdCJQbh8CFdnOGpnmsw=",
|
||||
"requires": {
|
||||
"babel-code-frame": "6.26.0",
|
||||
"chalk": "1.1.3",
|
||||
"concat-stream": "1.6.0",
|
||||
"debug": "2.6.9",
|
||||
"doctrine": "2.1.0",
|
||||
"escope": "3.6.0",
|
||||
"espree": "3.5.3",
|
||||
"esquery": "1.0.0",
|
||||
"estraverse": "4.2.0",
|
||||
"esutils": "2.0.2",
|
||||
"file-entry-cache": "2.0.0",
|
||||
"glob": "7.1.2",
|
||||
"globals": "9.18.0",
|
||||
"ignore": "3.3.7",
|
||||
"imurmurhash": "0.1.4",
|
||||
"inquirer": "0.12.0",
|
||||
"is-my-json-valid": "2.17.2",
|
||||
"is-resolvable": "1.1.0",
|
||||
"js-yaml": "3.10.0",
|
||||
"json-stable-stringify": "1.0.1",
|
||||
"levn": "0.3.0",
|
||||
"lodash": "4.17.5",
|
||||
"mkdirp": "0.5.1",
|
||||
"natural-compare": "1.4.0",
|
||||
"optionator": "0.8.2",
|
||||
"path-is-inside": "1.0.2",
|
||||
"pluralize": "1.2.1",
|
||||
"progress": "1.1.8",
|
||||
"require-uncached": "1.0.3",
|
||||
"shelljs": "0.7.8",
|
||||
"strip-bom": "3.0.0",
|
||||
"strip-json-comments": "2.0.1",
|
||||
"table": "3.8.3",
|
||||
"text-table": "0.2.0",
|
||||
"user-home": "2.0.0"
|
||||
}
|
||||
},
|
||||
"figures": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
|
||||
"integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=",
|
||||
"requires": {
|
||||
"escape-string-regexp": "1.0.5",
|
||||
"object-assign": "4.1.1"
|
||||
}
|
||||
},
|
||||
"globals": {
|
||||
"version": "9.18.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
|
||||
"integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ=="
|
||||
},
|
||||
"inquirer": {
|
||||
"version": "0.12.0",
|
||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz",
|
||||
"integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=",
|
||||
"requires": {
|
||||
"ansi-escapes": "1.4.0",
|
||||
"ansi-regex": "2.1.1",
|
||||
"chalk": "1.1.3",
|
||||
"cli-cursor": "1.0.2",
|
||||
"cli-width": "2.2.0",
|
||||
"figures": "1.7.0",
|
||||
"lodash": "4.17.5",
|
||||
"readline2": "1.0.1",
|
||||
"run-async": "0.1.0",
|
||||
"rx-lite": "3.1.2",
|
||||
"string-width": "1.0.2",
|
||||
"strip-ansi": "3.0.1",
|
||||
"through": "2.3.8"
|
||||
}
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
|
||||
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
|
||||
"requires": {
|
||||
"number-is-nan": "1.0.1"
|
||||
}
|
||||
},
|
||||
"onetime": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
|
||||
"integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k="
|
||||
},
|
||||
"pluralize": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz",
|
||||
"integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU="
|
||||
},
|
||||
"progress": {
|
||||
"version": "1.1.8",
|
||||
"resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz",
|
||||
"integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74="
|
||||
},
|
||||
"restore-cursor": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz",
|
||||
"integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=",
|
||||
"requires": {
|
||||
"exit-hook": "1.1.1",
|
||||
"onetime": "1.1.0"
|
||||
}
|
||||
},
|
||||
"run-async": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz",
|
||||
"integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=",
|
||||
"requires": {
|
||||
"once": "1.4.0"
|
||||
}
|
||||
},
|
||||
"rx-lite": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz",
|
||||
"integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI="
|
||||
},
|
||||
"slice-ansi": {
|
||||
"version": "0.0.4",
|
||||
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz",
|
||||
"integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU="
|
||||
},
|
||||
"string-width": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
|
||||
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
||||
"requires": {
|
||||
"code-point-at": "1.1.0",
|
||||
"is-fullwidth-code-point": "1.0.0",
|
||||
"strip-ansi": "3.0.1"
|
||||
}
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"requires": {
|
||||
"ansi-regex": "2.1.1"
|
||||
}
|
||||
},
|
||||
"table": {
|
||||
"version": "3.8.3",
|
||||
"resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz",
|
||||
"integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=",
|
||||
"requires": {
|
||||
"ajv": "4.11.8",
|
||||
"ajv-keywords": "1.5.1",
|
||||
"chalk": "1.1.3",
|
||||
"lodash": "4.17.5",
|
||||
"slice-ansi": "0.0.4",
|
||||
"string-width": "2.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-regex": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
|
||||
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
|
||||
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
|
||||
},
|
||||
"string-width": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
|
||||
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
|
||||
"requires": {
|
||||
"is-fullwidth-code-point": "2.0.0",
|
||||
"strip-ansi": "4.0.0"
|
||||
}
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
|
||||
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
|
||||
"requires": {
|
||||
"ansi-regex": "3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-no-unsanitized/-/eslint-plugin-no-unsanitized-3.0.0.tgz",
|
||||
"integrity": "sha1-FEi1LN14cfF0PCkAEXuwh8/nuAY="
|
||||
},
|
||||
"eslint-plugin-react": {
|
||||
"version": "7.1.0",
|
||||
|
@ -729,7 +403,7 @@
|
|||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz",
|
||||
"integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=",
|
||||
"requires": {
|
||||
"esrecurse": "4.2.0",
|
||||
"esrecurse": "4.2.1",
|
||||
"estraverse": "4.2.0"
|
||||
}
|
||||
},
|
||||
|
@ -739,11 +413,11 @@
|
|||
"integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ=="
|
||||
},
|
||||
"espree": {
|
||||
"version": "3.5.3",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-3.5.3.tgz",
|
||||
"integrity": "sha512-Zy3tAJDORxQZLl2baguiRU1syPERAIg0L+JB2MWorORgTu/CplzvxS9WWA7Xh4+Q+eOQihNs/1o1Xep8cvCxWQ==",
|
||||
"version": "3.5.4",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz",
|
||||
"integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==",
|
||||
"requires": {
|
||||
"acorn": "5.4.1",
|
||||
"acorn": "5.5.3",
|
||||
"acorn-jsx": "3.0.1"
|
||||
}
|
||||
},
|
||||
|
@ -761,12 +435,11 @@
|
|||
}
|
||||
},
|
||||
"esrecurse": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz",
|
||||
"integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=",
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz",
|
||||
"integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==",
|
||||
"requires": {
|
||||
"estraverse": "4.2.0",
|
||||
"object-assign": "4.1.1"
|
||||
"estraverse": "4.2.0"
|
||||
}
|
||||
},
|
||||
"estraverse": {
|
||||
|
@ -779,20 +452,6 @@
|
|||
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
|
||||
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs="
|
||||
},
|
||||
"event-emitter": {
|
||||
"version": "0.3.5",
|
||||
"resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
|
||||
"integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=",
|
||||
"requires": {
|
||||
"d": "1.0.0",
|
||||
"es5-ext": "0.10.39"
|
||||
}
|
||||
},
|
||||
"exit-hook": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz",
|
||||
"integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g="
|
||||
},
|
||||
"external-editor": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.1.0.tgz",
|
||||
|
@ -804,9 +463,9 @@
|
|||
}
|
||||
},
|
||||
"fast-deep-equal": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz",
|
||||
"integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8="
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
|
||||
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ="
|
||||
},
|
||||
"fast-json-stable-stringify": {
|
||||
"version": "2.0.0",
|
||||
|
@ -861,19 +520,6 @@
|
|||
"resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
|
||||
"integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc="
|
||||
},
|
||||
"generate-function": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz",
|
||||
"integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ="
|
||||
},
|
||||
"generate-object-property": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz",
|
||||
"integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=",
|
||||
"requires": {
|
||||
"is-property": "1.0.2"
|
||||
}
|
||||
},
|
||||
"glob": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
|
||||
|
@ -941,7 +587,7 @@
|
|||
"domutils": "1.7.0",
|
||||
"entities": "1.1.1",
|
||||
"inherits": "2.0.3",
|
||||
"readable-stream": "2.3.4"
|
||||
"readable-stream": "2.3.5"
|
||||
}
|
||||
},
|
||||
"iconv-lite": {
|
||||
|
@ -984,7 +630,7 @@
|
|||
"integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==",
|
||||
"requires": {
|
||||
"ansi-escapes": "3.0.0",
|
||||
"chalk": "2.3.1",
|
||||
"chalk": "2.3.2",
|
||||
"cli-cursor": "2.1.0",
|
||||
"cli-width": "2.2.0",
|
||||
"external-editor": "2.1.0",
|
||||
|
@ -999,33 +645,11 @@
|
|||
"through": "2.3.8"
|
||||
}
|
||||
},
|
||||
"interpret": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz",
|
||||
"integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ="
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
|
||||
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
|
||||
},
|
||||
"is-my-ip-valid": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz",
|
||||
"integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ=="
|
||||
},
|
||||
"is-my-json-valid": {
|
||||
"version": "2.17.2",
|
||||
"resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz",
|
||||
"integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==",
|
||||
"requires": {
|
||||
"generate-function": "2.0.0",
|
||||
"generate-object-property": "1.2.0",
|
||||
"is-my-ip-valid": "1.0.0",
|
||||
"jsonpointer": "4.0.1",
|
||||
"xtend": "4.0.1"
|
||||
}
|
||||
},
|
||||
"is-path-cwd": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz",
|
||||
|
@ -1052,11 +676,6 @@
|
|||
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz",
|
||||
"integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o="
|
||||
},
|
||||
"is-property": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
|
||||
"integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ="
|
||||
},
|
||||
"is-resolvable": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz",
|
||||
|
@ -1078,9 +697,9 @@
|
|||
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls="
|
||||
},
|
||||
"js-yaml": {
|
||||
"version": "3.10.0",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz",
|
||||
"integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==",
|
||||
"version": "3.11.0",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz",
|
||||
"integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==",
|
||||
"requires": {
|
||||
"argparse": "1.0.10",
|
||||
"esprima": "4.0.0"
|
||||
|
@ -1091,29 +710,11 @@
|
|||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
|
||||
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A="
|
||||
},
|
||||
"json-stable-stringify": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
|
||||
"integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=",
|
||||
"requires": {
|
||||
"jsonify": "0.0.0"
|
||||
}
|
||||
},
|
||||
"json-stable-stringify-without-jsonify": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
|
||||
"integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE="
|
||||
},
|
||||
"jsonify": {
|
||||
"version": "0.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
|
||||
"integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM="
|
||||
},
|
||||
"jsonpointer": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz",
|
||||
"integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk="
|
||||
},
|
||||
"jsx-ast-utils": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz",
|
||||
|
@ -1134,9 +735,9 @@
|
|||
"integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw=="
|
||||
},
|
||||
"lru-cache": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz",
|
||||
"integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==",
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz",
|
||||
"integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==",
|
||||
"requires": {
|
||||
"pseudomap": "1.0.2",
|
||||
"yallist": "2.1.2"
|
||||
|
@ -1183,11 +784,6 @@
|
|||
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
|
||||
"integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc="
|
||||
},
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
|
||||
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||
|
@ -1222,11 +818,6 @@
|
|||
"wordwrap": "1.0.0"
|
||||
}
|
||||
},
|
||||
"os-homedir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
||||
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
|
||||
},
|
||||
"os-tmpdir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
||||
|
@ -1242,11 +833,6 @@
|
|||
"resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",
|
||||
"integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM="
|
||||
},
|
||||
"path-parse": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
|
||||
"integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME="
|
||||
},
|
||||
"pify": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||
|
@ -1291,9 +877,9 @@
|
|||
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.4.tgz",
|
||||
"integrity": "sha512-vuYxeWYM+fde14+rajzqgeohAI7YoJcHE7kXDAc4Nk0EbuKnJfqtY9YtRkLo/tqkuF7MsBQRhPnPeyjYITp3ZQ==",
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz",
|
||||
"integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==",
|
||||
"requires": {
|
||||
"core-util-is": "1.0.2",
|
||||
"inherits": "2.0.3",
|
||||
|
@ -1304,39 +890,6 @@
|
|||
"util-deprecate": "1.0.2"
|
||||
}
|
||||
},
|
||||
"readline2": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz",
|
||||
"integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=",
|
||||
"requires": {
|
||||
"code-point-at": "1.1.0",
|
||||
"is-fullwidth-code-point": "1.0.0",
|
||||
"mute-stream": "0.0.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
|
||||
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
|
||||
"requires": {
|
||||
"number-is-nan": "1.0.1"
|
||||
}
|
||||
},
|
||||
"mute-stream": {
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz",
|
||||
"integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA="
|
||||
}
|
||||
}
|
||||
},
|
||||
"rechoir": {
|
||||
"version": "0.6.2",
|
||||
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
|
||||
"integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
|
||||
"requires": {
|
||||
"resolve": "1.5.0"
|
||||
}
|
||||
},
|
||||
"require-uncached": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz",
|
||||
|
@ -1346,14 +899,6 @@
|
|||
"resolve-from": "1.0.1"
|
||||
}
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz",
|
||||
"integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==",
|
||||
"requires": {
|
||||
"path-parse": "1.0.5"
|
||||
}
|
||||
},
|
||||
"resolve-from": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz",
|
||||
|
@ -1425,16 +970,6 @@
|
|||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
|
||||
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
|
||||
},
|
||||
"shelljs": {
|
||||
"version": "0.7.8",
|
||||
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz",
|
||||
"integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=",
|
||||
"requires": {
|
||||
"glob": "7.1.2",
|
||||
"interpret": "1.1.0",
|
||||
"rechoir": "0.6.2"
|
||||
}
|
||||
},
|
||||
"signal-exit": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
||||
|
@ -1485,11 +1020,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"strip-bom": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
|
||||
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM="
|
||||
},
|
||||
"strip-json-comments": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
||||
|
@ -1507,7 +1037,7 @@
|
|||
"requires": {
|
||||
"ajv": "5.5.2",
|
||||
"ajv-keywords": "2.1.1",
|
||||
"chalk": "2.3.1",
|
||||
"chalk": "2.3.2",
|
||||
"lodash": "4.17.5",
|
||||
"slice-ansi": "1.0.0",
|
||||
"string-width": "2.1.1"
|
||||
|
@ -1544,14 +1074,6 @@
|
|||
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
|
||||
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
|
||||
},
|
||||
"user-home": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz",
|
||||
"integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=",
|
||||
"requires": {
|
||||
"os-homedir": "1.0.2"
|
||||
}
|
||||
},
|
||||
"util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
|
@ -1583,11 +1105,6 @@
|
|||
"mkdirp": "0.5.1"
|
||||
}
|
||||
},
|
||||
"xtend": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
|
||||
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68="
|
||||
},
|
||||
"yallist": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
"repository": {},
|
||||
"license": "MPL-2.0",
|
||||
"dependencies": {
|
||||
"eslint": "4.18.1",
|
||||
"eslint": "4.18.2",
|
||||
"eslint-plugin-html": "4.0.2",
|
||||
"eslint-plugin-mozilla": "file:tools/lint/eslint/eslint-plugin-mozilla",
|
||||
"eslint-plugin-no-unsanitized": "2.0.2",
|
||||
"eslint-plugin-no-unsanitized": "3.0.0",
|
||||
"eslint-plugin-react": "7.1.0",
|
||||
"eslint-plugin-spidermonkey-js": "file:tools/lint/eslint/eslint-plugin-spidermonkey-js"
|
||||
},
|
||||
|
|
|
@ -3483,7 +3483,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "webrender"
|
||||
version = "0.57.0"
|
||||
source = "git+https://github.com/servo/webrender#e91b9f905118ce2d15faa07aa511c4cd1fa5130d"
|
||||
source = "git+https://github.com/servo/webrender#1c8497485dd15692bbd6ad5db31547725c7745df"
|
||||
dependencies = [
|
||||
"app_units 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bincode 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3513,7 +3513,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "webrender_api"
|
||||
version = "0.57.0"
|
||||
source = "git+https://github.com/servo/webrender#e91b9f905118ce2d15faa07aa511c4cd1fa5130d"
|
||||
source = "git+https://github.com/servo/webrender#1c8497485dd15692bbd6ad5db31547725c7745df"
|
||||
dependencies = [
|
||||
"app_units 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bincode 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -22,6 +22,7 @@ use str::CssStringWriter;
|
|||
use style_traits::{Comma, CssWriter, OneOrMoreSeparated, ParseError};
|
||||
use style_traits::{StyleParseErrorKind, ToCss};
|
||||
use values::CustomIdent;
|
||||
use values::specified::Integer;
|
||||
|
||||
/// Parse a counter style name reference.
|
||||
///
|
||||
|
@ -450,21 +451,19 @@ pub struct Ranges(pub Vec<Range<CounterBound>>);
|
|||
#[derive(Clone, Copy, Debug, ToCss)]
|
||||
pub enum CounterBound {
|
||||
/// An integer bound.
|
||||
///
|
||||
/// FIXME(https://github.com/servo/servo/issues/20197)
|
||||
Integer(i32),
|
||||
Integer(Integer),
|
||||
/// The infinite bound.
|
||||
Infinite,
|
||||
}
|
||||
|
||||
impl Parse for Ranges {
|
||||
fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
|
||||
fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
|
||||
if input.try(|input| input.expect_ident_matching("auto")).is_ok() {
|
||||
Ok(Ranges(Vec::new()))
|
||||
} else {
|
||||
input.parse_comma_separated(|input| {
|
||||
let opt_start = parse_bound(input)?;
|
||||
let opt_end = parse_bound(input)?;
|
||||
let opt_start = parse_bound(context, input)?;
|
||||
let opt_end = parse_bound(context, input)?;
|
||||
if let (CounterBound::Integer(start), CounterBound::Integer(end)) = (opt_start, opt_end) {
|
||||
if start > end {
|
||||
return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
|
||||
|
@ -477,18 +476,13 @@ impl Parse for Ranges {
|
|||
}
|
||||
|
||||
fn parse_bound<'i, 't>(
|
||||
input: &mut Parser<'i, 't>,
|
||||
context: &ParserContext, input: &mut Parser<'i, 't>,
|
||||
) -> Result<CounterBound, ParseError<'i>> {
|
||||
let location = input.current_source_location();
|
||||
match *input.next()? {
|
||||
Token::Number { int_value: Some(v), .. } => {
|
||||
Ok(CounterBound::Integer(v))
|
||||
}
|
||||
Token::Ident(ref ident) if ident.eq_ignore_ascii_case("infinite") => {
|
||||
Ok(CounterBound::Infinite)
|
||||
}
|
||||
ref t => Err(location.new_unexpected_token_error(t.clone())),
|
||||
if let Ok(integer) = input.try(|input| Integer::parse(context, input)) {
|
||||
return Ok(CounterBound::Integer(integer));
|
||||
}
|
||||
input.expect_ident_matching("infinite")?;
|
||||
Ok(CounterBound::Infinite)
|
||||
}
|
||||
|
||||
impl ToCss for Ranges {
|
||||
|
|
|
@ -413,7 +413,7 @@ impl nsStyleImage {
|
|||
nsStyleImageType::eStyleImageType_Element => {
|
||||
use gecko_string_cache::Atom;
|
||||
let atom = Gecko_GetImageElement(self);
|
||||
Some(GenericImage::Element(Atom::from(atom)))
|
||||
Some(GenericImage::Element(Atom::from_raw(atom)))
|
||||
},
|
||||
_ => panic!("Unexpected image type")
|
||||
}
|
||||
|
|
|
@ -12244,6 +12244,10 @@ pub mod root {
|
|||
#[link_name = "\u{1}_ZN7mozilla10StylePrefs28sMozDocumentEnabledInContentE"]
|
||||
pub static mut StylePrefs_sMozDocumentEnabledInContent: bool;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ZN7mozilla10StylePrefs28sMozDocumentURLPrefixHackEnabledE"]
|
||||
pub static mut StylePrefs_sMozDocumentURLPrefixHackEnabled: bool;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ZN7mozilla10StylePrefs32sGridTemplateSubgridValueEnabledE"]
|
||||
pub static mut StylePrefs_sGridTemplateSubgridValueEnabled: bool;
|
||||
|
|
|
@ -176,7 +176,7 @@ impl Device {
|
|||
context.mMedium
|
||||
};
|
||||
|
||||
MediaType(CustomIdent(Atom::from(medium_to_use)))
|
||||
MediaType(CustomIdent(unsafe { Atom::from_raw(medium_to_use) }))
|
||||
}
|
||||
|
||||
/// Returns the current viewport size in app units.
|
||||
|
@ -262,7 +262,7 @@ impl ToCss for Expression {
|
|||
}
|
||||
|
||||
// NB: CssStringWriter not needed, feature names are under control.
|
||||
write!(dest, "{}", Atom::from(unsafe { *self.feature.mName }))?;
|
||||
write!(dest, "{}", unsafe { Atom::from_static(*self.feature.mName) })?;
|
||||
|
||||
if let Some(ref val) = self.value {
|
||||
dest.write_str(": ")?;
|
||||
|
@ -394,9 +394,9 @@ impl MediaExpressionValue {
|
|||
}
|
||||
nsMediaFeature_ValueType::eIdent => {
|
||||
debug_assert_eq!(css_value.mUnit, nsCSSUnit::eCSSUnit_AtomIdent);
|
||||
Some(MediaExpressionValue::Ident(Atom::from(unsafe {
|
||||
*css_value.mValue.mAtom.as_ref()
|
||||
})))
|
||||
Some(MediaExpressionValue::Ident(unsafe {
|
||||
Atom::from_raw(*css_value.mValue.mAtom.as_ref())
|
||||
}))
|
||||
}
|
||||
nsMediaFeature_ValueType::eIntRatio => {
|
||||
let array = unsafe { css_value.array_unchecked() };
|
||||
|
|
|
@ -326,7 +326,7 @@ impl ToNsCssValue for counter_style::Ranges {
|
|||
nscssvalue.set_pair_list(self.0.into_iter().map(|range| {
|
||||
fn set_bound(bound: CounterBound, nscssvalue: &mut nsCSSValue) {
|
||||
if let CounterBound::Integer(finite) = bound {
|
||||
nscssvalue.set_integer(finite)
|
||||
nscssvalue.set_integer(finite.value())
|
||||
} else {
|
||||
nscssvalue.set_enum(structs::NS_STYLE_COUNTER_RANGE_INFINITE as i32)
|
||||
}
|
||||
|
|
|
@ -507,7 +507,7 @@ impl CounterStyleOrNone {
|
|||
|
||||
let name = unsafe { bindings::Gecko_CounterStyle_GetName(gecko_value) };
|
||||
if !name.is_null() {
|
||||
let name = Atom::from(name);
|
||||
let name = unsafe { Atom::from_raw(name) };
|
||||
if name == atom!("none") {
|
||||
Either::First(CounterStyleOrNone::None)
|
||||
} else {
|
||||
|
|
|
@ -171,6 +171,7 @@ impl<'lr> TShadowRoot for GeckoShadowRoot<'lr> {
|
|||
let author_styles =
|
||||
AuthorStyles::<GeckoStyleSheet>::from_ffi(author_styles);
|
||||
|
||||
debug_assert!(!author_styles.stylesheets.dirty());
|
||||
debug_assert!(
|
||||
author_styles.quirks_mode == self.as_node().owner_doc().quirks_mode() ||
|
||||
author_styles.stylesheets.is_empty()
|
||||
|
|
|
@ -99,7 +99,9 @@ impl WeakAtom {
|
|||
/// Clone this atom, bumping the refcount if the atom is not static.
|
||||
#[inline]
|
||||
pub fn clone(&self) -> Atom {
|
||||
Atom::from(self.as_ptr())
|
||||
unsafe {
|
||||
Atom::from_raw(self.as_ptr())
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the atom hash.
|
||||
|
@ -267,15 +269,25 @@ impl Atom {
|
|||
///
|
||||
/// Right now it's only used by the atom macro, and ideally it should keep
|
||||
/// that way, now we have sugar for is_static, creating atoms using
|
||||
/// Atom::from should involve almost no overhead.
|
||||
/// Atom::from_raw should involve almost no overhead.
|
||||
#[inline]
|
||||
unsafe fn from_static(ptr: *mut nsStaticAtom) -> Self {
|
||||
pub unsafe fn from_static(ptr: *mut nsStaticAtom) -> Self {
|
||||
let atom = Atom(ptr as *mut WeakAtom);
|
||||
debug_assert!(atom.is_static(),
|
||||
"Called from_static for a non-static atom!");
|
||||
atom
|
||||
}
|
||||
|
||||
/// Creates an atom from an atom pointer.
|
||||
#[inline(always)]
|
||||
pub unsafe fn from_raw(ptr: *mut nsAtom) -> Self {
|
||||
let atom = Atom(ptr as *mut WeakAtom);
|
||||
if !atom.is_static() {
|
||||
Gecko_AddRefAtom(ptr);
|
||||
}
|
||||
atom
|
||||
}
|
||||
|
||||
/// Creates an atom from a dynamic atom pointer that has already had AddRef
|
||||
/// called on it.
|
||||
#[inline]
|
||||
|
@ -308,7 +320,9 @@ impl Hash for WeakAtom {
|
|||
impl Clone for Atom {
|
||||
#[inline(always)]
|
||||
fn clone(&self) -> Atom {
|
||||
Atom::from(self.as_ptr())
|
||||
unsafe {
|
||||
Atom::from_raw(self.as_ptr())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -388,28 +402,4 @@ impl From<String> for Atom {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<*mut nsAtom> for Atom {
|
||||
#[inline]
|
||||
fn from(ptr: *mut nsAtom) -> Atom {
|
||||
assert!(!ptr.is_null());
|
||||
unsafe {
|
||||
let ret = Atom(WeakAtom::new(ptr));
|
||||
if !ret.is_static() {
|
||||
Gecko_AddRefAtom(ptr);
|
||||
}
|
||||
ret
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<*mut nsStaticAtom> for Atom {
|
||||
#[inline]
|
||||
fn from(ptr: *mut nsStaticAtom) -> Atom {
|
||||
assert!(!ptr.is_null());
|
||||
unsafe {
|
||||
Atom::from_static(ptr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
malloc_size_of_is_0!(Atom);
|
||||
|
|
|
@ -131,7 +131,7 @@ impl ComputedValues {
|
|||
return None;
|
||||
}
|
||||
|
||||
let atom = Atom::from(atom);
|
||||
let atom = unsafe { Atom::from_raw(atom) };
|
||||
PseudoElement::from_atom(&atom)
|
||||
}
|
||||
|
||||
|
@ -3248,12 +3248,15 @@ fn static_assert() {
|
|||
use gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_no_properties;
|
||||
use gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_variable;
|
||||
use gecko_bindings::structs::nsCSSPropertyID::eCSSProperty_UNKNOWN;
|
||||
use Atom;
|
||||
|
||||
let property = self.gecko.mTransitions[index].mProperty;
|
||||
if property == eCSSProperty_UNKNOWN || property == eCSSPropertyExtra_variable {
|
||||
let atom = self.gecko.mTransitions[index].mUnknownProperty.mRawPtr;
|
||||
debug_assert!(!atom.is_null());
|
||||
TransitionProperty::Unsupported(CustomIdent(atom.into()))
|
||||
TransitionProperty::Unsupported(CustomIdent(unsafe{
|
||||
Atom::from_raw(atom)
|
||||
}))
|
||||
} else if property == eCSSPropertyExtra_no_properties {
|
||||
// Actually, we don't expect TransitionProperty::Unsupported also represents "none",
|
||||
// but if the caller wants to convert it, it is fine. Please use it carefully.
|
||||
|
@ -3343,13 +3346,13 @@ fn static_assert() {
|
|||
pub fn animation_name_at(&self, index: usize)
|
||||
-> longhands::animation_name::computed_value::SingleComputedValue {
|
||||
use properties::longhands::animation_name::single_value::SpecifiedValue as AnimationName;
|
||||
use Atom;
|
||||
|
||||
let atom = self.gecko.mAnimations[index].mName.mRawPtr;
|
||||
if atom == atom!("").as_ptr() {
|
||||
AnimationName(None)
|
||||
} else {
|
||||
AnimationName(Some(KeyframesName::from_atom(atom.into())))
|
||||
return AnimationName(None)
|
||||
}
|
||||
AnimationName(Some(KeyframesName::from_atom(unsafe { Atom::from_raw(atom) })))
|
||||
}
|
||||
pub fn copy_animation_name_from(&mut self, other: &Self) {
|
||||
self.gecko.mAnimationNameCount = other.gecko.mAnimationNameCount;
|
||||
|
@ -3549,16 +3552,19 @@ fn static_assert() {
|
|||
use properties::longhands::will_change::computed_value::T;
|
||||
use gecko_bindings::structs::nsAtom;
|
||||
use values::CustomIdent;
|
||||
use Atom;
|
||||
|
||||
if self.gecko.mWillChange.len() == 0 {
|
||||
T::Auto
|
||||
} else {
|
||||
let custom_idents: Vec<CustomIdent> = self.gecko.mWillChange.iter().map(|gecko_atom| {
|
||||
CustomIdent((gecko_atom.mRawPtr as *mut nsAtom).into())
|
||||
}).collect();
|
||||
|
||||
T::AnimateableFeatures(custom_idents.into_boxed_slice())
|
||||
return T::Auto
|
||||
}
|
||||
|
||||
let custom_idents: Vec<CustomIdent> = self.gecko.mWillChange.iter().map(|gecko_atom| {
|
||||
unsafe {
|
||||
CustomIdent(Atom::from_raw(gecko_atom.mRawPtr as *mut nsAtom))
|
||||
}
|
||||
}).collect();
|
||||
|
||||
T::AnimateableFeatures(custom_idents.into_boxed_slice())
|
||||
}
|
||||
|
||||
<% impl_shape_source("shape_outside", "mShapeOutside") %>
|
||||
|
|
|
@ -1645,6 +1645,12 @@ impl PropertyId {
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns true if the property is a shorthand or shorthand alias.
|
||||
#[inline]
|
||||
pub fn is_shorthand(&self) -> bool {
|
||||
self.as_shorthand().is_ok()
|
||||
}
|
||||
|
||||
/// Given this property id, get it either as a shorthand or as a
|
||||
/// `PropertyDeclarationId`.
|
||||
pub fn as_shorthand(&self) -> Result<ShorthandId, PropertyDeclarationId> {
|
||||
|
|
|
@ -263,7 +263,7 @@ where
|
|||
Self {
|
||||
entries: vec![],
|
||||
data_validity: DataValidity::Valid,
|
||||
dirty: true,
|
||||
dirty: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
//! initially in CSS Conditional Rules Module Level 3, @document has been postponed to the level 4.
|
||||
//! We implement the prefixed `@-moz-document`.
|
||||
|
||||
use cssparser::{Parser, Token, SourceLocation};
|
||||
use cssparser::{Parser, SourceLocation};
|
||||
#[cfg(feature = "gecko")]
|
||||
use malloc_size_of::{MallocSizeOfOps, MallocUnconditionalShallowSizeOf};
|
||||
use media_queries::Device;
|
||||
|
@ -103,13 +103,8 @@ macro_rules! parse_quoted_or_unquoted_string {
|
|||
$input.parse_nested_block(|input| {
|
||||
let start = input.position();
|
||||
input.parse_entirely(|input| {
|
||||
let location = input.current_source_location();
|
||||
match *input.next()? {
|
||||
Token::QuotedString(ref value) => {
|
||||
Ok($url_matching_function(value.as_ref().to_owned()))
|
||||
},
|
||||
ref t => Err(location.new_unexpected_token_error(t.clone())),
|
||||
}
|
||||
let string = input.expect_string()?;
|
||||
Ok($url_matching_function(string.as_ref().to_owned()))
|
||||
}).or_else(|_: ParseError| {
|
||||
while let Ok(_) = input.next() {}
|
||||
Ok($url_matching_function(input.slice_from(start).to_string()))
|
||||
|
@ -120,21 +115,26 @@ macro_rules! parse_quoted_or_unquoted_string {
|
|||
|
||||
impl UrlMatchingFunction {
|
||||
/// Parse a URL matching function for a`@document` rule's condition.
|
||||
pub fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
|
||||
-> Result<UrlMatchingFunction, ParseError<'i>> {
|
||||
pub fn parse<'i, 't>(
|
||||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Self, ParseError<'i>> {
|
||||
if input.try(|input| input.expect_function_matching("url-prefix")).is_ok() {
|
||||
parse_quoted_or_unquoted_string!(input, UrlMatchingFunction::UrlPrefix)
|
||||
} else if input.try(|input| input.expect_function_matching("domain")).is_ok() {
|
||||
parse_quoted_or_unquoted_string!(input, UrlMatchingFunction::Domain)
|
||||
} else if input.try(|input| input.expect_function_matching("regexp")).is_ok() {
|
||||
input.parse_nested_block(|input| {
|
||||
Ok(UrlMatchingFunction::Regexp(input.expect_string()?.as_ref().to_owned()))
|
||||
})
|
||||
} else if let Ok(url) = input.try(|input| CssUrl::parse(context, input)) {
|
||||
Ok(UrlMatchingFunction::Url(url))
|
||||
} else {
|
||||
Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
|
||||
return parse_quoted_or_unquoted_string!(input, UrlMatchingFunction::UrlPrefix)
|
||||
}
|
||||
|
||||
if input.try(|input| input.expect_function_matching("domain")).is_ok() {
|
||||
return parse_quoted_or_unquoted_string!(input, UrlMatchingFunction::Domain)
|
||||
}
|
||||
|
||||
if input.try(|input| input.expect_function_matching("regexp")).is_ok() {
|
||||
return input.parse_nested_block(|input| {
|
||||
Ok(UrlMatchingFunction::Regexp(input.expect_string()?.as_ref().to_owned()))
|
||||
});
|
||||
}
|
||||
|
||||
let url = CssUrl::parse(context, input)?;
|
||||
Ok(UrlMatchingFunction::Url(url))
|
||||
}
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
|
@ -182,16 +182,63 @@ pub struct DocumentCondition(#[css(iterable)] Vec<UrlMatchingFunction>);
|
|||
|
||||
impl DocumentCondition {
|
||||
/// Parse a document condition.
|
||||
pub fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
|
||||
-> Result<Self, ParseError<'i>> {
|
||||
input.parse_comma_separated(|input| UrlMatchingFunction::parse(context, input))
|
||||
.map(DocumentCondition)
|
||||
pub fn parse<'i, 't>(
|
||||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Self, ParseError<'i>> {
|
||||
let conditions = input.parse_comma_separated(|input| {
|
||||
UrlMatchingFunction::parse(context, input)
|
||||
})?;
|
||||
|
||||
let condition = DocumentCondition(conditions);
|
||||
if !condition.allowed_in(context) {
|
||||
return Err(input.new_custom_error(
|
||||
StyleParseErrorKind::UnsupportedAtRule("-moz-document".into())
|
||||
))
|
||||
}
|
||||
Ok(condition)
|
||||
}
|
||||
|
||||
/// Evaluate a document condition.
|
||||
pub fn evaluate(&self, device: &Device) -> bool {
|
||||
self.0.iter().any(|ref url_matching_function|
|
||||
self.0.iter().any(|url_matching_function| {
|
||||
url_matching_function.evaluate(device)
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
fn allowed_in(&self, _: &ParserContext) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
fn allowed_in(&self, context: &ParserContext) -> bool {
|
||||
use gecko_bindings::structs;
|
||||
use stylesheets::Origin;
|
||||
|
||||
if context.stylesheet_origin != Origin::Author {
|
||||
return true;
|
||||
}
|
||||
|
||||
if unsafe { structs::StylePrefs_sMozDocumentEnabledInContent } {
|
||||
return true;
|
||||
}
|
||||
|
||||
if !unsafe { structs::StylePrefs_sMozDocumentURLPrefixHackEnabled } {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Allow a single url-prefix() for compatibility.
|
||||
//
|
||||
// See bug 1446470 and dependencies.
|
||||
if self.0.len() != 1 {
|
||||
return false;
|
||||
}
|
||||
|
||||
// NOTE(emilio): This technically allows url-prefix("") too, but...
|
||||
match self.0[0] {
|
||||
UrlMatchingFunction::UrlPrefix(ref prefix) => prefix.is_empty(),
|
||||
_ => false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -422,19 +422,6 @@ impl<'a, 'b, 'i, R: ParseErrorReporter> AtRuleParser<'i> for NestedRuleParser<'a
|
|||
))
|
||||
}
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
{
|
||||
use gecko_bindings::structs;
|
||||
|
||||
if self.stylesheet_origin == Origin::Author &&
|
||||
unsafe { !structs::StylePrefs_sMozDocumentEnabledInContent }
|
||||
{
|
||||
return Err(input.new_custom_error(
|
||||
StyleParseErrorKind::UnsupportedAtRule(name.clone())
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
let cond = DocumentCondition::parse(self.context, input)?;
|
||||
Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::Document(cond, location)))
|
||||
},
|
||||
|
|
|
@ -1636,7 +1636,7 @@ impl ExtraStyleData {
|
|||
guard: &SharedRwLockReadGuard,
|
||||
rule: &Arc<Locked<CounterStyleRule>>,
|
||||
) {
|
||||
let name = rule.read_with(guard).mName.mRawPtr.into();
|
||||
let name = unsafe { Atom::from_raw(rule.read_with(guard).mName.mRawPtr) };
|
||||
self.counter_styles.insert(name, rule.clone());
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,8 @@ def extract_memory_reports(lines):
|
|||
elif line == 'End memory reports\n':
|
||||
in_report = False
|
||||
elif in_report:
|
||||
report_lines[-1].append(line.strip())
|
||||
if line.startswith('|'):
|
||||
report_lines[-1].append(line.strip())
|
||||
return (report_lines, times)
|
||||
|
||||
|
||||
|
@ -72,6 +73,17 @@ def transform_report_for_test(report):
|
|||
return transformed
|
||||
|
||||
|
||||
def test_extract_memory_reports():
|
||||
input = ["Begin memory reports",
|
||||
"|",
|
||||
" 154.56 MiB -- explicit\n",
|
||||
"| 107.88 MiB -- system-heap-unclassified\n",
|
||||
"End memory reports\n"]
|
||||
expected = ([['|', '| 107.88 MiB -- system-heap-unclassified']], ['reports'])
|
||||
assert(extract_memory_reports(input) == expected)
|
||||
return 0
|
||||
|
||||
|
||||
def test():
|
||||
input = '''|
|
||||
| 23.89 MiB -- explicit
|
||||
|
@ -105,6 +117,7 @@ def test():
|
|||
assert(sorted(transformed.keys()) == sorted(expected.keys()))
|
||||
for k, v in transformed.items():
|
||||
assert(v == expected[k])
|
||||
test_extract_memory_reports()
|
||||
return 0
|
||||
|
||||
|
||||
|
|
|
@ -933,6 +933,23 @@ pub extern "C" fn Servo_ComputedValues_ExtractAnimationValue(
|
|||
}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn Servo_Property_IsShorthand(
|
||||
prop_name: *const nsACString,
|
||||
found: *mut bool
|
||||
) -> bool {
|
||||
let prop_id = PropertyId::parse(prop_name.as_ref().unwrap().as_str_unchecked());
|
||||
let prop_id = match prop_id {
|
||||
Ok(ref p) if p.enabled_for_all_content() => p,
|
||||
_ => {
|
||||
*found = false;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
*found = true;
|
||||
prop_id.is_shorthand()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_Property_IsAnimatable(property: nsCSSPropertyID) -> bool {
|
||||
use style::properties::animated_properties;
|
||||
|
@ -2020,9 +2037,9 @@ pub extern "C" fn Servo_KeyframesRule_GetName(rule: RawServoKeyframesRuleBorrowe
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_KeyframesRule_SetName(rule: RawServoKeyframesRuleBorrowed, name: *mut nsAtom) {
|
||||
pub unsafe extern "C" fn Servo_KeyframesRule_SetName(rule: RawServoKeyframesRuleBorrowed, name: *mut nsAtom) {
|
||||
write_locked_arc(rule, |rule: &mut KeyframesRule| {
|
||||
rule.name = KeyframesName::Ident(CustomIdent(unsafe { Atom::from_addrefed(name) }));
|
||||
rule.name = KeyframesName::Ident(CustomIdent(Atom::from_addrefed(name)));
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -2167,7 +2184,7 @@ pub extern "C" fn Servo_FontFeatureValuesRule_GetValueText(
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_ComputedValues_GetForAnonymousBox(
|
||||
pub unsafe extern "C" fn Servo_ComputedValues_GetForAnonymousBox(
|
||||
parent_style_or_null: ServoStyleContextBorrowedOrNull,
|
||||
pseudo_tag: *mut nsAtom,
|
||||
raw_data: RawServoStyleSetBorrowed,
|
||||
|
@ -2176,7 +2193,7 @@ pub extern "C" fn Servo_ComputedValues_GetForAnonymousBox(
|
|||
let guard = global_style_data.shared_lock.read();
|
||||
let guards = StylesheetGuards::same(&guard);
|
||||
let data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut();
|
||||
let atom = Atom::from(pseudo_tag);
|
||||
let atom = Atom::from_raw(pseudo_tag);
|
||||
let pseudo = PseudoElement::from_anon_box_atom(&atom)
|
||||
.expect("Not an anon box pseudo?");
|
||||
|
||||
|
@ -2478,7 +2495,7 @@ fn get_pseudo_style(
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_ComputedValues_Inherit(
|
||||
pub unsafe extern "C" fn Servo_ComputedValues_Inherit(
|
||||
raw_data: RawServoStyleSetBorrowed,
|
||||
pseudo_tag: *mut nsAtom,
|
||||
parent_style_context: ServoStyleContextBorrowedOrNull,
|
||||
|
@ -2487,7 +2504,7 @@ pub extern "C" fn Servo_ComputedValues_Inherit(
|
|||
let data = PerDocumentStyleData::from_ffi(raw_data).borrow();
|
||||
|
||||
let for_text = target == structs::InheritTarget::Text;
|
||||
let atom = Atom::from(pseudo_tag);
|
||||
let atom = Atom::from_raw(pseudo_tag);
|
||||
let pseudo = PseudoElement::from_anon_box_atom(&atom)
|
||||
.expect("Not an anon-box? Gah!");
|
||||
|
||||
|
@ -3210,7 +3227,7 @@ pub extern "C" fn Servo_DeclarationBlock_PropertyIsSet(
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_DeclarationBlock_SetIdentStringValue(
|
||||
pub unsafe extern "C" fn Servo_DeclarationBlock_SetIdentStringValue(
|
||||
declarations: RawServoDeclarationBlockBorrowed,
|
||||
property: nsCSSPropertyID,
|
||||
value: *mut nsAtom,
|
||||
|
@ -3220,7 +3237,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetIdentStringValue(
|
|||
|
||||
let long = get_longhand_from_id!(property);
|
||||
let prop = match_wrap_declared! { long,
|
||||
XLang => Lang(Atom::from(value)),
|
||||
XLang => Lang(Atom::from_raw(value)),
|
||||
};
|
||||
write_locked_arc(declarations, |decls: &mut PropertyDeclarationBlock| {
|
||||
decls.push(prop, Importance::Normal, DeclarationSource::CssOm);
|
||||
|
@ -4138,7 +4155,7 @@ fn fill_in_missing_keyframe_values(
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_StyleSet_GetKeyframesForName(
|
||||
pub unsafe extern "C" fn Servo_StyleSet_GetKeyframesForName(
|
||||
raw_data: RawServoStyleSetBorrowed,
|
||||
name: *mut nsAtom,
|
||||
inherited_timing_function: nsTimingFunctionBorrowed,
|
||||
|
@ -4148,7 +4165,7 @@ pub extern "C" fn Servo_StyleSet_GetKeyframesForName(
|
|||
"keyframes should be initially empty");
|
||||
|
||||
let data = PerDocumentStyleData::from_ffi(raw_data).borrow();
|
||||
let name = Atom::from(name);
|
||||
let name = Atom::from_raw(name);
|
||||
|
||||
let animation = match data.stylist.get_animation(&name) {
|
||||
Some(animation) => animation,
|
||||
|
@ -4183,11 +4200,11 @@ pub extern "C" fn Servo_StyleSet_GetKeyframesForName(
|
|||
// Look for an existing keyframe with the same offset and timing
|
||||
// function or else add a new keyframe at the beginning of the keyframe
|
||||
// array.
|
||||
let keyframe = unsafe {
|
||||
Gecko_GetOrCreateKeyframeAtStart(keyframes,
|
||||
step.start_percentage.0 as f32,
|
||||
&timing_function)
|
||||
};
|
||||
let keyframe = Gecko_GetOrCreateKeyframeAtStart(
|
||||
keyframes,
|
||||
step.start_percentage.0 as f32,
|
||||
&timing_function,
|
||||
);
|
||||
|
||||
match step.value {
|
||||
KeyframesStepValue::ComputedValues => {
|
||||
|
@ -4197,12 +4214,10 @@ pub extern "C" fn Servo_StyleSet_GetKeyframesForName(
|
|||
// animation should be set to the underlying computed value for
|
||||
// that keyframe.
|
||||
for property in animation.properties_changed.iter() {
|
||||
unsafe {
|
||||
Gecko_AppendPropertyValuePair(
|
||||
&mut (*keyframe).mPropertyValues,
|
||||
property.to_nscsspropertyid(),
|
||||
);
|
||||
}
|
||||
Gecko_AppendPropertyValuePair(
|
||||
&mut (*keyframe).mPropertyValues,
|
||||
property.to_nscsspropertyid(),
|
||||
);
|
||||
}
|
||||
if current_offset == 0.0 {
|
||||
has_complete_initial_keyframe = true;
|
||||
|
@ -4249,23 +4264,19 @@ pub extern "C" fn Servo_StyleSet_GetKeyframesForName(
|
|||
continue;
|
||||
}
|
||||
|
||||
let pair = unsafe {
|
||||
Gecko_AppendPropertyValuePair(
|
||||
&mut (*keyframe).mPropertyValues,
|
||||
id.to_nscsspropertyid(),
|
||||
)
|
||||
};
|
||||
let pair = Gecko_AppendPropertyValuePair(
|
||||
&mut (*keyframe).mPropertyValues,
|
||||
id.to_nscsspropertyid(),
|
||||
);
|
||||
|
||||
unsafe {
|
||||
(*pair).mServoDeclarationBlock.set_arc_leaky(
|
||||
Arc::new(global_style_data.shared_lock.wrap(
|
||||
PropertyDeclarationBlock::with_one(
|
||||
declaration.clone(),
|
||||
Importance::Normal,
|
||||
)
|
||||
))
|
||||
);
|
||||
}
|
||||
(*pair).mServoDeclarationBlock.set_arc_leaky(
|
||||
Arc::new(global_style_data.shared_lock.wrap(
|
||||
PropertyDeclarationBlock::with_one(
|
||||
declaration.clone(),
|
||||
Importance::Normal,
|
||||
)
|
||||
))
|
||||
);
|
||||
|
||||
if current_offset == 0.0 {
|
||||
properties_set_at_start.insert(id);
|
||||
|
@ -4276,19 +4287,14 @@ pub extern "C" fn Servo_StyleSet_GetKeyframesForName(
|
|||
}
|
||||
|
||||
if custom_properties.any_normal() {
|
||||
let pair = unsafe {
|
||||
Gecko_AppendPropertyValuePair(
|
||||
&mut (*keyframe).mPropertyValues,
|
||||
nsCSSPropertyID::eCSSPropertyExtra_variable,
|
||||
)
|
||||
};
|
||||
|
||||
unsafe {
|
||||
(*pair).mServoDeclarationBlock.set_arc_leaky(Arc::new(
|
||||
global_style_data.shared_lock.wrap(custom_properties)
|
||||
));
|
||||
}
|
||||
let pair = Gecko_AppendPropertyValuePair(
|
||||
&mut (*keyframe).mPropertyValues,
|
||||
nsCSSPropertyID::eCSSPropertyExtra_variable,
|
||||
);
|
||||
|
||||
(*pair).mServoDeclarationBlock.set_arc_leaky(Arc::new(
|
||||
global_style_data.shared_lock.wrap(custom_properties)
|
||||
));
|
||||
}
|
||||
},
|
||||
}
|
||||
|
@ -4498,7 +4504,7 @@ pub extern "C" fn Servo_StyleSet_HasDocumentStateDependency(
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_GetCustomPropertyValue(
|
||||
pub unsafe extern "C" fn Servo_GetCustomPropertyValue(
|
||||
computed_values: ServoStyleContextBorrowed,
|
||||
name: *const nsAString,
|
||||
value: *mut nsAString,
|
||||
|
@ -4508,13 +4514,13 @@ pub extern "C" fn Servo_GetCustomPropertyValue(
|
|||
None => return false,
|
||||
};
|
||||
|
||||
let name = unsafe { Atom::from(&*name) };
|
||||
let name = Atom::from(&*name);
|
||||
let computed_value = match custom_properties.get(&name) {
|
||||
Some(v) => v,
|
||||
None => return false,
|
||||
};
|
||||
|
||||
computed_value.to_css(&mut CssWriter::new(unsafe { value.as_mut().unwrap() })).unwrap();
|
||||
computed_value.to_css(&mut CssWriter::new(&mut *value)).unwrap();
|
||||
true
|
||||
}
|
||||
|
||||
|
|
|
@ -11,8 +11,9 @@ transforms:
|
|||
- taskgraph.transforms.build:transforms
|
||||
- taskgraph.transforms.build_attrs:transforms
|
||||
- taskgraph.transforms.build_lints:transforms
|
||||
- taskgraph.transforms.job:transforms
|
||||
- taskgraph.transforms.use_toolchains:transforms
|
||||
- taskgraph.transforms.release_notifications:transforms
|
||||
- taskgraph.transforms.job:transforms
|
||||
- taskgraph.transforms.task:transforms
|
||||
|
||||
jobs-from:
|
||||
|
@ -20,3 +21,27 @@ jobs-from:
|
|||
|
||||
job-defaults:
|
||||
shipping-phase: promote
|
||||
treeherder:
|
||||
symbol: Src
|
||||
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
|
||||
worker:
|
||||
max-run-time: 3600
|
||||
env:
|
||||
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/linux64/releng.manifest"
|
||||
PKG_SRCPACK_BASENAME: source
|
||||
run:
|
||||
using: mozharness
|
||||
actions: [package-source]
|
||||
script: "mozharness/scripts/fx_desktop_build.py"
|
||||
config:
|
||||
- builds/releng_sub_linux_configs/64_source.py
|
||||
- disable_signing.py
|
||||
options: []
|
||||
tooltool-downloads: public
|
||||
need-xvfb: false
|
||||
run-on-projects: []
|
||||
toolchains:
|
||||
- linux64-clang
|
||||
- linux64-gcc
|
||||
- linux64-rust
|
||||
- linux64-sccache
|
||||
|
|
|
@ -2,52 +2,16 @@ linux64-source/opt:
|
|||
description: "Firefox source builder"
|
||||
treeherder:
|
||||
platform: linux64/opt
|
||||
symbol: Src
|
||||
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
|
||||
worker:
|
||||
max-run-time: 36000
|
||||
run:
|
||||
using: mozharness
|
||||
actions: [build]
|
||||
config:
|
||||
- builds/releng_sub_linux_configs/64_source.py
|
||||
options: []
|
||||
script: "mozharness/scripts/fx_source.py"
|
||||
run-on-projects: []
|
||||
shipping-product: firefox
|
||||
|
||||
linux64-fennec-source/opt:
|
||||
description: "Fennec source builder"
|
||||
treeherder:
|
||||
platform: android-api-16/opt
|
||||
symbol: Src
|
||||
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
|
||||
worker:
|
||||
max-run-time: 36000
|
||||
run:
|
||||
using: mozharness
|
||||
actions: [build]
|
||||
config:
|
||||
- builds/releng_sub_linux_configs/64_source.py
|
||||
options: []
|
||||
script: "mozharness/scripts/fx_source.py"
|
||||
run-on-projects: []
|
||||
shipping-product: fennec
|
||||
|
||||
linux64-devedition-source/opt:
|
||||
description: "Devedition source builder"
|
||||
treeherder:
|
||||
platform: linux64-devedition-source/opt
|
||||
symbol: Src
|
||||
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
|
||||
worker:
|
||||
max-run-time: 36000
|
||||
run:
|
||||
using: mozharness
|
||||
actions: [build]
|
||||
config:
|
||||
- builds/releng_sub_linux_configs/64_source.py
|
||||
options: []
|
||||
script: "mozharness/scripts/fx_source.py"
|
||||
run-on-projects: []
|
||||
shipping-product: devedition
|
||||
|
|
|
@ -36,3 +36,7 @@ job-template:
|
|||
only-if-dependencies-run: null
|
||||
scopes:
|
||||
- secrets:get:project/releng/gecko/build/level-{level}/gecko-generated-sources-upload
|
||||
run-on-projects:
|
||||
by-build-platform:
|
||||
.*devedition.*: ['mozilla-beta', 'maple']
|
||||
default: ['all']
|
||||
|
|
|
@ -52,3 +52,7 @@ job-template:
|
|||
only-if-dependencies-run: null
|
||||
scopes:
|
||||
- secrets:get:project/releng/gecko/build/level-{level}/gecko-symbol-upload
|
||||
run-on-projects:
|
||||
by-build-platform:
|
||||
.*devedition.*: ['mozilla-beta', 'maple']
|
||||
default: ['all']
|
||||
|
|
|
@ -218,16 +218,16 @@ UPSTREAM_ARTIFACT_SIGNED_PATHS = {
|
|||
"target.tar.bz2.asc",
|
||||
],
|
||||
'linux64-source': [
|
||||
"SOURCE",
|
||||
"SOURCE.asc",
|
||||
"source.tar.xz",
|
||||
"source.tar.xz.asc",
|
||||
],
|
||||
'linux64-devedition-source': [
|
||||
"SOURCE",
|
||||
"SOURCE.asc",
|
||||
"source.tar.xz",
|
||||
"source.tar.xz.asc",
|
||||
],
|
||||
'linux64-fennec-source': [
|
||||
"SOURCE",
|
||||
"SOURCE.asc",
|
||||
"source.tar.xz",
|
||||
"source.tar.xz.asc",
|
||||
],
|
||||
'android-x86-nightly': ["en-US/target.apk"],
|
||||
'android-aarch64-nightly': ["en-US/target.apk"],
|
||||
|
|
|
@ -185,7 +185,7 @@ task_description_schema = Schema({
|
|||
# The `run_on_projects` attribute, defaulting to "all". This dictates the
|
||||
# projects on which this task should be included in the target task set.
|
||||
# See the attributes documentation for details.
|
||||
Optional('run-on-projects'): [basestring],
|
||||
Optional('run-on-projects'): optionally_keyed_by('build-platform', [basestring]),
|
||||
|
||||
# The `shipping_phase` attribute, defaulting to None. This specifies the
|
||||
# release promotion phase that this task belongs to.
|
||||
|
@ -1630,6 +1630,10 @@ def build_task(config, tasks):
|
|||
payload_builders[task['worker']['implementation']](config, task, task_def)
|
||||
|
||||
attributes = task.get('attributes', {})
|
||||
# Resolve run-on-projects
|
||||
build_platform = attributes.get('build_platform')
|
||||
resolve_keyed_by(task, 'run-on-projects', item_name=task['label'],
|
||||
**{'build-platform': build_platform})
|
||||
attributes['run_on_projects'] = task.get('run-on-projects', ['all'])
|
||||
attributes['always_target'] = task['always-target']
|
||||
# This logic is here since downstream tasks don't always match their
|
||||
|
|
|
@ -14,7 +14,7 @@ def generate_specifications_of_artifacts_to_sign(
|
|||
if kind == 'release-source-signing':
|
||||
artifacts_specifications = [{
|
||||
'artifacts': [
|
||||
'public/build/SOURCE'
|
||||
'public/build/source.tar.xz'
|
||||
],
|
||||
'formats': ['gpg'],
|
||||
}]
|
||||
|
|
|
@ -1320,11 +1320,11 @@ impl MarionetteConnection {
|
|||
}
|
||||
|
||||
pub fn connect(&mut self, browser: &mut Option<FirefoxProcess>) -> WebDriverResult<()> {
|
||||
let timeout = 60 * 1000; // ms
|
||||
let poll_interval = 100; // ms
|
||||
let poll_attempts = timeout / poll_interval;
|
||||
let mut poll_attempt = 0;
|
||||
let timeout = time::Duration::from_secs(60);
|
||||
let poll_interval = time::Duration::from_millis(100);
|
||||
let now = time::Instant::now();
|
||||
|
||||
debug!("Waiting {}s to connect to browser", timeout.as_secs());
|
||||
loop {
|
||||
// immediately abort connection attempts if process disappears
|
||||
if let &mut Some(ref mut runner) = browser {
|
||||
|
@ -1352,10 +1352,8 @@ impl MarionetteConnection {
|
|||
break;
|
||||
}
|
||||
Err(e) => {
|
||||
trace!(" connection attempt {}/{}", poll_attempt, poll_attempts);
|
||||
if poll_attempt <= poll_attempts {
|
||||
poll_attempt += 1;
|
||||
thread::sleep(time::Duration::from_millis(poll_interval));
|
||||
if now.elapsed() < timeout {
|
||||
thread::sleep(poll_interval);
|
||||
} else {
|
||||
return Err(WebDriverError::new(
|
||||
ErrorStatus::UnknownError,
|
||||
|
|
|
@ -1,21 +1,13 @@
|
|||
import os
|
||||
|
||||
config = {
|
||||
"tmpl": """The binaries in this directory are made available to you under the Mozilla Public License v.2
|
||||
(MPL 2):
|
||||
http://www.mozilla.org/MPL/2.0/
|
||||
|
||||
The source code used to build these binaries is specified by the following unique URL:
|
||||
{repo}/rev/{revision}
|
||||
|
||||
zip: {repo}/archive/{revision}.zip
|
||||
tar.gz: {repo}/archive/{revision}.tar.gz
|
||||
tar.bz2: {repo}/archive/{revision}.tar.bz2
|
||||
|
||||
Instructions for downloading and building this source code can be found here:
|
||||
https://developer.mozilla.org/en/Mozilla_Source_Code_%28Mercurial%29
|
||||
""",
|
||||
"out_path": "artifacts/SOURCE",
|
||||
"repo": os.environ["GECKO_HEAD_REPOSITORY"],
|
||||
"revision": os.environ["GECKO_HEAD_REV"],
|
||||
'default_actions': ['package-source'],
|
||||
'objdir': 'obj-firefox',
|
||||
'stage_platform': 'source', # Not used, but required by the script
|
||||
'buildbot_json_path': 'buildprops.json',
|
||||
'app_ini_path': 'FAKE', # Not used, but required by the script
|
||||
'env': {
|
||||
'HG_SHARE_BASE_DIR': '/builds/hg-shared',
|
||||
'TINDERBOX_OUTPUT': '1',
|
||||
'LC_ALL': 'C',
|
||||
},
|
||||
'src_mozconfig': 'browser/config/mozconfigs/linux64/source',
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# lint_ignore=E501
|
||||
config = {
|
||||
"bouncer_prefix": "https://bouncer-bouncer-releng.stage.mozaws.net/",
|
||||
"locales": ["en-US"],
|
||||
"products": {
|
||||
"installer": {
|
||||
"product-name": "Firefox-%(version)s",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# lint_ignore=E501
|
||||
config = {
|
||||
"shipped-locales-url": "https://hg.mozilla.org/%(repo)s/raw-file/%(revision)s/browser/locales/shipped-locales",
|
||||
"locales": ["en-US"],
|
||||
"bouncer_prefix": "https://bouncer-bouncer-releng.stage.mozaws.net/",
|
||||
"products": {
|
||||
"installer": {
|
||||
|
|
|
@ -1409,6 +1409,28 @@ or run without that action (ie: --no-{action})"
|
|||
halt_on_failure=True,
|
||||
)
|
||||
|
||||
def preflight_package_source(self):
|
||||
self._get_mozconfig()
|
||||
|
||||
def package_source(self):
|
||||
"""generates source archives and uploads them"""
|
||||
env = self.query_build_env()
|
||||
env.update(self.query_mach_build_env())
|
||||
dirs = self.query_abs_dirs()
|
||||
|
||||
self.run_command(
|
||||
command=[sys.executable, 'mach', '--log-no-times', 'configure'],
|
||||
cwd=dirs['abs_src_dir'],
|
||||
env=env, output_timeout=60*3, halt_on_failure=True,
|
||||
)
|
||||
self.run_command(
|
||||
command=[
|
||||
'make', 'source-package', 'source-upload',
|
||||
],
|
||||
cwd=dirs['abs_obj_dir'],
|
||||
env=env, output_timeout=60*45, halt_on_failure=True,
|
||||
)
|
||||
|
||||
def check_test(self):
|
||||
if self.config.get('forced_artifact_build'):
|
||||
self.info('Skipping due to forced artifact build.')
|
||||
|
|
|
@ -39,6 +39,7 @@ class FxDesktopBuild(BuildScript, TryToolsMixin, object):
|
|||
'check-test',
|
||||
'valgrind-test',
|
||||
'multi-l10n',
|
||||
'package-source',
|
||||
'update',
|
||||
],
|
||||
'require_config_file': True,
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# 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/.
|
||||
# ***** END LICENSE BLOCK *****
|
||||
"""fx_source.py.
|
||||
|
||||
Create a source readme.
|
||||
|
||||
"""
|
||||
import sys
|
||||
import os
|
||||
|
||||
# load modules from parent dir
|
||||
sys.path.insert(1, os.path.dirname(sys.path[0]))
|
||||
|
||||
from mozharness.base.script import BaseScript
|
||||
from mozharness.base.log import FATAL
|
||||
|
||||
|
||||
class FxSource(BaseScript):
|
||||
config_options = [
|
||||
[["--repo"], {
|
||||
"dest": "repo",
|
||||
"help": "the URL to the source repo",
|
||||
}],
|
||||
[["--revision"], {
|
||||
"dest": "revision",
|
||||
"help": "the revision of the source",
|
||||
}],
|
||||
[["--disable-mock"], {
|
||||
"dest": "disable_mock",
|
||||
"action": "store_true",
|
||||
"help": "dummy option",
|
||||
}],
|
||||
[["--scm-level"], {
|
||||
"dest": "scm_level",
|
||||
"help": "dummy option",
|
||||
}],
|
||||
[["--branch"], {
|
||||
"dest": "branch",
|
||||
"help": "dummy option",
|
||||
}],
|
||||
[["--build-pool"], {
|
||||
"dest": "build_pool",
|
||||
"help": "dummy option",
|
||||
}],
|
||||
]
|
||||
|
||||
def __init__(self):
|
||||
buildscript_kwargs = {
|
||||
'config_options': self.config_options,
|
||||
'all_actions': [
|
||||
'build',
|
||||
],
|
||||
'require_config_file': True,
|
||||
}
|
||||
super(FxSource, self).__init__(**buildscript_kwargs)
|
||||
|
||||
def build(self):
|
||||
c = self.config
|
||||
contents = c['tmpl'].format(**c)
|
||||
self.write_to_file(c['out_path'], contents, create_parent_dir=True,
|
||||
error_level=FATAL)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
fx_source = FxSource()
|
||||
fx_source.run_and_exit()
|
|
@ -101,6 +101,8 @@ DEFAULTS = dict(
|
|||
'network.proxy.type': 1,
|
||||
# Bug 1383896 - reduces noise in tests
|
||||
'idle.lastDailyNotification': int(time.time()),
|
||||
# Bug 1445243 - reduces precision of tests
|
||||
'privacy.reduceTimerPrecision': False,
|
||||
'places.database.lastMaintenance': FAR_IN_FUTURE,
|
||||
'security.enable_java': False,
|
||||
'security.fileuri.strict_origin_policy': False,
|
||||
|
|
|
@ -124017,6 +124017,18 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-scoping/shadow-disabled-sheet-001.html": [
|
||||
[
|
||||
"/css/css-scoping/shadow-disabled-sheet-001.html",
|
||||
[
|
||||
[
|
||||
"/css/css-scoping/reference/green-box.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-scoping/shadow-fallback-dynamic-001.html": [
|
||||
[
|
||||
"/css/css-scoping/shadow-fallback-dynamic-001.html",
|
||||
|
@ -124077,6 +124089,18 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-scoping/shadow-root-insert-into-document.html": [
|
||||
[
|
||||
"/css/css-scoping/shadow-root-insert-into-document.html",
|
||||
[
|
||||
[
|
||||
"/css/css-scoping/reference/green-box.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-scoping/slotted-with-pseudo-element.html": [
|
||||
[
|
||||
"/css/css-scoping/slotted-with-pseudo-element.html",
|
||||
|
@ -500875,6 +500899,10 @@
|
|||
"46913ea7e47811b11be898de5c3bd0a330ea6637",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-scoping/shadow-disabled-sheet-001.html": [
|
||||
"a3ddf0fe7fa422f5e712b8771669be76b0e3a798",
|
||||
"reftest"
|
||||
],
|
||||
"css/css-scoping/shadow-fallback-dynamic-001.html": [
|
||||
"062c99df18077a0205d0170d641b1d1e61199657",
|
||||
"reftest"
|
||||
|
@ -500895,6 +500923,10 @@
|
|||
"46d78b6d6931505bbc4bfc2f83e2bd0bac0d3472",
|
||||
"reftest"
|
||||
],
|
||||
"css/css-scoping/shadow-root-insert-into-document.html": [
|
||||
"2cee9fff35c9222074f4ef78dcfcb8a3e02bbc98",
|
||||
"reftest"
|
||||
],
|
||||
"css/css-scoping/slotted-invalidation.html": [
|
||||
"c500e1ceba1b293d45df5f66fd89d4a5d9ceb952",
|
||||
"testharness"
|
||||
|
@ -601484,7 +601516,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"xhr/xmlhttprequest-closing-worker.html": [
|
||||
"e3ceea784d45a3f89755cad4f60e11fe687b8e5a",
|
||||
"2e12b49aca2dc3908837b6b419c92cb890e60e3f",
|
||||
"testharness"
|
||||
],
|
||||
"xhr/xmlhttprequest-eventtarget.htm": [
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<!doctype html>
|
||||
<title>CSS Scoping Module Level 1 - Disabled stylesheet dynamically</title>
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
||||
<link rel="match" href="reference/green-box.html"/>
|
||||
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
||||
<div id="host"></div>
|
||||
<script>
|
||||
let root = host.attachShadow({ mode: 'open' });
|
||||
root.innerHTML = `
|
||||
<style>
|
||||
div { background: green; width: 100px; height: 100px; }
|
||||
</style>
|
||||
<style>
|
||||
div { background: red; }
|
||||
</style>
|
||||
<div></div>
|
||||
`;
|
||||
document.body.offsetTop;
|
||||
root.styleSheets[1].disabled = true;
|
||||
</script>
|
|
@ -1,6 +1,6 @@
|
|||
<!doctype html>
|
||||
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
|
||||
<link rel="author" href="mailto:emilio@crisal.io">
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
||||
<link rel="match" href="reference/green-box.html"/>
|
||||
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!doctype html>
|
||||
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
|
||||
<link rel="author" href="mailto:emilio@crisal.io">
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
||||
<link rel="match" href="reference/green-box.html"/>
|
||||
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!doctype html>
|
||||
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
|
||||
<link rel="author" href="mailto:emilio@crisal.io">
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
||||
<link rel="match" href="reference/green-box.html"/>
|
||||
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!doctype html>
|
||||
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
|
||||
<link rel="author" href="mailto:emilio@crisal.io">
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
||||
<link rel="match" href="reference/green-box.html"/>
|
||||
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!doctype html>
|
||||
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
|
||||
<link rel="author" href="mailto:emilio@crisal.io">
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
||||
<link rel="match" href="reference/green-box.html"/>
|
||||
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<!doctype html>
|
||||
<title>CSS Scoping Module Level 1 - Dynamic insertion of shadow host</title>
|
||||
<link rel="author" href="mailto:emilio@crisal.io">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
||||
<link rel="match" href="reference/green-box.html"/>
|
||||
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
||||
<script>
|
||||
let host = document.createElement('div');
|
||||
let root = host.attachShadow({ mode: 'open' });
|
||||
root.innerHTML = `
|
||||
<style>
|
||||
div { background: green; width: 100px; height: 100px; }
|
||||
</style>
|
||||
<div></div>
|
||||
`;
|
||||
document.body.offsetTop;
|
||||
document.body.appendChild(host);
|
||||
</script>
|
|
@ -236,6 +236,13 @@ public:
|
|||
}
|
||||
|
||||
Update();
|
||||
if (mHanging) {
|
||||
// We were hanging! We're done with that now, so let's report it.
|
||||
// ReportHang() doesn't do much work on the current thread, and is
|
||||
// safe to call from any thread as long as we're holding the lock.
|
||||
ReportHang(mInterval - mHangStart);
|
||||
mHanging = false;
|
||||
}
|
||||
mWaiting = true;
|
||||
}
|
||||
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче