summaryrefslogtreecommitdiffstats
path: root/layout/base/PresShell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layout/base/PresShell.cpp')
-rw-r--r--layout/base/PresShell.cpp26
1 files changed, 7 insertions, 19 deletions
diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp
index 7674abb3d0..cd41da3730 100644
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -3931,11 +3931,9 @@ void PresShell::ScheduleViewManagerFlush() {
return;
}
- nsPresContext* presContext = GetPresContext();
- if (presContext) {
+ if (nsPresContext* presContext = GetPresContext()) {
presContext->RefreshDriver()->ScheduleViewManagerFlush();
}
- SetNeedLayoutFlush();
}
void PresShell::DispatchSynthMouseMove(WidgetGUIEvent* aEvent) {
@@ -6566,7 +6564,7 @@ void PresShell::PaintInternal(nsView* aViewToPaint, PaintInternalFlags aFlags) {
// We also force sync-decoding via pref for reftests.
if (aFlags & PaintInternalFlags::PaintSyncDecodeImages ||
mDocument->IsStaticDocument() ||
- StaticPrefs::image_decode_sync_enabled()) {
+ StaticPrefs::image_testing_decode_sync_enabled()) {
flags |= PaintFrameFlags::SyncDecodeImages;
}
if (renderer->GetBackendType() == layers::LayersBackend::LAYERS_WR) {
@@ -11260,10 +11258,8 @@ void PresShell::SetIsActive(bool aIsActive) {
#if defined(MOZ_WIDGET_ANDROID)
if (!aIsActive && presContext &&
presContext->IsRootContentDocumentCrossProcess()) {
- if (BrowserChild* browserChild = BrowserChild::GetFrom(this)) {
- // Reset the dynamic toolbar offset state.
- presContext->UpdateDynamicToolbarOffset(0);
- }
+ // Reset the dynamic toolbar offset state.
+ presContext->UpdateDynamicToolbarOffset(0);
}
#endif
}
@@ -11849,10 +11845,9 @@ void PresShell::SyncWindowProperties(bool aSync) {
canvas ? canvas : rootFrame, rootFrame);
windowWidget->SetTransparencyMode(mode);
- // For macOS, apply color scheme overrides to the top level window widget.
- if (auto scheme = pc->GetOverriddenOrEmbedderColorScheme()) {
- windowWidget->SetColorScheme(scheme);
- }
+ // For macOS, apply color scheme to the top level window widget.
+ windowWidget->SetColorScheme(
+ Some(LookAndFeel::ColorSchemeForFrame(rootFrame)));
}
if (!weak.IsAlive()) {
@@ -12102,13 +12097,6 @@ void PresShell::EventHandler::EventTargetData::UpdateWheelEventTarget(
return;
}
- // If the browsing context is no longer the same as the context of the
- // current wheel transaction, do not override the event target.
- if (!groupFrame->PresContext() || !groupFrame->PresShell() ||
- groupFrame->PresContext() != GetPresContext()) {
- return;
- }
-
// If dom.event.wheel-event-groups.enabled is set and whe have a stored
// event target from the wheel transaction, override the event target.
SetFrameAndComputePresShellAndContent(groupFrame, aGUIEvent);