[Webkit-unassigned] [Bug 29595] [Qt] Resetting the URL property of a QWebView results in the current directory being set as file::-type URL

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 21 13:20:26 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=29595


Benjamin Poulain <benjamin at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |benjamin at webkit.org




--- Comment #3 from Benjamin Poulain <benjamin at webkit.org>  2011-03-21 13:20:26 PST ---
So after some discussion, it sounds reasonable to change setUrl() so it does nothing if you pass a QUrl().
Does that sounds reasonable?

Here are the logs from IRC:

<benjaminp> hum, this whole setUrl() with empty url() is tricky...
<kling> aye, all because we wanted a 3rd state which has no webcore equivalent ;(
<benjaminp> yep
<benjaminp> if you setUrl(QUrl()), you expect url() to return QUrl()....
<benjaminp> but what the hell are we supposed to load... :)
<benjaminp> and load(QUrl()) does nothing I believe
<benjaminp> lol, and in the doc of the property: "By default, this property contains an empty, invalid URL." The "by default" meaning about:blank is loaded on WebCore side...
<benjaminp> kling: any opinion?
<benjaminp> I think loading about:blank is reasonable for setUrl(QUrl())
<benjaminp> just to keep the thing a bit consistent
<kling> benjaminp: I agree
<kling> benjaminp: and I like that better than having this "undefined" behavior
<kling> benjaminp: as long as it doesn't mess with history....
<kling> benjaminp: or... i don't know. maybe it should. what kind of usecase is setUrl(QUrl()) anyway.
<benjaminp> hum, yep, what to do about that...
<benjaminp> because if you go back in history, url() will return about:blank, not QUrl() :(
-*- kling has been trying to reboot into windows for an hour to play some distracting games :3
<kling> benjaminp: yeah exactly. we don't want that :(
<benjaminp> ok, let's take the other way around. What about setUrl(QUrl()) never succeed. And url() would never return QUrl() after the first load
<benjaminp> kling: do you have the qtport build around? I only have the macport here. Is the first page in the history?
<kling> benjaminp: lemme check
<benjaminp> I think its not (/me hope)
<kling> it's not
<benjaminp> ok, so that would not be too bad
<benjaminp> kling: what's your opinion about option (2)?
<kling> i like it
[...]
<aparna_> benjaminp - and what about the signals? I hope signals like loadFinished would not be emitted in this case?
<benjaminp> yep, that shouldn't be emitted
<benjaminp> we should bailout early
<kling> benjaminp: would you still set an empty document for QUrl()?
<benjaminp> nope
<benjaminp> just if (url.isEmpty()) return; That would be consistent with load, and we would not have to cheat the history
<kling> so there would be no way to get back to the original state of the view
<benjaminp> not sure what you mean
<kling> i mean the state where nothing is loaded in the view
<kling> you can never get back to it :)
<kling> the closest thing is loading about:blank
<benjaminp> oh, the initial state, I would jsut leave stuff as they are
<benjaminp> when you show an empty view, url() return QUrl(), about:blank is loaded, and you don't care because that is not in the history

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list