summaryrefslogtreecommitdiffstats
path: root/src/core
Commit message (Collapse)AuthorAgeFilesLines
* Support HTML5 form validation featurePeter Varga2015-03-133-0/+24
| | | | | | | | | | | | HTML5 provides built-in form validation that is supported by chromium. The form validation messages should be shown by the browser therefore new MessageBubble UI element has been added to Quick and Widget implementations. This patch implements chromium's form validation events and shows the messages in a MessageBubble. Change-Id: I0c8f4f102823117e2bfb16ff8a4c503635491939 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Clean up global profiles and ownershipAllan Sandfeld Jensen2015-03-125-21/+45
| | | | | | | | | | | | | This patch removes the unused global off-the-record browser-contexts and changes all browser-contexts to be ref-counted by an API level profile. The API default profiles are now owned by a global QObject and are deleted on exit. Change-Id: Id7c9eafa24829118105f58b66663a6348216823d Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com> Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* UserScript: Rename source property to sourceCode.Robin Burchell2015-03-122-6/+6
| | | | | | | | | The name 'source' is unclear, and doesn't match current conventions in QtQuick (e.g. Image::source). Furthermore, such a property inhibits adding convenience API to fetch a user script from an external URI. Change-Id: I518b3963f64f0986f9e2d08fe7c5f69122372e0c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Add testsupport QML API and error page signalsPeter Varga2015-03-062-3/+13
| | | | | | | | | | | The testsupport API is used for test those features that are not planned to be accessible via the public API. For example, signals of the chromium's error page should not be visible for the develepor but it is important to test whether the error page is loaded properly. Change-Id: Ie5b3265a207d05649cabd624a001a6ffe2e45971 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Add missing QtWebEngineCore namespace refs to egl integrationStephan Binner2015-03-043-4/+4
| | | | | | | Also add a missing include (for compilation without accessibility) Change-Id: Iea3def18d898e249b82968cd25495b62ffb80cfe Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Fix namespace of SurfaceFactoryQtAllan Sandfeld Jensen2015-03-043-3/+3
| | | | | | | | Fix one class that didn't get refactored right. Change-Id: Id0f2f92d8f68453002524de3c182e572cd657c6a Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Respect use-system-jpeg Qt settingAllan Sandfeld Jensen2015-03-041-0/+2
| | | | | | | Forward the system-jpeg Qt setting to chromium. Change-Id: I646176fdf6a1c7818828dc8b24543cc885cc3688 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Fix building Qt WebEngine without accessiblity enabledStephan Binner2015-03-042-2/+2
| | | | | Change-Id: Idb9a384da3aaa118a9b0fb773ca5ba94b96f6bbc Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Add namespace to internal QtWebEngine APIAllan Sandfeld Jensen2015-03-0291-54/+400
| | | | | | | | Adds the QtWebEngineCore namespace to all internal core API. This ensures we don't export any internal symbols in the global namespace. Change-Id: I26af888ea7c6c4c4d0f04c24a377c1a9d3c92751 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Introduce a user scripts mechanismPierre Rossi2015-02-2116-9/+1069
| | | | | | | | | | | | | | | Allowing programmatic injection of JavaScript to accomplish all sorts of tasks on the render process side. This API gives control over the point during the loading phase at which the script is run, whether it is run on sub-frames or not, as well as the JavaScript world it is run in (either the page's main world, or an arbitrary isolated world). This only has the Widgets API. The Quick API, tests and docs are coming in separate patches Change-Id: Ia1c79f68f8dfd4d964281d9723d09062ed7abe46 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Synchronize with QAtomic instead of volatileAllan Sandfeld Jensen2015-02-202-28/+26
| | | | | | | | Replaces the three volatile bool with two atomic ints and an atomic pointer. Change-Id: Iad41aef4952bbf7de77523ffd729bd00ace68ee9 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Fix crashes and ownership issues in Custom URL scheme handlingAllan Sandfeld Jensen2015-02-204-7/+8
| | | | | | | | Fixes crashes exposed by implementing the qthelp protocol handler for Qt assistant. Change-Id: I0b1153bc52ff82838cde009f1fe1ac46edc43210 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Fix the build on eLinuxAndras Becsi2015-02-208-33/+124
| | | | | | | | | | | | | Update ozone layer to the new snapshot, update the embedded_linux.pri configuration, fix the GLSurfaceQt build on non-x11 linux and update embedded command line switches for the 40.0.2214-based chromium snapshot. This patch also updates the snapshot sha1 to include required chromium changes. Change-Id: I7f9446fa1b67a0af7baee564acff41ae33ff1a94 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Experimental custom URL scheme APIAllan Sandfeld Jensen2015-02-1912-0/+638
| | | | | | | | Introduces API for custom URL scheme as an experimental API in widgets. A QML api is not included yet. Change-Id: Ice4542e5238feb961a4c9c60a809455e31dc1ec6 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* WebChannel: don't mess with the navigator objectPierre Rossi2015-02-192-15/+15
| | | | | | | | | | | | | The navigator object is actually exposed later on from WebCore using a different mechanism, so the V8 extension approach won't work with it. Better take the chrome extensions approach and expose our own. This should "un-break" the part of the web that was broken by eee482929a. Change-Id: I991be2e12bb9ebcf60ace02721497c3fcd923c7f Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Fix Http User-agent string settingAllan Sandfeld Jensen2015-02-181-0/+2
| | | | | | | | | Chromium has multiple places where it reads the user-agent, we were only setting one, which appears to no longer be used for most cases. This instead sets it by using the webcontent user-agent override. Change-Id: I77d4d0a21424feda7a18140fb72baacdd6f816ca Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-16106-742/+742
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: Ieb6bac7a1be5c25eb7cb917495b58b6a870ca6d4 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devFrederik Gladhorn2015-02-142-1/+2
|\
| * Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-132-1/+2
| |\ | | | | | | | | | Change-Id: Ic4388b2c28f46ca8047061c049128672041ceb0b
| | * eLinux: build ffmpegsumo as well.v5.4.1Zeno Albisser2015-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | This will only contain free codecs. Change-Id: I021b2c121bf146abb24b7a90dd1c3580638b1058 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
| | * Merge 5.4 into 5.4.1Oswald Buddenhagen2015-01-163-4/+14
| | |\ | | | | | | | | | | | | Change-Id: I772c9710d8b01efd385a54e5f642ae2b62702a0e
| | * | Respect the pulseaudio configuration from Qt.Michael Brüning2015-01-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was previously ignored for Desktop Linux. Change-Id: I214171d222a5e7e0ee64afde225a742adbda4adf Task-number: QTBUG-43387 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | | | Compile time check the fileListingHelper specializationsPierre Rossi2015-02-131-1/+8
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we can now rely on deleted functions (supported by MSVC 2013), we can avoid the scenario we had with the last snapshot update where the file picker internal API changed slightly (see 1a744ca4 for more details). Change-Id: Iab26a7834a367f24afe5fbf37fae64639aa9c12e Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | | Integrate with WebChannelPierre Rossi2015-02-1212-14/+442
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide a transport mechanism for WebChannel over chromium IPC and expose WebChannel in our experimental QML API. Co-authored by Milian Wolff. Change-Id: Ia24b1d4ebc8515de677d4849ec33cb55c963918e Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | | Add static asserts for internal file picker enumPierre Rossi2015-02-111-0/+5
| | | | | | | | | | | | | | | | | | | | | Keeping it in sync with its content equivalent. Change-Id: If0dbd79844b836ee8fe26b1e9c414f355c026302 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | | Forward the application locale in the right formatPierre Rossi2015-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | Chromium expects bcp47. Change-Id: I0403fe38e431bbc184d833009e9343235dc543d9 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | | Reverse the logic for download cancellationAndras Becsi2015-02-062-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since we require downloads to be explicitly accepted we should have 'accepted' as a member in the download info instead of 'cancelled'. Change-Id: Ia8ff4a4b29f3c8631f4cb1c410ece5f11d9cdc93 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | | Update QML download API to match widgets and add documentationAndras Becsi2015-02-062-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename the download signal to downloadRequested and only start a download if it has been explicitly accepted by the user, else cancel it by default. Replace the downloadPercentage property with totalBytes and receivedBytes to also give the user information about download size. Additionally this patch adds missing documentation. Change-Id: I9d895386cf033f2efffe3ebac6f08f94c6fe0c19 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com> Reviewed-by: Jocelyn Turcotte <jturcotte@woboq.com>
* | | Fix the fileListingHelper template function specialisationAdam Kallai2015-02-061-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | The WebContentsAdapter::filesSelectedInChooser function parameter type has been changed since the Chromium update. Thus content::FileChooserFileInfo has to be used instead of ui::SelectedFileInfo. Change-Id: Ia6a50409f3f7c704228cb739fc50d694e633dbee Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | | Simplify access to WebContents from adapter.Pierre Rossi2015-02-053-2/+10
| | | | | | | | | | | | | | | | | | Change-Id: I42cc8b28dd9aef9d23b83a43a60d8d59c16f4b1d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | | Add settings to WebEngineProfilesAllan Sandfeld Jensen2015-02-052-44/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds settings to profiles so common settings might be shared among all pages in a profile. The former global settings are now replaced by the settings of the default profile. Change-Id: I544420e07beeb52ef29b2360bc7929402650cd07 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | | Propagate unhandled key events to the QtWebEngine view's parentJocelyn Turcotte2015-02-058-9/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows applications to receive unhandled key events from the page by setting an event handler on the view's parent widget/item, like it was possible with QtWebKit. This is different in that events first have to asynchronously go through the QtWebEngineProcess. If the WebEngine view has the keyboard focus, the events will be consumed inconditionally by the RenderWidgetHostViewQtDelegates, and a copy will be resent to the view's parent if it wasn't consumed. This sends it to the parent instead of the QWebEngineView directly since those are only unhandled events, unlike with other widgets where you can first intercept events. It is done that way also in cases where the QWebEngineView would be be the focus widget directly in the future, instead of the RWHV. If applications want to intercept key events before they reach the page, they need to use an event filter on the QWebEngineView's children or globally on the application. Change-Id: I3b48f5212d3f238a1c0497cec1db6ae3badbad26 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | | Handle multiple feature requestsAllan Sandfeld Jensen2015-02-044-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | This patch makes it possible to have multiple outstanding feature requests and adds hooks for chromium to cancel requests. Change-Id: Icbeb30aa39ace090d853a29aefaeebbe726fe251 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | | Fix widgets download state updateAndras Becsi2015-02-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the DownloadState enum of core does not match the DownloadState enum of QWebEngineDownloadItem we should never directly compare it, instead we should convert with the toDownloadState() function, to fix the missing emission of the finished() signal. This patch also adds static asserts to verify the match of chromium's DownloadItem::DownloadState and our core DownloadState. Change-Id: I51110f55598230e380e15948f75219976d3a68a0 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | | Forbid mismatching profiles when adopting web contentAllan Sandfeld Jensen2015-02-023-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid crashing due to a mismatch of browser-contexts used by webcontent and webcontent adapters and clients, we refuse to open content in a new window witha different profile and prints a warning so the developers may fix their software. Change-Id: I704266a96de2d7a5f8e1fa3ccf49a50f1d2307c9 Task-number: QTBUG-43898 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | | Add Qt WebEngine Quick API for allowing certificate errorsPaulo Pinheiro2015-02-026-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds API for overriding some certificate errors. Once overridden any identical error for the same hostname and certificate will use the same override. Change-Id: Idf9e968edca18751cbdab744880480750d0c1bd4 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* | | Handle Shift, Ctrl and Alt key also when the keypad modifier is set.Michael Brüning2015-01-281-303/+310
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When pressing one of these keys while already holding a keypad key, the keypad modifier was also added to the second key presses at least on OS X, leading to the key presses not being handled correctly. Includes minor coding style adjustment as well. Change-Id: Ia5c5af43256adf6cb4a97541351fee93bec08458 Task-number: QTBUG-42124 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* | | [Windows] Enable WebGL and accelerated 2D Canvas.Michael Brüning2015-01-231-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we are using Chromium's SW compositor when using an ANGLE-based Qt build, it should be safe to re-enable those. Change-Id: Ib87ef38a5a381a389fef7e092328c9c5d116aa4e Task-number: QTBUG-42182 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* | | Enable building Qt WebEngine without accessiblity enabled.Michael Brüning2015-01-238-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds guards that for QT_NO_ACCESSIBILITY being not defined around the code that uses accessibility types. It disables the quicknanobrowser and quicktestbrowser examples which need Qt QuickControls, which has a hard dependency to accessibility being enabled. Task-number: QTBUG-43305 Change-Id: Ifa39e3ce447ebc2124f52e00b29b1d7d2231035e Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | | Introduce ASSERT_ENUMS_MATCH macroPierre Rossi2015-01-222-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | For our common use case of compile-time checking enums that we want to keep in sync. Change-Id: I102d737ad986bf3dfff4d11a91afa3f3819a7947 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | | Improve geolocation permission securityAllan Sandfeld Jensen2015-01-223-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | Ensure we only grant permission to the origin the user replied to, otherwise we might get a race exploit. Change-Id: I4f737148f4e41432c160b81c324531e9cde0edc6 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* | | Replace the inspectable property with an environment variableJocelyn Turcotte2015-01-228-34/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation would enable or disable the inspector globally when the inspectable property was set on a WebEngineView, overwriting the value previously set by other pages. Instead of havind default port for the debugging server and having to enable debugging on individual pages, use an environment variable, QTWEBENGINE_REMOTE_DEBUGGING, to enable the debugging server for the whole application at the same time as specifying the port. The format is the same as for QTWEBKIT_INSPECTOR_SERVER in QtWebKit. QTWEBENGINE_REMOTE_DEBUGGING is set by default in quicktestbrowser to ease development. This also keeps the input reading from the --remote-debugging-port command line switch for convenience, but its usage should be considered internal. This patch also take the opportunity to remove the unused DevToolsHttpHandlerDelegateQt::m_browserContext and to move the ownership from ContentBrowserClientQt to WebEngineContext since the list of inspectable pages isn't bound to the BrowserContext anyway. Change-Id: I772687f88f4feee0cc14dd182b0129cc0ea384dd Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* | | Fix the inspector after the 40 updateJocelyn Turcotte2015-01-224-34/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | Update our copy of the DevTools code according to the modifications in Chromium 40. Add a DevToolsManagerDelegate subclass to re-add the target enumeration code and import the new shell Target code. Change-Id: I8c56faaf4dd77ca8f4129fcdc80690c7a117464b Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* | | Fix WebSockets after the 40 updateJocelyn Turcotte2015-01-211-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WebSockets go through OnBeforeURLRequest but don't have a ResourceRequestInfo. We would force them to fail with an ERR_ABORTED. Fix the issue by not getting in the way and return net::OK in the cases where we won't intercept the request. Change-Id: I4cbb16171a9e7e295223e18946ae92004781b26b Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | | Fix gcc warning 'may be used uninitialized'Andras Becsi2015-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | Initialize glType to make gcc happy. Change-Id: I558ac822666d54a623e68cd2182895b05ba410c0 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | | Add DownloadItemInfo to BrowserContextAdapterClientAndras Becsi2015-01-202-14/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This extends the carried information from Chromium's content::DownloadItem with url, totalBytes and receivedBytes in preparation of adding a Widget API for downloads. DownloadItemInfo struct is now constructed to carry information about individual downloads from the content layer to the Qt API layer. Change-Id: I3ee7aea02b74994e612e1b3709195776d5e7570b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | | Disable warning about use of deprecated functions on Windows.Zeno Albisser2015-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | This is only needed for compiling with MSVS2013. Change-Id: Ieb81539a8351143870c9c78591c8e8eb0fb41bca Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | | Add Keyboard modifiers to MotionEventQt.Zeno Albisser2015-01-202-8/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also fix the mapping of Ctrl and Meta keys on Mac OSX. On this platform Qt automatically maps Meta to Control and vice versa. Chromium however does not expect such behavior. Change-Id: Ia9913322ae8ae6ffd99feb6edfc91b9ea752c5cb Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* | | BrowserAccessibilityDelegate has been implemented in RenderFrameHostImpl.Zeno Albisser2015-01-203-80/+11
| | | | | | | | | | | | | | | | | | | | | | | | Adopt Accessibility functions from render_frame_host_impl.cc Change-Id: Ifa6752fd9daa3429d4016a91b85d7145b1fc2775 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | | Clipboard must now be subclassed.Zeno Albisser2015-01-202-113/+145
| | | | | | | | | | | | | | | Change-Id: I4c7a31746e0973c4ffb9c5e4cf2576b7ba03c37d Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>