зеркало из https://github.com/mozilla/gecko-dev.git
Merge inbound to mozilla-central. a=merge
This commit is contained in:
Коммит
e94442500f
|
@ -282,41 +282,20 @@ void Element::UpdateState(bool aNotify) {
|
|||
} // namespace mozilla
|
||||
|
||||
void nsIContent::UpdateEditableState(bool aNotify) {
|
||||
// Guaranteed to be non-element content
|
||||
NS_ASSERTION(!IsElement(), "What happened here?");
|
||||
nsIContent* parent = GetParent();
|
||||
|
||||
// Skip over unknown native anonymous content to avoid setting a flag we
|
||||
// can't clear later
|
||||
bool isUnknownNativeAnon = false;
|
||||
if (IsInNativeAnonymousSubtree()) {
|
||||
isUnknownNativeAnon = true;
|
||||
nsCOMPtr<nsIContent> root = this;
|
||||
while (root && !root->IsRootOfNativeAnonymousSubtree()) {
|
||||
root = root->GetParent();
|
||||
}
|
||||
// root should always be true here, but isn't -- bug 999416
|
||||
if (root) {
|
||||
nsIFrame* rootFrame = root->GetPrimaryFrame();
|
||||
if (rootFrame) {
|
||||
nsContainerFrame* parentFrame = rootFrame->GetParent();
|
||||
nsITextControlFrame* textCtrl = do_QueryFrame(parentFrame);
|
||||
isUnknownNativeAnon = !textCtrl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Don't implicitly set the flag on the root of a native anonymous subtree.
|
||||
// This needs to be set explicitly, see for example
|
||||
// nsTextControlFrame::CreateRootNode().
|
||||
SetEditableFlag(parent && parent->HasFlag(NODE_IS_EDITABLE) &&
|
||||
!isUnknownNativeAnon);
|
||||
!IsRootOfNativeAnonymousSubtree());
|
||||
}
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
void Element::UpdateEditableState(bool aNotify) {
|
||||
nsIContent* parent = GetParent();
|
||||
|
||||
SetEditableFlag(parent && parent->HasFlag(NODE_IS_EDITABLE));
|
||||
nsIContent::UpdateEditableState(aNotify);
|
||||
if (aNotify) {
|
||||
UpdateState(aNotify);
|
||||
} else {
|
||||
|
|
|
@ -153,9 +153,14 @@ inline bool nsINode::IsEditable() const {
|
|||
return true;
|
||||
}
|
||||
|
||||
Document* doc = GetUncomposedDoc();
|
||||
// All editable anonymous content should be made explicitly editable via the
|
||||
// NODE_IS_EDITABLE flag.
|
||||
if (IsInNativeAnonymousSubtree()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if the node is in a document and the document is in designMode.
|
||||
Document* doc = GetUncomposedDoc();
|
||||
return doc && doc->HasFlag(NODE_IS_EDITABLE);
|
||||
}
|
||||
|
||||
|
|
1468
js/src/gc/Memory.cpp
1468
js/src/gc/Memory.cpp
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -16,8 +16,17 @@ namespace gc {
|
|||
// running instance and initialize any runtime data needed for allocation.
|
||||
void InitMemorySubsystem();
|
||||
|
||||
// The page size as reported by the operating system.
|
||||
size_t SystemPageSize();
|
||||
|
||||
// The number of bits that may be set in a valid address, as
|
||||
// reported by the operating system or measured at startup.
|
||||
size_t SystemAddressBits();
|
||||
|
||||
// The scattershot allocator is used on platforms that have a large address
|
||||
// range. On these platforms we allocate at random addresses.
|
||||
bool UsingScattershotAllocator();
|
||||
|
||||
// Allocate or deallocate pages from the system with the given alignment.
|
||||
void* MapAlignedPages(size_t size, size_t alignment);
|
||||
void UnmapPages(void* p, size_t size);
|
||||
|
|
|
@ -14,9 +14,7 @@
|
|||
#if defined(XP_WIN)
|
||||
#include "util/Windows.h"
|
||||
#include <psapi.h>
|
||||
#elif defined(SOLARIS)
|
||||
// This test doesn't apply to Solaris.
|
||||
#elif defined(XP_UNIX)
|
||||
#else
|
||||
#include <algorithm>
|
||||
#include <errno.h>
|
||||
#include <sys/mman.h>
|
||||
|
@ -24,28 +22,18 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#error "Memory mapping functions are not defined for your OS."
|
||||
#endif
|
||||
|
||||
BEGIN_TEST(testGCAllocator) {
|
||||
size_t PageSize = 0;
|
||||
#if defined(XP_WIN)
|
||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
SYSTEM_INFO sysinfo;
|
||||
GetSystemInfo(&sysinfo);
|
||||
PageSize = sysinfo.dwPageSize;
|
||||
#else // Various APIs are unavailable. This test is disabled.
|
||||
return true;
|
||||
#endif
|
||||
#elif defined(SOLARIS)
|
||||
return true;
|
||||
#elif defined(XP_UNIX)
|
||||
PageSize = size_t(sysconf(_SC_PAGESIZE));
|
||||
#else
|
||||
return true;
|
||||
#ifdef JS_64BIT
|
||||
// If we're using the scattershot allocator, this test does not apply.
|
||||
if (js::gc::UsingScattershotAllocator()) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
size_t PageSize = js::gc::SystemPageSize();
|
||||
|
||||
/* Finish any ongoing background free activity. */
|
||||
js::gc::FinishGC(cx);
|
||||
|
||||
|
@ -54,8 +42,9 @@ BEGIN_TEST(testGCAllocator) {
|
|||
|
||||
if (growUp) {
|
||||
return testGCAllocatorUp(PageSize);
|
||||
} else {
|
||||
return testGCAllocatorDown(PageSize);
|
||||
}
|
||||
return testGCAllocatorDown(PageSize);
|
||||
}
|
||||
|
||||
static const size_t Chunk = 512 * 1024;
|
||||
|
@ -140,15 +129,9 @@ bool testGCAllocatorUp(const size_t PageSize) {
|
|||
// Check that we fall back to the slow path after two unalignable chunks.
|
||||
CHECK(positionIsCorrect("x--xx--xoo--xxx-", stagingArea, chunkPool,
|
||||
tempChunks));
|
||||
#ifndef __aarch64__
|
||||
// Bug 1440330 - this test is incorrect for aarch64 because MapMemory only
|
||||
// looks for 1MB-aligned chunks on that platform, and will find one at
|
||||
// position 6 here.
|
||||
|
||||
// Check that we also fall back after an unalignable and an alignable chunk.
|
||||
CHECK(positionIsCorrect("x--xx---x-oo--x-", stagingArea, chunkPool,
|
||||
tempChunks));
|
||||
#endif
|
||||
// Check that the last ditch allocator works as expected.
|
||||
CHECK(positionIsCorrect("x--xx--xx-oox---", stagingArea, chunkPool,
|
||||
tempChunks, UseLastDitchAllocator));
|
||||
|
@ -293,7 +276,6 @@ bool positionIsCorrect(const char* str, void* base, void** chunkPool,
|
|||
}
|
||||
|
||||
#if defined(XP_WIN)
|
||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
|
||||
void* mapMemoryAt(void* desired, size_t length) {
|
||||
return VirtualAlloc(desired, length, MEM_COMMIT | MEM_RESERVE,
|
||||
|
@ -309,29 +291,9 @@ void unmapPages(void* p, size_t size) {
|
|||
MOZ_ALWAYS_TRUE(VirtualFree(p, 0, MEM_RELEASE));
|
||||
}
|
||||
|
||||
#else // Various APIs are unavailable. This test is disabled.
|
||||
|
||||
void* mapMemoryAt(void* desired, size_t length) { return nullptr; }
|
||||
void* mapMemory(size_t length) { return nullptr; }
|
||||
void unmapPages(void* p, size_t size) {}
|
||||
|
||||
#endif
|
||||
#elif defined(SOLARIS) // This test doesn't apply to Solaris.
|
||||
|
||||
void* mapMemoryAt(void* desired, size_t length) { return nullptr; }
|
||||
void* mapMemory(size_t length) { return nullptr; }
|
||||
void unmapPages(void* p, size_t size) {}
|
||||
|
||||
#elif defined(XP_UNIX)
|
||||
#else
|
||||
|
||||
void* mapMemoryAt(void* desired, size_t length) {
|
||||
|
||||
#if defined(__ia64__) || defined(__aarch64__) || \
|
||||
(defined(__sparc__) && defined(__arch64__) && \
|
||||
(defined(__NetBSD__) || defined(__linux__)))
|
||||
MOZ_RELEASE_ASSERT(
|
||||
(0xffff800000000000ULL & (uintptr_t(desired) + length - 1)) == 0);
|
||||
#endif
|
||||
void* region = mmap(desired, length, PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANON, -1, 0);
|
||||
if (region == MAP_FAILED) {
|
||||
|
@ -351,48 +313,11 @@ void* mapMemory(size_t length) {
|
|||
int flags = MAP_PRIVATE | MAP_ANON;
|
||||
int fd = -1;
|
||||
off_t offset = 0;
|
||||
// The test code must be aligned with the implementation in gc/Memory.cpp.
|
||||
#if defined(__ia64__) || \
|
||||
(defined(__sparc__) && defined(__arch64__) && defined(__NetBSD__))
|
||||
void* region =
|
||||
mmap((void*)0x0000070000000000, length, prot, flags, fd, offset);
|
||||
if (region == MAP_FAILED) {
|
||||
return nullptr;
|
||||
}
|
||||
if ((uintptr_t(region) + (length - 1)) & 0xffff800000000000) {
|
||||
if (munmap(region, length)) {
|
||||
MOZ_RELEASE_ASSERT(errno == ENOMEM);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
return region;
|
||||
#elif defined(__aarch64__) || \
|
||||
(defined(__sparc__) && defined(__arch64__) && defined(__linux__))
|
||||
const uintptr_t start = UINT64_C(0x0000070000000000);
|
||||
const uintptr_t end = UINT64_C(0x0000800000000000);
|
||||
const uintptr_t step = js::gc::ChunkSize;
|
||||
uintptr_t hint;
|
||||
void* region = MAP_FAILED;
|
||||
for (hint = start; region == MAP_FAILED && hint + length <= end;
|
||||
hint += step) {
|
||||
region = mmap((void*)hint, length, prot, flags, fd, offset);
|
||||
if (region != MAP_FAILED) {
|
||||
if ((uintptr_t(region) + (length - 1)) & 0xffff800000000000) {
|
||||
if (munmap(region, length)) {
|
||||
MOZ_RELEASE_ASSERT(errno == ENOMEM);
|
||||
}
|
||||
region = MAP_FAILED;
|
||||
}
|
||||
}
|
||||
}
|
||||
return region == MAP_FAILED ? nullptr : region;
|
||||
#else
|
||||
void* region = mmap(nullptr, length, prot, flags, fd, offset);
|
||||
if (region == MAP_FAILED) {
|
||||
return nullptr;
|
||||
}
|
||||
return region;
|
||||
#endif
|
||||
}
|
||||
|
||||
void unmapPages(void* p, size_t size) {
|
||||
|
@ -401,7 +326,6 @@ void unmapPages(void* p, size_t size) {
|
|||
}
|
||||
}
|
||||
|
||||
#else // !defined(XP_WIN) && !defined(SOLARIS) && !defined(XP_UNIX)
|
||||
#error "Memory mapping functions are not defined for your OS."
|
||||
#endif
|
||||
|
||||
END_TEST(testGCAllocator)
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function(){
|
||||
document.designMode='on'
|
||||
window.getSelection().modify('move', 'right', 'line')
|
||||
})
|
||||
</script>
|
||||
<br>
|
||||
<keygen>
|
|
@ -556,3 +556,4 @@ pref(layout.css.column-span.enabled,true) load 1507244.html
|
|||
load 1510080.html
|
||||
load 1510485.html
|
||||
pref(layout.css.column-span.enabled,true) load 1511535.html
|
||||
load 1511563.html
|
||||
|
|
|
@ -44,8 +44,8 @@ pref(layout.animated-image-layers.enabled,true) skip-if(Android||gtkWidget) == t
|
|||
== filter-userspace-offset.svg?offsetContainer=rect&filter=matrix-fillPaint-boundingBox filter-userspace-offset.svg
|
||||
== filter-userspace-offset.svg?offsetContainer=rect&filter=matrix-fillPaint-userSpace-at100 filter-userspace-offset.svg
|
||||
|
||||
fails-if(!Android) != scroll-inactive-layers.html about:blank # bug 1494110 for the fails-if(!Android) (Android is a false pass, no doubt)
|
||||
fails-if(!Android) != scroll-inactive-layers-2.html about:blank # bug 1494110 for the fails-if(!Android) (Android is a false pass, no doubt)
|
||||
fails-if(webrender) != scroll-inactive-layers.html about:blank
|
||||
fails-if(webrender) != scroll-inactive-layers-2.html about:blank
|
||||
!= inactive-layertree-visible-region-1.html about:blank
|
||||
!= inactive-layertree-visible-region-2.html about:blank
|
||||
!= transform-floating-point-invalidation.html about:blank
|
||||
|
|
|
@ -310,7 +310,6 @@ nsIntRegion nsSVGIntegrationUtils::AdjustInvalidAreaForSVGEffects(
|
|||
return nsIntRect();
|
||||
}
|
||||
|
||||
int32_t appUnitsPerDevPixel = aFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
nsIFrame* firstFrame =
|
||||
nsLayoutUtils::FirstContinuationOrIBSplitSibling(aFrame);
|
||||
|
||||
|
@ -321,18 +320,11 @@ nsIntRegion nsSVGIntegrationUtils::AdjustInvalidAreaForSVGEffects(
|
|||
if (!aFrame->StyleEffects()->HasFilters() ||
|
||||
SVGObserverUtils::GetFiltersIfObserving(firstFrame, nullptr) ==
|
||||
SVGObserverUtils::eHasRefsSomeInvalid) {
|
||||
// The frame is either not there or not currently available,
|
||||
// perhaps because we're in the middle of tearing stuff down.
|
||||
// Be conservative, return our visual overflow rect relative
|
||||
// to the reference frame.
|
||||
// XXX we may get here purely due to an SVG mask, in which case there is
|
||||
// no need to do this it causes over-invalidation. See:
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1494110
|
||||
// Do we still even need this for filters? If so, why?
|
||||
nsRect overflow = aFrame->GetVisualOverflowRect() + aToReferenceFrame;
|
||||
return overflow.ToOutsidePixels(appUnitsPerDevPixel);
|
||||
return aInvalidRegion;
|
||||
}
|
||||
|
||||
int32_t appUnitsPerDevPixel = aFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
|
||||
// Convert aInvalidRegion into bounding box frame space in app units:
|
||||
nsPoint toBoundingBox =
|
||||
aFrame->GetOffsetTo(firstFrame) + GetOffsetToBoundingBox(firstFrame);
|
||||
|
|
|
@ -140,7 +140,7 @@ As with C#, the log output is helpfully propagated to stdout.
|
|||
Python
|
||||
------
|
||||
|
||||
The Selenium [Python client] comes with an
|
||||
The Selenium [Python client] comes with a
|
||||
[`selenium.webdriver.firefox.options.Options`] helper that can
|
||||
be used programmatically to construct the [`moz:firefoxOptions`]
|
||||
capabilities object:
|
||||
|
@ -150,7 +150,7 @@ capabilities object:
|
|||
|
||||
opts = Options()
|
||||
opts.log.level = "trace"
|
||||
driver = Firefox(firefox_options=opts)
|
||||
driver = Firefox(options=opts)
|
||||
|
||||
The log output is stored in a file called _geckodriver.log_ in your
|
||||
script’s current working directory.
|
||||
|
|
|
@ -2,7 +2,12 @@
|
|||
|
||||
let {ExtensionTestCommon} = ChromeUtils.import("resource://testing-common/ExtensionTestCommon.jsm", {});
|
||||
|
||||
const bundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
|
||||
let bundle;
|
||||
if (AppConstants.MOZ_APP_NAME == "thunderbird") {
|
||||
bundle = Services.strings.createBundle("chrome://messenger/locale/addons.properties");
|
||||
} else {
|
||||
bundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
|
||||
}
|
||||
const DUMMY_APP_NAME = "Dummy brandName";
|
||||
|
||||
async function getManifestPermissions(extensionData) {
|
||||
|
|
|
@ -406,7 +406,7 @@ function runBasicTest(aIsEditable, aInDesignMode, aDescription)
|
|||
description: "input[type=file]",
|
||||
focusable: !aInDesignMode,
|
||||
focusEventNotFired: aIsEditable && !aInDesignMode,
|
||||
expectedEnabled: kEnabledStateOnNonEditableElement },
|
||||
expectedEnabled: kEnabledStateOnReadonlyField },
|
||||
{ id: "button",
|
||||
description: "input[type=button]",
|
||||
focusable: !aInDesignMode,
|
||||
|
|
Загрузка…
Ссылка в новой задаче