Bug 125072 - Web Inspector: add a method to add padding around a WebInspector.Rect
Summary: Web Inspector: add a method to add padding around a WebInspector.Rect
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:
Depends on:
Blocks:
 
Reported: 2013-12-02 03:32 PST by Antoine Quint
Modified: 2013-12-02 11:53 PST (History)
5 users (show)

See Also:


Attachments
Patch (7.87 KB, patch)
2013-12-02 03:35 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-12-02 03:32:19 PST
We do the following in quite a few places in the code when computing the targetFrame for a popover:

    const padding = 2;
    bounds.origin.x -= padding;
    bounds.origin.y -= padding;
    bounds.size.width += padding * 2;
    bounds.size.height += padding * 2;

It sounds like we ought to add a method on WebInspector.Rect to add padding.
Comment 1 Antoine Quint 2013-12-02 03:35:24 PST
Created attachment 218158 [details]
Patch
Comment 2 Joseph Pecoraro 2013-12-02 10:11:23 PST
Comment on attachment 218158 [details]
Patch

Nice, r=me
Comment 3 WebKit Commit Bot 2013-12-02 11:53:10 PST
Comment on attachment 218158 [details]
Patch

Clearing flags on attachment: 218158

Committed r159946: <http://trac.webkit.org/changeset/159946>
Comment 4 WebKit Commit Bot 2013-12-02 11:53:12 PST
All reviewed patches have been landed.  Closing bug.