WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
24977
Web Inspector: InspectorController is difficult to get to on the Page
https://bugs.webkit.org/show_bug.cgi?id=24977
Summary
Web Inspector: InspectorController is difficult to get to on the Page
James Robinson
Reported
2009-03-31 18:21:59 PDT
The InspectorController object is accessed through the Page object, which is not trivial to get to from all places that want to since they sometimes have to walk through a number of objects just to get up that high. Here's an example from ContextMenu.cpp: Node* node = m_hitTestResult.innerNonSharedNode(); if (!node) return; Frame* frame = node->document()->frame(); if (!frame) return; Page* page = frame->page(); if (!page) return; if (!page->inspectorController()) return;
Attachments
Adds an inspectorController() const getter on Frame to clean up callsites
(6.36 KB, patch)
2009-03-31 18:25 PDT
,
James Robinson
eric
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
James Robinson
Comment 1
2009-03-31 18:25:02 PDT
Created
attachment 29150
[details]
Adds an inspectorController() const getter on Frame to clean up callsites This patch adds Frame::inspectorController() const, which simply reaches up to the m_page for the InspectorController*.
Eric Seidel (no email)
Comment 2
2009-04-22 11:17:46 PDT
Comment on
attachment 29150
[details]
Adds an inspectorController() const getter on Frame to clean up callsites This looks fine. I assume that Page::inspectorController() can never be null? Also, you should consider adding a comment to Frame::inspectorController() in the header, noting that it can return 0. Otherwise looks good. r+. If you don't have commit bit, please upload a new patch if you act on the above comments (or need to make other changes).
Eric Seidel (no email)
Comment 3
2009-04-29 14:43:52 PDT
Comment on
attachment 29150
[details]
Adds an inspectorController() const getter on Frame to clean up callsites Since I don't think James has commit bit, I shouldn't really have marked this r+.
Alexey Proskuryakov
Comment 4
2010-06-12 14:55:33 PDT
James, do you intend to follow up on this?
Radar WebKit Bug Importer
Comment 5
2014-01-12 15:51:42 PST
<
rdar://problem/15801448
>
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