Bug 137778

Summary: [EFL] window.screen.width returns wrong value if more displays are available
Product: WebKit Reporter: Grzegorz Czajkowski <g.czajkowski>
Component: WebKit EFLAssignee: Grzegorz Czajkowski <g.czajkowski>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, gyuyoung.kim, jinwoo7.song, lucas.de.marchi, ryuan.choi
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Grzegorz Czajkowski 2014-10-16 07:56:32 PDT
ecore_x_screen_size_get() retrieves the size of Ecore_X_Screen, for example,
having two displays of 1680x1050, it will return 33600x1050.

Unlike EFL's MiniBrowser, Firefox and Chrome return screen of the current display.
Comment 1 Grzegorz Czajkowski 2014-10-16 08:02:17 PDT
Created attachment 239948 [details]
Patch
Comment 2 Jinwoo Song 2014-10-17 00:23:27 PDT
Looks good to me.
Comment 3 Gyuyoung Kim 2014-10-17 00:29:20 PDT
Comment on attachment 239948 [details]
Patch

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

> Source/WebCore/platform/efl/PlatformScreenEfl.cpp:94
> +    if (ecore_x_randr_query() && ecore_x_window_focus_get())

ecore_x_window_focus_get() is called twice. How about using a variable to handle it ?

Ecore_X_Window focusedWindow = ecore_x_window_focus_get();
Comment 4 Grzegorz Czajkowski 2014-10-17 02:32:29 PDT
Created attachment 240008 [details]
Patch for landing
Comment 5 Grzegorz Czajkowski 2014-10-17 02:34:46 PDT
(In reply to comment #3)
> Comment on attachment 239948 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=239948&action=review
> 
> > Source/WebCore/platform/efl/PlatformScreenEfl.cpp:94
> > +    if (ecore_x_randr_query() && ecore_x_window_focus_get())
> 
> ecore_x_window_focus_get() is called twice. How about using a variable to
> handle it ?
> 
> Ecore_X_Window focusedWindow = ecore_x_window_focus_get();

Nice catch! Fixed.
Comment 6 WebKit Commit Bot 2014-10-17 03:43:59 PDT
Comment on attachment 240008 [details]
Patch for landing

Clearing flags on attachment: 240008

Committed r174819: <http://trac.webkit.org/changeset/174819>
Comment 7 WebKit Commit Bot 2014-10-17 03:44:04 PDT
All reviewed patches have been landed.  Closing bug.