Bug 70417 - Web Inspector: get rid of manual view hierarchy management.
Summary: Web Inspector: get rid of manual view hierarchy management.
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: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-19 07:14 PDT by Pavel Feldman
Modified: 2011-10-20 04:23 PDT (History)
11 users (show)

See Also:


Attachments
Patch (33.41 KB, patch)
2011-10-19 08:02 PDT, Pavel Feldman
no flags Details | Formatted Diff | Diff
[Patch] Review comments addressed (33.66 KB, patch)
2011-10-19 08:32 PDT, Pavel Feldman
no flags Details | Formatted Diff | Diff
[Patch] Review comments addressed (34.12 KB, patch)
2011-10-19 08:39 PDT, Pavel Feldman
no flags Details | Formatted Diff | Diff
[Patch] with new iframe support (42.29 KB, patch)
2011-10-19 09:38 PDT, Pavel Feldman
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2011-10-19 07:14:54 PDT
This change removes necessity to manage view hierarchy manually (add/removeChildView methods are going away).
Comment 1 Pavel Feldman 2011-10-19 08:02:47 PDT
Created attachment 111622 [details]
Patch
Comment 2 Andrey Kosyakov 2011-10-19 08:21:49 PDT
Comment on attachment 111622 [details]
Patch

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

> Source/WebCore/inspector/front-end/NetworkPanel.js:-43
> -    // FIXME: some of the styles should be loaded on demand by components that need them.
> -    var styles = [
> -        "inspectorCommon.css",
> -        "dataGrid.css",
> -        "networkLogView.css"
> -    ];
> -    WebInspector.IFrameView.call(this, parentElement, styles);

This will probably regress performance. At least, this is worth reflecting in the ChangeLog.

> Source/WebCore/inspector/front-end/Panel.js:88
> +    detach: function()

how are extensions tests doing with this?

> Source/WebCore/inspector/front-end/View.js:139
> +        if (childIndex < 0) {
> +            console.error("Attempt to remove non-child view");

When are we supposed to hit the check?

> Source/WebCore/inspector/front-end/View.js:185
> +        while (parentElement && !parentElement.__view__)

Just __view seems more consistent with the rest of our code. __foo__ seems to be customary used for JS quirks.

> Source/WebCore/inspector/front-end/View.js:198
> +    printViewHierarchy: function()

Is this still necessary?

> Source/WebCore/inspector/front-end/View.js:205
> +    _collectViewHierarchy: function(prefix, lines)

ditto.
Comment 3 Pavel Feldman 2011-10-19 08:29:01 PDT
Comment on attachment 111622 [details]
Patch

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

>> Source/WebCore/inspector/front-end/NetworkPanel.js:-43
>> -    WebInspector.IFrameView.call(this, parentElement, styles);
> 
> This will probably regress performance. At least, this is worth reflecting in the ChangeLog.

Done.

>> Source/WebCore/inspector/front-end/Panel.js:88
>> +    detach: function()
> 
> how are extensions tests doing with this?

Rolled it back for now.

>> Source/WebCore/inspector/front-end/View.js:139
>> +            console.error("Attempt to remove non-child view");
> 
> When are we supposed to hit the check?

We are not supposed to. I'll remove it after a number of builds.

>> Source/WebCore/inspector/front-end/View.js:185
>> +        while (parentElement && !parentElement.__view__)
> 
> Just __view seems more consistent with the rest of our code. __foo__ seems to be customary used for JS quirks.

done.

>> Source/WebCore/inspector/front-end/View.js:198
>> +    printViewHierarchy: function()
> 
> Is this still necessary?

Yes, I'd like to keep this debugging code at least for some time.

>> Source/WebCore/inspector/front-end/View.js:205
>> +    _collectViewHierarchy: function(prefix, lines)
> 
> ditto.

ditto
Comment 4 Pavel Feldman 2011-10-19 08:32:36 PDT
Created attachment 111626 [details]
[Patch] Review comments addressed
Comment 5 Pavel Feldman 2011-10-19 08:39:43 PDT
Created attachment 111627 [details]
[Patch] Review comments addressed
Comment 6 Andrey Kosyakov 2011-10-19 08:45:54 PDT
Comment on attachment 111627 [details]
[Patch] Review comments addressed

LGTM
Comment 7 Pavel Feldman 2011-10-19 09:38:03 PDT
Created attachment 111636 [details]
[Patch] with new iframe support
Comment 8 Yury Semikhatsky 2011-10-19 09:40:35 PDT
Comment on attachment 111627 [details]
[Patch] Review comments addressed

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

> Source/WebCore/inspector/front-end/View.js:76
> +        if (parentElement && this.element.parentElement != parentElement)

!= -> !==
Comment 9 Yury Semikhatsky 2011-10-19 10:00:08 PDT
Comment on attachment 111636 [details]
[Patch] with new iframe support

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

> Source/WebCore/inspector/front-end/ProfilesPanel.js:209
> +                if ("dispose" in view)

This can be implemented as detach override in corresponding view.
Comment 10 Pavel Feldman 2011-10-20 04:23:10 PDT
Committed r97961: <http://trac.webkit.org/changeset/97961>