~mardy/webbrowser-app/add-onlineaccount-support-for-container2

Viewing all changes in revision 474.

  • Committer: Alberto Mardegan
  • Date: 2014-03-21 14:03:23 UTC
  • mfrom: (455.3.1 creation-mode)
  • Revision ID: alberto.mardegan@canonical.com-20140321140323-sx19gm9vy52t30so
Don't load the webview as soon as a webapp starts

The code in webapp-container.qml initially checks the value of its
"accountProvider" property and loads the webview if that's empty.
If this property is set after the component has been built, this will cause the
webview to be (accidentally) loaded for a fraction of a second, which in turn
will cause the WebProcess to be spawned. The WebProcess will read the
cookies.db file, and the same WebProcess instance will likely be reused for the
webapp, once we really want to use it. This has the unfortunate side-effect
that it will not re-read the cookies which we might have copied over from
Online Accounts in the meantime.

So, with this change we make sure that all properties (including
"accountProvider") will be set on the Window before the component is completed.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: