[webkit-dev] Deprecation of CSSStyleDeclaration -> getPropertyShorthand method.
Pavel Feldman
pfeldman at chromium.org
Mon May 21 13:29:33 PDT 2012
On Tue, May 22, 2012 at 12:17 AM, David Hyatt <hyatt at apple.com> wrote:
> Yup, no reason for it to be exposed any more. It was just needed way back
> when the Inspector used JS.
>
> dave
> (hyatt at apple.com)
>
> On May 21, 2012, at 2:39 PM, Alexis Menard wrote:
>
> > On Mon, May 21, 2012 at 4:29 PM, Maciej Stachowiak <mjs at apple.com>
> wrote:
> >>
> >> On May 21, 2012, at 11:09 AM, Alexis Menard <
> alexis.menard at openbossa.org> wrote:
> >>
> >>> Hi,
> >>>
> >>> Let's try the new deprecation process documented as
> >>> http://trac.webkit.org/wiki/DeprecatingFeatures.
> >>>
> >>> I would like to propose the deprecation and removal of
> >>> getPropertyShorthand of CSSStyleDeclaration.
> >>>
> >>> State of art :
> >>> - This method is exposed to the Web.
> >>> - Its purpose is to get whether a given CSS property was set from
> >>> within a shorthand (i.e.
> >>> shouldBeEqualToString("test0.style.getPropertyShorthand('overflow-x')",
> >>> "overflow"); is true if the CSS code is setting the overflow and not
> >>> overflow-x).
> >>> - It is used in 4 layout tests (fast/inspector-support/style.html,
> >>> fast/css/font-shorthand.html, fast/css/overflow-property.html,
> >>> fast/backgrounds/repeat/resources/background-repeat-shorthand.js)
> >>> - It is exposed in the Objective C API.
> >>> - It is not implemented by any other vendors (Opera, Firefox, Internet
> >>> Explorer).
> >>> - There is no specification about it.
> >>> - It was added in 2005 http://trac.webkit.org/changeset/11481.
> >>
> >> [...]
> >>
> >>> This function was added by Dave Hyatt and reviewed by Maciej
> >>> Stachowiak, maybe you guys can tell us why you added it back then (if
> >>> your memory is very good as we are talking about 2005 material)?
> >>
> >> I don't know of any reason for this to exist other than for benefit of
> the inspector. It appears to no longer be used by the Web Inspector,
> thought it has its own function with the same name (assuming I am reading
> the code right). It would be fine to stop exposing it to the web if it is
> in fact unused or hardly used.
> >
> > I was looking at the code of the inspector and also assuming I'm
> > reading the code right it is not used.
> >
> > The C++ method getPropertyShorthand seems to be used in
> > InspectorStyleSheet.cpp which then is used in
> > inspector/front-end/CSSStyleModel.js and its usage seems to be
> > confined in styleTextWithShorthands which is not used anywhere (at at
> > least grep says so).
> >
>
styleTextWithShorthands looks like dead code, I'll remove it shortly. But
there also is a valid usage at
http://trac.webkit.org/browser/trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp#L543.
Now that we are based on the CSS source code model, it can probably go
away, but it is not a trivial task.
Regards
Pavel
> > But Pavel and Vsevolod can confirm that.
> >
> >>
> >> - Maciej
> >>
> >
> >
> >
> > --
> > Alexis Menard (darktears)
> > Software Engineer
> > openBossa @ INdT - Instituto Nokia de Tecnologia
> > _______________________________________________
> > webkit-dev mailing list
> > webkit-dev at lists.webkit.org
> > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120522/db1e5d2d/attachment.html>
More information about the webkit-dev
mailing list