Merge inbound to mozilla-central. a=merge

This commit is contained in:
Noemi Erli 2018-04-05 18:15:37 +03:00
Родитель 784748948c 71517dfd71
Коммит d0413b711d
14 изменённых файлов: 124 добавлений и 72 удалений

Просмотреть файл

@ -1075,7 +1075,9 @@ pref("security.sandbox.gpu.level", 0);
// Controls whether we disable win32k for the GMP processes.
// true means that win32k system calls are not permitted.
pref("security.sandbox.gmp.win32k-disable", true);
// Note: win32k is currently _not_ disabled due to intermittent test failures,
// where the GMP process fails very early. See bug 1449348.
pref("security.sandbox.gmp.win32k-disable", false);
#endif
#if defined(XP_MACOSX) && defined(MOZ_SANDBOX) && defined(MOZ_CONTENT_SANDBOX)

Просмотреть файл

@ -867,7 +867,7 @@
<image id="midi-notification-icon" class="notification-anchor-icon midi-icon" role="button"
tooltiptext="&urlbar.midiNotificationAnchor.tooltip;"/>
<image id="webauthn-notification-icon" class="notification-anchor-icon" role="button"
tooltiptext="&urlbar.defaultNotificationAnchor.tooltip;"/>
tooltiptext="&urlbar.webAuthnAnchor.tooltip;"/>
</box>
<image id="connection-icon"/>
<image id="extension-icon"/>

Просмотреть файл

@ -217,6 +217,7 @@ These should match what Safari and other Apple applications use on OS X Lion. --
<!ENTITY urlbar.webNotificationAnchor.tooltip "Change whether you can receive notifications from the site">
<!ENTITY urlbar.persistentStorageNotificationAnchor.tooltip "Store data in Persistent Storage">
<!ENTITY urlbar.remoteControlNotificationAnchor.tooltip "Browser is under remote control">
<!ENTITY urlbar.webAuthnAnchor.tooltip "Open Web Authentication panel">
<!ENTITY urlbar.webRTCShareDevicesNotificationAnchor.tooltip "Manage sharing your camera and/or microphone with the site">
<!ENTITY urlbar.webRTCShareMicrophoneNotificationAnchor.tooltip "Manage sharing your microphone with the site">

Просмотреть файл

@ -84,6 +84,7 @@ const ErrorDocs = {
JSMSG_INCOMPATIBLE_PROTO: "Called_on_incompatible_type",
JSMSG_INCOMPATIBLE_METHOD: "Called_on_incompatible_type",
JSMSG_BAD_INSTANCEOF_RHS: "invalid_right_hand_side_instanceof_operand",
JSMSG_EMPTY_ARRAY_REDUCE: "Reduce_of_empty_array_with_no_initial_value",
};
const MIXED_CONTENT_LEARN_MORE = "https://developer.mozilla.org/docs/Web/Security/Mixed_content";

Просмотреть файл

@ -6,6 +6,7 @@
#include "Image.h"
#include "Layers.h" // for LayerManager
#include "nsRefreshDriver.h"
#include "nsContentUtils.h"
#include "mozilla/SizeOfState.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/Tuple.h" // for Tie
@ -403,14 +404,17 @@ ImageResource::NotifyDrawingObservers()
}
// Record the image drawing for startup performance testing.
nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
NS_WARNING_ASSERTION(obs, "Can't get an observer service handle");
if (obs) {
nsCOMPtr<nsIURI> imageURI = mURI->ToIURI();
nsAutoCString spec;
imageURI->GetSpec(spec);
obs->NotifyObservers(nullptr, "image-drawing", NS_ConvertUTF8toUTF16(spec).get());
}
nsCOMPtr<nsIURI> uri = mURI->ToIURI();
nsContentUtils::AddScriptRunner(NS_NewRunnableFunction(
"image::ImageResource::NotifyDrawingObservers", [uri]() {
nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
NS_WARNING_ASSERTION(obs, "Can't get an observer service handle");
if (obs) {
nsAutoCString spec;
uri->GetSpec(spec);
obs->NotifyObservers(nullptr, "image-drawing", NS_ConvertUTF8toUTF16(spec).get());
}
}));
}
#endif

Просмотреть файл

@ -1464,9 +1464,7 @@ enum FunctionSyntaxKind
ClassConstructor,
DerivedClassConstructor,
Getter,
GetterNoExpressionClosure,
Setter,
SetterNoExpressionClosure
};
static inline bool
@ -1481,23 +1479,11 @@ IsConstructorKind(FunctionSyntaxKind kind)
return kind == ClassConstructor || kind == DerivedClassConstructor;
}
static inline bool
IsGetterKind(FunctionSyntaxKind kind)
{
return kind == Getter || kind == GetterNoExpressionClosure;
}
static inline bool
IsSetterKind(FunctionSyntaxKind kind)
{
return kind == Setter || kind == SetterNoExpressionClosure;
}
static inline bool
IsMethodDefinitionKind(FunctionSyntaxKind kind)
{
return kind == Method || IsConstructorKind(kind) ||
IsGetterKind(kind) || IsSetterKind(kind);
kind == Getter || kind == Setter;
}
static inline ParseNode*

Просмотреть файл

@ -2818,12 +2818,10 @@ ParserBase::newFunction(HandleAtom atom, FunctionSyntaxKind kind,
allocKind = gc::AllocKind::FUNCTION_EXTENDED;
break;
case Getter:
case GetterNoExpressionClosure:
flags = JSFunction::INTERPRETED_GETTER;
allocKind = gc::AllocKind::FUNCTION_EXTENDED;
break;
case Setter:
case SetterNoExpressionClosure:
flags = JSFunction::INTERPRETED_SETTER;
allocKind = gc::AllocKind::FUNCTION_EXTENDED;
break;
@ -2935,10 +2933,10 @@ JSAtom*
ParserBase::prefixAccessorName(PropertyType propType, HandleAtom propAtom)
{
RootedAtom prefix(context);
if (propType == PropertyType::Setter || propType == PropertyType::SetterNoExpressionClosure) {
if (propType == PropertyType::Setter) {
prefix = context->names().setPrefix;
} else {
MOZ_ASSERT(propType == PropertyType::Getter || propType == PropertyType::GetterNoExpressionClosure);
MOZ_ASSERT(propType == PropertyType::Getter);
prefix = context->names().getPrefix;
}
@ -3041,7 +3039,7 @@ GeneralParser<ParseHandler, CharT>::functionArguments(YieldHandling yieldHandlin
bool disallowDuplicateParams = kind == Arrow || kind == Method || kind == ClassConstructor;
AtomVector& positionalFormals = pc->positionalFormalParameterNames();
if (IsGetterKind(kind)) {
if (kind == Getter) {
error(JSMSG_ACCESSOR_WRONG_ARGS, "getter", "no", "s");
return false;
}
@ -3059,7 +3057,7 @@ GeneralParser<ParseHandler, CharT>::functionArguments(YieldHandling yieldHandlin
MOZ_ASSERT_IF(parenFreeArrow, TokenKindIsPossibleIdentifier(tt));
if (tt == TokenKind::TripleDot) {
if (IsSetterKind(kind)) {
if (kind == Setter) {
error(JSMSG_ACCESSOR_WRONG_ARGS, "setter", "one", "");
return false;
}
@ -3186,7 +3184,7 @@ GeneralParser<ParseHandler, CharT>::functionArguments(YieldHandling yieldHandlin
}
// Setter syntax uniquely requires exactly one argument.
if (IsSetterKind(kind))
if (kind == Setter)
break;
if (!tokenStream.matchToken(&matched, TokenKind::Comma, TokenStream::Operand))
@ -3207,7 +3205,7 @@ GeneralParser<ParseHandler, CharT>::functionArguments(YieldHandling yieldHandlin
if (!tokenStream.getToken(&tt, TokenStream::Operand))
return false;
if (tt != TokenKind::Rp) {
if (IsSetterKind(kind)) {
if (kind == Setter) {
error(JSMSG_ACCESSOR_WRONG_ARGS, "setter", "one", "");
return false;
}
@ -3224,7 +3222,7 @@ GeneralParser<ParseHandler, CharT>::functionArguments(YieldHandling yieldHandlin
funbox->hasDirectEvalInParameterExpr = true;
funbox->function()->setArgCount(positionalFormals.length());
} else if (IsSetterKind(kind)) {
} else if (kind == Setter) {
error(JSMSG_ACCESSOR_WRONG_ARGS, "setter", "one", "");
return false;
}
@ -7157,10 +7155,8 @@ ToAccessorType(PropertyType propType)
{
switch (propType) {
case PropertyType::Getter:
case PropertyType::GetterNoExpressionClosure:
return AccessorType::Getter;
case PropertyType::Setter:
case PropertyType::SetterNoExpressionClosure:
return AccessorType::Setter;
case PropertyType::Normal:
case PropertyType::Method:
@ -7297,11 +7293,6 @@ GeneralParser<ParseHandler, CharT>::classDefinition(YieldHandling yieldHandling,
return null();
}
if (propType == PropertyType::Getter)
propType = PropertyType::GetterNoExpressionClosure;
if (propType == PropertyType::Setter)
propType = PropertyType::SetterNoExpressionClosure;
bool isConstructor = !isStatic && propAtom == context->names().constructor;
if (isConstructor) {
if (propType != PropertyType::Method) {
@ -7320,8 +7311,8 @@ GeneralParser<ParseHandler, CharT>::classDefinition(YieldHandling yieldHandling,
RootedAtom funName(context);
switch (propType) {
case PropertyType::GetterNoExpressionClosure:
case PropertyType::SetterNoExpressionClosure:
case PropertyType::Getter:
case PropertyType::Setter:
if (!anyChars.isCurrentTokenType(TokenKind::Rb)) {
funName = prefixAccessorName(propType, propAtom);
if (!funName)
@ -9750,18 +9741,10 @@ GeneralParser<ParseHandler, CharT>::methodDefinition(uint32_t toStringStart, Pro
kind = Getter;
break;
case PropertyType::GetterNoExpressionClosure:
kind = GetterNoExpressionClosure;
break;
case PropertyType::Setter:
kind = Setter;
break;
case PropertyType::SetterNoExpressionClosure:
kind = SetterNoExpressionClosure;
break;
case PropertyType::Method:
case PropertyType::GeneratorMethod:
case PropertyType::AsyncMethod:

Просмотреть файл

@ -234,9 +234,7 @@ enum class PropertyType {
Shorthand,
CoverInitializedName,
Getter,
GetterNoExpressionClosure,
Setter,
SetterNoExpressionClosure,
Method,
GeneratorMethod,
AsyncMethod,

Просмотреть файл

@ -237,8 +237,9 @@ MacroAssemblerCompat::profilerEnterFrame(RegisterOrSP framePtr, Register scratch
void
MacroAssemblerCompat::breakpoint()
{
static int code = 0xA77;
Brk((code++) & 0xffff);
// Note, other payloads are possible, but GDB is known to misinterpret them
// sometimes and iloop on the breakpoint instead of stopping properly.
Brk(0);
}
// Either `any` is valid or `sixtyfour` is valid. Return a 32-bit ARMRegister

Просмотреть файл

@ -91,20 +91,15 @@ MediaQueryList::AddListener(EventListener* aListener, ErrorResult& aRv)
}
void
MediaQueryList::AddEventListener(const nsAString& aType,
EventListener* aCallback,
const AddEventListenerOptionsOrBoolean& aOptions,
const dom::Nullable<bool>& aWantsUntrusted,
ErrorResult& aRv)
MediaQueryList::EventListenerAdded(nsAtom* aType)
{
if (!mMatchesValid) {
MOZ_ASSERT(!HasListeners(),
"when listeners present, must keep mMatches current");
// HasListeners() might still be false if the added thing wasn't a
// listener we care about.
if (!mMatchesValid && HasListeners()) {
RecomputeMatches();
}
DOMEventTargetHelper::AddEventListener(aType, aCallback, aOptions,
aWantsUntrusted, aRv);
DOMEventTargetHelper::EventListenerAdded(aType);
}
void

Просмотреть файл

@ -54,13 +54,8 @@ public:
void AddListener(EventListener* aListener, ErrorResult& aRv);
void RemoveListener(EventListener* aListener, ErrorResult& aRv);
using nsIDOMEventTarget::AddEventListener;
virtual void AddEventListener(const nsAString& aType,
EventListener* aCallback,
const AddEventListenerOptionsOrBoolean& aOptions,
const Nullable<bool>& aWantsUntrusted,
ErrorResult& aRv) override;
using DOMEventTargetHelper::EventListenerAdded;
void EventListenerAdded(nsAtom* aType) override;
IMPL_EVENT_HANDLER(change)

Просмотреть файл

@ -174,6 +174,8 @@ support-files = file_bug1443344.css
[test_bug1443344-2.html]
scheme = https
support-files = file_bug1443344.css
[test_bug1451199-1.html]
[test_bug1451199-2.html]
[test_cascade.html]
[test_ch_ex_no_infloops.html]
[test_change_hint_optimizations.html]

Просмотреть файл

@ -0,0 +1,42 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1451199
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 1451199</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="application/javascript">
/** Test for Bug 1451199 **/
SimpleTest.waitForExplicitFinish();
addLoadEvent(function() {
// We have to be careful to not check l.matches until the very end
// of the test.
var l = frames[0].matchMedia("(orientation: portrait)");
var iframe = document.querySelector("iframe");
iframe.width = "50";
iframe.contentDocument.documentElement.offsetWidth; // Flush layout
l.onchange = function() {
is(l.matches, false,
"Should not match portrait by the time we get notified");
SimpleTest.finish();
};
iframe.width = "200";
});
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1451199">Mozilla Bug 1451199</a>
<p id="display"><iframe height="100" width="200"></iframe></p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
</body>
</html>

Просмотреть файл

@ -0,0 +1,42 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1451199
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 1451199</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="application/javascript">
/** Test for Bug 1451199 **/
SimpleTest.waitForExplicitFinish();
addLoadEvent(function() {
// We have to be careful to not check l.matches until the very end
// of the test.
var l = frames[0].matchMedia("(orientation: portrait)");
var iframe = document.querySelector("iframe");
iframe.width = "50";
iframe.contentDocument.documentElement.offsetWidth; // Flush layout
l.addEventListener("change", function() {
is(l.matches, false,
"Should not match portrait by the time we get notified");
SimpleTest.finish();
});
iframe.width = "200";
});
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1451199">Mozilla Bug 1451199</a>
<p id="display"><iframe height="100" width="200"></iframe></p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
</body>
</html>