1. May 08, 2014
  2. Apr 29, 2014
  3. Apr 15, 2014
  4. Apr 14, 2014
  5. Apr 08, 2014
  6. Mar 31, 2014
  7. Mar 21, 2014
    • Jocelyn Turcotte's avatar
      Base load signals on Blink loader events · f06cb10c
      Jocelyn Turcotte authored
      
      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: default avatarPierre Rossi <pierre.rossi@digia.com>
      Change-Id: Ib6c0170df891d1b7f8ed4dc1d483985523e267dc
      Reviewed-by: default avatarPierre Rossi <pierre.rossi@gmail.com>
      Reviewed-by: default avatarSimon Hausmann <simon.hausmann@digia.com>
      f06cb10c
  8. Feb 28, 2014
    • Jocelyn Turcotte's avatar
      Add HTTP and proxy authentication signals directly to QWebEnginePage · 970ccc7f
      Jocelyn Turcotte authored
      
      This allows handling calls that would be signaled by QNetworkAccessManager
      in QtWebKit.
      This pulls QtNetwork as a dependency of the QtWebEngineWidgets module
      to be able to use QAuthenticator, but isn't required otherwise.
      
      Only the request URL is available in the case of HTTP authentication
      (no access to HTTP request headers that the QNetworkReply would allow)
      and only the proxy host name in the case case of proxy authentication.
      
      This keeps the API synchronous the same way, as QtWebKit did, in
      favor of source compatibility at the cost of requiring a modal
      dialog, even though the implementation doesn't require it.
      
      Change-Id: I9e021def38e6107c9e66d2de8f86bd0328d543df
      Reviewed-by: default avatarMichael Bruning <michael.bruning@digia.com>
      970ccc7f
  9. Feb 21, 2014
  10. Feb 20, 2014
  11. Feb 13, 2014
    • Jocelyn Turcotte's avatar
      Implement QWebEnginePage::findText · 324706a5
      Jocelyn Turcotte authored
      
      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: default avatarSimon Hausmann <simon.hausmann@digia.com>
      324706a5
    • Jocelyn Turcotte's avatar
      Implement QWebEnginePage::selectedText · 9cf0007b
      Jocelyn Turcotte authored
      
      Change-Id: Idebde8da0befbea7ccc5942de1e09fcc61ce16d4
      Reviewed-by: default avatarSimon Hausmann <simon.hausmann@digia.com>
      9cf0007b
    • Jocelyn Turcotte's avatar
      Refactor the way callbacks are stored · 1f17c9b3
      Jocelyn Turcotte authored
      
      With the upcoming addition of a new type of callback result, this
      patch allows storing multiple callback types in the same QHash instead
      or requiring a different hash table just to please the type system.
      
      This does so by managing the ref-counted callback pointers directly
      instead of relying on a templated QExplicitlySharedDataPointer that
      requires a different type for each different callback pointer type.
      
      The ref-counting, construction and destruction is managed through
      a run-time type enum.
      
      Change-Id: I90ab2e1efc0c9703fc5b6ef57b38204ac8eea828
      Reviewed-by: default avatarSimon Hausmann <simon.hausmann@digia.com>
      1f17c9b3
    • Jocelyn Turcotte's avatar
      Move the requestID argument before the result · 71edccab
      Jocelyn Turcotte authored
      
      This tries to get the order of declaration to be consistent.
      It also follows the order used by Chromium in some places
      where the routing_id usually comes first, then the request_id
      and then the result of the asynchronous request.
      
      Change-Id: I88e164dee67e1631161a222f7dd7a4679c3d3acd
      Reviewed-by: default avatarSimon Hausmann <simon.hausmann@digia.com>
      71edccab
    • Jocelyn Turcotte's avatar
      Fix a warning in QWebEnginePage::setHtml · 0bb596fb
      Jocelyn Turcotte authored
      
      Change-Id: I87c18edb89658433d6dc3487ab92d2ff7bd6c986
      Reviewed-by: default avatarSimon Hausmann <simon.hausmann@digia.com>
      0bb596fb
  12. Feb 12, 2014
  13. Jan 30, 2014
  14. Jan 22, 2014
    • Jocelyn Turcotte's avatar
      Clear callbacks with an empty value on page destruction · 6fb392ee
      Jocelyn Turcotte authored
      
      The current implementation offers no way to cancel async requests.
      This means that normal applications could easily allow callbacks
      to dereference a destroyed object unless they use a smart pointer
      within the callback function object.
      
      This patch will empty the pending callback list by calling each of
      them with an empty value. This will at least allow applications to
      cover the cases where the page is expected to have a shorter or equal
      lifetime than objects referenced in the callback.
      
      Change-Id: Ia9fc556b03f5d83f904a0ff4b05dc9e440ea488c
      Reviewed-by: default avatarPierre Rossi <pierre.rossi@gmail.com>
      6fb392ee
    • Jocelyn Turcotte's avatar
      Implement QWebEnginePage::toHtml and toPlainText · 1fcd7970
      Jocelyn Turcotte authored
      
      Those methods are now made asynchronous and need to be given a
      callback to handle the result.
      
      Update the code in the browser and fancybrowser examples using
      std::bind when using C++11 or tr1::bind with C++03 (which should be
      available with compilers on platforms that we support).
      
      Add a (currently failing) earlyToHtml test to make sure that an empty
      page doesn't crash because of a possibly incomplete attachment of
      the QtRenderViewObserver.
      
      Change-Id: I3ab7cb6f25b91b584dd80df5e4e9ad1e3214348e
      Reviewed-by: default avatarPierre Rossi <pierre.rossi@gmail.com>
      1fcd7970
    • Jocelyn Turcotte's avatar
      Refactor the callback mechanism used by runJavaScript · 6d760436
      Jocelyn Turcotte authored
      
      This prepares the way for other API made async like toHtml and
      toPlainText.
      
      Use a callback class with an implicit templated constructor to carry
      the functor across the API boundary and avoid the intermediate helper
      method as the ABI that we have to maintain.
      
      Also pass the callback result through WebContentsAdapterClient using
      a bookkeeping ID instead of transferring the callback to
      WebContentsAdapter. This will allow other calls, which might not
      already allow passing a callback functor, to use a consisten way
      of carrying back the result to the top API layer.
      
      Change-Id: Ia923767b9c1021a108c26da17d4c41878ef7cb95
      Reviewed-by: default avatarPierre Rossi <pierre.rossi@gmail.com>
      6d760436
    • Jocelyn Turcotte's avatar
      Implement QWebEnginePage::setHtml and setContent · e6b846f3
      Jocelyn Turcotte authored
      
      Load a generated data: URL to carry the data.
      
      This is not as efficient as it could be but the behavior matches and
      this should be fine for now.
      
      Change-Id: I26ad2e5976025a3044fb03f066074ce6dd34e575
      Reviewed-by: default avatarPierre Rossi <pierre.rossi@gmail.com>
      e6b846f3
  15. Jan 17, 2014
  16. Jan 15, 2014
  17. Dec 04, 2013
    • Arvid Nilsson's avatar
      Quick: Add experimental.viewport.devicePixelRatio · 5d66b66d
      Arvid Nilsson authored
      
      This specifies a devicePixelRatio to be used by web content instead of
      the QScreen::devicePixelRatio(). This is necessary on non-iOS mobile
      devices to remain compatible with the mobile web which assumes
      devicePixelRatio is computed as the ratio of actual dpi to 160 dpi.
      Non-iOS mobile platforms may use different criteria to determine the
      QScreen::devicePixelRatio(), depending on the history of the platform,
      or simply leave it at 1.0.
      
      For QNX, this setting gets a reasonable default value so developers
      don't have to regularly use this experimental API.
      
      These changes were inspired by the Android Chromium port which uses a
      GetDpiScale() to accomplish the same in
      content/browser/android/content_view_core_impl.cc.
      
      Change-Id: I1bc8878a47dabcdb6986c4fe5c8c4ac230ae2514
      Reviewed-by: default avatarJocelyn Turcotte <jocelyn.turcotte@digia.com>
      5d66b66d
  18. Nov 28, 2013
    • Jocelyn Turcotte's avatar
      Moving sources to src part 1: Move files. · fd61d752
      Jocelyn Turcotte authored
      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
        <ec7b2ee7
      
      >.
      - 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: default avatarZeno Albisser <zeno.albisser@digia.com>
      Reviewed-by: default avatarPierre Rossi <pierre.rossi@gmail.com>
      Reviewed-by: default avatarAndras Becsi <andras.becsi@digia.com>
      fd61d752
  19. Nov 26, 2013
  20. Nov 15, 2013