Bug 124350

Summary: Web Inspector: Popovers may shrink unnecessarily
Product: WebKit Reporter: Antoine Quint <graouts>
Component: Web InspectorAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, graouts, joepeck, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Antoine Quint 2013-11-14 06:56:54 PST
Because we always get the intersection of the preferred frame and the container frame to ensure the popover fits within its container based on a preferred frame that would place the arrow within the center of the attachment edge, we get in situations where we may shrink the popover instead of shifting it to fit within the container frame.
Comment 1 Radar WebKit Bug Importer 2013-11-14 06:57:06 PST
<rdar://problem/15469207>
Comment 2 Antoine Quint 2013-11-14 06:59:01 PST
Created attachment 216930 [details]
Patch
Comment 3 Timothy Hatcher 2013-11-14 07:19:41 PST
Comment on attachment 216930 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Popover.js:402
> +            x += containerFrame.maxX() - (x + width);

+= does not sound right. Should this just be =?

> Source/WebInspectorUI/UserInterface/Popover.js:404
> +            y += containerFrame.maxY() - (y + height);

Ditto.
Comment 4 Timothy Hatcher 2013-11-14 07:26:26 PST
Comment on attachment 216930 [details]
Patch

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

>> Source/WebInspectorUI/UserInterface/Popover.js:402
>> +            x += containerFrame.maxX() - (x + width);
> 
> += does not sound right. Should this just be =?

Never mind. It will always be negative.
Comment 5 WebKit Commit Bot 2013-11-14 08:01:20 PST
Comment on attachment 216930 [details]
Patch

Clearing flags on attachment: 216930

Committed r159286: <http://trac.webkit.org/changeset/159286>
Comment 6 WebKit Commit Bot 2013-11-14 08:01:26 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Antoine Quint 2013-12-02 03:00:29 PST
This caused a regression, see https://bugs.webkit.org/show_bug.cgi?id=125069.