[Webkit-unassigned] [Bug 43988] Web Inspector: Remote Web Inspector support for QtWebKit

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 26 13:36:39 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=43988





--- Comment #13 from Ilya Tikhonovsky <loislo at chromium.org>  2010-08-26 13:36:38 PST ---
(From update of attachment 65566)

WebKit/qt/WebCoreSupport/InspectorServerQt.h:62
 +      QMap<QWebPage*, InspectorClientQt*> m_inspectorClients;
It is not clear for me why you use two maps. id to page and page to client.
As I can see you can use simple map id to client.

WebKit/qt/WebCoreSupport/InspectorClientQt.cpp:266
 +  void InspectorClientQt::dispatch(const String &message)
Usually we are using InspectorClient only for sending messages to inspector.
The dispatch implementation should be in InspectorFrontendClient.


WebKit/qt/WebCoreSupport/InspectorClientQt.cpp:129
 +      }
it is not clear for me why you need an explicit m_remoteInspector flag.
I think it would be better to keep both abilities.
1) open local inspector
2) open remote inspector.

WebKit/qt/WebCoreSupport/InspectorClientQt.cpp:243
 +    if (m_remoteInspector 
 +          || (m_inspectedWebPage && m_inspectedWebPage->d->inspectorServerPort())) {
 +          m_remoteInspector = true;
 +          Q_ASSERT(m_inspectedWebPage->d->inspector->d->remoteFrontend);
 +  
 +          RemoteFrontendChannel* session = qobject_cast<RemoteFrontendChannel*>(m_inspectedWebPage->d->inspector->d->remoteFrontend);
 +          if (session)
 +              session->sendMessageToFrontend(message);
 +          return true;
 +      }

I think this portion of code can be simplified a bit.
1) m_remoteFrontend is unnecessary
2) m_inspectedWebPage is always not null
In that case you can just check the RemoteFrontendChannel and if it is not established then try to use local inspector.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list