[CSS Regions] Fix failing tests on ML WK2 after r154973
https://bugs.webkit.org/show_bug.cgi?id=120672

Reviewed by Antti Koivisto.

The two tests are failing because the reference tests create backings for the fixed elements layers.
Regions are not yet accelerated, don't create backings and this difference of behaviour causes a
slight shift in the background color of the fixed elements.

* fast/regions/fixed-inside-named-flow-zIndex-expected.html:
* fast/regions/fixed-inside-named-flow-zIndex.html:
* fast/regions/fixed-pos-region-in-nested-flow-expected.html:
* fast/regions/fixed-pos-region-in-nested-flow.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155030 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Reimplement atk_text_get_text_*_offset for SENTENCE boundaries
https://bugs.webkit.org/show_bug.cgi?id=114873

Reviewed by Chris Fleizach.

Re-implement these functions without using GailTextUtil nor Pango.

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextWordForBoundary): Renamed from webkitAccessibleTextGetWordForBoundary,
to keep it consistent with names for new functions.
(isSentenceBoundary): Helper function to know when we are either
at the beginning or the end of a sentence.
(isWhiteSpaceBetweenSentences): It returns true if we are in the
middle of a white space between sentences. Useful for implementing
the SENTENCE_END boundary type.
(sentenceAtPositionForAtkBoundary): New helper function to find the
sentence at a given position considering values of AtkTextBoundary.
(webkitAccessibleTextSentenceForBoundary): New function,
implementing atk_text_get_text_*_offset for SENTENCE.
(webkitAccessibleTextGetTextForOffset): Replace usage of Gail for
SENTENCE boundaries with webkitAccessibleTextSentenceForBoundary().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add support for the Wayland build target
https://bugs.webkit.org/show_bug.cgi?id=120627

Reviewed by Gustavo Noronha Silva.

.: 

Add support for building the GTK port with Wayland as the target. The Wayland target can be the sole target
that's enabled, or it can be enabled in parallel with the X11 target.

Each of those two targets, when enabled, checks for the corresponding GTK+ windowing dependency being present.
In the case of only the Wayland target being enabled, the accelerated compositing feature is disabled at
build-time as the feature is not yet supported under the Wayland display protocol. X11-based plugin support is
also disabled under that configuration, even if the WebKitPluginProcess is still built but is left non-operational.
GLX support is also disabled if not building the X11 target.

The Wayland target can be enabled through using the --with-target configuration option that now accepts two
additional values:
- 'wayland' - only enables the Wayland target,
- 'x11,wayland' - enables the X11 and Wayland targets that are to be built in parallel.

This makes it possible to build the GTK port of WebKit with the Wayland target, relying solely on the GTK+
dependency that only has the Wayland backend enabled, and removes linking against any X11-related library.
Note that at the moment there seem to be other dependencies that still link to X11-related libraries.
Complete functionality is not yet guaranteed, but is of course the goal.

* Source/autotools/FindDependencies.m4: Store the version of the basic GTK+ dependency that was found.
This is later used to check that the GTK+ X11 and GTK+ Wayland dependencies are of the same version. The
X11-specific dependencies are grouped into one section (apart from the XComposite and XDamage dependencies),
also checking for the GTK+ X11 dependency. If the X11 target is not enabled, the GLX dependency is disabled.
Additionally check for the GTK+ Wayland dependency if the Wayland target is enabled.
We only check for the presence and correct version of the GTK+ X11 and Wayland dependencies, if necessary.
Check for the XComposite and XDamage dependencies if the X11 target is enabled (in addition to the OpenGL
headers being present).
In case of the Wayland target being enabled while the X11 target is not, disable the accelerated compositing
feature as there's no support yet for it under the Wayland display protocol.
* Source/autotools/PrintBuildConfiguration.m4: The build configuration should now print out 'GDK targets'.
* Source/autotools/ReadCommandLineArguments.m4: The --with-target option can now take two additional values,
'wayland' and 'x11,wayland'. The first one enables only the Wayland target, while the second one enables both
X11 and Wayland targets. This makes it possible to build the GTK port with both X11 and Wayland display protocols
supported in the same build.
We must now check the outcoming with_target variable to see if the special case of building one or both of the
possible parallel targets was chosen. We define with_x11_target and with_wayland_target variables if the
with_target value applies to that case.
* Source/autotools/SetupAutoconfHeader.m4: Do not define the XP_UNIX macro on builds that enable the Wayland-only
target. It should still be defined if we're building both X11 and Wayland targets in parallel.
* Source/autotools/SetupAutomake.m4: Define TARGET_X11 and TARGET_WAYLAND Automake conditionals if the new
with_x11_target or with_wayland_target variables were set, respectively. Additionall, define the TARGET_X11_OR_WAYLAND
Automake conditional if we're building either of the two targets.

Source/WebCore: 

* GNUmakefile.list.am: Reorder the Source/WebCore/plugins/np* source files.
The X11-specific source files should only be included if the X11 target is being built. PluginPackageNone and
PluginViewNone source files must be included in non-X11-target builds. Other source files that were previously
guarded with the TARGET_X11 conditional should also be built for the Wayland target, so the new TARGET_X11_OR_WAYLAND
conditional is used. If neither of those two targets is being built we fall back to adding source files to the build
as necessary by the actual build target.
* platform/gtk/GtkVersioning.c:
(gdk_screen_get_monitor_workarea): Additionally guard bits of code that depend on the GDK_WINDOWING_X11 macro being
defined - these should only be built when building the X11 target, checked for with PLATFORM(X11).

Source/WebKit/gtk: 

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::createBackingStore): Additionally guard the <gdk/gdkx.h> inclusion and the inclusion and use of
WidgetBackingStoreGtkX11 with PLATFORM(X11), ensuring this code is built when also building with X11 target
enabled. GDK_WINDOWING_X11 macro can be defined even if the X11 target is disabled.

Source/WebKit2: 

* GNUmakefile.list.am: Build X11-specific NetscapePluginModule and NetscapePlugin classes if building the X11 target,
fall back to the generic, empty classes otherwise.
* PluginProcess/unix/PluginProcessMainUnix.cpp:
(WebKit::PluginProcessMainUnix): Guard the NetscapePluginModule::scanPlugin() invocation with PLUGIN_ARCHITECTURE(X11),
it's at the moment specific to the X11 implementation of the Netscape plugins.
* UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: Guard PluginProcessProxy::scanPlugin() with PLUGIN_ARCHITECTURE(X11),
just like it's guarded in the PluginProcessProxy class declaration.
* UIProcess/cairo/BackingStoreCairo.cpp: Additionally guard <gdk/gdkx.h> and WidgetBackingStoreGtkX11 inclusion and use
with PLATFORM(X11), this code should only be built when building the X11 target.
(WebKit::createBackingStoreForGTK):
* UIProcess/gtk/WebPageProxyGtk.cpp: Guard the createPluginContainer() and windowedPluginGeometryDidChange() methods and their
helper functions and objects with PLUGIN_ARCHITECTURE(X11), just like they're guarded in the WebPageProxy class declaration.
* config.h: Only define PLUGIN_ARCHITECTURE_X11 to 1 if we're actually building the X11 target.

Tools: 

* GNUmakefile.am: Define the additional macros also if building the Wayland target.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155032 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening. Rebaselining 7 accessibility tests after r154976.

* platform/gtk/accessibility/lists-expected.txt:
* platform/gtk/accessibility/plugin-expected.txt:
* platform/gtk/accessibility/table-detection-expected.txt:
* platform/gtk/accessibility/table-one-cell-expected.txt:
* platform/gtk/accessibility/table-with-aria-role-expected.txt:
* platform/gtk/accessibility/table-with-rules-expected.txt:
* platform/gtk/accessibility/transformed-element-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Use correct library paths for prefix builds on Mac.
https://bugs.webkit.org/show_bug.cgi?id=120635

Reviewed by Tor Arne Vestbø.

Due to a change of scope of the qmake force_independent configuration
flag, the library paths in QtWebKit builds on the Mac are set to the
QtWebKit build directory even for production builds.

This patch sets the correct library paths for prefixed production builds
while keeping the scope of the force_independent flag for non-production
builds.

* Source/api.pri:
* Source/widgetsapi.pri:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155034 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening. Skip failing tests and added platform specifix expected result.

* platform/qt-wk1/inspector/console/command-line-api-expected.txt: Added after r154998.
* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed bot greening.

* platform/qt-wk2/compositing/images/direct-image-object-fit-expected.txt: Rebaselining after r154921.
* platform/qt-wk2/compositing/reflections/direct-image-object-fit-reflected-expected.txt: Ditto.
* platform/qt/TestExpectations: Skip after r155008.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155036 268f45cc-cd09-0410-ab3c-d52691b4dbfc