Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intent to unship: CSSStyleDeclaration.getPropertyCSSValue

152 views
Skip to first unread message

Emilio Cobos Álvarez

unread,
Mar 23, 2018, 3:45:27 PM3/23/18
to dev-pl...@lists.mozilla.org
Hi,

Bug 1408301 tracks unshipping CSSStyleDeclaration.getPropertyCSSValue.

This is a non-standard API only implemented by Mozilla, and that
generally can be replaced by usage of the standard .getPropertyValue.

We added a use counter and deprecation warning in bug 474655. The data
seems to indicate the usage is low, so I'm trying to remove this API on
Nightly only to see if there's any breakage in bug 1448415, tentatively
under the pref layout.css.getPropertyCSSValue.enabled.

Let me know if there's any concern with doing this, and please file bugs
blocking either bug 1448415 or bug 1408301 if you see something broken
because of this.

Thanks!

-- Emilio

Jonathan Watt

unread,
Mar 23, 2018, 6:50:28 PM3/23/18
to Emilio Cobos Álvarez
On 23/03/2018 18:23, Emilio Cobos Álvarez wrote:
> Bug 1408301 tracks unshipping CSSStyleDeclaration.getPropertyCSSValue.
>
> This is a non-standard API only implemented by Mozilla

It was removed from Blink[1] after they forked, but it's actually still
implemented in Webkit it seems. Hopefully we shouldn't have too many problems
removing it though.

Jonathan

1. https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/3VmxWFzcyJc

L. David Baron

unread,
Mar 26, 2018, 9:16:57 AM3/26/18
to Emilio Cobos Álvarez, dev-pl...@lists.mozilla.org
On Friday 2018-03-23 19:23 +0100, Emilio Cobos Álvarez wrote:
> Bug 1408301 tracks unshipping CSSStyleDeclaration.getPropertyCSSValue.
>
> This is a non-standard API only implemented by Mozilla, and that
> generally can be replaced by usage of the standard .getPropertyValue.

I should clarify that it isn't actually non-standard: it was part
of DOM Level 2:
https://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration
but ended up never being widely implemented. It's not a
particularly nice API, nor was it specified in a way that could lead
to interoperability, and its replacement is intended to be
https://drafts.css-houdini.org/css-typed-om/ .

I'm still in favor of removing it.

-David

--
𝄞 L. David Baron http://dbaron.org/ 𝄂
𝄢 Mozilla https://www.mozilla.org/ 𝄂
Before I built a wall I'd ask to know
What I was walling in or walling out,
And to whom I was like to give offense.
- Robert Frost, Mending Wall (1914)
signature.asc

Emilio Cobos Álvarez

unread,
Mar 26, 2018, 9:16:57 AM3/26/18
to Jonathan Watt, dev-pl...@lists.mozilla.org
On 03/23/2018 11:50 PM, Jonathan Watt wrote:
> On 23/03/2018 18:23, Emilio Cobos Álvarez wrote:
>> Bug 1408301 tracks unshipping CSSStyleDeclaration.getPropertyCSSValue.
>>
>> This is a non-standard API only implemented by Mozilla
>
> It was removed from Blink[1] after they forked, but it's actually still
> implemented in Webkit it seems. Hopefully we shouldn't have too many problems
> removing it though.

Hmm, I should trust less our code comments[1], I guess the "sort of" is
key. :P

Looks like WebKit does indeed implement it, also on specified values (we
only expose it on the computed style declaration). But yeah, given
neither Blink or Edge implement it, and that what we implement is widely
different than what WebKit implements (that Blink thread is a good
summary) sounds unlikely that it cause compat pain.

[1]:
https://searchfox.org/mozilla-central/rev/56274d0a016a6833e5da7770ce70580b6f5abb21/dom/webidl/CSSStyleDeclaration.webidl#22

>
> Jonathan
>
> 1. https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/3VmxWFzcyJc
>

Anne van Kesteren

unread,
Mar 27, 2018, 4:38:53 PM3/27/18
to L. David Baron, dev-pl...@lists.mozilla.org, Emilio Cobos Álvarez
On Fri, Mar 23, 2018 at 9:16 PM, L. David Baron <dba...@dbaron.org> wrote:
> I should clarify that it isn't actually non-standard: it was part
> of DOM Level 2:
> https://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration
> but ended up never being widely implemented. It's not a
> particularly nice API, nor was it specified in a way that could lead
> to interoperability, and its replacement is intended to be
> https://drafts.css-houdini.org/css-typed-om/ .
>
> I'm still in favor of removing it.

FWIW, note https://lists.w3.org/Archives/Public/www-style/2003Oct/0347.html
and https://www.w3.org/TR/2011/WD-cssom-20110712/#history which aimed
to replace the document you reference. Maybe not quite non-standard,
but definitely some flavor of obsolete.


--
https://annevankesteren.nl/

Emilio Cobos Álvarez

unread,
May 12, 2018, 5:31:02 AM5/12/18
to dev-pl...@lists.mozilla.org
Following up on this, no breakage whatsoever was reported, so I removed
the pref and the API from the tree in bug 1408301.

Thanks,

-- Emilio

On 3/23/18 7:23 PM, Emilio Cobos Álvarez wrote:
> Hi,
>
> Bug 1408301 tracks unshipping CSSStyleDeclaration.getPropertyCSSValue.
>
> This is a non-standard API only implemented by Mozilla, and that
> generally can be replaced by usage of the standard .getPropertyValue.
>
> We added a use counter and deprecation warning in bug 474655. The data
> seems to indicate the usage is low, so I'm trying to remove this API on
> Nightly only to see if there's any breakage in bug 1448415, tentatively
> under the pref layout.css.getPropertyCSSValue.enabled.
>
> Let me know if there's any concern with doing this, and please file bugs
> blocking either bug 1448415 or bug 1408301 if you see something broken
> because of this.
>
> Thanks!
>
> -- Emilio
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>

Xidorn Quan

unread,
May 12, 2018, 7:04:11 AM5/12/18
to dev-pl...@lists.mozilla.org
Given that you are unshipping this... probably we should uplift a pref switch to beta to make it unship in 61 directly, and then remove in 62. I think that's probably safer than not unshipping it in 61 but removing directly in 62.

- Xidorn

Emilio Cobos Álvarez

unread,
May 12, 2018, 7:19:38 AM5/12/18
to dev-pl...@lists.mozilla.org
Hmm, so my reasoning is that this had already been unshipped during 61
Nightly so that gave us two nightlies + one beta cycle. But unshipping
it in 61 entirely is probably better indeed.

Filed bug 1461092.

-- Emilio

L. David Baron

unread,
May 12, 2018, 3:27:00 PM5/12/18
to Emilio Cobos Álvarez, dev-pl...@lists.mozilla.org
It seems risky to remove the code (and then have the risk of doing
things that depend on the code being gone) until we've actually
shipped the pref-flip that turns the API off to release. (Or am I
misunderstanding, and that's already happened?) Until we've safely
shipped it to release, we can't really be sure we won't have to
change our minds.

-David
signature.asc

Emilio Cobos Álvarez

unread,
May 12, 2018, 4:02:21 PM5/12/18
to L. David Baron, dev-pl...@lists.mozilla.org
On 5/12/18 9:26 PM, L. David Baron wrote:
> It seems risky to remove the code (and then have the risk of doing
> things that depend on the code being gone) until we've actually
> shipped the pref-flip that turns the API off to release. (Or am I
> misunderstanding, and that's already happened?) Until we've safely
> shipped it to release, we can't really be sure we won't have to
> change our minds.

So, the code for the API isn't gone yet. Indeed getPropertyValue is
still backed by what used to be getPropertyCSSValue (see
nsComputedDOMStyle::GetPropertyCSSValueWithoutWarning).

I plan to change the getComputedStyle back-end in bug 1408300 to use the
Rust code, and unexpose (and remove cycle-collection bits from) related
interfaces in bug 1459871.

With that, I planned to keep the related code around for a bit until
it's unshipped from release, then remove all the CSSValue related code
and similar bits.

Does that seem like a reasonable path forward?

Thanks!

-- Emilio
0 new messages