Bug 150916 - Web Inspector: ⌥⌘C sometimes ends ups up opening inspector without console prompt focused
Summary: Web Inspector: ⌥⌘C sometimes ends ups up opening inspector without console pr...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Other
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-11-04 17:17 PST by Joseph Pecoraro
Modified: 2015-11-05 11:36 PST (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (2.45 KB, patch)
2015-11-04 17:19 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[PATCH] Proposed Fix (2.45 KB, patch)
2015-11-04 17:37 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2015-11-04 17:17:01 PST
* SUMMARY
⌥⌘C sometimes ends ups up opening inspector without console prompt focused.

* STEPS TO REPRODUCE
1. Open this page
2. Develop > Show Error Console (⌥⌘C)
  => Console prompt not focused

* NOTES
- It appears as if even though we explicitly focused the console prompt it was getting blurred later
- It looks like when the document becomesFirstResponder it sets the initial focus element, after blurring whatever was focused

(lldb)  bt
* thread #1: tid = 0x3a6f0f, 0x000000010a46ac04 WebCore`WebCore::Document::setFocusedElement(WTF::PassRefPtr<WebCore::Element>, WebCore::FocusDirection) [inlined] WebCore::Element* std::exchange<WebCore::Element*, std::nullptr_t>(t=0x00007fff5b8a45f0) at StdLibExtras.h:358, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  * frame #0: 0x000000010a46ac04 WebCore`WebCore::Document::setFocusedElement(WTF::PassRefPtr<WebCore::Element>, WebCore::FocusDirection) [inlined] WebCore::Element* std::exchange<WebCore::Element*, std::nullptr_t>(t=0x00007fff5b8a45f0) at StdLibExtras.h:358
    frame #1: 0x000000010a46ac04 WebCore`WebCore::Document::setFocusedElement(WTF::PassRefPtr<WebCore::Element>, WebCore::FocusDirection) [inlined] WTF::PassRefPtr<WebCore::Element>::leakRef(this=0x00007fff5b8a45f0) const at PassRefPtr.h:96
    frame #2: 0x000000010a46ac04 WebCore`WebCore::Document::setFocusedElement(WTF::PassRefPtr<WebCore::Element>, WebCore::FocusDirection) [inlined] WTF::RefPtr<WebCore::Element>::RefPtr<WebCore::Element>(o=0x00007fff5b8a45f0) at RefPtr.h:103
    frame #3: 0x000000010a46ac04 WebCore`WebCore::Document::setFocusedElement(WTF::PassRefPtr<WebCore::Element>, WebCore::FocusDirection) [inlined] WTF::RefPtr<WebCore::Element>::RefPtr<WebCore::Element>(o=0x00007fff5b8a45f0) at RefPtr.h:104
    frame #4: 0x000000010a46ac04 WebCore`WebCore::Document::setFocusedElement(this=0x000000010f53ef40, prpNewFocusedElement=PassRefPtr<WebCore::Element> at 0x00007fff5b8a45f0, direction=FocusDirectionNone) + 20 at Document.cpp:3696
    frame #5: 0x00000001089859dd WebKit`WebKit::WebPage::setInitialFocus(this=0x00007fdbcd067210, forward=true, isKeyboardEventValid=false, event=0x00007fff5b8a4640, callbackID=5) + 91 at WebPage.cpp:2327
    frame #6: 0x00000001089a0edf WebKit`void IPC::handleMessage<Messages::WebPage::SetInitialFocus, WebKit::WebPage, void (WebKit::WebPage::*)(bool, bool, WebKit::WebKeyboardEvent const&, unsigned long long)>(IPC::MessageDecoder&, WebKit::WebPage*, void (WebKit::WebPage::*)(bool, bool, WebKit::WebKeyboardEvent const&, unsigned long long)) [inlined] void IPC::callMemberFunction<WebKit::WebPage, void (WebKit::WebPage::*)(bool, bool, WebKit::WebKeyboardEvent const&, unsigned long long), std::__1::tuple<bool, bool, WebKit::WebKeyboardEvent, unsigned long long>, std::make_index_sequence<4ul> >(object=<unavailable>, function=<unavailable>)(bool, bool, WebKit::WebKeyboardEvent const&, unsigned long long)) + 103 at HandleMessage.h:22
    frame #7: 0x00000001089a0ed1 WebKit`void IPC::handleMessage<Messages::WebPage::SetInitialFocus, WebKit::WebPage, void (WebKit::WebPage::*)(bool, bool, WebKit::WebKeyboardEvent const&, unsigned long long)>(decoder=<unavailable>, object=<unavailable>, function=<unavailable>)(bool, bool, WebKit::WebKeyboardEvent const&, unsigned long long)) + 89 at HandleMessage.h:92
    frame #8: 0x000000010883bf03 WebKit`IPC::MessageReceiverMap::dispatchMessage(this=<unavailable>, connection=0x000000010cefd000, decoder=0x000000011d355440) + 113 at MessageReceiverMap.cpp:102
Comment 1 Radar WebKit Bug Importer 2015-11-04 17:17:36 PST
<rdar://problem/23404951>
Comment 2 Joseph Pecoraro 2015-11-04 17:19:41 PST
Created attachment 264830 [details]
[PATCH] Proposed Fix
Comment 3 Joseph Pecoraro 2015-11-04 17:37:28 PST
Created attachment 264832 [details]
[PATCH] Proposed Fix
Comment 4 WebKit Commit Bot 2015-11-05 11:36:16 PST
Comment on attachment 264832 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 264832

Committed r192065: <http://trac.webkit.org/changeset/192065>
Comment 5 WebKit Commit Bot 2015-11-05 11:36:20 PST
All reviewed patches have been landed.  Closing bug.