Merge m-c to inbound, a=merge

MozReview-Commit-ID: E2oiCGaL6uX
This commit is contained in:
Wes Kocher
2017-06-08 18:42:21 -07:00
104 changed files with 26997 additions and 25899 deletions

View File

@@ -1460,6 +1460,10 @@
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="e16408c3-4e08-47fd-85a9-3cbbce534e95" id="WebProtection@360safe.com">
<prefs/>
<versionRange minVersion="0" maxVersion="5.0.0.1009" severity="3"/>
</emItem>
<emItem blockID="i82" id="{8f42fb8b-b6f6-45de-81c0-d6d39f54f971}">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
@@ -1500,14 +1504,6 @@
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="08addad8-2f03-4cff-a791-e6f2a1b170ed" id="WebProtection@360safe.com">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="52.0a1"/>
</targetApplication>
</versionRange>
</emItem>
<emItem blockID="i838" id="{87b5a11e-3b54-42d2-9102-0a7cb1f79ebf}">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
@@ -2020,6 +2016,10 @@
<prefs/>
<versionRange minVersion="0" maxVersion="1.6.7" severity="3"/>
</emItem>
<emItem blockID="c806b01c-3352-4083-afd9-9a8ab6e00b19" id="html5@encoding">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="i656" id="hdv@vovcacik.addons.mozilla.org">
<prefs/>
<versionRange minVersion="102.0" maxVersion="102.0" severity="3"/>

View File

@@ -62,9 +62,12 @@ var CaptivePortalWatcher = {
if (windows.getNext() == window && !windows.hasMoreElements()) {
this.ensureCaptivePortalTab();
}
} else if (cps.state == cps.UNKNOWN) {
// We trigger a portal check after delayed startup to avoid doing a network
// request before first paint.
this._delayedRecheckPending = true;
Services.obs.addObserver(this, "browser-delayed-startup-finished");
}
cps.recheckCaptivePortal();
},
uninit() {
@@ -72,6 +75,9 @@ var CaptivePortalWatcher = {
Services.obs.removeObserver(this, "captive-portal-login-abort");
Services.obs.removeObserver(this, "captive-portal-login-success");
if (this._delayedRecheckPending) {
Services.obs.removeObserver(this, "browser-delayed-startup-finished");
}
if (this._delayedCaptivePortalDetectedInProgress) {
Services.obs.removeObserver(this, "xul-window-visible");
@@ -80,6 +86,11 @@ var CaptivePortalWatcher = {
observe(aSubject, aTopic, aData) {
switch (aTopic) {
case "browser-delayed-startup-finished":
Services.obs.removeObserver(this, "browser-delayed-startup-finished");
delete this._delayedRecheckPending;
cps.recheckCaptivePortal();
break;
case "captive-portal-login":
this._captivePortalDetected();
break;

View File

@@ -28,7 +28,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "Preferences",
XPCOMUtils.defineLazyModuleGetter(this, "setTimeout",
"resource://gre/modules/Timer.jsm");
var {Cc: classes, Ci: interfaces} = Components;
var {classes: Cc, interfaces: Ci} = Components;
/**
* A number of iterations after which to yield time back

View File

@@ -1855,7 +1855,14 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
try {
let whichNotification = aInput.whichSearchSuggestionsNotification;
if (whichNotification != "none") {
aInput.updateSearchSuggestionsNotificationImpressions(whichNotification);
// Update the impressions count on real popupshown, since there's
// no guarantee openPopup will be respected by the platform.
// Though, we must ensure the handled event is the expected one.
let impressionId = this._searchSuggestionsImpressionId = {};
this.addEventListener("popupshown", () => {
if (this._searchSuggestionsImpressionId == impressionId)
aInput.updateSearchSuggestionsNotificationImpressions(whichNotification);
}, {once: true});
this._showSearchSuggestionsNotification(whichNotification, popupDirection);
} else if (this.classList.contains("showSearchSuggestionsNotification")) {
this._hideSearchSuggestionsNotification();

View File

@@ -0,0 +1,16 @@
# Onboarding
System addon to provide the onboarding overlay for user friendly tours.
## Architecture
Everytime `about:home` or `about:newtab` page is opened, onboarding overlay is injected into that page (if `browser.onboarding.enabled` preference is `true`).
## Landing rules
We would apply some rules:
* Avoid `chrome://` in `onbaording.js` since onboarding is intented to be injected into a normal content process page.
* All styles and ids should be formated as `onboarding-*` to avoid conflict with the origin page.
* All strings in `locales` should be formated as `onboarding.*` for consistency.

View File

@@ -37,10 +37,21 @@
display: none;
}
#onboarding-tour-close-btn {
#onboarding-overlay-close-btn {
position: absolute;
top: 15px;
offset-inline-end: 15px;
cursor: pointer;
width: 16px;
height: 16px;
background-image: url(chrome://browser/skin/sidebar/close.svg);
background-position: center center;
background-repeat: no-repeat;
padding: 12px;
}
#onboarding-overlay-close-btn:hover {
background-color: rgba(204, 204, 204, 0.6);
}
#onboarding-overlay.opened > #onboarding-overlay-dialog {

View File

@@ -42,7 +42,7 @@ class Onboarding {
handleEvent(evt) {
switch (evt.target.id) {
case "onboarding-overlay-icon":
case "onboarding-tour-close-btn":
case "onboarding-overlay-close-btn":
// If the clicking target is directly on the outer-most overlay,
// that means clicking outside the tour content area.
// Let's toggle the overlay.
@@ -69,7 +69,7 @@ class Onboarding {
// We're not shipping yet so l10n strings is going to be closed for now.
div.innerHTML = `
<div id="onboarding-overlay-dialog">
<button id="onboarding-tour-close-btn">X</button>
<span id="onboarding-overlay-close-btn"></span>
<header>Getting started?</header>
<nav>
<ul></ul>

View File

@@ -0,0 +1,6 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 32 32">
<path fill="context-fill" d="M29.98,28h-28a2,2,0,0,1-2-2V22a2,2,0,0,1,2-2H2c4.591,0,4-3,4.009-8,0.009-4.686.166-8,6.261-8h7.41c6.13,0,6.27,3.314,6.3,8,0.02,5-.59,8,4.02,8h-0.02a2,2,0,0,1,2,2v4A2,2,0,0,1,29.98,28Z"/>
</svg>

After

Width:  |  Height:  |  Size: 521 B

View File

@@ -151,6 +151,7 @@
skin/classic/browser/sidebars.svg (../shared/icons/sidebars.svg)
skin/classic/browser/stop.svg (../shared/icons/stop.svg)
skin/classic/browser/sync.svg (../shared/icons/sync.svg)
skin/classic/browser/synced-tabs.svg (../shared/icons/synced-tabs.svg)
skin/classic/browser/webIDE.svg (../shared/icons/webIDE.svg)
skin/classic/browser/zoom-in.svg (../shared/icons/zoom-in.svg)
skin/classic/browser/zoom-out.svg (../shared/icons/zoom-out.svg)

View File

@@ -128,7 +128,7 @@
#sidebar-switcher-tabs > .toolbarbutton-icon,
#sidebar-box[sidebarcommand="viewTabsSidebar"] > #sidebar-header > #sidebar-switcher-target > #sidebar-icon {
list-style-image: url(chrome://browser/skin/sync.svg);
list-style-image: url(chrome://browser/skin/synced-tabs.svg);
-moz-context-properties: fill;
fill: currentColor;
opacity: 0.8;

View File

@@ -87,7 +87,7 @@ toolbar:not([brighttext]) #bookmarks-menu-button[cui-areatype="toolbar"][starred
}
#sync-button[cui-areatype="toolbar"] {
list-style-image: url("chrome://browser/skin/sync.svg");
list-style-image: url("chrome://browser/skin/synced-tabs.svg");
}
#containers-panelmenu[cui-areatype="toolbar"] {

View File

@@ -56,8 +56,6 @@
#include "nsGlobalWindow.h"
#include "nsScriptNameSpaceManager.h"
#include "mozilla/AutoRestore.h"
#include "mozilla/MainThreadIdlePeriod.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/dom/DOMException.h"
#include "mozilla/dom/DOMExceptionBinding.h"
#include "mozilla/dom/ErrorEvent.h"
@@ -65,7 +63,7 @@
#include "nsAXPCNativeCallContext.h"
#include "mozilla/CycleCollectedJSRuntime.h"
#include "mozilla/SystemGroup.h"
#include "nsRefreshDriver.h"
#include "nsJSPrincipals.h"
#ifdef XP_MACOSX
@@ -113,24 +111,21 @@ const size_t gStackSize = 8192;
// Maximum amount of time that should elapse between incremental GC slices
#define NS_INTERSLICE_GC_DELAY 100 // ms
// If we haven't painted in 100ms, or we're in e10s parent process and
// user isn't active, we allow for a longer GC budget.
#define NS_INTERSLICE_GC_BUDGET 40 // ms
// The amount of time we wait between a request to CC (after GC ran)
// and doing the actual CC.
#define NS_CC_DELAY 6000 // ms
#define NS_CC_SKIPPABLE_DELAY 250 // ms
// ForgetSkippable is usually fast, so we can use small budgets.
// This isn't a real budget but a hint to CollectorRunner whether there
// is enough time to call ForgetSkippable.
static const int64_t kForgetSkippableSliceDuration = 2;
// Maximum amount of time that should elapse between incremental CC slices
static const int64_t kICCIntersliceDelay = 32; // ms
// Time budget for an incremental CC slice when using timer to run it.
// Time budget for an incremental CC slice
static const int64_t kICCSliceBudget = 5; // ms
// Minimum budget for an incremental CC slice when using idle time to run it.
static const int64_t kIdleICCSliceBudget = 3; // ms
// Maximum total duration for an ICC
static const uint32_t kMaxICCDuration = 2000; // ms
@@ -149,16 +144,14 @@ static const uint32_t kMaxICCDuration = 2000; // ms
// Large value used to specify that a script should run essentially forever
#define NS_UNLIMITED_SCRIPT_RUNTIME (0x40000000LL << 32)
class CollectorRunner;
// if you add statics here, add them to the list in StartupJSEnvironment
static nsITimer *sGCTimer;
static nsITimer *sShrinkingGCTimer;
static StaticRefPtr<CollectorRunner> sCCRunner;
static StaticRefPtr<CollectorRunner> sICCRunner;
static nsITimer *sCCTimer;
static nsITimer *sICCTimer;
static nsITimer *sFullGCTimer;
static StaticRefPtr<CollectorRunner> sInterSliceGCRunner;
static nsITimer *sInterSliceGCTimer;
static TimeStamp sLastCCEndTime;
@@ -183,7 +176,7 @@ static uint32_t sCCollectedZonesWaitingForGC;
static uint32_t sLikelyShortLivingObjectsNeedingGC;
static bool sPostGCEventsToConsole;
static bool sPostGCEventsToObserver;
static int32_t sCCRunnerFireCount = 0;
static int32_t sCCTimerFireCount = 0;
static uint32_t sMinForgetSkippableTime = UINT32_MAX;
static uint32_t sMaxForgetSkippableTime = 0;
static uint32_t sTotalForgetSkippableTime = 0;
@@ -195,6 +188,7 @@ static bool sNeedsFullCC = false;
static bool sNeedsFullGC = false;
static bool sNeedsGCAfterCC = false;
static bool sIncrementalCC = false;
static bool sDidPaintAfterPreviousICCSlice = false;
static int32_t sActiveIntersliceGCBudget = 0; // ms;
static nsScriptNameSpaceManager *gNameSpaceManager;
@@ -229,178 +223,6 @@ static bool sIsCompactingOnUserInactive = false;
static int32_t sExpensiveCollectorPokes = 0;
static const int32_t kPokesBetweenExpensiveCollectorTriggers = 5;
// Return true if some meaningful work was done.
typedef bool (*CollectorRunnerCallback) (TimeStamp aDeadline, void* aData);
// Repeating callback runner for CC and GC.
class CollectorRunner final : public IdleRunnable
{
public:
static already_AddRefed<CollectorRunner>
Create(CollectorRunnerCallback aCallback, uint32_t aDelay,
int64_t aBudget, bool aRepeating, void* aData = nullptr)
{
RefPtr<CollectorRunner> runner =
new CollectorRunner(aCallback, aDelay, aBudget, aRepeating, aData);
runner->Schedule(false); // Initial scheduling shouldn't use idle dispatch.
return runner.forget();
}
NS_IMETHOD Run() override
{
if (!mCallback) {
return NS_OK;
}
// Deadline is null when called from timer.
bool deadLineWasNull = mDeadline.IsNull();
bool didRun = false;
if (deadLineWasNull || ((TimeStamp::Now() + mBudget) < mDeadline)) {
CancelTimer();
didRun = mCallback(mDeadline, mData);
}
if (mCallback && (mRepeating || !didRun)) {
// If we didn't do meaningful work, don't schedule using immediate
// idle dispatch, since that could lead to a loop until the idle
// period ends.
Schedule(didRun);
}
return NS_OK;
}
static void
TimedOut(nsITimer* aTimer, void* aClosure)
{
RefPtr<CollectorRunner> runnable = static_cast<CollectorRunner*>(aClosure);
runnable->Run();
}
void SetDeadline(mozilla::TimeStamp aDeadline) override
{
mDeadline = aDeadline;
};
void SetTimer(uint32_t aDelay, nsIEventTarget* aTarget) override
{
if (mTimerActive) {
return;
}
mTarget = aTarget;
if (!mTimer) {
mTimer = do_CreateInstance(NS_TIMER_CONTRACTID);
} else {
mTimer->Cancel();
}
if (mTimer) {
mTimer->SetTarget(mTarget);
mTimer->InitWithFuncCallback(TimedOut, this, aDelay,
nsITimer::TYPE_ONE_SHOT);
mTimerActive = true;
}
}
nsresult Cancel() override
{
CancelTimer();
mTimer = nullptr;
mScheduleTimer = nullptr;
mCallback = nullptr;
return NS_OK;
}
static void
ScheduleTimedOut(nsITimer* aTimer, void* aClosure)
{
RefPtr<CollectorRunner> runnable = static_cast<CollectorRunner*>(aClosure);
runnable->Schedule(true);
}
void Schedule(bool aAllowIdleDispatch)
{
if (!mCallback) {
return;
}
if (sShuttingDown) {
Cancel();
return;
}
mDeadline = TimeStamp();
TimeStamp now = TimeStamp::Now();
TimeStamp hint = nsRefreshDriver::GetIdleDeadlineHint(now);
if (hint != now) {
// RefreshDriver is ticking, let it schedule the idle dispatch.
nsRefreshDriver::DispatchIdleRunnableAfterTick(this, mDelay);
// Ensure we get called at some point, even if RefreshDriver is stopped.
SetTimer(mDelay, mTarget);
} else {
// RefreshDriver doesn't seem to be running.
if (aAllowIdleDispatch) {
nsCOMPtr<nsIRunnable> runnable = this;
NS_IdleDispatchToCurrentThread(runnable.forget(), mDelay);
SetTimer(mDelay, mTarget);
} else {
if (!mScheduleTimer) {
mScheduleTimer = do_CreateInstance(NS_TIMER_CONTRACTID);
if (!mScheduleTimer) {
return;
}
} else {
mScheduleTimer->Cancel();
}
// We weren't allowed to do idle dispatch immediately, do it after a
// short timeout.
mScheduleTimer->InitWithFuncCallback(ScheduleTimedOut, this, 16,
nsITimer::TYPE_ONE_SHOT_LOW_PRIORITY);
}
}
}
private:
explicit CollectorRunner(CollectorRunnerCallback aCallback,
uint32_t aDelay, int64_t aBudget,
bool aRepeating, void* aData)
: mCallback(aCallback), mDelay(aDelay)
, mBudget(TimeDuration::FromMilliseconds(aBudget))
, mRepeating(aRepeating), mTimerActive(false), mData(aData)
{
}
~CollectorRunner()
{
CancelTimer();
}
void CancelTimer()
{
nsRefreshDriver::CancelIdleRunnable(this);
if (mTimer) {
mTimer->Cancel();
}
if (mScheduleTimer) {
mScheduleTimer->Cancel();
}
mTimerActive = false;
}
nsCOMPtr<nsITimer> mTimer;
nsCOMPtr<nsITimer> mScheduleTimer;
nsCOMPtr<nsIEventTarget> mTarget;
CollectorRunnerCallback mCallback;
uint32_t mDelay;
TimeStamp mDeadline;
TimeDuration mBudget;
bool mRepeating;
bool mTimerActive;
void* mData;
};
static const char*
ProcessNameForCollectorLog()
{
@@ -477,10 +299,10 @@ KillTimers()
{
nsJSContext::KillGCTimer();
nsJSContext::KillShrinkingGCTimer();
nsJSContext::KillCCRunner();
nsJSContext::KillICCRunner();
nsJSContext::KillCCTimer();
nsJSContext::KillICCTimer();
nsJSContext::KillFullGCTimer();
nsJSContext::KillInterSliceGCRunner();
nsJSContext::KillInterSliceGCTimer();
}
// If we collected a substantial amount of cycles, poke the GC since more objects
@@ -1629,7 +1451,7 @@ nsJSContext::CycleCollectNow(nsICycleCollectorListener *aListener,
//static
void
nsJSContext::RunCycleCollectorSlice(TimeStamp aDeadline)
nsJSContext::RunCycleCollectorSlice()
{
if (!NS_IsMainThread()) {
return;
@@ -1645,40 +1467,33 @@ nsJSContext::RunCycleCollectorSlice(TimeStamp aDeadline)
js::SliceBudget budget = js::SliceBudget::unlimited();
if (sIncrementalCC) {
int64_t baseBudget = kICCSliceBudget;
if (!aDeadline.IsNull()) {
baseBudget = int64_t((aDeadline - TimeStamp::Now()).ToMilliseconds());
}
if (gCCStats.mBeginTime.IsNull()) {
// If no CC is in progress, use the standard slice time.
budget = js::SliceBudget(js::TimeBudget(baseBudget));
budget = js::SliceBudget(js::TimeBudget(kICCSliceBudget));
} else {
TimeStamp now = TimeStamp::Now();
// Only run a limited slice if we're within the max running time.
uint32_t runningTime = TimeBetween(gCCStats.mBeginTime, now);
if (runningTime < kMaxICCDuration) {
const float maxSlice = MainThreadIdlePeriod::GetLongIdlePeriod();
// Try to make up for a delay in running this slice.
float sliceDelayMultiplier =
TimeBetween(gCCStats.mEndSliceTime, now) / (float)kICCIntersliceDelay;
float delaySliceBudget =
std::min(baseBudget * sliceDelayMultiplier, maxSlice);
float sliceDelayMultiplier = TimeBetween(gCCStats.mEndSliceTime, now) / (float)kICCIntersliceDelay;
float delaySliceBudget = kICCSliceBudget * sliceDelayMultiplier;
// Increase slice budgets up to |maxSlice| as we approach
// Increase slice budgets up to |maxLaterSlice| as we approach
// half way through the ICC, to avoid large sync CCs.
float percentToHalfDone = std::min(2.0f * runningTime / kMaxICCDuration, 1.0f);
float laterSliceBudget = maxSlice * percentToHalfDone;
const float maxLaterSlice = 40.0f;
float laterSliceBudget = maxLaterSlice * percentToHalfDone;
budget = js::SliceBudget(js::TimeBudget(std::max({delaySliceBudget,
laterSliceBudget, (float)baseBudget})));
laterSliceBudget, (float)kICCSliceBudget})));
}
}
}
nsCycleCollector_collectSlice(budget);
nsCycleCollector_collectSlice(budget, sDidPaintAfterPreviousICCSlice);
sDidPaintAfterPreviousICCSlice = false;
gCCStats.FinishCycleCollectionSlice();
}
@@ -1714,11 +1529,11 @@ nsJSContext::GetMaxCCSliceTimeSinceClear()
return gCCStats.mMaxSliceTimeSinceClear;
}
static bool
ICCRunnerFired(TimeStamp aDeadline, void* aData)
static void
ICCTimerFired(nsITimer* aTimer, void* aClosure)
{
if (sDidShutdown) {
return false;
return;
}
// Ignore ICC timer fires during IGC. Running ICC during an IGC will cause us
@@ -1728,15 +1543,14 @@ ICCRunnerFired(TimeStamp aDeadline, void* aData)
PRTime now = PR_Now();
if (sCCLockedOutTime == 0) {
sCCLockedOutTime = now;
return false;
return;
}
if (now - sCCLockedOutTime < NS_MAX_CC_LOCKEDOUT_TIME) {
return false;
return;
}
}
nsJSContext::RunCycleCollectorSlice(aDeadline);
return true;
nsJSContext::RunCycleCollectorSlice();
}
//static
@@ -1748,16 +1562,22 @@ nsJSContext::BeginCycleCollectionCallback()
gCCStats.mBeginTime = gCCStats.mBeginSliceTime.IsNull() ? TimeStamp::Now() : gCCStats.mBeginSliceTime;
gCCStats.mSuspected = nsCycleCollector_suspectedCount();
KillCCRunner();
KillCCTimer();
gCCStats.RunForgetSkippable();
MOZ_ASSERT(!sICCRunner, "Tried to create a new ICC timer when one already existed.");
MOZ_ASSERT(!sICCTimer, "Tried to create a new ICC timer when one already existed.");
// Create an ICC timer even if ICC is globally disabled, because we could be manually triggering
// an incremental collection, and we want to be sure to finish it.
sICCRunner = CollectorRunner::Create(ICCRunnerFired, kICCIntersliceDelay,
kIdleICCSliceBudget, true);
CallCreateInstance("@mozilla.org/timer;1", &sICCTimer);
if (sICCTimer) {
sICCTimer->SetTarget(SystemGroup::EventTargetFor(TaskCategory::GarbageCollection));
sICCTimer->InitWithNamedFuncCallback(ICCTimerFired, nullptr,
kICCIntersliceDelay,
nsITimer::TYPE_REPEATING_SLACK_LOW_PRIORITY,
"ICCTimerFired");
}
}
static_assert(NS_GC_DELAY > kMaxICCDuration, "A max duration ICC shouldn't reduce GC delay to 0");
@@ -1768,7 +1588,7 @@ nsJSContext::EndCycleCollectionCallback(CycleCollectorResults &aResults)
{
MOZ_ASSERT(NS_IsMainThread());
nsJSContext::KillICCRunner();
nsJSContext::KillICCTimer();
// Update timing information for the current slice before we log it, if
// we previously called PrepareForCycleCollectionSlice(). During shutdown
@@ -1916,24 +1736,16 @@ nsJSContext::EndCycleCollectionCallback(CycleCollectorResults &aResults)
}
// static
bool
InterSliceGCRunnerFired(TimeStamp aDeadline, void* aData)
void
InterSliceGCTimerFired(nsITimer *aTimer, void *aClosure)
{
nsJSContext::KillInterSliceGCRunner();
MOZ_ASSERT(sActiveIntersliceGCBudget > 0);
int64_t budget = sActiveIntersliceGCBudget;
if (!aDeadline.IsNull()) {
budget = int64_t((aDeadline - TimeStamp::Now()).ToMilliseconds());
}
uintptr_t reason = reinterpret_cast<uintptr_t>(aData);
nsJSContext::GarbageCollectNow(aData ?
static_cast<JS::gcreason::Reason>(reason) :
JS::gcreason::INTER_SLICE_GC,
nsJSContext::KillInterSliceGCTimer();
int64_t budget = XRE_IsE10sParentProcess() && nsContentUtils::GetUserIsInteracting() && sActiveIntersliceGCBudget ?
sActiveIntersliceGCBudget : NS_INTERSLICE_GC_BUDGET;
nsJSContext::GarbageCollectNow(JS::gcreason::INTER_SLICE_GC,
nsJSContext::IncrementalGC,
nsJSContext::NonShrinkingGC,
budget);
return true;
}
// static
@@ -1941,12 +1753,9 @@ void
GCTimerFired(nsITimer *aTimer, void *aClosure)
{
nsJSContext::KillGCTimer();
// Now start the actual GC after initial timer has fired.
sInterSliceGCRunner = CollectorRunner::Create(InterSliceGCRunnerFired,
NS_INTERSLICE_GC_DELAY,
sActiveIntersliceGCBudget,
false,
aClosure);
uintptr_t reason = reinterpret_cast<uintptr_t>(aClosure);
nsJSContext::GarbageCollectNow(static_cast<JS::gcreason::Reason>(reason),
nsJSContext::IncrementalGC);
}
// static
@@ -1969,11 +1778,11 @@ ShouldTriggerCC(uint32_t aSuspected)
TimeUntilNow(sLastCCEndTime) > NS_CC_FORCED);
}
static bool
CCRunnerFired(TimeStamp aDeadline, void* aData)
static void
CCTimerFired(nsITimer *aTimer, void *aClosure)
{
if (sDidShutdown) {
return false;
return;
}
static uint32_t ccDelay = NS_CC_DELAY;
@@ -1982,53 +1791,48 @@ CCRunnerFired(TimeStamp aDeadline, void* aData)
PRTime now = PR_Now();
if (sCCLockedOutTime == 0) {
// Reset sCCRunnerFireCount so that we run forgetSkippable
// Reset sCCTimerFireCount so that we run forgetSkippable
// often enough before CC. Because of reduced ccDelay
// forgetSkippable will be called just a few times.
// NS_MAX_CC_LOCKEDOUT_TIME limit guarantees that we end up calling
// forgetSkippable and CycleCollectNow eventually.
sCCRunnerFireCount = 0;
sCCTimerFireCount = 0;
sCCLockedOutTime = now;
return false;
return;
}
if (now - sCCLockedOutTime < NS_MAX_CC_LOCKEDOUT_TIME) {
return false;
return;
}
}
++sCCRunnerFireCount;
bool didDoWork = false;
++sCCTimerFireCount;
// During early timer fires, we only run forgetSkippable. During the first
// late timer fire, we decide if we are going to have a second and final
// late timer fire, where we may begin to run the CC. Should run at least one
// early timer fire to allow cleanup before the CC.
int32_t numEarlyTimerFires = std::max((int32_t)ccDelay / NS_CC_SKIPPABLE_DELAY - 2, 1);
bool isLateTimerFire = sCCRunnerFireCount > numEarlyTimerFires;
bool isLateTimerFire = sCCTimerFireCount > numEarlyTimerFires;
uint32_t suspected = nsCycleCollector_suspectedCount();
if (isLateTimerFire && ShouldTriggerCC(suspected)) {
if (sCCRunnerFireCount == numEarlyTimerFires + 1) {
if (sCCTimerFireCount == numEarlyTimerFires + 1) {
FireForgetSkippable(suspected, true);
didDoWork = true;
if (ShouldTriggerCC(nsCycleCollector_suspectedCount())) {
// Our efforts to avoid a CC have failed, so we return to let the
// timer fire once more to trigger a CC.
return didDoWork;
return;
}
} else {
// We are in the final timer fire and still meet the conditions for
// triggering a CC. Let RunCycleCollectorSlice finish the current IGC, if
// any because that will allow us to include the GC time in the CC pause.
nsJSContext::RunCycleCollectorSlice(aDeadline);
didDoWork = true;
nsJSContext::RunCycleCollectorSlice();
}
} else if (((sPreviousSuspectedCount + 100) <= suspected) ||
(sCleanupsSinceLastGC < NS_MAJOR_FORGET_SKIPPABLE_CALLS)) {
// Only do a forget skippable if there are more than a few new objects
// or we're doing the initial forget skippables.
FireForgetSkippable(suspected, false);
didDoWork = true;
}
if (isLateTimerFire) {
@@ -2037,10 +1841,8 @@ CCRunnerFired(TimeStamp aDeadline, void* aData)
// We have either just run the CC or decided we don't want to run the CC
// next time, so kill the timer.
sPreviousSuspectedCount = 0;
nsJSContext::KillCCRunner();
nsJSContext::KillCCTimer();
}
return didDoWork;
}
// static
@@ -2087,13 +1889,13 @@ ReadyToTriggerExpensiveCollectorTimer()
}
// Check all of the various collector timers/runners and see if they are waiting to fire.
// For the synchronous collector timers/runners, sGCTimer and sCCRunner, we only want to
// trigger the collection occasionally, because they are expensive. The incremental collector
// timers, sInterSliceGCRunner and sICCRunner, are fast and need to be run many times, so
// Check all of the various collector timers and see if they are waiting to fire.
// For the synchronous collector timers, sGCTimer and sCCTimer, we only want to trigger
// the collection occasionally, because they are expensive. The incremental collector
// timers, sInterSliceGCTimer and sICCTimer, are fast and need to be run many times, so
// always run their corresponding timer.
// This does not check sFullGCTimer, as that's a more expensive collection we run
// This does not check sFullGCTimer, as that's an even more expensive collection we run
// on a long timer.
// static
@@ -2111,8 +1913,8 @@ nsJSContext::RunNextCollectorTimer()
return;
}
if (sInterSliceGCRunner) {
InterSliceGCRunnerFired(TimeStamp(), nullptr);
if (sInterSliceGCTimer) {
InterSliceGCTimerFired(nullptr, nullptr);
return;
}
@@ -2120,15 +1922,15 @@ nsJSContext::RunNextCollectorTimer()
// anything if a GC is in progress.
MOZ_ASSERT(!sCCLockedOut, "Don't check the CC timers if the CC is locked out.");
if (sCCRunner) {
if (sCCTimer) {
if (ReadyToTriggerExpensiveCollectorTimer()) {
CCRunnerFired(TimeStamp(), nullptr);
CCTimerFired(nullptr, nullptr);
}
return;
}
if (sICCRunner) {
ICCRunnerFired(TimeStamp(), nullptr);
if (sICCTimer) {
ICCTimerFired(nullptr, nullptr);
return;
}
}
@@ -2150,12 +1952,12 @@ nsJSContext::PokeGC(JS::gcreason::Reason aReason,
sNeedsFullGC = true;
}
if (sGCTimer || sInterSliceGCRunner) {
if (sGCTimer || sInterSliceGCTimer) {
// There's already a timer for GC'ing, just return
return;
}
if (sCCRunner) {
if (sCCTimer) {
// Make sure CC is called...
sNeedsFullCC = true;
// and GC after it.
@@ -2163,7 +1965,7 @@ nsJSContext::PokeGC(JS::gcreason::Reason aReason,
return;
}
if (sICCRunner) {
if (sICCTimer) {
// Make sure GC is called after the current CC completes.
// No need to set sNeedsFullCC because we are currently running a CC.
sNeedsGCAfterCC = true;
@@ -2189,7 +1991,6 @@ nsJSContext::PokeGC(JS::gcreason::Reason aReason,
: NS_GC_DELAY),
nsITimer::TYPE_ONE_SHOT_LOW_PRIORITY,
"GCTimerFired");
first = false;
}
@@ -2219,19 +2020,24 @@ nsJSContext::PokeShrinkingGC()
void
nsJSContext::MaybePokeCC()
{
if (sCCRunner || sICCRunner || sShuttingDown || !sHasRunGC) {
if (sCCTimer || sICCTimer || sShuttingDown || !sHasRunGC) {
return;
}
if (ShouldTriggerCC(nsCycleCollector_suspectedCount())) {
sCCRunnerFireCount = 0;
sCCTimerFireCount = 0;
CallCreateInstance("@mozilla.org/timer;1", &sCCTimer);
if (!sCCTimer) {
return;
}
// We can kill some objects before running forgetSkippable.
nsCycleCollector_dispatchDeferredDeletion();
sCCRunner =
CollectorRunner::Create(CCRunnerFired, NS_CC_SKIPPABLE_DELAY,
kForgetSkippableSliceDuration, true);
sCCTimer->SetTarget(SystemGroup::EventTargetFor(TaskCategory::GarbageCollection));
sCCTimer->InitWithNamedFuncCallback(CCTimerFired, nullptr,
NS_CC_SKIPPABLE_DELAY,
nsITimer::TYPE_REPEATING_SLACK_LOW_PRIORITY,
"CCTimerFired");
}
}
@@ -2255,11 +2061,11 @@ nsJSContext::KillFullGCTimer()
}
void
nsJSContext::KillInterSliceGCRunner()
nsJSContext::KillInterSliceGCTimer()
{
if (sInterSliceGCRunner) {
sInterSliceGCRunner->Cancel();
sInterSliceGCRunner = nullptr;
if (sInterSliceGCTimer) {
sInterSliceGCTimer->Cancel();
NS_RELEASE(sInterSliceGCTimer);
}
}
@@ -2275,24 +2081,24 @@ nsJSContext::KillShrinkingGCTimer()
//static
void
nsJSContext::KillCCRunner()
nsJSContext::KillCCTimer()
{
sCCLockedOutTime = 0;
if (sCCRunner) {
sCCRunner->Cancel();
sCCRunner = nullptr;
if (sCCTimer) {
sCCTimer->Cancel();
NS_RELEASE(sCCTimer);
}
}
//static
void
nsJSContext::KillICCRunner()
nsJSContext::KillICCTimer()
{
sCCLockedOutTime = 0;
if (sICCRunner) {
sICCRunner->Cancel();
sICCRunner = nullptr;
if (sICCTimer) {
sICCTimer->Cancel();
NS_RELEASE(sICCTimer);
}
}
@@ -2364,8 +2170,8 @@ DOMGCSliceCallback(JSContext* aCx, JS::GCProgress aProgress, const JS::GCDescrip
sCCLockedOut = false;
sIsCompactingOnUserInactive = false;
// May need to kill the inter-slice GC runner
nsJSContext::KillInterSliceGCRunner();
// May need to kill the inter-slice GC timer
nsJSContext::KillInterSliceGCTimer();
sCCollectedWaitingForGC = 0;
sCCollectedZonesWaitingForGC = 0;
@@ -2406,11 +2212,15 @@ DOMGCSliceCallback(JSContext* aCx, JS::GCProgress aProgress, const JS::GCDescrip
case JS::GC_SLICE_END:
// Schedule another GC slice if the GC has more work to do.
nsJSContext::KillInterSliceGCRunner();
nsJSContext::KillInterSliceGCTimer();
if (!sShuttingDown && !aDesc.isComplete_) {
sInterSliceGCRunner =
CollectorRunner::Create(InterSliceGCRunnerFired, NS_INTERSLICE_GC_DELAY,
sActiveIntersliceGCBudget, false);
CallCreateInstance("@mozilla.org/timer;1", &sInterSliceGCTimer);
sInterSliceGCTimer->SetTarget(SystemGroup::EventTargetFor(TaskCategory::GarbageCollection));
sInterSliceGCTimer->InitWithNamedFuncCallback(InterSliceGCTimerFired,
nullptr,
NS_INTERSLICE_GC_DELAY,
nsITimer::TYPE_ONE_SHOT_LOW_PRIORITY,
"InterSliceGCTimerFired");
}
if (ShouldTriggerCC(nsCycleCollector_suspectedCount())) {
@@ -2464,7 +2274,7 @@ void
mozilla::dom::StartupJSEnvironment()
{
// initialize all our statics, so that we can restart XPCOM
sGCTimer = sShrinkingGCTimer = sFullGCTimer = nullptr;
sGCTimer = sShrinkingGCTimer = sFullGCTimer = sCCTimer = sICCTimer = nullptr;
sCCLockedOut = false;
sCCLockedOutTime = 0;
sLastCCEndTime = TimeStamp();
@@ -2799,6 +2609,52 @@ nsJSContext::EnsureStatics()
sIsInitialized = true;
}
void
nsJSContext::NotifyDidPaint()
{
sDidPaintAfterPreviousICCSlice = true;
if (sICCTimer) {
static uint32_t sCount = 0;
// 16 here is the common value for refresh driver tick frequency.
static const uint32_t kTicksPerSliceDelay = kICCIntersliceDelay / 16;
if (++sCount % kTicksPerSliceDelay != 0) {
// Don't trigger CC slice all the time after paint, but often still.
// The key point is to trigger it right after paint, especially when
// we're running RefreshDriver constantly.
return;
}
sICCTimer->Cancel();
ICCTimerFired(nullptr, nullptr);
if (sICCTimer) {
sICCTimer->SetTarget(SystemGroup::EventTargetFor(TaskCategory::GarbageCollection));
sICCTimer->InitWithNamedFuncCallback(ICCTimerFired, nullptr,
kICCIntersliceDelay,
nsITimer::TYPE_REPEATING_SLACK_LOW_PRIORITY,
"ICCTimerFired");
}
} else if (sCCTimer) {
static uint32_t sCount = 0;
static const uint32_t kTicksPerForgetSkippableDelay =
NS_CC_SKIPPABLE_DELAY / 16;
if (++sCount % kTicksPerForgetSkippableDelay != 0) {
// The comment above about triggering CC slice applies to forget skippable
// too.
return;
}
sCCTimer->Cancel();
CCTimerFired(nullptr, nullptr);
if (sCCTimer) {
sCCTimer->SetTarget(SystemGroup::EventTargetFor(TaskCategory::GarbageCollection));
sCCTimer->InitWithNamedFuncCallback(CCTimerFired, nullptr,
NS_CC_SKIPPABLE_DELAY,
nsITimer::TYPE_REPEATING_SLACK_LOW_PRIORITY,
"CCTimerFired");
}
}
}
nsScriptNameSpaceManager*
mozilla::dom::GetNameSpaceManager()
{

View File

@@ -15,7 +15,6 @@
#include "nsIXPConnect.h"
#include "nsIArray.h"
#include "mozilla/Attributes.h"
#include "mozilla/TimeStamp.h"
#include "nsThreadUtils.h"
#include "xpcpublic.h"
@@ -92,7 +91,7 @@ public:
int32_t aExtraForgetSkippableCalls = 0);
// Run a cycle collector slice, using a heuristic to decide how long to run it.
static void RunCycleCollectorSlice(mozilla::TimeStamp aDeadline);
static void RunCycleCollectorSlice();
// Run a cycle collector slice, using the given work budget.
static void RunCycleCollectorWorkSlice(int64_t aWorkBudget);
@@ -114,10 +113,10 @@ public:
static void KillShrinkingGCTimer();
static void MaybePokeCC();
static void KillCCRunner();
static void KillICCRunner();
static void KillCCTimer();
static void KillICCTimer();
static void KillFullGCTimer();
static void KillInterSliceGCRunner();
static void KillInterSliceGCTimer();
// Calling LikelyShortLivingObjectCreated() makes a GC more likely.
static void LikelyShortLivingObjectCreated();
@@ -132,6 +131,7 @@ public:
return global ? mGlobalObjectRef.get() : nullptr;
}
static void NotifyDidPaint();
protected:
virtual ~nsJSContext();

View File

@@ -9,6 +9,6 @@ fuzzy-if(skiaContent,1,3) needs-focus fails-if(styloVsGecko) == textarea-load.ht
fuzzy-if(skiaContent,1,3) needs-focus fails-if(styloVsGecko) == textarea-create.html textarea-ref.html
fuzzy-if(skiaContent,9,6) needs-focus == select-load.html select-ref.html
fuzzy-if(skiaContent,2,4) needs-focus == select-create.html select-ref.html
needs-focus fails-if(styloVsGecko) == autofocus-after-load.html autofocus-after-load-ref.html
needs-focus == autofocus-after-load.html autofocus-after-load-ref.html
fuzzy-if(skiaContent,2,5) needs-focus == autofocus-leaves-iframe.html autofocus-leaves-iframe-ref.html
fuzzy-if(skiaContent,2,5) needs-focus == autofocus-after-body-focus.html autofocus-after-body-focus-ref.html

View File

@@ -2,12 +2,12 @@
include autofocus/reftest.list
include toblob-todataurl/reftest.list
fails-if(styloVsGecko) == 41464-1a.html 41464-1-ref.html
fails-if(styloVsGecko) == 41464-1b.html 41464-1-ref.html
== 41464-1a.html 41464-1-ref.html
== 41464-1b.html 41464-1-ref.html
== 52019-1.html 52019-1-ref.html
fails-if(styloVsGecko) == 82711-1.html 82711-1-ref.html
fails-if(styloVsGecko) == 82711-2.html 82711-2-ref.html
fails-if(styloVsGecko) != 82711-1-ref.html 82711-2-ref.html
== 82711-1.html 82711-1-ref.html
== 82711-2.html 82711-2-ref.html
!= 82711-1-ref.html 82711-2-ref.html
!= 468263-1a.html about:blank
!= 468263-1b.html about:blank
!= 468263-1c.html about:blank
@@ -20,10 +20,10 @@ fails-if(styloVsGecko) != 82711-1-ref.html 82711-2-ref.html
== 560059-video-dimensions.html 560059-video-dimensions-ref.html
== 573322-quirks.html 573322-quirks-ref.html
== 573322-no-quirks.html 573322-no-quirks-ref.html
fails-if(styloVsGecko) == 596455-1a.html 596455-ref-1.html
fails-if(styloVsGecko) == 596455-1b.html 596455-ref-1.html
fails-if(styloVsGecko) == 596455-2a.html 596455-ref-2.html
fails-if(styloVsGecko) == 596455-2b.html 596455-ref-2.html
== 596455-1a.html 596455-ref-1.html
== 596455-1b.html 596455-ref-1.html
== 596455-2a.html 596455-ref-2.html
== 596455-2b.html 596455-ref-2.html
== 610935.html 610935-ref.html
== 649134-1.html 649134-ref.html
skip-if(Android) == 649134-2.html 649134-2-ref.html

View File

@@ -60,6 +60,8 @@ H264Converter::Init()
RefPtr<MediaDataDecoder::DecodePromise>
H264Converter::Decode(MediaRawData* aSample)
{
MOZ_RELEASE_ASSERT(mFlushPromise.IsEmpty(), "Flush operatin didn't complete");
MOZ_RELEASE_ASSERT(!mDecodePromiseRequest.Exists()
&& !mInitPromiseRequest.Exists(),
"Can't request a new decode until previous one completed");
@@ -135,44 +137,38 @@ H264Converter::Flush()
mDecodePromise.RejectIfExists(NS_ERROR_DOM_MEDIA_CANCELED, __func__);
mNeedKeyframe = true;
MOZ_RELEASE_ASSERT(mFlushPromise.IsEmpty(), "Previous flush didn't complete");
/*
When we detect a change of content in the H264 stream, we first flush the
current decoder (1), then shut it down (2).
current decoder (1), shut it down (2) create a new decoder and initialize
it (3).
It is possible possible for H264Converter::Flush to be called during any of
those time.
If during (1):
- mFlushRequest and mFlushPromise will not be empty.
- mFlushRequest will not be empty.
- The old decoder can still be used, with the current extradata as stored
in mCurrentConfig.mExtraData.
If during (2):
- mShutdownRequest and mShutdownPromise won't be empty.
- mShutdownRequest won't be empty.
- mDecoder is empty.
- The old decoder is no longer referenced by the H264Converter.
If during (3):
- mInitPromiseRequest won't be empty.
- mDecoder is set but not usable yet.
*/
if (mFlushPromise) {
// Flush in progress, hijack that one.
mFlushRequest.Disconnect();
return mFlushPromise.forget();
if (mFlushRequest.Exists() || mShutdownRequest.Exists() ||
mInitPromiseRequest.Exists()) {
// We let the current decoder complete and will resume after.
return mFlushPromise.Ensure(__func__);
}
if (mDecoder) {
return mDecoder->Flush();
}
if (!mShutdownPromise) {
return FlushPromise::CreateAndResolve(true, __func__);
}
mShutdownRequest.Disconnect();
// Let's continue when the the current shutdown completes.
RefPtr<ShutdownPromise> shutdownPromise = mShutdownPromise.forget();
return shutdownPromise->Then(
AbstractThread::GetCurrent()->AsTaskQueue(),
__func__,
[](bool) { return FlushPromise::CreateAndResolve(true, __func__); },
[](bool) {
MOZ_ASSERT_UNREACHABLE("Shutdown promises are always resolved");
return FlushPromise::CreateAndResolve(true, __func__);
});
return FlushPromise::CreateAndResolve(true, __func__);
}
RefPtr<MediaDataDecoder::DecodePromise>
@@ -191,8 +187,8 @@ H264Converter::Shutdown()
mInitPromiseRequest.DisconnectIfExists();
mDecodePromiseRequest.DisconnectIfExists();
mFlushRequest.DisconnectIfExists();
mFlushPromise = nullptr;
mShutdownRequest.DisconnectIfExists();
mFlushPromise.RejectIfExists(NS_ERROR_DOM_MEDIA_CANCELED, __func__);
mPendingSample = nullptr;
mNeedAVCC.reset();
@@ -282,10 +278,15 @@ H264Converter::CreateDecoderAndInit(MediaRawData* aSample)
{
RefPtr<MediaByteBuffer> extra_data =
mp4_demuxer::AnnexB::ExtractExtraData(aSample);
if (!mp4_demuxer::AnnexB::HasSPS(extra_data)) {
bool inbandExtradata = mp4_demuxer::AnnexB::HasSPS(extra_data);
if (!inbandExtradata &&
!mp4_demuxer::AnnexB::HasSPS(mCurrentConfig.mExtraData)) {
return NS_ERROR_NOT_INITIALIZED;
}
UpdateConfigFromExtraData(extra_data);
if (inbandExtradata) {
UpdateConfigFromExtraData(extra_data);
}
nsresult rv =
CreateDecoder(mCurrentConfig, /* DecoderDoctorDiagnostics* */ nullptr);
@@ -314,6 +315,12 @@ H264Converter::OnDecoderInitDone(const TrackType aTrackType)
Some(mDecoder->NeedsConversion() == ConversionRequired::kNeedAVCC);
mCanRecycleDecoder = Some(CanRecycleDecoder());
if (!mFlushPromise.IsEmpty()) {
// A Flush is pending, abort the current operation.
mFlushPromise.Resolve(true, __func__);
return;
}
DecodeFirstSample(sample);
}
@@ -321,6 +328,13 @@ void
H264Converter::OnDecoderInitFailed(const MediaResult& aError)
{
mInitPromiseRequest.Complete();
if (!mFlushPromise.IsEmpty()) {
// A Flush is pending, abort the current operation.
mFlushPromise.Reject(aError, __func__);
return;
}
mDecodePromise.Reject(
MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR,
RESULT_DETAIL("Unable to initialize H264 decoder")),
@@ -412,12 +426,18 @@ H264Converter::CheckForSPSChange(MediaRawData* aSample)
// The SPS has changed, signal to flush the current decoder and create a
// new one.
RefPtr<H264Converter> self = this;
mFlushPromise = mDecoder->Flush();
mFlushPromise
mDecoder->Flush()
->Then(AbstractThread::GetCurrent()->AsTaskQueue(),
__func__,
[self, sample, this]() {
mFlushRequest.Complete();
if (!mFlushPromise.IsEmpty()) {
// A Flush is pending, abort the current operation.
mFlushPromise.Resolve(true, __func__);
return;
}
mShutdownPromise = Shutdown();
mShutdownPromise
->Then(AbstractThread::GetCurrent()->AsTaskQueue(),
@@ -425,6 +445,13 @@ H264Converter::CheckForSPSChange(MediaRawData* aSample)
[self, sample, this]() {
mShutdownRequest.Complete();
mShutdownPromise = nullptr;
if (!mFlushPromise.IsEmpty()) {
// A Flush is pending, abort the current operation.
mFlushPromise.Resolve(true, __func__);
return;
}
nsresult rv = CreateDecoderAndInit(sample);
if (rv == NS_ERROR_DOM_MEDIA_INITIALIZING_DECODER) {
// All good so far, will continue later.
@@ -439,8 +466,12 @@ H264Converter::CheckForSPSChange(MediaRawData* aSample)
},
[self, this](const MediaResult& aError) {
mFlushRequest.Complete();
mFlushPromise = nullptr;
mDecodePromise.Reject(aError, __func__);
if (!mFlushPromise.IsEmpty()) {
// A Flush is pending, abort the current operation.
mFlushPromise.Reject(aError, __func__);
return;
}
mDecodePromise.Reject(aError, __func__);
})
->Track(mFlushRequest);
return NS_ERROR_DOM_MEDIA_INITIALIZING_DECODER;

View File

@@ -92,9 +92,9 @@ private:
MozPromiseRequestHolder<DecodePromise> mDecodePromiseRequest;
MozPromiseHolder<DecodePromise> mDecodePromise;
MozPromiseRequestHolder<FlushPromise> mFlushRequest;
RefPtr<FlushPromise> mFlushPromise;
MozPromiseRequestHolder<ShutdownPromise> mShutdownRequest;
RefPtr<ShutdownPromise> mShutdownPromise;
MozPromiseHolder<FlushPromise> mFlushPromise;
RefPtr<GMPCrashHelper> mGMPCrashHelper;
Maybe<bool> mNeedAVCC;

View File

@@ -8,7 +8,7 @@ skip-if(Android) load 336744-1.html # bug 1268050
load 336960-1.html
load 342954-1.xhtml
load 342954-2.xhtml
load 368276-1.xhtml
asserts-if(stylo,4) load 368276-1.xhtml # bug 1370830
load 368641-1.xhtml
load 378521-1.xhtml
load 382376-1.xhtml

View File

@@ -871,6 +871,12 @@ nsXBLBinding::WalkRules(nsIStyleRuleProcessor::EnumFunc aFunc, void* aData)
(*aFunc)(rules, aData);
}
const ServoStyleSet*
nsXBLBinding::GetServoStyleSet() const
{
return mPrototypeBinding->GetServoStyleSet();
}
// Internal helper methods ////////////////////////////////////////////////////////////////
// Get or create a WeakMap object on a given XBL-hosting global.

View File

@@ -7,6 +7,7 @@
#ifndef nsXBLBinding_h_
#define nsXBLBinding_h_
#include "mozilla/ServoBindings.h"
#include "nsXBLService.h"
#include "nsCOMPtr.h"
#include "nsINodeList.h"
@@ -129,6 +130,8 @@ public:
void WalkRules(nsIStyleRuleProcessor::EnumFunc aFunc, void* aData);
const mozilla::ServoStyleSet* GetServoStyleSet() const;
static nsresult DoInitJSClass(JSContext *cx, JS::Handle<JSObject*> obj,
const nsAFlatString& aClassName,
nsXBLPrototypeBinding* aProtoBinding,

View File

@@ -230,12 +230,10 @@ nsXBLPrototypeBinding::GetAllowScripts() const
}
bool
nsXBLPrototypeBinding::LoadResources()
nsXBLPrototypeBinding::LoadResources(nsIContent* aBoundElement)
{
if (mResources) {
bool result;
mResources->LoadResources(&result);
return result;
return mResources->LoadResources(aBoundElement);
}
return true;
@@ -571,6 +569,12 @@ nsXBLPrototypeBinding::GetRuleProcessor()
return nullptr;
}
const ServoStyleSet*
nsXBLPrototypeBinding::GetServoStyleSet() const
{
return mResources ? mResources->GetServoStyleSet() : nullptr;
}
void
nsXBLPrototypeBinding::EnsureAttributeTable()
{

View File

@@ -58,7 +58,9 @@ public:
nsresult BindingAttached(nsIContent* aBoundElement);
nsresult BindingDetached(nsIContent* aBoundElement);
bool LoadResources();
// aBoundElement is passed in here because we need to get owner document
// and PresContext in nsXBLResourceLoader::LoadResources().
bool LoadResources(nsIContent* aBoundElement);
nsresult AddResource(nsIAtom* aResourceType, const nsAString& aSrc);
bool InheritsStyle() const { return mInheritStyle; }
@@ -129,6 +131,7 @@ public:
void AppendStyleSheetsTo(nsTArray<mozilla::StyleSheet*>& aResult) const;
nsIStyleRuleProcessor* GetRuleProcessor();
const mozilla::ServoStyleSet* GetServoStyleSet() const;
nsresult FlushSkinSheets();

View File

@@ -38,6 +38,9 @@ nsXBLPrototypeResources::~nsXBLPrototypeResources()
if (mLoader) {
mLoader->mResources = nullptr;
}
if (mServoStyleSet) {
mServoStyleSet->Shutdown();
}
}
void
@@ -47,13 +50,14 @@ nsXBLPrototypeResources::AddResource(nsIAtom* aResourceType, const nsAString& aS
mLoader->AddResource(aResourceType, aSrc);
}
void
nsXBLPrototypeResources::LoadResources(bool* aResult)
bool
nsXBLPrototypeResources::LoadResources(nsIContent* aBoundElement)
{
if (mLoader)
mLoader->LoadResources(aResult);
else
*aResult = true; // All resources loaded.
if (mLoader) {
return mLoader->LoadResources(aBoundElement);
}
return true; // All resources loaded.
}
void
@@ -160,6 +164,22 @@ nsXBLPrototypeResources::GatherRuleProcessor()
mRuleProcessor);
}
void
nsXBLPrototypeResources::ComputeServoStyleSet(nsPresContext* aPresContext)
{
mServoStyleSet.reset(new ServoStyleSet());
mServoStyleSet->Init(aPresContext);
for (StyleSheet* sheet : mStyleSheetList) {
MOZ_ASSERT(sheet->IsServo(),
"This should only be called with Servo-flavored style backend!");
// The sheets aren't document sheets, but we need to decide a particular
// SheetType so that we can pull them out from the right place on the
// Servo side.
mServoStyleSet->AppendStyleSheet(SheetType::Doc, sheet->AsServo());
}
mServoStyleSet->UpdateStylistIfNeeded();
}
void
nsXBLPrototypeResources::AppendStyleSheet(StyleSheet* aSheet)
{

View File

@@ -7,6 +7,7 @@
#ifndef nsXBLPrototypeResources_h__
#define nsXBLPrototypeResources_h__
#include "mozilla/ServoBindings.h"
#include "mozilla/StyleSheet.h"
#include "nsICSSLoaderObserver.h"
@@ -18,6 +19,7 @@ class nsXBLResourceLoader;
namespace mozilla {
class CSSStyleSheet;
class ServoStyleSet;
} // namespace mozilla
// *********************************************************************/
@@ -29,7 +31,7 @@ public:
explicit nsXBLPrototypeResources(nsXBLPrototypeBinding* aBinding);
~nsXBLPrototypeResources();
void LoadResources(bool* aResult);
bool LoadResources(nsIContent* aBoundElement);
void AddResource(nsIAtom* aResourceType, const nsAString& aSrc);
void AddResourceListener(nsIContent* aElement);
nsresult FlushSkinSheets();
@@ -58,6 +60,13 @@ public:
nsCSSRuleProcessor* GetRuleProcessor() const { return mRuleProcessor; }
// Updates the ServoStyleSet object that holds the result of cascading the
// sheets in mStyleSheetList. Equivalent to GatherRuleProcessor(), but for
// the Servo style backend.
void ComputeServoStyleSet(nsPresContext* aPresContext);
const mozilla::ServoStyleSet* GetServoStyleSet() const { return mServoStyleSet.get(); }
private:
// A loader object. Exists only long enough to load resources, and then it dies.
RefPtr<nsXBLResourceLoader> mLoader;
@@ -67,6 +76,12 @@ private:
// The list of stylesheets converted to a rule processor.
RefPtr<nsCSSRuleProcessor> mRuleProcessor;
// The result of cascading the XBL style sheets like mRuleProcessor, but
// for the Servo style backend.
// XXX: We might want to design a better representation for the result of
// cascading the XBL style sheets, like a collection of SelectorMaps.
mozilla::UniquePtr<mozilla::ServoStyleSet> mServoStyleSet;
};
#endif

View File

@@ -81,24 +81,28 @@ nsXBLResourceLoader::~nsXBLResourceLoader()
delete mResourceList;
}
void
nsXBLResourceLoader::LoadResources(bool* aResult)
bool
nsXBLResourceLoader::LoadResources(nsIContent* aBoundElement)
{
mInLoadResourcesFunc = true;
if (mLoadingResources) {
*aResult = (mPendingSheets == 0);
mInLoadResourcesFunc = false;
return;
return mPendingSheets == 0;
}
mLoadingResources = true;
*aResult = true;
// Declare our loaders.
nsCOMPtr<nsIDocument> doc = mBinding->XBLDocumentInfo()->GetDocument();
mBoundDocument = aBoundElement->OwnerDoc();
mozilla::css::Loader* cssLoader = doc->CSSLoader();
MOZ_ASSERT(cssLoader->GetDocument() &&
cssLoader->GetDocument()->GetStyleBackendType()
== mBoundDocument->GetStyleBackendType(),
"The style backends of the loader and bound document are mismatched!");
nsIURI *docURL = doc->GetDocumentURI();
nsIPrincipal* docPrincipal = doc->NodePrincipal();
@@ -154,12 +158,13 @@ nsXBLResourceLoader::LoadResources(bool* aResult)
}
}
*aResult = (mPendingSheets == 0);
mInLoadResourcesFunc = false;
// Destroy our resource list.
delete mResourceList;
mResourceList = nullptr;
return mPendingSheets == 0;
}
// nsICSSLoaderObserver
@@ -182,6 +187,9 @@ nsXBLResourceLoader::StyleSheetLoaded(StyleSheet* aSheet,
// All stylesheets are loaded.
if (aSheet->IsGecko()) {
mResources->GatherRuleProcessor();
} else {
mResources->ComputeServoStyleSet(
mBoundDocument->GetShell()->GetPresContext());
}
// XXX Check for mPendingScripts when scripts also come online.

View File

@@ -19,6 +19,7 @@ class nsXBLPrototypeResources;
class nsXBLPrototypeBinding;
struct nsXBLResource;
class nsIObjectOutputStream;
class nsIDocument;
// *********************************************************************/
// The XBLResourceLoader class
@@ -34,7 +35,7 @@ public:
bool aWasAlternate,
nsresult aStatus) override;
void LoadResources(bool* aResult);
bool LoadResources(nsIContent* aBoundElement);
void AddResource(nsIAtom* aResourceType, const nsAString& aSrc);
void AddResourceListener(nsIContent* aElement);
@@ -66,6 +67,11 @@ public:
protected:
virtual ~nsXBLResourceLoader();
private:
// The bound document is needed in StyleSheetLoaded() for servo style
// backend, which will be set in LoadResources().
nsIDocument* MOZ_NON_OWNING_REF mBoundDocument;
};
#endif

View File

@@ -790,7 +790,7 @@ nsXBLService::GetBinding(nsIContent* aBoundElement, nsIURI* aURI,
}
// Our prototype binding must have all its resources loaded.
bool ready = protoBinding->LoadResources();
bool ready = protoBinding->LoadResources(aBoundElement);
if (!ready) {
// Add our bound element to the protos list of elts that should
// be notified when the stylesheets and scripts finish loading.

View File

@@ -8,7 +8,7 @@ load 326644-2.html
load 326864-1.xul
load 326875-1.xul
load 326881-1.xul
load 329982-1.xhtml
asserts-if(stylo,4) load 329982-1.xhtml # bug 1370830
load 336096-1.xhtml
load 344215-1.xul
load 354611-1.html
@@ -23,7 +23,7 @@ load 428951-1.xul
load 429085-1.xhtml
load 431906-1.html
load 451311-1.xul
load 461917-1.xhtml
skip-if(stylo) load 461917-1.xhtml # bug 1370153
load 468211-1.xul
load 468211-2.xul
load 468211-3.xul

View File

@@ -40,70 +40,70 @@ fails-if(Android) needs-focus != spellcheck-input-attr-dynamic-override-inherit.
fails-if(Android) needs-focus != spellcheck-input-property-dynamic-override.html spellcheck-input-ref.html
== spellcheck-input-property-dynamic-override-inherit.html spellcheck-input-nofocus-ref.html
fails-if(Android) needs-focus != spellcheck-input-property-dynamic-override-inherit.html spellcheck-input-ref.html
fails-if(styloVsGecko) == spellcheck-textarea-attr.html spellcheck-textarea-nofocus-ref.html
== spellcheck-textarea-attr.html spellcheck-textarea-nofocus-ref.html
#the random-if(Android) tests pass on android native, but fail on android-xul, see bug 728942
random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-attr.html spellcheck-textarea-ref.html
needs-focus fails-if(styloVsGecko) == spellcheck-textarea-focused.html spellcheck-textarea-ref.html
needs-focus fails-if(styloVsGecko) == spellcheck-textarea-focused-reframe.html spellcheck-textarea-ref.html
needs-focus fails-if(styloVsGecko) == spellcheck-textarea-focused-notreadonly.html spellcheck-textarea-ref2.html
random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-nofocus.html spellcheck-textarea-ref.html
random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-disabled.html spellcheck-textarea-ref.html
random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-attr-inherit.html spellcheck-textarea-ref.html
random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-attr-dynamic.html spellcheck-textarea-ref.html
random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-attr-dynamic-inherit.html spellcheck-textarea-ref.html
random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-property-dynamic.html spellcheck-textarea-ref.html
random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-property-dynamic-inherit.html spellcheck-textarea-ref.html
random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-attr-dynamic-override.html spellcheck-textarea-ref.html
random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-attr-dynamic-override-inherit.html spellcheck-textarea-ref.html
random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-property-dynamic-override.html spellcheck-textarea-ref.html
random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-property-dynamic-override-inherit.html spellcheck-textarea-ref.html
random-if(Android) needs-focus != spellcheck-textarea-attr.html spellcheck-textarea-ref.html
needs-focus == spellcheck-textarea-focused.html spellcheck-textarea-ref.html
needs-focus == spellcheck-textarea-focused-reframe.html spellcheck-textarea-ref.html
needs-focus == spellcheck-textarea-focused-notreadonly.html spellcheck-textarea-ref2.html
random-if(Android) needs-focus != spellcheck-textarea-nofocus.html spellcheck-textarea-ref.html
random-if(Android) needs-focus != spellcheck-textarea-disabled.html spellcheck-textarea-ref.html
random-if(Android) needs-focus != spellcheck-textarea-attr-inherit.html spellcheck-textarea-ref.html
random-if(Android) needs-focus != spellcheck-textarea-attr-dynamic.html spellcheck-textarea-ref.html
random-if(Android) needs-focus != spellcheck-textarea-attr-dynamic-inherit.html spellcheck-textarea-ref.html
random-if(Android) needs-focus != spellcheck-textarea-property-dynamic.html spellcheck-textarea-ref.html
random-if(Android) needs-focus != spellcheck-textarea-property-dynamic-inherit.html spellcheck-textarea-ref.html
random-if(Android) needs-focus != spellcheck-textarea-attr-dynamic-override.html spellcheck-textarea-ref.html
random-if(Android) needs-focus != spellcheck-textarea-attr-dynamic-override-inherit.html spellcheck-textarea-ref.html
random-if(Android) needs-focus != spellcheck-textarea-property-dynamic-override.html spellcheck-textarea-ref.html
random-if(Android) needs-focus != spellcheck-textarea-property-dynamic-override-inherit.html spellcheck-textarea-ref.html
needs-focus == caret_on_focus.html caret_on_focus-ref.html
needs-focus fails-if(styloVsGecko) != caret_on_textarea_lastline.html caret_on_textarea_lastline-ref.html
needs-focus != caret_on_textarea_lastline.html caret_on_textarea_lastline-ref.html
needs-focus == input-text-onfocus-reframe.html input-text-onfocus-reframe-ref.html
fuzzy-if(skiaContent,3,1) needs-focus == input-text-notheme-onfocus-reframe.html input-text-notheme-onfocus-reframe-ref.html
needs-focus == caret_after_reframe.html caret_after_reframe-ref.html
== nobogusnode-1.html nobogusnode-ref.html
== nobogusnode-2.html nobogusnode-ref.html
fails-if(styloVsGecko) == spellcheck-hyphen-valid.html spellcheck-hyphen-valid-ref.html
fails-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-hyphen-invalid.html spellcheck-hyphen-invalid-ref.html
fails-if(styloVsGecko) == spellcheck-slash-valid.html spellcheck-slash-valid-ref.html
fails-if(styloVsGecko) == spellcheck-period-valid.html spellcheck-period-valid-ref.html
fails-if(styloVsGecko) == spellcheck-space-valid.html spellcheck-space-valid-ref.html
fails-if(styloVsGecko) == spellcheck-comma-valid.html spellcheck-comma-valid-ref.html
fails-if(styloVsGecko) == spellcheck-hyphen-multiple-valid.html spellcheck-hyphen-multiple-valid-ref.html
fails-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-hyphen-multiple-invalid.html spellcheck-hyphen-multiple-invalid-ref.html
fails-if(styloVsGecko) == spellcheck-dotafterquote-valid.html spellcheck-dotafterquote-valid-ref.html
fails-if(styloVsGecko) == spellcheck-url-valid.html spellcheck-url-valid-ref.html
needs-focus fails-if(styloVsGecko) == spellcheck-non-latin-arabic.html spellcheck-non-latin-arabic-ref.html
needs-focus fails-if(styloVsGecko) == spellcheck-non-latin-chinese-simplified.html spellcheck-non-latin-chinese-simplified-ref.html
needs-focus fails-if(styloVsGecko) == spellcheck-non-latin-chinese-traditional.html spellcheck-non-latin-chinese-traditional-ref.html
needs-focus fails-if(styloVsGecko) == spellcheck-non-latin-hebrew.html spellcheck-non-latin-hebrew-ref.html
needs-focus fails-if(styloVsGecko) == spellcheck-non-latin-japanese.html spellcheck-non-latin-japanese-ref.html
needs-focus fails-if(styloVsGecko) == spellcheck-non-latin-korean.html spellcheck-non-latin-korean-ref.html
fails-if(styloVsGecko) == unneeded_scroll.html unneeded_scroll-ref.html
== spellcheck-hyphen-valid.html spellcheck-hyphen-valid-ref.html
fails-if(Android) needs-focus != spellcheck-hyphen-invalid.html spellcheck-hyphen-invalid-ref.html
== spellcheck-slash-valid.html spellcheck-slash-valid-ref.html
== spellcheck-period-valid.html spellcheck-period-valid-ref.html
== spellcheck-space-valid.html spellcheck-space-valid-ref.html
== spellcheck-comma-valid.html spellcheck-comma-valid-ref.html
== spellcheck-hyphen-multiple-valid.html spellcheck-hyphen-multiple-valid-ref.html
fails-if(Android) needs-focus != spellcheck-hyphen-multiple-invalid.html spellcheck-hyphen-multiple-invalid-ref.html
== spellcheck-dotafterquote-valid.html spellcheck-dotafterquote-valid-ref.html
== spellcheck-url-valid.html spellcheck-url-valid-ref.html
needs-focus == spellcheck-non-latin-arabic.html spellcheck-non-latin-arabic-ref.html
needs-focus == spellcheck-non-latin-chinese-simplified.html spellcheck-non-latin-chinese-simplified-ref.html
needs-focus == spellcheck-non-latin-chinese-traditional.html spellcheck-non-latin-chinese-traditional-ref.html
needs-focus == spellcheck-non-latin-hebrew.html spellcheck-non-latin-hebrew-ref.html
needs-focus == spellcheck-non-latin-japanese.html spellcheck-non-latin-japanese-ref.html
needs-focus == spellcheck-non-latin-korean.html spellcheck-non-latin-korean-ref.html
== unneeded_scroll.html unneeded_scroll-ref.html
== caret_on_presshell_reinit.html caret_on_presshell_reinit-ref.html
fuzzy-if(browserIsRemote,255,3) asserts-if(browserIsRemote,0-2) asserts-if(webrender&&!browserIsRemote,0-1) == caret_on_presshell_reinit-2.html caret_on_presshell_reinit-ref.html
fuzzy-if(asyncPan&&!layersGPUAccelerated,102,2824) fails-if(styloVsGecko) == 642800.html 642800-ref.html
fuzzy-if(asyncPan&&!layersGPUAccelerated,102,2824) == 642800.html 642800-ref.html
== selection_visibility_after_reframe.html selection_visibility_after_reframe-ref.html
!= selection_visibility_after_reframe-2.html selection_visibility_after_reframe-ref.html
!= selection_visibility_after_reframe-3.html selection_visibility_after_reframe-ref.html
== 672709.html 672709-ref.html
fails-if(styloVsGecko) == 338427-1.html 338427-1-ref.html
== 338427-1.html 338427-1-ref.html
skip-if(Android) needs-focus == 674212-spellcheck.html 674212-spellcheck-ref.html
skip-if(Android) needs-focus == 338427-2.html 338427-2-ref.html
skip-if(Android) needs-focus fails-if(styloVsGecko) == 338427-3.html 338427-3-ref.html
skip-if(Android) needs-focus == 338427-3.html 338427-3-ref.html
skip-if(Android) needs-focus == 462758-grabbers-resizers.html 462758-grabbers-resizers-ref.html
fails-if(styloVsGecko) == readwrite-non-editable.html readwrite-non-editable-ref.html
fails-if(styloVsGecko) == readwrite-editable.html readwrite-editable-ref.html
fails-if(styloVsGecko) == readonly-non-editable.html readonly-non-editable-ref.html
fails-if(styloVsGecko) == readonly-editable.html readonly-editable-ref.html
fails-if(styloVsGecko) == dynamic-overflow-change.html dynamic-overflow-change-ref.html
== readwrite-non-editable.html readwrite-non-editable-ref.html
== readwrite-editable.html readwrite-editable-ref.html
== readonly-non-editable.html readonly-non-editable-ref.html
== readonly-editable.html readonly-editable-ref.html
== dynamic-overflow-change.html dynamic-overflow-change-ref.html
== 694880-1.html 694880-ref.html
== 694880-2.html 694880-ref.html
== 694880-3.html 694880-ref.html
== 388980-1.html 388980-1-ref.html
needs-focus fails-if(styloVsGecko) == spellcheck-superscript-1.html spellcheck-superscript-1-ref.html
fails-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-superscript-2.html spellcheck-superscript-2-ref.html # bug 783658
needs-focus == spellcheck-superscript-1.html spellcheck-superscript-1-ref.html
fails-if(Android) needs-focus != spellcheck-superscript-2.html spellcheck-superscript-2-ref.html # bug 783658
fuzzy-if(skiaContent,1,3400) needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) == 824080-1.html 824080-1-ref.html
fuzzy-if(OSX,1,1) needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) == 824080-2.html 824080-2-ref.html #Bug 1313253
fuzzy-if(OSX,1,1) needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) == 824080-3.html 824080-3-ref.html #Bug 1312951
@@ -111,9 +111,9 @@ needs-focus != 824080-2.html 824080-3.html
fuzzy-if(skiaContent,1,3200) needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) == 824080-4.html 824080-4-ref.html
fuzzy-if(skiaContent,2,1800) needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) == 824080-5.html 824080-5-ref.html
needs-focus != 824080-4.html 824080-5.html
needs-focus fails-if(styloVsGecko) == 824080-6.html 824080-6-ref.html
needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) fails-if(styloVsGecko) == 824080-7.html 824080-7-ref.html
needs-focus fails-if(styloVsGecko) != 824080-6.html 824080-7.html
needs-focus == 824080-6.html 824080-6-ref.html
needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) == 824080-7.html 824080-7-ref.html
needs-focus != 824080-6.html 824080-7.html
# Bug 674927: copy spellcheck-textarea tests to contenteditable
== spellcheck-contenteditable-attr.html spellcheck-contenteditable-nofocus-ref.html
fails-if(Android) needs-focus != spellcheck-contenteditable-attr.html spellcheck-contenteditable-ref.html
@@ -133,5 +133,5 @@ needs-focus == spellcheck-contenteditable-focused-reframe.html spellcheck-conten
== spellcheck-contenteditable-property-dynamic-override-inherit.html spellcheck-contenteditable-disabled-ref.html
== 911201.html 911201-ref.html
needs-focus == 969773.html 969773-ref.html
fuzzy-if(skiaContent,1,220) fails-if(styloVsGecko) == 997805.html 997805-ref.html
fuzzy-if(skiaContent,1,220) fails-if(styloVsGecko) == 1088158.html 1088158-ref.html
fuzzy-if(skiaContent,1,220) == 997805.html 997805-ref.html
fuzzy-if(skiaContent,1,220) == 1088158.html 1088158-ref.html

View File

@@ -352,6 +352,12 @@ if CONFIG['GNU_CXX']:
'-Wno-shadow-local',
]
if CONFIG['_MSC_VER'] and not CONFIG['CLANG_CL']:
CXXFLAGS += [
'-wd4018', # '>' : signed/unsigned mismatch
'-wd4530', # C++ exception handler used, without /EHsc
]
if CONFIG['MOZ_DIRECTX_SDK_PATH'] and not CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
LOCAL_INCLUDES += ['%' + '%s/include/' % CONFIG['MOZ_DIRECTX_SDK_PATH']]

View File

@@ -971,6 +971,13 @@ PresShell::Init(nsIDocument* aDocument,
mStyleSet = aStyleSet;
mStyleSet->Init(aPresContext);
// Set up our style rule observer. We don't need to inform a ServoStyleSet
// of the binding manager because it gets XBL style sheets from bindings
// in a different way.
if (mStyleSet->IsGecko()) {
mStyleSet->AsGecko()->SetBindingManager(mDocument->BindingManager());
}
// Notify our prescontext that it now has a compatibility mode. Note that
// this MUST happen after we set up our style set but before we create any
// frames.

View File

@@ -150,7 +150,7 @@ load 373919.xhtml
load 374193-1.xhtml
load 374297-1.html
load 374297-2.html
load 376223-1.xhtml
asserts-if(stylo,2) load 376223-1.xhtml # bug 1370830
load 378325-1.html
load 378682.html
load 379105-1.xhtml
@@ -162,9 +162,9 @@ load 379920-2.svg
load 379975.html
load 380096-1.html
load 382204-1.html # bug 1323680
load 383102-1.xhtml
asserts-if(stylo,2) load 383102-1.xhtml # bug 1370830
load 383129-1.html
load 383806-1.xhtml
asserts-if(stylo,1) load 383806-1.xhtml # bug 1370830
load 384344-1.html
load 384392-1.xhtml
load 384392-2.svg
@@ -242,7 +242,7 @@ load 421432.html
load 422276.html
asserts(0-1) load 423107-1.xhtml # bug 866955
load 425981-1.html
load 428113.xhtml
asserts-if(stylo,6) load 428113.xhtml # bug 1370830
load 428138-1.html
load 428448-1.html
load 429088-1.html

View File

@@ -2746,16 +2746,6 @@ nsCSSFrameConstructor::ConstructRootFrame()
StyleSetHandle styleSet = mPresShell->StyleSet();
// Set up our style rule observer.
// XXXbz wouldn't this make more sense as part of presshell init?
if (styleSet->IsGecko()) {
// XXXheycam We don't support XBL bindings providing style to
// ServoStyleSets yet.
styleSet->AsGecko()->SetBindingManager(mDocument->BindingManager());
} else {
NS_WARNING("stylo: cannot get ServoStyleSheets from XBL bindings yet. See bug 1290276.");
}
// --------- BUILD VIEWPORT -----------
RefPtr<nsStyleContext> viewportPseudoStyle =
styleSet->ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::viewport,
@@ -5829,14 +5819,27 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState
aState.AddPendingBinding(newPendingBinding.forget());
}
if (aContent->IsStyledByServo()) {
NS_WARNING("stylo: Skipping Unsupported binding re-resolve. This needs fixing.");
resolveStyle = false;
}
if (resolveStyle) {
styleContext =
ResolveStyleContext(styleContext->GetParent(), aContent, &aState);
if (aContent->IsStyledByServo()) {
Element* element = aContent->AsElement();
ServoStyleSet* styleSet = mPresShell->StyleSet()->AsServo();
// XXX: We should have a better way to restyle ourselves.
ServoRestyleManager::ClearServoDataFromSubtree(element);
styleSet->StyleNewSubtree(element);
// Servo's should_traverse_children() in traversal.rs skips
// styling descendants of elements with a -moz-binding the
// first time. Thus call StyleNewChildren() again.
styleSet->StyleNewChildren(element);
styleContext =
styleSet->ResolveStyleFor(element, nullptr, LazyComputeBehavior::Allow);
} else {
styleContext =
ResolveStyleContext(styleContext->GetParent(), aContent, &aState);
}
display = styleContext->StyleDisplay();
aStyleContext = styleContext;
}

View File

@@ -1697,46 +1697,6 @@ nsRefreshDriver::RunFrameRequestCallbacks(TimeStamp aNowTime)
}
}
struct RunnableWithDelay
{
nsCOMPtr<nsIRunnable> mRunnable;
uint32_t mDelay;
};
static AutoTArray<RunnableWithDelay, 8>* sPendingIdleRunnables = nullptr;
void
nsRefreshDriver::DispatchIdleRunnableAfterTick(nsIRunnable* aRunnable,
uint32_t aDelay)
{
if (!sPendingIdleRunnables) {
sPendingIdleRunnables = new AutoTArray<RunnableWithDelay, 8>();
}
RunnableWithDelay rwd = {aRunnable, aDelay};
sPendingIdleRunnables->AppendElement(rwd);
}
void
nsRefreshDriver::CancelIdleRunnable(nsIRunnable* aRunnable)
{
if (!sPendingIdleRunnables) {
return;
}
for (uint32_t i = 0; i < sPendingIdleRunnables->Length(); ++i) {
if ((*sPendingIdleRunnables)[i].mRunnable == aRunnable) {
sPendingIdleRunnables->RemoveElementAt(i);
break;
}
}
if (sPendingIdleRunnables->IsEmpty()) {
delete sPendingIdleRunnables;
sPendingIdleRunnables = nullptr;
}
}
void
nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
{
@@ -1999,7 +1959,7 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
}
}
bool dispatchRunnablesAfterTick = false;
bool notifyGC = false;
if (mViewManagerFlushIsPending) {
RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
@@ -2038,7 +1998,7 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
timelines->AddMarkerForDocShell(docShell, "Paint", MarkerTracingType::END);
}
dispatchRunnablesAfterTick = true;
notifyGC = true;
}
#ifndef ANDROID /* bug 1142079 */
@@ -2057,14 +2017,10 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
ScheduleViewManagerFlush();
}
if (dispatchRunnablesAfterTick && sPendingIdleRunnables) {
AutoTArray<RunnableWithDelay, 8>* runnables = sPendingIdleRunnables;
sPendingIdleRunnables = nullptr;
for (uint32_t i = 0; i < runnables->Length(); ++i) {
NS_IdleDispatchToCurrentThread((*runnables)[i].mRunnable.forget(),
(*runnables)[i].mDelay);
}
delete runnables;
if (notifyGC && nsContentUtils::XPConnect()) {
GeckoProfilerTracingRAII tracer("Paint", "NotifyDidPaint");
nsContentUtils::XPConnect()->NotifyDidPaint();
nsJSContext::NotifyDidPaint();
}
}

View File

@@ -33,7 +33,6 @@ class nsIDocument;
class imgIRequest;
class nsIDOMEvent;
class nsINode;
class nsIRunnable;
namespace mozilla {
class RefreshDriverTimer;
@@ -334,10 +333,6 @@ public:
*/
static mozilla::TimeStamp GetIdleDeadlineHint(mozilla::TimeStamp aDefault);
static void DispatchIdleRunnableAfterTick(nsIRunnable* aRunnable,
uint32_t aDelay);
static void CancelIdleRunnable(nsIRunnable* aRunnable);
bool SkippedPaints() const
{
return mSkippedPaints;

View File

@@ -77,7 +77,7 @@ load 368568.html
load 368752.html
load 368860-1.html
load 368863-1.html
load 369038-1.xhtml
asserts-if(stylo,2) load 369038-1.xhtml # bug 1370830
load 369150-1.html
load 369150-2.html
load 369227-1.xhtml
@@ -332,7 +332,7 @@ load 468771-1.xhtml
load 468771-2.xhtml
load 469859-1.xhtml # bug 1323665
load 472587-1.xhtml
load 472617-1.xhtml
asserts-if(stylo,2) load 472617-1.xhtml # bug 1370830
load 472774-1.html
load 472776-1.html
load 472950-1.html

View File

@@ -76,7 +76,7 @@ fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azur
== 263359-3.html 263359-3-ref.html
== 263359-4.html 263359-4-ref.html
random-if(winWidget) fuzzy-if(skiaContent,1,1700) == 267459-1.html 267459-1-ref.html # depends on windows version, see bug 590101
fuzzy-if(skiaContent,1,1100) fails-if(styloVsGecko) == 267459-2.html 267459-2-ref.html
fuzzy-if(skiaContent,1,1100) == 267459-2.html 267459-2-ref.html
== 299065-1.html 299065-1-ref.html
random-if(winWidget) == 305643-1.html 305643-1-ref.html # depends on windows version, see bug 590101
== 332655-1.html 332655-1-ref.html
@@ -118,7 +118,7 @@ fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azur
== 662288-1.html 662288-1-ref.html
== 670226-1.html 670226-1-ref.html
== 676245-1.html 676245-1-ref.html
fuzzy-if(skiaContent,1,3) fails-if(styloVsGecko) == 698291-1.html 698291-1-ref.html
fuzzy-if(skiaContent,1,3) == 698291-1.html 698291-1-ref.html
== 698706-1.html 698706-1-ref.html
== 704837-1.html 704837-1-ref.html
== 712600-1.html 712600-1-ref.html

View File

@@ -82,11 +82,11 @@ fuzzy-if(gtkWidget,6,26200) == 28811-2b.html 28811-2-ref.html # Bug 1128229
== 68061-2.xml 68061-2-ref.xml
== 76331-1.html 76331-1-ref.html
== 81947-1.html 81947-ref.html
fails-if(styloVsGecko) == 82711-1.html 82711-1-ref.html
== 82711-1.html 82711-1-ref.html
fails-if(styloVsGecko) == 82711-2.html 82711-2-ref.html
fails-if(styloVsGecko) == 82711-3.html 82711-3-ref.html
fails-if(styloVsGecko) != 82711-1-ref.html 82711-2-ref.html
fails-if(styloVsGecko) != 82711-1-ref.html 82711-3-ref.html
== 82711-3.html 82711-3-ref.html
!= 82711-1-ref.html 82711-2-ref.html
!= 82711-1-ref.html 82711-3-ref.html
fails-if(styloVsGecko) != 82711-2-ref.html 82711-3-ref.html
fuzzy-if(Android,4,1) == 84400-1.html 84400-1-ref.html
fuzzy-if(skiaContent,2,13) == 84400-2.html 84400-2-ref.html
@@ -237,14 +237,14 @@ fuzzy-if(skiaContent,1,4) == 220165-1.svg 220165-1-ref.svg
== 234686-17.html 234686-ref.html
== 234686-18.html 234686-ref.html
== 234686-19.html 234686-ref.html
fails-if(styloVsGecko) == 234964-1.html 234964-1-ref.html
== 234964-1.html 234964-1-ref.html
== 234964-2.html 234964-2-ref.html
== 235593-1.html 235593-1-ref.html
fuzzy-if(skiaContent,4,2) == 236539-1.html 236539-1-ref.html
== 240029-1.html 240029-1-ref.html
== 240470-1.html 240470-1-ref.html
fails-if(styloVsGecko) == 240933-1.html 240933-1-ref.html
skip-if(Android) fails-if(styloVsGecko) == 240933-2.html 240933-2-ref.html
== 240933-1.html 240933-1-ref.html
skip-if(Android) == 240933-2.html 240933-2-ref.html
== 243266-1.html 243266-1-ref.html
== 243302-1.html 243302-1-ref.html
skip-if(Android&&asyncPan) == 243519-1.html 243519-1-ref.html
@@ -304,10 +304,10 @@ fuzzy-if(Android,3,50) fuzzy-if(skiaContent,1,133) == 273681-1.html 273681-1-ref
== 283686-1.html about:blank
== 283686-2.html 283686-2-ref.html
== 283686-3.html about:blank
fails-if(styloVsGecko) == 289384-1.xhtml 289384-ref.xhtml
== 289384-1.xhtml 289384-ref.xhtml
random-if(d2d) fuzzy-if(Android,8,1439) skip-if(styloVsGecko) HTTP == 289480.html#top 289480-ref.html # basically-verbatim acid2 test, HTTP for a 404 page -- bug 578114 for the d2d failures, bug 1354406
== 290129-1.html 290129-1-ref.html
fails-if(styloVsGecko) == 291078-1.html 291078-1-ref.html
== 291078-1.html 291078-1-ref.html
== 291078-2.html 291078-2-ref.html
== 291262-1.html 291262-1-ref.html
== 294306-1.html 294306-1a-ref.html
@@ -318,12 +318,12 @@ fails-if(styloVsGecko) == 291078-1.html 291078-1-ref.html
== 299837-1.html 299837-1-ref.html
== 299837-2.xul 299837-2-ref.xul
random-if(d2d) == 299837-3.xul 299837-3-ref.xul # bug 587631
fails-if(styloVsGecko) == 300691-1a.html 300691-1-ref.html
fails-if(styloVsGecko) == 300691-1b.html 300691-1-ref.html
fails-if(styloVsGecko) == 300691-1c.html 300691-1-ref.html
fails-if(styloVsGecko) == 300691-1d.html 300691-1-ref.html
fails-if(styloVsGecko) == 300691-1e.html 300691-1-ref.html
fails-if(styloVsGecko) == 300691-1f.html 300691-1-ref.html
== 300691-1a.html 300691-1-ref.html
== 300691-1b.html 300691-1-ref.html
== 300691-1c.html 300691-1-ref.html
== 300691-1d.html 300691-1-ref.html
== 300691-1e.html 300691-1-ref.html
== 300691-1f.html 300691-1-ref.html
== 301726-1.html 301726-1-ref.html
fails-if(Android) != 301726-2.html 301726-2-ref.html
== 302379.html 302379-ref.html
@@ -550,7 +550,7 @@ fuzzy-if(skiaContent,2,4) == 362594-2c.html 362594-2-standards-ref.html
== 363637-1.html 363637-1-ref.html
skip-if(Android) == 363706-1.html 363706-1-ref.html
!= 363706-1.html about:blank
fails-if(styloVsGecko) == 363728-1.html 363728-1-ref.html
== 363728-1.html 363728-1-ref.html
== 363728-2.html 363728-2-ref.html
fuzzy-if(skiaContent||Android,4,11) == 363858-1.html 363858-1-ref.html
== 363858-2.html 363858-2-ref.html
@@ -735,7 +735,7 @@ HTTP(..) == 385569-1b.html 385569-1-ref.html
fuzzy-if(webrender,0-1,0-600) == 385823-2a.html 385823-2-ref.html
fails-if(!styloVsGecko) == 385823-2b.html 385823-2-ref.html
fuzzy-if(webrender,0-1,0-600) == 385823-2c.html 385823-2-ref.html
fuzzy-if(skiaContent,2,11) fails-if(styloVsGecko) == 385870-1.html 385870-1-ref.html
fuzzy-if(skiaContent,2,11) == 385870-1.html 385870-1-ref.html
fuzzy-if(skiaContent,2,3) == 385870-2.html 385870-2-ref.html
== 386014-1a.html 386014-1-ref.html
== 386014-1b.html 386014-1-ref.html
@@ -1501,8 +1501,8 @@ fuzzy-if(Android,12,300) == 551463-1.html 551463-1-ref.html
random != 553571-1.html 553571-1-notref.html # expect dotted circle in test, not in ref: "fails" under harfbuzz, which doesn't consider the sequence invalid
fuzzy-if(!contentSameGfxBackendAsCanvas,128,91) random-if(d2d) skip-if(azureSkiaGL) fuzzy-if(skiaContent,32,150) == 555388-1.html 555388-1-ref.html
== 556661-1.html 556661-1-ref.html
fuzzy-if(skiaContent,4,5) fails-if(styloVsGecko) == 557087-1.html 557087-ref.html
fails-if(Android) fuzzy-if(skiaContent&&!Android,2,5) fails-if(styloVsGecko) == 557087-2.html 557087-ref.html
fuzzy-if(skiaContent,4,5) == 557087-1.html 557087-ref.html
fails-if(Android) fuzzy-if(skiaContent&&!Android,2,5) == 557087-2.html 557087-ref.html
== 557736-1.html 557736-1-ref.html
!= 558011-1.xul 558011-1-ref.xul
== 559284-1.html 559284-1-ref.html
@@ -1605,7 +1605,7 @@ fails-if(!haveTestPlugin) HTTP == 599476.html 599476-ref.html
== 599882-1b.html 599882-1-ref.html
== 599882-2.html 599882-2-ref.html
== 600045-1.html 600045-1-ref.html
fails-if(styloVsGecko) == 600803-1.html 600803-1-ref.html
== 600803-1.html 600803-1-ref.html
== 600974-1.html 600974-1-ref.html
== 600974-2.html 600974-1-ref.html
== 600974-3.html 600974-1-ref.html
@@ -1728,20 +1728,20 @@ fuzzy-if(cocoaWidget,1,300000) fuzzy-if(skiaContent,2,300000) == 745934-1.html 7
== 748692-1b.html 748692-1-ref.html
== 748803-1.html 748803-1-ref.html
== 750551-1.html 750551-1-ref.html
fuzzy-if(skiaContent,1,1) fails-if(styloVsGecko) == 751012-1a.html 751012-1-ref.html
fuzzy-if(skiaContent,1,1) fails-if(styloVsGecko) == 751012-1b.html 751012-1-ref.html
fuzzy-if(skiaContent,1,1) == 751012-1a.html 751012-1-ref.html
fuzzy-if(skiaContent,1,1) == 751012-1b.html 751012-1-ref.html
random-if(Android) == 753329-1.html about:blank
== 758561-1.html 758561-1-ref.html
fuzzy-if(true,1,90) fuzzy-if(skiaContent,1,320) == 759036-1.html 759036-1-ref.html
fuzzy-if(true,17,5886) fuzzy-if(skiaContent,9,5894) == 759036-2.html 759036-2-ref.html
fails-if(styloVsGecko) == 776265-1a.html 776265-1-ref.html
fails-if(styloVsGecko) == 776265-1b.html 776265-1-ref.html
fails-if(styloVsGecko) == 776265-1c.html 776265-1-ref.html
fails-if(styloVsGecko) == 776265-1d.html 776265-1-ref.html
fails-if(styloVsGecko) == 776265-2a.html 776265-2-ref.html
fails-if(styloVsGecko) == 776265-2b.html 776265-2-ref.html
fails-if(styloVsGecko) == 776265-2c.html 776265-2-ref.html
fails-if(styloVsGecko) == 776265-2d.html 776265-2-ref.html
== 776265-1a.html 776265-1-ref.html
== 776265-1b.html 776265-1-ref.html
== 776265-1c.html 776265-1-ref.html
== 776265-1d.html 776265-1-ref.html
== 776265-2a.html 776265-2-ref.html
== 776265-2b.html 776265-2-ref.html
== 776265-2c.html 776265-2-ref.html
== 776265-2d.html 776265-2-ref.html
== 776443-1.html 776443-1-ref.html
== 776443-2.html 776443-2-ref.html
== 786254-1.html 786254-1-ref.html
@@ -1966,7 +1966,7 @@ fuzzy-if(webrender,0-1,0-2400) == 1242172-2.html 1242172-2-ref.html
== 1272997-1.html 1272997-1-ref.html
random-if(!winWidget) == 1273154-1.html 1273154-1-ref.html # depends on Windows font
random-if(!winWidget) == 1273154-2.html 1273154-2-ref.html # depends on Windows font
fails-if(styloVsGecko) == 1274368-1.html 1274368-1-ref.html
== 1274368-1.html 1274368-1-ref.html
!= 1276161-1a.html 1276161-1-notref.html
!= 1276161-1b.html 1276161-1-notref.html
!= 1276161-1a.html 1276161-1b.html

View File

@@ -1,9 +1,9 @@
fuzzy-if(skiaContent,1,10) fails-if(styloVsGecko) == textarea-fieldset-1.html textarea-fieldset-ref.html
fails-if(styloVsGecko) == textarea-fieldset-2.html textarea-fieldset-ref.html
fails-if(styloVsGecko) == textarea-fieldset-3.html textarea-fieldset-ref.html
fails-if(styloVsGecko) == textarea-fieldset-4.html textarea-fieldset-ref.html
fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-legend-1.html textarea-fieldset-legend-ref-1.html
fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-legend-2.html textarea-fieldset-legend-ref-2.html
fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-legend-3.html textarea-fieldset-legend-ref-3.html
fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-legend-4.html textarea-fieldset-legend-ref-4.html
fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-legend-5.html textarea-fieldset-legend-ref-5.html
fuzzy-if(skiaContent,1,10) == textarea-fieldset-1.html textarea-fieldset-ref.html
== textarea-fieldset-2.html textarea-fieldset-ref.html
== textarea-fieldset-3.html textarea-fieldset-ref.html
== textarea-fieldset-4.html textarea-fieldset-ref.html
fuzzy-if(skiaContent,1,5) == textarea-fieldset-legend-1.html textarea-fieldset-legend-ref-1.html
fuzzy-if(skiaContent,1,5) == textarea-fieldset-legend-2.html textarea-fieldset-legend-ref-2.html
fuzzy-if(skiaContent,1,5) == textarea-fieldset-legend-3.html textarea-fieldset-legend-ref-3.html
fuzzy-if(skiaContent,1,5) == textarea-fieldset-legend-4.html textarea-fieldset-legend-ref-4.html
fuzzy-if(skiaContent,1,5) == textarea-fieldset-legend-5.html textarea-fieldset-legend-ref-5.html

View File

@@ -1,9 +1,9 @@
fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-1.html textarea-fieldset-ref.html
fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-2.html textarea-fieldset-ref.html
fails-if(styloVsGecko) == textarea-fieldset-3.html textarea-fieldset-ref.html
fails-if(styloVsGecko) == textarea-fieldset-4.html textarea-fieldset-ref.html
fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-legend-1.html textarea-fieldset-legend-ref-1.html
fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-legend-2.html textarea-fieldset-legend-ref-2.html
fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-legend-3.html textarea-fieldset-legend-ref-3.html
fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-legend-4.html textarea-fieldset-legend-ref-4.html
fuzzy-if(skiaContent,1,10) fails-if(styloVsGecko) == textarea-fieldset-legend-5.html textarea-fieldset-legend-ref-5.html
fuzzy-if(skiaContent,1,5) == textarea-fieldset-1.html textarea-fieldset-ref.html
fuzzy-if(skiaContent,1,5) == textarea-fieldset-2.html textarea-fieldset-ref.html
== textarea-fieldset-3.html textarea-fieldset-ref.html
== textarea-fieldset-4.html textarea-fieldset-ref.html
fuzzy-if(skiaContent,1,5) == textarea-fieldset-legend-1.html textarea-fieldset-legend-ref-1.html
fuzzy-if(skiaContent,1,5) == textarea-fieldset-legend-2.html textarea-fieldset-legend-ref-2.html
fuzzy-if(skiaContent,1,5) == textarea-fieldset-legend-3.html textarea-fieldset-legend-ref-3.html
fuzzy-if(skiaContent,1,5) == textarea-fieldset-legend-4.html textarea-fieldset-legend-ref-4.html
fuzzy-if(skiaContent,1,10) == textarea-fieldset-legend-5.html textarea-fieldset-legend-ref-5.html

View File

@@ -1,5 +1,5 @@
== input.html input-ref.html
== button.html button-ref.html
fails-if(styloVsGecko) == textarea.html textarea-ref.html
== textarea.html textarea-ref.html
== select.html select-ref.html
== fieldset.html fieldset-ref.html

View File

@@ -1,13 +1,13 @@
fails-if(styloVsGecko) == textarea-valid.html textarea-ref.html
fails-if(styloVsGecko) == textarea-customerror.html textarea-ref.html
fails-if(styloVsGecko) == textarea-disabled.html textarea-ref.html
fails-if(styloVsGecko) == textarea-dyn-disabled.html textarea-ref.html
fails-if(styloVsGecko) == textarea-dyn-not-disabled.html textarea-ref.html
fails-if(styloVsGecko) == textarea-readonly.html textarea-ref.html
fails-if(styloVsGecko) == textarea-dyn-readonly.html textarea-ref.html
fails-if(styloVsGecko) == textarea-dyn-not-readonly.html textarea-ref.html
fails-if(styloVsGecko) == textarea-required-valid.html textarea-withtext-ref.html
fails-if(styloVsGecko) == textarea-required-invalid.html textarea-ref.html
fails-if(styloVsGecko) == textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
fails-if(styloVsGecko) == textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
fails-if(styloVsGecko) == textarea-fieldset-legend.html textarea-fieldset-legend-ref.html
== textarea-valid.html textarea-ref.html
== textarea-customerror.html textarea-ref.html
== textarea-disabled.html textarea-ref.html
== textarea-dyn-disabled.html textarea-ref.html
== textarea-dyn-not-disabled.html textarea-ref.html
== textarea-readonly.html textarea-ref.html
== textarea-dyn-readonly.html textarea-ref.html
== textarea-dyn-not-readonly.html textarea-ref.html
== textarea-required-valid.html textarea-withtext-ref.html
== textarea-required-invalid.html textarea-ref.html
== textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
== textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
== textarea-fieldset-legend.html textarea-fieldset-legend-ref.html

View File

@@ -1,5 +1,5 @@
# Checking if these elements support :optional.
fails-if(styloVsGecko) == css-optional-textarea.html css-optional-textarea-ref.html
== css-optional-textarea.html css-optional-textarea-ref.html
== css-optional-input.html css-optional-input-ref.html
== css-optional-select.html css-optional-select-ref.html
== css-optional-button.html about:blank

View File

@@ -2,6 +2,6 @@ include input/reftest.list
include textarea/reftest.list
fuzzy-if(skiaContent,1,4) fails-if(styloVsGecko||stylo) == css-restrictions.html css-restrictions-ref.html
fails-if(styloVsGecko) == css-simple-styling.html css-simple-styling-ref.html
fails-if(styloVsGecko) != css-background.html css-background-ref.html
fuzzy-if(skiaContent,1,180) fails-if(styloVsGecko) == ignore-pseudo-class.html ignore-pseudo-class-ref.html
== css-simple-styling.html css-simple-styling-ref.html
!= css-background.html css-background-ref.html
fuzzy-if(skiaContent,1,180) == ignore-pseudo-class.html ignore-pseudo-class-ref.html

View File

@@ -8,19 +8,19 @@
# ::value (bug 648643), depending of the ::value behaviour (it could change the
# caret colour and the text colour or just the text colour).
fails-if(styloVsGecko) == placeholder-simple.html placeholder-simple-ref.html
== placeholder-simple.html placeholder-simple-ref.html
# needs-focus == placeholder-focus.html placeholder-focus-ref.html
needs-focus fails-if(styloVsGecko) == placeholder-blur.html placeholder-simple-ref.html
fails-if(styloVsGecko) == placeholder-value.html placeholder-value-ref.html
fails-if(styloVsGecko) == placeholder-empty-string.html placeholder-empty-string-ref.html
fails-if(styloVsGecko) == placeholder-add.html placeholder-simple-ref.html
fails-if(styloVsGecko) == placeholder-removal.html textarea-ref.html
fails-if(styloVsGecko) == placeholder-value-set.html placeholder-value-ref.html
fails-if(styloVsGecko) == placeholder-value-unset.html placeholder-simple-ref.html
fails-if(styloVsGecko) == placeholder-value-reset.html placeholder-simple-ref.html
fails-if(styloVsGecko) == placeholdershown.html placeholdershown-ref.html
needs-focus == placeholder-blur.html placeholder-simple-ref.html
== placeholder-value.html placeholder-value-ref.html
== placeholder-empty-string.html placeholder-empty-string-ref.html
== placeholder-add.html placeholder-simple-ref.html
== placeholder-removal.html textarea-ref.html
== placeholder-value-set.html placeholder-value-ref.html
== placeholder-value-unset.html placeholder-simple-ref.html
== placeholder-value-reset.html placeholder-simple-ref.html
== placeholdershown.html placeholdershown-ref.html
== css-resize.html css-resize-ref.html
fails-if(styloVsGecko) == css-display.html placeholder-simple-ref.html
== css-display.html placeholder-simple-ref.html
# We can't check except by verifying that the output is different.
# Same reasons as focus issues explained above.
fails-if(styloVsGecko) != css-opacity.html placeholder-simple-ref.html
!= css-opacity.html placeholder-simple-ref.html

View File

@@ -1,5 +1,5 @@
# Checking if these types/elements support :required
fails-if(styloVsGecko) == css-required-textarea.html css-required-textarea-ref.html
== css-required-textarea.html css-required-textarea-ref.html
== css-required-radio.html css-required-radio-ref.html
== css-required-text.html css-required-text-ref.html
== css-required-checkbox.html css-required-checkbox-ref.html

View File

@@ -1,10 +1,10 @@
== input.html input-ref.html
fuzzy-if(webrender,1-1,5-10) == button.html button-ref.html
fails-if(styloVsGecko) == textarea.html textarea-ref.html
== textarea.html textarea-ref.html
== select.html select-ref.html
== fieldset.html fieldset-ref.html
== output.html output-ref.html
random-if(winWidget) needs-focus == input-focus.html input-focus-ref.html # Intermittent failures, bug 660224
needs-focus == button-focus.html button-focus-ref.html
needs-focus fails-if(styloVsGecko) == textarea-focus.html textarea-focus-ref.html
needs-focus == textarea-focus.html textarea-focus-ref.html
random-if(winWidget) needs-focus == select-focus.html select-focus-ref.html # Intermittent failures, bug 660224

View File

@@ -1,15 +1,15 @@
fails-if(styloVsGecko) == textarea-valid.html textarea-ref.html
fails-if(styloVsGecko) == textarea-customerror.html textarea-ref.html
fails-if(styloVsGecko) == textarea-disabled.html textarea-ref.html
fails-if(styloVsGecko) == textarea-dyn-disabled.html textarea-ref.html
fails-if(styloVsGecko) == textarea-dyn-not-disabled.html textarea-ref.html
fails-if(styloVsGecko) == textarea-readonly.html textarea-ref.html
fails-if(styloVsGecko) == textarea-dyn-readonly.html textarea-ref.html
fails-if(styloVsGecko) == textarea-dyn-not-readonly-not-changed.html textarea-ref.html
fails-if(styloVsGecko) == textarea-dyn-not-readonly-changed.html textarea-ref.html
fails-if(styloVsGecko) == textarea-required-valid.html textarea-withtext-ref.html
fails-if(styloVsGecko) == textarea-required-invalid.html textarea-ref.html
fails-if(styloVsGecko) == textarea-required-invalid-changed.html textarea-ref.html
fails-if(styloVsGecko) == textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
fails-if(styloVsGecko) == textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
fails-if(styloVsGecko) == textarea-novalidate.html textarea-ref.html
== textarea-valid.html textarea-ref.html
== textarea-customerror.html textarea-ref.html
== textarea-disabled.html textarea-ref.html
== textarea-dyn-disabled.html textarea-ref.html
== textarea-dyn-not-disabled.html textarea-ref.html
== textarea-readonly.html textarea-ref.html
== textarea-dyn-readonly.html textarea-ref.html
== textarea-dyn-not-readonly-not-changed.html textarea-ref.html
== textarea-dyn-not-readonly-changed.html textarea-ref.html
== textarea-required-valid.html textarea-withtext-ref.html
== textarea-required-invalid.html textarea-ref.html
== textarea-required-invalid-changed.html textarea-ref.html
== textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
== textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
== textarea-novalidate.html textarea-ref.html

View File

@@ -1,17 +1,17 @@
fails-if(styloVsGecko) == textarea-valid.html textarea-ref.html
fails-if(styloVsGecko) == textarea-customerror.html textarea-ref.html
fails-if(styloVsGecko) == textarea-disabled.html textarea-ref.html
fails-if(styloVsGecko) == textarea-dyn-disabled.html textarea-ref.html
fails-if(styloVsGecko) == textarea-dyn-not-disabled.html textarea-ref.html
fails-if(styloVsGecko) == textarea-dyn-not-disabled-changed.html textarea-ref.html
fails-if(styloVsGecko) == textarea-readonly.html textarea-ref.html
fails-if(styloVsGecko) == textarea-dyn-readonly.html textarea-ref.html
fails-if(styloVsGecko) == textarea-dyn-not-readonly.html textarea-ref.html
fails-if(styloVsGecko) == textarea-dyn-not-readonly-changed.html textarea-ref.html
fails-if(styloVsGecko) == textarea-required-valid.html textarea-withtext-ref.html
fails-if(styloVsGecko) == textarea-required-valid-changed.html textarea-withtext-ref.html
fails-if(styloVsGecko) == textarea-required-invalid.html textarea-ref.html
fails-if(styloVsGecko) == textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
fails-if(styloVsGecko) == textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
fails-if(styloVsGecko) == textarea-fieldset-legend.html textarea-fieldset-legend-ref.html
fails-if(styloVsGecko) == textarea-novalidate.html textarea-withtext-ref.html
== textarea-valid.html textarea-ref.html
== textarea-customerror.html textarea-ref.html
== textarea-disabled.html textarea-ref.html
== textarea-dyn-disabled.html textarea-ref.html
== textarea-dyn-not-disabled.html textarea-ref.html
== textarea-dyn-not-disabled-changed.html textarea-ref.html
== textarea-readonly.html textarea-ref.html
== textarea-dyn-readonly.html textarea-ref.html
== textarea-dyn-not-readonly.html textarea-ref.html
== textarea-dyn-not-readonly-changed.html textarea-ref.html
== textarea-required-valid.html textarea-withtext-ref.html
== textarea-required-valid-changed.html textarea-withtext-ref.html
== textarea-required-invalid.html textarea-ref.html
== textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
== textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
== textarea-fieldset-legend.html textarea-fieldset-legend-ref.html
== textarea-novalidate.html textarea-withtext-ref.html

View File

@@ -1,13 +1,13 @@
fails-if(styloVsGecko) == textarea-valid.html textarea-ref.html
fails-if(styloVsGecko) == textarea-customerror.html textarea-ref.html
fails-if(styloVsGecko) == textarea-disabled.html textarea-ref.html
fails-if(styloVsGecko) == textarea-dyn-disabled.html textarea-ref.html
fails-if(styloVsGecko) == textarea-dyn-not-disabled.html textarea-ref.html
fails-if(styloVsGecko) == textarea-readonly.html textarea-ref.html
fails-if(styloVsGecko) == textarea-dyn-readonly.html textarea-ref.html
fails-if(styloVsGecko) == textarea-dyn-not-readonly.html textarea-ref.html
fails-if(styloVsGecko) == textarea-required-valid.html textarea-withtext-ref.html
fails-if(styloVsGecko) == textarea-required-invalid.html textarea-ref.html
fails-if(styloVsGecko) == textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
fails-if(styloVsGecko) == textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
fails-if(styloVsGecko) == textarea-fieldset-legend.html textarea-fieldset-legend-ref.html
== textarea-valid.html textarea-ref.html
== textarea-customerror.html textarea-ref.html
== textarea-disabled.html textarea-ref.html
== textarea-dyn-disabled.html textarea-ref.html
== textarea-dyn-not-disabled.html textarea-ref.html
== textarea-readonly.html textarea-ref.html
== textarea-dyn-readonly.html textarea-ref.html
== textarea-dyn-not-readonly.html textarea-ref.html
== textarea-required-valid.html textarea-withtext-ref.html
== textarea-required-invalid.html textarea-ref.html
== textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
== textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
== textarea-fieldset-legend.html textarea-fieldset-legend-ref.html

View File

@@ -5,7 +5,7 @@ fails-if(!styloVsGecko) == other-float-outside-rule-3-left-2.html other-float-ou
fails-if(!styloVsGecko) == other-float-outside-rule-3-right-2.html other-float-outside-rule-3-right-2-ref.html # bug 616334
fails-if(!styloVsGecko) == other-float-outside-rule-7-left.html other-float-outside-rule-7-left-ref.html # bug 616334
fails-if(!styloVsGecko) == other-float-outside-rule-7-right.html other-float-outside-rule-7-right-ref.html # bug 616334
fuzzy-if(gtkWidget,1,10) fails-if(styloVsGecko) == float-outside-block-push.html float-outside-block-push-ref.html # bug 815612
fuzzy-if(gtkWidget,1,10) == float-outside-block-push.html float-outside-block-push-ref.html # bug 815612
== relative-float-1.html relative-float-1-ref.html
== relative-float-2.html relative-float-2-ref.html
== zero-height-float-base.html zero-height-float-ref.html

View File

@@ -32,9 +32,9 @@ test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceE
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == input-text-2-noheight.html input-text-2-noheight-ref.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == input-text-3-height.html input-text-3-height-ref.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == input-text-3-noheight.html input-text-3-noheight-ref.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) fails-if(styloVsGecko) == textarea-1.html textarea-1-ref.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) fails-if(styloVsGecko) == textarea-2.html textarea-2-ref.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) fails-if(styloVsGecko) == textarea-3.html textarea-3-ref.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == textarea-1.html textarea-1-ref.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == textarea-2.html textarea-2-ref.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == textarea-3.html textarea-3-ref.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == css-transform-1.html css-transform-1-ref.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == css-transform-2.html css-transform-2-ref.html
fuzzy-if(asyncPan&&!layersGPUAccelerated,102,1764) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == container-with-clamping.html container-with-clamping-ref.html
@@ -83,10 +83,10 @@ test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceE
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-scope-cell-2.html threshold-scope-cell-2-ref.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-scope-cell-3.html threshold-scope-cell-3-ref.html
fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) fails-if(styloVsGecko) == threshold-textarea-contents-under-1.html threshold-textarea-contents-under-1.html
fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) fails-if(styloVsGecko) == threshold-textarea-contents-under-2.html threshold-textarea-contents-under-2.html
fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) fails-if(styloVsGecko) == threshold-textarea-contents-at-1.html threshold-textarea-contents-at-1-ref.html
fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) fails-if(styloVsGecko) == threshold-textarea-contents-at-2.html threshold-textarea-contents-at-2-ref.html
fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-textarea-contents-under-1.html threshold-textarea-contents-under-1.html
fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-textarea-contents-under-2.html threshold-textarea-contents-under-2.html
fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-textarea-contents-at-1.html threshold-textarea-contents-at-1-ref.html
fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-textarea-contents-at-2.html threshold-textarea-contents-at-2-ref.html
fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-input-text-contents-under-1.html threshold-input-text-contents-under-1.html
fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) fails-if(styloVsGecko) == threshold-input-text-contents-under-2.html threshold-input-text-contents-under-2.html
fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-input-text-contents-at-1.html threshold-input-text-contents-at-1-ref.html

View File

@@ -3,7 +3,7 @@ default-preferences pref(dom.forms.datetime,true)
# not valid on Android where type=time looks like type=text
skip-if(Android) fails-if(styloVsGecko) != time-simple-unthemed.html time-simple-unthemed-ref.html
skip-if(Android) fails-if(styloVsGecko) != time-large-font.html time-basic.html
skip-if(Android) fails-if(styloVsGecko) != time-width-height.html time-basic.html
skip-if(Android) != time-width-height.html time-basic.html
skip-if(Android) fails-if(styloVsGecko) != time-border.html time-basic.html
# only valid on Android where type=number looks the same as type=text
skip-if(!Android) fails-if(styloVsGecko) == time-simple-unthemed.html time-simple-unthemed-ref.html

View File

@@ -10,14 +10,14 @@
== placeholder-1-text.html placeholder-visible-ref.html
== placeholder-1-password.html placeholder-visible-ref.html
fails-if(styloVsGecko) == placeholder-1-textarea.html placeholder-visible-textarea-ref.html
== placeholder-1-textarea.html placeholder-visible-textarea-ref.html
== placeholder-2.html placeholder-visible-ref.html
fails-if(styloVsGecko) == placeholder-2-textarea.html placeholder-visible-textarea-ref.html
== placeholder-2-textarea.html placeholder-visible-textarea-ref.html
== placeholder-3.html placeholder-overridden-ref.html
== placeholder-4.html placeholder-overridden-ref.html
== placeholder-5.html placeholder-visible-ref.html
fuzzy-if(winWidget,160,10) fuzzy-if(Android,1,1) fuzzy-if(asyncPan&&!layersGPUAccelerated,146,317) fuzzy-if(OSX==1010&&browserIsRemote,1,8) fails-if(styloVsGecko) == placeholder-6.html placeholder-overflow-ref.html
skip-if(Android&&asyncPan) fails-if(styloVsGecko) == placeholder-6-textarea.html placeholder-overflow-textarea-ref.html
skip-if(Android&&asyncPan) == placeholder-6-textarea.html placeholder-overflow-textarea-ref.html
# needs-focus == placeholder-7.html placeholder-focus-ref.html
# needs-focus == placeholder-8.html placeholder-focus-ref.html
# needs-focus == placeholder-9.html placeholder-focus-ref.html
@@ -31,5 +31,5 @@ random-if(winWidget) == placeholder-19.xul placeholder-overridden-ref.xul
# needs-focus == placeholder-20.html placeholder-focus-ref.html
needs-focus == placeholder-21.html placeholder-blank-ref.html
needs-focus == placeholder-22.html placeholder-blank-ref.html
fails-if(styloVsGecko) == placeholder-rtl.html placeholder-rtl-ref.html
== placeholder-rtl.html placeholder-rtl-ref.html
pref(dom.placeholder.show_on_focus,false) needs-focus == placeholder-focus-pref.html placeholder-blank-ref.html

View File

@@ -1,7 +1,7 @@
fuzzy-if(skiaContent,1,10) fails-if(styloVsGecko) HTTP(..) == text-control-baseline-1.html text-control-baseline-1-ref.html
fuzzy-if(skiaContent,1,10) HTTP(..) == text-control-baseline-1.html text-control-baseline-1-ref.html
fuzzy-if(cocoaWidget,16,64) fuzzy-if(Android,52,64) fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu),104,224) fuzzy-if(/^Windows\x20NT\x206\.2/.test(http.oscpu),88,400) == display-block-baselines-1.html display-block-baselines-1-ref.html # anti-aliasing issues
== display-block-baselines-2.html display-block-baselines-2-ref.html
fails-if(styloVsGecko) == display-block-baselines-3.html display-block-baselines-3-ref.html
== display-block-baselines-3.html display-block-baselines-3-ref.html
fails-if(styloVsGecko||stylo) == display-block-baselines-4.html display-block-baselines-4-ref.html
fuzzy-if(Android,4,8) fuzzy-if(skiaContent,7,2) == display-block-baselines-5.html display-block-baselines-5-ref.html

View File

@@ -1,14 +1,14 @@
skip-if(Android) fails-if(styloVsGecko) == resize.html resize-ref.html
skip-if(Android) == resize.html resize-ref.html
# an offset seems to apply to the native resizer on windows so skip this test for now
skip-if(Android) skip-if(winWidget) fuzzy-if(cocoaWidget,1,33) fuzzy-if(skiaContent&&!winWidget&&!Android,5,10) fails-if(styloVsGecko||stylo) == resize-background.html resize-background-ref.html
skip-if(Android) fails-if(styloVsGecko||stylo) != ltr.html rtl.html
skip-if(Android) skip-if(winWidget) fuzzy-if(cocoaWidget,1,33) fuzzy-if(skiaContent&&!winWidget&&!Android,5,10) == resize-background.html resize-background-ref.html
skip-if(Android) != ltr.html rtl.html
skip-if(Android) != ltr-scrollbar.html rtl-scrollbar.html
skip-if(Android) != in-ltr-doc-scrollbar.html in-rtl-doc-scrollbar.html
skip-if(Android) fails-if(styloVsGecko||stylo) != ltr.html no-resize.html
skip-if(Android) fails-if(xulRuntime.widgetToolkit=="gtk2") fails-if(styloVsGecko||stylo) != rtl.html no-resize.html # bug 834724
fuzzy-if(skiaContent,1,1) fails-if(styloVsGecko) == rtl.html rtl-dynamic-attr.html
fuzzy-if(skiaContent,1,1) fails-if(styloVsGecko) == rtl.html rtl-dynamic-style.html
fails-if(styloVsGecko) == rtl.html in-dynamic-rtl-doc.html
fuzzy-if(skiaContent,1,3) fails-if(styloVsGecko) == setvalue-framereconstruction-1.html setvalue-framereconstruction-ref.html
skip-if(Android) != ltr.html no-resize.html
skip-if(Android) fails-if(xulRuntime.widgetToolkit=="gtk2") != rtl.html no-resize.html # bug 834724
fuzzy-if(skiaContent,1,1) == rtl.html rtl-dynamic-attr.html
fuzzy-if(skiaContent,1,1) == rtl.html rtl-dynamic-style.html
== rtl.html in-dynamic-rtl-doc.html
fuzzy-if(skiaContent,1,3) == setvalue-framereconstruction-1.html setvalue-framereconstruction-ref.html
fuzzy-if(asyncPan&&!layersGPUAccelerated,102,4168) fails-if(styloVsGecko||stylo) == padding-scrollbar-placement.html padding-scrollbar-placement-ref.html
fails-if(styloVsGecko) == various-cols.html various-cols-ref.html
== various-cols.html various-cols-ref.html

View File

@@ -7,14 +7,14 @@
!= listbox-not-blank.html about:blank
!= radio-not-blank.html about:blank
!= text-control-not-blank.html about:blank
fails-if(styloVsGecko) != textarea-not-blank.html about:blank
!= textarea-not-blank.html about:blank
# The following tests will fail if the platform does not have native
# theme support (which all platforms should have).
fails-if(!nativeThemePref) != text-input-native.html text-input-nonnative.html
fuzzy-if(skiaContent,2,88) fails-if(styloVsGecko||stylo) == text-input-nonnative-when-styled.html text-input-nonnative-when-styled-ref.html
fails-if(!nativeThemePref) fails-if(styloVsGecko) != textarea-native.html textarea-nonnative.html
fuzzy-if(skiaContent,2,53) fails-if(styloVsGecko) == textarea-nonnative-when-styled.html textarea-nonnative-when-styled-ref.html
fails-if(!nativeThemePref) != textarea-native.html textarea-nonnative.html
fuzzy-if(skiaContent,2,53) == textarea-nonnative-when-styled.html textarea-nonnative-when-styled-ref.html
fails-if(!nativeThemePref) != button-native.html button-nonnative.html
== button-nonnative-when-styled.html button-nonnative-when-styled-ref.html
fails-if(!nativeThemePref&&!Android) != combobox-native.html combobox-nonnative.html

View File

@@ -20,7 +20,7 @@ skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.s
skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-8.html scroll-behavior-8.html?ref # see bug 1041833
skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-9.html scroll-behavior-9.html?ref # see bug 1041833
skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-10.html scroll-behavior-10.html?ref # see bug 1041833
skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) fails-if(styloVsGecko) == scroll-behavior-textarea.html scroll-behavior-textarea.html?ref # see bug 1320200
skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-textarea.html scroll-behavior-textarea.html?ref # see bug 1320200
HTTP == simple-1.html simple-1.html?ref
skip-if(styloVsGecko) HTTP == subpixel-1.html#d subpixel-1-ref.html#d # bug 1354406
fuzzy-if(Android,4,120) HTTP == text-1.html text-1.html?ref

View File

@@ -77,7 +77,7 @@
== underline-table-cell-quirks.html underline-table-cell-quirks-ref.html
!= underline-table-cell-quirks.html underline-table-cell-quirks-notref.html
== underline-block-propagation-quirks.html underline-block-propagation-quirks-ref.html
fails-if(styloVsGecko) == underline-block-propagation-2-quirks.html underline-block-propagation-2-quirks-ref.html
== underline-block-propagation-2-quirks.html underline-block-propagation-2-quirks-ref.html
== underline-block-standards.html underline-block-standards-ref.html
!= underline-block-standards.html underline-block-standards-notref.html
== underline-inline-block-standards.html underline-inline-block-standards-ref.html
@@ -87,7 +87,7 @@ fails-if(styloVsGecko) == underline-block-propagation-2-quirks.html underline-bl
== underline-table-cell-standards.html underline-table-cell-standards-ref.html
!= underline-table-cell-standards.html underline-table-cell-standards-notref.html
== underline-block-propagation-standards.html underline-block-propagation-standards-ref.html
fails-if(styloVsGecko) == underline-block-propagation-2-standards.html underline-block-propagation-2-standards-ref.html
== underline-block-propagation-2-standards.html underline-block-propagation-2-standards-ref.html
== text-decoration-zorder-1-standards.html text-decoration-zorder-1-ref.html
== text-decoration-zorder-1-quirks.html text-decoration-zorder-1-ref.html
== table-quirk-1.html table-quirk-1-ref.html

View File

@@ -123,9 +123,9 @@ fails-if(!styloVsGecko) HTTP(..) == wordbreak-7b.html wordbreak-7b-ref.html # bu
== wordbreak-8.html wordbreak-8-ref.html
pref(gfx.font_rendering.graphite.enabled,true) HTTP(..) == wordbreak-9.html wordbreak-9-ref.html
== wordbreak-dynamic-1.html wordbreak-dynamic-1-ref.html
fails-if(styloVsGecko) == wordwrap-01.html wordwrap-01-ref.html
fails-if(styloVsGecko) HTTP(..) == wordwrap-02.html wordwrap-02-ref.html
fuzzy-if(gtkWidget,1,177) fuzzy-if(skiaContent,1,50) fails-if(styloVsGecko) HTTP(..) == wordwrap-03.html wordwrap-03-ref.html # Fuzzy on Linux because the native textbox gradient is painted in a slightly different position depending on the invalid area.
== wordwrap-01.html wordwrap-01-ref.html
HTTP(..) == wordwrap-02.html wordwrap-02-ref.html
fuzzy-if(gtkWidget,1,177) fuzzy-if(skiaContent,1,50) HTTP(..) == wordwrap-03.html wordwrap-03-ref.html # Fuzzy on Linux because the native textbox gradient is painted in a slightly different position depending on the invalid area.
== wordwrap-04.html wordwrap-04-ref.html
== overflowwrap-04.html wordwrap-04-ref.html
== wordwrap-05.html wordwrap-05-ref.html
@@ -134,12 +134,12 @@ fuzzy-if(gtkWidget,1,177) fuzzy-if(skiaContent,1,50) fails-if(styloVsGecko) HTTP
== overflowwrap-06.html wordwrap-06-ref.html
== wordwrap-07.html wordwrap-07-ref.html
== overflowwrap-07.html wordwrap-07-ref.html
fails-if(styloVsGecko) != wordwrap-08.html wordwrap-01-ref.html
fails-if(styloVsGecko) == wordwrap-08.html wordwrap-08-ref.html
fails-if(styloVsGecko) != wordwrap-09.html wordwrap-01-ref.html
fails-if(styloVsGecko) != overflowwrap-09.html wordwrap-01-ref.html
fails-if(styloVsGecko) == wordwrap-09.html wordwrap-09-ref.html
fails-if(styloVsGecko) == overflowwrap-09.html wordwrap-09-ref.html
!= wordwrap-08.html wordwrap-01-ref.html
== wordwrap-08.html wordwrap-08-ref.html
!= wordwrap-09.html wordwrap-01-ref.html
!= overflowwrap-09.html wordwrap-01-ref.html
== wordwrap-09.html wordwrap-09-ref.html
== overflowwrap-09.html wordwrap-09-ref.html
== wordwrap-10.html wordwrap-10-ref.html # bug 752459
== overflowwrap-10.html wordwrap-10-ref.html
== word-spacing-01.html word-spacing-01-ref.html
@@ -329,10 +329,10 @@ fails-if(!cocoaWidget&&!styloVsGecko) != osx-font-smoothing-2.html osx-font-smoo
pref(layout.css.text-align-unsafe-value.enabled,true) fails-if(styloVsGecko||stylo) == text-align-unsafe.html text-align-unsafe-ref.html
# stray control chars should be visible by default, bug 1099557
fails-if(styloVsGecko) != control-chars-01a.html control-chars-01-notref.html
fails-if(styloVsGecko) != control-chars-01b.html control-chars-01-notref.html
fails-if(styloVsGecko) != control-chars-01c.html control-chars-01-notref.html
fails-if(styloVsGecko) != control-chars-01d.html control-chars-01-notref.html
!= control-chars-01a.html control-chars-01-notref.html
!= control-chars-01b.html control-chars-01-notref.html
!= control-chars-01c.html control-chars-01-notref.html
!= control-chars-01d.html control-chars-01-notref.html
!= control-chars-02.html control-chars-02-notref.html
== control-chars-03a.html control-chars-03-ref.html
== control-chars-03b.html control-chars-03-ref.html

View File

@@ -72,8 +72,8 @@ fuzzy-if(Android,158,32) == flexbox-align-self-vert-rtl-001.xhtml flexbox-align
== flexbox-basic-iframe-vert-001.xhtml flexbox-basic-iframe-vert-001-ref.xhtml
== flexbox-basic-img-horiz-001.xhtml flexbox-basic-img-horiz-001-ref.xhtml
== flexbox-basic-img-vert-001.xhtml flexbox-basic-img-vert-001-ref.xhtml
fails-if(styloVsGecko) == flexbox-basic-textarea-horiz-001.xhtml flexbox-basic-textarea-horiz-001-ref.xhtml
fails-if(styloVsGecko) == flexbox-basic-textarea-vert-001.xhtml flexbox-basic-textarea-vert-001-ref.xhtml
== flexbox-basic-textarea-horiz-001.xhtml flexbox-basic-textarea-horiz-001-ref.xhtml
== flexbox-basic-textarea-vert-001.xhtml flexbox-basic-textarea-vert-001-ref.xhtml
== flexbox-basic-video-horiz-001.xhtml flexbox-basic-video-horiz-001-ref.xhtml
== flexbox-basic-video-vert-001.xhtml flexbox-basic-video-vert-001-ref.xhtml

View File

@@ -18,8 +18,8 @@ fuzzy-if(gtkWidget,255,2) fuzzy-if(winWidget||Android,4,8704) HTTP(..) == 108384
== 1090168-2.html 1090168-2-ref.html
fuzzy-if(azureSkia,255,2700) == 1090168-3.html 1090168-3-ref.html # bug 1230357 mark fuzzy for skia.
== 1091058-1.html 1091058-1-ref.html
fails-if(styloVsGecko) == 1094434-1.html 1094434-1-ref.html
fails-if(styloVsGecko) == 1094434-2.html 1094434-2-ref.html
== 1094434-1.html 1094434-1-ref.html
== 1094434-2.html 1094434-2-ref.html
== 1094914-1a.html 1094914-1-ref.html
== 1094914-1b.html 1094914-1-ref.html
== 1096224-1a.html 1096224-1-ref.html
@@ -62,9 +62,9 @@ fuzzy(116,94) fuzzy-if(winWidget,135,124) HTTP(..) == 1115916-1-vertical-metrics
== ua-style-sheet-size-2.html ua-style-sheet-size-2-ref.html
== ua-style-sheet-fieldset-1.html ua-style-sheet-fieldset-1-ref.html
skip-if(Android||winWidget) fails-if(styloVsGecko) == ua-style-sheet-textarea-1.html ua-style-sheet-textarea-1a-ref.html
skip-if(!(Android)) fails-if(styloVsGecko) == ua-style-sheet-textarea-1.html ua-style-sheet-textarea-1b-ref.html
skip-if(!winWidget) fails-if(styloVsGecko) == ua-style-sheet-textarea-1.html ua-style-sheet-textarea-1c-ref.html
skip-if(Android||winWidget) == ua-style-sheet-textarea-1.html ua-style-sheet-textarea-1a-ref.html
skip-if(!(Android)) == ua-style-sheet-textarea-1.html ua-style-sheet-textarea-1b-ref.html
skip-if(!winWidget) == ua-style-sheet-textarea-1.html ua-style-sheet-textarea-1c-ref.html
fuzzy-if(Android,1,18) == ua-style-sheet-checkbox-radio-1.html ua-style-sheet-checkbox-radio-1-ref.html
skip-if(Android) fuzzy-if(skiaContent&&!Android,2,6) == ua-style-sheet-button-1.html ua-style-sheet-button-1a-ref.html
skip-if(!(Android)) == ua-style-sheet-button-1.html ua-style-sheet-button-1b-ref.html

View File

@@ -47,6 +47,7 @@ class nsIDocument;
class nsINode;
class nsPresContext;
struct nsTimingFunction;
class nsXBLBinding;
using mozilla::dom::StyleChildrenIterator;
using mozilla::ServoElementSnapshot;
@@ -55,6 +56,7 @@ typedef nsINode RawGeckoNode;
typedef mozilla::dom::Element RawGeckoElement;
typedef nsIDocument RawGeckoDocument;
typedef nsPresContext RawGeckoPresContext;
typedef nsXBLBinding RawGeckoXBLBinding;
typedef mozilla::URLExtraData RawGeckoURLExtraData;
typedef nsTArray<mozilla::Keyframe> RawGeckoKeyframeList;
typedef nsTArray<mozilla::ComputedKeyframeValues> RawGeckoComputedKeyframeValuesList;
@@ -114,6 +116,7 @@ typedef mozilla::gfx::Float RawGeckoGfxMatrix4x4[16];
DECL_NULLABLE_BORROWED_REF_TYPE_FOR(RawServoDeclarationBlockStrong)
DECL_OWNED_REF_TYPE_FOR(RawServoStyleSet)
DECL_NULLABLE_BORROWED_REF_TYPE_FOR(RawServoStyleSet)
DECL_NULLABLE_OWNED_REF_TYPE_FOR(StyleChildrenIterator)
DECL_OWNED_REF_TYPE_FOR(StyleChildrenIterator)
DECL_OWNED_REF_TYPE_FOR(ServoElementSnapshot)
@@ -130,6 +133,8 @@ DECL_BORROWED_REF_TYPE_FOR(RawGeckoElement)
DECL_NULLABLE_BORROWED_REF_TYPE_FOR(RawGeckoElement)
DECL_BORROWED_REF_TYPE_FOR(RawGeckoDocument)
DECL_NULLABLE_BORROWED_REF_TYPE_FOR(RawGeckoDocument)
DECL_BORROWED_REF_TYPE_FOR(RawGeckoXBLBinding)
DECL_NULLABLE_BORROWED_REF_TYPE_FOR(RawGeckoXBLBinding)
DECL_BORROWED_MUT_REF_TYPE_FOR(StyleChildrenIterator)
DECL_BORROWED_MUT_REF_TYPE_FOR(ServoElementSnapshot)
DECL_BORROWED_REF_TYPE_FOR(nsCSSValue)
@@ -149,6 +154,7 @@ DECL_BORROWED_REF_TYPE_FOR(RawGeckoComputedTiming)
DECL_BORROWED_MUT_REF_TYPE_FOR(RawGeckoServoStyleRuleList)
DECL_BORROWED_MUT_REF_TYPE_FOR(nsCSSPropertyIDSet)
DECL_BORROWED_REF_TYPE_FOR(RawGeckoCSSPropertyIDList)
DECL_BORROWED_REF_TYPE_FOR(nsXBLBinding)
#undef DECL_ARC_REF_TYPE_FOR
#undef DECL_OWNED_REF_TYPE_FOR

View File

@@ -2187,6 +2187,32 @@ Gecko_GetBaseSize(nsIAtom* aLanguage)
return sizes;
}
RawGeckoElementBorrowedOrNull
Gecko_GetBindingParent(RawGeckoElementBorrowed aElement)
{
nsIContent* parent = aElement->GetBindingParent();
return parent ? parent->AsElement() : nullptr;
}
RawGeckoXBLBindingBorrowedOrNull
Gecko_GetXBLBinding(RawGeckoElementBorrowed aElement)
{
return aElement->GetXBLBinding();
}
RawServoStyleSetBorrowedOrNull
Gecko_XBLBinding_GetRawServoStyleSet(RawGeckoXBLBindingBorrowed aXBLBinding)
{
const ServoStyleSet* set = aXBLBinding->GetServoStyleSet();
return set ? set->RawSet() : nullptr;
}
bool
Gecko_XBLBinding_InheritsStyle(RawGeckoXBLBindingBorrowed aXBLBinding)
{
return aXBLBinding->InheritsStyle();
}
void
InitializeServo()
{

View File

@@ -64,6 +64,7 @@ struct nsStyleGradientStop;
class nsStyleGradient;
class nsStyleCoord;
struct nsStyleDisplay;
class nsXBLBinding;
#define NS_DECL_THREADSAFE_FFI_REFCOUNTING(class_, name_) \
void Gecko_AddRef##name_##ArbitraryThread(class_* aPtr); \
@@ -527,6 +528,12 @@ void Gecko_nsStyleFont_FixupMinFontSize(nsStyleFont* font,
RawGeckoPresContextBorrowed pres_context);
FontSizePrefs Gecko_GetBaseSize(nsIAtom* lang);
// XBL related functions.
RawGeckoElementBorrowedOrNull Gecko_GetBindingParent(RawGeckoElementBorrowed aElement);
RawGeckoXBLBindingBorrowedOrNull Gecko_GetXBLBinding(RawGeckoElementBorrowed aElement);
RawServoStyleSetBorrowedOrNull Gecko_XBLBinding_GetRawServoStyleSet(RawGeckoXBLBindingBorrowed aXBLBinding);
bool Gecko_XBLBinding_InheritsStyle(RawGeckoXBLBindingBorrowed aXBLBinding);
struct GeckoFontMetrics
{
nscoord mChSize;

View File

@@ -64,6 +64,7 @@ headers = [
"nsCSSFontFaceRule.h",
"nsMediaFeatures.h",
"nsMediaList.h",
"nsXBLBinding.h",
]
raw-lines = [
# FIXME(emilio): Incrementally remove these "pub use"s. Probably
@@ -346,6 +347,7 @@ structs-types = [
"RawGeckoStyleAnimationList",
"RawGeckoServoStyleRuleList",
"RawGeckoURLExtraData",
"RawGeckoXBLBinding",
"RefPtr",
"CSSPseudoClassType",
"CSSPseudoElementType",
@@ -459,6 +461,7 @@ servo-immutable-borrow-types = [
"RawServoDeclarationBlockStrong",
"RawGeckoPresContext",
"RawGeckoStyleAnimationList",
"RawGeckoXBLBinding",
]
servo-borrow-types = [
"nsCSSPropertyIDSet",

View File

@@ -82,9 +82,10 @@ ServoMediaList::Delete(const nsAString& aOldMedium)
bool
ServoMediaList::Matches(nsPresContext* aPresContext) const
{
const RawServoStyleSet& rawSet =
const RawServoStyleSet* rawSet =
aPresContext->StyleSet()->AsServo()->RawSet();
return Servo_MediaList_Matches(mRawList, &rawSet);
MOZ_ASSERT(rawSet, "The RawServoStyleSet should be valid!");
return Servo_MediaList_Matches(mRawList, rawSet);
}
} // namespace mozilla

View File

@@ -142,7 +142,9 @@ public:
void InvalidateStyleForCSSRuleChanges();
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
const RawServoStyleSet& RawSet() const { return *mRawSet; }
const RawServoStyleSet* RawSet() const {
return mRawSet.get();
}
bool GetAuthorStyleDisabled() const;
nsresult SetAuthorStyleDisabled(bool aStyleDisabled);

View File

@@ -38,7 +38,7 @@ load 460209-1.html
load 460217-1.html
load 460323-1.html
load 466845-1.html
load 469432-1.xhtml
asserts-if(stylo,4) load 469432-1.xhtml # bug 1370830
load 472195-1.html
load 472237-1.html # will fail, test for leak (474704)
HTTP(..) load 472237-1.html

View File

@@ -34,7 +34,7 @@ to mochitest command.
* test_media_queries.html `-device-pixel-ratio` [27]
* test_webkit_device_pixel_ratio.html [3]
* test_media_queries_dynamic.html `restyle`: bug 1357461 [4]
* test_media_queries_dynamic_xbl.html: xbl support bug 1290276 [2]
* test_media_queries_dynamic_xbl.html: xbl support bug 1290276 [1]
* Animation support:
* SMIL Animation
* test_restyles_in_smil_animation.html [2]

View File

@@ -144,7 +144,7 @@ function StartTestURI(type, uri, timeout)
// the JS ref tests disable the normal browser chrome and do not otherwise
// create substatial DOM garbage, the CC tends not to run enough normally.
++gTestCount;
if (gTestCount % 250 == 0) {
if (gTestCount % 1000 == 0) {
CU.forceGC();
CU.forceCC();
}

View File

@@ -33,7 +33,7 @@ load 365151.xul
load 366112-1.xul
asserts(0-50) load 366203-1.xul # bug 1217984
load 367185-1.xhtml
load 369942-1.xhtml
asserts-if(stylo,7) load 369942-1.xhtml # bug 1370830
load 374102-1.xul
load 376137-1.html
load 376137-2.html
@@ -57,8 +57,8 @@ load 397293.xhtml # bug 1323652
load 397304-1.html
asserts-if(stylo,0-2) load 398326-1.xhtml # bug 1324660
load 399013.xul
load 400779-1.xhtml
load 402912-1.xhtml
asserts-if(stylo,2) load 400779-1.xhtml # bug 1370830
asserts-if(stylo,1) load 402912-1.xhtml # bug 1370830
load 404192.xhtml
load 407152.xul
load 408904-1.xul
@@ -77,23 +77,23 @@ load 434458-1.xul
load 452185.html
load 460900-1.xul
load 464149-1.xul
asserts-if(winWidget,1) asserts-if(Android,0-1) load 464407-1.xhtml # Bug 450974 on win, Bug 1267054 on Android
asserts-if(winWidget,1) asserts-if(Android,0-1) asserts-if(stylo,1) load 464407-1.xhtml # Bug 450974 on win, Bug 1267054 on Android, Bug 1370830 on stylo
load 467080.xul
load 467481-1.xul
load 470063-1.html
load 470272.html
load 472189.xul
load 475133.html
load 488210-1.xhtml
asserts-if(stylo,1) load 488210-1.xhtml # bug 1370830
load 495728-1.xul
load 508927-1.xul
load 508927-2.xul
load 514300-1.xul
load 536931-1.xhtml
asserts-if(stylo,2) load 536931-1.xhtml # bug 1370830
asserts(1) load 538308-1.xul
load 557174-1.xml
load 564705-1.xul
load 583957-1.html
load 564705-1.xul
asserts-if(stylo,2) load 583957-1.html # bug 1370830
load 617089.html
load menulist-focused.xhtml
asserts-if(stylo,1) load menulist-focused.xhtml # bug 1370830
load 716503.html

View File

@@ -4,13 +4,13 @@ load 309732-2.xul
load 366583-1.xul
load 380217-1.xul
load 382444-1.html
load 391178-1.xhtml
asserts-if(stylo,3) load 391178-1.xhtml # bug 1370830
load 391178-2.xul
load 393665-1.xul
load 399227-1.xul
load 399227-2.xul
asserts-if(stylo,3) load 399692-1.xhtml # bug 1324698
load 399715-1.xhtml
asserts-if(stylo,2) load 399715-1.xhtml # bug 1370830
load 409807-1.xul
load 414170-1.xul
load 430394-1.xul

View File

@@ -1546,7 +1546,7 @@ public abstract class GeckoApp extends GeckoActivity
final Locale osLocale = Locale.getDefault();
// Both of these are Java-format locale strings: "en_US", not "en-US".
final String osLocaleString = osLocale.toString();
final String osLocaleString = osLocale.getLanguage() + "_" + osLocale.getCountry();
String appLocaleString = localeManager.getAndApplyPersistedLocale(GeckoApp.this);
Log.d(LOGTAG, "OS locale is " + osLocaleString + ", app locale is " + appLocaleString);

View File

@@ -1394,7 +1394,7 @@ pref("javascript.options.mem.high_water_mark", 128);
pref("javascript.options.mem.max", -1);
pref("javascript.options.mem.gc_per_zone", true);
pref("javascript.options.mem.gc_incremental", true);
pref("javascript.options.mem.gc_incremental_slice_ms", 5);
pref("javascript.options.mem.gc_incremental_slice_ms", 10);
pref("javascript.options.mem.gc_compacting", true);
pref("javascript.options.mem.log", false);
pref("javascript.options.mem.notify", false);

View File

@@ -1161,4 +1161,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
static const int32_t kUnknownId = -1;
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1505316834742000);
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1505406187197000);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -22,6 +22,7 @@ use selector_parser::{PseudoClassStringArg, PseudoElement};
use selectors::matching::{ElementSelectorFlags, VisitedHandlingMode};
use shared_lock::Locked;
use sink::Push;
use smallvec::VecLike;
use std::fmt;
#[cfg(feature = "gecko")] use std::collections::HashMap;
use std::fmt::Debug;
@@ -562,6 +563,14 @@ pub trait TElement : Eq + PartialEq + Debug + Hash + Sized + Copy + Clone +
.map_or(false, |r| r.hint.has_animation_hint());
}
/// Gets declarations from XBL bindings from the element. Only gecko element could have this.
fn get_declarations_from_xbl_bindings<V>(&self,
_: &mut V)
-> bool
where V: Push<ApplicableDeclarationBlock> + VecLike<ApplicableDeclarationBlock> {
false
}
/// Gets the current existing CSS transitions, by |property, end value| pairs in a HashMap.
#[cfg(feature = "gecko")]
fn get_css_transitions_info(&self)

View File

@@ -28,6 +28,7 @@ use gecko_bindings::structs::RawGeckoPresContextOwned;
use gecko_bindings::structs::RawGeckoStyleAnimationList;
use gecko_bindings::structs::RawGeckoServoStyleRuleList;
use gecko_bindings::structs::RawGeckoURLExtraData;
use gecko_bindings::structs::RawGeckoXBLBinding;
use gecko_bindings::structs::RefPtr;
use gecko_bindings::structs::CSSPseudoClassType;
use gecko_bindings::structs::CSSPseudoElementType;
@@ -257,6 +258,8 @@ pub type RawGeckoPresContextBorrowed<'a> = &'a RawGeckoPresContext;
pub type RawGeckoPresContextBorrowedOrNull<'a> = Option<&'a RawGeckoPresContext>;
pub type RawGeckoStyleAnimationListBorrowed<'a> = &'a RawGeckoStyleAnimationList;
pub type RawGeckoStyleAnimationListBorrowedOrNull<'a> = Option<&'a RawGeckoStyleAnimationList>;
pub type RawGeckoXBLBindingBorrowed<'a> = &'a RawGeckoXBLBinding;
pub type RawGeckoXBLBindingBorrowedOrNull<'a> = Option<&'a RawGeckoXBLBinding>;
pub type nsCSSPropertyIDSetBorrowed<'a> = &'a nsCSSPropertyIDSet;
pub type nsCSSPropertyIDSetBorrowedOrNull<'a> = Option<&'a nsCSSPropertyIDSet>;
pub type nsCSSPropertyIDSetBorrowedMut<'a> = &'a mut nsCSSPropertyIDSet;
@@ -1373,6 +1376,24 @@ extern "C" {
extern "C" {
pub fn Gecko_GetBaseSize(lang: *mut nsIAtom) -> FontSizePrefs;
}
extern "C" {
pub fn Gecko_GetBindingParent(aElement: RawGeckoElementBorrowed)
-> RawGeckoElementBorrowedOrNull;
}
extern "C" {
pub fn Gecko_GetXBLBinding(aElement: RawGeckoElementBorrowed)
-> RawGeckoXBLBindingBorrowedOrNull;
}
extern "C" {
pub fn Gecko_XBLBinding_GetRawServoStyleSet(aXBLBinding:
RawGeckoXBLBindingBorrowed)
-> RawServoStyleSetBorrowedOrNull;
}
extern "C" {
pub fn Gecko_XBLBinding_InheritsStyle(aXBLBinding:
RawGeckoXBLBindingBorrowed)
-> bool;
}
extern "C" {
pub fn Gecko_GetFontMetrics(pres_context: RawGeckoPresContextBorrowed,
is_vertical: bool, font: *const nsStyleFont,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -23,6 +23,7 @@ use dom::{OpaqueNode, PresentationalHintsSynthesizer};
use element_state::ElementState;
use error_reporting::RustLogReporter;
use font_metrics::{FontMetrics, FontMetricsProvider, FontMetricsQueryResult};
use gecko::data::PerDocumentStyleData;
use gecko::global_style_data::GLOBAL_STYLE_DATA;
use gecko::selector_parser::{SelectorImpl, NonTSPseudoClass, PseudoElement};
use gecko::snapshot_helpers;
@@ -50,7 +51,7 @@ use gecko_bindings::bindings::Gecko_MatchStringArgPseudo;
use gecko_bindings::bindings::Gecko_UnsetDirtyStyleAttr;
use gecko_bindings::bindings::Gecko_UpdateAnimations;
use gecko_bindings::structs;
use gecko_bindings::structs::{RawGeckoElement, RawGeckoNode};
use gecko_bindings::structs::{RawGeckoElement, RawGeckoNode, RawGeckoXBLBinding};
use gecko_bindings::structs::{nsIAtom, nsIContent, nsINode_BooleanFlag, nsStyleContext};
use gecko_bindings::structs::ELEMENT_HANDLED_SNAPSHOT;
use gecko_bindings::structs::ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO;
@@ -59,7 +60,7 @@ use gecko_bindings::structs::ELEMENT_HAS_SNAPSHOT;
use gecko_bindings::structs::EffectCompositor_CascadeLevel as CascadeLevel;
use gecko_bindings::structs::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
use gecko_bindings::structs::NODE_IS_NATIVE_ANONYMOUS;
use gecko_bindings::sugar::ownership::HasArcFFI;
use gecko_bindings::sugar::ownership::{HasArcFFI, HasSimpleFFI};
use logical_geometry::WritingMode;
use media_queries::Device;
use properties::{ComputedValues, parse_style_attribute};
@@ -74,6 +75,7 @@ use selectors::matching::{ElementSelectorFlags, MatchingContext, MatchingMode};
use selectors::matching::{RelevantLinkStatus, VisitedHandlingMode};
use shared_lock::Locked;
use sink::Push;
use smallvec::VecLike;
use std::cell::RefCell;
use std::collections::HashMap;
use std::fmt;
@@ -202,6 +204,12 @@ impl<'ln> GeckoNode<'ln> {
true
}
/// This logic is duplicated in Gecko's nsIContent::IsRootOfNativeAnonymousSubtree.
fn is_root_of_native_anonymous_subtree(&self) -> bool {
use gecko_bindings::structs::NODE_IS_NATIVE_ANONYMOUS_ROOT;
return self.flags() & (NODE_IS_NATIVE_ANONYMOUS_ROOT as u32) != 0
}
fn contains_non_whitespace_content(&self) -> bool {
unsafe { Gecko_IsSignificantChild(self.0, true, false) }
}
@@ -341,6 +349,37 @@ impl<'a> Iterator for GeckoChildrenIterator<'a> {
}
}
/// A Simple wrapper over a non-null Gecko `nsXBLBinding` pointer.
pub struct GeckoXBLBinding<'lb>(pub &'lb RawGeckoXBLBinding);
impl<'lb> GeckoXBLBinding<'lb> {
fn base_binding(&self) -> Option<GeckoXBLBinding> {
unsafe { self.0.mNextBinding.mRawPtr.as_ref().map(GeckoXBLBinding) }
}
fn inherits_style(&self) -> bool {
unsafe { bindings::Gecko_XBLBinding_InheritsStyle(self.0) }
}
// Implements Gecko's nsXBLBinding::WalkRules().
fn get_declarations_for<E, V>(&self,
element: &E,
applicable_declarations: &mut V)
where E: TElement,
V: Push<ApplicableDeclarationBlock> + VecLike<ApplicableDeclarationBlock> {
if let Some(base_binding) = self.base_binding() {
base_binding.get_declarations_for(element, applicable_declarations);
}
let raw_data = unsafe { bindings::Gecko_XBLBinding_GetRawServoStyleSet(self.0) };
if let Some(raw_data) = raw_data {
let data = PerDocumentStyleData::from_ffi(&*raw_data).borrow();
data.stylist.push_applicable_declarations_as_xbl_only_stylist(element,
applicable_declarations);
}
}
}
/// A simple wrapper over a non-null Gecko `Element` pointer.
#[derive(Clone, Copy)]
pub struct GeckoElement<'le>(pub &'le RawGeckoElement);
@@ -394,6 +433,14 @@ impl<'le> GeckoElement<'le> {
unsafe { slots.as_ref() }
}
fn get_xbl_binding(&self) -> Option<GeckoXBLBinding> {
unsafe { bindings::Gecko_GetXBLBinding(self.0).map(GeckoXBLBinding) }
}
fn get_xbl_binding_parent(&self) -> Option<Self> {
unsafe { bindings::Gecko_GetBindingParent(self.0).map(GeckoElement) }
}
/// Clear the element data for a given element.
pub fn clear_data(&self) {
let ptr = self.0.mServoData.get();
@@ -857,6 +904,43 @@ impl<'le> TElement for GeckoElement<'le> {
self.may_have_animations() && unsafe { Gecko_ElementHasCSSTransitions(self.0) }
}
// Implements Gecko's nsBindingManager::WalkRules(). Returns whether to cut off the
// inheritance.
fn get_declarations_from_xbl_bindings<V>(&self,
applicable_declarations: &mut V)
-> bool
where V: Push<ApplicableDeclarationBlock> + VecLike<ApplicableDeclarationBlock> {
// Walk the binding scope chain, starting with the binding attached to our content, up
// till we run out of scopes or we get cut off.
let mut current = Some(*self);
while let Some(element) = current {
if let Some(binding) = element.get_xbl_binding() {
binding.get_declarations_for(self, applicable_declarations);
// If we're not looking at our original element, allow the binding to cut off
// style inheritance.
if element != *self {
if !binding.inherits_style() {
// Go no further; we're not inheriting style from anything above here.
break;
}
}
}
if element.as_node().is_root_of_native_anonymous_subtree() {
// Deliberately cut off style inheritance here.
break;
}
current = element.get_xbl_binding_parent();
}
// If current has something, this means we cut off inheritance at some point in the
// loop.
current.is_some()
}
fn get_css_transitions_info(&self)
-> HashMap<TransitionProperty, Arc<AnimationValue>> {
use gecko_bindings::bindings::Gecko_ElementTransitions_EndValueAt;

View File

@@ -406,6 +406,8 @@ pub enum CascadeLevel {
PresHints,
/// User normal rules.
UserNormal,
/// XBL <stylesheet> rules.
XBL,
/// Author normal rules.
AuthorNormal,
/// Style attribute normal rules.
@@ -1048,7 +1050,8 @@ impl StrongRuleNode {
CascadeLevel::UANormal |
CascadeLevel::UAImportant |
CascadeLevel::UserNormal |
CascadeLevel::UserImportant => {
CascadeLevel::UserImportant |
CascadeLevel::XBL => {
for (id, declaration) in longhands {
if properties.contains(id) {
// This property was set by a non-author rule.

View File

@@ -917,6 +917,26 @@ impl Stylist {
self.quirks_mode = quirks_mode;
}
/// Returns the applicable CSS declarations for the given element by
/// treating us as an XBL stylesheet-only stylist.
pub fn push_applicable_declarations_as_xbl_only_stylist<E, V>(&self,
element: &E,
applicable_declarations: &mut V)
where E: TElement,
V: Push<ApplicableDeclarationBlock> + VecLike<ApplicableDeclarationBlock>,
{
let mut matching_context =
MatchingContext::new(MatchingMode::Normal, None);
let mut dummy_flag_setter = |_: &E, _: ElementSelectorFlags| {};
self.element_map.author.get_all_matching_rules(element,
element,
applicable_declarations,
&mut matching_context,
&mut dummy_flag_setter,
CascadeLevel::XBL);
}
/// Returns the applicable CSS declarations for the given element.
///
/// This corresponds to `ElementRuleCollector` in WebKit.
@@ -1019,15 +1039,26 @@ impl Stylist {
debug!("skipping user rules");
}
// Step 3b: XBL rules.
let cut_off_inheritance =
rule_hash_target.get_declarations_from_xbl_bindings(applicable_declarations);
debug!("XBL: {:?}", context.relations);
if rule_hash_target.matches_user_and_author_rules() && !only_default_rules {
// Step 3b: Author normal rules.
map.author.get_all_matching_rules(element,
&rule_hash_target,
applicable_declarations,
context,
flags_setter,
CascadeLevel::AuthorNormal);
debug!("author normal: {:?}", context.relations);
// Gecko skips author normal rules if cutting off inheritance.
// See nsStyleSet::FileRules().
if !cut_off_inheritance {
// Step 3c: Author normal rules.
map.author.get_all_matching_rules(element,
&rule_hash_target,
applicable_declarations,
context,
flags_setter,
CascadeLevel::AuthorNormal);
debug!("author normal: {:?}", context.relations);
} else {
debug!("Skipping author normal rules due to cut off inheritance");
}
// Step 4: Normal style attributes.
if let Some(sa) = style_attribute {

View File

@@ -17,7 +17,7 @@ dependencies = [
"slog-stdlog 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"slog-stream 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
"webdriver 0.25.2 (registry+https://github.com/rust-lang/crates.io-index)",
"webdriver 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)",
"zip 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -636,7 +636,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "webdriver"
version = "0.25.2"
version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -763,7 +763,7 @@ dependencies = [
"checksum uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "78c590b5bd79ed10aad8fb75f078a59d8db445af6c743e55c4a53227fc01c13f"
"checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c"
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
"checksum webdriver 0.25.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d161bc62ed766ddc0838af89f1b339ed3c8b5c3dbe8776b59731dfae7b1a6c7"
"checksum webdriver 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3099729d884692d690796454e8529edf3f0ebd87c87840f9c809df8eabb175ed"
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
"checksum winreg 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e63857fb213f619b4c4fff86b158285c76766aac7e7474967e92fb6dbbfeefe9"

View File

@@ -27,7 +27,7 @@ slog-atomic = "0.4"
slog-stdlog = "1"
slog-stream = "1"
uuid = "0.1.18"
webdriver = "0.25"
webdriver = "0.26.0"
zip = "0.1"
[[bin]]

View File

@@ -25,7 +25,7 @@ use webdriver::command::WebDriverCommand::{
NewSession, DeleteSession, Status, Get, GetCurrentUrl,
GoBack, GoForward, Refresh, GetTitle, GetPageSource, GetWindowHandle,
GetWindowHandles, CloseWindow, SetWindowRect,
GetWindowRect, MaximizeWindow, SwitchToWindow, SwitchToFrame,
GetWindowRect, MaximizeWindow, FullscreenWindow, SwitchToWindow, SwitchToFrame,
SwitchToParentFrame, FindElement, FindElements,
FindElementElement, FindElementElements, GetActiveElement,
IsDisplayed, IsSelected, GetElementAttribute, GetElementProperty, GetCSSValue,
@@ -801,6 +801,40 @@ impl MarionetteSession {
WebDriverResponse::ElementRect(ElementRectResponse::new(x, y, width, height))
},
FullscreenWindow => {
let width = try_opt!(
try_opt!(resp.result.find("width"),
ErrorStatus::UnknownError,
"Failed to find width field").as_u64(),
ErrorStatus::UnknownError,
"Failed to interpret width as integer");
let height = try_opt!(
try_opt!(resp.result.find("height"),
ErrorStatus::UnknownError,
"Failed to find height field").as_u64(),
ErrorStatus::UnknownError,
"Failed to interpret height as integer");
let x = try_opt!(
try_opt!(resp.result.find("x"),
ErrorStatus::UnknownError,
"Failed to find x field").as_i64(),
ErrorStatus::UnknownError,
"Failed to interpret x as integer");
let y = try_opt!(
try_opt!(resp.result.find("y"),
ErrorStatus::UnknownError,
"Failed to find y field").as_i64(),
ErrorStatus::UnknownError,
"Failed to interpret y as integer");
WebDriverResponse::WindowRect(WindowRectResponse {x: x,
y: y,
width: width,
height: height})
},
GetCookies => {
let cookies = try!(self.process_cookies(&resp.result));
WebDriverResponse::Cookie(CookieResponse::new(cookies))
@@ -1034,6 +1068,7 @@ impl MarionetteCommand {
SetWindowRect(ref x) => (Some("setWindowRect"), Some(x.to_marionette())),
GetWindowRect => (Some("getWindowRect"), None),
MaximizeWindow => (Some("maximizeWindow"), None),
FullscreenWindow => (Some("fullscreenWindow"), None),
SwitchToWindow(ref x) => (Some("switchToWindow"), Some(x.to_marionette())),
SwitchToFrame(ref x) => (Some("switchToFrame"), Some(x.to_marionette())),
SwitchToParentFrame => (Some("switchToParentFrame"), None),

View File

@@ -153,6 +153,7 @@ class MessageLogger(object):
'test_status', 'log',
'buffering_on', 'buffering_off'])
TEST_PATH_PREFIXES = ['/tests/',
'chrome://mochitests/content/a11y/',
'chrome://mochitests/content/browser/',
'chrome://mochitests/content/chrome/']

View File

@@ -10,6 +10,7 @@ from base import BaseFormatter
class ErrorSummaryFormatter(BaseFormatter):
def __init__(self):
self.groups = None
self.line_count = 0
def __call__(self, data):
@@ -25,6 +26,7 @@ class ErrorSummaryFormatter(BaseFormatter):
def _output_test(self, test, subtest, item):
data = {"test": test,
"subtest": subtest,
"group": self.groups.get(test, ''),
"status": item["status"],
"expected": item["expected"],
"message": item.get("message"),
@@ -32,7 +34,8 @@ class ErrorSummaryFormatter(BaseFormatter):
return self._output("test_result", data)
def suite_start(self, item):
return self._output("test_groups", {"tests": item["tests"]})
self.groups = {v: k for k in item["tests"] for v in item["tests"][k]}
return self._output("test_groups", {"groups": item["tests"].keys()})
def test_status(self, item):
if "expected" not in item:

View File

@@ -1 +1 @@
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"6d7856aa51991bc6c15945046377a9992b8886cc8e4602d08f650f92803b71f6",".travis.yml":"78252ef89a407b1d76616b7afbf7afb8205530a7f7039f3a7ea140684e3aa8bc","Cargo.toml":"e5bfb146651b511a3e5c3493e11f7c3f845e948f95fe3796b32120decee6eac6","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","README.md":"bd0e99ce271903a9f67cf5f8fca2f67f2583e4336fbaf583fcd78ec238d4176e","src/capabilities.rs":"6d65b5ca60a1c7140da33ab691bc877e335e4387edb09a7933605168db6e56b3","src/command.rs":"6d50f9ead11599c786d9d50708b633e6163764f3b8210cde0c557e42535c79c1","src/common.rs":"d696aabe88061f8315578c42115d976123a8fc4276384e478e14d241dfc9acc0","src/error.rs":"b0acf64e052edbc26e7dbcd1a54e8b9a786f01e9d48e0e5b2f410266bfdb9da2","src/httpapi.rs":"243cde695399975e5ff1ad765df26fe961f70ad9199f378c7544cf861c6bfe87","src/lib.rs":"336c146e934711dfe49f4b44bbcf278686b00be8d89abb9c7b7b045254994fbf","src/macros.rs":"93094c48e3880d925e684fba9678693eb8c0c39c7ed47b130b0751c4bca37ddc","src/response.rs":"c09d92fcf8177e3a0950db71f843123bab3dea78f136ba9c712afe1893f73961","src/server.rs":"dbbedec59c9a54629a4c59bd9aa3494d8621e59721f99c00b24c3b84a62a2e72"},"package":"0d161bc62ed766ddc0838af89f1b339ed3c8b5c3dbe8776b59731dfae7b1a6c7"}
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"6d7856aa51991bc6c15945046377a9992b8886cc8e4602d08f650f92803b71f6",".travis.yml":"78252ef89a407b1d76616b7afbf7afb8205530a7f7039f3a7ea140684e3aa8bc","Cargo.toml":"ed7a4c3380fbb78b99be805c20f20d590e5f377173284017ed86606cef3663e9","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","README.md":"bd0e99ce271903a9f67cf5f8fca2f67f2583e4336fbaf583fcd78ec238d4176e","src/capabilities.rs":"5039c1f80885ca2bab19f2d1c40b405c37c09901918625395141ac2e01600728","src/command.rs":"4bc0380b3e8916dd7514f751b18b47bf510c1fa16d9832617cf0ce5470d87797","src/common.rs":"d696aabe88061f8315578c42115d976123a8fc4276384e478e14d241dfc9acc0","src/error.rs":"b0acf64e052edbc26e7dbcd1a54e8b9a786f01e9d48e0e5b2f410266bfdb9da2","src/httpapi.rs":"44f1061123580ebb73ddd164a18cb223e16445c6a2eabd91f14c39d6a3d282e1","src/lib.rs":"336c146e934711dfe49f4b44bbcf278686b00be8d89abb9c7b7b045254994fbf","src/macros.rs":"93094c48e3880d925e684fba9678693eb8c0c39c7ed47b130b0751c4bca37ddc","src/response.rs":"c09d92fcf8177e3a0950db71f843123bab3dea78f136ba9c712afe1893f73961","src/server.rs":"f2110378cfaf7a4facb39d0e45c479a00c95a939536c85a6a105c858fffc2d70"},"package":"3099729d884692d690796454e8529edf3f0ebd87c87840f9c809df8eabb175ed"}

View File

@@ -1,6 +1,6 @@
[package]
name = "webdriver"
version = "0.25.2"
version = "0.26.0"
authors = ["Mozilla Tools and Automation <tools@lists.mozilla.com>"]
description = "Library implementing the wire protocol for the W3C WebDriver specification"
documentation = "https://docs.rs/webdriver"

View File

@@ -105,7 +105,7 @@ impl SpecNewSessionParameters {
"timeouts" => {
try!(SpecNewSessionParameters::validate_timeouts(value))
},
"unhandledPromptBehaviour" => {
"unhandledPromptBehavior" => {
try!(SpecNewSessionParameters::validate_unhandled_prompt_behaviour(value))
}
x => {
@@ -294,12 +294,12 @@ impl SpecNewSessionParameters {
fn validate_unhandled_prompt_behaviour(value: &Json) -> WebDriverResult<()> {
let behaviour = try_opt!(value.as_string(),
ErrorStatus::InvalidArgument,
"unhandledPromptBehaviour capability was not a string");
"unhandledPromptBehavior capability was not a string");
match behaviour {
"dismiss" |
"accept" => {},
x => return Err(WebDriverError::new(ErrorStatus::InvalidArgument,
format!("{} was not a valid unhandledPromptBehaviour value", x))) }
format!("{} was not a valid unhandledPromptBehavior value", x))) }
Ok(())
}
}

View File

@@ -26,7 +26,7 @@ pub enum WebDriverCommand<T: WebDriverExtensionCommand> {
GetWindowRect,
SetWindowRect(WindowRectParameters),
MaximizeWindow,
// FullscreenWindow // Not supported in marionette
FullscreenWindow,
SwitchToWindow(SwitchToWindowParameters),
SwitchToFrame(SwitchToFrameParameters),
SwitchToParentFrame,
@@ -136,6 +136,7 @@ impl<U: WebDriverExtensionRoute> WebDriverMessage<U> {
WebDriverCommand::SetWindowRect(parameters)
},
Route::MaximizeWindow => WebDriverCommand::MaximizeWindow,
Route::FullscreenWindow => WebDriverCommand::FullscreenWindow,
Route::SwitchToWindow => {
let parameters: SwitchToWindowParameters = try!(Parameters::from_json(&body_data));
WebDriverCommand::SwitchToWindow(parameters)
@@ -401,6 +402,7 @@ impl <U:WebDriverExtensionRoute> ToJson for WebDriverMessage<U> {
WebDriverCommand::IsEnabled(_) |
WebDriverCommand::IsSelected(_) |
WebDriverCommand::MaximizeWindow |
WebDriverCommand::FullscreenWindow |
WebDriverCommand::NewSession(_) |
WebDriverCommand::Refresh |
WebDriverCommand::Status |
@@ -540,7 +542,7 @@ impl Parameters for TimeoutsParameters {
Some(json) => {
Some(try_opt!(json.as_u64(),
ErrorStatus::InvalidArgument,
"Script timeout duration was not a signed integer"))
"Page load timeout duration was not a signed integer"))
}
None => None,
};
@@ -549,7 +551,7 @@ impl Parameters for TimeoutsParameters {
Some(json) => {
Some(try_opt!(json.as_u64(),
ErrorStatus::InvalidArgument,
"Script timeout duration was not a signed integer"))
"Implicit timeout duration was not a signed integer"))
}
None => None,
};

View File

@@ -28,6 +28,7 @@ fn standard_routes<U:WebDriverExtensionRoute>() -> Vec<(Method, &'static str, Ro
(Get, "/session/{sessionId}/window/rect", Route::GetWindowRect),
(Post, "/session/{sessionId}/window/rect", Route::SetWindowRect),
(Post, "/session/{sessionId}/window/maximize", Route::MaximizeWindow),
(Post, "/session/{sessionId}/window/fullscreen", Route::FullscreenWindow),
(Post, "/session/{sessionId}/window", Route::SwitchToWindow),
(Post, "/session/{sessionId}/frame", Route::SwitchToFrame),
(Post, "/session/{sessionId}/frame/parent", Route::SwitchToParentFrame),
@@ -90,6 +91,7 @@ pub enum Route<U:WebDriverExtensionRoute> {
GetWindowRect,
SetWindowRect,
MaximizeWindow,
FullscreenWindow,
SwitchToWindow,
SwitchToFrame,
SwitchToParentFrame,

View File

@@ -105,9 +105,8 @@ impl<T: WebDriverHandler<U>, U: WebDriverExtensionRoute> Dispatcher<T, U> {
if existing_session.id != *msg_session_id {
Err(WebDriverError::new(
ErrorStatus::InvalidSessionId,
format!("Got unexpected session id {} expected {}",
msg_session_id,
existing_session.id)))
format!("Got unexpected session id {}",
msg_session_id)))
} else {
Ok(())
}
@@ -173,7 +172,7 @@ impl<U: WebDriverExtensionRoute> Handler for HttpHandler<U> {
req.read_to_string(&mut body).unwrap();
}
debug!(" {} {} {}", req.method, req.uri, body);
debug!("-> {} {} {}", req.method, req.uri, body);
match req.uri {
AbsolutePath(path) => {
@@ -218,7 +217,7 @@ impl<U: WebDriverExtensionRoute> Handler for HttpHandler<U> {
Err(err) => (err.http_status(), err.to_json_string()),
};
debug!(" {} {}", status, resp_body);
debug!("<- {} {}", status, resp_body);
{
let resp_status = res.status_mut();

View File

@@ -142,11 +142,29 @@ sending it: we only want to send consistent values.
searches
~~~~~~~~
In the case a search engine is added by a user, the engine identifier "other" is used, e.g. "other.<source>".
This describes the search engine usage(count). The format is { "<engine identifier>.<source>"" : count }
This is optional because the users may have never used the search feature.
There's no difference if extended telemetry is enabled (prerelease builds) or not.
Sources in Android are based on the existing UI telemetry values and are as
follows:
Possible value :
.. code-block:: js
{
"yahoo.listitem":2,
"duckduckgo.listitem":1,
"google-nocodes.suggestion":1
}
<engine identifier>:
The identifier of the the search engine. The identifier is collected the way same as desktop.
we only record the search engine name when :
* builtin or suggested search engines with an ID (includes partner search engines in various distribution scenarios).
If it's not a built-in engine, we show "null" or "other".
* If the user has "Health Report" and core ping enabled.
<sources>
It's from one of the 'method's in UI telemetry. Possible values:
* actionbar: the user types in the url bar and hits enter to use the default
search engine
* listitem: the user selects a search engine from the list of secondary search
@@ -154,6 +172,7 @@ follows:
* suggestion: the user clicks on a search suggestion or, in the case that
suggestions are disabled, the row corresponding with the main engine
Other parameters
----------------

View File

@@ -627,6 +627,34 @@ Classifier::RemoveUpdateIntermediaries()
}
}
void
Classifier::CopyAndInvalidateFullHashCache()
{
MOZ_ASSERT(NS_GetCurrentThread() != mUpdateThread,
"CopyAndInvalidateFullHashCache cannot be called on update thread "
"since it mutates mLookupCaches which is only safe on "
"worker thread.");
// New lookup caches are built from disk, data likes cache which is
// generated online won't exist. We have to manually copy cache from
// old LookupCache to new LookupCache.
for (auto& newCache: mNewLookupCaches) {
for (auto& oldCache: mLookupCaches) {
if (oldCache->TableName() == newCache->TableName()) {
newCache->CopyFullHashCache(oldCache);
break;
}
}
}
// Clear cache when update.
// Invalidate cache entries in CopyAndInvalidateFullHashCache because only
// at this point we will have cache data in LookupCache.
for (auto& newCache: mNewLookupCaches) {
newCache->InvalidateExpiredCacheEntries();
}
}
void
Classifier::MergeNewLookupCaches()
{
@@ -860,6 +888,10 @@ Classifier::ApplyUpdatesForeground(nsresult aBackgroundRv,
return NS_OK;
}
if (NS_SUCCEEDED(aBackgroundRv)) {
// Copy and Invalidate fullhash cache here because this call requires
// mLookupCaches which is only available on work-thread
CopyAndInvalidateFullHashCache();
return SwapInNewTablesAndCleanup();
}
if (NS_ERROR_OUT_OF_MEMORY != aBackgroundRv) {
@@ -1223,9 +1255,6 @@ Classifier::UpdateHashStore(nsTArray<TableUpdate*>* aUpdates,
return NS_ERROR_UC_UPDATE_TABLE_NOT_FOUND;
}
// Clear cache when update
lookupCache->InvalidateExpiredCacheEntries();
FallibleTArray<uint32_t> AddPrefixHashes;
rv = lookupCache->GetPrefixes(AddPrefixHashes);
NS_ENSURE_SUCCESS(rv, rv);
@@ -1315,11 +1344,6 @@ Classifier::UpdateTableV4(nsTArray<TableUpdate*>* aUpdates,
return NS_ERROR_UC_UPDATE_TABLE_NOT_FOUND;
}
// Remove cache entries whose negative cache time is expired when update.
// We don't check if positive cache time is expired here because we want to
// keep the eviction rule simple when doing an update.
lookupCache->InvalidateExpiredCacheEntries();
nsresult rv = NS_OK;
// If there are multiple updates for the same table, prefixes1 & prefixes2

View File

@@ -140,6 +140,8 @@ private:
void MergeNewLookupCaches(); // Merge mNewLookupCaches into mLookupCaches.
void CopyAndInvalidateFullHashCache();
// Remove any intermediary for update, including in-memory
// and on-disk data.
void RemoveUpdateIntermediaries();

View File

@@ -356,6 +356,16 @@ struct CachedFullHashResponse {
typedef nsClassHashtable<nsUint32HashKey, CachedFullHashResponse> FullHashResponseMap;
template<class T>
void
CopyClassHashTable(const T& aSource, T& aDestination)
{
for (auto iter = aSource.ConstIter(); !iter.Done(); iter.Next()) {
auto value = aDestination.LookupOrAdd(iter.Key());
*value = *(iter.Data());
}
}
} // namespace safebrowsing
} // namespace mozilla

Some files were not shown because too many files have changed in this diff Show More