Bug 201742

Summary: Web Inspector: Tighter autocomplete bubbles
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: hi, inspector-bugzilla-changes, joepeck, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix
timothy: review+
[IMAGE] After none

Description Joseph Pecoraro 2019-09-12 15:28:46 PDT
Tighter autocomplete bubbles.

Currently there is always ~22px of trailing space beyond the 10px padding.
Comment 1 Joseph Pecoraro 2019-09-12 15:29:42 PDT
Created attachment 378684 [details]
[PATCH] Proposed Fix
Comment 2 Joseph Pecoraro 2019-09-12 15:30:28 PDT
Created attachment 378685 [details]
[IMAGE] After
Comment 3 Devin Rousso 2019-09-12 15:46:13 PDT
Comment on attachment 378684 [details]
[PATCH] Proposed Fix

r=me

> Source/WebInspectorUI/UserInterface/Views/CompletionSuggestionsView.js:123
> +        let intrinsicSize = this._completionLayoutElement.getBoundingClientRect();

We could use `realOffsetWidth`/`realOffsetHeight`, but I like the idea of only fetching `getBoundingClientRect` once.

> Source/WebInspectorUI/UserInterface/Views/CompletionSuggestionsView.js:135
> +        var width = Math.min(containerWidth, maximumWidth);

`let`

> Source/WebInspectorUI/UserInterface/Views/CompletionSuggestionsView.js:136
> +        var paddedWidth = containerWidth;

This isn't needed anymore.
Comment 4 Joseph Pecoraro 2019-09-13 12:02:33 PDT
Comment on attachment 378684 [details]
[PATCH] Proposed Fix

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

>> Source/WebInspectorUI/UserInterface/Views/CompletionSuggestionsView.js:136
>> +        var paddedWidth = containerWidth;
> 
> This isn't needed anymore.

Nice!
Comment 5 Joseph Pecoraro 2019-09-13 12:09:48 PDT
https://trac.webkit.org/changeset/249848/webkit
Comment 6 Radar WebKit Bug Importer 2019-09-13 12:10:19 PDT
<rdar://problem/55347967>
Comment 7 Radar WebKit Bug Importer 2019-09-13 12:10:21 PDT
<rdar://problem/55347970>