[Webkit-unassigned] [Bug 64297] [Qt][WK2] Add the Web Inspector to WebKit2

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 24 02:54:43 PDT 2011


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





--- Comment #37 from Genisim <genisim at yahoo.com>  2011-08-24 02:54:43 PST ---
Created an attachment (id=104975)
 --> (https://bugs.webkit.org/attachment.cgi?id=104975&action=review)
Updated Web Inspector diff

Alexis,

first of all thanks for fast and detail review.

Attached updated patch for Web Inspector for Qt5 MiniBrowser.

All updated according to your comments except follow:

"
  > Source/WebKit2/UIProcess/WebInspectorProxy.h:183
  > +    QSGView* m_view;

  I think you can use OwnPtr here.
"

And yes, you miss one point - Proposed (reviewed patch) solve problem with MiniBrowser -> BrowserView.cpp ->

+void BrowserView::toggleWebInspector()
+{
+    if (desktopWebView()) {
+        WKPageRef m_pageRef = desktopWebView()->pageRef();
+        WKPageGroupRef m_pageGroupRef = WKPageGetPageGroup(m_pageRef);
+        WKPreferencesRef m_preferences = WKPageGroupGetPreferences(m_pageGroupRef);
+
+        if (WKInspectorIsVisible(WKPageGetInspector(m_pageRef))) {
+            WKPreferencesSetDeveloperExtrasEnabled(m_preferences, false);
+            WKInspectorClose(WKPageGetInspector(m_pageRef));
+        } else {
+            WKPreferencesSetDeveloperExtrasEnabled(m_preferences, true);
+            WKInspectorShow(WKPageGetInspector(m_pageRef));
+        }
+    }
+}

One need to use "WKPageRef m_pageRef" for WK... functions and
"pageRef" is a private method of DesktopWebView class.

For WebInspectorProxy similar problem was fixed by "friend"

But one can't use "friend" for all external classes like MiniBrowser, BrowserView class

In one of previous proposed patches all WK... functions was moved to qdesktopwebview but

this patch was declined by Benjamin (I agree with him). 

Now I updated all according your comments and back to "pageRef" issue.

Any solution, suggestion for this problem ???

thanks

-- 
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