Merge mozilla-central to fx-team

This commit is contained in:
Carsten "Tomcat" Book 2013-12-16 16:08:50 +01:00
commit 749dc7e0bb
42 changed files with 301 additions and 188 deletions

View File

@ -1,4 +1,4 @@
{
"revision": "f63fa4e31cea664886f43504529d96bc046506fc",
"revision": "f112883f55f9f23abd5aac107ca09f5471c37798",
"repo_path": "/integration/gaia-central"
}

View File

@ -438,6 +438,7 @@ support-files =
[test_bug599588.html]
[test_bug601803.html]
[test_bug602838.html]
skip-if = toolkit == "gonk" # bug 945189
[test_bug604592.html]
[test_bug604660.html]
[test_bug605982.html]

View File

@ -17,8 +17,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=457672
<pre id="test">
<script type="application/javascript">
SimpleTest.expectAssertions(1);
/** Test for Bug 457672 **/
var windowBlurCount = 0;

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/. */
#ifndef MP3FrameParser_h
#define MP3FrameParser_h
#include <stdint.h>
#include "mozilla/Mutex.h"
@ -208,5 +205,3 @@ private:
};
}
#endif

View File

@ -12,7 +12,7 @@ EXPORTS += [
'DirectShowUtils.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'AudioSinkFilter.cpp',
'AudioSinkInputPin.cpp',
'DirectShowDecoder.cpp',

View File

@ -30,7 +30,7 @@ EXPORTS.mp4_demuxer += [
'demuxer/video_util.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'BlankDecoderModule.cpp',
'demuxer/aac.cc',
'demuxer/audio_decoder_config.cc',
@ -58,7 +58,7 @@ if CONFIG['MOZ_WMF']:
'wmf/WMFDecoderModule.h',
'wmf/WMFVideoDecoder.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'wmf/MFTDecoder.cpp',
'wmf/WMFAudioDecoder.cpp',
'wmf/WMFDecoderModule.cpp',

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/. */
#ifndef WMFUtils_h
#define WMFUtils_h
#include "WMF.h"
#include "nsString.h"
#include "nsRect.h"
@ -102,5 +99,3 @@ IsFlagSet(DWORD flags, DWORD pattern) {
}
} // namespace mozilla
#endif

View File

@ -12,7 +12,7 @@ EXPORTS += [
'WMFUtils.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'DXVA2Manager.cpp',
'WMFByteStream.cpp',
'WMFDecoder.cpp',

View File

@ -307,8 +307,10 @@ nsGlobalWindow::DOMMinTimeoutValue() const {
PR_BEGIN_MACRO \
if (IsInnerWindow()) { \
nsGlobalWindow *outer = GetOuterWindowInternal(); \
if (!outer) { \
NS_WARNING("No outer window available!"); \
if (!outer || outer->GetCurrentInnerWindow() != this) { \
NS_WARNING(outer ? \
"Inner window is not its outer's current inner window." : \
"No outer window available!"); \
return err_rval; \
} \
return outer->method args; \
@ -322,9 +324,12 @@ nsGlobalWindow::DOMMinTimeoutValue() const {
if (!outer) { \
NS_WARNING("No outer window available!"); \
errorresult.Throw(NS_ERROR_NOT_INITIALIZED); \
return err_rval; \
} else if (outer->GetCurrentInnerWindow() != this) { \
errorresult.Throw(NS_ERROR_XPC_SECURITY_MANAGER_VETO); \
} else { \
return outer->method args; \
} \
return outer->method args; \
return err_rval; \
} \
PR_END_MACRO
@ -332,8 +337,10 @@ nsGlobalWindow::DOMMinTimeoutValue() const {
PR_BEGIN_MACRO \
if (IsInnerWindow()) { \
nsGlobalWindow *outer = GetOuterWindowInternal(); \
if (!outer) { \
NS_WARNING("No outer window available!"); \
if (!outer || outer->GetCurrentInnerWindow() != this) { \
NS_WARNING(outer ? \
"Inner window is not its outer's current inner window." : \
"No outer window available!"); \
return; \
} \
outer->method args; \
@ -345,8 +352,10 @@ nsGlobalWindow::DOMMinTimeoutValue() const {
PR_BEGIN_MACRO \
if (IsInnerWindow()) { \
nsGlobalWindow *outer = GetOuterWindowInternal(); \
if (!outer) { \
NS_WARNING("No outer window available!"); \
if (!outer || outer->GetCurrentInnerWindow() != this) { \
NS_WARNING(outer ? \
"Inner window is not its outer's current inner window." : \
"No outer window available!"); \
return err_rval; \
} \
return ((nsGlobalChromeWindow *)outer)->method args; \
@ -368,8 +377,10 @@ nsGlobalWindow::DOMMinTimeoutValue() const {
PR_BEGIN_MACRO \
if (IsInnerWindow()) { \
nsGlobalWindow *outer = GetOuterWindowInternal(); \
if (!outer) { \
NS_WARNING("No outer window available!"); \
if (!outer || outer->GetCurrentInnerWindow() != this) { \
NS_WARNING(outer ? \
"Inner window is not its outer's current inner window." : \
"No outer window available!"); \
return err_rval; \
} \
return ((nsGlobalModalWindow *)outer)->method args; \
@ -1828,21 +1839,25 @@ nsGlobalWindow::UnmarkGrayTimers()
nsresult
nsGlobalWindow::EnsureScriptEnvironment()
{
FORWARD_TO_OUTER(EnsureScriptEnvironment, (), NS_ERROR_NOT_INITIALIZED);
nsGlobalWindow* outer = GetOuterWindowInternal();
if (!outer) {
NS_WARNING("No outer window available!");
return NS_ERROR_FAILURE;
}
if (mJSObject) {
if (outer->mJSObject) {
return NS_OK;
}
NS_ASSERTION(!GetCurrentInnerWindowInternal(),
NS_ASSERTION(!outer->GetCurrentInnerWindowInternal(),
"mJSObject is null, but we have an inner window?");
// If this window is a [i]frame, don't bother GC'ing when the frame's context
// is destroyed since a GC will happen when the frameset or host document is
// destroyed anyway.
nsCOMPtr<nsIScriptContext> context = new nsJSContext(!IsFrame(), this);
nsCOMPtr<nsIScriptContext> context = new nsJSContext(!IsFrame(), outer);
NS_ASSERTION(!mContext, "Will overwrite mContext!");
NS_ASSERTION(!outer->mContext, "Will overwrite mContext!");
// should probably assert the context is clean???
context->WillInitializeContext();
@ -1850,26 +1865,15 @@ nsGlobalWindow::EnsureScriptEnvironment()
nsresult rv = context->InitContext();
NS_ENSURE_SUCCESS(rv, rv);
mContext = context;
outer->mContext = context;
return NS_OK;
}
nsIScriptContext *
nsGlobalWindow::GetScriptContext()
{
FORWARD_TO_OUTER(GetScriptContext, (), nullptr);
return mContext;
}
nsIScriptContext *
nsGlobalWindow::GetContext()
{
FORWARD_TO_OUTER(GetContext, (), nullptr);
// check GetContext is indeed identical to GetScriptContext()
NS_ASSERTION(mContext == GetScriptContext(),
"GetContext confused?");
return mContext;
nsGlobalWindow* outer = GetOuterWindowInternal();
return outer ? outer->mContext : nullptr;
}
JSObject *
@ -3036,7 +3040,7 @@ nsGlobalWindow::DialogsAreBeingAbused()
bool
nsGlobalWindow::ConfirmDialogIfNeeded()
{
FORWARD_TO_OUTER(ConfirmDialogIfNeeded, (), false);
MOZ_ASSERT(IsOuterWindow());
NS_ENSURE_TRUE(mDocShell, false);
nsCOMPtr<nsIPromptService> promptSvc =
@ -3197,8 +3201,7 @@ nsGlobalWindow::PoisonOuterWindowProxy(JSObject *aObject)
nsresult
nsGlobalWindow::SetArguments(nsIArray *aArguments)
{
FORWARD_TO_OUTER(SetArguments, (aArguments),
NS_ERROR_NOT_INITIALIZED);
MOZ_ASSERT(IsOuterWindow());
nsresult rv;
// Historically, we've used the same machinery to handle openDialog arguments
@ -3624,39 +3627,15 @@ nsGlobalWindow::GetRealParent(nsIDOMWindow** aParent)
return NS_OK;
}
/**
* GetScriptableTop is called when script reads window.top.
*
* In contrast to GetRealTop, GetScriptableTop respects <iframe mozbrowser>
* boundaries. If we encounter a window owned by an <iframe mozbrowser> while
* walking up the window hierarchy, we'll stop and return that window.
*/
NS_IMETHODIMP
nsGlobalWindow::GetScriptableTop(nsIDOMWindow **aTop)
static nsresult
GetTopImpl(nsGlobalWindow* aWin, nsIDOMWindow** aTop, bool aScriptable)
{
return GetTopImpl(aTop, /* aScriptable = */ true);
}
/**
* nsIDOMWindow::GetTop (when called from C++) is just a wrapper around
* GetRealTop.
*/
NS_IMETHODIMP
nsGlobalWindow::GetRealTop(nsIDOMWindow** aTop)
{
return GetTopImpl(aTop, /* aScriptable = */ false);
}
nsresult
nsGlobalWindow::GetTopImpl(nsIDOMWindow** aTop, bool aScriptable)
{
FORWARD_TO_OUTER(GetTopImpl, (aTop, aScriptable), NS_ERROR_NOT_INITIALIZED);
*aTop = nullptr;
// Walk up the parent chain.
nsCOMPtr<nsIDOMWindow> prevParent = this;
nsCOMPtr<nsIDOMWindow> parent = this;
nsCOMPtr<nsIDOMWindow> prevParent = aWin;
nsCOMPtr<nsIDOMWindow> parent = aWin;
do {
if (!parent) {
break;
@ -3685,6 +3664,40 @@ nsGlobalWindow::GetTopImpl(nsIDOMWindow** aTop, bool aScriptable)
return NS_OK;
}
/**
* GetScriptableTop is called when script reads window.top.
*
* In contrast to GetRealTop, GetScriptableTop respects <iframe mozbrowser>
* boundaries. If we encounter a window owned by an <iframe mozbrowser> while
* walking up the window hierarchy, we'll stop and return that window.
*/
NS_IMETHODIMP
nsGlobalWindow::GetScriptableTop(nsIDOMWindow **aTop)
{
FORWARD_TO_OUTER(GetScriptableTop, (aTop), NS_ERROR_NOT_INITIALIZED);
return GetTopImpl(this, aTop, /* aScriptable = */ true);
}
/**
* nsIDOMWindow::GetTop (when called from C++) is just a wrapper around
* GetRealTop.
*/
NS_IMETHODIMP
nsGlobalWindow::GetRealTop(nsIDOMWindow** aTop)
{
nsGlobalWindow* outer;
if (IsInnerWindow()) {
outer = GetOuterWindowInternal();
if (!outer) {
NS_WARNING("No outer window available!");
return NS_ERROR_NOT_INITIALIZED;
}
} else {
outer = this;
}
return GetTopImpl(outer, aTop, /* aScriptable = */ false);
}
JSObject*
nsGlobalWindow::GetContent(JSContext* aCx, ErrorResult& aError)
{
@ -3804,7 +3817,14 @@ nsGlobalWindow::GetScriptableContent(JSContext* aCx, JS::Value* aVal)
NS_IMETHODIMP
nsGlobalWindow::GetPrompter(nsIPrompt** aPrompt)
{
FORWARD_TO_OUTER(GetPrompter, (aPrompt), NS_ERROR_NOT_INITIALIZED);
if (IsInnerWindow()) {
nsGlobalWindow* outer = GetOuterWindowInternal();
if (!outer) {
NS_WARNING("No outer window available!");
return NS_ERROR_NOT_INITIALIZED;
}
return outer->GetPrompter(aPrompt);
}
if (!mDocShell)
return NS_ERROR_FAILURE;
@ -5555,6 +5575,8 @@ nsGlobalWindow::WindowExists(const nsAString& aName,
already_AddRefed<nsIWidget>
nsGlobalWindow::GetMainWidget()
{
FORWARD_TO_OUTER(GetMainWidget, (), nullptr);
nsCOMPtr<nsIBaseWindow> treeOwnerAsWin = GetTreeOwnerWindow();
nsCOMPtr<nsIWidget> widget;
@ -7105,7 +7127,7 @@ nsGlobalWindow::PopupWhitelisted()
PopupControlState
nsGlobalWindow::RevisePopupAbuseLevel(PopupControlState aControl)
{
FORWARD_TO_OUTER(RevisePopupAbuseLevel, (aControl), aControl);
MOZ_ASSERT(IsOuterWindow());
NS_ASSERTION(mDocShell, "Must have docshell");
@ -9121,7 +9143,7 @@ nsGlobalWindow::GetContextForEventHandlers(nsresult* aRv)
nsPIDOMWindow*
nsGlobalWindow::GetPrivateParent()
{
FORWARD_TO_OUTER(GetPrivateParent, (), nullptr);
MOZ_ASSERT(IsOuterWindow());
nsCOMPtr<nsIDOMWindow> parent;
GetParent(getter_AddRefs(parent));
@ -9149,24 +9171,18 @@ nsGlobalWindow::GetPrivateParent()
nsPIDOMWindow*
nsGlobalWindow::GetPrivateRoot()
{
FORWARD_TO_OUTER(GetPrivateRoot, (), nullptr);
if (IsInnerWindow()) {
nsGlobalWindow* outer = GetOuterWindowInternal();
if (!outer) {
NS_WARNING("No outer window available!");
return nullptr;
}
return outer->GetPrivateRoot();
}
nsCOMPtr<nsIDOMWindow> top;
GetTop(getter_AddRefs(top));
nsCOMPtr<nsPIDOMWindow> ptop = do_QueryInterface(top);
NS_ASSERTION(ptop, "cannot get ptop");
if (!ptop)
return nullptr;
nsIDocShell *docShell = ptop->GetDocShell();
// Get the chrome event handler from the doc shell, since we only
// want to deal with XUL chrome handlers and not the new kind of
// window root handler.
nsCOMPtr<nsIDOMEventTarget> chromeEventHandler;
docShell->GetChromeEventHandler(getter_AddRefs(chromeEventHandler));
nsCOMPtr<nsIContent> chromeElement(do_QueryInterface(mChromeEventHandler));
if (chromeElement) {
nsIDocument* doc = chromeElement->GetDocument();
@ -10131,31 +10147,35 @@ nsGlobalWindow::GetInterface(const nsIID & aIID, void **aSink)
*aSink = nullptr;
if (aIID.Equals(NS_GET_IID(nsIDocCharset))) {
FORWARD_TO_OUTER(GetInterface, (aIID, aSink), NS_ERROR_NOT_INITIALIZED);
nsGlobalWindow* outer = GetOuterWindowInternal();
NS_ENSURE_TRUE(outer, NS_ERROR_NOT_INITIALIZED);
NS_WARNING("Using deprecated nsIDocCharset: use nsIDocShell.GetCharset() instead ");
nsCOMPtr<nsIDocCharset> docCharset(do_QueryInterface(mDocShell));
nsCOMPtr<nsIDocCharset> docCharset(do_QueryInterface(outer->mDocShell));
docCharset.forget(aSink);
}
else if (aIID.Equals(NS_GET_IID(nsIWebNavigation))) {
FORWARD_TO_OUTER(GetInterface, (aIID, aSink), NS_ERROR_NOT_INITIALIZED);
nsGlobalWindow* outer = GetOuterWindowInternal();
NS_ENSURE_TRUE(outer, NS_ERROR_NOT_INITIALIZED);
nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(mDocShell));
nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(outer->mDocShell));
webNav.forget(aSink);
}
else if (aIID.Equals(NS_GET_IID(nsIDocShell))) {
FORWARD_TO_OUTER(GetInterface, (aIID, aSink), NS_ERROR_NOT_INITIALIZED);
nsGlobalWindow* outer = GetOuterWindowInternal();
NS_ENSURE_TRUE(outer, NS_ERROR_NOT_INITIALIZED);
nsCOMPtr<nsIDocShell> docShell = mDocShell;
nsCOMPtr<nsIDocShell> docShell = outer->mDocShell;
docShell.forget(aSink);
}
#ifdef NS_PRINTING
else if (aIID.Equals(NS_GET_IID(nsIWebBrowserPrint))) {
FORWARD_TO_OUTER(GetInterface, (aIID, aSink), NS_ERROR_NOT_INITIALIZED);
nsGlobalWindow* outer = GetOuterWindowInternal();
NS_ENSURE_TRUE(outer, NS_ERROR_NOT_INITIALIZED);
if (mDocShell) {
if (outer->mDocShell) {
nsCOMPtr<nsIContentViewer> viewer;
mDocShell->GetContentViewer(getter_AddRefs(viewer));
outer->mDocShell->GetContentViewer(getter_AddRefs(viewer));
if (viewer) {
nsCOMPtr<nsIWebBrowserPrint> webBrowserPrint(do_QueryInterface(viewer));
webBrowserPrint.forget(aSink);
@ -10164,19 +10184,21 @@ nsGlobalWindow::GetInterface(const nsIID & aIID, void **aSink)
}
#endif
else if (aIID.Equals(NS_GET_IID(nsIDOMWindowUtils))) {
FORWARD_TO_OUTER(GetInterface, (aIID, aSink), NS_ERROR_NOT_INITIALIZED);
nsGlobalWindow* outer = GetOuterWindowInternal();
NS_ENSURE_TRUE(outer, NS_ERROR_NOT_INITIALIZED);
if (!mWindowUtils) {
mWindowUtils = new nsDOMWindowUtils(this);
mWindowUtils = new nsDOMWindowUtils(outer);
}
*aSink = mWindowUtils;
NS_ADDREF(((nsISupports *) *aSink));
}
else if (aIID.Equals(NS_GET_IID(nsILoadContext))) {
FORWARD_TO_OUTER(GetInterface, (aIID, aSink), NS_ERROR_NOT_INITIALIZED);
nsGlobalWindow* outer = GetOuterWindowInternal();
NS_ENSURE_TRUE(outer, NS_ERROR_NOT_INITIALIZED);
nsCOMPtr<nsILoadContext> loadContext(do_QueryInterface(mDocShell));
nsCOMPtr<nsILoadContext> loadContext(do_QueryInterface(outer->mDocShell));
loadContext.forget(aSink);
}
else {
@ -11029,7 +11051,14 @@ nsGlobalWindow::FireDelayedDOMEvents()
nsIDOMWindow *
nsGlobalWindow::GetParentInternal()
{
FORWARD_TO_OUTER(GetParentInternal, (), nullptr);
if (IsInnerWindow()) {
nsGlobalWindow* outer = GetOuterWindowInternal();
if (!outer) {
NS_WARNING("No outer window available!");
return nullptr;
}
return outer->GetParentInternal();
}
nsCOMPtr<nsIDOMWindow> parent;
GetParent(getter_AddRefs(parent));
@ -12150,7 +12179,7 @@ nsGlobalWindow::GetTreeOwner()
already_AddRefed<nsIBaseWindow>
nsGlobalWindow::GetTreeOwnerWindow()
{
FORWARD_TO_OUTER(GetTreeOwnerWindow, (), nullptr);
MOZ_ASSERT(IsOuterWindow());
nsCOMPtr<nsIDocShellTreeOwner> treeOwner;

View File

@ -341,7 +341,6 @@ public:
virtual JSObject *GetGlobalJSObject();
// nsIScriptGlobalObject
virtual nsIScriptContext *GetContext();
JSObject *FastGetGlobalJSObject() const
{
return mJSObject;
@ -529,11 +528,6 @@ public:
// Inner windows only.
bool DialogsAreBeingAbused();
// Ask the user if further dialogs should be blocked, if dialogs are currently
// being abused. This is used in the cases where we have no modifiable UI to
// show, in that case we show a separate dialog to ask this question.
bool ConfirmDialogIfNeeded();
// These functions are used for controlling and determining whether dialogs
// (alert, prompt, confirm) are currently allowed in this window.
void EnableDialogs();
@ -1280,9 +1274,6 @@ protected:
nsresult CloneStorageEvent(const nsAString& aType,
nsCOMPtr<nsIDOMStorageEvent>& aEvent);
// Implements Get{Real,Scriptable}Top.
nsresult GetTopImpl(nsIDOMWindow **aWindow, bool aScriptable);
// Outer windows only.
nsDOMWindowList* GetWindowList();
@ -1321,6 +1312,11 @@ protected:
already_AddRefed<nsIDOMWindow>
GetContentInternal(mozilla::ErrorResult& aError);
// Ask the user if further dialogs should be blocked, if dialogs are currently
// being abused. This is used in the cases where we have no modifiable UI to
// show, in that case we show a separate dialog to ask this question.
bool ConfirmDialogIfNeeded();
// When adding new member variables, be careful not to create cycles
// through JavaScript. If there is any chance that a member variable
// could own objects that are implemented in JavaScript, then those

View File

@ -146,23 +146,17 @@ class WebIDLCodegenManager(LoggingMixin):
'UnionTypes.cpp',
}
# Example interfaces to build along with the tree. Other example
# interfaces will need to be generated manually.
BUILD_EXAMPLE_INTERFACES = {
'TestExampleInterface',
'TestExampleProxyInterface',
}
def __init__(self, config_path, inputs, exported_header_dir,
codegen_dir, state_path, cache_dir=None, make_deps_path=None,
make_deps_target=None):
"""Create an instance that manages WebIDLs in the build system.
config_path refers to a WebIDL config file (e.g. Bindings.conf).
inputs is a 3-tuple describing the input .webidl files and how to
inputs is a 4-tuple describing the input .webidl files and how to
process them. Members are:
(set(.webidl files), set(basenames of exported files),
set(basenames of generated events files))
set(basenames of generated events files),
set(example interface names))
exported_header_dir and codegen_dir are directories where generated
files will be written to.
@ -175,12 +169,13 @@ class WebIDLCodegenManager(LoggingMixin):
"""
self.populate_logger()
input_paths, exported_stems, generated_events_stems = inputs
input_paths, exported_stems, generated_events_stems, example_interfaces = inputs
self._config_path = config_path
self._input_paths = set(input_paths)
self._exported_stems = set(exported_stems)
self._generated_events_stems = set(generated_events_stems)
self._example_interfaces = set(example_interfaces)
self._exported_header_dir = exported_header_dir
self._codegen_dir = codegen_dir
self._state_path = state_path
@ -283,7 +278,7 @@ class WebIDLCodegenManager(LoggingMixin):
)
# Process some special interfaces required for testing.
for interface in self.BUILD_EXAMPLE_INTERFACES:
for interface in self._example_interfaces:
written = self.generate_example_files(interface)
result.created |= written[0]
result.updated |= written[1]
@ -446,7 +441,7 @@ class WebIDLCodegenManager(LoggingMixin):
stem, binding_stem, is_event, header_dir, files = self._binding_info(p)
paths |= {f for f in files if f}
for interface in self.BUILD_EXAMPLE_INTERFACES:
for interface in self._example_interfaces:
for p in self._example_paths(interface):
paths.add(p)
@ -533,7 +528,7 @@ def create_build_system_manager(topsrcdir, topobjdir, dist_dir):
files = json.load(fh)
inputs = (files['webidls'], files['exported_stems'],
files['generated_events_stems'])
files['generated_events_stems'], files['example_interfaces'])
cache_dir = os.path.join(obj_dir, '_cache')
try:

View File

@ -65,7 +65,8 @@ class TestWebIDLCodegenManager(unittest.TestCase):
inputs = (
ip,
{mozpath.splitext(mozpath.basename(p))[0] for p in ip},
set()
set(),
set(),
)
return dict(

View File

@ -26,6 +26,11 @@ PREPROCESSED_TEST_WEBIDL_FILES += [
'TestJSImplGen.webidl',
]
WEBIDL_EXAMPLE_INTERFACES += [
'TestExampleInterface',
'TestExampleProxyInterface',
]
LOCAL_INCLUDES += [
'/dom/bindings',
'/js/xpconnect/src',

View File

@ -219,7 +219,8 @@ public:
enum EndTransactionFlags {
END_DEFAULT = 0,
END_NO_IMMEDIATE_REDRAW = 1 << 0, // Do not perform the drawing phase
END_NO_COMPOSITE = 1 << 1 // Do not composite after drawing thebes layer contents.
END_NO_COMPOSITE = 1 << 1, // Do not composite after drawing thebes layer contents.
END_NO_REMOTE_COMPOSITE = 1 << 2 // Do not schedule a composition with a remote Compositor, if one exists.
};
FrameLayerBuilder* GetLayerBuilder() {
@ -280,6 +281,13 @@ public:
void* aCallbackData,
EndTransactionFlags aFlags = END_DEFAULT) = 0;
/**
* Schedule a composition with the remote Compositor, if one exists
* for this LayerManager. Useful in conjunction with the END_NO_REMOTE_COMPOSITE
* flag to EndTransaction.
*/
virtual void Composite() {}
virtual bool HasShadowManagerInternal() const { return false; }
bool HasShadowManager() const { return HasShadowManagerInternal(); }

View File

@ -209,7 +209,7 @@ ClientLayerManager::EndTransaction(DrawThebesLayerCallback aCallback,
mWidget->PrepareWindowEffects();
}
EndTransactionInternal(aCallback, aCallbackData, aFlags);
ForwardTransaction();
ForwardTransaction(!(aFlags & END_NO_REMOTE_COMPOSITE));
if (mRepeatTransaction) {
mRepeatTransaction = false;
@ -239,7 +239,7 @@ ClientLayerManager::EndEmptyTransaction(EndTransactionFlags aFlags)
if (mWidget) {
mWidget->PrepareWindowEffects();
}
ForwardTransaction();
ForwardTransaction(!(aFlags & END_NO_REMOTE_COMPOSITE));
MakeSnapshotIfRequired();
return true;
}
@ -254,6 +254,14 @@ ClientLayerManager::GetRemoteRenderer()
return mWidget->GetRemoteRenderer();
}
void
ClientLayerManager::Composite()
{
if (CompositorChild* remoteRenderer = GetRemoteRenderer()) {
remoteRenderer->SendForceComposite();
}
}
void
ClientLayerManager::MakeSnapshotIfRequired()
{
@ -328,14 +336,14 @@ ClientLayerManager::StopFrameTimeRecording(uint32_t aStartIndex,
}
void
ClientLayerManager::ForwardTransaction()
ClientLayerManager::ForwardTransaction(bool aScheduleComposite)
{
mPhase = PHASE_FORWARD;
// forward this transaction's changeset to our LayerManagerComposite
bool sent;
AutoInfallibleTArray<EditReply, 10> replies;
if (HasShadowManager() && mForwarder->EndTransaction(&replies, &sent)) {
if (HasShadowManager() && mForwarder->EndTransaction(&replies, aScheduleComposite, &sent)) {
for (nsTArray<EditReply>::size_type i = 0; i < replies.Length(); ++i) {
const EditReply& reply = replies[i];

View File

@ -152,6 +152,8 @@ public:
}
bool NeedsComposite() const { return mNeedsComposite; }
virtual void Composite() MOZ_OVERRIDE;
protected:
enum TransactionPhase {
PHASE_NONE, PHASE_CONSTRUCTION, PHASE_DRAWING, PHASE_FORWARD
@ -162,7 +164,7 @@ private:
/**
* Forward transaction results to the parent context.
*/
void ForwardTransaction();
void ForwardTransaction(bool aScheduleComposite);
/**
* Take a snapshot of the parent context, and copy

View File

@ -334,6 +334,13 @@ CompositorParent::RecvFlushRendering()
return true;
}
bool
CompositorParent::RecvForceComposite()
{
ScheduleComposition();
return true;
}
bool
CompositorParent::RecvNotifyRegionInvalidated(const nsIntRegion& aRegion)
{
@ -499,7 +506,7 @@ CompositorParent::ScheduleTask(CancelableTask* task, int time)
}
void
CompositorParent::NotifyShadowTreeTransaction(uint64_t aId, bool aIsFirstPaint)
CompositorParent::NotifyShadowTreeTransaction(uint64_t aId, bool aIsFirstPaint, bool aScheduleComposite)
{
if (mApzcTreeManager &&
mLayerManager &&
@ -509,7 +516,9 @@ CompositorParent::NotifyShadowTreeTransaction(uint64_t aId, bool aIsFirstPaint)
mCompositor->NotifyLayersTransaction();
}
ScheduleComposition();
if (aScheduleComposite) {
ScheduleComposition();
}
}
// Used when layout.frame_rate is -1. Needs to be kept in sync with
@ -668,9 +677,10 @@ SetShadowProperties(Layer* aLayer)
void
CompositorParent::ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
const TargetConfig& aTargetConfig,
bool isFirstPaint)
bool aIsFirstPaint,
bool aScheduleComposite)
{
if (!isFirstPaint &&
if (!aIsFirstPaint &&
!mCompositionManager->IsFirstPaint() &&
mCompositionManager->RequiresReorientation(aTargetConfig.orientation())) {
if (mForceCompositionTask != nullptr) {
@ -685,13 +695,13 @@ CompositorParent::ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
// race condition.
mLayerManager->UpdateRenderBounds(aTargetConfig.clientBounds());
mCompositionManager->Updated(isFirstPaint, aTargetConfig);
mCompositionManager->Updated(aIsFirstPaint, aTargetConfig);
Layer* root = aLayerTree->GetRoot();
mLayerManager->SetRoot(root);
if (mApzcTreeManager) {
AutoResolveRefLayers resolve(mCompositionManager);
mApzcTreeManager->UpdatePanZoomControllerTree(this, root, isFirstPaint, mRootLayerTreeID);
mApzcTreeManager->UpdatePanZoomControllerTree(this, root, aIsFirstPaint, mRootLayerTreeID);
}
if (root) {
@ -700,7 +710,9 @@ CompositorParent::ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
mCompositionManager->TransformShadowTree(mTestTime);
}
}
ScheduleComposition();
if (aScheduleComposite) {
ScheduleComposition();
}
mCompositor->NotifyLayersTransaction();
}
@ -978,6 +990,7 @@ public:
SurfaceDescriptor* aOutSnapshot)
{ return true; }
virtual bool RecvFlushRendering() MOZ_OVERRIDE { return true; }
virtual bool RecvForceComposite() MOZ_OVERRIDE { return true; }
virtual bool RecvNotifyRegionInvalidated(const nsIntRegion& aRegion) { return true; }
virtual bool RecvStartFrameTimeRecording(const int32_t& aBufferSize, uint32_t* aOutStartIndex) MOZ_OVERRIDE { return true; }
virtual bool RecvStopFrameTimeRecording(const uint32_t& aStartIndex, InfallibleTArray<float>* intervals) MOZ_OVERRIDE { return true; }
@ -992,7 +1005,8 @@ public:
virtual void ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
const TargetConfig& aTargetConfig,
bool isFirstPaint) MOZ_OVERRIDE;
bool aIsFirstPaint,
bool aScheduleComposite) MOZ_OVERRIDE;
private:
void DeferredDestroy();
@ -1128,7 +1142,8 @@ void
CrossProcessCompositorParent::ShadowLayersUpdated(
LayerTransactionParent* aLayerTree,
const TargetConfig& aTargetConfig,
bool isFirstPaint)
bool aIsFirstPaint,
bool aScheduleComposite)
{
uint64_t id = aLayerTree->GetId();
MOZ_ASSERT(id != 0);
@ -1138,7 +1153,7 @@ CrossProcessCompositorParent::ShadowLayersUpdated(
}
UpdateIndirectTree(id, shadowRoot, aTargetConfig);
sIndirectLayerTrees[id].mParent->NotifyShadowTreeTransaction(id, isFirstPaint);
sIndirectLayerTrees[id].mParent->NotifyShadowTreeTransaction(id, aIsFirstPaint, aScheduleComposite);
}
void

View File

@ -88,6 +88,7 @@ public:
virtual bool RecvMakeSnapshot(const SurfaceDescriptor& aInSnapshot,
SurfaceDescriptor* aOutSnapshot);
virtual bool RecvFlushRendering() MOZ_OVERRIDE;
virtual bool RecvForceComposite() MOZ_OVERRIDE;
virtual bool RecvNotifyRegionInvalidated(const nsIntRegion& aRegion) MOZ_OVERRIDE;
virtual bool RecvStartFrameTimeRecording(const int32_t& aBufferSize, uint32_t* aOutStartIndex) MOZ_OVERRIDE;
@ -97,7 +98,8 @@ public:
virtual void ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
const TargetConfig& aTargetConfig,
bool isFirstPaint) MOZ_OVERRIDE;
bool aIsFirstPaint,
bool aScheduleComposite) MOZ_OVERRIDE;
/**
* This forces the is-first-paint flag to true. This is intended to
* be called by the widget code when it loses its viewport information
@ -122,7 +124,7 @@ public:
bool ScheduleResumeOnCompositorThread(int width, int height);
virtual void ScheduleComposition();
void NotifyShadowTreeTransaction(uint64_t aId, bool aIsFirstPaint);
void NotifyShadowTreeTransaction(uint64_t aId, bool aIsFirstPaint, bool aScheduleComposite);
/**
* Returns the unique layer tree identifier that corresponds to the root

View File

@ -178,15 +178,17 @@ LayerTransactionParent::Destroy()
bool
LayerTransactionParent::RecvUpdateNoSwap(const InfallibleTArray<Edit>& cset,
const TargetConfig& targetConfig,
const bool& isFirstPaint)
const bool& isFirstPaint,
const bool& scheduleComposite)
{
return RecvUpdate(cset, targetConfig, isFirstPaint, nullptr);
return RecvUpdate(cset, targetConfig, isFirstPaint, scheduleComposite, nullptr);
}
bool
LayerTransactionParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
const TargetConfig& targetConfig,
const bool& isFirstPaint,
const bool& scheduleComposite,
InfallibleTArray<EditReply>* reply)
{
profiler_tracing("Paint", "Composite", TRACING_INTERVAL_START);
@ -450,7 +452,7 @@ LayerTransactionParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
// other's buffer contents.
LayerManagerComposite::PlatformSyncBeforeReplyUpdate();
mShadowLayersManager->ShadowLayersUpdated(this, targetConfig, isFirstPaint);
mShadowLayersManager->ShadowLayersUpdated(this, targetConfig, isFirstPaint, scheduleComposite);
#ifdef COMPOSITOR_PERFORMANCE_WARNING
int compositeTime = (int)(mozilla::TimeStamp::Now() - updateStart).ToMilliseconds();

View File

@ -81,11 +81,13 @@ protected:
virtual bool RecvUpdate(const EditArray& cset,
const TargetConfig& targetConfig,
const bool& isFirstPaint,
const bool& scheduleComposite,
EditReplyArray* reply) MOZ_OVERRIDE;
virtual bool RecvUpdateNoSwap(const EditArray& cset,
const TargetConfig& targetConfig,
const bool& isFirstPaint) MOZ_OVERRIDE;
const bool& isFirstPaint,
const bool& scheduleComposite) MOZ_OVERRIDE;
virtual bool RecvClearCachedResources() MOZ_OVERRIDE;
virtual bool RecvGetOpacity(PLayerParent* aParent,

View File

@ -64,6 +64,9 @@ parent:
// block until they are completed.
sync FlushRendering();
// Schedule a composite if one isn't already scheduled.
async ForceComposite();
sync StartFrameTimeRecording(int32_t bufferSize)
returns (uint32_t startIndex);

View File

@ -72,7 +72,7 @@ parent:
// The isFirstPaint flag can be used to indicate that this is the first update
// for a particular document.
sync Update(Edit[] cset, TargetConfig targetConfig, bool isFirstPaint)
sync Update(Edit[] cset, TargetConfig targetConfig, bool isFirstPaint, bool scheduleComposite)
returns (EditReply[] reply);
sync GetOpacity(PLayer layer) returns (float opacity);
@ -80,7 +80,7 @@ parent:
// We don't need to send a sync transaction if
// no transaction operate require a swap.
async UpdateNoSwap(Edit[] cset, TargetConfig targetConfig, bool isFirstPaint);
async UpdateNoSwap(Edit[] cset, TargetConfig targetConfig, bool isFirstPaint, bool scheduleComposite);
// Drop any front buffers that might be retained on the compositor
// side.

View File

@ -440,7 +440,7 @@ ShadowLayerForwarder::RemoveTexture(TextureClient* aTexture)
}
bool
ShadowLayerForwarder::EndTransaction(InfallibleTArray<EditReply>* aReplies, bool* aSent)
ShadowLayerForwarder::EndTransaction(InfallibleTArray<EditReply>* aReplies, bool aScheduleComposite, bool* aSent)
{
*aSent = false;
@ -546,7 +546,7 @@ ShadowLayerForwarder::EndTransaction(InfallibleTArray<EditReply>* aReplies, bool
RenderTraceScope rendertrace3("Forward Transaction", "000093");
if (!HasShadowManager() ||
!mShadowManager->SendUpdate(cset, targetConfig, mIsFirstPaint,
aReplies)) {
aScheduleComposite, aReplies)) {
MOZ_LAYERS_LOG(("[LayersForwarder] WARNING: sending transaction failed!"));
return false;
}
@ -556,7 +556,7 @@ ShadowLayerForwarder::EndTransaction(InfallibleTArray<EditReply>* aReplies, bool
MOZ_LAYERS_LOG(("[LayersForwarder] sending no swap transaction..."));
RenderTraceScope rendertrace3("Forward NoSwap Transaction", "000093");
if (!HasShadowManager() ||
!mShadowManager->SendUpdateNoSwap(cset, targetConfig, mIsFirstPaint)) {
!mShadowManager->SendUpdateNoSwap(cset, targetConfig, mIsFirstPaint, aScheduleComposite)) {
MOZ_LAYERS_LOG(("[LayersForwarder] WARNING: sending transaction failed!"));
return false;
}

View File

@ -327,7 +327,7 @@ public:
* |aReplies| are directions from the LayerManagerComposite to the
* caller of EndTransaction().
*/
bool EndTransaction(InfallibleTArray<EditReply>* aReplies, bool* aSent);
bool EndTransaction(InfallibleTArray<EditReply>* aReplies, bool aScheduleComposite, bool* aSent);
/**
* Set an actor through which layer updates will be pushed.

View File

@ -18,7 +18,8 @@ class ShadowLayersManager
public:
virtual void ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
const TargetConfig& aTargetConfig,
bool isFirstPaint) = 0;
bool aIsFirstPaint,
bool aScheduleComposite) = 0;
};
} // layers

View File

@ -434,7 +434,7 @@ NewGCThing(ThreadSafeContext *cx, AllocKind kind, size_t thingSize, InitialHeap
JS_OOM_POSSIBLY_FAIL_REPORT(ncx);
#ifdef JS_GC_ZEAL
if (rt->needZealousGC() && allowGC)
if (allowGC && rt->needZealousGC())
js::gc::RunDebugGC(ncx);
#endif

View File

@ -10,6 +10,7 @@
#define jsinfer_h
#include "mozilla/MemoryReporting.h"
#include "mozilla/TypedEnum.h"
#include "jsalloc.h"
#include "jsfriendapi.h"
@ -325,7 +326,7 @@ public:
};
/* Flags and other state stored in TypeSet::flags */
enum {
enum MOZ_ENUM_TYPE(uint32_t) {
TYPE_FLAG_UNDEFINED = 0x1,
TYPE_FLAG_NULL = 0x2,
TYPE_FLAG_BOOLEAN = 0x4,
@ -375,7 +376,7 @@ enum {
typedef uint32_t TypeFlags;
/* Flags and other state stored in TypeObject::flags */
enum {
enum MOZ_ENUM_TYPE(uint32_t) {
/* Whether this type object is associated with some allocation site. */
OBJECT_FLAG_FROM_ALLOCATION_SITE = 0x1,
@ -526,11 +527,13 @@ class TypeSet
flags |= TYPE_FLAG_CONFIGURED_PROPERTY;
}
bool canSetDefinite(unsigned slot) {
return (slot + 1) <= (TYPE_FLAG_DEFINITE_MASK >> TYPE_FLAG_DEFINITE_SHIFT);
// Note: the cast is required to work around an MSVC issue.
return (slot + 1) <= (unsigned(TYPE_FLAG_DEFINITE_MASK) >> TYPE_FLAG_DEFINITE_SHIFT);
}
void setDefinite(unsigned slot) {
JS_ASSERT(canSetDefinite(slot));
flags |= ((slot + 1) << TYPE_FLAG_DEFINITE_SHIFT);
JS_ASSERT(definiteSlot() == slot);
}
/* Whether any values in this set might have the specified type. */

View File

@ -2844,11 +2844,8 @@ ChooseScaleAndSetTransform(FrameLayerBuilder* aLayerBuilder,
bool canDraw2D = transform.CanDraw2D(&transform2d);
gfxSize scale;
bool isRetained = aLayer->Manager()->IsWidgetLayerManager();
// Only fiddle with scale factors for the retaining layer manager, since
// it only matters for retained layers
// XXX Should we do something for 3D transforms?
if (canDraw2D && isRetained) {
if (canDraw2D) {
// If the container's transform is animated off main thread, then use the
// maximum scale.
if (aContainerFrame->GetContent() &&
@ -2910,6 +2907,7 @@ ChooseScaleAndSetTransform(FrameLayerBuilder* aLayerBuilder,
aOutgoingScale.mInActiveTransformedSubtree = true;
}
}
bool isRetained = aLayer->Manager()->IsWidgetLayerManager();
if (isRetained && (!canDraw2D || transform2d.HasNonIntegerTranslation())) {
aOutgoingScale.mDisableSubpixelAntialiasingInDescendants = true;
}

View File

@ -1205,8 +1205,21 @@ void nsDisplayList::PaintForFrame(nsDisplayListBuilder* aBuilder,
layerManager->SetRoot(root);
layerBuilder->WillEndTransaction();
bool temp = aBuilder->SetIsCompositingCheap(layerManager->IsCompositingCheap());
LayerManager::EndTransactionFlags flags = LayerManager::END_DEFAULT;
if (layerManager->NeedsWidgetInvalidation()) {
if (aFlags & PAINT_NO_COMPOSITE) {
flags = LayerManager::END_NO_COMPOSITE;
}
} else {
// Client layer managers never composite directly, so
// we don't need to worry about END_NO_COMPOSITE.
if (aBuilder->WillComputePluginGeometry()) {
flags = LayerManager::END_NO_REMOTE_COMPOSITE;
}
}
layerManager->EndTransaction(FrameLayerBuilder::DrawThebesLayer,
aBuilder, (aFlags & PAINT_NO_COMPOSITE) ? LayerManager::END_NO_COMPOSITE : LayerManager::END_DEFAULT);
aBuilder, flags);
aBuilder->SetIsCompositingCheap(temp);
layerBuilder->DidEndTransaction();

View File

@ -2376,9 +2376,30 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
}
if (builder.WillComputePluginGeometry()) {
nsRefPtr<LayerManager> layerManager;
nsIWidget* widget = aFrame->GetNearestWidget();
if (widget) {
layerManager = widget->GetLayerManager();
}
rootPresContext->ComputePluginGeometryUpdates(aFrame, &builder, &list);
// We're not going to get a WillPaintWindow event here if we didn't do
// widget invalidation, so just apply the plugin geometry update here instead.
// We could instead have the compositor send back an equivalent to WillPaintWindow,
// but it should be close enough to now not to matter.
if (layerManager && !layerManager->NeedsWidgetInvalidation()) {
rootPresContext->ApplyPluginGeometryUpdates();
}
// We told the compositor thread not to composite when it received the transaction because
// we wanted to update plugins first. Schedule the composite now.
if (layerManager) {
layerManager->Composite();
}
}
// Flush the list so we don't trigger the IsEmpty-on-destruction assertion
list.DeleteAll();
return NS_OK;

View File

@ -73,6 +73,7 @@ skip-if = true # Bug 492575
[test_bug423523.html]
[test_bug449781.html]
[test_bug450930.xhtml]
skip-if = true # bug 934301
support-files = bug450930.xhtml
[test_bug465448.xul]
[test_bug469170.html]

View File

@ -780,7 +780,8 @@ RenderFrameParent::ContentViewScaleChanged(nsContentView* aView)
void
RenderFrameParent::ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
const TargetConfig& aTargetConfig,
bool isFirstPaint)
bool aIsFirstPaint,
bool aScheduleComposite)
{
// View map must only contain views that are associated with the current
// shadow layer tree. We must always update the map when shadow layers

View File

@ -78,7 +78,8 @@ public:
virtual void ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
const TargetConfig& aTargetConfig,
bool isFirstPaint) MOZ_OVERRIDE;
bool aIsFirstPaint,
bool aScheduleComposite) MOZ_OVERRIDE;
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsSubDocumentFrame* aFrame,

View File

@ -14,6 +14,7 @@ from .base import BuildBackend
from ..frontend.data import (
ConfigFileSubstitution,
ExampleWebIDLInterface,
HeaderFileSubstitution,
GeneratedEventWebIDLFile,
GeneratedWebIDLFile,
@ -70,6 +71,7 @@ class WebIDLCollection(object):
self.preprocessed_sources = set()
self.test_sources = set()
self.preprocessed_test_sources = set()
self.example_interfaces = set()
def all_regular_sources(self):
return self.sources | self.generated_sources | \
@ -215,6 +217,9 @@ class CommonBackend(BuildBackend):
self._webidls.preprocessed_sources.add(mozpath.join(
obj.srcdir, obj.basename))
elif isinstance(obj, ExampleWebIDLInterface):
self._webidls.example_interfaces.add(obj.name)
else:
return

View File

@ -1135,6 +1135,7 @@ class RecursiveMakeBackend(CommonBackend):
webidls=sorted(all_inputs),
generated_events_stems=sorted(generated_events_stems),
exported_stems=sorted(exported_stems),
example_interfaces=sorted(webidls.example_interfaces),
)
file_lists = mozpath.join(bindings_dir, 'file-lists.json')

View File

@ -289,6 +289,20 @@ class GeneratedWebIDLFile(SandboxDerived):
self.basename = path
class ExampleWebIDLInterface(SandboxDerived):
"""An individual WebIDL interface to generate."""
__slots__ = (
'name',
)
def __init__(self, sandbox, name):
SandboxDerived.__init__(self, sandbox)
self.name = name
class BaseProgram(SandboxDerived):
"""Sandbox container object for programs, which is a unicode string.

View File

@ -24,6 +24,7 @@ from .data import (
GeneratedEventWebIDLFile,
GeneratedInclude,
GeneratedWebIDLFile,
ExampleWebIDLInterface,
HeaderFileSubstitution,
HostProgram,
HostSimpleProgram,
@ -321,6 +322,7 @@ class TreeMetadataEmitter(LoggingMixin):
('PREPROCESSED_WEBIDL_FILES', PreprocessedWebIDLFile),
('TEST_WEBIDL_FILES', TestWebIDLFile),
('WEBIDL_FILES', WebIDLFile),
('WEBIDL_EXAMPLE_INTERFACES', ExampleWebIDLInterface),
]
for sandbox_var, klass in simple_lists:
for name in sandbox.get(sandbox_var, []):

View File

@ -502,6 +502,14 @@ VARIABLES = {
These will be preprocessed before being parsed and converted.
""", 'export'),
'WEBIDL_EXAMPLE_INTERFACES': (StrictOrderingOnAppendList, list,
"""Names of example WebIDL interfaces to build as part of the build.
Names in this list correspond to WebIDL interface names defined in
WebIDL files included in the build from one of the \*WEBIDL_FILES
variables.
""", 'export'),
# Test declaration.
'A11Y_MANIFESTS': (StrictOrderingOnAppendList, list,
"""List of manifest files defining a11y tests.

View File

@ -24,13 +24,11 @@ CertVerifier::CertVerifier(missing_cert_download_config mcdc,
crl_download_config cdc,
ocsp_download_config odc,
ocsp_strict_config osc,
any_revo_fresh_config arfc,
ocsp_get_config ogc)
: mMissingCertDownloadEnabled(mcdc == missing_cert_download_on)
, mCRLDownloadEnabled(cdc == crl_download_allowed)
, mOCSPDownloadEnabled(odc == ocsp_on)
, mOCSPStrict(osc == ocsp_strict)
, mRequireRevocationInfo(arfc == any_revo_strict)
, mOCSPGETEnabled(ogc == ocsp_get_enabled)
{
MOZ_COUNT_CTOR(CertVerifier);
@ -378,12 +376,7 @@ CertVerifier::VerifyCert(CERTCertificate * cert,
rev.leafTests.cert_rev_method_independent_flags =
rev.chainTests.cert_rev_method_independent_flags =
// avoiding the network is good, let's try local first
CERT_REV_MI_TEST_ALL_LOCAL_INFORMATION_FIRST
// is overall revocation requirement strict or relaxed?
| (mRequireRevocationInfo ?
CERT_REV_MI_REQUIRE_SOME_FRESH_INFO_AVAILABLE : CERT_REV_MI_NO_OVERALL_INFO_REQUIREMENT)
;
CERT_REV_MI_TEST_ALL_LOCAL_INFORMATION_FIRST;
// Skip EV parameters
cvin[evParamLocation].type = cert_pi_end;

View File

@ -39,7 +39,6 @@ public:
enum crl_download_config { crl_local_only = 0, crl_download_allowed };
enum ocsp_download_config { ocsp_off = 0, ocsp_on };
enum ocsp_strict_config { ocsp_relaxed = 0, ocsp_strict };
enum any_revo_fresh_config { any_revo_relaxed = 0, any_revo_strict };
enum ocsp_get_config { ocsp_get_disabled = 0, ocsp_get_enabled = 1 };
bool IsOCSPDownloadEnabled() const { return mOCSPDownloadEnabled; }
@ -47,7 +46,6 @@ public:
private:
CertVerifier(missing_cert_download_config ac, crl_download_config cdc,
ocsp_download_config odc, ocsp_strict_config osc,
any_revo_fresh_config arfc,
ocsp_get_config ogc);
~CertVerifier();
@ -55,7 +53,6 @@ private:
const bool mCRLDownloadEnabled;
const bool mOCSPDownloadEnabled;
const bool mOCSPStrict;
const bool mRequireRevocationInfo;
const bool mOCSPGETEnabled;
friend class ::nsNSSComponent;
};

View File

@ -1005,8 +1005,6 @@ void nsNSSComponent::setValidationOptions()
OCSP_ENABLED_DEFAULT);
bool ocspRequired = Preferences::GetBool("security.OCSP.require", false);
bool anyFreshRequired = Preferences::GetBool("security.fresh_revocation_info.require",
false);
bool aiaDownloadEnabled = Preferences::GetBool("security.missing_cert_download.enabled",
false);
@ -1025,7 +1023,7 @@ void nsNSSComponent::setValidationOptions()
: ocspMode_FailureIsNotAVerificationFailure);
int OCSPTimeoutSeconds = 3;
if (ocspRequired || anyFreshRequired) {
if (ocspRequired) {
OCSPTimeoutSeconds = 10;
}
CERT_SetOCSPTimeout(OCSPTimeoutSeconds);
@ -1043,8 +1041,6 @@ void nsNSSComponent::setValidationOptions()
CertVerifier::ocsp_on : CertVerifier::ocsp_off,
ocspRequired ?
CertVerifier::ocsp_strict : CertVerifier::ocsp_relaxed,
anyFreshRequired ?
CertVerifier::any_revo_strict : CertVerifier::any_revo_relaxed,
ocspGetEnabled ?
CertVerifier::ocsp_get_enabled : CertVerifier::ocsp_get_disabled);

View File

@ -59,6 +59,7 @@ skip-if = true
[test_maxforms_3.html]
[test_notifications.html]
[test_notifications_popup.html]
skip-if = os == "linux" # bug 934057
[test_prompt_async.html]
[test_xhr.html]
[test_xml_load.html]