Bug 95669

Summary: [EFL] Use WebKitVersion.h to get version information
Product: WebKit Reporter: Jinwoo Song <jinwoo7.song>
Component: WebKit EFLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: gyuyoung.kim, lucas.de.marchi, rakuco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Linux   
Attachments:
Description Flags
patch
none
patch
none
patch none

Description Jinwoo Song 2012-09-03 00:01:15 PDT
The WEBKIT_USER_AGENT_MAJOR_VERSION and WEBKIT_USER_AGENT_MINOR_VERSION
is defined as constant in the OptionsEfl.cmake. But we do not need to define here 
but can use the WebKitVersion.h instead.

WebKitVersion.h is generated with the version information in the Source/WebCore/Configurations/Version.xcconfig.
Comment 1 Jinwoo Song 2012-09-03 01:01:32 PDT
Created attachment 161874 [details]
patch
Comment 2 Gyuyoung Kim 2012-09-03 01:16:21 PDT
Comment on attachment 161874 [details]
patch

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

> Source/WebKit/efl/ewk/ewk_settings.cpp:320
> +    WTF::String uaVersion = makeString(String::number(WEBKIT_MAJOR_VERSION), '.', String::number(WEBKIT_MINOR_VERSION), '+');

Use String operator instead of makeString() ?

str = text + 'a' + foo + bar;

This is more efficient way to concatenate strings.

See also : http://trac.webkit.org/wiki/EfficientStrings

> Source/WebKit2/UIProcess/efl/WebPageProxyEfl.cpp:55
> +    version = makeString(String::number(WEBKIT_MAJOR_VERSION), '.',

ditto.
Comment 3 Jinwoo Song 2012-09-03 01:34:54 PDT
Created attachment 161878 [details]
patch
Comment 4 Jinwoo Song 2012-09-03 01:37:47 PDT
(In reply to comment #2)
> (From update of attachment 161874 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=161874&action=review
> 
> > Source/WebKit/efl/ewk/ewk_settings.cpp:320
> > +    WTF::String uaVersion = makeString(String::number(WEBKIT_MAJOR_VERSION), '.', String::number(WEBKIT_MINOR_VERSION), '+');
> 
> Use String operator instead of makeString() ?
> 
> str = text + 'a' + foo + bar;
> 
> This is more efficient way to concatenate strings.
> 
> See also : http://trac.webkit.org/wiki/EfficientStrings
Done.
> 
> > Source/WebKit2/UIProcess/efl/WebPageProxyEfl.cpp:55
> > +    version = makeString(String::number(WEBKIT_MAJOR_VERSION), '.',
> 
> ditto.
Done.
Comment 5 Gyuyoung Kim 2012-09-03 01:52:00 PDT
Comment on attachment 161878 [details]
patch

You are missing to modify cmakeconfig.h.cmake.

http://trac.webkit.org/browser/trunk/Source/cmakeconfig.h.cmake#L4
Comment 6 Jinwoo Song 2012-09-03 03:02:15 PDT
Created attachment 161888 [details]
patch
Comment 7 Jinwoo Song 2012-09-03 03:37:20 PDT
(In reply to comment #5)
> (From update of attachment 161878 [details])
> You are missing to modify cmakeconfig.h.cmake.
> 
> http://trac.webkit.org/browser/trunk/Source/cmakeconfig.h.cmake#L4

I removed the WEBKIT_USER_AGENT_* definitions in the cmakeconfig.h.cmake, too.
Comment 8 Gyuyoung Kim 2012-09-03 03:37:50 PDT
Comment on attachment 161888 [details]
patch

LGTM
Comment 9 WebKit Review Bot 2012-09-03 07:00:53 PDT
Comment on attachment 161888 [details]
patch

Clearing flags on attachment: 161888

Committed r127419: <http://trac.webkit.org/changeset/127419>
Comment 10 WebKit Review Bot 2012-09-03 07:00:58 PDT
All reviewed patches have been landed.  Closing bug.