Merge m-i to m-c, a=merge

CLOSED TREE
This commit is contained in:
Phil Ringnalda 2015-09-10 15:22:15 -07:00
commit c31d686b10
33 changed files with 187 additions and 172 deletions

View File

@ -76,6 +76,11 @@ a11y::ProxyTextChangeEvent(ProxyAccessible* aText, const nsString& aStr,
int32_t aStart, uint32_t aLen, bool aInsert, bool)
{
AccessibleWrap* wrapper = WrapperFor(aText);
MOZ_ASSERT(wrapper);
if (!wrapper) {
return;
}
auto text = static_cast<HyperTextAccessibleWrap*>(wrapper->AsHyperText());
if (text) {
ia2AccessibleText::UpdateTextChangeData(text, aInsert, aStr, aStart, aLen);

View File

@ -4,9 +4,6 @@
# 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/.
if CONFIG['_MSC_VER'] and CONFIG['OS_TEST'] != 'x86_64':
TEST_DIRS += ['vmwarerecordinghelper']
TEST_DIRS += ['crashinjectdll']
if CONFIG['ENABLE_TESTS']:

View File

@ -1,15 +0,0 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
SOURCES += [
'vmwarerecordinghelper.cpp',
]
SharedLibrary('vmwarerecordinghelper')
DEFFILE = '%s/%s.def' % (SRCDIR, LIBRARY_NAME)
USE_STATIC_LIBS = True

View File

@ -1,34 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* The following code comes from "Starting and Stopping Recording of Virtual
* Machine Activity from Within the Guest":
*
* http://kb.vmware.com/selfservice/documentLink.do?externalID=1001401
*/
void __cdecl
StartRecording()
{
__asm {
mov eax, 564d5868h
mov ebx, 1
mov cx, 47
mov dx, 5658h
in eax, dx
}
}
void __cdecl
StopRecording()
{
__asm {
mov eax, 564d5868h
mov ebx, 2
mov cx, 47
mov dx, 5658h
in eax, dx
}
}

View File

@ -1,8 +0,0 @@
;+# This Source Code Form is subject to the terms of the Mozilla Public
;+# License, v. 2.0. If a copy of the MPL was not distributed with this
;+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
LIBRARY vmwarerecordinghelper
EXPORTS
StartRecording
StopRecording

View File

@ -4917,9 +4917,10 @@ HTMLInputElement::GetFilesAndDirectories(ErrorResult& aRv)
}
int32_t leafSeparatorIndex = path.RFind(FILE_PATH_SEPARATOR);
nsDependentSubstring dirname = Substring(path, 0, leafSeparatorIndex);
nsDependentSubstring basename = Substring(path, leafSeparatorIndex);
fs = MakeOrReuseFileSystem(dirname, fs, window);
filesAndDirsSeq[i].SetAsDirectory() = new Directory(fs, basename);
nsAutoString dompath(NS_LITERAL_STRING(FILESYSTEM_DOM_PATH_SEPARATOR));
dompath.Append(Substring(path, leafSeparatorIndex + 1));
filesAndDirsSeq[i].SetAsDirectory() = new Directory(fs, dompath);
} else {
filesAndDirsSeq[i].SetAsFile() = filesAndDirs[i];
}

View File

@ -142,6 +142,7 @@
#include "nsIXULRuntime.h"
#include "gfxDrawable.h"
#include "ImageOps.h"
#include "mozilla/dom/nsMixedContentBlocker.h"
#include "nsMemoryInfoDumper.h"
#include "nsMemoryReporterManager.h"
#include "nsServiceManagerUtils.h"
@ -4175,6 +4176,17 @@ ContentParent::RecvIsSecureURI(const uint32_t& type,
return NS_SUCCEEDED(rv);
}
bool
ContentParent::RecvAccumulateMixedContentHSTS(const URIParams& aURI, const bool& aActive)
{
nsCOMPtr<nsIURI> ourURI = DeserializeURI(aURI);
if (!ourURI) {
return false;
}
nsMixedContentBlocker::AccumulateMixedContentHSTS(ourURI, aActive);
return true;
}
bool
ContentParent::RecvLoadURIExternal(const URIParams& uri)
{

View File

@ -626,6 +626,8 @@ private:
virtual bool RecvIsSecureURI(const uint32_t& aType, const URIParams& aURI,
const uint32_t& aFlags, bool* aIsSecureURI) override;
virtual bool RecvAccumulateMixedContentHSTS(const URIParams& aURI, const bool& aActive) override;
virtual bool DeallocPHalParent(PHalParent*) override;
virtual PIccParent* AllocPIccParent(const uint32_t& aServiceId) override;

View File

@ -751,6 +751,8 @@ parent:
sync IsSecureURI(uint32_t type, URIParams uri, uint32_t flags)
returns (bool isSecureURI);
async AccumulateMixedContentHSTS(URIParams uri, bool active);
sync GetLookAndFeelCache()
returns (LookAndFeelInt[] lookAndFeelIntCache);
@ -788,7 +790,7 @@ parent:
PFMRadio();
PWebrtcGlobal();
PPresentation();
// Services remoting

View File

@ -134,6 +134,7 @@ LOCAL_INCLUDES += [
'/dom/geolocation',
'/dom/media/webspeech/synth/ipc',
'/dom/mobilemessage/ipc',
'/dom/security',
'/dom/storage',
'/dom/workers',
'/editor/libeditor',

View File

@ -84,7 +84,7 @@ static const char kContentTimeoutPref[] = "dom.ipc.plugins.contentTimeoutSecs";
static const char kChildTimeoutPref[] = "dom.ipc.plugins.timeoutSecs";
static const char kParentTimeoutPref[] = "dom.ipc.plugins.parentTimeoutSecs";
static const char kLaunchTimeoutPref[] = "dom.ipc.plugins.processLaunchTimeoutSecs";
static const char kAsyncInitPref[] = "dom.ipc.plugins.asyncInit";
static const char kAsyncInitPref[] = "dom.ipc.plugins.asyncInit.enabled";
#ifdef XP_WIN
static const char kHangUITimeoutPref[] = "dom.ipc.plugins.hangUITimeoutSecs";
static const char kHangUIMinDisplayPref[] = "dom.ipc.plugins.hangUIMinDisplaySecs";

View File

@ -33,6 +33,8 @@ UNIFIED_SOURCES += [
'SRIMetadata.cpp',
]
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'/caps',
@ -40,5 +42,5 @@ LOCAL_INCLUDES += [
]
if CONFIG['GNU_CC']:
CFLAGS += ['-Wshadow', '-Wformat-security']
CXXFLAGS += ['-Wshadow', '-Wformat-security']
CFLAGS += ['-Wformat-security']
CXXFLAGS += ['-Wformat-security']

View File

@ -32,8 +32,13 @@
#include "nsIChannelEventSink.h"
#include "nsAsyncRedirectVerifyHelper.h"
#include "mozilla/LoadInfo.h"
#include "nsISiteSecurityService.h"
#include "mozilla/Logging.h"
#include "mozilla/Telemetry.h"
#include "mozilla/dom/ContentChild.h"
#include "mozilla/ipc/URIUtils.h"
using namespace mozilla;
@ -342,7 +347,7 @@ nsMixedContentBlocker::ShouldLoad(uint32_t aContentType,
// callers of this method don't know whether the load went through cached
// image redirects. This is handled by direct callers of the static
// ShouldLoad.
nsresult rv = ShouldLoad(false, //aHadInsecureImageRedirect
nsresult rv = ShouldLoad(false, // aHadInsecureImageRedirect
aContentType,
aContentLocation,
aRequestingLocation,
@ -381,7 +386,6 @@ nsMixedContentBlocker::ShouldLoad(bool aHadInsecureImageRedirect,
// Make decision to block/reject by default
*aDecision = REJECT_REQUEST;
// Notes on non-obvious decisions:
//
// TYPE_DTD: A DTD can contain entity definitions that expand to scripts.
@ -718,6 +722,33 @@ nsMixedContentBlocker::ShouldLoad(bool aHadInsecureImageRedirect,
}
nsresult stateRV = securityUI->GetState(&state);
// At this point we know that the request is mixed content, and the only
// question is whether we block it. Record telemetry at this point as to
// whether HSTS would have fixed things by making the content location
// into an HTTPS URL.
//
// Note that we count this for redirects as well as primary requests. This
// will cause some degree of double-counting, especially when mixed content
// is not blocked (e.g., for images). For more detail, see:
// https://bugzilla.mozilla.org/show_bug.cgi?id=1198572#c19
//
// We do not count requests aHadInsecureImageRedirect=true, since these are
// just an artifact of the image caching system.
bool active = (classification == eMixedScript);
if (!aHadInsecureImageRedirect) {
if (XRE_IsParentProcess()) {
AccumulateMixedContentHSTS(aContentLocation, active);
} else {
// Ask the parent process to do the same call
mozilla::dom::ContentChild* cc = mozilla::dom::ContentChild::GetSingleton();
if (cc) {
mozilla::ipc::URIParams uri;
SerializeURI(aContentLocation, uri);
cc->SendAccumulateMixedContentHSTS(uri, active);
}
}
}
// If the content is display content, and the pref says display content should be blocked, block it.
if (sBlockMixedDisplay && classification == eMixedDisplay) {
if (allowMixedContent) {
@ -857,3 +888,54 @@ nsMixedContentBlocker::ShouldProcess(uint32_t aContentType,
aRequestingContext, aMimeGuess, aExtra, aRequestPrincipal,
aDecision);
}
enum MixedContentHSTSState {
MCB_HSTS_PASSIVE_NO_HSTS = 0,
MCB_HSTS_PASSIVE_WITH_HSTS = 1,
MCB_HSTS_ACTIVE_NO_HSTS = 2,
MCB_HSTS_ACTIVE_WITH_HSTS = 3
};
// Record information on when HSTS would have made mixed content not mixed
// content (regardless of whether it was actually blocked)
void
nsMixedContentBlocker::AccumulateMixedContentHSTS(nsIURI* aURI, bool aActive)
{
// This method must only be called in the parent, because
// nsSiteSecurityService is only available in the parent
if (!XRE_IsParentProcess()) {
MOZ_ASSERT(false);
return;
}
bool hsts;
nsresult rv;
nsCOMPtr<nsISiteSecurityService> sss = do_GetService(NS_SSSERVICE_CONTRACTID, &rv);
if (NS_FAILED(rv)) {
return;
}
rv = sss->IsSecureURI(nsISiteSecurityService::HEADER_HSTS, aURI, 0, &hsts);
if (NS_FAILED(rv)) {
return;
}
if (!aActive) {
if (!hsts) {
Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS,
MCB_HSTS_PASSIVE_NO_HSTS);
}
else {
Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS,
MCB_HSTS_PASSIVE_WITH_HSTS);
}
} else {
if (!hsts) {
Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS,
MCB_HSTS_ACTIVE_NO_HSTS);
}
else {
Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS,
MCB_HSTS_ACTIVE_WITH_HSTS);
}
}
}

View File

@ -59,6 +59,7 @@ public:
nsISupports* aExtra,
nsIPrincipal* aRequestPrincipal,
int16_t* aDecision);
static void AccumulateMixedContentHSTS(nsIURI* aURI, bool aActive);
static bool sBlockMixedScript;
static bool sBlockMixedDisplay;
};

View File

@ -651,7 +651,7 @@ nsXBLService::GetBinding(nsIContent* aBoundElement, nsIURI* aURI,
bool* aIsReady, nsXBLBinding** aResult)
{
// More than 6 binding URIs are rare, see bug 55070 comment 18.
nsAutoTArray<nsIURI*, 6> uris;
nsAutoTArray<nsCOMPtr<nsIURI>, 6> uris;
return GetBinding(aBoundElement, aURI, aPeekOnly, aOriginPrincipal, aIsReady,
aResult, uris);
}
@ -708,7 +708,7 @@ nsresult
nsXBLService::GetBinding(nsIContent* aBoundElement, nsIURI* aURI,
bool aPeekOnly, nsIPrincipal* aOriginPrincipal,
bool* aIsReady, nsXBLBinding** aResult,
nsTArray<nsIURI*>& aDontExtendURIs)
nsTArray<nsCOMPtr<nsIURI>>& aDontExtendURIs)
{
NS_ASSERTION(aPeekOnly || aResult,
"Must have non-null out param if not just peeking to see "
@ -784,7 +784,7 @@ nsXBLService::GetBinding(nsIContent* aBoundElement, nsIURI* aURI,
rv = protoBinding->ResolveBaseBinding();
NS_ENSURE_SUCCESS(rv, rv);
nsIURI* baseBindingURI;
nsCOMPtr<nsIURI> baseBindingURI;
nsXBLPrototypeBinding* baseProto = protoBinding->GetBasePrototype();
if (baseProto) {
baseBindingURI = baseProto->BindingURI();
@ -818,7 +818,7 @@ nsXBLService::GetBinding(nsIContent* aBoundElement, nsIURI* aURI,
nsRefPtr<nsXBLBinding> baseBinding;
if (baseBindingURI) {
nsIContent* child = protoBinding->GetBindingElement();
nsCOMPtr<nsIContent> child = protoBinding->GetBindingElement();
rv = GetBinding(aBoundElement, baseBindingURI, aPeekOnly,
child->NodePrincipal(), aIsReady,
getter_AddRefs(baseBinding), aDontExtendURIs);
@ -830,6 +830,8 @@ nsXBLService::GetBinding(nsIContent* aBoundElement, nsIURI* aURI,
if (!aPeekOnly) {
// Make a new binding
protoBinding = docInfo->GetPrototypeBinding(ref);
NS_ENSURE_STATE(protoBinding);
nsXBLBinding *newBinding = new nsXBLBinding(protoBinding);
if (baseBinding) {

View File

@ -109,7 +109,7 @@ protected:
nsresult GetBinding(nsIContent* aBoundElement, nsIURI* aURI,
bool aPeekFlag, nsIPrincipal* aOriginPrincipal,
bool* aIsReady, nsXBLBinding** aResult,
nsTArray<nsIURI*>& aDontExtendURIs);
nsTArray<nsCOMPtr<nsIURI>>& aDontExtendURIs);
// MEMBER VARIABLES
public:

View File

@ -547,12 +547,14 @@ CodeGeneratorARM::visitDivI(LDivI* ins)
if (mir->canTruncateRemainder()) {
masm.ma_sdiv(lhs, rhs, output);
} else {
ScratchRegisterScope scratch(masm);
masm.ma_sdiv(lhs, rhs, scratch);
masm.ma_mul(scratch, rhs, temp);
masm.ma_cmp(lhs, temp);
{
ScratchRegisterScope scratch(masm);
masm.ma_sdiv(lhs, rhs, temp);
masm.ma_mul(temp, rhs, scratch);
masm.ma_cmp(lhs, scratch);
}
bailoutIf(Assembler::NotEqual, ins->snapshot());
masm.ma_mov(scratch, output);
masm.ma_mov(temp, output);
}
masm.bind(&done);

View File

@ -3670,7 +3670,7 @@ GetScrollClipIntersection(nsDisplayListBuilder* aBuilder, const nsIFrame* aAnima
continue;
}
const DisplayItemClip* clip = scrollFrame->ComputeScrollClip(aIsCaret);
Maybe<DisplayItemClip> clip = scrollFrame->ComputeScrollClip(aIsCaret);
if (clip) {
resultClip.IntersectWith(*clip);
}
@ -4542,7 +4542,7 @@ ContainerState::SetupScrollingMetadata(NewLayerEntry* aEntry)
}
FrameMetrics& metrics = info->metrics;
const DisplayItemClip* clip = info->clip;
Maybe<DisplayItemClip> clip = info->clip;
if (clip &&
clip->HasClip() &&

View File

@ -1806,8 +1806,6 @@ ScrollFrameHelper::ScrollFrameHelper(nsContainerFrame* aOuter,
, mResolution(1.0)
, mScrollPosForLayerPixelAlignment(-1, -1)
, mLastUpdateImagesPos(-1, -1)
, mAncestorClip(nullptr)
, mAncestorClipForCaret(nullptr)
, mNeverHasVerticalScrollbar(false)
, mNeverHasHorizontalScrollbar(false)
, mHasVerticalScrollbar(false)
@ -2786,8 +2784,8 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
// Clear the scroll port clip that was set during the last paint.
mAncestorClip = nullptr;
mAncestorClipForCaret = nullptr;
mAncestorClip = Nothing();
mAncestorClipForCaret = Nothing();
// We put non-overlay scrollbars in their own layers when this is the root
// scroll frame and we are a toplevel content document. In this situation,
@ -3028,7 +3026,7 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// Capture the clip state of the parent scroll frame. This will be saved
// on FrameMetrics for layers with this frame as their animated geoemetry
// root.
mAncestorClipForCaret = aBuilder->ClipState().GetCurrentCombinedClip(aBuilder);
mAncestorClipForCaret = ToMaybe(aBuilder->ClipState().GetCurrentCombinedClip(aBuilder));
// Add the non-caret content box clip here so that it gets picked up by
// mAncestorClip.
@ -3041,7 +3039,7 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
clipStateNonCaret->ClipContainingBlockDescendants(*contentBoxClipForNonCaretContent);
}
}
mAncestorClip = aBuilder->ClipState().GetCurrentCombinedClip(aBuilder);
mAncestorClip = ToMaybe(aBuilder->ClipState().GetCurrentCombinedClip(aBuilder));
// If we are using a display port, then ignore any pre-existing clip
// passed down from our parents. The pre-existing clip would just defeat
@ -3121,12 +3119,12 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
scrolledContent.MoveTo(aLists);
}
const DisplayItemClip*
Maybe<DisplayItemClip>
ScrollFrameHelper::ComputeScrollClip(bool aIsForCaret) const
{
const DisplayItemClip* ancestorClip = aIsForCaret ? mAncestorClipForCaret : mAncestorClip;
const Maybe<DisplayItemClip>& ancestorClip = aIsForCaret ? mAncestorClipForCaret : mAncestorClip;
if (!mShouldBuildScrollableLayer || mIsScrollableLayerInRootContainer) {
return nullptr;
return Nothing();
}
return ancestorClip;
@ -3148,7 +3146,7 @@ ScrollFrameHelper::ComputeFrameMetrics(Layer* aLayer,
needsParentLayerClip = false;
}
const DisplayItemClip* ancestorClip = aIsForCaret ? mAncestorClipForCaret : mAncestorClip;
const Maybe<DisplayItemClip>& ancestorClip = aIsForCaret ? mAncestorClipForCaret : mAncestorClip;
nsPoint toReferenceFrame = mOuter->GetOffsetToCrossDoc(aContainerReferenceFrame);
bool isRootContent = mIsRoot && mOuter->PresContext()->IsRootContentDocument();

View File

@ -382,7 +382,7 @@ public:
Layer* aLayer, nsIFrame* aContainerReferenceFrame,
const ContainerLayerParameters& aParameters,
bool aIsForCaret) const;
virtual const mozilla::DisplayItemClip* ComputeScrollClip(bool aIsForCaret) const;
virtual mozilla::Maybe<mozilla::DisplayItemClip> ComputeScrollClip(bool aIsForCaret) const;
// nsIScrollbarMediator
void ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection,
@ -461,9 +461,9 @@ public:
FrameMetrics::ViewID mScrollParentID;
// The scroll port clip. Only valid during painting.
const DisplayItemClip* mAncestorClip;
const DisplayItemClip* mAncestorClipForCaret;
// The scroll port clip.
Maybe<DisplayItemClip> mAncestorClip;
Maybe<DisplayItemClip> mAncestorClipForCaret;
bool mNeverHasVerticalScrollbar:1;
bool mNeverHasHorizontalScrollbar:1;
@ -845,7 +845,7 @@ public:
{
return mHelper.ComputeFrameMetrics(aLayer, aContainerReferenceFrame, aParameters, aIsForCaret);
}
virtual const mozilla::DisplayItemClip* ComputeScrollClip(bool aIsForCaret) const override
virtual mozilla::Maybe<mozilla::DisplayItemClip> ComputeScrollClip(bool aIsForCaret) const override
{
return mHelper.ComputeScrollClip(aIsForCaret);
}
@ -1245,7 +1245,7 @@ public:
{
return mHelper.ComputeFrameMetrics(aLayer, aContainerReferenceFrame, aParameters, aIsForCaret);
}
virtual const mozilla::DisplayItemClip* ComputeScrollClip(bool aIsForCaret) const override
virtual mozilla::Maybe<mozilla::DisplayItemClip> ComputeScrollClip(bool aIsForCaret) const override
{
return mHelper.ComputeScrollClip(aIsForCaret);
}

View File

@ -11,6 +11,7 @@
#define nsIScrollFrame_h___
#include "nsCoord.h"
#include "DisplayItemClip.h"
#include "ScrollbarStyles.h"
#include "mozilla/Maybe.h"
#include "mozilla/gfx/Point.h"
@ -32,7 +33,6 @@ class nsDisplayListBuilder;
namespace mozilla {
struct ContainerLayerParameters;
class DisplayItemClip;
namespace layers {
class Layer;
} // namespace layers
@ -40,7 +40,7 @@ class Layer;
struct FrameMetricsAndClip
{
layers::FrameMetrics metrics;
const DisplayItemClip* clip;
mozilla::Maybe<DisplayItemClip> clip;
};
} // namespace mozilla
@ -449,7 +449,7 @@ public:
*/
virtual bool UsesContainerScrolling() const = 0;
virtual const mozilla::DisplayItemClip* ComputeScrollClip(bool aIsForCaret) const = 0;
virtual mozilla::Maybe<mozilla::DisplayItemClip> ComputeScrollClip(bool aIsForCaret) const = 0;
};
#endif

View File

@ -26,7 +26,6 @@ public:
uint32_t ReadBits(size_t aNum)
{
MOZ_ASSERT(mBitReader.numBitsLeft());
MOZ_ASSERT(aNum <= 32);
if (mBitReader.numBitsLeft() < aNum) {
return 0;
@ -48,7 +47,10 @@ public:
i++;
}
if (i == 32) {
MOZ_ASSERT(false);
// This can happen if the data is invalid, or if it's
// short, since ReadBit() will return 0 when it runs
// off the end of the buffer.
NS_WARNING("Invalid H.264 data");
return 0;
}
uint32_t r = ReadBits(i);

View File

@ -2543,9 +2543,9 @@ pref("dom.ipc.plugins.unloadTimeoutSecs", 30);
// Asynchronous plugin initialization should only be enabled on non-e10s
// channels until some remaining bugs are resolved.
#ifdef E10S_TESTING_ONLY
pref("dom.ipc.plugins.asyncInit", false);
pref("dom.ipc.plugins.asyncInit.enabled", false);
#else
pref("dom.ipc.plugins.asyncInit", true);
pref("dom.ipc.plugins.asyncInit.enabled", true);
#endif
pref("dom.ipc.processCount", 1);

View File

@ -32,7 +32,6 @@ ifeq ($(OS_ARCH),WINNT)
TEST_HARNESS_BINS += \
crashinject$(BIN_SUFFIX) \
crashinjectdll$(DLL_SUFFIX) \
vmwarerecordinghelper$(DLL_SUFFIX) \
$(NULL)
endif

View File

@ -30,9 +30,6 @@ except ImportError:
conditions = None
VMWARE_RECORDING_HELPER_BASENAME = "vmwarerecordinghelper"
class ArgumentContainer():
__metaclass__ = ABCMeta
@ -290,14 +287,6 @@ class MochitestArguments(ArgumentContainer):
"help": "Directory where testing-only JS modules are located.",
"suppress": True,
}],
[["--use-vmware-recording"],
{"action": "store_true",
"dest": "vmwareRecording",
"default": False,
"help": "Enables recording while the application is running inside a VMware "
"Workstation 7.0 or later VM.",
"suppress": True,
}],
[["--repeat"],
{"type": int,
"default": 0,
@ -627,16 +616,6 @@ class MochitestArguments(ArgumentContainer):
elif not options.symbolsPath and build_obj:
options.symbolsPath = os.path.join(build_obj.distdir, 'crashreporter-symbols')
if options.vmwareRecording:
if not mozinfo.isWin:
parser.error(
"use-vmware-recording is only supported on Windows.")
options.vmwareHelperPath = os.path.join(
options.utilityPath, VMWARE_RECORDING_HELPER_BASENAME + ".dll")
if not os.path.exists(options.vmwareHelperPath):
parser.error("%s not found, cannot automate VMware recording." %
options.vmwareHelperPath)
if options.webapprtContent and options.webapprtChrome:
parser.error(
"Only one of --webapprt-content and --webapprt-chrome may be given.")

View File

@ -1217,7 +1217,6 @@ class Mochitest(MochitestUtilsMixin):
_active_tests = None
certdbNew = False
sslTunnel = None
vmwareHelper = None
DEFAULT_TIMEOUT = 60.0
mediaDevices = None
@ -1624,37 +1623,6 @@ class Mochitest(MochitestUtilsMixin):
return foundZombie
def startVMwareRecording(self, options):
""" starts recording inside VMware VM using the recording helper dll """
assert mozinfo.isWin
from ctypes import cdll
self.vmwareHelper = cdll.LoadLibrary(self.vmwareHelperPath)
if self.vmwareHelper is None:
self.log.warning("runtests.py | Failed to load "
"VMware recording helper")
return
self.log.info("runtests.py | Starting VMware recording.")
try:
self.vmwareHelper.StartRecording()
except Exception as e:
self.log.warning("runtests.py | Failed to start "
"VMware recording: (%s)" % str(e))
self.vmwareHelper = None
def stopVMwareRecording(self):
""" stops recording inside VMware VM using the recording helper dll """
try:
assert mozinfo.isWin
if self.vmwareHelper is not None:
self.log.info("runtests.py | Stopping VMware recording.")
self.vmwareHelper.StopRecording()
except Exception as e:
self.log.warning("runtests.py | Failed to stop "
"VMware recording: (%s)" % str(e))
self.log.exception('Error stopping VMWare recording')
self.vmwareHelper = None
def runApp(self,
testUrl,
env,
@ -2242,9 +2210,6 @@ class Mochitest(MochitestUtilsMixin):
else:
timeout = 330.0 # default JS harness timeout is 300 seconds
if options.vmwareRecording:
self.startVMwareRecording(options)
# detect shutdown leaks for m-bc runs
detectShutdownLeaks = mozinfo.info[
"debug"] and options.browserChrome and not options.webapprtChrome
@ -2276,8 +2241,6 @@ class Mochitest(MochitestUtilsMixin):
status = 1
finally:
if options.vmwareRecording:
self.stopVMwareRecording()
self.stopServers()
mozleak.process_leak_log(

View File

@ -7334,6 +7334,13 @@
"n_values": 3,
"description": "A simple counter of daily mixed-content unblock operations and top documents loaded"
},
"MIXED_CONTENT_HSTS": {
"alert_emails": ["seceng@mozilla.org"],
"expires_in_version": "never",
"kind": "enumerated",
"n_values": 10,
"description": "How often would blocked mixed content be allowed if HSTS upgrades were allowed? 0=display/no-HSTS, 1=display/HSTS, 2=active/no-HSTS, 3=active/HSTS"
},
"NTLM_MODULE_USED_2": {
"expires_in_version": "never",
"kind": "enumerated",

View File

@ -111,7 +111,7 @@ const DEFAULT_ENVIRONMENT_PREFS = new Map([
["devtools.chrome.enabled", {what: RECORD_PREF_VALUE}],
["devtools.debugger.enabled", {what: RECORD_PREF_VALUE}],
["devtools.debugger.remote-enabled", {what: RECORD_PREF_VALUE}],
["dom.ipc.plugins.asyncInit", {what: RECORD_PREF_VALUE}],
["dom.ipc.plugins.asyncInit.enabled", {what: RECORD_PREF_VALUE}],
["dom.ipc.plugins.enabled", {what: RECORD_PREF_VALUE}],
["dom.ipc.processCount", {what: RECORD_PREF_VALUE, requiresRestart: true}],
["experiments.manifest.uri", {what: RECORD_PREF_VALUE}],

View File

@ -56,7 +56,7 @@ const LOGGER_PREFIX = "TelemetrySession" + (Utils.isContentProcess ? "#content::
const PREF_BRANCH = "toolkit.telemetry.";
const PREF_PREVIOUS_BUILDID = PREF_BRANCH + "previousBuildID";
const PREF_FHR_UPLOAD_ENABLED = "datareporting.healthreport.uploadEnabled";
const PREF_ASYNC_PLUGIN_INIT = "dom.ipc.plugins.asyncInit";
const PREF_ASYNC_PLUGIN_INIT = "dom.ipc.plugins.asyncInit.enabled";
const PREF_UNIFIED = PREF_BRANCH + "unified";

View File

@ -211,6 +211,12 @@ enum {
};
#endif
#if !defined(MAC_OS_X_VERSION_10_11) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11
enum {
NSVisualEffectMaterialMenu = 5
};
#endif
static NSUInteger
VisualEffectStateForVibrancyType(VibrancyType aType)
{
@ -263,13 +269,14 @@ VibrancyManager::CreateEffectView(VibrancyType aType, NSRect aRect)
[effectView setState:VisualEffectStateForVibrancyType(aType)];
if (aType == VibrancyType::MENU) {
// NSVisualEffectMaterialTitlebar doesn't match the native menu look
// perfectly but comes pretty close. Ideally we'd use a material with
// materialTypeName "MacLight", since that's what menus use, but there's
// no entry with that material in the internalMaterialType-to-
// CGSWindowBackdropViewSpec table which NSVisualEffectView consults when
// setting up the effect.
[effectView setMaterial:NSVisualEffectMaterialTitlebar];
if (nsCocoaFeatures::OnElCapitanOrLater()) {
[effectView setMaterial:NSVisualEffectMaterialMenu];
} else {
// Before 10.11 there is no material that perfectly matches the menu
// look. Of all available material types, NSVisualEffectMaterialTitlebar
// is the one that comes closest.
[effectView setMaterial:NSVisualEffectMaterialTitlebar];
}
} else if (aType == VibrancyType::HIGHLIGHTED_MENUITEM) {
[effectView setMaterial:NSVisualEffectMaterialMenuItem];
if ([effectView respondsToSelector:@selector(setEmphasized:)]) {

View File

@ -6565,7 +6565,7 @@ HandleEvent(CGEventTapProxy aProxy, CGEventType aType,
[self performSelector:@selector(shutdownAndReleaseCalledOnEventThread) onThread:mThread withObject:nil waitUntilDone:NO];
}
static const CGEventField kCGWindowNumberField = 51;
static const CGEventField kCGWindowNumberField = (const CGEventField) 51;
// Called on scroll thread
- (void)handleEvent:(CGEventRef)cgEvent type:(CGEventType)type

View File

@ -22,6 +22,7 @@ public:
static bool OnMountainLionOrLater();
static bool OnMavericksOrLater();
static bool OnYosemiteOrLater();
static bool OnElCapitanOrLater();
static bool AccelerateByDefault();
static bool IsAtLeastVersion(int32_t aMajor, int32_t aMinor, int32_t aBugFix=0);

View File

@ -18,6 +18,7 @@
#define MAC_OS_X_VERSION_10_8_HEX 0x00001080
#define MAC_OS_X_VERSION_10_9_HEX 0x00001090
#define MAC_OS_X_VERSION_10_10_HEX 0x000010A0
#define MAC_OS_X_VERSION_10_11_HEX 0x000010B0
#include "nsCocoaFeatures.h"
#include "nsCocoaUtils.h"
@ -172,6 +173,12 @@ nsCocoaFeatures::OnYosemiteOrLater()
return (OSXVersion() >= MAC_OS_X_VERSION_10_10_HEX);
}
/* static */ bool
nsCocoaFeatures::OnElCapitanOrLater()
{
return (OSXVersion() >= MAC_OS_X_VERSION_10_11_HEX);
}
/* static */ bool
nsCocoaFeatures::AccelerateByDefault()
{