Bug 84934 - Webview Element resets the url property
Summary: Webview Element resets the url property
Status: RESOLVED DUPLICATE of bug 77554
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-26 01:13 PDT by Alan Alpert
Modified: 2012-04-26 03:48 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Alpert 2012-04-26 01:13:33 PDT
QML properties should always behave like simple values from the QML 
perspective. This isn't to say that setting them can't have side-effects, but 
when you explicitly set a property in QML it should change immediately (if it 
was not already set to that value) and it should remain set to that value 
until you explicitly unset or reset it (in this context, setting a binding 
counts as an explicit setting and binding reevaluations would thus also count 
as explicit settings). The url property of webview gets reset when webpage JS
redirects you, this is contrary to QML conventions. Upon setting the URL property to 
something different the urlChanged signal should fire once immediately and only once
until you set it again.

I'm going to hazard a guess that the url property behaves like this because it 
is trying to be both the desired and actual URL. These should be separate 
properties, the url property could be the requested URL, which changes the 
URL loaded when set, and there should be a separate read-only property for 
loadedUrl, which may take some time to change after setting the url property. 
It might then change a lot due to all the random redirections webpages have 
these days.
Comment 1 Simon Hausmann 2012-04-26 03:48:38 PDT
The last fix of bug #77554 covers exactly this issue, making sure that after setting the url property in QML it is changed _immediately_.

*** This bug has been marked as a duplicate of bug 77554 ***