Bug 172149

Summary: Make it possible to adjust which edges are affected by safe area insets
Product: WebKit Reporter: Tim Horton <thorton>
Component: New BugsAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, dino, sam, simon.fraser
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch bdakin: review+

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 :(.