Backed out 2 changesets (bug 1830820) for reftest failure on inline-block-slice-5.html . CLOSED TREE
Backed out changeset 941c44881781 (bug1830820) Backed out changeset da493ba4c9a6 (bug1830820)
This commit is contained in:
@@ -1983,27 +1983,6 @@ bool PresShell::SimpleResizeReflow(nscoord aWidth, nscoord aHeight) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PresShell::CanHandleUserInputEvents(WidgetGUIEvent* aGUIEvent) {
|
||||
if (XRE_IsParentProcess()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (aGUIEvent->mFlags.mIsSynthesizedForTests &&
|
||||
!StaticPrefs::dom_input_events_security_isUserInputHandlingDelayTest()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!aGUIEvent->IsUserAction()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (nsPresContext* rootPresContext = mPresContext->GetRootPresContext()) {
|
||||
return rootPresContext->UserInputEventsAllowed();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void PresShell::AddResizeEventFlushObserverIfNeeded() {
|
||||
if (!mIsDestroying && !mResizeEventPending &&
|
||||
MOZ_LIKELY(!mDocument->GetBFCacheEntry())) {
|
||||
@@ -6901,17 +6880,6 @@ nsresult PresShell::HandleEvent(nsIFrame* aFrameForPresShell,
|
||||
aGUIEvent->AsMouseEvent()->mReason == WidgetMouseEvent::eSynthesized) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Here we are granting some delays to ensure that user input events are
|
||||
// created while the page content may not be visible to the user are not
|
||||
// processed.
|
||||
// The main purpose of this is to avoid user inputs are handled in the
|
||||
// new document where as the user inputs were originally targeting some
|
||||
// content in the old document.
|
||||
if (!CanHandleUserInputEvents(aGUIEvent)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
EventHandler eventHandler(*this);
|
||||
return eventHandler.HandleEvent(aFrameForPresShell, aGUIEvent,
|
||||
aDontRetargetEvents, aEventStatus);
|
||||
@@ -9334,10 +9302,6 @@ void PresShell::Freeze(bool aIncludeSubDocuments) {
|
||||
if (presContext->RefreshDriver()->GetPresContext() == presContext) {
|
||||
presContext->RefreshDriver()->Freeze();
|
||||
}
|
||||
|
||||
if (nsPresContext* rootPresContext = presContext->GetRootPresContext()) {
|
||||
rootPresContext->ResetUserInputEventsAllowed();
|
||||
}
|
||||
}
|
||||
|
||||
mFrozen = true;
|
||||
@@ -9396,16 +9360,6 @@ void PresShell::Thaw(bool aIncludeSubDocuments) {
|
||||
UpdateImageLockingState();
|
||||
|
||||
UnsuppressPainting();
|
||||
|
||||
// In case the above UnsuppressPainting call didn't start the
|
||||
// refresh driver, we manually start the refresh driver to
|
||||
// ensure nsPresContext::MaybeIncreaseMeasuredTicksSinceLoading
|
||||
// can be called for user input events handling.
|
||||
if (presContext && presContext->IsRoot()) {
|
||||
if (!presContext->RefreshDriver()->HasPendingTick()) {
|
||||
presContext->RefreshDriver()->InitializeTimer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user