Bug 86254 - Web Inspector: Timeline panel "Load Timeline data" broken
Summary: Web Inspector: Timeline panel "Load Timeline data" broken
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Vivek Galatage
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-11 14:48 PDT by Tony Gentilcore
Modified: 2012-05-15 08:56 PDT (History)
11 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Gentilcore 2012-05-11 14:48:16 PDT
1. Open the Timeline panel
2. Press ctrl+o or right click and select "Load timeline data"
3. Notice the open file dialog is not displayed as expected
Comment 1 Vivek Galatage 2012-05-14 08:01:48 PDT
This is my preliminary analysis:

The TimelinePanel::_contextMenu() (TimelinePanel.js), adds the menu items in the context menu for "Load Timeline data" specifying this._fileSelectorElement.click as the context menu click handler.

This context menu is displayed by InspectorFrontendHost::showContextMenu() and even the event associated with the menu item is handled in FrontendMenuProvider::contextMenuItemSelected() method (both these are there in Source\WebCore\inspector\InspectorFrontendHost.cpp). 

So now in this method there is an explicit call to WebInspector.contextMenuItemSelected (ContextMenu.js) using the ScriptFunctionCall object upon clicking this menu item.

As per the invocation, the JS call to WebInspector.contextMenuItemSelected is invoked and it tries to invoke the this._fileSelectorElement.click

This call is running in what I call as Script Running Context than the User Running Context. So I guess in this mode, the call to click() on File Input will not have any effect. And hence the File dialog is not displayed.

To demonstrate this I have created a html snippet here: http://pastebin.com/3JV2jgtM 
So in this code snippet, the call to fileSelectorElement.click(); works only from the button's onClick handler i.e. f()
Comment 2 Vivek Galatage 2012-05-14 08:12:36 PDT
So in the above, if the call to ScriptFunctionCall is simulated in the User Action Execution Context, then it should restore the functionality. Your thoughts?
Comment 3 Ilya Tikhonovsky 2012-05-14 23:14:36 PDT
Save and load work fine on Chromium Linux-x64 and Mac in undocked mode.
Load doesn't work in docked mode.
Comment 4 Vivek Galatage 2012-05-14 23:22:06 PDT
On Windows, I checked both i.e. dock n undock modes, but still the load is not working.

Cross verified it with Safari nightly and got the same result.
Comment 5 Vivek Galatage 2012-05-15 00:32:07 PDT
Chromium works in undocked mode while safari fails to load in both cases. Seems the issue is with safari and chrome and not with webkit.

Hence marking as resolved-wontfix.
Comment 6 Tony Gentilcore 2012-05-15 08:56:05 PDT
OK, filed http://crbug.com/128176 for Chrome. Not sure where to file this for Safari.