Merge last PGO-green changeset of mozilla-inbound to mozilla-central

This commit is contained in:
Ed Morley 2012-11-21 15:30:23 +00:00
Родитель 6f9e3aa729 7d59e44ea7
Коммит 1e5820e470
83 изменённых файлов: 1453 добавлений и 210 удалений

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

@ -13,7 +13,7 @@ include $(DEPTH)/config/autoconf.mk
MOCHITEST_A11Y_FILES =\
dockids.html \
$(warning test_applicationacc.xul temporarily disabled, see bug 561508) \
$(filter disabled-temporarily--bug-561508, test_applicationacc.xul) \
test_aria_globals.html \
test_aria_grid.html \
test_aria_imgmap.html \

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

@ -55,6 +55,9 @@ var func = null;
* assertion: optional assertion
*/
function identityCall(message) {
if (options._internal) {
message._internal = options._internal;
}
sendAsyncMessage(kIdentityControllerDoMethod, message);
}
@ -78,7 +81,7 @@ function doInternalWatch() {
log("doInternalWatch:", options, isLoaded);
if (options && isLoaded) {
let BrowserID = content.wrappedJSObject.BrowserID;
BrowserID.internal.watch(function(aParams) {
BrowserID.internal.watch(function(aParams, aInternalParams) {
identityCall(aParams);
if (aParams.method === "ready") {
closeIdentityDialog();
@ -86,7 +89,7 @@ function doInternalWatch() {
},
JSON.stringify(options),
function(...things) {
log("internal: ", things);
log("(watch) internal: ", things);
}
);
}
@ -97,9 +100,13 @@ function doInternalRequest() {
if (options && isLoaded) {
content.wrappedJSObject.BrowserID.internal.get(
options.origin,
function(assertion) {
function(assertion, internalParams) {
internalParams = internalParams || {};
if (assertion) {
identityCall({method: 'login', assertion: assertion});
identityCall({
method: 'login',
assertion: assertion,
_internalParams: internalParams});
}
closeIdentityDialog();
},

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

@ -305,7 +305,11 @@ this.SignInToWebsiteController = {
break;
case "login":
IdentityService.doLogin(aRpId, message.assertion);
if (message._internalParams) {
IdentityService.doLogin(aRpId, message.assertion, message._internalParams);
} else {
IdentityService.doLogin(aRpId, message.assertion);
}
break;
case "logout":

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

@ -321,14 +321,6 @@ UpdatePrompt.prototype = {
forceUpdateCheck: function UP_forceUpdateCheck() {
log("Forcing update check");
// If we already have an active update available, don't try to
// download again, just prompt for install.
if (Services.um.activeUpdate) {
this.setUpdateStatus("check-complete");
this.showApplyPrompt(Services.um.activeUpdate);
return;
}
let checker = Cc["@mozilla.org/updates/update-checker;1"]
.createInstance(Ci.nsIUpdateChecker);
checker.checkForUpdates(this._updateCheckListener, true);

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

@ -304,7 +304,7 @@ endif
ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
_BROWSER_FILES += \
browser_private_browsing_window.js \
$(warning browser_save_link-perwindowpb.js disabled until bug 722850) \
$(filter disabled-until-bug-722850, browser_save_link-perwindowpb.js) \
$(NULL)
else
_BROWSER_FILES += \

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

@ -24,13 +24,13 @@ MOCHITEST_BROWSER_FILES = \
browser_library_search.js \
browser_history_sidebar_search.js \
browser_bookmarksProperties.js \
$(warning browser_forgetthissite_single.js temporarily disabled because of very frequent oranges, see bug 551540) \
$(filter disabled-for-very-frequent-oranges--bug-551540, browser_forgetthissite_single.js) \
browser_library_left_pane_commands.js \
browser_drag_bookmarks_on_toolbar.js \
browser_library_middleclick.js \
browser_library_views_liveupdate.js \
browser_views_liveupdate.js \
$(warning browser_sidebarpanels_click.js temporarily disabled cause it breaks the treeview, see bug 658744) \
$(filter temporarily-disabled-for-breaking-the-treeview--bug-658744, browser_sidebarpanels_click.js) \
sidebarpanels_click_test_page.html \
browser_library_infoBox.js \
browser_markPageAsFollowedLink.js \

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

@ -23,15 +23,13 @@ MOCHITEST_BROWSER_FILES = \
browser_privatebrowsing_popupmode.js \
browser_privatebrowsing_searchbar.js \
browser_privatebrowsing_sslsite_transition.js \
$(warning browser_privatebrowsing_transition.js disabled since it no longer makes sense) \
$(filter disabled-since-it-no-longer-makes-sense, browser_privatebrowsing_transition.js) \
$(filter disabled--bug-564934, browser_privatebrowsing_downloadmonitor.js) \
browser_privatebrowsing_urlbarundo.js \
browser_privatebrowsing_viewsource.js \
staller.sjs \
$(NULL)
# Disabled until bug 564934 is fixed:
# browser_privatebrowsing_downloadmonitor.js \
# Turn off private browsing tests that perma-timeout on Linux.
ifneq (Linux,$(OS_ARCH))
MOCHITEST_BROWSER_FILES += \

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

@ -132,14 +132,11 @@ MOCHITEST_BROWSER_FILES = \
browser_739531.js \
browser_739531_sample.html \
browser_739805.js \
$(filter disabled-for-intermittent-failures--bug-766044, browser_459906_empty.html) \
$(filter disabled-for-intermittent-failures--bug-766044, browser_459906_sample.html) \
$(filter disabled-for-intermittent-failures--bug-765389, browser_461743_sample.html) \
$(NULL)
$(warning browser_459906.js is disabled for intermittent failures. Bug 766044)
# browser_459906_empty.html \
# browser_459906_sample.html \
$(warning browser_461743.js is disabled for intermittent failures. Bug 765389)
# browser_461743_sample.html \
# Disabled on Windows for frequent intermittent failures
ifneq ($(OS_ARCH), WINNT)
MOCHITEST_FILES += \
@ -150,8 +147,8 @@ MOCHITEST_FILES += \
browser_464620_xd.html \
$(NULL)
else
$(warning browser_464620_a.js is disabled on Windows for intermittent failures. Bug 552424)
$(warning browser_464620_b.js is disabled on Windows for intermittent failures. Bug 552424)
$(filter disabled-for-intermittent-failures-on-windows--bug-552424, browser_464620_a.js)
$(filter disabled-for-intermittent-failures-on-windows--bug-552424, browser_464620_b.js)
endif
ifneq ($(OS_ARCH),Darwin)

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

@ -68,7 +68,7 @@ MOCHITEST_BROWSER_TESTS = \
browser_dbg_scripts-searching-popup.js \
browser_dbg_pause-resume.js \
browser_dbg_update-editor-mode.js \
$(warning browser_dbg_select-line.js temporarily disabled due to oranges, see bug 726609) \
$(filter temporarily-disabled-due-to-oranges--bug-726609, browser_dbg_select-line.js) \
browser_dbg_clean-exit.js \
browser_dbg_bug723069_editor-breakpoints.js \
browser_dbg_bug723071_editor-breakpoints-pane.js \
@ -88,11 +88,10 @@ MOCHITEST_BROWSER_TESTS = \
browser_dbg_bug737803_editor_actual_location.js \
browser_dbg_progress-listener-bug.js \
browser_dbg_chrome-debugging.js \
$(filter disabled-for-intermittent-failures--bug-753225, browser_dbg_createRemote.js) \
head.js \
$(NULL)
$(warning browser_dbg_createRemote.js is disabled for intermittent failures. Bug 753225)
MOCHITEST_BROWSER_PAGES = \
browser_dbg_tab1.html \
browser_dbg_tab2.html \

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

@ -23,7 +23,7 @@ _BROWSER_TEST_FILES = \
browser_styleeditor_passedinsheet.js \
browser_styleeditor_pretty.js \
browser_styleeditor_readonly.js \
$(warning browser_styleeditor_reopen.js is disabled for intermittent failures. Bug 707891) \
$(filter disabled-for-intermittent-failures--bug-707891, browser_styleeditor_reopen.js) \
browser_styleeditor_sv_keynav.js \
browser_styleeditor_sv_resize.js \
four.html \

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

@ -80,17 +80,17 @@ const TESTS = [
category: "malformed-xml",
matchString: "</html>",
},
{ // #14
{ // #13
file: "test-bug-595934-empty-getelementbyid.html",
category: "DOM",
matchString: "getElementById",
},
{ // #15
{ // #14
file: "test-bug-595934-canvas-css.html",
category: "CSS Parser",
matchString: "foobarCanvasCssParser",
},
{ // #16
{ // #15
file: "test-bug-595934-image.html",
category: "Image",
matchString: "corrupt",

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

@ -107,6 +107,7 @@ NS_CP_ContentTypeName(uint32_t contentType)
CASE_RETURN( TYPE_FONT );
CASE_RETURN( TYPE_MEDIA );
CASE_RETURN( TYPE_WEBSOCKET );
CASE_RETURN( TYPE_CSP_REPORT );
default:
return "<Unknown Type>";
}

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

@ -10,6 +10,11 @@
interface nsIURI;
interface nsIDOMNode;
/**
* The type of nsIContentPolicy::TYPE_*
*/
typedef unsigned long nsContentPolicyType;
/**
* Interface for content policy mechanism. Implementations of this
* interface can be used to control loading of various types of out-of-line
@ -19,42 +24,62 @@ interface nsIDOMNode;
* by launching a dialog to prompt the user for something).
*/
[scriptable,uuid(e590e74f-bac7-4876-8c58-54dde92befb2)]
[scriptable,uuid(e48e3024-f302-4a16-b8b6-2034d3a4b279)]
interface nsIContentPolicy : nsISupports
{
const unsigned long TYPE_OTHER = 1;
/**
* Gecko/Firefox developers: Do not use TYPE_OTHER under any circumstances.
*
* Extension developers: Whenever it is reasonable, use one of the existing
* content types. If none of the existing content types are right for
* something you are doing, file a bug in the Core/DOM component that
* includes a patch that adds your new content type to the end of the list of
* TYPE_* constants here. But, don't start using your new content type until
* your patch has been accepted, because it will be uncertain what exact
* value and name your new content type will have; in that interim period,
* use TYPE_OTHER. In your patch, document your new content type in the style
* of the existing ones. In the bug you file, provide a more detailed
* description of the new type of content you want Gecko to support, so that
* the existing implementations of nsIContentPolicy can be properly modified
* to deal with that new type of content.
*
* Implementations of nsIContentPolicy should treat this the same way they
* treat unknown types, because existing users of TYPE_OTHER may be converted
* to use new content types.
*/
const nsContentPolicyType TYPE_OTHER = 1;
/**
* Indicates an executable script (such as JavaScript).
*/
const unsigned long TYPE_SCRIPT = 2;
const nsContentPolicyType TYPE_SCRIPT = 2;
/**
* Indicates an image (e.g., IMG elements).
*/
const unsigned long TYPE_IMAGE = 3;
const nsContentPolicyType TYPE_IMAGE = 3;
/**
* Indicates a stylesheet (e.g., STYLE elements).
*/
const unsigned long TYPE_STYLESHEET = 4;
const nsContentPolicyType TYPE_STYLESHEET = 4;
/**
* Indicates a generic object (plugin-handled content typically falls under
* this category).
*/
const unsigned long TYPE_OBJECT = 5;
const nsContentPolicyType TYPE_OBJECT = 5;
/**
* Indicates a document at the top-level (i.e., in a browser).
*/
const unsigned long TYPE_DOCUMENT = 6;
const nsContentPolicyType TYPE_DOCUMENT = 6;
/**
* Indicates a document contained within another document (e.g., IFRAMEs,
* FRAMES, and OBJECTs).
*/
const unsigned long TYPE_SUBDOCUMENT = 7;
const nsContentPolicyType TYPE_SUBDOCUMENT = 7;
/**
* Indicates a timed refresh.
@ -66,51 +91,59 @@ interface nsIContentPolicy : nsISupports
* shouldProcess will get this for, e.g., META Refresh elements and HTTP
* Refresh headers.
*/
const unsigned long TYPE_REFRESH = 8;
const nsContentPolicyType TYPE_REFRESH = 8;
/**
* Indicates an XBL binding request, triggered either by -moz-binding CSS
* property or Document.addBinding method.
*/
const unsigned long TYPE_XBL = 9;
const nsContentPolicyType TYPE_XBL = 9;
/**
* Indicates a ping triggered by a click on <A PING="..."> element.
*/
const unsigned long TYPE_PING = 10;
const nsContentPolicyType TYPE_PING = 10;
/**
* Indicates an XMLHttpRequest. Also used for document.load and for EventSource.
*/
const unsigned long TYPE_XMLHTTPREQUEST = 11;
const unsigned long TYPE_DATAREQUEST = 11; // alias
const nsContentPolicyType TYPE_XMLHTTPREQUEST = 11;
const nsContentPolicyType TYPE_DATAREQUEST = 11; // alias
/**
* Indicates a request by a plugin.
*/
const unsigned long TYPE_OBJECT_SUBREQUEST = 12;
const nsContentPolicyType TYPE_OBJECT_SUBREQUEST = 12;
/**
* Indicates a DTD loaded by an XML document.
*/
const unsigned long TYPE_DTD = 13;
const nsContentPolicyType TYPE_DTD = 13;
/**
* Indicates a font loaded via @font-face rule.
*/
const unsigned long TYPE_FONT = 14;
const nsContentPolicyType TYPE_FONT = 14;
/**
* Indicates a video or audio load.
*/
const unsigned long TYPE_MEDIA = 15;
const nsContentPolicyType TYPE_MEDIA = 15;
/**
* Indicates a WebSocket load.
*/
const unsigned long TYPE_WEBSOCKET = 16;
const nsContentPolicyType TYPE_WEBSOCKET = 16;
/* Please update nsContentBlocker when adding new content types. */
/**
* Indicates a Content Security Policy report.
*/
const nsContentPolicyType TYPE_CSP_REPORT = 17;
/* When adding new content types, please update nsContentBlocker,
* NS_CP_ContentTypeName, contentScurityPolicy.js, all nsIContentPolicy
* implementations, and other things that are not listed here that are
* related to nsIContentPolicy. */
//////////////////////////////////////////////////////////////////////
@ -135,7 +168,7 @@ interface nsIContentPolicy : nsISupports
* aRequestOrigin), e.g., if you block an IMAGE because it is served from
* goatse.cx (even if you don't necessarily block other types from that
* server/domain).
*
*
* NOTE that it is not meant to stop future requests for this server--only the
* current request.
*/
@ -213,7 +246,7 @@ interface nsIContentPolicy : nsISupports
* up, content showing up doubled, etc. If you need to do any of the things
* above, do them off timeout or event.
*/
short shouldLoad(in unsigned long aContentType,
short shouldLoad(in nsContentPolicyType aContentType,
in nsIURI aContentLocation,
in nsIURI aRequestOrigin,
in nsISupports aContext,
@ -256,7 +289,7 @@ interface nsIContentPolicy : nsISupports
* involved is in an inconsistent state. See the note on shouldLoad to see
* what this means for implementors of this method.
*/
short shouldProcess(in unsigned long aContentType,
short shouldProcess(in nsContentPolicyType aContentType,
in nsIURI aContentLocation,
in nsIURI aRequestOrigin,
in nsISupports aContext,

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

@ -37,6 +37,8 @@ function ContentSecurityPolicy() {
this._policy._allowEval = true;
this._request = "";
this._requestOrigin = "";
this._requestPrincipal = "";
this._referrer = "";
this._docRequest = null;
CSPdebug("CSP POLICY INITED TO 'default-src *'");
@ -73,6 +75,8 @@ function ContentSecurityPolicy() {
csp._MAPPINGS[cp.TYPE_XMLHTTPREQUEST] = cspr_sd.XHR_SRC;
csp._MAPPINGS[cp.TYPE_WEBSOCKET] = cspr_sd.XHR_SRC;
/* CSP cannot block CSP reports */
csp._MAPPINGS[cp.TYPE_CSP_REPORT] = null;
/* These must go through the catch-all */
csp._MAPPINGS[cp.TYPE_XBL] = cspr_sd.DEFAULT_SRC;
@ -169,6 +173,11 @@ ContentSecurityPolicy.prototype = {
let uri = aChannel.URI.cloneIgnoringRef();
uri.userPass = '';
this._request = uri.asciiSpec;
this._requestOrigin = uri;
//store a reference to the principal, that can later be used in shouldLoad
this._requestPrincipal = Components.classes["@mozilla.org/scriptsecuritymanager;1"].
getService(Components.interfaces.nsIScriptSecurityManager).getChannelPrincipal(aChannel);
if (aChannel.referrer) {
let referrer = aChannel.referrer.cloneIgnoringRef();
@ -202,8 +211,8 @@ ContentSecurityPolicy.prototype = {
// If there is a policy-uri, fetch the policy, then re-call this function.
// (1) parse and create a CSPRep object
// Note that we pass the full URI since when it's parsed as 'self' to construct a
// CSPSource only the scheme, host, and port are kept.
// Note that we pass the full URI since when it's parsed as 'self' to construct a
// CSPSource only the scheme, host, and port are kept.
var newpolicy = CSPRep.fromString(aPolicy,
selfURI,
this._docRequest,
@ -211,7 +220,7 @@ ContentSecurityPolicy.prototype = {
// (2) Intersect the currently installed CSPRep object with the new one
var intersect = this._policy.intersectWith(newpolicy);
// (3) Save the result
this._policy = intersect;
this._isInitialized = true;
@ -325,8 +334,9 @@ ContentSecurityPolicy.prototype = {
try {
var contentPolicy = Cc["@mozilla.org/layout/content-policy;1"]
.getService(Ci.nsIContentPolicy);
if (contentPolicy.shouldLoad(Ci.nsIContentPolicy.TYPE_OTHER,
chan.URI, null, null, null, null)
if (contentPolicy.shouldLoad(Ci.nsIContentPolicy.TYPE_CSP_REPORT,
chan.URI, this._requestOrigin,
null, null, null, this._requestPrincipal)
!= Ci.nsIContentPolicy.ACCEPT) {
continue; // skip unauthorized URIs
}
@ -378,7 +388,7 @@ ContentSecurityPolicy.prototype = {
CSPdebug(" found frame ancestor " + ancestor.asciiSpec);
ancestors.push(ancestor);
}
}
}
// scan the discovered ancestors
let cspContext = CSPRep.SRC_DIRECTIVES.FRAME_ANCESTORS;
@ -406,11 +416,11 @@ ContentSecurityPolicy.prototype = {
* decides whether or not the policy is satisfied.
*/
shouldLoad:
function csp_shouldLoad(aContentType,
aContentLocation,
aRequestOrigin,
aContext,
aMimeTypeGuess,
function csp_shouldLoad(aContentType,
aContentLocation,
aRequestOrigin,
aContext,
aMimeTypeGuess,
aOriginalUri) {
// don't filter chrome stuff
@ -430,15 +440,15 @@ ContentSecurityPolicy.prototype = {
}
// otherwise, honor the translation
// var source = aContentLocation.scheme + "://" + aContentLocation.hostPort;
// var source = aContentLocation.scheme + "://" + aContentLocation.hostPort;
var res = this._policy.permits(aContentLocation, cspContext)
? Ci.nsIContentPolicy.ACCEPT
? Ci.nsIContentPolicy.ACCEPT
: Ci.nsIContentPolicy.REJECT_SERVER;
// frame-ancestors is taken care of early on (as this document is loaded)
// If the result is *NOT* ACCEPT, then send report
if (res != Ci.nsIContentPolicy.ACCEPT) {
if (res != Ci.nsIContentPolicy.ACCEPT) {
CSPdebug("blocking request for " + aContentLocation.asciiSpec);
try {
let directive = this._policy._directives[cspContext];
@ -453,7 +463,7 @@ ContentSecurityPolicy.prototype = {
return (this._reportOnlyMode ? Ci.nsIContentPolicy.ACCEPT : res);
},
shouldProcess:
function csp_shouldProcess(aContentType,
aContentLocation,

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

@ -1763,6 +1763,9 @@ nsObjectLoadingContent::LoadObject(bool aNotify,
rv = mFrameLoader->CheckForRecursiveLoad(mURI);
if (NS_FAILED(rv)) {
LOG(("OBJLC [%p]: Aborting recursive load", this));
mFrameLoader->Destroy();
mFrameLoader = nullptr;
mType = eType_Null;
break;
}

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

@ -37,7 +37,7 @@ MOCHITEST_FILES = test_bug1682.html \
test_bug402680.html \
test_bug403868.html \
test_bug403868.xhtml \
$(warning test_bug435128.html disabled because it takes 60 seconds) \
$(filter disabled-for-timeouts, test_bug435128.html) \
test_bug463104.html \
test_form-parsing.html \
test_viewport.html \

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

@ -49,14 +49,10 @@ public:
// Initialize the audio stream. aNumChannels is the number of audio
// channels (1 for mono, 2 for stereo, etc) and aRate is the sample rate
// (22050Hz, 44100Hz, etc).
// Unsafe to call with a monitor held due to synchronous event execution
// on the main thread, which may attempt to acquire any held monitor.
virtual nsresult Init(int32_t aNumChannels, int32_t aRate,
const dom::AudioChannelType aAudioStreamType) = 0;
// Closes the stream. All future use of the stream is an error.
// Unsafe to call with a monitor held due to synchronous event execution
// on the main thread, which may attempt to acquire any held monitor.
virtual void Shutdown() = 0;
// Write audio data to the audio hardware. aBuf is an array of AudioDataValues
@ -73,8 +69,6 @@ public:
virtual void SetVolume(double aVolume) = 0;
// Block until buffered audio data has been consumed.
// Unsafe to call with a monitor held due to synchronous event execution
// on the main thread, which may attempt to acquire any held monitor.
virtual void Drain() = 0;
// Pause audio playback
@ -96,8 +90,6 @@ public:
// Returns the minimum number of audio frames which must be written before
// you can be sure that something will be played.
// Unsafe to call with a monitor held due to synchronous event execution
// on the main thread, which may attempt to acquire any held monitor.
virtual int32_t GetMinWriteSize() = 0;
int GetRate() { return mRate; }

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

@ -975,34 +975,10 @@ void MediaDecoderStateMachine::AudioLoop()
channels = mInfo.mAudioChannels;
rate = mInfo.mAudioRate;
NS_ASSERTION(audioStartTime != -1, "Should have audio start time by now");
}
// It is unsafe to call some methods of AudioStream with the decoder
// monitor held, as on Android those methods do a synchronous dispatch to
// the main thread. If the audio thread holds the decoder monitor while
// it does a synchronous dispatch to the main thread, we can get deadlocks
// if the main thread tries to acquire the decoder monitor before the
// dispatched event has finished (or even started!) running. Methods which
// are unsafe to call with the decoder monitor held are documented as such
// in AudioStream.h.
nsRefPtr<AudioStream> audioStream = AudioStream::AllocateStream();
// In order to access decoder with the monitor held but avoid the dead lock
// issue explaned above, to hold monitor here only for getting audio channel type.
AudioChannelType audioChannelType;
{
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
audioChannelType = mDecoder->GetAudioChannelType();
}
audioStream->Init(channels, rate, audioChannelType);
mAudioStream = AudioStream::AllocateStream();
mAudioStream->Init(channels, rate, mDecoder->GetAudioChannelType());
{
// We must hold the monitor while setting mAudioStream or whenever we query
// the playback position off the audio thread. This ensures the audio stream
// is always alive when we use it off the audio thread. Note that querying
// the playback position does not do a synchronous dispatch to the main
// thread, so it's safe to call with the decoder monitor held.
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
mAudioStream = audioStream;
volume = mVolume;
mAudioStream->SetVolume(volume);
}
@ -1041,9 +1017,6 @@ void MediaDecoderStateMachine::AudioLoop()
setVolume = volume != mVolume;
volume = mVolume;
// Note audio stream IsPaused() does not do synchronous dispatch to the
// main thread on Android, so can be called safely with the decoder
// monitor held.
if (IsPlaying() && mAudioStream->IsPaused()) {
mAudioStream->Resume();
}
@ -1153,9 +1126,10 @@ void MediaDecoderStateMachine::AudioLoop()
}
LOG(PR_LOG_DEBUG, ("%p Reached audio stream end.", mDecoder.get()));
{
// Must hold lock while anulling the audio stream to prevent
// Must hold lock while shutting down and anulling the audio stream to prevent
// state machine thread trying to use it while we're destroying it.
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
mAudioStream->Shutdown();
mAudioStream = nullptr;
mEventManager.Clear();
if (!mAudioCaptured) {
@ -1166,11 +1140,6 @@ void MediaDecoderStateMachine::AudioLoop()
}
}
// Must not hold the decoder monitor while we shutdown the audio stream, as
// it makes a synchronous dispatch on Android.
audioStream->Shutdown();
audioStream = nullptr;
LOG(PR_LOG_DEBUG, ("%p Audio stream finished playing, audio thread exit", mDecoder.get()));
}
@ -2182,19 +2151,16 @@ int64_t
MediaDecoderStateMachine::GetAudioClock()
{
NS_ASSERTION(OnStateMachineThread(), "Should be on state machine thread.");
mDecoder->GetReentrantMonitor().AssertCurrentThreadIn();
if (!HasAudio() || mAudioCaptured)
return -1;
// We must hold the decoder monitor while using the audio stream off the
// audio thread to ensure that it doesn't get destroyed on the audio thread
// while we're using it.
mDecoder->GetReentrantMonitor().AssertCurrentThreadIn();
if (!HasAudio() || mAudioCaptured)
return -1;
if (!mAudioStream) {
// Audio thread hasn't played any data yet.
return mAudioStartTime;
}
// Note that querying the playback position does not do a synchronous
// dispatch to the main thread on Android, so it's safe to call with
// the decoder monitor held here.
int64_t t = mAudioStream->GetPosition();
return (t == -1) ? -1 : t + mAudioStartTime;
}

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

@ -833,6 +833,7 @@ MediaStreamGraphImpl::UpdateCurrentTime()
if (stream->mFinished && !stream->mNotifiedFinished &&
stream->mBufferStartTime + stream->GetBufferEnd() <= nextCurrentTime) {
stream->mNotifiedFinished = true;
stream->mLastPlayedVideoFrame.SetNull();
for (uint32_t j = 0; j < stream->mListeners.Length(); ++j) {
MediaStreamListener* l = stream->mListeners[j];
l->NotifyFinished(this);
@ -1296,7 +1297,9 @@ MediaStreamGraphImpl::PlayVideo(MediaStream* aStream)
NS_NewRunnableMethod(output, &VideoFrameContainer::Invalidate);
NS_DispatchToMainThread(event, NS_DISPATCH_NORMAL);
}
aStream->mLastPlayedVideoFrame = *frame;
if (!aStream->mNotifiedFinished) {
aStream->mLastPlayedVideoFrame = *frame;
}
}
void

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

@ -130,10 +130,9 @@ MOCHITEST_FILES = \
test_media_sniffer.html \
contentType.sjs \
test_streams_srcObject.html \
$(filter disabled-for-intermittent-failures--bug-608634, test_error_in_video_document.html) \
$(NULL)
$(warning test_error_in_video_document.html is disabled for intermittent failures. Bug 608634)
# Disabled on Windows for frequent intermittent failures
ifneq ($(OS_ARCH), WINNT)
MOCHITEST_FILES += \
@ -143,15 +142,16 @@ MOCHITEST_FILES += \
test_timeupdate_small_files.html \
$(NULL)
else
$(warning test_streams_element_capture{,_reset}.html is disabled on Windows for timeouts. Bug 752796)
$(warning test_timeupdate_small_files.html is disabled on Windows for timeouts. Bug 786539)
$(filter disabled-on-windows-for-timeouts--bug-752796, test_streams_element_capture.html)
$(filter disabled-on-windows-for-timeouts--bug-752796, test_streams_element_capture_reset.html)
$(filter disabled-on-windows-for-timeouts--bug-786539, test_timeupdate_small_files.html)
endif
# Don't run in suite
ifndef MOZ_SUITE
MOCHITEST_FILES += test_play_twice.html
else
$(warning test_play_twice.html is disabled pending investigation. Bug 598252)
$(filter disabled-pending-investigation--bug-598252, test_play_twice.html)
endif
# These tests are disabled until we figure out random failures.

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

@ -43,7 +43,7 @@ MOCHITEST_FILES = \
test_getSubStringLength.xhtml \
getSubStringLength-helper.svg \
test_isSupported.xhtml \
$(warning test_lang.xhtml is disabled for intermittent failures. Bug 701060) \
$(filter disabled-for-intermittent-failures--bug-701060, test_lang.xhtml) \
test_nonAnimStrings.xhtml \
test_pathAnimInterpolation.xhtml \
test_pathSeg.xhtml \

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

@ -1772,7 +1772,10 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument,
nsContentUtils::AddScriptRunner(
NS_NewRunnableMethod(this, &nsGlobalWindow::ClearStatus));
bool reUseInnerWindow = aForceReuseInnerWindow || wouldReuseInnerWindow;
// Sometimes, WouldReuseInnerWindow() returns true even if there's no inner
// window (see bug 776497). Be safe.
bool reUseInnerWindow = (aForceReuseInnerWindow || wouldReuseInnerWindow) &&
GetCurrentInnerWindowInternal();
nsresult rv = NS_OK;

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

@ -99,14 +99,19 @@ function RPWatchContext(aOptions, aTargetMM) {
// default for no loggedInUser is undefined, not null
this.loggedInUser = aOptions.loggedInUser;
// Maybe internal
this._internal = aOptions._internal;
this._mm = aTargetMM;
}
RPWatchContext.prototype = {
doLogin: function RPWatchContext_onlogin(aAssertion) {
doLogin: function RPWatchContext_onlogin(aAssertion, aMaybeInternalParams) {
log("doLogin: " + this.id);
let message = new IDDOMMessage({id: this.id});
message.assertion = aAssertion;
let message = new IDDOMMessage({id: this.id, assertion: aAssertion});
if (aMaybeInternalParams) {
message._internalParams = aMaybeInternalParams;
}
this._mm.sendAsyncMessage("Identity:RP:Watch:OnLogin", message);
},

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

@ -32,6 +32,8 @@ nsDOMIdentity.prototype = {
watch: 'r',
request: 'r',
logout: 'r',
get: 'r',
getVerifiedEmail: 'r',
// Provisioning
beginProvisioning: 'r',
@ -51,7 +53,6 @@ nsDOMIdentity.prototype = {
*/
watch: function nsDOMIdentity_watch(aOptions) {
this._log("watch");
if (this._rpWatcher) {
throw new Error("navigator.id.watch was already called");
}
@ -110,8 +111,11 @@ nsDOMIdentity.prototype = {
let util = this._window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils);
// Do not allow call of request() outside of a user input handler.
if (!util.isHandlingUserInput) {
// The only time we permit calling of request() outside of a user
// input handler is when we are handling the (deprecated) get() or
// getVerifiedEmail() calls, which make use of an RP context
// marked as _internal.
if (!util.isHandlingUserInput && !aOptions._internal) {
return;
}
@ -166,6 +170,70 @@ nsDOMIdentity.prototype = {
this._identityInternal._mm.sendAsyncMessage("Identity:RP:Logout", message);
},
/*
* Get an assertion. This function is deprecated. RPs are
* encouraged to use the observer API instead (watch + request).
*/
get: function nsDOMIdentity_get(aCallback, aOptions) {
var opts = {};
aOptions = aOptions || {};
// We use the observer API (watch + request) to implement get().
// Because the caller can call get() and getVerifiedEmail() as
// many times as they want, we lift the restriction that watch() can
// only be called once.
this._rpWatcher = null;
// This flag tells internal_api.js (in the shim) to record in the
// login parameters whether the assertion was acquired silently or
// with user interaction.
opts._internal = true;
opts.privacyPolicy = aOptions.privacyPolicy || undefined;
opts.termsOfService = aOptions.termsOfService || undefined;
opts.privacyURL = aOptions.privacyURL || undefined;
opts.tosURL = aOptions.tosURL || undefined;
opts.siteName = aOptions.siteName || undefined;
opts.siteLogo = aOptions.siteLogo || undefined;
if (checkDeprecated(aOptions, "silent")) {
// Silent has been deprecated, do nothing. Placing the check here
// prevents the callback from being called twice, once with null and
// once after internalWatch has been called. See issue #1532:
// https://github.com/mozilla/browserid/issues/1532
if (aCallback) {
setTimeout(function() { aCallback(null); }, 0);
}
return;
}
// Get an assertion by using our observer api: watch + request.
var self = this;
this.watch({
oncancel: function get_oncancel() {
if (aCallback) {
aCallback(null);
aCallback = null;
}
},
onlogin: function get_onlogin(assertion, internalParams) {
if (assertion && aCallback && internalParams && !internalParams.silent) {
aCallback(assertion);
aCallback = null;
}
},
onlogout: function get_onlogout() {},
onready: function get_onready() {
self.request(opts);
}
});
},
getVerifiedEmail: function nsDOMIdentity_getVerifiedEmail(aCallback) {
Cu.reportError("WARNING: getVerifiedEmail has been deprecated");
this.get(aCallback, {});
},
/**
* Identity Provider (IDP) Provisioning APIs
*/
@ -324,16 +392,22 @@ nsDOMIdentity.prototype = {
case "Identity:RP:Watch:OnLogin":
// Do we have a watcher?
if (!this._rpWatcher) {
dump("WARNING: Received OnLogin message, but there is no RP watcher\n");
return;
}
if (this._rpWatcher.onlogin) {
this._rpWatcher.onlogin(msg.assertion);
if (this._rpWatcher._internal) {
this._rpWatcher.onlogin(msg.assertion, msg._internalParams);
} else {
this._rpWatcher.onlogin(msg.assertion);
}
}
break;
case "Identity:RP:Watch:OnLogout":
// Do we have a watcher?
if (!this._rpWatcher) {
dump("WARNING: Received OnLogout message, but there is no RP watcher\n");
return;
}
@ -344,6 +418,7 @@ nsDOMIdentity.prototype = {
case "Identity:RP:Watch:OnReady":
// Do we have a watcher?
if (!this._rpWatcher) {
dump("WARNING: Received OnReady message, but there is no RP watcher\n");
return;
}
@ -354,6 +429,7 @@ nsDOMIdentity.prototype = {
case "Identity:RP:Request:OnCancel":
// Do we have a watcher?
if (!this._rpWatcher) {
dump("WARNING: Received OnCancel message, but there is no RP watcher\n");
return;
}
@ -432,7 +508,6 @@ nsDOMIdentity.prototype = {
// window origin
message.origin = this._origin;
dump("nsDOM message: " + JSON.stringify(message) + "\n");
return message;
},

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

@ -122,7 +122,7 @@ endif
ifdef MOZ_CRASHREPORTER
MOCHITEST_FILES += \
test_crashing.html \
$(warning test_crashing2.html disabled due to random orange; see bug 566049) \
$(filter disabled-for-random-orange--bug-566049, test_crashing2.html) \
test_hanging.html \
$(NULL)

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

@ -1337,7 +1337,7 @@ nsGeolocation::ClearWatch(int32_t aWatchId)
for (uint32_t i = 0, length = mWatchingCallbacks.Length(); i < length; ++i) {
if (mWatchingCallbacks[i]->WatchId() == aWatchId) {
mWatchingCallbacks[aWatchId]->MarkCleared();
mWatchingCallbacks[i]->MarkCleared();
break;
}
}

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

@ -143,7 +143,7 @@ MOCHITEST_FILES += \
test_resize_move_windows.html \
$(NULL)
else
$(warning test_resize_move_windows.html is disabled on Linux for timeouts. Bug 677841)
$(filter disabled-on-linux-for-timeouts--bug-677841, test_resize_move_windows.html)
endif
include $(topsrcdir)/config/rules.mk

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

@ -67,7 +67,7 @@ MOCHITEST_CHROME_FILES += \
test_MozEnteredDomFullscreen_event.xul \
$(NULL)
else
$(warning test_MozEnteredDomFullscreen_event.xul is disabled on OS X for intermittent failures. Bug 798848)
$(filter disabled-on-os-x-for-intermittent-failures--bug-798848, test_MozEnteredDomFullscreen_event.xul)
endif
include $(topsrcdir)/config/rules.mk

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

@ -38,7 +38,7 @@ MOCHITEST_FILES += \
test_pointerlock-api.html \
$(NULL)
else
$(warning test_pointerlock-api.html is disabled on Linux for intermittent failures. Bug 788164)
$(filter disabled-on-linux-for-intermittent-failures--bug-788164, test_pointerlock-api.html)
endif
include $(topsrcdir)/config/rules.mk

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

@ -47,13 +47,11 @@ MOCHITEST_FILES = \
test_postMessage_structured_clone.html \
postMessage_structured_clone_helper.js \
postMessage_structured_clone_helper.html \
$(filter disabled-for-intermittent-failures--bug-696306, test_bug500328.html) \
$(filter disabled-for-intermittent-failures--bug-696306, file_bug500328_1.html) \
$(filter disabled-for-intermittent-failures--bug-696306, file_bug500328_2.html) \
$(NULL)
$(warning test_bug500328.html is disabled for intermittent failures. Bug 696306)
# test_bug500328.html \
# file_bug500328_1.html \
# file_bug500328_2.html \
MOCHITEST_CHROME_FILES = \
test_postMessage_chrome.html \
$(NULL)

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

@ -36,7 +36,8 @@ static const char *kTypeString[] = {"other",
"dtd",
"font",
"media",
"websocket"};
"websocket"
"csp_report"};
#define NUMBER_OF_TYPES NS_ARRAY_LENGTH(kTypeString)
uint8_t nsContentBlocker::mBehaviorPref[NUMBER_OF_TYPES];

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

@ -2606,7 +2606,8 @@ GLContextProviderEGL::GetGlobalContext(const ContextFlags)
{
// Don't want a global context on Android as 1) share groups across 2 threads fail on many Tegra drivers (bug 759225)
// and 2) some mobile devices have a very strict limit on global number of GL contexts (bug 754257)
#ifdef MOZ_ANDROID_OMTC
// and 3) each EGL context eats 750k on B2G (bug 813783)
#ifdef ANDROID
return nullptr;
#endif

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

@ -7,6 +7,7 @@
#include "Layers.h"
#include "ImageLayers.h"
#include "gfxUtils.h"
#include "nsDataHashtable.h"
namespace mozilla {
namespace layers {
@ -203,27 +204,61 @@ struct ContainerLayerProperties : public LayerPropertiesBase
ContainerLayer* container = mLayer->AsContainerLayer();
nsIntRegion result;
uint32_t i = 0;
// A low frame rate is especially visible to users when scrolling, so we
// particularly want to avoid unnecessary invalidation at that time. For us
// here, that means avoiding unnecessary invalidation of child items when
// other children are added to or removed from our container layer, since
// that may be caused by children being scrolled in or out of view. We are
// less concerned with children changing order.
// TODO: Consider how we could avoid unnecessary invalidation when children
// change order, and whether the overhead would be worth it.
nsDataHashtable<nsPtrHashKey<Layer>, uint32_t> oldIndexMap;
oldIndexMap.Init(mChildren.Length());
for (uint32_t i = 0; i < mChildren.Length(); ++i) {
oldIndexMap.Put(mChildren[i]->mLayer, i);
}
uint32_t i = 0; // cursor into the old child list mChildren
for (Layer* child = container->GetFirstChild(); child; child = child->GetNextSibling()) {
if (i >= mChildren.Length() || child != mChildren[i]->mLayer) {
// Child change. Invalidate the full areas.
// TODO: We could be smarter here if non-overlapping children
// swap order.
AddTransformedRegion(result, child->GetVisibleRegion(), child->GetTransform());
if (i < mChildren.Length()) {
AddRegion(result, mChildren[i]->OldTransformedBounds());
bool invalidateChildsCurrentArea = false;
if (i < mChildren.Length()) {
uint32_t childsOldIndex;
if (oldIndexMap.Get(child, &childsOldIndex)) {
if (childsOldIndex >= i) {
// Invalidate the old areas of layers that used to be between the
// current |child| and the previous |child| that was also in the
// old list mChildren (if any of those children have been reordered
// rather than removed, we will invalidate their new area when we
// encounter them in the new list):
for (uint32_t j = i; j < childsOldIndex; ++j) {
AddRegion(result, mChildren[j]->OldTransformedBounds());
}
// Invalidate any regions of the child that have changed:
AddRegion(result, mChildren[childsOldIndex]->ComputeChange(aCallback));
i = childsOldIndex + 1;
} else {
// We've already seen this child in mChildren (which means it must
// have been reordered) and invalidated its old area. We need to
// invalidate its new area too:
invalidateChildsCurrentArea = true;
}
} else {
// |child| is new
invalidateChildsCurrentArea = true;
}
} else {
// |child| is new, or was reordered to a higher index
invalidateChildsCurrentArea = true;
}
if (invalidateChildsCurrentArea) {
AddTransformedRegion(result, child->GetVisibleRegion(), child->GetTransform());
if (aCallback) {
NotifySubdocumentInvalidationRecursive(child, aCallback);
} else {
ClearInvalidations(child);
}
} else {
// Same child, check for differences within the child
AddRegion(result, mChildren[i]->ComputeChange(aCallback));
}
i++;
}
// Process remaining removed children.
@ -239,6 +274,7 @@ struct ContainerLayerProperties : public LayerPropertiesBase
return TransformRegion(result, mLayer->GetTransform());
}
// The old list of children:
nsAutoTArray<nsAutoPtr<LayerPropertiesBase>,1> mChildren;
};

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

@ -59,6 +59,7 @@ InitRndisAddress()
property_get("ro.serialno", serialno, "1234567890ABCDEF");
memset(address, 0, sizeof(address));
// First byte is 0x02 to signify a locally administered address.
address[0] = 0x02;
length = strlen(serialno);

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

@ -53,7 +53,8 @@ The general format in EBNF is:
item ::= flag | attribute
flag ::= "slow" | "allow-oom" | "valgrind" | "tz-pacific" |
"mjitalways" | "debug" |
"mjit" | "mjitalways" | "ion-eager" | "debug" |
"dump-bytecode" |
attribute ::= name ":" value
@ -69,7 +70,9 @@ The meaning of the items:
allow-oom If the test runs out of memory, it counts as passing.
valgrind Run test under valgrind.
tz-pacific Always run test with the Pacific time zone (TZ=PST8PDT).
mjit Run js with -m, whether --jitflags says to or not
mjitalways Run js with -a, whether --jitflags says to or not
ion-eager Run js with --ion-eager, whether --jitflags says to or not
debug Run js with -d, whether --jitflags says to or not
dump-bytecode Run js with -D, whether --jitflags says to or not

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

@ -49,7 +49,7 @@ os.path.relpath = _relpath
class Test:
def __init__(self, path):
self.path = path # path to test file
self.jitflags = [] # jit flags to enable
self.slow = False # True means the test is slow-running
self.allow_oom = False # True means that OOM is not considered a failure
@ -204,7 +204,7 @@ def run_cmd(cmdline, env, timeout):
def run_cmd_avoid_stdio(cmdline, env, timeout):
stdoutPath, stderrPath = tmppath('jsstdout'), tmppath('jsstderr')
env['JS_STDOUT'] = stdoutPath
env['JS_STDERR'] = stderrPath
env['JS_STDERR'] = stderrPath
_, __, code = run_timeout_cmd(cmdline, { 'env': env }, timeout)
return read_and_unlink(stdoutPath), read_and_unlink(stderrPath), code
@ -362,7 +362,7 @@ def run_tests(tests, test_dir, lib_dir, shell_args):
return True
def parse_jitflags():
jitflags = [ [ '-' + flag for flag in flags ]
jitflags = [ [ '-' + flag for flag in flags ]
for flags in OPTIONS.jitflags.split(',') ]
for flags in jitflags:
for flag in flags:
@ -402,7 +402,7 @@ def main(argv):
op = OptionParser(usage='%prog [options] JS_SHELL [TESTS]')
op.add_option('-s', '--show-cmd', dest='show_cmd', action='store_true',
help='show js shell command run')
op.add_option('-f', '--show-failed-cmd', dest='show_failed',
op.add_option('-f', '--show-failed-cmd', dest='show_failed',
action='store_true', help='show command lines of failed tests')
op.add_option('-o', '--show-output', dest='show_output', action='store_true',
help='show output from js shell')
@ -430,8 +430,9 @@ def main(argv):
help='Enable the |valgrind| flag, if valgrind is in $PATH.')
op.add_option('--valgrind-all', dest='valgrind_all', action='store_true',
help='Run all tests with valgrind, if valgrind is in $PATH.')
op.add_option('--jitflags', dest='jitflags', default='m,mn',
help='Example: --jitflags=m,mn to run each test with -m, -m -n [default=%default]')
op.add_option('--jitflags', dest='jitflags', default='',
help='Example: --jitflags=m,mn to run each test with "-m" and "-m -n" [default="%default"]. ' +
'Long flags, such as "--no-jm", should be set using --args.')
op.add_option('--avoid-stdio', dest='avoid_stdio', action='store_true',
help='Use js-shell file indirection instead of piping stdio.')
op.add_option('--write-failure-output', dest='write_failure_output', action='store_true',

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

@ -1906,7 +1906,7 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
int32_t
nsLayoutUtils::GetZIndex(nsIFrame* aFrame) {
if (!aFrame->IsPositioned())
if (!aFrame->IsPositioned() && !aFrame->IsFlexItem())
return 0;
const nsStylePosition* position =

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

@ -37,7 +37,7 @@ MOCHITEST_FILES = \
test_bug93077-5.html \
test_bug93077-6.html \
test_bug114649.html \
$(warning test_bug369950.html disabled due to random orange; see bug 492575) \
$(filter disabled-for-random-orange--bug-492575, test_bug369950.html) \
test_bug386575.xhtml \
test_bug388019.html \
test_bug394057.html \
@ -348,7 +348,7 @@ endif
ifeq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
# THESE TESTS (BELOW) DO NOT RUN ON MAC
MOCHITEST_FILES += \
$(warning test_flush_on_paint.html disabled due to random orange; see bug 539356) \
$(filter disabled-for-random-orange--bug-539356, test_flush_on_paint.html) \
$(NULL)
# THESE TESTS (ABOVE) DO NOT RUN ON MAC
endif

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

@ -954,6 +954,24 @@ nsFlexContainerFrame::GetFrameName(nsAString& aResult) const
}
#endif // DEBUG
// Helper for BuildDisplayList, to implement this special-case for flex items
// from the spec:
// Flex items paint exactly the same as block-level elements in the
// normal flow, except that 'z-index' values other than 'auto' create
// a stacking context even if 'position' is 'static'.
// http://www.w3.org/TR/2012/CR-css3-flexbox-20120918/#painting
uint32_t
GetDisplayFlagsForFlexItem(nsIFrame* aFrame)
{
MOZ_ASSERT(aFrame->IsFlexItem(), "Should only be called on flex items");
const nsStylePosition* pos = aFrame->GetStylePosition();
if (pos->mZIndex.GetUnit() == eStyleUnit_Integer) {
return nsIFrame::DISPLAY_CHILD_FORCE_STACKING_CONTEXT;
}
return 0;
}
NS_IMETHODIMP
nsFlexContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
@ -963,7 +981,8 @@ nsFlexContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
NS_ENSURE_SUCCESS(rv, rv);
for (nsFrameList::Enumerator e(mFrames); !e.AtEnd(); e.Next()) {
rv = BuildDisplayListForChild(aBuilder, e.get(), aDirtyRect, aLists);
rv = BuildDisplayListForChild(aBuilder, e.get(), aDirtyRect, aLists,
GetDisplayFlagsForFlexItem(e.get()));
NS_ENSURE_SUCCESS(rv, rv);
}

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

@ -43,7 +43,7 @@ MOCHITEST_FILES = \
test_bug405178.html \
test_bug416168.html \
test_bug421436.html \
$(warning test_bug421839-1.html disabled because it calls finish twice which can cause timeouts) \
$(filter disabled-for-calling-finish-twice-which-can-cause-timeouts, test_bug421839-1.html) \
test_bug421839-2.html \
bug421839-2-page.html \
test_bug424627.html \
@ -52,10 +52,10 @@ MOCHITEST_FILES = \
test_bug460532.html \
test_bug468167.html \
test_bug470212.html \
$(warning test_bug488417.html temporarily disabled - see bug 489560) \
$(filter disabled-temporarily--bug-489560, test_bug488417.html) \
test_bug496275.html \
test_bug503813.html \
$(warning test_bug507902.html temporarily disabled - see bug 510001) \
$(filter disabled-temporarily--bug-510001, test_bug507902.html) \
test_bug514732.html \
test_bug527306.html \
test_bug579767.html \

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

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!-- Reference case, with floated elements in place of flex items, and using
"position: relative" on those elements, to make z-index work on them
outside of a flex container. -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
.flexbox {
width: -moz-max-content;
height: 10px;
border: 2px solid gray;
margin-bottom: 10px;
}
.a {
width: 10px;
height: 10px;
background: lightblue;
min-width: 0;
float: left;
}
.b {
width: 10px;
height: 10px;
background: pink;
min-width: 0;
margin-right: 10px;
float: left;
}
.aKid {
margin-left: 3px;
margin-top: 3px;
width: 10px;
height: 10px;
background: steelblue;
border: 1px solid blue;
}
.bKid {
margin-left: 3px;
margin-top: 6px;
width: 10px;
height: 10px;
background: violet;
border: 1px solid purple;
}
.z0, .z1, .zn1 { position: relative; }
.z0 { z-index: 0; }
.z1 { z-index: 1; }
.zn1 { z-index: -1; }
</style>
</head>
<body>
<!-- No "z-index" -->
<div class="flexbox">
<div class="a"><div class="aKid"/></div>
<div class="b"><div class="bKid"/></div>
</div>
<!-- Various "z-index" just on the first item -->
<div class="flexbox">
<div class="a zn1"><div class="aKid"/></div>
<div class="b"><div class="bKid"/></div>
<div class="a z0"><div class="aKid"/></div>
<div class="b"><div class="bKid"/></div>
<div class="a z1"><div class="aKid"/></div>
<div class="b"><div class="bKid"/></div>
</div>
<!-- Various "z-index" just on the second item -->
<div class="flexbox">
<div class="a"><div class="aKid"/></div>
<div class="b zn1"><div class="bKid"/></div>
<div class="a"><div class="aKid"/></div>
<div class="b z0"><div class="bKid"/></div>
<div class="a"><div class="aKid"/></div>
<div class="b z1"><div class="bKid"/></div>
</div>
<!-- Various "z-index" on the first item, w/ "z-index:0" on second item -->
<div class="flexbox">
<div class="a zn1"><div class="aKid"/></div>
<div class="b z0"><div class="bKid"/></div>
<div class="a z0"><div class="aKid"/></div>
<div class="b z0"><div class="bKid"/></div>
<div class="a z1"><div class="aKid"/></div>
<div class="b z0"><div class="bKid"/></div>
</div>
<!-- Various "z-index" on the second item, w/ "z-index:0" on first item -->
<div class="flexbox">
<div class="a z0"><div class="aKid"/></div>
<div class="b zn1"><div class="bKid"/></div>
<div class="a z0"><div class="aKid"/></div>
<div class="b z0"><div class="bKid"/></div>
<div class="a z0"><div class="aKid"/></div>
<div class="b z1"><div class="bKid"/></div>
</div>
</body>
</html>

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

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!-- Testcase with flex items containing overlapping content, with
"z-index" set on some of them, which should make them create
stacking contexts. -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
.flexbox {
width: -moz-max-content;
height: 10px;
border: 2px solid gray;
display: flex;
margin-bottom: 10px;
}
.a {
width: 10px;
height: 10px;
background: lightblue;
min-width: 0;
}
.b {
width: 10px;
height: 10px;
background: pink;
min-width: 0;
margin-right: 10px;
}
.aKid {
margin-left: 3px;
margin-top: 3px;
width: 10px;
height: 10px;
background: steelblue;
border: 1px solid blue;
}
.bKid {
margin-left: 3px;
margin-top: 6px;
width: 10px;
height: 10px;
background: violet;
border: 1px solid purple;
}
.z0 { z-index: 0; }
.z1 { z-index: 1; }
.zn1 { z-index: -1; }
</style>
</head>
<body>
<!-- No "z-index" -->
<div class="flexbox">
<div class="a"><div class="aKid"/></div>
<div class="b"><div class="bKid"/></div>
</div>
<!-- Various "z-index" just on the first item -->
<div class="flexbox">
<div class="a zn1"><div class="aKid"/></div>
<div class="b"><div class="bKid"/></div>
<div class="a z0"><div class="aKid"/></div>
<div class="b"><div class="bKid"/></div>
<div class="a z1"><div class="aKid"/></div>
<div class="b"><div class="bKid"/></div>
</div>
<!-- Various "z-index" just on the second item -->
<div class="flexbox">
<div class="a"><div class="aKid"/></div>
<div class="b zn1"><div class="bKid"/></div>
<div class="a"><div class="aKid"/></div>
<div class="b z0"><div class="bKid"/></div>
<div class="a"><div class="aKid"/></div>
<div class="b z1"><div class="bKid"/></div>
</div>
<!-- Various "z-index" on the first item, w/ "z-index:0" on second item -->
<div class="flexbox">
<div class="a zn1"><div class="aKid"/></div>
<div class="b z0"><div class="bKid"/></div>
<div class="a z0"><div class="aKid"/></div>
<div class="b z0"><div class="bKid"/></div>
<div class="a z1"><div class="aKid"/></div>
<div class="b z0"><div class="bKid"/></div>
</div>
<!-- Various "z-index" on the second item, w/ "z-index:0" on first item -->
<div class="flexbox">
<div class="a z0"><div class="aKid"/></div>
<div class="b zn1"><div class="bKid"/></div>
<div class="a z0"><div class="aKid"/></div>
<div class="b z0"><div class="bKid"/></div>
<div class="a z0"><div class="aKid"/></div>
<div class="b z1"><div class="bKid"/></div>
</div>
</body>
</html>

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

@ -93,6 +93,9 @@ pref(layout.css.flexbox.enabled,true) == flexbox-float-1d.xhtml flexbox-float-1
test-pref(layout.css.flexbox.enabled,true) == flexbox-float-2a.xhtml flexbox-float-2-ref.xhtml
test-pref(layout.css.flexbox.enabled,true) == flexbox-float-2b.xhtml flexbox-float-2-ref.xhtml
# Tests for flex items as stacking contexts
test-pref(layout.css.flexbox.enabled,true) == flexbox-items-as-stacking-contexts-1.xhtml flexbox-items-as-stacking-contexts-1-ref.xhtml
# Tests for (default) "min-width: auto" / "min-height: auto" in flex containers
test-pref(layout.css.flexbox.enabled,true) == flexbox-minSize-horiz-1.xhtml flexbox-minSize-horiz-1-ref.xhtml
test-pref(layout.css.flexbox.enabled,true) == flexbox-minSize-vert-1.xhtml flexbox-minSize-vert-1-ref.xhtml

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

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#a {
height: 20px;
background-color: green;
margin-bottom: 20px;
}
#b {
height: 20px;
background-color: blue;
}
</style>
</head>
<body>
<div id="a"></div>
<div id="b"></div>
</body>
</html>

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

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#a {
height: 20px;
background-color: green;
}
#margin {
height: 20px;
}
#b {
height: 20px;
background-color: blue;
}
</style>
</head>
<body>
<div id="a"></div>
<div id="margin"></div>
<div id="b"></div>
</body>
</html>

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

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style type="text/css">
#a {
height: 20px;
background-color: green;
margin-bottom: 20px;
}
#b {
display: none;
height: 20px;
background-color: blue;
margin-top: -20px;
}
</style>
<script type="text/javascript">
function test() {
document.getElementById('b').style.display = 'block';
document.documentElement.removeAttribute('class');
}
document.addEventListener('MozReftestInvalidate', test, false);
</script>
</head>
<body>
<div id="a"></div>
<div id="b"></div>
</body>
</html>

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

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style type="text/css">
#a {
height: 20px;
background-color: green;
margin-bottom: 20px;
}
#b {
height: 20px;
background-color: blue;
margin-top: 0;
}
</style>
<script type="text/javascript">
function test() {
document.getElementById('b').style.marginTop = '-20px';
document.documentElement.removeAttribute('class');
}
document.addEventListener('MozReftestInvalidate', test, false);
</script>
</head>
<body>
<div id="a"></div>
<div id="b"></div>
</body>
</html>

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

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style type="text/css">
#a {
height: 20px;
background-color: green;
margin-bottom: -20px;
}
#b {
display: none;
height: 20px;
background-color: blue;
margin-top: 20px;
}
</style>
<script type="text/javascript">
function test() {
document.getElementById('b').style.display = 'block';
document.documentElement.removeAttribute('class');
}
document.addEventListener('MozReftestInvalidate', test, false);
</script>
</head>
<body>
<div id="a"></div>
<div id="b"></div>
</body>
</html>

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

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style type="text/css">
#a {
height: 20px;
background-color: green;
margin-bottom: -20px;
}
#b {
height: 20px;
background-color: blue;
margin-top: 0;
}
</style>
<script type="text/javascript">
function test() {
document.getElementById('b').style.marginTop = '20px';
document.documentElement.removeAttribute('class');
}
document.addEventListener('MozReftestInvalidate', test, false);
</script>
</head>
<body>
<div id="a"></div>
<div id="b"></div>
</body>
</html>

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

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#b {
height: 20px;
background-color: green;
}
</style>
</head>
<body>
<div id="a"></div>
<div id="b"></div>
</body>
</html>

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

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#a {
height: 20px;
background-color: green;
}
#b {
height: 20px;
background-color: blue;
}
</style>
</head>
<body>
<div id="a"></div>
<div id="b"></div>
</body>
</html>

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

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style type="text/css">
#a {
height: 20px;
background-color: green;
}
#b {
display: none;
height: 20px;
background-color: blue;
margin-top: -20px;
}
</style>
<script type="text/javascript">
function test() {
document.getElementById('b').style.display = 'block';
document.documentElement.removeAttribute('class');
}
document.addEventListener('MozReftestInvalidate', test, false);
</script>
</head>
<body>
<div id="a"></div>
<div id="b"></div>
</body>
</html>

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

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style type="text/css">
#a {
height: 20px;
background-color: green;
}
#b {
height: 20px;
background-color: blue;
margin-top: 0;
}
</style>
<script type="text/javascript">
function test() {
document.getElementById('b').style.marginTop = '-20px';
document.documentElement.removeAttribute('class');
}
document.addEventListener('MozReftestInvalidate', test, false);
</script>
</head>
<body>
<div id="a"></div>
<div id="b"></div>
</body>
</html>

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

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style type="text/css">
#a {
display: none;
height: 20px;
background-color: green;
margin-bottom: -20px;
}
#b {
height: 20px;
background-color: blue;
}
</style>
<script type="text/javascript">
function test() {
document.getElementById('a').style.display = 'block';
document.documentElement.removeAttribute('class');
}
document.addEventListener('MozReftestInvalidate', test, false);
</script>
</head>
<body>
<div id="a"></div>
<div id="b"></div>
</body>
</html>

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

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style type="text/css">
#a {
height: 20px;
background-color: green;
margin-bottom: 0;
}
#b {
height: 20px;
background-color: blue;
}
</style>
<script type="text/javascript">
function test() {
document.getElementById('a').style.marginBottom = '-20px';
document.documentElement.removeAttribute('class');
}
document.addEventListener('MozReftestInvalidate', test, false);
</script>
</head>
<body>
<div id="a"></div>
<div id="b"></div>
</body>
</html>

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

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
html, body {
margin: 0; padding: 5px;
}
div {
height: 20px;
background-color: green;
}
#positive {
margin-bottom: 100px;
}
</style>
</head>
<body>
<div id="positive"></div>
<div></div>
</body>
</html>

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

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
html, body {
margin: 0; padding: 5px;
}
div {
height: 100px;
}
#positive, #negative {
background-color: green;
height: 20px;
}
</style>
</head>
<body>
<div id="positive"></div>
<div></div>
<div id="negative"></div>
</body>
</html>

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

@ -0,0 +1,32 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style type="text/css">
html, body {
margin: 0; padding: 5px;
}
div {
height: 20px;
background-color: green;
}
#positive {
margin-bottom: 100px;
}
#negative {
display: none;
margin-top: -80px;
}
</style>
<script type="text/javascript">
function test() {
document.getElementById('negative').style.display = 'block';
document.documentElement.removeAttribute('class');
}
document.addEventListener('MozReftestInvalidate', test, false);
</script>
</head>
<body>
<div id="positive"></div>
<div id="negative"></div>
</body>
</html>

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

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style type="text/css">
html, body {
margin: 0; padding: 5px;
}
div {
height: 20px;
background-color: green;
}
#positive {
margin-bottom: 100px;
}
#negative {
margin-top: 0px;
}
</style>
<script type="text/javascript">
function test() {
document.getElementById('negative').style.marginTop = '-80px';
document.documentElement.removeAttribute('class');
}
document.addEventListener('MozReftestInvalidate', test, false);
</script>
</head>
<body>
<div id="positive"></div>
<div id="negative"></div>
</body>
</html>

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

@ -0,0 +1,32 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style type="text/css">
html, body {
margin: 0; padding: 5px;
}
div {
height: 20px;
background-color: green;
}
#negative {
margin-bottom: -80px;
}
#positive {
display: none;
margin-top: 100px;
}
</style>
<script type="text/javascript">
function test() {
document.getElementById('positive').style.display = 'block';
document.documentElement.removeAttribute('class');
}
document.addEventListener('MozReftestInvalidate', test, false);
</script>
</head>
<body>
<div id="negative"></div>
<div id="positive"></div>
</body>
</html>

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

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style type="text/css">
html, body {
margin: 0; padding: 5px;
}
div {
height: 20px;
background-color: green;
}
#negative {
margin-bottom: -80px;
}
#positive {
margin-top: 0;
}
</style>
<script type="text/javascript">
function test() {
document.getElementById('positive').style.marginTop = '100px';
document.documentElement.removeAttribute('class');
}
document.addEventListener('MozReftestInvalidate', test, false);
</script>
</head>
<body>
<div id="negative"></div>
<div id="positive"></div>
</body>
</html>

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

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
html, body {
margin: 0; padding: 5px;
}
div {
height: 20px;
background-color: green;
}
#positive {
background-color: blue;
margin-bottom: 40px;
}
</style>
</head>
<body>
<div id="positive"></div>
<div></div>
</body>
</html>

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

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
html, body {
margin: 0; padding: 5px;
}
#positive, #negative {
height: 20px;
background-color: blue;
}
#margin {
height: 40px;
}
#negative {
background-color: green;
}
</style>
</head>
<body>
<div id="positive"></div>
<div id="margin"></div>
<div id="negative"></div>
</body>
</html>

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

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style type="text/css">
html, body {
margin: 0; padding: 5px;
}
div {
height: 20px;
background-color: green;
}
#positive {
margin-top: 30px;
margin-bottom: 40px;
}
#negative {
display: none;
margin-top: -90px;
background-color: blue;
}
</style>
<script type="text/javascript">
function test() {
document.getElementById('negative').style.display = 'block';
document.documentElement.removeAttribute('class');
}
document.addEventListener('MozReftestInvalidate', test, false);
</script>
</head>
<body>
<div id="positive"></div>
<div id="negative"></div>
</body>
</html>

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

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style type="text/css">
html, body {
margin: 0; padding: 5px;
}
div {
height: 20px;
background-color: green;
}
#positive {
margin-top: 30px;
margin-bottom: 40px;
}
#negative {
margin-top: 0;
background-color: blue;
}
</style>
<script type="text/javascript">
function test() {
document.getElementById('negative').style.marginTop = '-90px';
document.documentElement.removeAttribute('class');
}
document.addEventListener('MozReftestInvalidate', test, false);
</script>
</head>
<body>
<div id="positive"></div>
<div id="negative"></div>
</body>
</html>

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

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style type="text/css">
html, body {
margin: 0; padding: 5px;
}
div {
height: 20px;
background-color: green;
}
#negative {
margin-top: 30px;
margin-bottom: -90px;
}
#positive {
display: none;
margin-top: 40px;
background-color: blue;
}
</style>
<script type="text/javascript">
function test() {
document.getElementById('positive').style.display = 'block';
document.documentElement.removeAttribute('class');
}
document.addEventListener('MozReftestInvalidate', test, false);
</script>
</head>
<body>
<div id="negative"></div>
<div id="positive"></div>
</body>
</html>

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

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style type="text/css">
html, body {
margin: 0; padding: 5px;
}
div {
height: 20px;
background-color: green;
}
#negative {
margin-top: 30px;
margin-bottom: -90px;
}
#positive {
margin-top: 0;
background-color: blue;
}
</style>
<script type="text/javascript">
function test() {
document.getElementById('positive').style.marginTop = '40px';
document.documentElement.removeAttribute('class');
}
document.addEventListener('MozReftestInvalidate', test, false);
</script>
</head>
<body>
<div id="negative"></div>
<div id="positive"></div>
</body>
</html>

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

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style type="text/css">
html, body {
margin: 0; padding: 5px;
}
div {
height: 20px;
background-color: green;
}
#small {
margin-top: 40px;
margin-bottom: -40px;
}
#big {
display: none;
margin-top: -60px;
background-color: blue;
}
</style>
<script type="text/javascript">
function test() {
document.getElementById('big').style.display = 'block';
document.documentElement.removeAttribute('class');
}
document.addEventListener('MozReftestInvalidate', test, false);
</script>
</head>
<body>
<div id="small"></div>
<div id="big"></div>
</body>
</html>

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

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style type="text/css">
html, body {
margin: 0; padding: 5px;
}
div {
height: 20px;
background-color: green;
}
#small {
margin-top: 40px;
margin-bottom: -40px;
}
#big {
margin-top: 0;
background-color: blue;
}
</style>
<script type="text/javascript">
function test() {
document.getElementById('big').style.marginTop = '-60px';
document.documentElement.removeAttribute('class');
}
document.addEventListener('MozReftestInvalidate', test, false);
</script>
</head>
<body>
<div id="small"></div>
<div id="big"></div>
</body>
</html>

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

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
html, body {
margin: 0; padding: 5px;
}
div {
height: 20px;
background-color: green;
}
#small {
margin-top: 40px;
margin-bottom: -40px;
}
#big {
background-color: blue;
}
</style>
</head>
<body>
<div id="small"></div>
<div id="big"></div>
</body>
</html>

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

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
html, body {
margin: 0; padding: 5px;
}
div {
height: 20px;
}
#small {
background-color: green;
}
#big {
background-color: blue;
}
</style>
</head>
<body>
<div></div>
<div id="big"></div>
<div id="small"></div>
</body>
</html>

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

@ -65,19 +65,101 @@
== block-sibling-3-dyn.html block-sibling-1-ref2.html
!= block-sibling-3-dyn.html block-sibling-1-noref.html
== block-negative-1a.html block-negative-1-ref.html
!= block-negative-1a.html block-negative-1-noref1.html
!= block-negative-1a.html block-negative-1-noref2.html
== block-negative-1b.html block-negative-1-ref.html
!= block-negative-1b.html block-negative-1-noref1.html
!= block-negative-1b.html block-negative-1-noref2.html
== block-negative-2a.html block-negative-2-ref.html
!= block-negative-2a.html block-negative-2-noref1.html
!= block-negative-2a.html block-negative-2-noref2.html
== block-negative-2b.html block-negative-2-ref.html
!= block-negative-2b.html block-negative-2-noref1.html
!= block-negative-2b.html block-negative-2-noref2.html
== block-negative-3a.html block-negative-3-ref.html
== block-negative-3a.html block-negative-3-ref2.html
!= block-negative-3a.html block-negative-3-noref1.html
!= block-negative-3a.html block-negative-3-noref2.html
== block-negative-3b.html block-negative-3-ref.html
== block-negative-3b.html block-negative-3-ref2.html
!= block-negative-3b.html block-negative-3-noref1.html
!= block-negative-3b.html block-negative-3-noref2.html
== block-negative-4a.html block-negative-4-ref.html
== block-negative-4a.html block-negative-4-ref2.html
!= block-negative-4a.html block-negative-4-noref1.html
!= block-negative-4a.html block-negative-4-noref2.html
== block-negative-4b.html block-negative-4-ref.html
== block-negative-4b.html block-negative-4-ref2.html
!= block-negative-4b.html block-negative-4-noref1.html
!= block-negative-4b.html block-negative-4-noref2.html
== block-negative-5.html block-negative-5-ref.html
== block-negative-5.html block-negative-5-ref2.html
!= block-negative-5.html block-negative-5-noref1.html
!= block-negative-5.html block-negative-5-noref2.html
== block-negative-1a-dyn1.html block-negative-1-ref.html
!= block-negative-1a-dyn1.html block-negative-1-noref1.html
!= block-negative-1a-dyn1.html block-negative-1-noref2.html
== block-negative-1a-dyn2.html block-negative-1-ref.html
!= block-negative-1a-dyn2.html block-negative-1-noref1.html
!= block-negative-1a-dyn2.html block-negative-1-noref2.html
== block-negative-1b-dyn1.html block-negative-1-ref.html
!= block-negative-1b-dyn1.html block-negative-1-noref1.html
!= block-negative-1b-dyn1.html block-negative-1-noref2.html
== block-negative-1b-dyn2.html block-negative-1-ref.html
!= block-negative-1b-dyn2.html block-negative-1-noref1.html
!= block-negative-1b-dyn2.html block-negative-1-noref2.html
== block-negative-2a-dyn1.html block-negative-2-ref.html
!= block-negative-2a-dyn1.html block-negative-2-noref1.html
!= block-negative-2a-dyn1.html block-negative-2-noref2.html
== block-negative-2a-dyn2.html block-negative-2-ref.html
!= block-negative-2a-dyn2.html block-negative-2-noref1.html
!= block-negative-2a-dyn2.html block-negative-2-noref2.html
== block-negative-2b-dyn1.html block-negative-2-ref.html
!= block-negative-2b-dyn1.html block-negative-2-noref1.html
!= block-negative-2b-dyn1.html block-negative-2-noref2.html
== block-negative-2b-dyn2.html block-negative-2-ref.html
!= block-negative-2b-dyn2.html block-negative-2-noref1.html
!= block-negative-2b-dyn2.html block-negative-2-noref2.html
== block-negative-3a-dyn1.html block-negative-3-ref.html
== block-negative-3a-dyn1.html block-negative-3-ref2.html
!= block-negative-3a-dyn1.html block-negative-3-noref1.html
!= block-negative-3a-dyn1.html block-negative-3-noref2.html
== block-negative-3a-dyn2.html block-negative-3-ref.html
== block-negative-3a-dyn2.html block-negative-3-ref2.html
!= block-negative-3a-dyn2.html block-negative-3-noref1.html
!= block-negative-3a-dyn2.html block-negative-3-noref2.html
== block-negative-3b-dyn1.html block-negative-3-ref.html
== block-negative-3b-dyn1.html block-negative-3-ref2.html
!= block-negative-3b-dyn1.html block-negative-3-noref1.html
!= block-negative-3b-dyn1.html block-negative-3-noref2.html
== block-negative-3b-dyn2.html block-negative-3-ref.html
== block-negative-3b-dyn2.html block-negative-3-ref2.html
!= block-negative-3b-dyn2.html block-negative-3-noref1.html
!= block-negative-3b-dyn2.html block-negative-3-noref2.html
== block-negative-4a-dyn1.html block-negative-4-ref.html
== block-negative-4a-dyn1.html block-negative-4-ref2.html
!= block-negative-4a-dyn1.html block-negative-4-noref1.html
!= block-negative-4a-dyn1.html block-negative-4-noref2.html
== block-negative-4a-dyn2.html block-negative-4-ref.html
== block-negative-4a-dyn2.html block-negative-4-ref2.html
!= block-negative-4a-dyn2.html block-negative-4-noref1.html
!= block-negative-4a-dyn2.html block-negative-4-noref2.html
== block-negative-4b-dyn1.html block-negative-4-ref.html
== block-negative-4b-dyn1.html block-negative-4-ref2.html
!= block-negative-4b-dyn1.html block-negative-4-noref1.html
!= block-negative-4b-dyn1.html block-negative-4-noref2.html
== block-negative-4b-dyn2.html block-negative-4-ref.html
== block-negative-4b-dyn2.html block-negative-4-ref2.html
!= block-negative-4b-dyn2.html block-negative-4-noref1.html
!= block-negative-4b-dyn2.html block-negative-4-noref2.html
== block-negative-5-dyn1.html block-negative-5-ref.html
== block-negative-5-dyn1.html block-negative-5-ref2.html
!= block-negative-5-dyn1.html block-negative-5-noref1.html
!= block-negative-5-dyn1.html block-negative-5-noref2.html
== block-negative-5-dyn2.html block-negative-5-ref.html
== block-negative-5-dyn2.html block-negative-5-ref2.html
!= block-negative-5-dyn2.html block-negative-5-noref1.html
!= block-negative-5-dyn2.html block-negative-5-noref2.html
== block-non-sibling-1a.html block-non-sibling-1-ref.html
== block-non-sibling-1a.html block-non-sibling-1-ref2.html
== block-non-sibling-1b.html block-non-sibling-1-ref.html

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

@ -62,7 +62,7 @@ MOCHITEST_FILES = test_acid3_test46.html \
test_bug391221.html \
test_bug397427.html \
test_bug399349.html \
$(warning test_bug401046.html is disabled for intermittent failures. Bug 701060) \
$(filter disabled-for-intermittent-failures--bug-701060, test_bug401046.html) \
test_bug405818.html \
test_bug412901.html \
test_bug437915.html \

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

@ -156,67 +156,67 @@ NS_IMPL_THREADSAFE_ISUPPORTS1(TestObserver, IPeerConnectionObserver)
NS_IMETHODIMP
TestObserver::OnCreateOfferSuccess(const char* offer)
{
lastString = strdup(offer);
state = stateSuccess;
cout << "onCreateOfferSuccess = " << offer << endl;
lastString = strdup(offer);
return NS_OK;
}
NS_IMETHODIMP
TestObserver::OnCreateOfferError(uint32_t code)
{
lastStatusCode = code;
state = stateError;
cout << "onCreateOfferError" << endl;
lastStatusCode = code;
return NS_OK;
}
NS_IMETHODIMP
TestObserver::OnCreateAnswerSuccess(const char* answer)
{
lastString = strdup(answer);
state = stateSuccess;
cout << "onCreateAnswerSuccess = " << answer << endl;
lastString = strdup(answer);
return NS_OK;
}
NS_IMETHODIMP
TestObserver::OnCreateAnswerError(uint32_t code)
{
state = stateError;
lastStatusCode = code;
state = stateError;
return NS_OK;
}
NS_IMETHODIMP
TestObserver::OnSetLocalDescriptionSuccess(uint32_t code)
{
state = stateSuccess;
lastStatusCode = code;
state = stateSuccess;
return NS_OK;
}
NS_IMETHODIMP
TestObserver::OnSetRemoteDescriptionSuccess(uint32_t code)
{
state = stateSuccess;
lastStatusCode = code;
state = stateSuccess;
return NS_OK;
}
NS_IMETHODIMP
TestObserver::OnSetLocalDescriptionError(uint32_t code)
{
state = stateError;
lastStatusCode = code;
state = stateError;
return NS_OK;
}
NS_IMETHODIMP
TestObserver::OnSetRemoteDescriptionError(uint32_t code)
{
state = stateError;
lastStatusCode = code;
state = stateError;
return NS_OK;
}

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

@ -81,7 +81,8 @@ class FontSizePreference extends DialogPreference {
setButtonState(mPreviewFontIndex);
mDecreaseFontButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
updatePreviewFontSize(mFontTwipValues[--mPreviewFontIndex]);
mPreviewFontIndex = Math.max(mPreviewFontIndex - 1, 0);
updatePreviewFontSize(mFontTwipValues[mPreviewFontIndex]);
mIncreaseFontButton.setEnabled(true);
// If we reached the minimum index, disable the button.
if (mPreviewFontIndex == 0) {
@ -91,8 +92,9 @@ class FontSizePreference extends DialogPreference {
});
mIncreaseFontButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
updatePreviewFontSize(mFontTwipValues[++mPreviewFontIndex]);
mPreviewFontIndex = Math.min(mPreviewFontIndex + 1, mFontTwipValues.length - 1);
updatePreviewFontSize(mFontTwipValues[mPreviewFontIndex]);
mDecreaseFontButton.setEnabled(true);
// If we reached the maximum index, disable the button.
if (mPreviewFontIndex == mFontTwipValues.length - 1) {
@ -182,6 +184,6 @@ class FontSizePreference extends DialogPreference {
}
private float convertTwipStrToPT(String twip) {
return Float.parseFloat(twip) / TWIP_TO_PT_RATIO;
return Float.parseFloat(twip) / TWIP_TO_PT_RATIO;
}
}

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

@ -25,7 +25,7 @@ MOCHITEST_BROWSER_FILES = \
browser_addons_locales.js \
browser_appmenu.js \
browser_autocompletesearch.js \
$(info browser_awesomescreen.js is disabled because the localepicker is disabled (bug 693524)) \
$(filter disabled-because-localepicker-is-disabled--bug-693524, browser_awesomescreen.js) \
browser_blank_01.html \
browser_blank_02.html \
browser_blank_03.html \
@ -37,35 +37,35 @@ MOCHITEST_BROWSER_FILES = \
browser_focus.html \
browser_focus.js \
browser_forms.html \
$(warning browser_forms.js disabled due to failures) \
$(filter disabled-for-failures, browser_forms.js) \
browser_formsZoom.html \
$(warning browser_formsZoom.js disabled due to failures) \
$(info browser_history.js is disabled because it is random orange on XUL fennec (bug 700537)) \
$(info browser_localepicker.js is disabled because the localepicker is disabled (bug 694047)) \
$(filter disabled-for-failures, browser_formsZoom.js) \
$(filter disabled-for-random-orange-on-XUL-fennec--bug-700537, browser_history.js) \
$(filter disabled-because-localepicker-is-disabled--bug-694047, browser_localepicker.js) \
browser_localepicker_escape.js \
browser_mainui.js \
browser_preferences_text.js \
browser_preferences_fulltoggle.js \
browser_rect.js \
$(info browser_rememberPassword.js is disabled because it is random orange on XUL fennec (bug 698387)) \
$(filter disabled-for-random-orange-on-XUL-fennec--bug-698387, browser_rememberPassword.js) \
browser_scroll.js \
browser_scroll.html \
browser_scrollbar.js \
browser_select.html \
browser_select.js \
browser_sessionstore.js \
$(info browser_tabs.js is disabled because it is random orange on XUL fennec (bug 700537)) \
$(info browser_tapping.js is disabled because it is random orange on XUL fennec (bug 698387)) \
$(info browser_tap_content.html is disabled because it is random orange on XUL fennec (bug 698387)) \
$(filter disabled-for-random-orange-on-XUL-fennec--bug-700537, browser_tabs.js) \
$(filter disabled-for-random-orange-on-XUL-fennec--bug-698387, browser_tapping.js) \
$(filter disabled-for-random-orange-on-XUL-fennec--bug-698387, browser_tap_content.html) \
browser_tapping_edit.js \
browser_tap_contentedit.html \
browser_test.js \
browser_vkb.js \
$(warning browser_viewport.js disabled due to failures) \
$(filter disabled-for-failures, browser_viewport.js) \
browser_viewport.sjs \
browser_scrollbar.sjs \
browser_title.sjs \
$(info browser_thumbnails.js is disabled because it is random orange on XUL fennec (bug 700537)) \
$(filter disabled-for-random-orange-on-XUL-fennec--bug-700537, browser_thumbnails.js) \
browser_install.xml \
browser_upgrade.rdf\
browser_localerepository.js \

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

@ -8,6 +8,8 @@ Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
"resource://gre/modules/PlacesUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",
"resource://gre/modules/TelemetryStopwatch.jsm");
////////////////////////////////////////////////////////////////////////////////
//// Constants
@ -77,6 +79,9 @@ const kBrowserUrlbarAutofillPref = "autoFill";
// Whether to search only typed entries.
const kBrowserUrlbarAutofillTypedPref = "autoFill.typed";
// The Telemetry histogram for urlInlineComplete query on domain
const DOMAIN_QUERY_TELEMETRY = "PLACES_AUTOCOMPLETE_URLINLINE_DOMAIN_QUERY_TIME_MS";
////////////////////////////////////////////////////////////////////////////////
//// Globals
@ -1391,7 +1396,11 @@ urlInlineComplete.prototype = {
if (lastSlashIndex == -1) {
var hasDomainResult = false;
var domain, untrimmedDomain;
TelemetryStopwatch.start(DOMAIN_QUERY_TELEMETRY);
try {
// Execute the query synchronously.
// This is by design, to avoid race conditions between the
// user typing and the connection searching for the result.
hasDomainResult = query.executeStep();
if (hasDomainResult) {
domain = query.getString(0);
@ -1400,6 +1409,7 @@ urlInlineComplete.prototype = {
} finally {
query.reset();
}
TelemetryStopwatch.finish(DOMAIN_QUERY_TELEMETRY);
if (hasDomainResult) {
// We got a match for a domain, we can add it immediately.

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

@ -1833,6 +1833,13 @@
"n_buckets": 10,
"description": "PLACES: Time for first autocomplete result if > 50ms (ms)"
},
"PLACES_AUTOCOMPLETE_URLINLINE_DOMAIN_QUERY_TIME_MS": {
"kind": "exponential",
"low": 50,
"high": 2000,
"n_buckets": 10,
"description": "PLACES: Duration of the domain query for the url inline autocompletion (ms)"
},
"PLACES_IDLE_FRECENCY_DECAY_TIME_MS": {
"kind": "exponential",
"low": 50,

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

@ -174,7 +174,7 @@ MOCHITEST_CHROME_FILES += test_autocomplete_mac_caret.xul
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
MOCHITEST_CHROME_FILES += $(warning test_cursorsnap.xul temporarily disabled) \
MOCHITEST_CHROME_FILES += $(filter disabled-temporarily, test_cursorsnap.xul) \
window_cursorsnap_dialog.xul \
window_cursorsnap_wizard.xul
endif

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

@ -47,6 +47,9 @@ function makeMessageObject(aRpCaller) {
// loggedInUser can be undefined, null, or a string
options.loggedInUser = aRpCaller.loggedInUser;
// Special flag for internal calls
options._internal = aRpCaller._internal;
Object.keys(aRpCaller).forEach(function(option) {
// Duplicate the callerobject, scrubbing out functions and other
// internal variables (like _mm, the message manager object)
@ -63,7 +66,6 @@ function makeMessageObject(aRpCaller) {
throw new Error(err);
}
dump("message object is: " + JSON.stringify(options) + "\n");
return options;
}
@ -128,7 +130,6 @@ IDService.prototype = {
*/
watch: function watch(aRpCaller) {
// store the caller structure and notify the UI observers
dump("RP - watch: " + JSON.stringify(aRpCaller) + "\n");
this._rpFlows[aRpCaller.id] = aRpCaller;
let options = makeMessageObject(aRpCaller);
@ -177,14 +178,14 @@ IDService.prototype = {
* following functions (doLogin, doLogout, or doReady)
*/
doLogin: function doLogin(aRpCallerId, aAssertion) {
doLogin: function doLogin(aRpCallerId, aAssertion, aInternalParams) {
let rp = this._rpFlows[aRpCallerId];
if (!rp) {
dump("WARNING: doLogin found no rp to go with callerId " + aRpCallerId + "\n");
return;
}
rp.doLogin(aAssertion);
rp.doLogin(aAssertion, aInternalParams);
},
doLogout: function doLogout(aRpCallerId) {

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

@ -52,7 +52,7 @@ endif
ifeq ($(OS_ARCH),WINNT)
MOCHITEST_CHROME_FILES += \
test_taskbarprogress_downloadstates.xul \
$(warning test_taskbarprogress_service.xul disabled due to very frequent orange, see bug 630567) \
$(filter disabled-for-very-frequent-orange--bug-630567, test_taskbarprogress_service.xul) \
$(NULL)
endif

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

@ -15,7 +15,7 @@ TESTROOT = $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
USE_STATIC_LIBS = 1
_BROWSER_FILES = \
$(warning browser_bug435788.js has been disabled due to leaks - see bug 751100) \
$(filter disabled-for-leaks--bug-751100, browser_bug435788.js) \
pfs_bug435788_1.rdf \
pfs_bug435788_2.rdf \
GoodExtension.xpi \

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

@ -35,7 +35,7 @@ MOCHITEST_CHROME_FILES = test_bug343416.xul \
window_bug429954.xul \
test_bug444800.xul \
test_bug462106.xul \
$(warning test_bug478536.xul is disabled for intermittent timeouts. Bug 561929) \
$(filter disabled-for-intermittent-timeouts--bug-561929, test_bug478536.xul) \
window_bug478536.xul \
test_bug517396.xul \
test_bug538242.xul \