In WebInspector.Panel.wasShown() this.focus() is called, to set the focus within the panel the user just selected. For an ExtensionPanel, the focus should default to be within the iframe hosting the extension code, rather than its container (which, being a div, can't accept focus anyway). By setting focus on the iframe, its contentWindow will become the window with focus.
Created attachment 162870 [details] Patch
A different solution would store the extensionView on |this|, eg this._extensionView, then define ExtensionPanel.defaultFocusedElement() to return this._extensionView.defaultFocusedElement(). However the origin impl chose not to store the extensionView and perhaps there was a reason.
Comment on attachment 162870 [details] Patch LGTM. vsevik, could you please review this?
Comment on attachment 162870 [details] Patch Clearing flags on attachment: 162870 Committed r128910: <http://trac.webkit.org/changeset/128910>
All reviewed patches have been landed. Closing bug.
(In reply to comment #4) > (From update of attachment 162870 [details]) > Clearing flags on attachment: 162870 > > Committed r128910: <http://trac.webkit.org/changeset/128910> The new inspector/extensions/extensions-panel.html fails on Qt and EFL: --- /ramdisk/qt-linux-64-release/build/layout-test-results/inspector/extensions/extensions-panel-expected.txt +++ /ramdisk/qt-linux-64-release/build/layout-test-results/inspector/extensions/extensions-panel-actual.txt @@ -22,7 +22,7 @@ show : <function> } Panel shown -focused: true +focused: false Extension panel size correct RUNNING TEST: extension_testSearch Panel hidden Could you check it, please?
(In reply to comment #6) > (In reply to comment #4) > > (From update of attachment 162870 [details] [details]) > > Clearing flags on attachment: 162870 > > > > Committed r128910: <http://trac.webkit.org/changeset/128910> > > The new inspector/extensions/extensions-panel.html fails on Qt and EFL: > --- /ramdisk/qt-linux-64-release/build/layout-test-results/inspector/extensions/extensions-panel-expected.txt > +++ /ramdisk/qt-linux-64-release/build/layout-test-results/inspector/extensions/extensions-panel-actual.txt > @@ -22,7 +22,7 @@ > show : <function> > } > Panel shown > -focused: true > +focused: false > Extension panel size correct > RUNNING TEST: extension_testSearch > Panel hidden > > > Could you check it, please? I'm uncertain who you are asking; if your are asking me I don't know how to check it. Do these platforms have different focus behavior?
I don't know anything about this test. But I'm sure it is a regression caused by http://trac.webkit.org/changeset/128910