Bug 140076 - Web Inspector: inspector view top inset should not include height of web view banners
Summary: Web Inspector: inspector view top inset should not include height of web view...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Matt Baker
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-01-04 22:37 PST by Matt Baker
Modified: 2015-01-05 18:13 PST (History)
9 users (show)

See Also:


Attachments
Incorrect top inset (420.54 KB, image/png)
2015-01-04 22:37 PST, Matt Baker
no flags Details
Patch (4.21 KB, patch)
2015-01-05 01:00 PST, Matt Baker
no flags Details | Formatted Diff | Diff
Patch (4.25 KB, patch)
2015-01-05 15:15 PST, Matt Baker
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Baker 2015-01-04 22:37:31 PST
Created attachment 243965 [details]
Incorrect top inset

When docked on the right, the top inset of the Inspector frame offset should not include the heights of any banners installed in the inspected web view. This causes a gap at the top of the Inspector view.

Steps to reproduce:
1) Dock inspector on the right.
2) Bring up the "Find in page" search bar in the inspected page.
3) Force inspector view to resize (drag splitter bar).
4) The inspector view moves below the search bar.
Comment 1 Radar WebKit Bug Importer 2015-01-04 22:37:44 PST
<rdar://problem/19371800>
Comment 2 Matt Baker 2015-01-05 01:00:28 PST
Created attachment 243969 [details]
Patch
Comment 3 Joseph Pecoraro 2015-01-05 15:00:43 PST
Comment on attachment 243969 [details]
Patch

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

> Source/WebKit2/UIProcess/API/mac/WKView.mm:4159
> +- (void)_setTotalHeightOfBanners:(CGFloat)totalHeightOfBanners
> +{
> +    _data->_totalHeightOfBanners = totalHeightOfBanners;
> +}
> +
>  - (CGFloat)_topContentInset
>  {
>      return _data->_topContentInset;
>  }
>  
> +- (CGFloat)_totalHeightOfBanners
> +{
> +    return _data->_totalHeightOfBanners;
> +}

The order of these methods is weird. You should put the equivalent getters/setters side by side. So in this case -_setTotalHeightOfBanners: next to -_totalHeightOfBanners.
Comment 4 Matt Baker 2015-01-05 15:15:53 PST
Created attachment 244010 [details]
Patch
Comment 5 Joseph Pecoraro 2015-01-05 16:45:35 PST
Comment on attachment 244010 [details]
Patch

Looks good to me. Needs a WebKit2 Owner approval I think.
Comment 6 WebKit Commit Bot 2015-01-05 18:13:49 PST
Comment on attachment 244010 [details]
Patch

Clearing flags on attachment: 244010

Committed r177944: <http://trac.webkit.org/changeset/177944>
Comment 7 WebKit Commit Bot 2015-01-05 18:13:55 PST
All reviewed patches have been landed.  Closing bug.