Bug 107923 - [EFL][WK2] Use C API inside ewk_security_origin
Summary: [EFL][WK2] Use C API inside ewk_security_origin
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks: 107657
  Show dependency treegraph
 
Reported: 2013-01-25 00:12 PST by Chris Dumez
Modified: 2013-02-18 13:38 PST (History)
10 users (show)

See Also:


Attachments
Patch (3.84 KB, patch)
2013-01-25 00:15 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2013-01-25 00:12:47 PST
As per Bug 107657, we should start using the C API internally to avoid violating layering.
Comment 1 Chris Dumez 2013-01-25 00:15:21 PST
Created attachment 184685 [details]
Patch
Comment 2 Kenneth Rohde Christiansen 2013-02-01 04:46:22 PST
Comment on attachment 184685 [details]
Patch

LGTM
Comment 3 Mikhail Pozdnyakov 2013-02-01 04:51:00 PST
Comment on attachment 184685 [details]
Patch

Looks nice.
Comment 4 Simon Hausmann 2013-02-05 02:19:05 PST
Comment on attachment 184685 [details]
Patch

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

LGTM

> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:450
> +    RefPtr<EwkSecurityOrigin> origin = EwkSecurityOrigin::create(m_url);

Depending on other uses it might make sense to turn m_url into a WKRetainPtr<WKStringRef> perhaps?
Comment 5 Simon Hausmann 2013-02-05 02:23:42 PST
Comment on attachment 184685 [details]
Patch

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

>> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:450
>> +    RefPtr<EwkSecurityOrigin> origin = EwkSecurityOrigin::create(m_url);
> 
> Depending on other uses it might make sense to turn m_url into a WKRetainPtr<WKStringRef> perhaps?

To elaborate a bit: What I meant to say was that it depends on in which "direction" m_url is used towards, outside towards the developer using WebKit or inside into the WK2 layer. For the latter in Qt we added an optimization that allows us to create a WTFString practically for free from a QString without a copy. That makes WKStringRef creation from QString in turn also cheaper as it avoids data copying. A similar pattern might (or might not) make sense for Efl :)
Comment 6 Chris Dumez 2013-02-12 14:14:51 PST
Comment on attachment 184685 [details]
Patch

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

>>> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:450
>>> +    RefPtr<EwkSecurityOrigin> origin = EwkSecurityOrigin::create(m_url);
>> 
>> Depending on other uses it might make sense to turn m_url into a WKRetainPtr<WKStringRef> perhaps?
> 
> To elaborate a bit: What I meant to say was that it depends on in which "direction" m_url is used towards, outside towards the developer using WebKit or inside into the WK2 layer. For the latter in Qt we added an optimization that allows us to create a WTFString practically for free from a QString without a copy. That makes WKStringRef creation from QString in turn also cheaper as it avoids data copying. A similar pattern might (or might not) make sense for Efl :)

m_url is exposed to the client so we keep it as a char* (which is actually an eina stringshare). This is the only place when m_url is eventually converted into a WKStringRef and this only happens when entering fullscreen with fullscreen API so this does not happen frequently.
Comment 7 WebKit Review Bot 2013-02-18 13:38:37 PST
Comment on attachment 184685 [details]
Patch

Clearing flags on attachment: 184685

Committed r143258: <http://trac.webkit.org/changeset/143258>
Comment 8 WebKit Review Bot 2013-02-18 13:38:42 PST
All reviewed patches have been landed.  Closing bug.