Bug 154012 - WKAutomationDelegate's requestAutomationSession should take a suggested session identifier
Summary: WKAutomationDelegate's requestAutomationSession should take a suggested sessi...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: BJ Burg
URL:
Keywords: InRadar
Depends on:
Blocks: 154260
  Show dependency treegraph
 
Reported: 2016-02-08 15:28 PST by BJ Burg
Modified: 2016-02-15 14:27 PST (History)
12 users (show)

See Also:


Attachments
Proposed Fix (6.93 KB, patch)
2016-02-08 15:55 PST, BJ Burg
no flags Details | Formatted Diff | Diff
For Landing (7.18 KB, patch)
2016-02-09 14:03 PST, BJ Burg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2016-02-08 15:28:00 PST
Patch coming.
Comment 1 Radar WebKit Bug Importer 2016-02-08 15:29:08 PST
<rdar://problem/24557697>
Comment 2 BJ Burg 2016-02-08 15:55:57 PST
Created attachment 270889 [details]
Proposed Fix
Comment 3 Darin Adler 2016-02-09 07:24:56 PST
Comment on attachment 270889 [details]
Proposed Fix

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

> Source/WebKit2/UIProcess/API/APIAutomationClient.h:42
> +    virtual void didRequestAutomationSession(WebKit::WebProcessPool*, const WTF::String&) { }

Should be able to just say "const String&" without the namespace.

> Source/WebKit2/UIProcess/Cocoa/AutomationClient.h:53
> +    virtual void didRequestAutomationSession(WebKit::WebProcessPool*, const String& sessionIdentifier) override
> +    {
> +        requestAutomationSession(sessionIdentifier);
> +    }

Please put this function body in the .mm file, not the header. Keeps the class definition easier to read when the bodies are bigger than a single line.
Comment 4 BJ Burg 2016-02-09 09:47:11 PST
(In reply to comment #3)
> Comment on attachment 270889 [details]
> Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=270889&action=review
> 
> > Source/WebKit2/UIProcess/API/APIAutomationClient.h:42
> > +    virtual void didRequestAutomationSession(WebKit::WebProcessPool*, const WTF::String&) { }
> 
> Should be able to just say "const String&" without the namespace.

I thought that too, but Xcode was insistent that it was ambiguous with API::String. I didn't even know about that class!

> > Source/WebKit2/UIProcess/Cocoa/AutomationClient.h:53
> > +    virtual void didRequestAutomationSession(WebKit::WebProcessPool*, const String& sessionIdentifier) override
> > +    {
> > +        requestAutomationSession(sessionIdentifier);
> > +    }
> 
> Please put this function body in the .mm file, not the header. Keeps the
> class definition easier to read when the bodies are bigger than a single
> line.

OK
Comment 5 BJ Burg 2016-02-09 14:03:22 PST
Created attachment 270950 [details]
For Landing
Comment 6 BJ Burg 2016-02-14 17:42:31 PST
Committed r196562: <http://trac.webkit.org/changeset/196562>