Comment 0 for bug 1532903

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

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