Re: Intent to unprefix: ::-moz-selection.
In the CSSWG April F2F in Berlin this was extensively discussed and the CSSWG allowed / recommended us to unprefix this despite changing the spec. Just landed the change unprefixing this on inbound, let me know if you see something broken because of it. Thanks! -- Emilio On 3/26/18 9:16 AM, Emilio Cobos Álvarez wrote: Hi, In bug 509958 I intend to unprefix the ::-moz-selection pseudo-element. The situation here is not great wrt the spec saying what we do, or what other implementations do for that matter, see [1]. However other engines have shipped this unprefixed for a long time with the same semantics that we implement, and we're seeing webcompat problems due to people forgetting to include ::-moz-selection in their style sheets, see bug 1427680 or bug 1448670 for some examples. Given I don't think other engines have any incentive to implement what the spec says (given it's slower, and has the chance of giving them webcompat headache), and that we're compatible with them, I proposed to adapt the spec to reality in that spec issue, and unprefix our pseudo-element. Let me know if there's any concerns with this plan. Thanks! -- Emilio [1]: https://github.com/w3c/csswg-drafts/issues/2474 ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Intent to unprefix: ::-moz-selection.
Sorry for not following up on this earlier, Ehsan, somehow this slipped through my inbox. On 4/6/18 1:26 AM, Ehsan Akhgari wrote: ::-moz-selection seems like a fairly popular feature. PublicWWW claims it's seen on a million sites: https://publicwww.com/websites/%22%3A%3A-moz-selection%22/ After this change, is it feasible to detect the usage of the prefixed pseudo-element so that existing code that uses ::-moz-selection would emit a helpful console warning? It would be nice to have a way to communicate to web developers that they can now remove the Gecko specific rules. It is feasible, but it's not clear to me how worth it is to land this now. In particular, we're going to keep parsing ::-moz-selection for now as an alias, since as you mentioned it's a fairly popular feature, and people won't be able to remove it for a while if they want to support ESR and similar. If we decide to remove the prefixed version, developers would get a in the console automatically if they have the CSS error filter enabled that would look like: Unknown pseudo-class or pseudo-element ‘-moz-selection’. Ruleset ignored due to bad selector. Which should be enough to hint them that they can remove it. -- Emilio On Mon, Mar 26, 2018 at 9:21 AM Emilio Cobos Álvarezwrote: Hi, In bug 509958 I intend to unprefix the ::-moz-selection pseudo-element. The situation here is not great wrt the spec saying what we do, or what other implementations do for that matter, see [1]. However other engines have shipped this unprefixed for a long time with the same semantics that we implement, and we're seeing webcompat problems due to people forgetting to include ::-moz-selection in their style sheets, see bug 1427680 or bug 1448670 for some examples. Given I don't think other engines have any incentive to implement what the spec says (given it's slower, and has the chance of giving them webcompat headache), and that we're compatible with them, I proposed to adapt the spec to reality in that spec issue, and unprefix our pseudo-element. Let me know if there's any concerns with this plan. Thanks! -- Emilio [1]: https://github.com/w3c/csswg-drafts/issues/2474 ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Intent to unprefix: ::-moz-selection.
On 03/28/2018 12:09 AM, twisniew...@mozilla.com wrote: > On Tuesday, March 27, 2018 at 4:38:56 PM UTC-4, Emilio Cobos Álvarez wrote: >> That looks like an easy fix though, I'll ensure it gets fixed before >> landing. Filed bug 1449010. > > If it helps, I had a patchset for this in bug 292563, but ran into an odd > reftest failure that I never had time to figure out. Ah, I see, interesting! I used negative reftests (!=) to test this, instead of just trying to overlay the image, which looks a little bit more fragile. Given my patch just landed, I'll dupe that bug. Thanks! -- Emilio > ___ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Intent to unprefix: ::-moz-selection.
On Tuesday, March 27, 2018 at 4:38:56 PM UTC-4, Emilio Cobos Álvarez wrote: > That looks like an easy fix though, I'll ensure it gets fixed before > landing. Filed bug 1449010. If it helps, I had a patchset for this in bug 292563, but ran into an odd reftest failure that I never had time to figure out. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Intent to unprefix: ::-moz-selection.
On 3/26/18 4:13 PM, Boris Zbarsky wrote: On 3/26/18 3:16 AM, Emilio Cobos Álvarez wrote: However other engines have shipped this unprefixed for a long time with the same semantics that we implement https://bugzilla.mozilla.org/show_bug.cgi?id=509958#c14 claims the semantics are not actually quite the same. Have we done some testing here? Including on Edge? So, when I went through the bug I didn't know at all what that comment was about (and the account that posted it was gone so couldn't ask), but it seems we don't respect the ::selection background when selecting images. That looks like an easy fix though, I'll ensure it gets fixed before landing. Filed bug 1449010. It would be best to just have matching semantics, instead of unprefixing with slightly different behavior. Haven't tested Edge (because I don't have it locally), but will make sure that gets done before landing that patch. -- Emilio -Boris ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Intent to unprefix: ::-moz-selection.
On 3/26/18 3:16 AM, Emilio Cobos Álvarez wrote: However other engines have shipped this unprefixed for a long time with the same semantics that we implement https://bugzilla.mozilla.org/show_bug.cgi?id=509958#c14 claims the semantics are not actually quite the same. Have we done some testing here? Including on Edge? It would be best to just have matching semantics, instead of unprefixing with slightly different behavior. -Boris ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform