Bug 172149 - Make it possible to adjust which edges are affected by safe area insets
Summary: Make it possible to adjust which edges are affected by safe area insets
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-15 17:30 PDT by Tim Horton
Modified: 2017-05-16 10:37 PDT (History)
4 users (show)

See Also:


Attachments
Patch (6.30 KB, patch)
2017-05-15 17:31 PDT, Tim Horton
bdakin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2017-05-15 17:30:24 PDT
Make it possible to adjust which edges are affected by safe area insets
Comment 1 Tim Horton 2017-05-15 17:31:26 PDT
Created attachment 310194 [details]
Patch
Comment 2 Sam Weinig 2017-05-15 19:28:15 PDT
Comment on attachment 310194 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=310194&action=review

> Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:160
>  @property (nonatomic, readonly) BOOL _safeAreaShouldAffectObscuredInsets WK_API_AVAILABLE(ios(WK_IOS_TBA));
> +@property (nonatomic, setter=_setObscuredInsetEdgesAffectedBySafeArea:) UIRectEdge _obscuredInsetEdgesAffectedBySafeArea WK_API_AVAILABLE(ios(WK_IOS_TBA));

Does it make sense to have both of these? Since you could just set _obscuredInsetEdgesAffectedBySafeArea to UIRectEdgeNone.  Or does _safeAreaShouldAffectObscuredInsets do more than that?
Comment 3 Tim Horton 2017-05-16 00:36:39 PDT
(In reply to Sam Weinig from comment #2)
> Comment on attachment 310194 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=310194&action=review
> 
> > Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:160
> >  @property (nonatomic, readonly) BOOL _safeAreaShouldAffectObscuredInsets WK_API_AVAILABLE(ios(WK_IOS_TBA));
> > +@property (nonatomic, setter=_setObscuredInsetEdgesAffectedBySafeArea:) UIRectEdge _obscuredInsetEdgesAffectedBySafeArea WK_API_AVAILABLE(ios(WK_IOS_TBA));
> 
> Does it make sense to have both of these? Since you could just set
> _obscuredInsetEdgesAffectedBySafeArea to UIRectEdgeNone.  Or does
> _safeAreaShouldAffectObscuredInsets do more than that?

Please note that _safeAreaShouldAffectObscuredInsets is read-only. It exposes the intent of the page, not of the API client.
Comment 4 Tim Horton 2017-05-16 10:21:02 PDT
http://trac.webkit.org/changeset/216935/webkit
Comment 5 Sam Weinig 2017-05-16 10:37:55 PDT
(In reply to Tim Horton from comment #3)
> (In reply to Sam Weinig from comment #2)
> > Comment on attachment 310194 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=310194&action=review
> > 
> > > Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:160
> > >  @property (nonatomic, readonly) BOOL _safeAreaShouldAffectObscuredInsets WK_API_AVAILABLE(ios(WK_IOS_TBA));
> > > +@property (nonatomic, setter=_setObscuredInsetEdgesAffectedBySafeArea:) UIRectEdge _obscuredInsetEdgesAffectedBySafeArea WK_API_AVAILABLE(ios(WK_IOS_TBA));
> > 
> > Does it make sense to have both of these? Since you could just set
> > _obscuredInsetEdgesAffectedBySafeArea to UIRectEdgeNone.  Or does
> > _safeAreaShouldAffectObscuredInsets do more than that?
> 
> Please note that _safeAreaShouldAffectObscuredInsets is read-only. It
> exposes the intent of the page, not of the API client.

Ah. These are some tricky names to wrap ones head around :(.