[CodeHealth] Fix stale link to HTML User Activation spec.
Change-Id: I86c0e79a6b22dbb2d98d5a5d8dd9cacf8baca79a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3935170 Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: Mustaq Ahmed <mustaq@chromium.org> Cr-Commit-Position: refs/heads/main@{#1057589}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
0d6f7937a1
commit
3a40f9f2a4
components/page_load_metrics/browser
content/browser/web_contents
docs/testing
third_party/blink/web_tests
external
wpt
fullscreen
html
user-activation
resources
fullscreen
resources
@ -790,10 +790,10 @@ void PageLoadTracker::UpdatePageEndInternal(
|
||||
page_end_reason_ = page_end_reason;
|
||||
page_end_time_ = timestamp;
|
||||
// A client redirect can never be user initiated. Due to the way Blink
|
||||
// implements user gesture tracking, where all events that occur within 1
|
||||
// second after a user interaction are considered to be triggered by user
|
||||
// activation (based on HTML spec:
|
||||
// https://html.spec.whatwg.org/multipage/interaction.html#triggered-by-user-activation),
|
||||
// implements user gesture tracking, where all events that occur within a few
|
||||
// seconds after a user interaction are considered to be triggered by user
|
||||
// activation (based on the HTML spec:
|
||||
// https://html.spec.whatwg.org/multipage/interaction.html#tracking-user-activation),
|
||||
// these navs may sometimes be reported as user initiated by Blink. Thus, we
|
||||
// explicitly filter these types of aborts out when deciding if the abort was
|
||||
// user initiated.
|
||||
|
@ -251,8 +251,9 @@ RenderFrameHostImpl* FindOpenerRFH(const WebContents::CreateParams& params) {
|
||||
// Returns |true| if |type| is the kind of user input that should trigger the
|
||||
// user interaction observers.
|
||||
bool IsUserInteractionInputType(blink::WebInputEvent::Type type) {
|
||||
// Ideally, this list would be based more off of
|
||||
// https://whatwg.org/C/interaction.html#triggered-by-user-activation.
|
||||
// TODO(mustaq): This list should be based off the HTML spec:
|
||||
// https://html.spec.whatwg.org/multipage/interaction.html#tracking-user-activation,
|
||||
// and kGestureScrollBegin is a clear outlier.
|
||||
return type == blink::WebInputEvent::Type::kMouseDown ||
|
||||
type == blink::WebInputEvent::Type::kGestureScrollBegin ||
|
||||
type == blink::WebInputEvent::Type::kTouchStart ||
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
Some Blink features cannot be automatically tested using the Web Platform. Prime
|
||||
examples are the APIs that require
|
||||
[user activation](https://html.spec.whatwg.org/multipage/interaction.html#triggered-by-user-activation)
|
||||
(also known as _a user gesture_), such as [Full Screen](https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API).
|
||||
[user activation](https://html.spec.whatwg.org/multipage/interaction.html#tracking-user-activation)
|
||||
(also known as _a user gesture_), such as [Fullscreen](https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API).
|
||||
Automated tests for these Blink features must rely on special APIs, which are
|
||||
only exposed in testing environments, and are therefore not available in a
|
||||
normal browser session.
|
||||
|
@ -1,5 +1,9 @@
|
||||
// Invokes callback from a trusted click event, to satisfy
|
||||
// https://html.spec.whatwg.org/#triggered-by-user-activation
|
||||
// Invokes callback from a trusted click event.
|
||||
//
|
||||
// TODO(mustaq): This method needs a cleanup. This is based on an old version
|
||||
// of the HTML spec. The new spec doesn't require a callback because the user
|
||||
// activation is visible across the Window object:
|
||||
// https://html.spec.whatwg.org/multipage/interaction.html#tracking-user-activation.
|
||||
function trusted_click(test, callback, container)
|
||||
{
|
||||
var document = container.ownerDocument;
|
||||
|
2
third_party/blink/web_tests/external/wpt/html/user-activation/no-activation-thru-escape-key.html
vendored
2
third_party/blink/web_tests/external/wpt/html/user-activation/no-activation-thru-escape-key.html
vendored
@ -5,7 +5,7 @@
|
||||
<meta name="timeout" content="long">
|
||||
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
|
||||
<link rel="author" title="Google" href="http://www.google.com "/>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/#triggered-by-user-activation">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/interaction.html#tracking-user-activation">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
|
@ -78,8 +78,8 @@
|
||||
* Trigger user interaction in order to grant additional privileges to
|
||||
* a provided function.
|
||||
*
|
||||
* See `triggered by user activation
|
||||
* <https://html.spec.whatwg.org/#triggered-by-user-activation>`_.
|
||||
* See `Tracking user activation
|
||||
* <https://html.spec.whatwg.org/multipage/interaction.html#tracking-user-activation>`_.
|
||||
*
|
||||
* @example
|
||||
* var mediaElement = document.createElement('video');
|
||||
|
@ -1,5 +1,9 @@
|
||||
// Invokes callback from a trusted click event, to satisfy
|
||||
// https://html.spec.whatwg.org/#triggered-by-user-activation
|
||||
// Invokes callback from a trusted click event.
|
||||
//
|
||||
// TODO(mustaq): This method needs a cleanup. This is based on an old version
|
||||
// of the HTML spec. The new spec doesn't require a callback because the user
|
||||
// activation is visible across the Window object:
|
||||
// https://html.spec.whatwg.org/multipage/interaction.html#tracking-user-activation.
|
||||
function trusted_click(test, callback, container,
|
||||
clickRectInRootFrameCoordinate)
|
||||
{
|
||||
|
@ -78,8 +78,8 @@
|
||||
* Trigger user interaction in order to grant additional privileges to
|
||||
* a provided function.
|
||||
*
|
||||
* See `triggered by user activation
|
||||
* <https://html.spec.whatwg.org/#triggered-by-user-activation>`_.
|
||||
* See `Tracking user activation
|
||||
* <https://html.spec.whatwg.org/multipage/interaction.html#tracking-user-activation>`_.
|
||||
*
|
||||
* @example
|
||||
* var mediaElement = document.createElement('video');
|
||||
|
Reference in New Issue
Block a user