Bug 140559

Summary: Add a basic configuration object for WKView
Product: WebKit Reporter: Sam Weinig <sam>
Component: New BugsAssignee: Sam Weinig <sam>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ddkilzer
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch andersca: review+

Description Sam Weinig 2015-01-16 12:40:54 PST
Add a basic configuration object for WKView
Comment 1 Sam Weinig 2015-01-16 12:46:13 PST
Created attachment 244788 [details]
Patch
Comment 2 WebKit Commit Bot 2015-01-16 12:48:14 PST
Attachment 244788 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/API/APIPageConfiguration.cpp:50:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/UIProcess/API/APIPageConfiguration.cpp:60:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 2 in 21 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Sam Weinig 2015-01-16 15:37:20 PST
Created attachment 244810 [details]
Patch
Comment 4 Anders Carlsson 2015-01-16 16:47:01 PST
Comment on attachment 244810 [details]
Patch

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

> Source/WebKit2/UIProcess/API/APIPageConfiguration.h:45
> +    static PassRefPtr<PageConfiguration> create()

Ref.

> Source/WebKit2/UIProcess/API/C/WKUserContentControllerRef.cpp:44
> +WKArrayRef WKUserContentControllerGetUserScripts(WKUserContentControllerRef userContentControllerRef)

This should probably copy the user scripts.

> Source/WebKit2/UIProcess/UserContent/WebUserContentControllerProxy.h:60
> +    static RefPtr<WebUserContentControllerProxy> create()

Ref!

> Tools/TestWebKitAPI/Tests/WebKit2/WKPageConfiguration.cpp:44
> +    ASSERT_NULL(WKPageConfigurationGetContext(configuration.get()));
> +    ASSERT_NULL(WKPageConfigurationGetUserContentController(configuration.get()));
> +    ASSERT_NULL(WKPageConfigurationGetPageGroup(configuration.get()));
> +    ASSERT_NULL(WKPageConfigurationGetPreferences(configuration.get()));
> +    ASSERT_NULL(WKPageConfigurationGetRelatedPage(configuration.get()));

Shouldn't these be instantiated when you ask for them?
Comment 5 Sam Weinig 2015-01-16 17:09:11 PST
(In reply to comment #4)
> Comment on attachment 244810 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=244810&action=review
> 
> > Source/WebKit2/UIProcess/API/APIPageConfiguration.h:45
> > +    static PassRefPtr<PageConfiguration> create()
> 
> Ref.
> 

Will change.

> > Source/WebKit2/UIProcess/API/C/WKUserContentControllerRef.cpp:44
> > +WKArrayRef WKUserContentControllerGetUserScripts(WKUserContentControllerRef userContentControllerRef)
> 
> This should probably copy the user scripts.

Ok.

> 
> > Source/WebKit2/UIProcess/UserContent/WebUserContentControllerProxy.h:60
> > +    static RefPtr<WebUserContentControllerProxy> create()
> 
> Ref!

Will change.

> 
> > Tools/TestWebKitAPI/Tests/WebKit2/WKPageConfiguration.cpp:44
> > +    ASSERT_NULL(WKPageConfigurationGetContext(configuration.get()));
> > +    ASSERT_NULL(WKPageConfigurationGetUserContentController(configuration.get()));
> > +    ASSERT_NULL(WKPageConfigurationGetPageGroup(configuration.get()));
> > +    ASSERT_NULL(WKPageConfigurationGetPreferences(configuration.get()));
> > +    ASSERT_NULL(WKPageConfigurationGetRelatedPage(configuration.get()));
> 
> Shouldn't these be instantiated when you ask for them?

I want that to be the case eventually, but I need to do more refactoring a bit lower down to make it clean.
Comment 6 Sam Weinig 2015-01-16 17:54:10 PST
Created attachment 244825 [details]
Patch
Comment 7 Sam Weinig 2015-01-16 18:07:32 PST
Committed r178618: <http://trac.webkit.org/changeset/178618>
Comment 8 David Kilzer (:ddkilzer) 2015-01-17 08:50:12 PST
(In reply to comment #7)
> Committed r178618: <http://trac.webkit.org/changeset/178618>

Looks like you could have used an iOS EWS bot, Sam.  :(

Attempted iOS build fix:
Committed r178625: <http://trac.webkit.org/changeset/178625>