Replace WebView.icon

Bug #1532903 reported by Chris Coulson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Oxide
Triaged
Medium
Unassigned

Bug Description

WebView.icon has a few limitations that can only really be resolved by offering a replacement to this API:

- It provides the remote URL of the icon, requiring the application to use Qt's network stack to download it. Applications need to be careful for icongnito webviews, as the icon download may leave a footprint on disk.
- It doesn't allow the application to support touch icons (<link rel="apple-touch-icon">)
- It doesn't allow the application to select an appropriate icon when there is more than one.

I propose we replace it with something like this:

class OxideQQuickWebView {
  QLIst<OxideQQuickFavicon> icons() const;
}

class OxideQQuickFavicon {
  enum Type {
    TypeIcon,
    TypeTouch,
    TypePrecomposedTouch
  }

  QUrl imageUrl() const;
  QUrl resourceUrl() const;
  Type type() const;
  QSizeF size() const;
}

imageUrl() will provide an image: URL that can be passed to Image elements, and Oxide will register an image provider that will handle the image download via Chromium's network stack.

The API should probably provide a way to create a QImage too, although that would need to asynchronous.

Changed in oxide:
status: New → Triaged
importance: Undecided → Medium
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.