Bug 120627

Summary: [GTK] Add support for the Wayland build target
Product: WebKit Reporter: Zan Dobersek <zan>
Component: WebKitGTKAssignee: Zan Dobersek <zan>
Status: RESOLVED FIXED    
Severity: Normal CC: changseok, gustavo, mrobinson, tomeu
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 81456, 118458    
Attachments:
Description Flags
Patch gustavo: review+

Description Zan Dobersek 2013-09-03 04:16:36 PDT
SSIA. Fun times.
Comment 1 Zan Dobersek 2013-09-03 06:00:04 PDT
Created attachment 210363 [details]
Patch
Comment 2 Gustavo Noronha (kov) 2013-09-03 13:04:53 PDT
Comment on attachment 210363 [details]
Patch

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

> Source/WebCore/ChangeLog:15
> +        (gdk_screen_get_monitor_workarea): Additionally guard bits of code that depend on the GTK_WINDOWING_X11 macro being

s/GTK/GDK/

> Source/autotools/FindDependencies.m4:204
> +    AC_MSG_WARN([X11 target support not enabled, disabling GLX support.])
> +    enable_glx=no

Perhaps this should only warn if enable_glx was true.

> Source/autotools/FindDependencies.m4:298
> +if test "$with_x11_target" != "yes" && test "$with_wayland_target" = "yes" && test "enable_accelerated_compositing" != "no"; then

I think it's weird how we test for != "yes", = "yes", != "no" quite inconsistently heh, just saying though, no need for changing.

> Source/autotools/ReadCommandLineArguments.m4:62
> +# To support building for X11 and Wayland targets concurrently, the $with_target value is checked for this
> +# special case and two additional variables are introduced that denote specifically whether we're building
> +# the X11 target, the Wayland target, both of these or neither.

Cunning.
Comment 3 Zan Dobersek 2013-09-04 02:05:09 PDT
OK, I've tested builds with both Wayland-only target and the parallel X11+Wayland target - not as thoroughly as I would have liked, but that's still to come.

Either of the configurations fails gracefully under Wayland when confronted with a plugin, so that works. HTML5 video also works. The build with both targets enabled shows no regressions under X11.

I'll be landing this patch today and proceed with testing.

I also plan to fold the '#if defined(GDK_WINDOWING_X11)' checks into '#if PLATFORM(X11)' (and ditto for GDK_WINDOWING_WAYLAND -> PLATFORM(WAYLAND)), for the sake of simplifying these build guards.
Comment 4 Zan Dobersek 2013-09-04 03:18:30 PDT
Committed r155032: <http://trac.webkit.org/changeset/155032>