Update the library and QML version to 1.0

Also update all the examples to use 1.0 as 0.9 shouldn't be
publically recommended.

Change-Id: Ic58e35bdfd3a0f3d5201fc069b7103027ba84574
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Opt-out of the build on platforms where we won't build successfully

To allow the qt5.git integration, allow the build to succeed if the
repository is checked out on a platform that we don't maintain.

This is the initial list of platforms that we want the integration
to succeed and we can add new ones once we start maintaining them.

Change-Id: Idce2a84eb8d5b1ef7f14d399fe013f666b479108
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Widgets settings implementation

Implementing what is already available, namely the WebAttributes,
font preferences and default text encoding, as well as a
slightly different take on privateBrowsing.

Change-Id: I128f060a4661d19aa1c9c4d6daae1f80fb33204b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Add QJSValue support to the public API test

QJSValue is not a built-in QMetaType (it's ID is over 1024
[QMetaType::User]) and we can't get the QML type names from
the QML engine, so I hardcoded it in this test.

The check of the "void" is unnecessary, because that is
built-in: QMetaType::Void

Change-Id: I0d7668abedc8830b4bba39ff60bce644fe97888b
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Rename the 3rdparty submodule to match its path

This will be one less edge case that qt5.git's init-repository script
has to worry about.

Change-Id: I0b20769ab45c5521ac6f56ffd69b50fba6f8b543
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Disable chromium error pages

Change-Id: I6b70b6199f0502ef67043325e7b7680529bd33fa
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Update the scripts for the snapshot of 37

- The svn repo string would be something like:
  ...branches/2062/path_suffix
  and I want only the branch number in this case.
  Updated git_submodule.py to support that case and use regexp
  instead to keep thing a bit simpler.
- .isolate are gyp files, moved the exception at the top
- Changed some inclusions/exclusions
- tools/ is now all excluded by default with exception instead
  of all included. We don't need most of it.

Change-Id: I6d0666d9af7fc6a0f3c4fe866adf2744f13f7c35
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Update the QtWebEngineCore library to run on top of Chromium 37

Most of the patch is about upstream classes/methods that changed.

Other important details:
- icu data files are now used by default
- cygwin is no longer required to build on Windows
- RenderFrameHost has been replacing RenderViewHost in a few places,
  following the separate process iframes support in Chromium
- The user agent is accessed through ContentClient::GetUserAgent
  instead of from the command line switches

Change-Id: I86cc93aff7ce31176a80b0b4a5d54025674a451c
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Use the unified gesture recognizer

The ui::GestureRecognizer is now tightly coupled with Aura and won't
be usable on Mac or Android.

Fortunately, the reason for this is that a new gesture recognizer
common to both Android and Aura, ui::GestureProvider has been
introduced. Using it allows us to stop pulling touch event types
from Aura build files.

Most of the change is about using ui::MotionEvent instead of
ui::TouchEvent, and to feed them to the GestureProvider.

A major difference is that the touch events sent to the renderer
are not passed through the gesture recognizer only when the come
back unhandled. They are instead always sent to both the renderer
and the GestureProvider, and the call to OnTouchEventAck on the
gesture filter tells it if the next event in the queue was handled
or not, deciding if the gesture should be cancelled.

Change-Id: Ifccebf85800cdf0ef29cf52b13f1bd659428e3f6
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Fix the build on windows when qtwebengine.chromiumsrcdir isn't set

qtwe_chromium_obj_dir wasn't falling back to src/3rdparty if the
config couldn't be found in git.

Move the fallback logic to a getChromiumSrcDir qmake function, and
use it in both places.

The build system will now also print that the Chromium sources will
follow the git config if found instead of the other way around,
since this should now be the normal case as part of Qt5.

Change-Id: I5ab972ab53156c1bd033518e2eb51013559491ac
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Fix the build on Windows due to backslashes

A gyp variable containing backslashes would be evaluated twice when
passed through grit_action.gypi in src/core/chrome_qt.gyp.

For some reason, gyp would end up reducing the escaping of
backslashes once for each variable evaluation, which would completely
remove backslashes from the value.

Fix the issue by making sure that we pass paths to gyp with slashes
instead of backslashes. Python will know what to do with them
regardless.

Change-Id: Id38866fd63a2ba1524a8c998fe577f7f50fca059
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Use the toolchain from PATH on Windows

We don't want to fetch the compiler path from the mkspec on Windows
the same way that we do on linux/embedded. Qt usually let the build
environment decide the MSVC toolchain, as it is usually done on
Windows.

This patch also passes the ninja_use_custom_environment_files ninja
generator option to make sure that gyp doesn't try to construct the
build environment by running the env scripts itself.

Change-Id: I6e04471eb994b81a9f1b8b5f149b4dbddbb320a8
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Exclude accessibility files on windows

This allows the BrowserAccessibilityFactoryQt and
BrowserAccessibilityQt classes to also be used on Windows, and this
also remove our dependency on ATL, which is only easily available
for Visual Studio Professional users.

Change-Id: I1a9c047f0343252a0b6fcc215b84e4c2f3d664b4
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Don't build release with debug info by default on Windows

Change-Id: Idf4373bc10367dfc15445c4c530915cbda04ae9c
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Fix uncalled callbacks with findText

Calling findText successively might prevent the previous pending
FindReply to be sent, which would leak the callback on the
application side.

This would cause a crash in qupzilla since we empty all pending
callbacks in the QWebEnginePage's destructor to catch this kind
of issue.

This also renames lastRequestId to nextRequestId to make it clear
that this is the ID generator for everything, including findText,
and that lastFindRequestId is only a tracker.

Change-Id: Ia78d553a58ed31af7237aad8772fa9828560c6d4
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Handle new window/tab modifiers also on normal navigations

AddNewContents is only called when window.open is called from JavaScript.

We also want the shift/ctrl modifiers to trigger normal links to open
in the requested disposition. In this case OpenURLFromTab will pass
the detected disposition and we must create a new WebContents
ourselves.

Use the same code path going through
WebContentsAdapterClient::adoptNewWindow except that we pass a null
WebContents pointer to the WebContentsAdapter constructor and let it
create its own when initialized.

Change-Id: I817b0e72aec12723bf92d9b7ad85c1cecbf5e408
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Fix unused parameter warnings in qwebenginepage_p.h

Change-Id: I17bcd79ee2dcb539f369a8f4a8d59949e09930be
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Fix a crash in WebEngineSettings when opening a new window

A new window means that the QWebEnginePage gets its WebContentsAdapter
swapped and that the pointer in WebEngineSettings must be updated.

Do the WebContentsAdapter-to-WebEngineSettings binding in
WebContentsAdapter::initialize to cover both cases.

This also refactors the way that QWebEngineSettings is created by
removing the need to pass a QWebEngineSettingsPrivate instance to be
adopted, and also move the global settings construction logic in
the singleton accessor instead of relying on the fact that it uses
a different contructor.

Change-Id: I6f8a2ed1407a4b25f9898526db9432721c354ddf
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Use Q_DECLARE_PRIVATE to wrap the p-impl in QWebEngineSettings

This follows the same pattern now used in other public classes.

Change-Id: I999c6ba7fc594cdb77da47482e1060542fe86861
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Remove XFAIL that got fixed by snapshot update

Change-Id: I5e2ab9f9119491f61033d8dd93059d0a54f3bc5b
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>