Only use 64bit atomics when supported

To support Windows XP we must avoid using the 64bit variants of the
atomicIncrement/atomicDecrement operations which are only supported from
Windows 2003 and up.

This patch rolls back the minimum Win32 API version to WinNT 5.1 (32bit WinXP),
and adds a new flag to indicate the support of 64bit atomics.

The new flag is now also used to support MIPS and other architectures
without 64bit intrinsics, instead of hacking in poor support.

This also extends the atomic operations to sparc64 which was previously
skipped because it did not work with __exchange_and_add.

Task-number: QTBUG-34271
Change-Id: I21b09df3cafb7f0987a2f44c89036ff34ed34aa0
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Redisable debug-info on MinGW64

Change f6069ba2adac13eee941a300595aa3c0a445fc1a disabled the stripping
of debug information from linux x64 builds, but accidentally also
disabled it for MinGW64 builds.

This patch ensures we again strip the deeper WebKit debug information
from all win32-g++ builds

Change-Id: I06e2a85f71cb159205a0e9acae01806ecf4e6b0f
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Load libudev at run-time

Changes the usage of libudev from linking at compile time to loading at
runtime.

Task-number: QTBUG-34176
Change-Id: I7feb91ed3ee1c21dbb3ab508cb7ad6d69c73cc01
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Support HTML5 media context menu items

Support most of the items WebCore populates the context menu with when
the user right clicks an HTML5 audio or video element.

Change-Id: I331a3271f68075fe70d914e2675620f617d53b42
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Prospective build fix for builds with video disabled

Change-Id: I65f8b063cdac252941d2e4dd91bd2a367b101cbc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Remove unused runtime enabled features

Reverts the addition of CanvasPathEnabled setting. It had no effect since
it only changed the unused RuntimeEnabledFeatures.

WebKit ChangeLog:
https://bugs.webkit.org/show_bug.cgi?id=123509

Some of the runtime enabled features were only ever used by the V8 bindings
and can be removed as no WebKit code sets or reads them.

* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
* bindings/generic/RuntimeEnabledFeatures.h:

Change-Id: Ie15d05d6e27e5edb62cc5ce00fd59258df8ec2d7
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158269 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Fix ABI violation in QWebSettings::CSSCompositingEnabled

QWebSettings::CSSCompositingEnabled was added in the middle of the enum
instead of being put at the end.

Since it controlled a RuntimeEnabledFeatures which are global and does
not work per page like QWebSettings should. The setting has been removed
but kept enabled by default.

Change-Id: I5dc35eee78c3846c8482e044c6dd5cd34410969c
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Disable QtWebkit for QNX

BlackBerry/QNX has the torch webkit.

Change-Id: I3defb065b18fc7e00d6b3bdcfeb79a05fb51e629
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Fix compilation of GraphicsSurfaceMac on OS X 10.9 Mavericks

Change-Id: I5c0685b79e653d06073bf3df3e08e1feb3826948
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Fix fullscreen support with GStreamer

Fullscreen support has not been working with GStreamer since Qt 4.8,
the issue was the native fullscreen window was not fully ported, and
was affected by some bitrot.

This patch fixes the native fullscreen window for GStreamer, ensures the
fullscreen options are available on WebKit1, and adds a context menu and
web action to toggle fullscreen mode.

Change-Id: I9c6c5a1e36fbbc8e1d1fae371bdf9abc1aee7775
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Trigger layout after resizing the FrameView.

There are problems with QGLWidget based web plugins due to the fact
that WebKit forces us to relayout during paint events, which in turn
might resize widgets, causing the shared backing store's QImages to
be corrupted and hence causing crashed.

This patch triggers a layout upon resizing the FrameView, which reduces
the likely hood of resizing plugins during a subsequent paintEvent.

Task-number: QTBUG-34277
Change-Id: Id35c72a3cc68ac6633a74fba0669c2d8fbfabc88
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Add padding objects for classes with netscape plugin api conditionals.

When building with the Visual Studio Compiler on windows, we are facing
some problems because objects that are shared between WebKit1 and
WebKit2 have different memory maps for inlined accessors because the
Netscape Plugin API had to be disabled for the WebKit2 API on Windows
in the new snapshot for Qt 5.2.

This caused plugins not to be loaded because the wrong values for the
mime types and urls are returned and might lead to all kinds of bugs and
quirks.

This patch adds dummy pointers / data structures for the parts of the
build that do not have the Netscape Plugin API enabled.

Task-number: QTBUG-34280
Change-Id: Iaa2cd2b19d07eff71981f392d913ae5218495266
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Fix MSVC2013 compilation

Starting with MSVC 2013, more functions are provided.

Task-number: QTBUG-34705

Change-Id: I90bf939ad4503a00d31e81c148c6b4ef8af6caff
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Fix crash when converting QObjectList

We were passing on a PassRefPtr to multiple lower calls, since any
conversion from a PassRefPtr to a RefPtr will reset the PassRefPtr to
null, it should not be used for multiple calls.

Task-number: QTBUG-34278
Change-Id: I8d4bf28e25eb6e66baef38e0352c40a08f504538
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Fix left-over reference to qtlocation

QtWebKitWidgets were still incorrectly looking for the qtlocation module
instead of the qtpositioning module.

Change-Id: I3945a6d73e8438dadde05055c082ee3f4f39cdc6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Fix compilation on ARM

Android fix broke ARM compilation on non-Android Linux platforms.
Now correcly define Elf32_auxv_t only on Android/Qt and otherwise
include asm/hwcap.h

Same fix was previously applied to QtScript, which had the exact
same android problem (QTBUG-30978).

Task-number: QTBUG-34917
Change-Id: I29d570731754c6291f8dc0c379e6fdc8ec72b897
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Detach image data when returning an ImageFrame as a native image.

With error analysis and fixing guidance by Allan Sandfeld Jensen.

This caused crashes when a gif was being loaded and the data in the
backing store for image frame was prematurely freed.

Task-number: QTBUG-31936
Change-Id: I7f4454db00cbbcf53f18060aa986a843c7522d57
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Doc: Fix issues in Qt WebKit documentation config file

This change addresses following issues:
    - Replace hard-coded version strings with QT_VERSION et al.
    - Use the word 'Reference' in description for consistency
    - Add a url variable
    - Add a filter for Qt WebKit (usable in Qt Creator Help)
    - Use the correct selector for listing QML types

Task-number: QTBUG-34966
Change-Id: Ic8f404720b02e022da964eadd50cbd140482809c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
WebKitQML examples does not work on Mac

A combination of a flawed GCC 4.2 implementation and a compiler
misdetection that meant it was also used for clang caused WebKitQML
to crash on startup.

Task-number: QTBUG-35040
Change-Id: I77534c0e9974a79e7487d5211b1374b250219d49
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Account for when the QGraphicsView is a top level widget

When the QGraphicsView was a top level widget then it would not account
for the transformations as it did not translate the point from the scene
to the view.

[ChangeLog][QtWebKitWidgets][QGraphicsWebView] Make sure that mouse
events for QGraphicsWebView items in a top level QGraphicsView.
Task-number: QTBUG-32179

Change-Id: I2c26580a7e7e5eaec08d71768298e961d3e9d13b
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>