WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
ASSIGNED
198938
[lldb-webkit] Show whether frame is focused in Frame and Document summaries
https://bugs.webkit.org/show_bug.cgi?id=198938
Summary
[lldb-webkit] Show whether frame is focused in Frame and Document summaries
Daniel Bates
Reported
2019-06-17 16:26:41 PDT
I found it useful to know whether a Frame is focused or not when investigating
bug #198922
. Add this info to the Frame and Document summaries.
Attachments
Patch
(4.08 KB, patch)
2019-06-17 16:30 PDT
,
Daniel Bates
no flags
Details
Formatted Diff
Diff
Patch
(4.24 KB, patch)
2019-08-23 09:51 PDT
,
Daniel Bates
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Daniel Bates
Comment 1
2019-06-17 16:30:52 PDT
Created
attachment 372288
[details]
Patch
Simon Fraser (smfr)
Comment 2
2019-06-17 16:37:14 PDT
Comment on
attachment 372288
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=372288&action=review
> Tools/lldb/lldb_webkit.py:725 > + def is_focused(self): > + page_ptr = self.valobj.GetChildMemberWithName('m_page') > + if not page_ptr or not bool(page_ptr.GetValueAsUnsigned(0)): > + return False > + # Every page has a FocusController. > + focus_controller_ptr = StdUniquePtrWrapper(page_ptr.GetChildMemberWithName('m_focusController'), dict()) > + focused_frame_ptr = focus_controller_ptr.value().GetChildMemberWithName('m_focusedFrame').GetChildMemberWithName('m_ptr') > + return focused_frame_ptr.GetValueAsUnsigned(0) == self.valobj.GetAddress().GetFileAddress()
This seems very prone to breakage, for example if someone renamed m_focusedFrame. Can we instead add String Document::debugDescription() const, and call it from here?
Daniel Bates
Comment 3
2019-06-17 16:42:56 PDT
(In reply to Simon Fraser (smfr) from
comment #2
)
> Comment on
attachment 372288
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=372288&action=review
> > > Tools/lldb/lldb_webkit.py:725 > > + def is_focused(self): > > + page_ptr = self.valobj.GetChildMemberWithName('m_page') > > + if not page_ptr or not bool(page_ptr.GetValueAsUnsigned(0)): > > + return False > > + # Every page has a FocusController. > > + focus_controller_ptr = StdUniquePtrWrapper(page_ptr.GetChildMemberWithName('m_focusController'), dict()) > > + focused_frame_ptr = focus_controller_ptr.value().GetChildMemberWithName('m_focusedFrame').GetChildMemberWithName('m_ptr') > > + return focused_frame_ptr.GetValueAsUnsigned(0) == self.valobj.GetAddress().GetFileAddress() > > This seems very prone to breakage, for example if someone renamed > m_focusedFrame. Can we instead add String Document::debugDescription() > const, and call it from here?
With time... I can do anything you want 😀 I don't have such a luxury at the moment. R- the patch if this is a deal breaker and cannot be addressed at another junction.
Daniel Bates
Comment 4
2019-08-23 09:51:38 PDT
Created
attachment 377130
[details]
Patch I haven't had a chance to address Simon's remarks. Just posted an updated patch that I use locally for archiving.
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