Bug 125775 - [GTK] Implement sizes attribute for link tag
Summary: [GTK] Implement sizes attribute for link tag
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 37674 138411
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-16 05:27 PST by William Jon McCann
Modified: 2014-12-11 02:31 PST (History)
6 users (show)

See Also:


Attachments
Patch (5.18 KB, patch)
2014-11-05 02:01 PST, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Rebased patch (5.18 KB, patch)
2014-11-12 04:41 PST, Carlos Garcia Campos
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description William Jon McCann 2013-12-16 05:27:55 PST
Bug #37674 implemented sizes attribute support for the link tag, but only for javascript:
+#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
+        attribute [Custom] DOMSettableTokenList sizes;
+#endif

This is really useful because it is pretty common these days to have something like this:
  <link rel="apple-touch-icon-precomposed" href="images/icons/54.png">
  <link rel="apple-touch-icon-precomposed" sizes="72x72"
href="images/icons/72.png">
  <link rel="apple-touch-icon-precomposed" sizes="114x114"
href="images/icons/114.png">
  <link rel="apple-touch-icon-precomposed" sizes="144x144"
href="images/icons/144.png">

So, it would be really useful to have this available from C as well.
Comment 1 Carlos Garcia Campos 2014-11-05 02:01:24 PST
Created attachment 241014 [details]
Patch
Comment 2 Carlos Garcia Campos 2014-11-05 02:02:58 PST
This depends on bug #138411, that added the support for custom unstable API.
Comment 3 Carlos Garcia Campos 2014-11-12 04:41:10 PST
Created attachment 241421 [details]
Rebased patch

It should apply now
Comment 4 Martin Robinson 2014-12-08 06:57:54 PST
Comment on attachment 241421 [details]
Rebased patch

View in context: https://bugs.webkit.org/attachment.cgi?id=241421&action=review

> Source/WebCore/bindings/js/JSHTMLLinkElementCustom.cpp:-43
> -JSValue JSHTMLLinkElement::sizes(ExecState* exec) const
> -{
> -    return toJS(exec, globalObject(), impl().sizes());
> -}
> -

Why are you removing the custom getter?
Comment 5 Carlos Garcia Campos 2014-12-08 07:00:07 PST
(In reply to comment #4)
> Comment on attachment 241421 [details]
> Rebased patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=241421&action=review
> 
> > Source/WebCore/bindings/js/JSHTMLLinkElementCustom.cpp:-43
> > -JSValue JSHTMLLinkElement::sizes(ExecState* exec) const
> > -{
> > -    return toJS(exec, globalObject(), impl().sizes());
> > -}
> > -
> 
> Why are you removing the custom getter?

Because it's not needed. See https://bugs.webkit.org/show_bug.cgi?id=37674#c30
Comment 6 Carlos Garcia Campos 2014-12-08 07:01:08 PST
(In reply to comment #5)
> (In reply to comment #4)
> > Comment on attachment 241421 [details]
> > Rebased patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=241421&action=review
> > 
> > > Source/WebCore/bindings/js/JSHTMLLinkElementCustom.cpp:-43
> > > -JSValue JSHTMLLinkElement::sizes(ExecState* exec) const
> > > -{
> > > -    return toJS(exec, globalObject(), impl().sizes());
> > > -}
> > > -
> > 
> > Why are you removing the custom getter?
> 
> Because it's not needed. See
> https://bugs.webkit.org/show_bug.cgi?id=37674#c30

Note that I also changed the idl, so that the getter is auto-generated, so it's not that I've removed it, but that now it's auto-generated.
Comment 7 Martin Robinson 2014-12-08 07:10:01 PST
Comment on attachment 241421 [details]
Rebased patch

View in context: https://bugs.webkit.org/attachment.cgi?id=241421&action=review

>>>> Source/WebCore/bindings/js/JSHTMLLinkElementCustom.cpp:-43
>>>> -
>>> 
>>> Why are you removing the custom getter?
>> 
>> Because it's not needed. See https://bugs.webkit.org/show_bug.cgi?id=37674#c30
> 
> Note that I also changed the idl, so that the getter is auto-generated, so it's not that I've removed it, but that now it's auto-generated.

Thanks for the information. Do you mind leaving a short note about this in the ChangeLog?
Comment 8 Carlos Garcia Campos 2014-12-08 07:19:16 PST
(In reply to comment #7)
> Comment on attachment 241421 [details]
> Rebased patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=241421&action=review
> 
> >>>> Source/WebCore/bindings/js/JSHTMLLinkElementCustom.cpp:-43
> >>>> -
> >>> 
> >>> Why are you removing the custom getter?
> >> 
> >> Because it's not needed. See https://bugs.webkit.org/show_bug.cgi?id=37674#c30
> > 
> > Note that I also changed the idl, so that the getter is auto-generated, so it's not that I've removed it, but that now it's auto-generated.
> 
> Thanks for the information. Do you mind leaving a short note about this in
> the ChangeLog?

Sure, thanks!
Comment 9 Carlos Garcia Campos 2014-12-11 02:31:03 PST
Committed r177143: <http://trac.webkit.org/changeset/177143>