summaryrefslogtreecommitdiffstats
path: root/src/core
Commit message (Collapse)AuthorAgeFilesLines
* Remove more dead code from the libsrtp testThiago Macieira2018-09-051-11/+0
| | | | | | | | | Commit 83e790dae14725347180bb79e463c5f242616b8d removed the test, but not the configure.json files, so the test always failed because the test failed to compile. Change-Id: I8b4ab98c34b94afd94b6fffd15516f06ec21c791 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fallback to Latin-1 if ASCII and UTF-8 doesn't workAllan Sandfeld Jensen2018-09-051-1/+2
| | | | | | | | | | Latin-1 is a standard fallback for HTTP headers, but no one that HTTPContentDisposition::Parse considers by default. Task-number: QTBUG-70288 Change-Id: Ife36fffe31da5492cde49a4d447cfc42b3f64b95 Reviewed-by: Zakor Tamas <ztamas@inf.u-szeged.hu> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Fix QWebEngineUrlScheme::operator== constnessJüri Valdmann2018-09-042-4/+4
| | | | | | Task-number: QTBUG-70247 Change-Id: Ic0898966d9a88a0bbcdf749c6ea7e80e054d68a3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Return http status code for successfully loaded pagesErwin Kandler2018-08-291-1/+5
| | | | | | | | | WebEngineView supports getting the http status code (error code) for failed loading requests only. This patch lets the user access the status code for successfully loaded pages as well. Change-Id: Ib8dbdfe94eed4d62e731c736c13f60ebd62a23fa Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* WebEventFactory: Use QKeyEvent::key() if QKeyEvent::text() is emptyJüri Valdmann2018-08-271-13/+52
| | | | | | | | Fixes missing dom_key issue when ControlModifier is used on Linux and macOS. Task-number: QTBUG-69442 Change-Id: Icd644d019494fd3c95269b42c71efd747507a3ea Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* WebEventFactory: Fallback for WebKeyboardEvent::dom_codeJüri Valdmann2018-08-271-1/+7
| | | | | | | | | | Usually this field should be computed from the native scan code, but sometimes we do not have a native scan code (in tests, for example). Add a fallback case to compute this field from windows_key_code, with test. Task-number: QTBUG-69442 Change-Id: I046094032576f4215cc8b3a6ced699a86ea148a9 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* WebEventFactory: Fix WebKeyboardEvent::dom_code on macOSJüri Valdmann2018-08-271-5/+8
| | | | | | | | | | | Currently this field is always computed from QKeyEvent::nativeScanCode, but this is not correct on macOS where nativeVirtualKey should be used instead (there is no nativeScanCode on macOS). Fix by using native_key_code which already takes this into account. Task-number: QTBUG-69442 Change-Id: I7c99d7d147ab68bac7ab91101de173eb04fa5c03 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* WebEventFactory: Fix WebKeyboardEvent::native_key_code on Windows and LinuxJüri Valdmann2018-08-271-1/+25
| | | | | | | | | Currently this field is filled from QKeyEvent::nativeVirtualKey, but this is correct only on macOS (cocoa). Other platforms should use nativeScanCode. Task-number: QTBUG-69442 Change-Id: I097ec4c726a9d249c0adfbc620d2585983f6246c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* WebEventFactory: Use runtime platform detectionJüri Valdmann2018-08-271-6/+40
| | | | | | | | | Make sure that the platform specific code paths are only taken when the relevant QPA plugin is actually used. Also detect if eglfs plugin is using Xkb key codes. Task-number: QTBUG-69442 Change-Id: I9546b61ad8d9f15020a96f8c0006d056aa157fcc Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* WebEventFactory: Consistently unswap Control and Meta on macOSJüri Valdmann2018-08-271-30/+44
| | | | | | | | | Move swapping logic to separate helper functions and use them also for filling out windows_key_code and dom_key. Task-number: QTBUG-69442 Change-Id: Id3b883b28b877d54315c5e2fb0d77bad250f2462 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Replace RenderWidgetHostViewQt::m_host by RenderWidgetHostViewBase::host()Tamas Zakor2018-08-242-40/+38
| | | | | Change-Id: I327c2459e803602dae107defec8d03d75f363cd7 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* WebContentsAdapter: Fix build against Qt 5.9Jüri Valdmann2018-08-231-6/+7
| | | | | | | QTimer::singleShot wants to copy the lambda but LoadURLParams is not copyable. Change-Id: I300b70eef0041294080a15166a50321bb4292cfd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Clean-up of forward declarations and includes in core headersTamas Zakor2018-08-234-13/+0
| | | | | | Change-Id: Icf0508baf0884afe7591b35e13733b17c9fdfe90 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* DelegatedFrameNode: Use QSGTexture::filtering()Jüri Valdmann2018-08-231-17/+9
| | | | | Change-Id: I5ab52de1eb6bd7a25e8b680f4779a505e3f1fcf0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Michael Brüning2018-08-2114-33/+105
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf configure.json examples/webenginewidgets/markdowneditor/resources/3rdparty/marked.js examples/webenginewidgets/markdowneditor/resources/3rdparty/qt_attribution.json examples/webenginewidgets/markdowneditor/resources/markdowneditor.qrc mkspecs/features/platform.prf src/3rdparty src/core/media_capture_devices_dispatcher.cpp src/core/net/url_request_context_getter_qt.cpp src/core/net/url_request_context_getter_qt.h src/core/web_contents_adapter.cpp Change-Id: I467133ba455b1f85f6bb61793794c31cb1094541
| * Fix --enable-webgl-software-rendering with drivers that don't support OpenGLKai Koehne2018-08-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | --enable-webgl-software-rendering is supposed to be used together with mesa llvmpipe / opengl32sw.dll. However, Chromium did still use the built-in GPU blacklist to disable features based on the hardware GPU driver. Avoid this by always passing --ignore-gpu-blacklist for this mode. Task-number: QTBUG-69236 Change-Id: I430d101f6eac64478585de54f705e76859c80597 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * MediaCaptureDevicesDispatcher: Disable getDefaultScreenId on X11Jüri Valdmann2018-08-081-1/+10
| | | | | | | | | | | | | | | | Not needed and triggers race condition. Task-number: QTBUG-69007 Change-Id: Id57ba527387e5dbe44a8dd6c5a49e7278403ce64 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
| * Fix bougs documentation for QWebEngineUrlRequestJob::replyMichal Klocek2018-07-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | IODevice::close and therefore aboutToClose is called by io thread, connecting it to deleteLater will register deferred delete on event loop of IODevice instance, which is on ui thread. This could be racy since deletion on ui thread can happen before job is done. Change-Id: I895e6a71649ba65944d069f254d119cc60aada6c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Close popups when parent window is movedAlexandru Croitor2018-07-273-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an HTML select box was clicked inside of a QWebEngineView and the parent QWebEngineView window was moved using the mouse (via window decoration toolbar for example) the popup window would stay around instead of being closed. This happened because of the usage of the Qt:Tool window flag for the popup window, which implies a tool that floats near its parent window. The fix is threefold: 1) Use Qt::Popup instead, similarly to how QMenu does it. Whenever the parent window is moved, the popup will now get a CloseEvent. 2) Handle the CloseEvent by telling Chromium to close and destroy the popup. 3) On Windows the OS might send mouse move events to the popup RWHVQD instance after its parent QWebEngineView, RWHVQD, QWebEnginePagePrivate (client adapter) is destroyed. We need to guard the mouse forwarding code not to access the client adapter if it has already been destroyed. The second point is done by telling Chromium that its popup lost focus which it interprets as a sign to hide it, and automatically destroy it. This will destroy the underlying RWHVQtDelegateWidget and RWHVQt instances. Task-number: QTBUG-59891 Change-Id: I47f94a93c495a6caa5de92a6022eaca154994eda Reviewed-by: Michael Brüning <michael.bruning@qt.io>
| * Use net::TransportSecurityPersister to persist HSTS stateJüri Valdmann2018-07-252-1/+20
| | | | | | | | | | | | Task-number: QTBUG-69605 Change-Id: I863db484ff2bcf558585f75c73963097fb43148a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * QWebEngineUrlRequestJob: QUrl("null") for unique initiator originsJüri Valdmann2018-07-202-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | The empty URL is used both for representing a missing origin (browser-initiated navigation request) and a unique/opaque origin. This is problematic since the security implications are very different in these two cases: browser-initiated requests usually should have high security clearance, while requests from unique origins should be restricted. Task-number: QTBUG-69372 Change-Id: Iff73fd1c9a29f1c5c281a8945536333081ff2d6b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Fix segfault in devtools openInNewTab handlingJüri Valdmann2018-07-161-1/+10
| | | | | | | | | | | | | | | | | | | | - Use OpenURL on the devtools WebContents. - Guard against self-destruction (otherwise quicknanobrowser crashes). - Change quicknanobrowser to open links in new tabs. Task-number: QTBUG-69359 Change-Id: I4db379731c6fa855124d38c5066b0aad622861d2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Fix enum mismatch in WebContentsAdapter::enterDragJüri Valdmann2018-07-131-18/+18
| | | | | | | | | | | | | | | | | | | | | | DragTargetDragEnter expects the 'int key_modifiers' parameter to have values from the enum blink::WebInputEvent::Modifiers and not ui::EventFlags. Also, contrary to the name, mouse modifiers are also expected. Task-number: QTBUG-69231 Change-Id: I2369609775243fded563dde7675c4bc2dfc81021 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * Forward mouse and keyboard modifiers from QDropEventJüri Valdmann2018-07-132-4/+6
| | | | | | | | | | | | | | Task-number: QTBUG-69231 Change-Id: I35b503dae7e2d90b26b6e61a4c7c260e45df2b62 Reviewed-by: Filipe Azevedo <filipe.azevedo@kdab.com> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * Enforce Visual Studio check in windows.priKai Koehne2018-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | Because windows.pri is included from a replace function gnArgs, fatal does not work: src/core/config/windows.pri:60: 'fatal' is not a recognized test function. Change-Id: Ib831e1ffa7e8e345477692d453bbcc568864b98c Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * Doc: Mark \snippet entries with .pro filesVenugopal Shivashankar2018-07-031-0/+2
| | | | | | | | | | | | | | | | This should enable excluding such snippets from documentation in some cases. Change-Id: I46854412546e3774889e09831254828d18362f29 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * Compile with -no-feature-tableteventAndy Shaw2018-06-294-0/+16
| | | | | | | | | | Change-Id: I7e03d6e3347ee9b81a7414574098827b5773b7b4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Unfriend NetworkDeleagte from ProfileIODataMichal Klocek2018-08-107-10/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Directly accessing IOProfileData's m_requestInterceptor from NetworkDelegateQt is not thread safe, unfriend the class. This change does not fix the issue of thread safety of accessing the requestinterceptor from NetworkDelegateQt, it is just a cleanup for following commit. Task-number: QTBUG-69844 Change-Id: I488f8968b38ad200178cea2cb0304e1c93aec711 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | MediaCaptureDevicesDispatcher: Minor cleanupJüri Valdmann2018-08-102-54/+24
| | | | | | | | | | | | | | | | | | | | | | - Make private methods private. - Use DCHECK_CURRENTLY_ON instead of just DCHECK (better error message). - Use auto for iterators. - Remove duplicate queue.empty() checks. - Remove unused arguments for getDevicesForDesktopCapture. Change-Id: I929f5d5882a2c1924159f4e001fe477e69a5f1a1 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | MediaCaptureDevicesDispatcher: Remove unused m_desktopCaptureSessionsJüri Valdmann2018-08-102-34/+0
| | | | | | | | | | | | | | Never used for anything? Change-Id: Ib7facf264d3a286a8c2ea1d1584ab86f11f4ea33 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | MediaCaptureDevicesDispatcher: Remove unused variable 'ui'Jüri Valdmann2018-08-101-13/+11
| | | | | | | | | | | | | | It's a std::unique_ptr<content::MediaStreamUI> that is always null. Change-Id: Id43be71b20dc3331692591af9fecbc73a8e521d6 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Fix bogus QT_CONFIG usage for printingMichal Klocek2018-08-093-9/+3
| | | | | | | | | | | | | | | | | | | | | | If webengine-printing-and-pdf is disabled we do not compile print_view_manager_qt, therefore print_view_manager_qt.h should never be included. Add missing QT_CONFIG check in web_contents_adapter instead. Change-Id: Ib0477c1f12025cd60ee9799ac06a6b664c65018c Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Make WebChannel an optional featureMichal Klocek2018-08-096-7/+36
| | | | | | | | | | | | | | Add webengine-webchannel feature. Change-Id: I600572180f8169aafe79cf0408527cc087d9a007 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Add printRequest()Michal Klocek2018-08-096-102/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds printRequested() signal for web content. This signal is emitted on javascript window.print(). This change updates also qt printview manager implementation, fixes a corner case and warnings about ipc unconsumed attachments. Task-number: QTBUG-69237 Task-number: QTBUG-53745 Change-Id: I0c47b732e27e929ac6db237fb562b7d5f9b959c2 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Add printToPdfPoppler testMichal Klocek2018-08-091-0/+12
| | | | | | | | | | | | Task-number: QTBUG-69550 Change-Id: I38fb8a32ad1967fc8a8568ad6c02ca3ca3000354 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Revert "Add HTTP request headers to custom URL schemes"Michal Klocek2018-08-097-46/+8
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a5bdc6236ad52586579a9a3da6a059835ed60761 and 04355f4d6f311adebfc354b094a5f79c6327e86f. CI still crashes on tst_QWebEngineProfile::urlSchemeHandler tests, issue is not reproducible locally and it will take time to investigate. Task-number: QTBUG-69844 Change-Id: I7ddb6a32383400d553fe692c24effb6dfb7b6102 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Add HTTP request headers to custom URL schemesAllan Sandfeld Jensen2018-08-037-8/+46
| | | | | | | | | | | | | | Makes it possible to read extra headers added to the request. Change-Id: I4af0ba8a5b28488b8f12a2cff29807575c24f026 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Fix running webengine without default profileMichal Klocek2018-08-035-2/+14
| | | | | | | | | | | | | | | | | | If default profile is not needed do not create by accident one in ~QWebEngineProfilePrivate. Task-number: QTBUG-66068 Change-Id: Ib4131268686178560f3a89dce41e59eb57613e17 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | GLOzoneEGLQt: Fix build with -no-openglJüri Valdmann2018-08-031-0/+2
| | | | | | | | | | Change-Id: Ic9b10175b48f993deda77a77bbfcf22f41e31598 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Add QWebEngineUrlScheme classJüri Valdmann2018-08-029-13/+505
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Public API for the new url/url_util_qt extension to Chromium, which allows to integrate custom schemes into Chromium's url parsing library and security model. Previously custom schemes would be treated as 'unknown' schemes and rely on fallback behavior in Chromium. [ChangeLog][Custom Schemes] Added the QWebEngineUrlScheme class for configuring how custom schemes are parsed and which security restrictions should apply. Task-number: QTBUG-62536 Change-Id: I7d8b9da3ad742f568b82ccc6a2456ad35e84069b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Move last surface and context classes to ozoneMichal Klocek2018-08-028-7/+7
| | | | | | | | | | | | | | | | Moves last two remaining classes to ozone. Now all the context and surface handling is in ozone subdir. Change-Id: I87d4570f866b905e8f79a73d70f04bd8b21f6e1b Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Use ozone for x11Michal Klocek2018-08-0220-229/+380
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to use ozone also for x11/glx. This way we have a more elegant approach to hook in our gl surface classes and we use ozone for all linux qpa backends. Moreover, we have now also more fine grain control to reimplement gl surface handling logic. This also aims to fix currently broken wayland backend, but instead of patching the broken x11 calls, we simply reuse ozone which does not use x11 for ozone egl. Add webengine-x11 check to handle ozone glx plugin compilation. For ozone egl backend reimplement missing functions. Task-number: QTBUG-65682 Task-number: QTBUG-51631 Change-Id: I8b45c6f4d09a1c703efb12b6452d78ab385371ab Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Add QWebEngineDownloadItem page/view accessorAllan Sandfeld Jensen2018-08-024-3/+30
| | | | | | | | | | | | | | | | | | | | To be able to determine where a download was triggered. [ChangeLog][DownloadItem] Added a page/view accessor to tell were the download was triggered. Change-Id: I21843a545a3e0eb66f5e5fa8a50e77564f2118a7 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Add DNS prefetchingAllan Sandfeld Jensen2018-08-017-0/+41
| | | | | | | | | | | | | | | | | | | | | | Turns out we did no have DNS prefetching. It requires an extra component. The same component can also do pre-connect, but we do not enable that, as it requires a predictive browsing backend. [ChangeLog][Settings] DnsPrefetchEnabled added, but disabled by default. Change-Id: Ieb036435b9f1a72a7be302e38e89e0c347c7176b Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Fix odd looking byte convertion in pdfium wrapperMichal Klocek2018-07-301-4/+2
| | | | | | | | | | | | | | | | | | On little-endian rgba8888 is abgr32, however we still swapped bytes resulting in argb32. Use simply correct format from beginning, which avoids swapping. Change-Id: I6578d6dfe626d5afdcefcae6dea3ca44b23d4412 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Implement RenderWidgetHostViewQt::DisplayCursorAllan Sandfeld Jensen2018-07-302-0/+6
| | | | | | | | | | | | | | | | | | It is where the active logic of UpdateCursor should now be. It doesn't matter for us yet, but we might as well follow how it is supposed to be done. Change-Id: I9d7f2ed767c3eef03e637680166b75307081f057 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix tooltip regression from 67-basedAllan Sandfeld Jensen2018-07-241-2/+1
| | | | | | | | | | | | | | We do not have a cursor manager. Change-Id: Idf4b89f12a0480d7f522879ba07ee807aaef641f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Make QUrl <-> GUrl conversion more explicitAllan Sandfeld Jensen2018-07-201-3/+12
| | | | | | | | | | | | | | | | Specify exactly how we parse using QUrl, and try parsing invalid URLs from GUrl as well. Change-Id: If6e95d2600315180f36f9ad767f97936b438cd84 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Update user dir associated to BrowserContext when chaging profile's pathPeter Varga2018-07-201-0/+7
| | | | | | | | | | | | | | | | | | | | Otherwise, setting a WebEngineProfile to non-off-the-record would assert. Therefore, now it is safe to set the quicknanobrowser's defaultProfile to non-off-the-record. Task-number: QTBUG-69416 Change-Id: I5ca2230e12e457dd9963e386708f2394ae4c8cea Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Enable XSS auditing by defaultFlorian Bruhin2018-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chromium has XSS auditing enabled by default - it seems like a bad idea for QtWebEngine to disable a Chromium security feature by default. The Google design document for the XSS auditor also claims[1]: Processing costs are essentially zero unless the URL or POST body includes any of the four characters " > < '. When those characters are found, we only invoke heavy processing on those attributes that might be dangerous. This stands in contrast to the XSS Filter in Internet Explorer, which runs costly regular expressions. Thus, worries about performance issues are likely unsubstantiated. This can be tested using the first link on [2], where Chromium blocks loading by default but QtWebEngine did not. [1] https://www.chromium.org/developers/design-documents/xss-auditor [2] http://webdbg.com/test/xss/auditor.aspx [ChangeLog][QtWebEngine] The XSSAuditingEnabled setting is now enabled by default, to mirror Chromium's behavior. Change-Id: Id57177ec8183335bc94cc8c0c440ac1e10d2c74f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Konstantin Tokarev <annulen@yandex.ru> Reviewed-by: Michal Klocek <michal.klocek@qt.io>