summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_delegate_qt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix "findNext" after having navigated to a new pageJocelyn Turcotte2014-05-281-0/+3
| | | | | | | | | | | | The findNext flag tells the frame to search starting from the current selection, but the code assumes that the flag won't be used when there isn't any find selection (like when the Frame changed). Make sure that we won't use that flag after we received a load committed signal. Change-Id: I10f0f84226232d150f19fd644d7afe78bc425f74 Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Add linkHovered signal to the QQuickWebEngineViewSzabolcs David2014-05-051-0/+7
| | | | | | | | I dropped hovered title support from the QtWebKit API, it seems we don't need that logic. Change-Id: I5617c295344512a35aa526a6f1307f0b21f866d6 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add WebRTC supportPierre Rossi2014-04-291-0/+6
| | | | | | | | | | | | | Reuse the MediaCaptureDevicesDispatcher from the chrome layer, pretty much as is, and wire it in with WebContentsDelegateQt and WebContentsAdapter/WebContentsAdapterClient for API delegation. We also need to ensure that our user agent string mentions Chrome and the Chrome version we're based on, in order to please websites that detect feature support that way. Change-Id: I0ddf8cd34e4add96bc36f59adfe8e0384e728d93 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Fix links not opening on Google+ and GmailJocelyn Turcotte2014-04-151-0/+24
| | | | | | | | | We missed a very important overload of WebContentsDelegate used by window.open to navigate new pages. The logic is mostly taken from chromium/content/shell/browser/shell.cc. Change-Id: Ib359edb61c1ee6eab89e2ebdc2aad2d944fea712 Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Fix how NewPopupDisposition is exposed in QQuickWebEngineViewJocelyn Turcotte2014-04-151-1/+1
| | | | | | | | | | | | | | | | | | I initially misintepreted the meaning of the enum, assuming that it meant that the window should possibly be blocked. The user_gesture parameter in WebContentsDelegate::AddNewContents is actually doing this, while the popup disposition means that JavaScript requested the window to be opened without one of the standard decoration (i.e. status bar, menu bar, tool bar, etc.). Update the QtQuick API to reflect this, renaming the "isPopup" parameter to a more familiar "isUserInitiated". The popup disposition is named "dialog" to match the previous QWebPage::WebModalDialog enum. Change-Id: Ib0c4bc53671fcf0dd9499aa1be2bbc8c494ba49e Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Map Javascript console message level to enum values.Michael BrĂ¼ning2014-04-141-1/+12
| | | | | | | | Translates the internally used LogSeverity values to enums defined by the QtWebEngine integration layer. Change-Id: I7da0983d4fb5c199e1a2436b5899a43cf6698784 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Get rid of the BackingStore rendering pathJocelyn Turcotte2014-04-081-1/+1
| | | | | | | | | Now that the widgets view is also using the delegated renderer, there are no supported configuration that use the BackingStore rendering path, itself on the way of deprecation in Chromium. Change-Id: I4ab889f6a7c65e8447c259faf2c7a98b88c1acf5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix iconChanged signal and add favIconLoad QML testSzabolcs David2014-04-011-3/+20
| | | | | | | | | | If WebContentsDelegateQt::DidUpdateFaviconURL was not called after a page load, we need to reset the favicon URL. We can use the navigation entries to store favicon related information. Change-Id: I7bcfbd46c176fabce319eba32c379a293f8ebba6 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Add the base qualifier where base::string16 is usedArvid Nilsson2014-04-011-2/+2
| | | | | | | | | Be explicit about this since the "using base::string16" statement will be going away eventually. Change-Id: I292928345eec746bea04e15a3f25e46193704463 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Adapt to API changes in new stable branch 1750Andras Becsi2014-03-281-2/+2
| | | | | | Change-Id: If0cc263f36d396fd505c1d8b026e2493bfc29cc4 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Fix a missing titleChanged signal on navigationJocelyn Turcotte2014-03-241-0/+2
| | | | | | | | | | | WebContentsView::SetPageTitle is only called when the Blink page updated its title. For navigations we have to listen for NavigationStateChanged. Also update the history test to check this case. Change-Id: Ia89c61b32913d647a63b2fb9a4cdf3f6867c4f0c Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Base load signals on Blink loader eventsJocelyn Turcotte2014-03-211-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | This mainly remove the use of the LoadingStateChanged callback, which is tied to DidStartLoading and DidStopLoading. Those signals are handled from the browser process side, also wrapping the time where the render process is initialized. We can't rely on those signals for loadStarted, but afterward rely on the Blink loader for loadFinished. We must use the same source for both. Instead only rely on Blink callbacks ultimately related to network events. This gives us a behavior closer to QtWebKit. The major compromise that this forces us to to accept is that loadStarted is now triggered asynchronously. This will basically break anything expecting loadStarted to be emitted synchronously from the load method. This also adjust autotests to get a few more passing. Initial-patch-by: Pierre Rossi <pierre.rossi@digia.com> Change-Id: Ib6c0170df891d1b7f8ed4dc1d483985523e267dc Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Implement QWebEnginePage::findTextJocelyn Turcotte2014-02-131-0/+9
| | | | | | | | | | | | | | | | | | | A few changes to the API: - Return the success result asynchronously. - FindWrapsAroundDocument and HighlightAllOccurrences are enabled by defaults and cannot be disabled. - Found text isn't updating the selection on the page like QtWebKit did, but triggers a separate state not available. A find count and current index could be exposed, but isn't in this case to keep the API delta lower. This also adds the possibility to pass bool results through the CallbackDirectory and add a new tst_QWebEnginePage::findTextResult test since the old test relied on the selection to be updated when the searched text is found. Change-Id: I8189b5aea8d832df183c6c1ae03e3f08198a9c45 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Implement requestFullscreen for QQuickWebEngineView.Zeno Albisser2014-02-111-0/+13
| | | | | | | | | | | | | | This patch adds a property isFullScreen and a signal fullScreenRequested to QQuickWebEngineViewExperimental. The signal fullScreenRequested is emitted when some web content requests fullscreen through the javascript API. The property isFullScreen is supposed to be set programmatically when the view is being shown fullscreen. This information is then available to the WebContentsDelegateQt when checking if the fullscreen request has been accepted. Change-Id: I04cbb45f263a188d26cc87d70ac53b0fbab63936 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* WebPage: Implement javaScriptConsoleMessagePierre Rossi2014-01-301-0/+7
| | | | | | | And unskip the corresponding autotest. Change-Id: Ida2dcee38b261b2ba4ad0c5c016f5510ed1590a4 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* JS dialogs in QtQuickPierre Rossi2014-01-151-0/+1
| | | | | | | | | | Refactor JavaScriptDialogManagerQt to support a Qt Quick dialogs friendly approach. Qt Quick dialogs are still missing a prompt, so we use a "handmade" one. This should be solved before 5.3 though. Change-Id: I965df66837b2e81d6e4618a8da1167a37661c26e Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* [Widgets] wire the file pickersPierre Rossi2014-01-151-0/+15
| | | | | | | | | | | | | | | Introduce a new version of chooseFiles in QWebEnginePage. The existing API in WebKit1 seemed a bit dusty in any case (multiple only supported via extensions). Changes are: * oldFile becomes oldFiles, so that we could at a later stage expose the already selected files in the "multiple" case. * a type is introduced, for now limited to multiple selection, but over time, we might consider additions such as directory upload. Change-Id: I14cfea64ce95e892a0a1877c8cb914c5a421409f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Implement QQuickWebEngineLoadRequest classAdam Kallai2014-01-151-1/+1
| | | | | | | | It contains information about a requested load of a web page. Change-Id: Ie45706adb51ee5bce98e7af01252d9a8389db57d Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Implement DidFailProvisionalLoad functionAdam Kallai2013-12-021-0/+6
| | | | | | | | | | | The WebContentObserver::DidFailLoad event doesn't handle all of the errors during the web content loading (eg. network errors). Thus WebContentObserver::DidFailProvisionalLoad should be binded on Qt side to handle these errors too. This event is handled by the WebContentsDelegateQt::DidFailLoad function now. Change-Id: I1421214dd94481a1e27cda8d35a35d418289b604 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Moving sources to src part 1: Move files.Jocelyn Turcotte2013-11-281-0/+126
This only move files without adjusting any paths. This moves: - lib/quick -> src/webengine/api (API files) lib/quick -> src/webengine (other files) This contains the main QtWebEngine module library since <ec7b2ee70a8b2db7fb87f50671a001ddd54697b0>. - lib/widgets -> src/webenginewidgets Also rename this directory to match its module name and rename Api to api. - lib -> src/core - process -> src/process - resources -> src/core/resources - tools/* -> tools/scripts/ The build directory is spread as follow: - build/build.pro -> src/core/gyp_run.pro - build/qmake_extras/* -> src/core/ (for the host and target .pro files) - build/qmake -> tools/qmake - Build related scripts -> tools/buildscripts Change-Id: I0cded1de772c99c0c1da6536c9afea353236b4a1 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>