Bug 144055 - Web Inspector: Support passing extra arguments to ContentViews during construction
Summary: Web Inspector: Support passing extra arguments to ContentViews during constru...
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: Timothy Hatcher
URL:
Keywords: DoNotImportToRadar
Depends on:
Blocks:
 
Reported: 2015-04-22 11:20 PDT by Timothy Hatcher
Modified: 2015-04-25 18:36 PDT (History)
7 users (show)

See Also:


Attachments
Patch (30.35 KB, patch)
2015-04-22 11:27 PDT, Timothy Hatcher
joepeck: review+
timothy: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2015-04-22 11:20:51 PDT
This is needed to pass TimelineSidebarPanel to the Timeline views.
Comment 1 Timothy Hatcher 2015-04-22 11:27:18 PDT
Created attachment 251343 [details]
Patch
Comment 2 Joseph Pecoraro 2015-04-22 12:54:20 PDT
Comment on attachment 251343 [details]
Patch

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

> Source/WebInspectorUI/ChangeLog:3
> +        Web Inspector: Suport passing extra arguments to ContentViews during construction

Typo: "Suport" => "Support"

> Source/WebInspectorUI/UserInterface/Views/ContentView.js:34
> -            return new WebInspector.FrameContentView(representedObject);
> +            return new WebInspector.FrameContentView(representedObject.mainResource, extraArguments);

Related intentional change? This would break some code inside FrameContentView without a related change, since it does:

    if (this.representedObject.isMainFrame())

Which doesn't make sense on the mainResource.
Comment 3 Timothy Hatcher 2015-04-22 12:56:14 PDT
Comment on attachment 251343 [details]
Patch

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

>> Source/WebInspectorUI/UserInterface/Views/ContentView.js:34
>> +            return new WebInspector.FrameContentView(representedObject.mainResource, extraArguments);
> 
> Related intentional change? This would break some code inside FrameContentView without a related change, since it does:
> 
>     if (this.representedObject.isMainFrame())
> 
> Which doesn't make sense on the mainResource.

Bad reverse merge on my part.

In my tree the end result is:

            return new WebInspector.ResourceClusterContentView(representedObject.mainResource, extraArguments);

FrameContentView will be going away.
Comment 4 Timothy Hatcher 2015-04-25 18:36:14 PDT
r183322r183342

http://trac.webkit.org/log/?revs=183322-183342