Bug 201742 - Web Inspector: Tighter autocomplete bubbles
Summary: Web Inspector: Tighter autocomplete bubbles
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-09-12 15:28 PDT by Joseph Pecoraro
Modified: 2019-09-13 12:10 PDT (History)
5 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (2.75 KB, patch)
2019-09-12 15:29 PDT, Joseph Pecoraro
timothy: review+
Details | Formatted Diff | Diff
[IMAGE] After (44.07 KB, image/png)
2019-09-12 15:30 PDT, Joseph Pecoraro
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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>