summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement the basic parts of QWebEngineHistory.Jocelyn Turcotte2013-08-2011-78/+337
| | | | | | | | | | | | | | Mark the remaining methods as not implemented to allow enabling most of the dependent code in the demo browser and in API tests. Add two new tests to cover cases that might be problematic with the index-based implementation. This also renames WebContentsAdapter::navigateHistory to navigateToOffset in order to avoid confusion with navigateToIndex. Change-Id: I7c5cb9f5f878e34206fdfe48334a2dc7d9d95a1d Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Use the WebContentsAdapter directly in QWebEngineHistory.Jocelyn Turcotte2013-08-204-16/+11
| | | | | | Change-Id: Iac80388e8d3a789b336ab88b75c6fa6048a3c446 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Implement QWebEnginePage::action for basic navigation.Jocelyn Turcotte2013-08-207-59/+149
| | | | | | | | This imports code from qwebpage.cpp and QWebPageAdapter.cpp of WebKit into qwebenginepage.cpp and thus also restrict the license accordingly. Change-Id: Ic5da8f2b469109cb10132cbe6585f2d941b14403 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Centralize type conversion functions.Jocelyn Turcotte2013-08-209-39/+89
| | | | | | | | | | | | | This adds the common GURL->QUrl and string16->QString conversions into a common header and use those functions throughout the code. Move the qStringToStringType into the same header and rename it to a name consistent with the others. This also cleans up shared_globals.h by moving content:: forward declarations in the cpp, where they are used. Change-Id: I19527ea7de1f6047aae8b44c97eb4d7c3e5a0e54 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Let the application sanitize the URL.Jocelyn Turcotte2013-08-202-3/+1
| | | | | | | | | | Do like the QtQuick example and let the Widgets example use urlFromUserInput to add a missing http scheme instead of letting QtWebEngine do it. This is the same behavior as QtWebKit does. Change-Id: Iac1570523253126e059afb00c3a2ff844e177ff1 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* API tests: Make them link.Jocelyn Turcotte2013-08-208-17/+396
| | | | | | | | | Add the tests to the build. Very few of the test cases pass already, but this should allow to progress on the implementation while fixing/unskipping those tests. Change-Id: Id96d22748f8effad963232c2451fb8719d299fee Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* API tests: Make them compile with QtWebEngine.Jocelyn Turcotte2013-08-207-1011/+1002
| | | | | | | | | | | They still won't link since most methods aren't implemented yet. The changes to tst_qwebengineframe.cpp are mostly esthetic as those tests should be merged with tst_qwebenginepage.cpp once the implementation has progressed a bit further. Change-Id: If6627820069b51d7461d667716aafa6e250a684b Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Import relevant QtWebKit API tests.Jocelyn Turcotte2013-08-2046-0/+6487
| | | | | | | This import the tests as-is, without adding them to the build. Change-Id: I8b8e11a9f62b2a8f2be299347d2621b10fb61f20 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* demo browser: Make it link.Jocelyn Turcotte2013-08-2011-16/+116
| | | | | | | | The ifdefs should later be removed along with the feature implementations. Change-Id: If73f4c4c02c00e90d6cf54c6a08bb37f43fa95bc Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* demo browser: Fix the compilation with QtWebEngine.Jocelyn Turcotte2013-08-2015-126/+127
| | | | | | | | | | | This makes the demo compile, but not link since most of the methods aren't implemented yet. Also disable downloads and printing since they require a bit more work to instead use the page directly. Change-Id: I59adfe07fda077c6909f70f12800a4cfa6a6dad2 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Import the demo browser into widget examples.Jocelyn Turcotte2013-08-2068-0/+13450
| | | | | | | | | Import the sources as-is, without adding it to the build, to allow performing diffs later on the changes that were needed to port it to use QtWebEngine and manage source compatibility issues. Change-Id: Icf8a284881ce2153e9b5a1ba97dbe77096f1b88d Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Implement QWebEngineView/Page::url/setUrl.Jocelyn Turcotte2013-08-202-0/+21
| | | | | | Change-Id: I8b188fb1c6167612307d4db3272f5ae6f85705c7 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Implement QWebEngineView::title and QWebEnginePage::title.Jocelyn Turcotte2013-08-202-5/+16
| | | | | Change-Id: I9fb191a5a2351c5c953f640a6cf1a33609385cc9 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Move the WebContentsAdapter to QWebEnginePage.Jocelyn Turcotte2013-08-208-88/+116
| | | | | | | | To allow QWebEnginePage to act on its own, let it own the WebContentsAdapter and let the view delegate its calls through the page. Change-Id: I851c753d068992e387edab0e1ea8018732af1fd7 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Merge QWebEngineFrame into QWebEnginePage.Jocelyn Turcotte2013-08-202-219/+157
| | | | | | | | | | Chromium doesn't allow managing sub-frames from the contents API. To support operations that were made on the main frame, merge the frame API into the page. Methods should be later either be removed or implemented one by one. Change-Id: I52de89a48c00efb9dd0cf0a2c1fdf09d735d2381 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Import QtWebKit public headers.Jocelyn Turcotte2013-08-2016-65/+1466
| | | | | | | | | | | | | | | | | | | This is the first step toward re-implementing part of the QWebView API on top of QtWebEngine. The plan is to import the complete headers to facilitate diffs and progress tracking. Changes squashed in this commit: - Use the QWebEngine prefix for class names - Strip out non-public members and directives - Allow building using those headers by disabling the Q_PROPERTY macros and by adding a dummy implementation for virtual methods directly in the header - Update the widgetsnanobrowser example to comply with the slight changes from the previous API Change-Id: Ia7efa5430f775d09b493544430a04856cc7928f6 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Use QObject::d_ptr for public API classesJocelyn Turcotte2013-08-208-21/+18
| | | | | | | | | | | This follows the model used by the rest of Qt, potentially avoiding binary compatibility issues. The compromise is that we now depend on core-private, thus forcing us to follow Qt's release cycle. Change-Id: Ib2df51071fc35935ac99edf7b9c5562949cb43e2 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Adjust all the needed paths when using upstream repositoriesAndras Becsi2013-08-203-4/+13
| | | | | | | | Having a separate 3rdparty_upstream might not be the best solution after all, but oh well. Change-Id: Ib834c4d9d56669a3f4308eb614cec787116d6d4c Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Make sure submodule changes do not show up as a diff.Zeno Albisser2013-08-191-19/+4
| | | | | | | | | | This is needed to prevent .gitmodules changes from showing up when using the upstream repositories. It will also prevent changes in submodules from showing up and being added to a commit by accident. Change-Id: Ia74f59ebce6d458b39c6ca2472aa6e623cd280fd Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Update init-repository.py to allow using upstream chromium repository.Zeno Albisser2013-08-193-44/+98
| | | | | | | | | | | | | | | | | | | | The regular workflow now is just to clone the qtwebengine repository and then execute the following commands. git submodule init && git submodule update --recursive && qmake && make This will also clone a submodule called 3rdparty which contains the chromium and ninja sources without pulling in further submodules and without a complete history. Developers that do want to have a complete chromium checkout instead should not use the above command sequence. Instead they should just clone qtwebengine, execute the init-repository.py script, run qmake and make. The init-repository.py script will then checkout the complete chromium sources into a subdirectory called 3rdparty_upstream. The location of these sources will be picked up by qmake automatically. Change-Id: I0fa4f1d554bdca2e852b6a97aa2e5462d90d8664 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Change "Contents" to "Engine" in API class names.Jocelyn Turcotte2013-08-1915-135/+135
| | | | | Change-Id: I58d83f4f33728f92e4bf13b6be30b15528fdd033 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Detach common.pri from the nano browser examples.Jocelyn Turcotte2013-08-196-20/+14
| | | | | | | | | | | | | | Move common.pri to the root directory to be able to use it with tests. Remove nano browser specific logic (util.h include and common resources) from this file and use relative paths in the examples instead. This also remove unnecessary directives: - lib doesn't have to be added to INCLUDEPATH since proper modules are used - util.h doesn't need to be added to HEADERS, moc doesn't need to go through it - MOC_DIR doesn't have to be adjusted anymore Change-Id: Id706e7f2ef7c9607bdcd0ba63afecf5b5854262b Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Prepare the directories to have more examples included.Jocelyn Turcotte2013-08-1911-6/+6
| | | | | | | | | | | This also ajust the name to be consistent with other Qt examples. - Move nano browser one directory level down, also renaming them to match their target name - Remove the dashes from the target names - Rename the qtquick example directory to quick, matching the style in lib Change-Id: I4a5e31be0b919ae596eadbf731be52372ae61151 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Update README.rst to instruct on usage of the new 3rdparty module.Zeno Albisser2013-08-191-2/+12
| | | | | Change-Id: I7e701688af275afb1ca4a123fcf9dcc00c5bb6f1 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Add implementation for pure virtual functions after updating Chromium.Zeno Albisser2013-08-171-0/+3
| | | | | Change-Id: Id760a1b39b5f9efeea49e49183b1fcc68fd54f8f Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Add patch for WebKit after updating Chromium.Zeno Albisser2013-08-172-0/+69
| | | | | | | | | | | | | Including Assertions.h leads to __darwin_ssize_t being defined inside namespace WebKit but not outside that namespace. This is because certain headers will not be pulled in again later on in the same compilation unit. This patch has already been upstreamed, and can be removed with the next Chromium update. Change-Id: I302bbf779fcabb909a9ffda53d8b9fdccc87e248 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Update qtwebengine.gypi after updating Chromium.Zeno Albisser2013-08-171-1/+1
| | | | | | | content_app target has been renamed upstream. Change-Id: I0b9c26234d086d67d5564b0b156bbb04a2cab331 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* WebKit.gyp has been moved upstream.Zeno Albisser2013-08-171-2/+2
| | | | | Change-Id: Ia8791d475ae06ca54a7b8a4154cd804ff7c14152 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Update patch for touch and gestures after updating Chromium.Zeno Albisser2013-08-171-10/+10
| | | | | Change-Id: I64aa8e01e3d157670f2fd118d1ed25730b61a967 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Update Clang libcc patch after updating Chromium.Zeno Albisser2013-08-171-39/+38
| | | | | | | | - googleurl headers are now in url/. - dom_storage_namespace.h moved. Change-Id: I87f08d2426ac0da5b50fcf424ca446fb03f207fd Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Update patch for using libc++ instead of stdlibc++ after updating chromium.Zeno Albisser2013-08-171-12/+12
| | | | | Change-Id: I93ceb4e5d1ccf63cbeaec1fdff4ab1c5c8a57a65 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Replace chromium and ninja submodule by a single 3rdparty submodule.Zeno Albisser2013-08-178-11/+14
| | | | | | | | | | The new 3rdparty submodule contains snapshots of both ninja and chromium. This drastically reduces the size of the repository and can be used by our CI system. Change-Id: Ie7482181f2ba9dba5fc181b1f221a5fae714c8c8 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Add export_from_git.py to take snapshots from chromium and ninja.Zeno Albisser2013-08-163-105/+337
| | | | | | | | | | | | | | | | Split out the Submodule class and related functions from init-repository.py into a separate python module git_submodule.py. This is necessary in order to reuse the code for the export script. The export_from_git.py script can be used to export files from a git repository into an arbitrary directory. It spiders submodules and applies some pattern matching to remove unwanted files. This script can be used to create flattened chromium snapshots to be used in our CI system. Change-Id: Iade8126fae6c28b5347c9d6e08941e28d3e0e7be Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix compile dependencies of examples.Jocelyn Turcotte2013-08-161-0/+3
| | | | | | | | | | | Touching an external header wouldn't trigger the recompilation of example source files since the Makefile didn't list them as dependencies. The problem was that qmake didn't have its dependency directories set properly since our default_pre.prf would totally override the default one. Change-Id: I1cbb6b259c15a70b872241cf257a6b5f93244cb4 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Move QWEBENGINEWIDGETS_EXPORT to qtwebkitwidgetsglobal.hJocelyn Turcotte2013-08-134-7/+58
| | | | | | | | Since the macro is used in public headers, it should also be declared in one of the webenginewidgets module's public headers. Change-Id: I5cd56196e95c78fac2ba8df076f2cd683b01a5ac Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Once created, keep the WebEngineContext until shutdown.Jocelyn Turcotte2013-08-121-15/+4
| | | | | | | | | Chromium isn't expecting the destruction and reconstruction of the ContentMainRunner and BrowserMainRunner. This will need a few tweaks before we can do this without hitting asserts in debug builds. Change-Id: I0c46a2db27350b3f6352e3eb8a5ec7ecff06784e Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Delete the ResourceContextQt on the IO thread.Jocelyn Turcotte2013-08-121-1/+6
| | | | | | | This mimicks the Shell's behavior to avoid an assert. Change-Id: I31fdb4ff9c1ee9a359db84978da313489e93e30a Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Fix the segfault on exit.Jocelyn Turcotte2013-08-122-11/+17
| | | | | | | | | | | | The WebEngineContext member was declared after the WebContentsDelegateQt in WebContentsAdapter. This means that the delegate was destroyed after the context and would cause the crash. Reorder the declaration and move the WebContentsDelegateQt also to the private class to reduce future confusion. Change-Id: I343504d4fd1ede80feb710446368fdf12f360b15 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Delay the RWHVDelegate parenting until it's been attached to its RWHV.Jocelyn Turcotte2013-08-1212-11/+32
| | | | | | | | This avoids the RWHV being accessed before being attached to the delegate when attaching the later to the view's layout. Change-Id: I5fffef60fdd7203cfb4ced807b5475aac676ea09 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Simplify the ownership between RWHVQt and RWHVQtDelegate.Jocelyn Turcotte2013-08-124-9/+10
| | | | | | | | | | Let the RWHVQt explicitly own its delegate. Keep the same behavior by letting RWHVQt::Destroy delete itself directly like done in RWHVGtk instead of deleting the RWHVDelegate which would then delete its RWHV. Change-Id: I051c95d608964ebcd66d3ccbe728f63c0ca397ae Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Avoid keeping a RWHVDelegate pointer in WebContentsViewQt.Jocelyn Turcotte2013-08-127-5/+19
| | | | | | | | | There can be multiple RWHVDelegates within one WebContentsViewQt during navigation. Avoid keeping a pointer by sending the focus call to the client directly, which fits the purpose better. Change-Id: I863c174e9a2567f3580f3cb525bc5353ab2a4417 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Fix mac buildPierre Rossi2013-08-081-1/+1
| | | | | | | We also want to build with no-rtti there. Change-Id: If680760904866e5c95d1ed85fffecfea67dde7d0 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Add patch for newer XCode/clang versions on Mac.Zeno Albisser2013-08-082-0/+39
| | | | | | | | | | | Remove -Wno-deprecated-register from common.gypi. This warning is not supported by recent clang versions shipping with XCode. Therefore replacing it with -Wno-deprecated. This is a bit a too broad fix, but the best we can do for now. It seems that the flag is still supported in upstream clang. Change-Id: I609355484c9b3ae111591a17181f02104bed6b6b Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Remove hunks that accidentially ended up in Clang-libcpp patch.Zeno Albisser2013-08-081-39/+0
| | | | | Change-Id: Ib592d8498cabdafda0dc65cf81de4721f139ffc8 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Add a dummy implementation of DownloadManagerDelegate.Michael Brüning2013-08-084-2/+237
| | | | | | | | Prevents the the web engine from crashing by providing an implementation and generating download Ids for downloads. Change-Id: Iac1e98b74ec1fdc9d913951fbfed4b7ba394170f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix some style inconsistencies in the header file.Michael Brüning2013-08-0710-25/+25
| | | | | | | Changed the header #defines to UPPERCASE_CLASS_NAME_H. Change-Id: I49dec91d7a97808c1b9618df6d985939fd84babb Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Remove ASSERT from forwardEvent.Michael Brüning2013-08-021-1/+0
| | | | | | | | | | | | This was causing trouble when QEvents were forwarded from the RenderWidgetHostViewDelegateQtWidget event handler method before the RenderWidgetHostView had been initialised. forwardEvent checks for a pointer to the view being set anyway, so the ASSERT does more harm than good. Change-Id: I59035d2fc053054400f85b3b9c2b8ad065f22627 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Implement more detailed load information handling.Michael Brüning2013-08-027-2/+36
| | | | | | | | | | | | Add WebContentsObserver as a base class of WebContentsDelegateQt to be able to get more information about the WebContents (loading state etc.). Also implements load finished with a success value to be able to show when a load has failed. Change-Id: Ic2ad698d180b395cf3d9fb6cd49b12c9cb4fb493 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Don't pass the RWHV to the AdapterClientPierre Rossi2013-08-0213-21/+39
| | | | | | | | | | | | | As this looks like a layering violation. Instead, rely on WebContentsViewImpl::CreateRenderViewForRenderManager querying the WebContentsView's size before setting it on the RenderWidgetHostView. The WebContentsView now gets the size of the actual view through the Adapter interface. Then, in RenderWidgetHostViewQt, we now forward the resize request to the delegate. Change-Id: Ide679f6d114508cc7c9ffac83daad19d16764a4d Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Handle basic cursor changes.Jocelyn Turcotte2013-08-016-2/+110
| | | | | Change-Id: Ic08f83db03454542554fac9e590d79a4440a4b28 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>