Bug 140076

Summary: Web Inspector: inspector view top inset should not include height of web view banners
Product: WebKit Reporter: Matt Baker <mattbaker>
Component: Web InspectorAssignee: Matt Baker <mattbaker>
Severity: Normal CC: andersca, commit-queue, graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Description Flags
Incorrect top inset
Patch none

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
Comment 2 Matt Baker 2015-01-05 01:00:28 PST
Created attachment 243969 [details]
Comment 3 Joseph Pecoraro 2015-01-05 15:00:43 PST
Comment on attachment 243969 [details]

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]
Comment 5 Joseph Pecoraro 2015-01-05 16:45:35 PST
Comment on attachment 244010 [details]

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]

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.