Bug 50945

Summary: WebKit2: Web Inspector windows don't have titles
Product: WebKit Reporter: Brian Weinstein <bweinstein>
Component: WebKit2Assignee: Timothy Hatcher <timothy>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben, bweinstein
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Proposed Change
aroben: review+, timothy: commit-queue-
Proposed Change (with Qt and GTK fixed)
aroben: review+, timothy: commit-queue-
Proposed Change (with Adam's feedback) timothy: review+, timothy: commit-queue-

Description Brian Weinstein 2010-12-13 11:10:48 PST
In WebKit2, Web Inspector windows don't have titles. We need to listen to when the inspected URL has changed, and update the title through that.
Comment 1 Brian Weinstein 2010-12-13 11:11:12 PST
<rdar://problem/8762410>
Comment 2 Timothy Hatcher 2011-02-21 15:54:07 PST
Created attachment 83229 [details]
Proposed Change
Comment 3 Adam Roben (:aroben) 2011-02-21 15:57:10 PST
Comment on attachment 83229 [details]
Proposed Change

You might want to give the Windows and Qt EWS a chance to chew on this.
Comment 4 Timothy Hatcher 2011-02-21 16:05:17 PST
Created attachment 83235 [details]
Proposed Change (with Qt and GTK fixed)
Comment 5 Adam Roben (:aroben) 2011-02-21 16:13:41 PST
Comment on attachment 83235 [details]
Proposed Change (with Qt and GTK fixed)

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

> Source/WebKit2/UIProcess/gtk/WebInspectorGtk.cpp:55
> +void WebInspectorProxy::platformInspectedURLChanged(const String& urlString)

Could remove the urlString name here.

> Source/WebKit2/UIProcess/qt/WebInspectorProxyQt.cpp:54
> +void WebInspectorProxy::platformInspectedURLChanged(const String& urlString)

And here.

> Source/WebKit2/UIProcess/win/WebInspectorProxyWin.cpp:191
> +    ::SetWindowText(m_inspectorWindow, title.charactersWithNullTermination());

You should change this to call ::SetWindowTextW, to match other Win32 API usage in WebKit2. (::SetWindowText is just a macro for ::SetWindowTextW, so there's no behavioral difference.)
Comment 6 Timothy Hatcher 2011-02-21 16:17:34 PST
(In reply to comment #5)
> (From update of attachment 83235 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=83235&action=review
> 
> > Source/WebKit2/UIProcess/gtk/WebInspectorGtk.cpp:55
> > +void WebInspectorProxy::platformInspectedURLChanged(const String& urlString)
> 
> Could remove the urlString name here.
> 
> > Source/WebKit2/UIProcess/qt/WebInspectorProxyQt.cpp:54
> > +void WebInspectorProxy::platformInspectedURLChanged(const String& urlString)
> 
> And here.
> 
> > Source/WebKit2/UIProcess/win/WebInspectorProxyWin.cpp:191
> > +    ::SetWindowText(m_inspectorWindow, title.charactersWithNullTermination());
> 
> You should change this to call ::SetWindowTextW, to match other Win32 API usage in WebKit2. (::SetWindowText is just a macro for ::SetWindowTextW, so there's no behavioral difference.)

All done. Thanks!
Comment 7 Timothy Hatcher 2011-02-21 16:19:07 PST
Created attachment 83237 [details]
Proposed Change (with Adam's feedback)
Comment 8 Timothy Hatcher 2011-02-21 17:44:29 PST
Fixed in r79273.