Bug 50877 - Web Inspector: Make inspector on Windows show and be usable in WebKit2
Summary: Web Inspector: Make inspector on Windows show and be usable in WebKit2
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Brian Weinstein
URL:
Keywords: InRadar, PlatformOnly
Depends on:
Blocks:
 
Reported: 2010-12-11 15:47 PST by Brian Weinstein
Modified: 2010-12-12 12:16 PST (History)
12 users (show)

See Also:


Attachments
[PATCH] Fix (9.06 KB, patch)
2010-12-11 16:04 PST, Brian Weinstein
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Weinstein 2010-12-11 15:47:51 PST
Web Inspector: Make inspector on Windows show and be usable in WebKit2

<rdar://problem/8738987>
Comment 1 Brian Weinstein 2010-12-11 16:04:56 PST
Created attachment 76309 [details]
[PATCH] Fix
Comment 2 WebKit Review Bot 2010-12-11 16:09:40 PST
Attachment 76309 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--diff-files', u'WebKit2/ChangeLog', u'WebKit2/UIProcess/WebInspectorProxy.cpp', u'WebKit2/UIProcess/WebInspectorProxy.h', u'WebKit2/UIProcess/win/WebInspectorProxyWin.cpp']" exit_code: 1
WebKit2/UIProcess/win/WebInspectorProxyWin.cpp:89:  A case label should not be indented, but line up with its switch statement.  [whitespace/indent] [4]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Sam Weinig 2010-12-11 16:10:19 PST
Comment on attachment 76309 [details]
[PATCH] Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=76309&action=review

> WebKit2/UIProcess/WebInspectorProxy.h:149
> +    WKViewRef m_inspectorView;

I think storing a RefPtr<WebView> here might make things a bit nicer.

> WebKit2/UIProcess/win/WebInspectorProxyWin.cpp:100
> +        case WM_SIZE:
> +            lResult = onSizeEvent(hWnd, message, wParam, lParam, handled);
> +            break;
> +        case WM_GETMINMAXINFO:
> +            lResult = onMinMaxInfoEvent(hWnd, message, wParam, lParam, handled);
> +            break;
> +        case WM_CLOSE:
> +            lResult = onCloseEvent(hWnd, message, wParam, lParam, handled);
> +            break;
> +        default:
> +            handled = false;
> +            break;

This should be un-indented.

> WebKit2/UIProcess/win/WebInspectorProxyWin.cpp:176
> +    CFStringRef urlStringRef = ::CFURLGetString(htmlURLRef.get());

We traditionally do not use the ::prefix on CF function calls.
Comment 4 Brian Weinstein 2010-12-11 17:21:23 PST
Comment on attachment 76309 [details]
[PATCH] Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=76309&action=review

>> WebKit2/UIProcess/WebInspectorProxy.h:149
>> +    WKViewRef m_inspectorView;
> 
> I think storing a RefPtr<WebView> here might make things a bit nicer.

I was getting some strange errors when trying to make it a RefPtr<WebView> (errors from of PassRefPtr), but was able to make this a raw pointer, which did make the code a lot cleaner, and was able to remove calls to the WKView* functions and replace them with calls to functions on the WebView.

>> WebKit2/UIProcess/win/WebInspectorProxyWin.cpp:100
>> +            break;
> 
> This should be un-indented.

Fixed.

>> WebKit2/UIProcess/win/WebInspectorProxyWin.cpp:176
>> +    CFStringRef urlStringRef = ::CFURLGetString(htmlURLRef.get());
> 
> We traditionally do not use the ::prefix on CF function calls.

Removed (and got rid of the local variable altogether.
Comment 5 Brian Weinstein 2010-12-12 12:16:39 PST
Landed in r73877.