Skip to content

Commit

Permalink
Bug 1503656 - Part 4. Add safe area to nsIWidget. r=emilio
Browse files Browse the repository at this point in the history
Safe area value is stored in nsIWidget for each platform support

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

--HG--
extra : moz-landing-system : lando
  • Loading branch information
makotokato committed Mar 4, 2020
1 parent aa5b814 commit 1df343e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions widget/nsIWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ class nsIWidget : public nsISupports {
typedef mozilla::LayoutDeviceIntRegion LayoutDeviceIntRegion;
typedef mozilla::LayoutDeviceIntSize LayoutDeviceIntSize;
typedef mozilla::ScreenIntPoint ScreenIntPoint;
typedef mozilla::ScreenIntMargin ScreenIntMargin;
typedef mozilla::ScreenIntSize ScreenIntSize;
typedef mozilla::ScreenPoint ScreenPoint;
typedef mozilla::CSSToScreenScale CSSToScreenScale;
Expand Down Expand Up @@ -1742,6 +1743,14 @@ class nsIWidget : public nsISupports {
}
#endif

/*
* Get safe area insets except to cutout.
* See https://drafts.csswg.org/css-env-1/#safe-area-insets.
*/
virtual mozilla::ScreenIntMargin GetSafeAreaInsets() const {
return mozilla::ScreenIntMargin();
}

private:
class LongTapInfo {
public:
Expand Down

0 comments on commit 1df343e

Please sign in to comment.