Skip to content

Commit

Permalink
Bug 1503656 - Part 6. Rebuild CSS environment when safe area insets a…
Browse files Browse the repository at this point in the history
…re changed. r=emilio

Safe area insets can be changed dynamically (i.e. window is fullscreen and etc), so if it is updated, we have to re-parse CSS.

Differential Revision: https://phabricator.services.mozilla.com/D52512

--HG--
extra : moz-landing-system : lando
  • Loading branch information
makotokato committed Mar 4, 2020
1 parent 5e7416a commit e3d1ff0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions layout/base/nsPresContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2581,7 +2581,13 @@ DynamicToolbarState nsPresContext::GetDynamicToolbarState() const {
}

void nsPresContext::SetSafeAreaInsets(const ScreenIntMargin& aSafeAreaInsets) {
if (mSafeAreaInsets == aSafeAreaInsets) {
return;
}
mSafeAreaInsets = aSafeAreaInsets;

PostRebuildAllStyleDataEvent(nsChangeHint(0),
RestyleHint::RecascadeSubtree());
}

#ifdef DEBUG
Expand Down

0 comments on commit e3d1ff0

Please sign in to comment.