Bug 113563 - Web Inspector: ability to use AnchorBox as an anchor for Popover
Summary: Web Inspector: ability to use AnchorBox as an anchor for Popover
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Andrey Lushnikov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-29 02:40 PDT by Andrey Lushnikov
Modified: 2013-03-29 05:40 PDT (History)
9 users (show)

See Also:


Attachments
Patch (4.00 KB, patch)
2013-03-29 02:43 PDT, Andrey Lushnikov
no flags Details | Formatted Diff | Diff
Patch (3.99 KB, patch)
2013-03-29 05:03 PDT, Andrey Lushnikov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Lushnikov 2013-03-29 02:40:53 PDT
Ability to use AnchorBox instead of Element as an anchor for Popover.
Comment 1 Andrey Lushnikov 2013-03-29 02:43:31 PDT
Created attachment 195711 [details]
Patch
Comment 2 Eugene Klyuchnikov 2013-03-29 02:55:54 PDT
Comment on attachment 195711 [details]
Patch

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

> Source/WebCore/inspector/front-end/Popover.js:56
> +     * @param {Element|AnchorBox} anchor

Vsevolod wont accept this annotation =(
Comment 3 Andrey Lushnikov 2013-03-29 03:11:27 PDT
Comment on attachment 195711 [details]
Patch

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

>> Source/WebCore/inspector/front-end/Popover.js:56
>> +     * @param {Element|AnchorBox} anchor
> 
> Vsevolod wont accept this annotation =(

How about a bet? :)
Comment 4 Ilya Tikhonovsky 2013-03-29 04:28:08 PDT
Comment on attachment 195711 [details]
Patch

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

>>> Source/WebCore/inspector/front-end/Popover.js:56
>>> +     * @param {Element|AnchorBox} anchor
>> 
>> Vsevolod wont accept this annotation =(
> 
> How about a bet? :)

You can move anchorElement.boxInWindow(window); call to the topmost functions like show and showView
and implement another top level method showForBox
In that case you will have better api.
Comment 5 Pavel Feldman 2013-03-29 04:46:18 PDT
Comment on attachment 195711 [details]
Patch

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

> Source/WebCore/inspector/front-end/Popover.js:159
> +        var anchorBox = anchorElement.constructor === AnchorBox ? anchorElement : anchorElement.boxInWindow(window);

Please use instanceof
Comment 6 Andrey Lushnikov 2013-03-29 05:03:17 PDT
Created attachment 195724 [details]
Patch
Comment 7 WebKit Review Bot 2013-03-29 05:39:56 PDT
Comment on attachment 195724 [details]
Patch

Clearing flags on attachment: 195724

Committed r147209: <http://trac.webkit.org/changeset/147209>
Comment 8 WebKit Review Bot 2013-03-29 05:40:00 PDT
All reviewed patches have been landed.  Closing bug.