New issue
Advanced search Search tips

Issue 665887 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: 2017-01-31
OS: ----
Pri: 3
Type: Launch-OWP
Launch-Accessibility: ----
Launch-Exp-Leadership: ----
Launch-Leadership: ----
Launch-Legal: ----
Launch-M-Approved: ----
Launch-M-Target: ----
Launch-Privacy: ----
Launch-Security: ----
Launch-Test: ----
Launch-UI: ----
Rollout-Type: ----

Blocking:
issue 674507



Sign in to add a comment

Remove webkitAudioContext and webkitOfflineAudioContext

Project Member Reported by foolip@chromium.org, Nov 16 2016

Issue description

They were deprecated https://codereview.chromium.org/799403007 as part of  issue 405346 .

Use counters:
https://www.chromestatus.com/metrics/feature/timeline/popularity/652
https://www.chromestatus.com/metrics/feature/timeline/popularity/653
https://www.chromestatus.com/metrics/feature/timeline/popularity/654
https://www.chromestatus.com/metrics/feature/timeline/popularity/655

Because these are attributes on window, the use counters don't tell us much. In order to judge the real risk of removing this, we'd have to look at httparchive data.

I'd be happy to help with analyzing httparchive, or anything else you need to drive this forward.
 

Comment 1 by rtoy@chromium.org, Nov 16 2016

Help with httparchive would be appreciated.

However, I think Safari still uses webkitAudioContext so any site that cares must still have webkitAudioContext.  Does this complicate things?

Comment 2 by foolip@chromium.org, Nov 17 2016

It could be a problem, but not necessarily. When there's both a prefixed and unprefixed API, you can go wrong it two ways:
 * Using just the prefixed API, because that just works.
 * Trying to fall back to the unprefixed API, but failing because of a typo.

Both of these things you can see when sorting through httparchive results, but it's a bit of manual work. I'll try to get some time to do this and post recommendations back here. I wouldn't be surprised if webkitOfflineAudioContext can be easily removed but webkitAudioContext requires some outreach.

Comment 3 by foolip@chromium.org, Nov 26 2016

Attaching the occurrences of 'webkitOfflineAudioContext' from httparchive:har.2016_10_01_chrome_requests_bodies, 1045 rows.
webkitOfflineAudioContext.json.gz
21.2 MB Download

Comment 4 by foolip@chromium.org, Nov 26 2016

OK, I've split that file into one file per line and then tried to separate the results into buckets:

629 are https://cdn.adsafeprotected.com/sca.js where there are lots of tests for various features, probably just for fingerprinting, and this is one of them:
function() {
    return "function" == typeof window.webkitOfflineAudioContext && window.webkitOfflineAudioContext.toString().indexOf("function OfflineAudioContext") !== -1
}

395 are things on the form window.OfflineAudioContext || window.webkitOfflineAudioContext, which won't be affected.

6 are https://github.com/processing/p5.js-sound/blob/e8dafe067786f357171187d745b926eecd0e4c7a/lib/p5.sound.js#L199 or similar, won't be affected.

I found nothing that'd be problematic at all, so it would be safe to move ahead with removal of webkitOfflineAudioContext.

Comment 5 by foolip@chromium.org, Nov 29 2016

Cc: hongchan@chromium.org
OK, now I'm done with webkitAudioContext analysis too. Quite painful and time-consuming, so I hope it was worth it.

I used httparchive:har.2016_10_01_chrome_requests_bodies, which has 17,873,862 resources, out of which 46,727 contain 'webkitAudioContext'. The run itself visited 496,062 pages, so that's a lot.

I inspected and filtered out a few very common things to get it down to 5,382 resources:
https://bigquery.cloud.google.com:443/savedquery/762219082167:6a7281040a314e29bcfd6255932c26a3

I exported+downloaded that as JSON, split per line, and extracted each JSON using https://github.com/foolip/unhar/blob/master/unjson. Then I went about categorizing them first by number of occurrences, then using grep and other command line tricks, and then manual inspection of the 500 or so that would not bend to the will of pattern matching.

Almost everything was harmless usage with fallbacks, using try/catch, if/else, in all combinations one might imagine.

There's some ugly things like browser detection, which I've seen with e.g. webkitURL as well, but only detecting Safari and/or iOS, I found no cases where the identification of Chrome would be affected by a removal. It does mean removal in WebKit will be harder, but the other option is that Edge and Firefox should take some unknown risk by adding it, when they've so far not needed to.

In the end I judge only 17 to be problematic. These are 11 sites that use only the prefixed API:
* http://www.ana-cooljapan.com/
* http://www.cityads.com/
* http://www.free-freecell-solitaire.com/
* http://www.free-spider-solitaire.com/
* http://www.netsolitaire.com/
* http://www.teatrozorrilla.es/
* http://www.thegooglepuzzle.com/
* http://www.tropicanacasino.com/
* http://www.virgincasino.com/
* http://www.virgingames.com/
* http://www.virtualpianos.info/

And 6 that tried to use a fallback but have a typo:
* http://www.gancxadebebi.ge/
* http://www.litevault.net/
* http://www.niceonedad.com/
* http://www.renshuu.org/
* http://www.wapak.org/
* http://www.weavesilk.com/

Some sites may have changed since the scrape.

The risk thus seems pretty tolerable, and I'd LGTM a removal. Rick, WDYT?

rtoy@, hongchan@, are either of you willing to take this through the process? One additional thing worth doing is to try to visit the above sites with webkitAudioContext removed and see if any breakage can be seen. If there's none or limited, then we could perhaps ask dev rel to reach out to all of these sites when the removal is underway.

Comment 6 by rtoy@chromium.org, Nov 29 2016

What is the next step? Actually removing them?  Or also doing the intent to remove?  Either way, that seems straightforward.

And thanks for doing the heavy analysis work!

Comment 7 by foolip@chromium.org, Nov 29 2016

It's already been deprecated for a while, so next step would be Intent to Remove. I'd suggest one release with an updated deprecation message to make it clear that the removal is really happening.

It would be nice to know if any of the 17 sites will be badly broken by the removal, but I'd say that unless they all blow up catastrophically, it's OK to just pick a removal date and do outreach to have them update in time for Stable. It's actually easier to test the change once it's in Canary/Dev/Beta.

Comment 8 by rtoy@chromium.org, Nov 29 2016

With prefixed versions removed:

* http://www.ana-cooljapan.com/  Audio still plays
* http://www.cityads.com/ No audio plays, but beta chrome doesn't play audio either.
* http://www.free-freecell-solitaire.com/ Audio still plays when playing a game.
* http://www.free-spider-solitaire.com/ Audio still plays
* http://www.netsolitaire.com/ Audio still plays
* http://www.teatrozorrilla.es/ No audio on frontpage, but Chrome beta has no audio either.
* http://www.thegooglepuzzle.com/ Broken by removal.  But broken on Chrome beta because it uses createGainNode which was renamed createGain years ago.
* http://www.tropicanacasino.com/ No audio, just like Chrome beta.
* http://www.virgincasino.com/ No audio, just like Chrome beta.
* http://www.virgingames.com/ No audio, just like Chrome beta.
* http://www.virtualpianos.info/ Seems ok, but Chromium doesn't have the Adobe plugin.  Otherwise seems the same as beta.

Any site (like the virgin* sites) that require creating logins wasn't really tested because I didn't want to create a free login.

I didn't navigate too far into any page to see if audio should be played or not.

But based on this, only thegooglepuzzle.com is broken, and it's been broken for years.

Comment 9 by foolip@chromium.org, Nov 30 2016

Ah, so in http://www.ana-cooljapan.com/ it just sets isAudioAPI, but that's never used. Perhaps some of the others are similar or have fallbacks.

No new breakage, yay!

I guess more of the "tried to use a fallback but have a typo" will be broken?

Comment 10 by rtoy@chromium.org, Nov 30 2016

I didn't try the sites with typos.  But here we go:

* http://www.gancxadebebi.ge/ No audio, like beta.
* http://www.litevault.net/ No audio, like beta.
* http://www.niceonedad.com/ No audio, like beta.
* http://www.renshuu.org/ No audio, like beta. Probably need a login, to play back japanese, since it looks like it's trying to teach japanese.
* http://www.wapak.org/ No audio, like beta.
* http://www.weavesilk.com/ No audio, like beta.
Sweet, thanks for the testing, rtoy@! With that, I think we know everything we need, successful removal is very likely.

Comment 12 by rtoy@chromium.org, Nov 30 2016

Status: Available (was: Untriaged)
Great!  I'll send out the intent to remove soon.  And update the deprecation message with a updated release version. I'll copy you on the changes.
Thanks, looking forward to it!
Labels: -Type-Bug OWP-Standards-No OWP-Type-Deprecation Type-Launch-OWP
Owner: rtoy@chromium.org
Status: Assigned (was: Available)
> The risk thus seems pretty tolerable, and I'd LGTM a removal. Rick, WDYT?

Sorry for the delay.  Yes this looks extremely promising - very low risk.  I'd also LGTM a one-milestone updated-deprecation warning followed by removal.

Thanks for doing the analysis Philip and Raymond!

Comment 16 by rtoy@chromium.org, Dec 8 2016

NextAction: 2017-01-31
According to https://www.chromium.org/developers/calendar M57 will be branched in mid Jan 2017.  Thus, remove the prefixes shortly after the branch is made.  Let's set a date of Jan 31, 2017
Why wait? On blink-dev you got LGTM for immediate removal without a deprecation period.  If you do want to wait for unrelated reasons, then you might want to update the deprecation message to indicate M58 removal. (I suggested skipping it mostly to allow for immediate removal.)

Comment 18 by rtoy@chromium.org, Dec 12 2016

Even easier.  CL in progress:  https://codereview.chromium.org/2557523002/
Blocking: 674507
Project Member

Comment 20 by bugdroid1@chromium.org, Dec 16 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f58de349230213827cd1e057d10b7a61411c328a

commit f58de349230213827cd1e057d10b7a61411c328a
Author: rtoy <rtoy@chromium.org>
Date: Fri Dec 16 02:14:06 2016

Remove webkitAudoContext and webkitOfflineAudioContext

Intent: https://groups.google.com/a/chromium.org/d/msg/blink-dev/of6S04dUf54/ScZJdp37BAAJ

Per the discussion on the bug and on the intent we're just going to
remove the prefixed items without any further deprecation warnings.

BUG= 665887 

Review-Url: https://codereview.chromium.org/2557523002
Cr-Commit-Position: refs/heads/master@{#438987}

[modify] https://crrev.com/f58de349230213827cd1e057d10b7a61411c328a/third_party/WebKit/LayoutTests/fast/dom/constructed-objects-prototypes-expected.txt
[modify] https://crrev.com/f58de349230213827cd1e057d10b7a61411c328a/third_party/WebKit/LayoutTests/fast/js/global-constructors-expected.txt
[modify] https://crrev.com/f58de349230213827cd1e057d10b7a61411c328a/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/origin/cross-origin-objects/cross-origin-objects-exceptions-expected.txt
[modify] https://crrev.com/f58de349230213827cd1e057d10b7a61411c328a/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/f58de349230213827cd1e057d10b7a61411c328a/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/f58de349230213827cd1e057d10b7a61411c328a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/f58de349230213827cd1e057d10b7a61411c328a/third_party/WebKit/Source/core/frame/Deprecation.cpp
[modify] https://crrev.com/f58de349230213827cd1e057d10b7a61411c328a/third_party/WebKit/Source/core/frame/UseCounter.h
[modify] https://crrev.com/f58de349230213827cd1e057d10b7a61411c328a/third_party/WebKit/Source/modules/webaudio/AudioContext.idl
[modify] https://crrev.com/f58de349230213827cd1e057d10b7a61411c328a/third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.idl
[modify] https://crrev.com/f58de349230213827cd1e057d10b7a61411c328a/third_party/WebKit/Source/modules/webaudio/WindowWebAudio.idl
[modify] https://crrev.com/f58de349230213827cd1e057d10b7a61411c328a/tools/metrics/histograms/histograms.xml

Comment 21 by rtoy@chromium.org, Dec 19 2016

Status: Fixed (was: Assigned)

Sign in to add a comment