import change from rmottola/Arctic-Fox:

- Bug 1135413 - Use one bit per bool member to save a few bytes in nsRange objects. r=smaug (e24280513)
- Bug 1134531 - Remove nsTextFrame::DidSetStyleContext which only contained a (now obsolete) wallpaper. r=heycam (f69222f60)
- pointer style (d07cd6c8d)
- Bug 1131955 - IonBuilder: Add collectRangeInfoPreTrunc to MBoundsCheck, r=sunfish (8346dd561)
- Bug 1175049 - Fix non-universal 32-bit build on OS X with Xcode 6.3 tools. r=josh (c55378e1b)
- Bug 1135718 - Convert unboxed plain objects to natives before changing their prototype, r=jandem. (f6c3fe702)
- backout 1245024 and 1279303 for breaking https://forum.manjaro.org/ (1cc8627a4)
- bug 967792 - make localhost resolve offline r=dragana (73e28830a)
- Bug 990907 - Have DLBI pick up changes in the char-clip on text frames. r=mstange,mattwoodrow (6670b1c56)
- bug 1127429 - XHR can set BYPASS_LOCAL_CACHE_IF_BUSY all the time r=bz (92d149251)
-  Bug 1136337 - IonMonkey: Override default alias set for MCheckOverRecursed, r=sstangl (23c1fd63d)
- Bug 1118622 - Apply the gain to AnalyserNode data prior to sending on the main thread. r=ehsan (e3e50d448)
- Bug 1135908 - [E10s] Proxy for Character/SelectionCount(), r=tbsaunde (9ba60b0f2)
- Bug 1136382 - Mark TabChild's message manager for CC, r=mccr8 (21ae5721d)
- Bug 1136357 - Make Promise skippable, r=mccr8 (1dea4efb1)
This commit is contained in:
2019-08-17 10:14:08 +08:00
parent 18084d9cce
commit b7ea83bfb7
56 changed files with 408 additions and 488 deletions
+22 -11
View File
@@ -330,12 +330,17 @@ static gint
getCharacterCountCB(AtkText *aText)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
if (!accWrap)
return 0;
if (accWrap) {
HyperTextAccessible* textAcc = accWrap->AsHyperText();
return
textAcc->IsDefunct() ? 0 : static_cast<gint>(textAcc->CharacterCount());
}
HyperTextAccessible* textAcc = accWrap->AsHyperText();
return textAcc->IsDefunct() ?
0 : static_cast<gint>(textAcc->CharacterCount());
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
return proxy->CharacterCount();
}
return 0;
}
static gint
@@ -362,14 +367,20 @@ static gint
getTextSelectionCountCB(AtkText *aText)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
if (!accWrap)
return 0;
if (accWrap) {
HyperTextAccessible* text = accWrap->AsHyperText();
if (!text || !text->IsTextRole()) {
return 0;
}
HyperTextAccessible* text = accWrap->AsHyperText();
if (!text || !text->IsTextRole())
return 0;
return text->SelectionCount();
}
return text->SelectionCount();
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
return proxy->SelectionCount();
}
return 0;
}
static gchar*
+16
View File
@@ -207,6 +207,22 @@ DocAccessibleChild::RecvRelations(const uint64_t& aID,
return true;
}
bool
DocAccessibleChild::RecvCharacterCount(const uint64_t& aID, int32_t* aCount)
{
HyperTextAccessible* acc = IdToHyperTextAccessible(aID);
*aCount = acc ? acc->CharacterCount() : 0;
return true;
}
bool
DocAccessibleChild::RecvSelectionCount(const uint64_t& aID, int32_t* aCount)
{
HyperTextAccessible* acc = IdToHyperTextAccessible(aID);
*aCount = acc ? acc->SelectionCount() : 0;
return true;
}
bool
DocAccessibleChild::RecvTextSubstring(const uint64_t& aID,
const int32_t& aStartOffset,
+6
View File
@@ -63,6 +63,12 @@ public:
virtual bool RecvAttributes(const uint64_t& aID,
nsTArray<Attribute> *aAttributes) override;
virtual bool RecvCharacterCount(const uint64_t& aID, int32_t* aCount)
override;
virtual bool RecvSelectionCount(const uint64_t& aID, int32_t* aCount)
override;
virtual bool RecvTextSubstring(const uint64_t& aID,
const int32_t& aStartOffset,
const int32_t& aEndOffset, nsString* aText)
+2
View File
@@ -65,6 +65,8 @@ child:
// AccessibleText
// TextSubstring is getText in IDL.
prio(high) sync CharacterCount(uint64_t aID) returns(int32_t aCount);
prio(high) sync SelectionCount(uint64_t aID) returns(int32_t aCount);
prio(high) sync TextSubstring(uint64_t aID, int32_t aStartOffset, int32_t
aEndOffset) returns(nsString aText);
prio(high) sync GetTextAfterOffset(uint64_t aID, int32_t aOffset, int32_t aBoundaryType)
+16
View File
@@ -149,6 +149,22 @@ ProxyAccessible::Relations(nsTArray<RelationType>* aTypes,
}
}
int32_t
ProxyAccessible::CharacterCount()
{
int32_t count = 0;
unused << mDoc->SendCharacterCount(mID, &count);
return count;
}
int32_t
ProxyAccessible::SelectionCount()
{
int32_t count = 0;
unused << mDoc->SendSelectionCount(mID, &count);
return count;
}
void
ProxyAccessible::TextSubstring(int32_t aStartOffset, int32_t aEndOfset,
nsString& aText) const
+3
View File
@@ -99,6 +99,9 @@ public:
void Relations(nsTArray<RelationType>* aTypes,
nsTArray<nsTArray<ProxyAccessible*>>* aTargetSets) const;
int32_t CharacterCount();
int32_t SelectionCount();
/**
* Get the text between the given offsets.
*/
+10
View File
@@ -16,6 +16,7 @@
#include "nsISHistory.h"
#include "nsISHEntry.h"
#include "nsISHContainer.h"
#include "nsITabChild.h"
#include "nsIWindowWatcher.h"
#include "mozilla/Services.h"
#include "nsIXULWindow.h"
@@ -297,6 +298,15 @@ MarkWindowList(nsISimpleEnumerator* aWindowList, bool aCleanupJS,
nsCOMPtr<nsIDocShell> rootDocShell = window->GetDocShell();
MarkDocShell(rootDocShell, aCleanupJS, aPrepareForCC);
nsCOMPtr<nsITabChild> tabChild = do_GetInterface(rootDocShell);
if (tabChild) {
nsCOMPtr<nsIContentFrameMessageManager> mm;
tabChild->GetMessageManager(getter_AddRefs(mm));
if (mm) {
mm->MarkForCC();
}
}
}
}
}
+8 -7
View File
@@ -327,13 +327,14 @@ protected:
int32_t mStartOffset;
int32_t mEndOffset;
bool mIsPositioned;
bool mIsDetached;
bool mMaySpanAnonymousSubtrees;
bool mIsGenerated;
bool mStartOffsetWasIncremented;
bool mEndOffsetWasIncremented;
bool mEnableGravitationOnElementRemoval;
bool mIsPositioned : 1;
bool mIsDetached : 1;
bool mMaySpanAnonymousSubtrees : 1;
bool mInSelection : 1;
bool mIsGenerated : 1;
bool mStartOffsetWasIncremented : 1;
bool mEndOffsetWasIncremented : 1;
bool mEnableGravitationOnElementRemoval : 1;
#ifdef DEBUG
int32_t mAssertNextInsertOrAppendIndex;
nsINode* mAssertNextInsertOrAppendNode;
+11 -6
View File
@@ -3023,13 +3023,18 @@ nsXMLHttpRequest::Send(nsIVariant* aVariant, const Nullable<RequestBody>& aBody)
if (method.EqualsLiteral("POST")) {
AddLoadFlags(mChannel,
nsIRequest::LOAD_BYPASS_CACHE | nsIRequest::INHIBIT_CACHING);
}
// When we are sync loading, we need to bypass the local cache when it would
// otherwise block us waiting for exclusive access to the cache. If we don't
// do this, then we could dead lock in some cases (see bug 309424).
else if (!(mState & XML_HTTP_REQUEST_ASYNC)) {
} else {
// When we are sync loading, we need to bypass the local cache when it would
// otherwise block us waiting for exclusive access to the cache. If we don't
// do this, then we could dead lock in some cases (see bug 309424).
//
// Also don't block on the cache entry on async if it is busy - favoring parallelism
// over cache hit rate for xhr. This does not disable the cache everywhere -
// only in cases where more than one channel for the same URI is accessed
// simultanously.
AddLoadFlags(mChannel,
nsICachingChannel::LOAD_BYPASS_LOCAL_CACHE_IF_BUSY);
nsICachingChannel::LOAD_BYPASS_LOCAL_CACHE_IF_BUSY);
}
// Since we expect XML data, set the type hint accordingly
+5
View File
@@ -6,6 +6,9 @@
var gExpectedStatus = null;
var gNextTestFunc = null;
var prefs = Components.classes["@mozilla.org/preferences-service;1"].
getService(Components.interfaces.nsIPrefBranch);
var asyncXHR = {
load: function() {
var request = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
@@ -39,6 +42,7 @@ function run_test_pt1() {
catch (e) {
}
ioService.offline = true;
prefs.setBoolPref("network.dns.offline-localhost", false);
gExpectedStatus = Components.results.NS_ERROR_OFFLINE;
gNextTestFunc = run_test_pt2;
@@ -51,6 +55,7 @@ function run_test_pt2() {
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
ioService.offline = false;
prefs.clearUserPref("network.dns.offline-localhost");
gExpectedStatus = Components.results.NS_ERROR_CONNECTION_REFUSED;
gNextTestFunc = end_test;
+15 -3
View File
@@ -66,9 +66,21 @@ public:
MutexAutoLock lock(NodeMutex());
if (Node() &&
aInput.mChannelData.Length() > 0) {
nsRefPtr<TransferBuffer> transfer = new TransferBuffer(aStream, aInput);
if (Node()) {
// If the input is silent, we sill need to send a silent buffer
if (aOutput->IsNull()) {
AllocateAudioBlock(1, aOutput);
float* samples = static_cast<float*>(
const_cast<void*>(aOutput->mChannelData[0]));
PodZero(samples, WEBAUDIO_BLOCK_SIZE);
}
uint32_t channelCount = aOutput->mChannelData.Length();
for (uint32_t channel = 0; channel < channelCount; ++channel) {
float* samples = static_cast<float*>(
const_cast<void*>(aOutput->mChannelData[channel]));
AudioBlockInPlaceScale(samples, aOutput->mVolume);
}
nsRefPtr<TransferBuffer> transfer = new TransferBuffer(aStream, *aOutput);
NS_DispatchToMainThread(transfer);
}
}
+1
View File
@@ -26,6 +26,7 @@ support-files =
webaudio.js
[test_analyserNode.html]
[test_analyserScale.html]
[test_analyserNodeOutput.html]
[test_analyserNodePassThrough.html]
[test_AudioBuffer.html]
@@ -0,0 +1,59 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test AnalyserNode when the input is scaled </title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="webaudio.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<pre id="test">
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
addLoadEvent(function() {
var context = new AudioContext();
var gain = context.createGain();
var analyser = context.createAnalyser();
var osc = context.createOscillator();
osc.connect(gain);
gain.connect(analyser);
osc.start();
var array = new Uint8Array(analyser.frequencyBinCount);
function getAnalyserData() {
gain.gain.setValueAtTime(currentGain, context.currentTime);
analyser.getByteTimeDomainData(array);
var inrange = true;
var max = -1;
for (var i = 0; i < array.length; i++) {
if (array[i] > max) {
max = Math.abs(array[i] - 128);
}
}
if (max <= currentGain * 128) {
ok(true, "Analyser got scaled data for " + currentGain);
currentGain = tests.shift();
if (currentGain == undefined) {
SimpleTest.finish();
return;
}
}
requestAnimationFrame(getAnalyserData);
}
var tests = [1.0, 0.5, 0.0];
var currentGain = tests.shift();
requestAnimationFrame(getAnalyserData);
});
</script>
</pre>
</body>
</html>
+26
View File
@@ -283,6 +283,32 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(Promise)
NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(Promise)
if (tmp->IsBlack()) {
if (tmp->mResult.isObject()) {
JS::ExposeObjectToActiveJS(&(tmp->mResult.toObject()));
}
if (tmp->mAllocationStack) {
JS::ExposeObjectToActiveJS(tmp->mAllocationStack);
}
if (tmp->mRejectionStack) {
JS::ExposeObjectToActiveJS(tmp->mRejectionStack);
}
if (tmp->mFullfillmentStack) {
JS::ExposeObjectToActiveJS(tmp->mFullfillmentStack);
}
return true;
}
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_END
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_BEGIN(Promise)
return tmp->IsBlackAndDoesNotNeedTracing(tmp);
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_END
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(Promise)
return tmp->IsBlack();
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END
NS_IMPL_CYCLE_COLLECTING_ADDREF(Promise)
NS_IMPL_CYCLE_COLLECTING_RELEASE(Promise)
+1 -1
View File
@@ -75,7 +75,7 @@ class Promise : public nsISupports,
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_PROMISE_IID)
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Promise)
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(Promise)
MOZ_DECLARE_WEAKREFERENCE_TYPENAME(Promise)
// Promise creation tries to create a JS reflector for the Promise, so is
-1
View File
@@ -1061,7 +1061,6 @@ static const JSFunctionSpec object_static_methods[] = {
JS_FN("getPrototypeOf", obj_getPrototypeOf, 1,0),
JS_FN("setPrototypeOf", obj_setPrototypeOf, 2,0),
JS_FN("getOwnPropertyDescriptor", obj_getOwnPropertyDescriptor,2,0),
JS_SELF_HOSTED_FN("getOwnPropertyDescriptors", "ObjectGetOwnPropertyDescriptors", 1,JSPROP_DEFINE_LATE),
JS_FN("keys", obj_keys, 1,0),
JS_SELF_HOSTED_FN("values", "ObjectValues", 1,JSPROP_DEFINE_LATE),
JS_SELF_HOSTED_FN("entries", "ObjectEntries", 1,JSPROP_DEFINE_LATE),
-27
View File
@@ -41,33 +41,6 @@ function ObjectStaticAssign(target, firstSource) {
return to;
}
// ES stage 4 proposal
function ObjectGetOwnPropertyDescriptors(O) {
// Step 1.
var obj = ToObject(O);
// Step 2.
var keys = OwnPropertyKeys(obj, JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS);
// Step 3.
var descriptors = {};
// Step 4.
for (var index = 0, len = keys.length; index < len; index++) {
var key = keys[index];
// Steps 4.a-b.
var desc = std_Object_getOwnPropertyDescriptor(obj, key);
// Step 4.c.
if (typeof desc !== "undefined")
_DefineDataProperty(descriptors, key, desc);
}
// Step 5.
return descriptors;
}
function ObjectDefineSetter(name, setter) {
var object;
if (this === null || this === undefined)
+13
View File
@@ -0,0 +1,13 @@
setJitCompilerOption("ion.warmup.trigger", 30);
function ArrayCallback(state)
this.state = state;
ArrayCallback.prototype.isUpperCase = function(v, index, array) {
return this.state ? true : (v == v.toUpperCase());
};
strings = ['hello', 'Array', 'WORLD'];
obj = new ArrayCallback(false);
strings.filter(obj.isUpperCase, obj)
obj = new ArrayCallback(true);
strings.filter(obj.isUpperCase, obj)
obj.__proto__ = {};
+5 -2
View File
@@ -2535,9 +2535,12 @@ LIRGenerator::visitNot(MNot* ins)
}
void
LIRGenerator::visitBoundsCheck(MBoundsCheck* ins)
LIRGenerator::visitBoundsCheck(MBoundsCheck *ins)
{
LInstruction* check;
if (!ins->fallible())
return;
LInstruction *check;
if (ins->minimum() || ins->maximum()) {
check = new(alloc()) LBoundsCheckRange(useRegisterOrConstant(ins->index()),
useAny(ins->length()),
+11 -3
View File
@@ -6887,6 +6887,9 @@ class MCheckOverRecursed
static MCheckOverRecursed* New(TempAllocator& alloc) {
return new(alloc) MCheckOverRecursed();
}
AliasSet getAliasSet() const override {
return AliasSet::None();
}
};
// Check whether we need to fire the interrupt handler.
@@ -8000,9 +8003,10 @@ class MBoundsCheck
// Range over which to perform the bounds check, may be modified by GVN.
int32_t minimum_;
int32_t maximum_;
bool fallible_;
MBoundsCheck(MDefinition* index, MDefinition* length)
: MBinaryInstruction(index, length), minimum_(0), maximum_(0)
MBoundsCheck(MDefinition *index, MDefinition *length)
: MBinaryInstruction(index, length), minimum_(0), maximum_(0), fallible_(true)
{
setGuard();
setMovable();
@@ -8049,7 +8053,11 @@ class MBoundsCheck
virtual AliasSet getAliasSet() const override {
return AliasSet::None();
}
void computeRange(TempAllocator& alloc) override;
void computeRange(TempAllocator &alloc) override;
bool fallible() const {
return fallible_;
}
void collectRangeInfoPreTrunc() override;
ALLOW_CLONE(MBoundsCheck)
};
+20
View File
@@ -3172,6 +3172,26 @@ MToInt32::collectRangeInfoPreTrunc()
canBeNegativeZero_ = false;
}
void
MBoundsCheck::collectRangeInfoPreTrunc()
{
Range indexRange(index());
Range lengthRange(length());
if (!indexRange.hasInt32LowerBound() || !indexRange.hasInt32UpperBound())
return;
if (!lengthRange.hasInt32LowerBound() || lengthRange.canBeNaN())
return;
int64_t indexLower = indexRange.lower();
int64_t indexUpper = indexRange.upper();
int64_t lengthLower = lengthRange.lower();
int64_t min = minimum();
int64_t max = maximum();
if (indexLower + min >= 0 && indexUpper + max < lengthLower)
fallible_ = false;
}
void
MBoundsCheckLower::collectRangeInfoPreTrunc()
{
+5
View File
@@ -3060,6 +3060,11 @@ js::SetPrototype(JSContext *cx, HandleObject obj, HandleObject proto, JS::Object
return false;
}
// Convert unboxed objects to their native representations before changing
// their prototype/group, as they depend on the group for their layout.
if (obj->is<UnboxedPlainObject>() && !UnboxedPlainObject::convertToNative(cx, obj))
return false;
Rooted<TaggedProto> taggedProto(cx, TaggedProto(proto));
if (!SetClassAndProto(cx, obj, obj->getClass(), taggedProto))
return false;
@@ -1,38 +0,0 @@
// Copyright (C) 2016 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Object.getOwnPropertyDescriptors on a proxy with duplicate ownKeys should work
esid: pending
author: Jordan Harband
features: [Proxy]
---*/
var i = 0;
var descriptors = [
{ enumerable: false, value: "A1", writable: true, configurable: true },
{ enumerable: true, value: "A2", writable: true, configurable: true }
];
var log = '';
var proxy = new Proxy({}, {
ownKeys() {
log += 'ownKeys|';
return ['DUPLICATE', 'DUPLICATE', 'DUPLICATE'];
},
getOwnPropertyDescriptor(t, name) {
log += 'getOwnPropertyDescriptor:' + name + '|';
return descriptors[i++];
}
});
var result = Object.getOwnPropertyDescriptors(proxy);
assert.sameValue(result.hasOwnProperty('DUPLICATE'), true);
var lastDescriptor = descriptors[descriptors.length - 1];
assert.notSameValue(result.DUPLICATE, lastDescriptor);
assert.sameValue(result.DUPLICATE.enumerable, lastDescriptor.enumerable);
assert.sameValue(result.DUPLICATE.configurable, lastDescriptor.configurable);
assert.sameValue(result.DUPLICATE.value, lastDescriptor.value);
assert.sameValue(result.DUPLICATE.writable, lastDescriptor.writable);
assert.sameValue(log, 'ownKeys|getOwnPropertyDescriptor:DUPLICATE|getOwnPropertyDescriptor:DUPLICATE|getOwnPropertyDescriptor:DUPLICATE|');
@@ -1,16 +0,0 @@
// Copyright (C) 2016 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Object.getOwnPropertyDescriptors should fail if given a null or undefined value
esid: pending
author: Jordan Harband
---*/
assert.throws(TypeError, function () {
Object.getOwnPropertyDescriptors(null);
});
assert.throws(TypeError, function () {
Object.getOwnPropertyDescriptors(undefined);
});
@@ -1,16 +0,0 @@
// Copyright (C) 2016 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Object.getOwnPropertyDescriptors should have length 1
esid: pending
author: Jordan Harband
includes: [propertyHelper.js]
---*/
assert.sameValue(Object.getOwnPropertyDescriptors.length, 1, 'Expected Object.getOwnPropertyDescriptors.length to be 1');
var desc = Object.getOwnPropertyDescriptor(Object.getOwnPropertyDescriptors, 'length');
assertEq(desc.enumerable, false);
assertEq(desc.writable, false);
assertEq(desc.configurable, true);
@@ -1,20 +0,0 @@
// Copyright (C) 2016 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Object.getOwnPropertyDescriptors should have name property with value 'getOwnPropertyDescriptors'
esid: pending
author: Jordan Harband
includes: [propertyHelper.js]
---*/
assert.sameValue(
Object.getOwnPropertyDescriptors.name,
'getOwnPropertyDescriptors',
'Expected Object.getOwnPropertyDescriptors.name to be "getOwnPropertyDescriptors"'
);
var desc = Object.getOwnPropertyDescriptor(Object.getOwnPropertyDescriptors, 'name');
assertEq(desc.enumerable, false);
assertEq(desc.writable, false);
assertEq(desc.configurable, true);
@@ -1,14 +0,0 @@
// Copyright (C) 2016 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Object.getOwnPropertyDescriptors should be writable, non-enumerable, and configurable
esid: pending
author: Jordan Harband
includes: [propertyHelper.js]
---*/
var desc = Object.getOwnPropertyDescriptor(Object, 'getOwnPropertyDescriptors');
assertEq(desc.enumerable, false);
assertEq(desc.writable, true);
assertEq(desc.configurable, true);
@@ -1,43 +0,0 @@
// Copyright (C) 2016 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Object.getOwnPropertyDescriptors does not see inherited properties.
esid: pending
author: Jordan Harband
---*/
var F = function () {};
F.prototype.a = {};
F.prototype.b = {};
var f = new F();
var bValue = {};
f.b = bValue; // shadow the prototype
Object.defineProperty(f, 'c', {
enumerable: false,
configurable: true,
writable: false,
value: {}
}); // solely an own property
var result = Object.getOwnPropertyDescriptors(f);
assert.sameValue(!!result.b, true, 'b has a descriptor');
assert.sameValue(!!result.c, true, 'c has a descriptor');
assert.sameValue(result.b.enumerable, true, 'b is enumerable');
assert.sameValue(result.b.configurable, true, 'b is configurable');
assert.sameValue(result.b.writable, true, 'b is writable');
assert.sameValue(result.b.value, bValue, 'bs value is `bValue`');
assert.sameValue(result.c.enumerable, false, 'c is enumerable');
assert.sameValue(result.c.configurable, true, 'c is configurable');
assert.sameValue(result.c.writable, false, 'c is writable');
assert.sameValue(result.c.value, f.c, 'cs value is `f.c`');
assert.sameValue(
Object.keys(result).length,
2,
'result has same number of own property names as f'
);
@@ -1,13 +0,0 @@
// Copyright (C) 2016 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Object.getOwnPropertyDescriptors should produce a normal object inheriting from Object.prototype
esid: pending
author: Jordan Harband
---*/
assert.sameValue(
Object.getPrototypeOf(Object.getOwnPropertyDescriptors({})),
Object.prototype
);
@@ -1,34 +0,0 @@
// Copyright (C) 2016 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Object.getOwnPropertyDescriptors should perform observable operations in the correct order
esid: pending
author: Jordan Harband
features: [Proxy]
includes: [proxyTrapsHelper.js]
---*/
var log = "";
var object = { a: 0, b: 0, c: 0 };
var handler = {
getOwnPropertyDescriptor: function (target, propertyKey) {
assert.sameValue(target, object, "getOwnPropertyDescriptor");
log += "|getOwnPropertyDescriptor:" + propertyKey;
return Object.getOwnPropertyDescriptor(target, propertyKey);
},
ownKeys: function (target) {
assert.sameValue(target, object, "ownKeys");
log += "|ownKeys";
return Object.getOwnPropertyNames(target);
}
};
var check = {
get: function (target, propertyKey, receiver) {
assertEq(propertyKey in target, true, "handler check: " + propertyKey);
return target[propertyKey];
}
};
var proxy = new Proxy(object, new Proxy(handler, check));
var result = Object.getOwnPropertyDescriptors(proxy);
assert.sameValue(log, "|ownKeys|getOwnPropertyDescriptor:a|getOwnPropertyDescriptor:b|getOwnPropertyDescriptor:c", 'log');
@@ -1,16 +0,0 @@
// Copyright (C) 2016 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Object.getOwnPropertyDescriptors accepts boolean primitives.
esid: pending
author: Jordan Harband
---*/
var trueResult = Object.getOwnPropertyDescriptors(true);
assert.sameValue(Object.keys(trueResult).length, 0, 'trueResult has 0 items');
var falseResult = Object.getOwnPropertyDescriptors(false);
assert.sameValue(Object.keys(falseResult).length, 0, 'falseResult has 0 items');
@@ -1,15 +0,0 @@
// Copyright (C) 2016 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Object.getOwnPropertyDescriptors accepts number primitives.
esid: pending
author: Jordan Harband
---*/
assert.sameValue(Object.keys(Object.getOwnPropertyDescriptors(0)).length, 0, '0 has zero descriptors');
assert.sameValue(Object.keys(Object.getOwnPropertyDescriptors(-0)).length, 0, '-0 has zero descriptors');
assert.sameValue(Object.keys(Object.getOwnPropertyDescriptors(Infinity)).length, 0, 'Infinity has zero descriptors');
assert.sameValue(Object.keys(Object.getOwnPropertyDescriptors(-Infinity)).length, 0, '-Infinity has zero descriptors');
assert.sameValue(Object.keys(Object.getOwnPropertyDescriptors(NaN)).length, 0, 'NaN has zero descriptors');
assert.sameValue(Object.keys(Object.getOwnPropertyDescriptors(Math.PI)).length, 0, 'Math.PI has zero descriptors');
@@ -1,33 +0,0 @@
// Copyright (C) 2016 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Object.getOwnPropertyDescriptors accepts string primitives.
esid: pending
author: Jordan Harband
---*/
var result = Object.getOwnPropertyDescriptors('abc');
assert.sameValue(Object.keys(result).length, 4, 'string has 4 descriptors');
assert.sameValue(result.length.configurable, false, 'length is not configurable');
assert.sameValue(result.length.enumerable, false, 'length is not enumerable');
assert.sameValue(result.length.writable, false, 'length is not writable');
assert.sameValue(result.length.value, 3, 'length is 3');
assert.sameValue(result[0].configurable, false, 'index 0 is not configurable');
assert.sameValue(result[0].enumerable, true, 'index 0 is enumerable');
assert.sameValue(result[0].writable, false, 'index 0 is not writable');
assert.sameValue(result[0].value, 'a', 'index 0 is "a"');
assert.sameValue(result[1].configurable, false, 'index 1 is not configurable');
assert.sameValue(result[1].enumerable, true, 'index 1 is enumerable');
assert.sameValue(result[1].writable, false, 'index 1 is not writable');
assert.sameValue(result[1].value, 'b', 'index 1 is "b"');
assert.sameValue(result[2].configurable, false, 'index 2 is not configurable');
assert.sameValue(result[2].enumerable, true, 'index 2 is enumerable');
assert.sameValue(result[2].writable, false, 'index 2 is not writable');
assert.sameValue(result[2].value, 'c', 'index 2 is "c"');
@@ -1,13 +0,0 @@
// Copyright (C) 2016 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Object.getOwnPropertyDescriptors accepts Symbol primitives.
esid: pending
author: Jordan Harband
features: [Symbol]
---*/
var result = Object.getOwnPropertyDescriptors(Symbol());
assert.sameValue(Object.keys(result).length, 0, 'symbol primitive has no descriptors');
@@ -1,27 +0,0 @@
var assert = {
sameValue: assertEq,
notSameValue(a, b, msg) {
try {
assertEq(a, b);
throw "equal"
} catch (e) {
if (e === "equal")
throw new Error("Assertion failed: expected different values, got " + a);
}
},
throws(ctor, f) {
var fullmsg;
try {
f();
} catch (exc) {
if (exc instanceof ctor)
return;
fullmsg = "Assertion failed: expected exception " + ctor.name + ", got " + exc;
}
if (fullmsg === undefined)
fullmsg = "Assertion failed: expected exception " + ctor.name + ", no exception thrown";
if (msg !== undefined)
fullmsg += " - " + msg;
throw new Error(fullmsg);
}
}
@@ -1,38 +0,0 @@
// Copyright (C) 2016 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Object.getOwnPropertyDescriptors includes Symbol keys.
esid: pending
author: Jordan Harband
features: [Symbol]
---*/
var value = {};
var enumSym = Symbol('enum');
var nonEnumSym = Symbol('nonenum');
var symValue = Symbol('value');
var obj = { key: symValue };
obj[enumSym] = value;
Object.defineProperty(obj, nonEnumSym, { writable: true, enumerable: false, configurable: true, value: value });
var result = Object.getOwnPropertyDescriptors(obj);
assert.sameValue(Object.keys(result).length, 1, 'obj has 1 string-keyed descriptor');
assert.sameValue(Object.getOwnPropertySymbols(result).length, 2, 'obj has 2 symbol-keyed descriptors');
assert.sameValue(result.key.configurable, true, 'result.key is configurable');
assert.sameValue(result.key.enumerable, true, 'result.key is enumerable');
assert.sameValue(result.key.writable, true, 'result.key is writable');
assert.sameValue(result.key.value, symValue, 'result.key has value symValue');
assert.sameValue(result[enumSym].configurable, true, 'result[enumSym] is configurable');
assert.sameValue(result[enumSym].enumerable, true, 'result[enumSym] is enumerable');
assert.sameValue(result[enumSym].writable, true, 'result[enumSym] is writable');
assert.sameValue(result[enumSym].value, value, 'result[enumSym] has value `value`');
assert.sameValue(result[nonEnumSym].configurable, true, 'result[nonEnumSym] is configurable');
assert.sameValue(result[nonEnumSym].enumerable, false, 'result[nonEnumSym] is not enumerable');
assert.sameValue(result[nonEnumSym].writable, true, 'result[nonEnumSym] is writable');
assert.sameValue(result[nonEnumSym].value, value, 'result[nonEnumSym] has value `value`');
@@ -1,21 +0,0 @@
// Copyright (C) 2016 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
Object.getOwnPropertyDescriptors should not have its behavior impacted by modifications to the global property Object
esid: pending
author: Jordan Harband
---*/
function fakeObject() {
$ERROR('The overriden version of Object was called!');
}
fakeObject.getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors;
fakeObject.keys = Object.keys;
var global = this;
global.Object = fakeObject;
assert.sameValue(Object, fakeObject, 'Sanity check failed: could not modify the global Object');
assert.sameValue(Object.keys(Object.getOwnPropertyDescriptors('a')).length, 2, 'Expected string primitive to have 2 descriptors');
@@ -1,22 +0,0 @@
// Copyright (C) 2016 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
Object.getOwnPropertyDescriptors should not have its behavior impacted by modifications to Object.getOwnPropertyDescriptor
esid: pending
author: Jordan Harband
---*/
function fakeObjectGetOwnPropertyDescriptor() {
$ERROR('The overriden version of Object.getOwnPropertyDescriptor was called!');
}
Object.getOwnPropertyDescriptor = fakeObjectGetOwnPropertyDescriptor;
assert.sameValue(
Object.getOwnPropertyDescriptor,
fakeObjectGetOwnPropertyDescriptor,
'Sanity check failed: could not modify the global Object.getOwnPropertyDescriptor'
);
assert.sameValue(Object.keys(Object.getOwnPropertyDescriptors({ a: 1 })).length, 1, 'Expected object with 1 key to have 1 descriptor');
+24
View File
@@ -5991,6 +5991,30 @@ nsDisplayTransform::WriteDebugInfo(std::stringstream& aStream)
AppendToString(aStream, GetTransform());
}
nsDisplayItemGeometry*
nsCharClipDisplayItem::AllocateGeometry(nsDisplayListBuilder* aBuilder)
{
return new nsCharClipGeometry(this, aBuilder);
}
void
nsCharClipDisplayItem::ComputeInvalidationRegion(nsDisplayListBuilder* aBuilder,
const nsDisplayItemGeometry* aGeometry,
nsRegion* aInvalidRegion)
{
const nsCharClipGeometry* geometry = static_cast<const nsCharClipGeometry*>(aGeometry);
bool snap;
nsRect newRect = geometry->mBounds;
nsRect oldRect = GetBounds(aBuilder, &snap);
if (mLeftEdge != geometry->mLeftEdge ||
mRightEdge != geometry->mRightEdge ||
!oldRect.IsEqualInterior(newRect) ||
!geometry->mBorderRect.IsEqualInterior(GetBorderRect())) {
aInvalidRegion->Or(oldRect, newRect);
}
}
nsDisplaySVGEffects::nsDisplaySVGEffects(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, nsDisplayList* aList)
: nsDisplayWrapList(aBuilder, aFrame, aList),
+6
View File
@@ -3703,6 +3703,12 @@ public:
explicit nsCharClipDisplayItem(nsIFrame* aFrame)
: nsDisplayItem(aFrame) {}
virtual nsDisplayItemGeometry* AllocateGeometry(nsDisplayListBuilder* aBuilder) override;
virtual void ComputeInvalidationRegion(nsDisplayListBuilder* aBuilder,
const nsDisplayItemGeometry* aGeometry,
nsRegion* aInvalidRegion) override;
struct ClipEdges {
ClipEdges(const nsDisplayItem& aItem,
nscoord aLeftEdge, nscoord aRightEdge) {
@@ -115,3 +115,9 @@ nsDisplaySVGEffectsGeometry::MoveBy(const nsPoint& aOffset)
mBounds.MoveBy(aOffset);
mFrameOffsetToReferenceFrame += aOffset;
}
nsCharClipGeometry::nsCharClipGeometry(nsCharClipDisplayItem* aItem, nsDisplayListBuilder* aBuilder)
: nsDisplayItemGenericGeometry(aItem, aBuilder)
, mLeftEdge(aItem->mLeftEdge)
, mRightEdge(aItem->mRightEdge)
{}
+10
View File
@@ -13,6 +13,7 @@
#include "nsColor.h"
#include "gfxRect.h"
class nsCharClipDisplayItem;
class nsDisplayItem;
class nsDisplayListBuilder;
class nsDisplayBackgroundImage;
@@ -248,4 +249,13 @@ public:
nsPoint mFrameOffsetToReferenceFrame;
};
class nsCharClipGeometry : public nsDisplayItemGenericGeometry
{
public:
nsCharClipGeometry(nsCharClipDisplayItem* aItem, nsDisplayListBuilder* aBuilder);
nscoord mLeftEdge;
nscoord mRightEdge;
};
#endif /*NSDISPLAYLISTINVALIDATION_H_*/
+4
View File
@@ -0,0 +1,4 @@
<!DOCTYPE html>
<html>
<body onload="x.style.textTransform = 'capitalize';"><div id="x">b</div></body>
</html>
@@ -576,6 +576,7 @@ load 1039454-1.html
load 1042489.html
load 1054010-1.html
load 1058954-1.html
load 1134531.html
load 1134667.html
load 1222783.xhtml
load details-display-none-summary-1.html
+5 -18
View File
@@ -4567,26 +4567,11 @@ nsTextFrame::CharacterDataChanged(CharacterDataChangeInfo* aInfo)
return NS_OK;
}
/* virtual */ void
nsTextFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
{
// A belt-and-braces check just in case we never get the
// MarkIntrinsicISizesDirty call from the style system.
if (StyleText()->mTextTransform == NS_STYLE_TEXT_TRANSFORM_CAPITALIZE &&
mTextRun &&
!(mTextRun->GetFlags() & nsTextFrameUtils::TEXT_IS_TRANSFORMED)) {
NS_ERROR("the current textrun doesn't match the style");
// The current textrun is now of the wrong type.
ClearTextRuns();
}
nsFrame::DidSetStyleContext(aOldStyleContext);
}
class nsDisplayTextGeometry : public nsDisplayItemGenericGeometry
class nsDisplayTextGeometry : public nsCharClipGeometry
{
public:
nsDisplayTextGeometry(nsDisplayItem* aItem, nsDisplayListBuilder* aBuilder)
: nsDisplayItemGenericGeometry(aItem, aBuilder)
nsDisplayTextGeometry(nsCharClipDisplayItem* aItem, nsDisplayListBuilder* aBuilder)
: nsCharClipGeometry(aItem, aBuilder)
{
nsTextFrame* f = static_cast<nsTextFrame*>(aItem->Frame());
f->GetTextDecorations(f->PresContext(), nsTextFrame::eResolvedColors, mDecorations);
@@ -4657,6 +4642,8 @@ public:
nsRect newRect = geometry->mBounds;
nsRect oldRect = GetBounds(aBuilder, &snap);
if (decorations != geometry->mDecorations ||
mLeftEdge != geometry->mLeftEdge ||
mRightEdge != geometry->mRightEdge ||
!oldRect.IsEqualInterior(newRect) ||
!geometry->mBorderRect.IsEqualInterior(GetBorderRect())) {
aInvalidRegion->Or(oldRect, newRect);
-2
View File
@@ -75,8 +75,6 @@ public:
virtual nsresult CharacterDataChanged(CharacterDataChangeInfo* aInfo) override;
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) override;
virtual nsIFrame* GetNextContinuation() const override {
return mNextContinuation;
}
+3
View File
@@ -1897,6 +1897,9 @@ pref("network.dnsCacheExpirationGracePeriod", 300);
// This preference can be used to turn off DNS prefetch.
pref("network.dns.disablePrefetch", true);
// Contols whether or not "localhost" should resolve when offline
pref("network.dns.offline-localhost", true);
// This preference controls whether or not URLs with UTF-8 characters are
// escaped. Set this preference to TRUE for strict RFC2396 conformance.
pref("network.standard-url.escape-utf8", true);
+15 -7
View File
@@ -50,6 +50,7 @@ static const char kPrefIPv4OnlyDomains[] = "network.dns.ipv4OnlyDomains";
static const char kPrefDisableIPv6[] = "network.dns.disableIPv6";
static const char kPrefDisablePrefetch[] = "network.dns.disablePrefetch";
static const char kPrefDnsLocalDomains[] = "network.dns.localDomains";
static const char kPrefDnsOfflineLocalhost[] = "network.dns.offline-localhost";
static const char kPrefDnsNotifyResolution[] = "network.dns.notifyResolution";
//-----------------------------------------------------------------------------
@@ -535,12 +536,12 @@ nsDNSService::Init()
if (mResolver)
return NS_OK;
NS_ENSURE_TRUE(!mResolver, NS_ERROR_ALREADY_INITIALIZED);
// prefs
uint32_t maxCacheEntries = 400;
uint32_t defaultCacheLifetime = 120; // seconds
uint32_t defaultGracePeriod = 60; // seconds
bool disableIPv6 = false;
bool offlineLocalhost = true;
bool disablePrefetch = false;
int proxyType = nsIProtocolProxyService::PROXYCONFIG_DIRECT;
bool notifyResolution = false;
@@ -563,6 +564,7 @@ nsDNSService::Init()
prefs->GetBoolPref(kPrefDisableIPv6, &disableIPv6);
prefs->GetCharPref(kPrefIPv4OnlyDomains, getter_Copies(ipv4OnlyDomains));
prefs->GetCharPref(kPrefDnsLocalDomains, getter_Copies(localDomains));
prefs->GetBoolPref(kPrefDnsOfflineLocalhost, &offlineLocalhost);
prefs->GetBoolPref(kPrefDisablePrefetch, &disablePrefetch);
// If a manual proxy is in use, disable prefetch implicitly
@@ -581,6 +583,7 @@ nsDNSService::Init()
prefs->AddObserver(kPrefIPv4OnlyDomains, this, false);
prefs->AddObserver(kPrefDnsLocalDomains, this, false);
prefs->AddObserver(kPrefDisableIPv6, this, false);
prefs->AddObserver(kPrefDnsOfflineLocalhost, this, false);
prefs->AddObserver(kPrefDisablePrefetch, this, false);
prefs->AddObserver(kPrefDnsNotifyResolution, this, false);
@@ -621,6 +624,7 @@ nsDNSService::Init()
mResolver = res;
mIDN = idn;
mIPv4OnlyDomains = ipv4OnlyDomains; // exchanges buffer ownership
mOfflineLocalhost = offlineLocalhost;
mDisableIPv6 = disableIPv6;
// Disable prefetching either by explicit preference or if a manual proxy is configured
@@ -753,13 +757,15 @@ nsDNSService::AsyncResolveExtended(const nsACString &aHostname,
if (!res)
return NS_ERROR_OFFLINE;
if (mOffline)
flags |= RESOLVE_OFFLINE;
nsCString hostname;
if (!PreprocessHostname(localDomain, aHostname, idn, hostname))
return NS_ERROR_FAILURE;
if (mOffline &&
(!mOfflineLocalhost || !hostname.LowerCaseEqualsASCII("localhost"))) {
flags |= RESOLVE_OFFLINE;
}
// make sure JS callers get notification on the main thread
nsCOMPtr<nsIXPConnectWrappedJS> wrappedListener = do_QueryInterface(listener);
if (wrappedListener && !target) {
@@ -867,13 +873,15 @@ nsDNSService::Resolve(const nsACString &aHostname,
NS_ENSURE_TRUE(res, NS_ERROR_OFFLINE);
if (mOffline)
flags |= RESOLVE_OFFLINE;
nsCString hostname;
if (!PreprocessHostname(localDomain, aHostname, idn, hostname))
return NS_ERROR_FAILURE;
if (mOffline &&
(!mOfflineLocalhost || !hostname.LowerCaseEqualsASCII("localhost"))) {
flags |= RESOLVE_OFFLINE;
}
//
// sync resolve: since the host resolver only works asynchronously, we need
// to use a mutex and a condvar to wait for the result. however, since the
+1
View File
@@ -60,6 +60,7 @@ private:
bool mFirstTime;
bool mOffline;
bool mNotifyResolution;
bool mOfflineLocalhost;
nsMainThreadPtrHandle<nsIObserverService> mObserverService;
nsTHashtable<nsCStringHashKey> mLocalDomains;
};
+74
View File
@@ -0,0 +1,74 @@
var dns = Cc["@mozilla.org/network/dns-service;1"].getService(Ci.nsIDNSService);
var ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
var threadManager = Cc["@mozilla.org/thread-manager;1"].getService(Ci.nsIThreadManager);
var mainThread = threadManager.currentThread;
var listener1 = {
onLookupComplete: function(inRequest, inRecord, inStatus) {
do_check_eq(inStatus, Cr.NS_ERROR_OFFLINE);
test2();
do_test_finished();
}
};
var listener2 = {
onLookupComplete: function(inRequest, inRecord, inStatus) {
do_check_eq(inStatus, Cr.NS_OK);
var answer = inRecord.getNextAddrAsString();
do_check_true(answer == "127.0.0.1" || answer == "::1");
test3();
do_test_finished();
}
};
var listener3 = {
onLookupComplete: function(inRequest, inRecord, inStatus) {
do_check_eq(inStatus, Cr.NS_OK);
var answer = inRecord.getNextAddrAsString();
do_check_true(answer == "127.0.0.1" || answer == "::1");
cleanup();
do_test_finished();
}
};
function run_test() {
do_test_pending();
prefs.setBoolPref("network.dns.offline-localhost", false);
ioService.offline = true;
try {
dns.asyncResolve("localhost", 0, listener1, mainThread);
} catch (e) {
do_check_eq(e.result, Cr.NS_ERROR_OFFLINE);
test2();
do_test_finished();
}
}
function test2() {
do_test_pending();
prefs.setBoolPref("network.dns.offline-localhost", true);
ioService.offline = false;
ioService.offline = true;
// we need to let the main thread run and apply the changes
do_timeout(0, test2Continued);
}
function test2Continued() {
dns.asyncResolve("localhost", 0, listener2, mainThread);
}
function test3() {
do_test_pending();
ioService.offline = false;
// we need to let the main thread run and apply the changes
do_timeout(0, test3Continued);
}
function test3Continued() {
dns.asyncResolve("localhost", 0, listener3, mainThread);
}
function cleanup() {
prefs.clearUserPref("network.dns.offline-localhost");
}
+1
View File
@@ -177,6 +177,7 @@ skip-if = bits != 32
[test_dns_per_interface.js]
[test_data_protocol.js]
[test_dns_service.js]
[test_dns_offline.js]
[test_dns_localredirect.js]
[test_dns_proxy_bypass.js]
[test_duplicate_headers.js]
@@ -200,6 +200,7 @@ add_identity_test(this, function test_service_offline() {
let deferred = Promise.defer();
server.stop(() => {
Services.io.offline = true;
Services.prefs.setBoolPref("network.dns.offline-localhost", false);
try {
do_check_eq(Status.sync, SYNC_SUCCEEDED);
@@ -214,6 +215,7 @@ add_identity_test(this, function test_service_offline() {
Service.startOver();
}
Services.io.offline = false;
Services.prefs.clearUserPref("network.dns.offline-localhost");
deferred.resolve();
});
yield deferred.promise;
-21
View File
@@ -239,27 +239,6 @@ static uint32_t gNumberOfWidgetsNeedingEventThread = 0;
#pragma mark -
/* Convenience routine to go from a Goanna rect to Cocoa NSRect.
*
* Goanna rects (nsRect) contain an origin (x,y) in a coordinate
* system with (0,0) in the top-left of the screen. Cocoa rects
* (NSRect) contain an origin (x,y) in a coordinate system with
* (0,0) in the bottom-left of the screen. Both nsRect and NSRect
* contain width/height info, with no difference in their use.
* If a Cocoa rect is from a flipped view, there is no need to
* convert coordinate systems.
*/
#ifndef __LP64__
static inline void
ConvertGoannaRectToMacRect(const nsIntRect& aRect, Rect& outMacRect)
{
outMacRect.left = aRect.x;
outMacRect.top = aRect.y;
outMacRect.right = aRect.x + aRect.width;
outMacRect.bottom = aRect.y + aRect.height;
}
#endif
// Flips a screen coordinate from a point in the cocoa coordinate system (bottom-left rect) to a point
// that is a "flipped" cocoa coordinate system (starts in the top-left).
static inline void
+1
View File
@@ -30,6 +30,7 @@
#include <aio.h>
#include <dlfcn.h>
#include <fcntl.h>
#include <unistd.h>
#ifdef MOZ_REPLACE_MALLOC
#include "replace_malloc_bridge.h"