New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 779571 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature

Blocking:
issue 437569



Sign in to add a comment

Consider adding getMatchedCSSRules API for extensions?

Project Member Reported by rbyers@chromium.org, Oct 30 2017

Issue description

In  issue 437569 , the getMatchedCSSRules API is being removed from blink - it has failed to become part of the interoperable web platform.

However there is some risk of this breaking some Chrome extensions (see discussion in  issue 437569 ). Do we have any stats on how many Chrome extensions use this API today? Perhaps we should consider providing such an API to extensions only?
 

Comment 1 by rbyers@chromium.org, Oct 30 2017

Blocking: 437569

Comment 2 by shend@chromium.org, Oct 30 2017

Cc: meade@chromium.org foolip@chromium.org
Hi Eddy, did the stats that you collected for getMatchedCSSRules usage include anything on extensions?

Comment 3 by meade@chromium.org, Oct 31 2017

Unfortunately not - HTTPArchive only looks at archived web pages.

I believe the reason we wanted to remove getMatchedCSSRules in the first place was it a) adds complexity (We don't store enough information do get the result without a lot of work, but keeping it around means more memory usage for a rare feature), so b) it's really slow (n^2 by number of rules)

shend, I vaguely remember you had a previous conversation with devlin about extensions-only getMatchedCSSRules - what was the outcome of that?

Comment 4 by meade@chromium.org, Oct 31 2017

Sorry, hit post too early - for point 1: ... and we don't get the benefit of deprecate + remove we were originally going for if we keep it around for extensions.

Comment 5 by shend@chromium.org, Oct 31 2017

Yes, I did talk with Devlin about an extension-only API and he basically said what you said in #c3 (complexity and efficiency). Also, my understanding is that it doesn't belong naturally to any of the existing extension APIs.
Yeah, when we chatted, there were the same concerns around whether removing it for web pages but keeping it around for extension usage would yield much value (beyond removing a non-standardized exposed method).  Additionally, both Elliot Sprehn and Rob Wu raised concerns about the performance of the current API, and suggested that having authors implement their own in JS could be more efficient (especially if it can be tailored to the uses of the extension).  Given these, I'm not sure it's worth keeping it around, exposed specifically to extensions.  But I'm open to discussing further.
Owner: rbyers@chromium.org
Status: assigned (was: Untriaged)
rbyers@, given the discussion above, is this still something we want to discuss?

Comment 8 by rbyers@chromium.org, Nov 11 2017

Status: WontFix (was: Assigned)
It's your call.  It sounds like both Extensions and Style leads agree that this is not a capability they want to expose to extensions.  So this is 'WontFix' for now.

Developers/users impacted by this decision should 'star' this bug and we can revisit the star count at some point to see if the demand is high enough to warrant reconsidering. 

Sign in to add a comment