Re: [webkit-dev] Implementing the sizes attribute of the link tag from HTML5
On Mon, Apr 19, 2010 at 5:53 PM, Peter Kasting pkast...@google.com wrote: On Thu, Apr 15, 2010 at 3:41 PM, Aaron Boodman a...@chromium.org wrote: I'm not sure what the path is for fetching favicons today. Does WebCore just implicitly do it, or does it expose the information to the host, who later may or may not make the request? Answering this is complicated by the fact that Chromium mostly uses a different codepath for all of this stuff than, say, Safari -- e.g. it bypasses the IconDatabase and pretty much all other classes/files called IconXXX entirely. Yeah, I looked into this over the weekend, and -- shock! -- it turned out to be a bigger change than I initially imagined. Since Chromium has a different backend, that would mean implementing two sets of changes. Also, I think it would be wasteful to have WebKit download all linked icons, even if the hosting browser has no intention of every using some of them. So I'd want to add code to allow the browser to tell WebKit which sizes it is interested in. I still want to do this, but I'm going to have to reduce the priority a little bit for now. I may come back to it in a month or so. - a ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Implementing the sizes attribute of the link tag from HTML5
On Apr 19, 2010, at 11:58 PM, Aaron Boodman wrote: On Mon, Apr 19, 2010 at 5:53 PM, Peter Kasting pkast...@google.com wrote: On Thu, Apr 15, 2010 at 3:41 PM, Aaron Boodman a...@chromium.org wrote: I'm not sure what the path is for fetching favicons today. Does WebCore just implicitly do it, or does it expose the information to the host, who later may or may not make the request? Answering this is complicated by the fact that Chromium mostly uses a different codepath for all of this stuff than, say, Safari -- e.g. it bypasses the IconDatabase and pretty much all other classes/files called IconXXX entirely. Yeah, I looked into this over the weekend, and -- shock! -- it turned out to be a bigger change than I initially imagined. Since Chromium has a different backend, that would mean implementing two sets of changes. Also, I think it would be wasteful to have WebKit download all linked icons, even if the hosting browser has no intention of every using some of them. So I'd want to add code to allow the browser to tell WebKit which sizes it is interested in. I still want to do this, but I'm going to have to reduce the priority a little bit for now. I may come back to it in a month or so. You'd probably want an API that lets the embedding app request a particular icon size, and picks the best fit from the icon links available, taking into account size=any as well. Possible niceties - return windows-style .ico or mac-style .icns either if explicitly specified, or synthesized from available sizes. Not sure if there is a conventional multisize icon format on other platforms. Regards, Maciej ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Implementing the sizes attribute of the link tag from HTML5
Hi, Darin Adler wrote: On Apr 15, 2010, at 3:41 PM, Aaron Boodman wrote: On Thu, Apr 15, 2010 at 3:25 PM, Maciej Stachowiak m...@apple.com wrote: Well, it's hard to truly have consensus on adding feature without knowing what it is. That being said, I at least would love to see a more specific proposal for what we could do with link size. I want to support bigger icons for the tabs in Chromium. I'm not sure what the path is for fetching favicons today. To load an icon you call retainIconForPageURL and then later call iconForPageURL once the icon is loaded. The iconForPageURL function takes an IntSize. But if you look at IconRecord.cpp you will see that at the moment the size isn’t yet used. Indeed. The method can return a BitmapImage instance, which may contain several bitmaps of different size. In the Haiku port, I've temporarily made some useful BitmapImage methods public, to iterate over all images contained in the object and find the one with the size I want (in the browser code later on). Is there a better way to do this? How do other browser projects handle this? Would a patch to make some BitmapImage methods public have good chances of being accepted or is there another vision? Best regards, -Stephan ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Implementing the sizes attribute of the link tag from HTML5
On Tue, Apr 20, 2010 at 10:48 AM, Stephan Assmus supersti...@gmx.de wrote: In the Haiku port, I've temporarily made some useful BitmapImage methods public, to iterate over all images contained in the object and find the one with the size I want (in the browser code later on). Is there a better way to do this? How do other browser projects handle this? Would a patch to make some BitmapImage methods public have good chances of being accepted or is there another vision? In Chromium, we use ImageSource instead of BitmapImage for this, because ImageSource already has public functions for everything you want (e.g. frameCount(), frameSizeAtIndex(), etc.), and thus no changes are needed. When we have some data blob that represents the favicon and we need to pick a good image (size) out of it, we just instantiate an ImageSource directly. Take a look at WebImage::fromData() in http://trac.webkit.org/browser/trunk/WebKit/chromium/src/WebImageSkia.cpp . PK ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Implementing the sizes attribute of the link tag from HTML5
On Apr 15, 2010, at 3:41 PM, Aaron Boodman wrote: On Thu, Apr 15, 2010 at 3:25 PM, Maciej Stachowiak m...@apple.com wrote: Well, it's hard to truly have consensus on adding feature without knowing what it is. That being said, I at least would love to see a more specific proposal for what we could do with link size. I want to support bigger icons for the tabs in Chromium. I'm not sure what the path is for fetching favicons today. To load an icon you call retainIconForPageURL and then later call iconForPageURL once the icon is loaded. The iconForPageURL function takes an IntSize. But if you look at IconRecord.cpp you will see that at the moment the size isn’t yet used. -- Darin ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Implementing the sizes attribute of the link tag from HTML5
On Thu, Apr 15, 2010 at 3:41 PM, Aaron Boodman a...@chromium.org wrote: I'm not sure what the path is for fetching favicons today. Does WebCore just implicitly do it, or does it expose the information to the host, who later may or may not make the request? Answering this is complicated by the fact that Chromium mostly uses a different codepath for all of this stuff than, say, Safari -- e.g. it bypasses the IconDatabase and pretty much all other classes/files called IconXXX entirely. PK ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Implementing the sizes attribute of the link tag from HTML5
Do it. :DG On Thu, Apr 15, 2010 at 2:22 PM, Aaron Boodman a...@chromium.org wrote: I would like to do it. See bug: https://bugs.webkit.org/show_bug.cgi?id=37674 Thoughts? - a ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Implementing the sizes attribute of the link tag from HTML5
On Apr 15, 2010, at 2:22 PM, Aaron Boodman wrote: I would like to do it. See bug: https://bugs.webkit.org/show_bug.cgi?id=37674 Thoughts? Seems like a good idea in general. More specifically, what would the implementation do? The bug explains the syntax, but not how it would affect WebKit's behavior. (It would be fine, perhaps preferable, to put that info in the bug). Regards, Maciej ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Implementing the sizes attribute of the link tag from HTML5
On Thu, Apr 15, 2010 at 3:09 PM, Maciej Stachowiak m...@apple.com wrote: On Apr 15, 2010, at 2:22 PM, Aaron Boodman wrote: I would like to do it. See bug: https://bugs.webkit.org/show_bug.cgi?id=37674 Thoughts? Seems like a good idea in general. More specifically, what would the implementation do? The bug explains the syntax, but not how it would affect WebKit's behavior. (It would be fine, perhaps preferable, to put that info in the bug). I'm not sure. I haven't looked at the existing implementation at all. I wanted to make sure there was general consensus before diving in. Once I have a proposed plan of attack, I will put it in the bug. - a ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Implementing the sizes attribute of the link tag from HTML5
On Apr 15, 2010, at 3:14 PM, Aaron Boodman wrote: On Thu, Apr 15, 2010 at 3:09 PM, Maciej Stachowiak m...@apple.com wrote: On Apr 15, 2010, at 2:22 PM, Aaron Boodman wrote: I would like to do it. See bug: https://bugs.webkit.org/show_bug.cgi?id=37674 Thoughts? Seems like a good idea in general. More specifically, what would the implementation do? The bug explains the syntax, but not how it would affect WebKit's behavior. (It would be fine, perhaps preferable, to put that info in the bug). I'm not sure. I haven't looked at the existing implementation at all. I wanted to make sure there was general consensus before diving in. Once I have a proposed plan of attack, I will put it in the bug. Well, it's hard to truly have consensus on adding feature without knowing what it is. That being said, I at least would love to see a more specific proposal for what we could do with link size. Regards, Maciej ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Implementing the sizes attribute of the link tag from HTML5
On Thu, Apr 15, 2010 at 3:25 PM, Maciej Stachowiak m...@apple.com wrote: Well, it's hard to truly have consensus on adding feature without knowing what it is. That being said, I at least would love to see a more specific proposal for what we could do with link size. I want to support bigger icons for the tabs in Chromium. I'm not sure what the path is for fetching favicons today. Does WebCore just implicitly do it, or does it expose the information to the host, who later may or may not make the request? I would like Chromium to be able to decide which icon to use from the list on a per-document basis, so if WebCore currently assumes that any favicon present should be loaded (or if that is configuration that is set at a pretty high level), I would want to change that as well. - a ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev