summaryrefslogtreecommitdiffstats
path: root/src/core/renderer_host
Commit message (Collapse)AuthorAgeFilesLines
* Make WebChannelIPCTransport into a RenderFrameObserverJüri Valdmann2018-03-222-54/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of version 63, Chromium creates proxy frames also for the main frame in the frame tree during cross-process navigations. This leads to a segmentation fault in WebChannelIPCTransport because we assume that all main frames are local. See https://crrev.com/27caae83cb530daaf49f9a38793e427cdf493a65 for details. This patch refactors the renderer-side WebChannelIPCTransport from a RenderViewObserver into a RenderFrameObserver, which prevents the segmentation fault since the RenderFrameObserver is not created for proxy frames. Most likely this would have to be done eventually anyway since the RenderView and RenderViewObserver classes are deprecated and will likely be removed as part of the Site Isolation project. Installation is changed to follow Chromium's RenderFrameImpl in the sense of performing the installation from RenderFrameObserver::DidClearWindowObject instead of ContentRendererClient::RunScriptsAtDocumentStart. This has the benefit of avoiding the ScriptForbiddenScope DCHECK. Additionally there are the following minor changes: - The deprecated parameterless version of v8::Value::ToObject() method is replaced with v8::Value::IsObject() check and v8::Local::Cast. - The deprecated v8::Handle typedef is replaced with v8::Local. - The deprecated single-parameter WebContentsObserver::OnMessageReceived is replaced with the new two-parameter version. - blink::MainThreadIsolate() is used instead of v8::Isolate::GetCurrent() for Install/Uninstall since we know we are executing on the main thread. - WebChannelIPCTransportHost is changed to ignore messages from unexpected renderers in case something goes wrong with the renderers. - Logging is added to WebChannelIPCTransportHost for debugging purposes. Some new unit tests are added, all of which fail with the old version. Task-number: QTBUG-66333 Change-Id: I936d142fb042d9f936a3f9d08d4328ecba595f1f Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix HTTP authenticationAllan Sandfeld Jensen2018-03-172-12/+11
| | | | | | | | | Render Frame ID is no longer reliable, so use web-contents getter to get web-contents. Task-number: QTBUG-66845 Change-Id: Ic42a3fcaea381118bfd498b7c4f7d7e30b0f5f51 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Basic adaptations for 64-basedAllan Sandfeld Jensen2018-03-151-1/+1
| | | | | Change-Id: I11e2da206e4e59872a38c178f57a5879c1bbf229 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Adaptations for Chromium 63Allan Sandfeld Jensen2018-01-252-12/+28
| | | | | Change-Id: I551c7091bbc0463bed94180313eb2bfe92f0ad84 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Merge branch '5.10' into devAllan Sandfeld Jensen2017-10-135-9/+4
|\ | | | | | | Change-Id: I3a411e4019a5ec2f7d1a967b62a00ad7cf92f6f4
| * Remove unused properties of ResourceDispatcherHostLoginDelegateQtv5.10.0-beta2Peter Varga2017-10-111-5/+0
| | | | | | | | | | Change-Id: I1e4108d0730bf73592bc9472e81e919fb14c5c6c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Merge remote-tracking branch 'origin/5.9' into 5.10Allan Sandfeld Jensen2017-09-294-4/+4
| |\ | | | | | | | | | Change-Id: I7094e85a7770303a2ae30baccbc484c04f33600e
| | * Add LICENSE.ChromiumKai Koehne2017-09-204-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The mentioned LICENSE file is not available; add it under the name LICENSE.Chromium. Task-number: QTBUG-60006 Change-Id: Ib2b3cb64467046c7ba1f53b0bbe14c3ec5a5291d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Add Setting to allow passing unknown URL schemes to QDesktopServicesViktor Engelmann2017-09-181-6/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A new enum UnknownUrlSchemePolicy was added to WebEngineSettings, QWebEngineSettings and QQuickWebEngineSettings. WebContentsDelegate now has a new attribute of that type, which can be read and written through the public APIs Q(Quick)WebEngineSettings::unknownUrlSchemeNavigationPolicy and Q(Quick)WebEngineSettings::setUnknownUrlSchemeNavigationPolicy. This way, one can control, whether URLs with unknown schemes are passed to QDesktopServices. WebContentsAdapterClient::navigationRequested is called on these requests, so this allows more fine-grained control over the schemes and origins, that are allowed. Task-number: QTBUG-58627 Change-Id: Ie81d9503456d63ea1ed5606483254acf437cd8f7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Allan Sandfeld Jensen2017-09-143-9/+11
|\| | | | | | | Change-Id: I0860a46b981c1f711bec45d7a495bcec2a80ee1f
| * Recreate state in renderer objects after RenderViewCreatedAllan Sandfeld Jensen2017-09-123-9/+12
| | | | | | | | | | | | | | | | | | | | This ensures the scripts and webchannel are added before RunScriptsAtDocumentStart is called. It also means we shouldn't add them later from the changed signal. Task-number: QTBUG-62898 Change-Id: Ib4cd3a69134d0eafc7f2ac4b7927a1c79b63bfa6 Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io>
* | Adaptations for Chromium 60Alexandru Croitor2017-09-111-17/+34
| | | | | | | | | | | | Change-Id: I536258e22c2ec143f2fd3f1cbda229e0611b6af4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Do not send empty WebChannelIPCTransportHost_SendMessageStephan Reiter2017-07-191-0/+1
| | | | | | | | | | | | Task-number: QTBUG-61969 Change-Id: I3367889041614a5e7489909dd38c8af638edf17c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Adaptations for Chromium 57Allan Sandfeld Jensen2017-06-141-3/+3
|/ | | | | Change-Id: Ia2756c1e9b13839c2330bd98cf953d47cbdac0dd Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Standardize override declarationAllan Sandfeld Jensen2017-04-213-5/+5
| | | | | | | | Update our overrides to Qt coding standard getting rid of Q_DECL_OVERRIDE and redundant virtual declarations. Change-Id: Id8b0750eb05c51fc8f50cac4000a811eebcbf918 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Adaptations for Chromium 56Allan Sandfeld Jensen2017-03-272-10/+11
| | | | | Change-Id: I78240d7956de4716757761fc6517f031b4adb822 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Simple adaptations to Chromium 55Allan Sandfeld Jensen2017-03-011-1/+1
| | | | | | | The simplest adaptations to API and build changes in Chromium 55 Change-Id: I923fa188690a04902492317807f72f006bcab9c6 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-10-061-1/+1
| | | | | | | | Conflicts: src/3rdparty src/webengine/api/qquickwebenginesettings.cpp Change-Id: Ie4abadb076c51d070cbb05f29b9ebcd9705933ad
* Cleanup directory structureAllan Sandfeld Jensen2016-09-2712-0/+1427
The src/core/renderer directory is meant to contain files that would be in the renderer process and the chrome/renderer subdirectory in chromium, but a few classes from the browser process and the renderer_host dir has snuck in. This patch cleans up the structure so that classes in the browser that serves as host classes for renderer classes goes in renderer_host. Change-Id: I9333b1322e2246d4da9b4e8cfe6be604f6d996bf Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>