Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Issue 1115913002: Add deprecation warnings to old powerful features on insecure origins. (Closed)

Created:
5 years, 7 months ago by jww
Modified:
5 years, 7 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, Inactive, dglazkov+blink, eae+blinkwatch, mlamouri+watch-blink_chromium.org, mvanouwerkerk+watch_chromium.org, rwlbuis, sof, timvolodine, tommyw+watchlist_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Add deprecation warnings to old powerful features on insecure origins. As part of the effort to move old powerful features to secure origins only (see https://goo.gl/rStTGz for more details), this CL adds warning messages for the APIs in question. In particular, this adds warnings for: - Geolocation - Fullscreen - Device motion - getUserMedia() R=mkwst@chromium.org BUG=481604 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=194768

Patch Set 1 #

Patch Set 2 : Rebase on ToT #

Total comments: 8

Patch Set 3 : Updates from nits #

Total comments: 7

Messages

Total messages: 23 (6 generated)
jww
5 years, 7 months ago (2015-04-30 05:15:26 UTC) #1
mlamouri (slow - plz ping)
drive-by lgtm https://codereview.chromium.org/1115913002/diff/20001/Source/core/dom/Fullscreen.cpp File Source/core/dom/Fullscreen.cpp (right): https://codereview.chromium.org/1115913002/diff/20001/Source/core/dom/Fullscreen.cpp#newcode215 Source/core/dom/Fullscreen.cpp:215: } No need for { and } ...
5 years, 7 months ago (2015-04-30 05:23:53 UTC) #3
timvolodine
lgtm DeviceMotionController.cpp with a question though: https://codereview.chromium.org/1115913002/diff/20001/Source/modules/device_orientation/DeviceMotionController.cpp File Source/modules/device_orientation/DeviceMotionController.cpp (right): https://codereview.chromium.org/1115913002/diff/20001/Source/modules/device_orientation/DeviceMotionController.cpp#newcode57 Source/modules/device_orientation/DeviceMotionController.cpp:57: UseCounter::countDeprecation(document().frame(), UseCounter::DeviceMotionInsecureOrigin); should ...
5 years, 7 months ago (2015-04-30 10:47:45 UTC) #5
Michael van Ouwerkerk
geolocation lgtm with nit https://codereview.chromium.org/1115913002/diff/20001/Source/core/frame/UseCounter.cpp File Source/core/frame/UseCounter.cpp (right): https://codereview.chromium.org/1115913002/diff/20001/Source/core/frame/UseCounter.cpp#newcode904 Source/core/frame/UseCounter.cpp:904: return "Geolocation via getCurrentPosition() and ...
5 years, 7 months ago (2015-04-30 13:15:21 UTC) #7
Mike West
This looks like a fine approach, the code change LGTM (% the http->https note). I ...
5 years, 7 months ago (2015-04-30 16:17:11 UTC) #8
jww
Thanks, all. I'll respond to the thread per Mike's suggestion and wait for approval before ...
5 years, 7 months ago (2015-04-30 17:28:45 UTC) #9
jww
On 2015/04/30 17:28:45, jww wrote: > Thanks, all. I'll respond to the thread per Mike's ...
5 years, 7 months ago (2015-04-30 18:10:22 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1115913002/40001
5 years, 7 months ago (2015-04-30 18:11:06 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://src.chromium.org/viewvc/blink?view=rev&revision=194768
5 years, 7 months ago (2015-04-30 19:33:39 UTC) #14
Mike West
On 2015/04/30 at 18:10:22, jww wrote: > pdr@ replied on the thread that this is ...
5 years, 7 months ago (2015-04-30 20:35:22 UTC) #15
jww
On 2015/04/30 20:35:22, Mike West (traveling. slow.) wrote: > On 2015/04/30 at 18:10:22, jww wrote: ...
5 years, 7 months ago (2015-04-30 20:46:25 UTC) #16
Mike West
On 2015/04/30 at 20:46:25, jww wrote: > According to pdr@, deprecation warnings do not count ...
5 years, 7 months ago (2015-04-30 23:35:31 UTC) #17
lgarron
On 2015/04/30 at 23:35:31, mkwst wrote: > On 2015/04/30 at 20:46:25, jww wrote: > > ...
5 years, 7 months ago (2015-05-01 19:11:44 UTC) #18
lgarron
On 2015/05/01 at 19:11:44, lgarron wrote: > On 2015/04/30 at 23:35:31, mkwst wrote: > > ...
5 years, 7 months ago (2015-05-01 20:53:23 UTC) #19
philipj_slow
https://codereview.chromium.org/1115913002/diff/40001/Source/core/dom/Fullscreen.cpp File Source/core/dom/Fullscreen.cpp (right): https://codereview.chromium.org/1115913002/diff/40001/Source/core/dom/Fullscreen.cpp#newcode208 Source/core/dom/Fullscreen.cpp:208: // actually used. This could be used later if ...
5 years, 7 months ago (2015-05-01 22:36:58 UTC) #21
jww
Philip, I just uploaded https://codereview.chromium.org/1125573003/ which I think addresses some of your comments. See my ...
5 years, 7 months ago (2015-05-05 21:29:53 UTC) #22
philipj_slow
5 years, 7 months ago (2015-05-06 07:43:55 UTC) #23
Message was sent while issue was closed.
https://codereview.chromium.org/1115913002/diff/40001/Source/core/dom/Fullscr...
File Source/core/dom/Fullscreen.cpp (right):

https://codereview.chromium.org/1115913002/diff/40001/Source/core/dom/Fullscr...
Source/core/dom/Fullscreen.cpp:208: // actually used. This could be used later
if a warning is shown in the
On 2015/05/05 21:29:53, jww wrote:
> On 2015/05/01 22:36:58, philipj_UTC2 wrote:
> > The countDeprecation is the console warning, is there any chance that this
> > errorMessage will ever be used? Some other clients throw exceptions using
this
> > message, but that will not make sense for the Fullscreen API. I think these
> > checks should be in fullscreenIsSupported, which is the place in the spec
> which
> > allows taking this into consideration. That would also ensure that
> > document.fullscreenEnabled is false if fullscreen will always fail, if it's
> made
> > to return false if
(frame()->settings()->strictPowerfulFeatureRestrictions()).
> 
> I think that's an accurate description of where it should be blocked in the
long
> term, but it appears to me to be the wrong place to measure usage. That is, I
> don't think we don't want to measure that fullscreen is being used until
> requestFullscreen is actually called.

The fullscreen element ready check is only used in requestFullscreen() in both
spec and implementation. (I didn't check this when I commented, though, so your
skepticism is warranted.)

If you want to move this to the ready check I'll be happy to review, but there's
no hurry really.

https://codereview.chromium.org/1115913002/diff/40001/Source/core/frame/UseCo...
File Source/core/frame/UseCounter.cpp (right):

https://codereview.chromium.org/1115913002/diff/40001/Source/core/frame/UseCo...
Source/core/frame/UseCounter.cpp:909: case DeviceMotionInsecureOrigin:
On 2015/05/05 21:29:53, jww wrote:
> On 2015/05/01 22:36:58, philipj_UTC2 wrote:
> > The DeviceMotionInsecureOrigin and DeviceOrientationInsecureOrigin use
> counters
> > are both around 20%, this will amount to console spam which in turn causes
> > people to take deprecation messages less seriously. Is there a credible plan
> for
> > disabling device motion and device orientation on insecure origins? At this
> > level of usage, there's little chance that deprecation messages will bring
> usage
> > down to a level where we would normally consider breaking changes.
> 
> That's a great point, and my mistake for not checking those stats earlier.
Those
> usage numbers are incredibly high, so I'm suspicious that something funky is
> going on (a la some common library automatically registers a 'devicemotion'
> event), but until we can figure out what's going on, I'll remove the
deprecation
> message.

Thanks!

Powered by Google App Engine
This is Rietveld 408576698