Bug 107923

Summary: [EFL][WK2] Use C API inside ewk_security_origin
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit EFLAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, benjamin, gyuyoung.kim, kenneth, kling, lucas.de.marchi, mikhail.pozdnyakov, naginenis, rakuco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 107657    
Attachments:
Description Flags
Patch none

Chris Dumez
Reported 2013-01-25 00:12:47 PST
As per Bug 107657, we should start using the C API internally to avoid violating layering.
Attachments
Patch (3.84 KB, patch)
2013-01-25 00:15 PST, Chris Dumez
no flags
Chris Dumez
Comment 1 2013-01-25 00:15:21 PST
Kenneth Rohde Christiansen
Comment 2 2013-02-01 04:46:22 PST
Comment on attachment 184685 [details] Patch LGTM
Mikhail Pozdnyakov
Comment 3 2013-02-01 04:51:00 PST
Comment on attachment 184685 [details] Patch Looks nice.
Simon Hausmann
Comment 4 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?
Simon Hausmann
Comment 5 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 :)
Chris Dumez
Comment 6 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.
WebKit Review Bot
Comment 7 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>
WebKit Review Bot
Comment 8 2013-02-18 13:38:42 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.