summaryrefslogtreecommitdiffstats
path: root/layout/base
diff options
context:
space:
mode:
Diffstat (limited to 'layout/base')
-rw-r--r--layout/base/crashtests/crashtests.list2
-rw-r--r--layout/base/nsCSSFrameConstructor.cpp2
-rw-r--r--layout/base/nsCaret.cpp5
-rw-r--r--layout/base/nsRefreshDriver.cpp98
-rw-r--r--layout/base/nsRefreshDriver.h5
5 files changed, 5 insertions, 107 deletions
diff --git a/layout/base/crashtests/crashtests.list b/layout/base/crashtests/crashtests.list
index e2cb99e04..6ded4ff3f 100644
--- a/layout/base/crashtests/crashtests.list
+++ b/layout/base/crashtests/crashtests.list
@@ -448,7 +448,7 @@ load 876092.html
load 876221.html
load 897852.html
asserts(4-6) asserts-if(Android&&!asyncPan,2) load 898913.html # bug 847368
-pref(layers.acceleration.disabled,true) pref(layers.force-active,true) load 919434.html
+pref(layers.acceleration.enabled,false) pref(layers.force-active,true) load 919434.html
load 926728.html
load 930381.html
load 931450.html
diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp
index ec676ca92..6642a090d 100644
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -10886,6 +10886,7 @@ nsCSSFrameConstructor::ProcessChildren(nsFrameConstructorState& aState,
// no? And if we cared we could look through the item list
// instead of groveling through the framelist here..
nsStyleContext *frameStyleContext = aFrame->StyleContext();
+#ifdef DEBUG
// Report a warning for non-GC frames, for chrome:
if (!aFrame->IsGeneratedContentFrame() &&
mPresShell->GetPresContext()->IsChrome()) {
@@ -10904,6 +10905,7 @@ nsCSSFrameConstructor::ProcessChildren(nsFrameConstructorState& aState,
message,
params, ArrayLength(params));
}
+#endif
RefPtr<nsStyleContext> blockSC = mPresShell->StyleSet()->
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::mozXULAnonymousBlock,
diff --git a/layout/base/nsCaret.cpp b/layout/base/nsCaret.cpp
index eca22f3ba..8396726c6 100644
--- a/layout/base/nsCaret.cpp
+++ b/layout/base/nsCaret.cpp
@@ -511,7 +511,7 @@ nsCaret::GetPaintGeometry(nsRect* aRect)
CheckSelectionLanguageChange();
int32_t frameOffset;
- nsIFrame *frame = GetFrameAndOffset(GetSelectionInternal(),
+ nsIFrame* frame = GetFrameAndOffset(GetSelectionInternal(),
mOverrideContent, mOverrideOffset, &frameOffset);
if (!frame) {
return nullptr;
@@ -521,8 +521,7 @@ nsCaret::GetPaintGeometry(nsRect* aRect)
const nsStyleUserInterface* userinterface = frame->StyleUserInterface();
if ((!mIgnoreUserModify &&
userinterface->mUserModify == StyleUserModify::ReadOnly) ||
- userinterface->mUserInput == StyleUserInput::None ||
- userinterface->mUserInput == StyleUserInput::Disabled) {
+ frame->IsContentDisabled()){
return nullptr;
}
diff --git a/layout/base/nsRefreshDriver.cpp b/layout/base/nsRefreshDriver.cpp
index 5ea7a0188..c0d09d2a0 100644
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -851,12 +851,6 @@ NS_IMPL_ISUPPORTS(VsyncChildCreateCallback, nsIIPCBackgroundChildCreateCallback)
static StaticRefPtr<RefreshDriverTimer> sRegularRateTimer;
static StaticRefPtr<InactiveRefreshDriverTimer> sThrottledRateTimer;
-#ifdef XP_WIN
-static int32_t sHighPrecisionTimerRequests = 0;
-// a bare pointer to avoid introducing a static constructor
-static nsITimer *sDisableHighPrecisionTimersTimer = nullptr;
-#endif
-
static void
CreateContentVsyncRefreshTimer(void*)
{
@@ -934,16 +928,6 @@ nsRefreshDriver::Shutdown()
sRegularRateTimer = nullptr;
sThrottledRateTimer = nullptr;
-
-#ifdef XP_WIN
- if (sDisableHighPrecisionTimersTimer) {
- sDisableHighPrecisionTimersTimer->Cancel();
- NS_RELEASE(sDisableHighPrecisionTimersTimer);
- timeEndPeriod(1);
- } else if (sHighPrecisionTimerRequests) {
- timeEndPeriod(1);
- }
-#endif
}
/* static */ int32_t
@@ -1062,7 +1046,6 @@ nsRefreshDriver::nsRefreshDriver(nsPresContext* aPresContext)
mNeedToRecomputeVisibility(false),
mTestControllingRefreshes(false),
mViewManagerFlushIsPending(false),
- mRequestedHighPrecision(false),
mInRefresh(false),
mWaitingForTransaction(false),
mSkippedPaints(false),
@@ -1300,83 +1283,6 @@ nsRefreshDriver::StopTimer()
mActiveTimer->RemoveRefreshDriver(this);
mActiveTimer = nullptr;
-
- if (mRequestedHighPrecision) {
- SetHighPrecisionTimersEnabled(false);
- }
-}
-
-#ifdef XP_WIN
-static void
-DisableHighPrecisionTimersCallback(nsITimer *aTimer, void *aClosure)
-{
- timeEndPeriod(1);
- NS_RELEASE(sDisableHighPrecisionTimersTimer);
-}
-#endif
-
-void
-nsRefreshDriver::ConfigureHighPrecision()
-{
- bool haveUnthrottledFrameRequestCallbacks =
- mFrameRequestCallbackDocs.Length() > 0;
-
- // if the only change that's needed is that we need high precision,
- // then just set that
- if (!mThrottled && !mRequestedHighPrecision &&
- haveUnthrottledFrameRequestCallbacks) {
- SetHighPrecisionTimersEnabled(true);
- } else if (mRequestedHighPrecision && !haveUnthrottledFrameRequestCallbacks) {
- SetHighPrecisionTimersEnabled(false);
- }
-}
-
-void
-nsRefreshDriver::SetHighPrecisionTimersEnabled(bool aEnable)
-{
- LOG("[%p] SetHighPrecisionTimersEnabled (%s)", this, aEnable ? "true" : "false");
-
- if (aEnable) {
- NS_ASSERTION(!mRequestedHighPrecision, "SetHighPrecisionTimersEnabled(true) called when already requested!");
-#ifdef XP_WIN
- if (++sHighPrecisionTimerRequests == 1) {
- // If we had a timer scheduled to disable it, that means that it's already
- // enabled; just cancel the timer. Otherwise, really enable it.
- if (sDisableHighPrecisionTimersTimer) {
- sDisableHighPrecisionTimersTimer->Cancel();
- NS_RELEASE(sDisableHighPrecisionTimersTimer);
- } else {
- timeBeginPeriod(1);
- }
- }
-#endif
- mRequestedHighPrecision = true;
- } else {
- NS_ASSERTION(mRequestedHighPrecision, "SetHighPrecisionTimersEnabled(false) called when not requested!");
-#ifdef XP_WIN
- if (--sHighPrecisionTimerRequests == 0) {
- // Don't jerk us around between high precision and low precision
- // timers; instead, only allow leaving high precision timers
- // after 90 seconds. This is arbitrary, but hopefully good
- // enough.
- NS_ASSERTION(!sDisableHighPrecisionTimersTimer, "We shouldn't have an outstanding disable-high-precision timer !");
-
- nsCOMPtr<nsITimer> timer = do_CreateInstance(NS_TIMER_CONTRACTID);
- if (timer) {
- timer.forget(&sDisableHighPrecisionTimersTimer);
- sDisableHighPrecisionTimersTimer->InitWithFuncCallback(DisableHighPrecisionTimersCallback,
- nullptr,
- 90 * 1000,
- nsITimer::TYPE_ONE_SHOT);
- } else {
- // might happen if we're shutting down XPCOM; just drop the time period down
- // immediately
- timeEndPeriod(1);
- }
- }
-#endif
- mRequestedHighPrecision = false;
- }
}
uint32_t
@@ -1993,8 +1899,6 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
observer->DidRefresh();
}
- ConfigureHighPrecision();
-
NS_ASSERTION(mInRefresh, "Still in refresh");
if (mPresContext->IsRoot() && XRE_IsContentProcess() && gfxPrefs::AlwaysPaint()) {
@@ -2247,7 +2151,6 @@ nsRefreshDriver::ScheduleFrameRequestCallbacks(nsIDocument* aDocument)
}
// make sure that the timer is running
- ConfigureHighPrecision();
EnsureTimerStarted();
}
@@ -2256,7 +2159,6 @@ nsRefreshDriver::RevokeFrameRequestCallbacks(nsIDocument* aDocument)
{
mFrameRequestCallbackDocs.RemoveElement(aDocument);
mThrottledFrameRequestCallbackDocs.RemoveElement(aDocument);
- ConfigureHighPrecision();
// No need to worry about restarting our timer in slack mode if it's already
// running; that will happen automatically when it fires.
}
diff --git a/layout/base/nsRefreshDriver.h b/layout/base/nsRefreshDriver.h
index b2dd9be4b..4e839e764 100644
--- a/layout/base/nsRefreshDriver.h
+++ b/layout/base/nsRefreshDriver.h
@@ -450,7 +450,6 @@ private:
bool mNeedToRecomputeVisibility;
bool mTestControllingRefreshes;
bool mViewManagerFlushIsPending;
- bool mRequestedHighPrecision;
bool mInRefresh;
// True if the refresh driver is suspended waiting for transaction
@@ -502,10 +501,6 @@ private:
friend class mozilla::RefreshDriverTimer;
- // turn on or turn off high precision based on various factors
- void ConfigureHighPrecision();
- void SetHighPrecisionTimersEnabled(bool aEnable);
-
static void Shutdown();
// `true` if we are currently in jank-critical mode.