Tidy up LoadEvent mess
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Oxide |
Fix Released
|
Medium
|
Chris Coulson | ||
1.3 |
Won't Fix
|
Medium
|
Chris Coulson | ||
1.4 |
Fix Released
|
Medium
|
Chris Coulson |
Bug Description
Currently if a load fails, the renderer loads an error page. When this happens, we get a sequence of load events that look like this:
type=started, url="http://
type=failed, url="http://
type=started, url="data:
type=committed, url="http://
type=succeeded, url="data:
It's easy to filter out those events with url=="data:
There's a few potential solutions for cleaning this up:
- We could add an "isErrorPage" property to LoadEvent, which would be true for all of the last 3 events. We can detect that the committed event is an error page by checking the page type on the currently committed navigation entry.
- Alternatively, we could disable loading of the (currently non-existent / empty, but I'd like to provide a default page eventually) error page on the renderer side. This would get rid of these events entirely. Do we know whether QtWebkit or WebkitGTK provide a default error page?
- Another option would be to keep the error page but filter out the events. I'm less keen on this though, as it means we do commit a navigation entry but without emitting the appropriate committed notification.
Changed in oxide: | |
importance: | Undecided → Medium |
status: | New → Triaged |
milestone: | none → branch-1.5 |
assignee: | nobody → Chris Coulson (chrisccoulson) |
Changed in oxide: | |
status: | Triaged → In Progress |
Changed in oxide: | |
status: | In Progress → Fix Released |
I guess either of the first two options would work.
I don’t know about WebKitGTK, but I just tested QtWebKit and it doesn’t provide a default error page (nor does it provide a way for applications to set one). When loading e.g. "http:// invalid/" with QtWebKit, we get two load events: load started, and then load failed.
Whenever we implement a default error page, it would be good to expose an API to allow applications to override it.