WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
109284
Web Inspector: for event listener provide handler function value in protocol and in UI
https://bugs.webkit.org/show_bug.cgi?id=109284
Summary
Web Inspector: for event listener provide handler function value in protocol ...
Peter Rybin
Reported
2013-02-08 04:18:18 PST
Event listener handler is typically a JavaScript function. A direct display of the function value is missing. Function value should be expandable as any JavaScript value. This allows to see closure variables and function-as-object properties.
Attachments
Patch
(20.98 KB, patch)
2013-02-08 05:08 PST
,
Peter Rybin
no flags
Details
Formatted Diff
Diff
Patch
(22.28 KB, patch)
2013-02-11 09:58 PST
,
Peter Rybin
no flags
Details
Formatted Diff
Diff
Patch
(23.39 KB, patch)
2013-02-11 12:59 PST
,
Peter Rybin
no flags
Details
Formatted Diff
Diff
Patch
(23.40 KB, patch)
2013-02-12 07:08 PST
,
Peter Rybin
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Peter Rybin
Comment 1
2013-02-08 05:08:42 PST
Created
attachment 187293
[details]
Patch
Yury Semikhatsky
Comment 2
2013-02-08 05:31:59 PST
Comment on
attachment 187293
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=187293&action=review
> Source/WebCore/bindings/v8/ScriptEventListener.cpp:112 > + V8AbstractEventListener* v8Listener = static_cast<V8AbstractEventListener*>(listener);
Please extract common part with eventListenerHandlerBody into a separate function.
> Source/WebCore/inspector/Inspector.json:1748 > + { "name": "handler", "$ref": "Runtime.RemoteObject", "optional": true, "hidden": true, "description": "Event handler function value" }
The type is already hidden.
> Source/WebCore/inspector/Inspector.json:1870 > + { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name for handler value." }
Please add a note on that handler won't be returned if the group is not specified.
> Source/WebCore/inspector/InspectorDOMAgent.cpp:1394 > + InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(mainWorldScriptState(frame));
You should use the world from event listener instead.
> Source/WebCore/inspector/front-end/EventListenersSidebarPane.js:123 > + node.eventListeners("arabypaC", callback);
Please use WebInspector.EventListenersSidebarPane._objectGroupName
Peter Rybin
Comment 3
2013-02-11 09:58:19 PST
Created
attachment 187603
[details]
Patch
WebKit Review Bot
Comment 4
2013-02-11 11:37:05 PST
Comment on
attachment 187603
[details]
Patch
Attachment 187603
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/16491317
New failing tests: inspector/elements/event-listeners-about-blank.html
Peter Rybin
Comment 5
2013-02-11 12:31:44 PST
> > Source/WebCore/bindings/v8/ScriptEventListener.cpp:112 > > + V8AbstractEventListener* v8Listener = static_cast<V8AbstractEventListener*>(listener); > Please extract common part with eventListenerHandlerBody into a separate function.
Cannot do this thing. It turned out that final toWebCoreStringWithNullCheck statement depends on contextScope and breaks if the object doesn't exist.
> > Source/WebCore/inspector/Inspector.json:1748 > > + { "name": "handler", "$ref": "Runtime.RemoteObject", "optional": true, "hidden": true, "description": "Event handler function value" } > The type is already hidden.
Done
> > Source/WebCore/inspector/Inspector.json:1870 > > + { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name for handler value." } > Please add a note on that handler won't be returned if the group is not specified.
Done
> > Source/WebCore/inspector/InspectorDOMAgent.cpp:1394 > > + InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(mainWorldScriptState(frame)); > You should use the world from event listener instead.
Done
> > Source/WebCore/inspector/front-end/EventListenersSidebarPane.js:123 > > + node.eventListeners("arabypaC", callback); > Please use WebInspector.EventListenersSidebarPane._objectGroupName
Done
WebKit Review Bot
Comment 6
2013-02-11 12:39:48 PST
Comment on
attachment 187603
[details]
Patch
Attachment 187603
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/16494309
New failing tests: inspector/elements/event-listeners-about-blank.html
Peter Rybin
Comment 7
2013-02-11 12:59:31 PST
Created
attachment 187641
[details]
Patch
Yury Semikhatsky
Comment 8
2013-02-12 01:37:28 PST
Comment on
attachment 187641
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=187641&action=review
> Source/WebCore/inspector/Inspector.json:1759 > + { "name": "handler", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Event handler function value" }
Missing . at the end of the sentence.
> Source/WebCore/inspector/InspectorDOMAgent.h:134 > + virtual void getEventListenersForNode(ErrorString*, int nodeId, const WTF::String*, RefPtr<TypeBuilder::Array<TypeBuilder::DOM::EventListener> >& listenersArray);
Param name would make sense here, otherwise it is hard to guess that the string param is objectGroupId
Peter Rybin
Comment 9
2013-02-12 07:08:03 PST
Created
attachment 187863
[details]
Patch
WebKit Review Bot
Comment 10
2013-02-12 08:03:07 PST
Comment on
attachment 187863
[details]
Patch Clearing flags on attachment: 187863 Committed
r142627
: <
http://trac.webkit.org/changeset/142627
>
WebKit Review Bot
Comment 11
2013-02-12 08:03:12 PST
All reviewed patches have been landed. Closing bug.
Peter Rybin
Comment 12
2013-03-15 14:10:00 PDT
See duplicate bug with some context:
https://bugs.webkit.org/show_bug.cgi?id=107289
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug