WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 44957
Web Inspector, Extension API: Panel.onSelectionChanged event is never fired
https://bugs.webkit.org/show_bug.cgi?id=44957
Summary
Web Inspector, Extension API: Panel.onSelectionChanged event is never fired
Andrey Kosyakov
Reported
2010-08-31 09:07:08 PDT
webInspector.panels.elements.onSelectionChanged should be fired when a DOM element is selected in elements panel.
Attachments
patch
(6.48 KB, patch)
2010-08-31 09:24 PDT
,
Andrey Kosyakov
no flags
Details
Formatted Diff
Diff
patch
(3.10 KB, patch)
2010-08-31 10:39 PDT
,
Andrey Kosyakov
no flags
Details
Formatted Diff
Diff
patch
(6.87 KB, patch)
2010-08-31 10:48 PDT
,
Andrey Kosyakov
yurys
: review-
Details
Formatted Diff
Diff
patch
(12.85 KB, patch)
2010-09-01 06:04 PDT
,
Andrey Kosyakov
yurys
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Andrey Kosyakov
Comment 1
2010-08-31 09:24:11 PDT
Created
attachment 66064
[details]
patch - Added Panel.name - Fixed the way onSelectionChanged is dispatched from ElementsPanel.js - Added console API into context of code being evaluated by webInspector.inspectedWindow.evaluate() (so we can do inspect() there) - Added basic test for extension API events
Andrey Kosyakov
Comment 2
2010-08-31 10:39:54 PDT
Created
attachment 66071
[details]
patch - Extracted stringifying wrapper around expressions evaluated by extensions into a more readable function.
Andrey Kosyakov
Comment 3
2010-08-31 10:45:58 PDT
Comment on
attachment 66071
[details]
patch oops, wrong patch. sorry.
Andrey Kosyakov
Comment 4
2010-08-31 10:48:50 PDT
Created
attachment 66073
[details]
patch
Yury Semikhatsky
Comment 5
2010-09-01 01:48:24 PDT
Comment on
attachment 66073
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=66073&action=prettypatch
> WebCore/inspector/front-end/ExtensionServer.js:225 > + var result = window.eval(
I believe we can get rid of this eval by providing the function body directly or even call the eval without wrapping it into an anonymous function as we discussed offline. A bigger problem is that this code doesn't allow extensions to declare global functions, r- for this.
Andrey Kosyakov
Comment 6
2010-09-01 06:04:24 PDT
Created
attachment 66207
[details]
patch - changed webInspector.inspectedWindow.evaluaet() to return object instead of its stringified representation - rewrote wrapper for evaluated code - added more tests for eval
Andrey Kosyakov
Comment 7
2010-09-01 06:06:01 PDT
(In reply to
comment #5
)
> (From update of
attachment 66073
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=66073&action=prettypatch
> > > WebCore/inspector/front-end/ExtensionServer.js:225 > > + var result = window.eval( > I believe we can get rid of this eval by providing the function body directly or even call the eval without wrapping it into an anonymous function as we discussed offline. A bigger problem is that this code doesn't allow extensions to declare global functions, r- for this.
The latter happened to be not the case: the code being evaluated still runs in global context. Added a test for that, though, and rewrote wrapper code to a shorter (though less readable) version without outer function.
Andrey Kosyakov
Comment 8
2010-09-01 08:48:50 PDT
Manually committed
r66601
:
http://trac.webkit.org/changeset/66601
Eric Seidel (no email)
Comment 9
2010-09-13 21:28:32 PDT
http://trac.webkit.org/browser/trunk/LayoutTests/inspector/extensions-events.html
is flaky on the Leopard Commit bot and is causing the bot to back up. :(
Eric Seidel (no email)
Comment 10
2010-09-13 21:29:30 PDT
1 CONSOLE MESSAGE: line 663: [object HTMLParagraphElement] 1 CONSOLE MESSAGE: line 667: [object HTMLParagraphElement] Is the diff.
Andrey Kosyakov
Comment 11
2010-09-14 00:25:53 PDT
(In reply to
comment #10
)
> 1 CONSOLE MESSAGE: line 663: [object HTMLParagraphElement] > 1 CONSOLE MESSAGE: line 667: [object HTMLParagraphElement] > > Is the diff.
This should have been fixed by
r67394
:
http://trac.webkit.org/changeset/67394
It is not actual flakiness, rather a stable, though unexpected, side effect from
r67385
: the inspect() console command line API call uses console.log() internally, which causes line number of a line within InjectedScript.js that called console.log() to appear in test expectations. Hence a change to InjectedScripts.js that causes a call to console.log() to move causes test expectations change.
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