Commit 3f28e399 authored by Dylan Cutler's avatar Dylan Cutler Committed by Commit Bot

Annotate simple fingerprinting attributes with HighEnropy=Direct.

This web IDL annotation will automatically add instrumentation with
the bindings code to record how much entropy these APIs leak about
users' cross-site identity.

Bug: 973801
Change-Id: Ie4d1aa3483bd1883511ccc46d9e4cb2879884c22
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2302726Reviewed-by: default avatarPaul Jensen <pauljensen@chromium.org>
Reviewed-by: default avatarNate Chapin <japhet@chromium.org>
Reviewed-by: default avatarJochen Eisinger <jochen@chromium.org>
Commit-Queue: Dylan Cutler <dylancutler@google.com>
Cr-Commit-Position: refs/heads/master@{#791530}
parent 3a5ea04e
......@@ -30,16 +30,16 @@
Exposed=Window,
ImplementedAs=DOMVisualViewport
] interface VisualViewport : EventTarget {
[HighEntropy, Measure] readonly attribute double offsetLeft;
[HighEntropy, Measure] readonly attribute double offsetTop;
[HighEntropy=Direct, Measure] readonly attribute double offsetLeft;
[HighEntropy=Direct, Measure] readonly attribute double offsetTop;
[HighEntropy, Measure] readonly attribute double pageLeft;
[HighEntropy, Measure] readonly attribute double pageTop;
[HighEntropy=Direct, Measure] readonly attribute double pageLeft;
[HighEntropy=Direct, Measure] readonly attribute double pageTop;
[HighEntropy, Measure] readonly attribute double width;
[HighEntropy, Measure] readonly attribute double height;
[HighEntropy=Direct, Measure] readonly attribute double width;
[HighEntropy=Direct, Measure] readonly attribute double height;
[HighEntropy, Measure] readonly attribute double scale;
[HighEntropy=Direct, Measure] readonly attribute double scale;
attribute EventHandler onresize;
attribute EventHandler onscroll;
......
......@@ -130,8 +130,8 @@
[MeasureAs=WindowResize] void resizeBy(long x, long y);
// viewport
[Affects=Nothing, HighEntropy, MeasureAs=WindowInnerWidth, Replaceable] readonly attribute long innerWidth;
[Affects=Nothing, HighEntropy, MeasureAs=WindowInnerHeight, Replaceable] readonly attribute long innerHeight;
[Affects=Nothing, HighEntropy=Direct, MeasureAs=WindowInnerWidth, Replaceable] readonly attribute long innerWidth;
[Affects=Nothing, HighEntropy=Direct, MeasureAs=WindowInnerHeight, Replaceable] readonly attribute long innerHeight;
// viewport scrolling
[HighEntropy, MeasureAs=WindowScrollX, Replaceable] readonly attribute double scrollX;
......@@ -150,11 +150,11 @@
[Replaceable, SameObject] readonly attribute VisualViewport visualViewport;
// client
[Affects=Nothing, HighEntropy, MeasureAs=WindowScreenX, Replaceable] readonly attribute long screenX;
[Affects=Nothing, HighEntropy, MeasureAs=WindowScreenY, Replaceable] readonly attribute long screenY;
[Affects=Nothing, HighEntropy, MeasureAs=WindowOuterWidth, Replaceable] readonly attribute long outerWidth;
[Affects=Nothing, HighEntropy, MeasureAs=WindowOuterHeight, Replaceable] readonly attribute long outerHeight;
[Affects=Nothing, HighEntropy, MeasureAs=WindowDevicePixelRatio, Replaceable] readonly attribute double devicePixelRatio;
[Affects=Nothing, HighEntropy=Direct, MeasureAs=WindowScreenX, Replaceable] readonly attribute long screenX;
[Affects=Nothing, HighEntropy=Direct, MeasureAs=WindowScreenY, Replaceable] readonly attribute long screenY;
[Affects=Nothing, HighEntropy=Direct, MeasureAs=WindowOuterWidth, Replaceable] readonly attribute long outerWidth;
[Affects=Nothing, HighEntropy=Direct, MeasureAs=WindowOuterHeight, Replaceable] readonly attribute long outerHeight;
[Affects=Nothing, HighEntropy=Direct, MeasureAs=WindowDevicePixelRatio, Replaceable] readonly attribute double devicePixelRatio;
// Window Segments API
// https://github.com/webscreens/window-segments
......@@ -176,7 +176,7 @@
// This is the interface orientation in degrees. Some examples are:
// 0 is straight up; -90 is when the device is rotated 90 clockwise;
// 90 is when rotated counter clockwise.
[HighEntropy, MeasureAs=WindowOrientation, RuntimeEnabled=OrientationEvent] readonly attribute long orientation;
[HighEntropy=Direct, MeasureAs=WindowOrientation, RuntimeEnabled=OrientationEvent] readonly attribute long orientation;
// Accessibility Object Model
// https://github.com/WICG/aom/blob/HEAD/explainer.md
......@@ -198,8 +198,8 @@
optional boolean searchInFrames = false,
optional boolean showDialog = false);
[MeasureAs=WindowOffscreenBuffering, Replaceable, NotEnumerable] readonly attribute boolean offscreenBuffering;
[HighEntropy, MeasureAs=WindowScreenLeft, Replaceable] readonly attribute long screenLeft;
[HighEntropy, MeasureAs=WindowScreenTop, Replaceable] readonly attribute long screenTop;
[HighEntropy=Direct, MeasureAs=WindowScreenLeft, Replaceable] readonly attribute long screenLeft;
[HighEntropy=Direct, MeasureAs=WindowScreenTop, Replaceable] readonly attribute long screenTop;
[MeasureAs=WindowDefaultStatus] attribute DOMString defaultStatus;
[MeasureAs=WindowDefaultstatus, ImplementedAs=defaultStatus] attribute DOMString defaultstatus;
[MeasureAs=StyleMedia] readonly attribute StyleMedia styleMedia;
......
......@@ -7,7 +7,7 @@
ActiveScriptWrappable,
Exposed=Window
] interface BatteryManager : EventTarget {
[HighEntropy, Measure] readonly attribute boolean charging;
[HighEntropy=Direct, Measure] readonly attribute boolean charging;
[HighEntropy, Measure] readonly attribute unrestricted double chargingTime;
[HighEntropy, Measure] readonly attribute unrestricted double dischargingTime;
[HighEntropy, Measure] readonly attribute double level;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment