Bug 124350 - Web Inspector: Popovers may shrink unnecessarily
Summary: Web Inspector: Popovers may shrink unnecessarily
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: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-11-14 06:56 PST by Antoine Quint
Modified: 2013-12-02 03:00 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.12 KB, patch)
2013-11-14 06:59 PST, Antoine Quint
no flags Details | Formatted Diff | Diff

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