Closed Bug 1578355 Opened 5 months ago Closed 4 months ago

Provide a way to consume transient user gesture activation flag

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: edgar, Assigned: edgar)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

This is what Chrome does and is trying to write it into spec, https://github.com/whatwg/html/pull/3851.

Blocks: 1577516
Depends on: 1577499
Assignee: nobody → echen
Pushed by echen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/284299dac42c
Part 1: Move user-activation code from EventStateManager to UserActivation; r=smaug
https://hg.mozilla.org/integration/autoland/rev/339ab54ca471
Part 2: Introduce UserActivation::State; r=smaug
https://hg.mozilla.org/integration/autoland/rev/d50ad759f129
Part 3: Add the ability to consume transient user activation; r=smaug

Backed out 3 changesets (Bug 1578355) for build bustage at build/src/dom/base/nsSyncLoadService.h:48:21.

Push with failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&selectedJob=267623991&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&revision=d50ad759f1292661ed76fd5e78f85c4a6a148ebf

Log failure: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=267623991&repo=autoland&lineNumber=23182

Backout link: https://treeherder.mozilla.org/#/jobs?repo=autoland&selectedJob=267623991&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&revision=0f81a8181f06935bb49c7ba1ffe5f853f5c6ca1d

[task 2019-09-20T10:55:58.620Z] 10:55:58     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/dom/clients/manager'
[task 2019-09-20T10:55:58.620Z] 10:55:58     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/dom/clients/manager'
[task 2019-09-20T10:55:58.620Z] 10:55:58     INFO -  dom/clients/manager/Unified_cpp_dom_clients_manager1.o
[task 2019-09-20T10:55:58.620Z] 10:55:58     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/dom/clients/manager'
[task 2019-09-20T10:56:00.931Z] 10:56:00     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/dom/base'
[task 2019-09-20T10:56:00.931Z] 10:56:00     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang++ -o Unified_cpp_dom_base0.o -c  -I/builds/worker/workspace/build/src/obj-firefox/dist/stl_wrappers -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_LINUX=1 -DHAVE_SIDEBAR -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/worker/workspace/build/src/dom/base -I/builds/worker/workspace/build/src/obj-firefox/dom/base -I/builds/worker/workspace/build/src/dom/battery -I/builds/worker/workspace/build/src/dom/events -I/builds/worker/workspace/build/src/dom/media -I/builds/worker/workspace/build/src/dom/network -I/builds/worker/workspace/build/src/caps -I/builds/worker/workspace/build/src/docshell/base -I/builds/worker/workspace/build/src/dom/base -I/builds/worker/workspace/build/src/dom/file -I/builds/worker/workspace/build/src/dom/geolocation -I/builds/worker/workspace/build/src/dom/html -I/builds/worker/workspace/build/src/dom/ipc -I/builds/worker/workspace/build/src/dom/storage -I/builds/worker/workspace/build/src/dom/svg -I/builds/worker/workspace/build/src/dom/u2f -I/builds/worker/workspace/build/src/dom/xbl -I/builds/worker/workspace/build/src/dom/xml -I/builds/worker/workspace/build/src/dom/xslt/xpath -I/builds/worker/workspace/build/src/dom/xul -I/builds/worker/workspace/build/src/extensions/permissions -I/builds/worker/workspace/build/src/gfx/2d -I/builds/worker/workspace/build/src/image -I/builds/worker/workspace/build/src/js/xpconnect/loader -I/builds/worker/workspace/build/src/js/xpconnect/src -I/builds/worker/workspace/build/src/js/xpconnect/wrappers -I/builds/worker/workspace/build/src/layout/base -I/builds/worker/workspace/build/src/layout/forms -I/builds/worker/workspace/build/src/layout/generic -I/builds/worker/workspace/build/src/layout/style -I/builds/worker/workspace/build/src/layout/svg -I/builds/worker/workspace/build/src/layout/xul -I/builds/worker/workspace/build/src/netwerk/base -I/builds/worker/workspace/build/src/netwerk/url-classifier -I/builds/worker/workspace/build/src/security/manager/ssl -I/builds/worker/workspace/build/src/widget -I/builds/worker/workspace/build/src/xpcom/ds -I/builds/worker/workspace/build/src/netwerk/sctp/datachannel -I/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/_ipdlheaders -I/builds/worker/workspace/build/src/ipc/chromium/src -I/builds/worker/workspace/build/src/ipc/glue -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Qunused-arguments -U_FORTIFY_SOURCE -fno-common -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-sized-deallocation -fno-aligned-new -fsanitize=bool,bounds,vla-bound -fno-sanitize-recover=bool,bounds,vla-bound -fsanitize-blacklist=/builds/worker/workspace/build/src/obj-firefox/ubsan_blacklist.txt -fsanitize=address -fcrash-diagnostics-dir=/builds/worker/artifacts -U_FORTIFY_SOURCE -fno-common -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -gline-tables-only -fno-omit-frame-pointer -funwind-tables -Werror -I/builds/worker/workspace/build/src/widget/gtk/compat-gtk3 -pthread -I/usr/include/gtk-3.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/gtk-3.0/unix-print -Wno-error=shadow  -MD -MP -MF .deps/Unified_cpp_dom_base0.o.pp   Unified_cpp_dom_base0.cpp
[task 2019-09-20T10:56:00.931Z] 10:56:00     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/dom/base'
[task 2019-09-20T10:56:00.931Z] 10:56:00     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/dom/base'
[task 2019-09-20T10:56:00.931Z] 10:56:00     INFO -  dom/base/Unified_cpp_dom_base3.o
[task 2019-09-20T10:56:00.931Z] 10:56:00     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/dom/base'
[task 2019-09-20T10:56:01.047Z] 10:56:01     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/dom/base'
[task 2019-09-20T10:56:01.047Z] 10:56:01     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang++ -o Unified_cpp_dom_base10.o -c  -I/builds/worker/workspace/build/src/obj-firefox/dist/stl_wrappers -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_LINUX=1 -DHAVE_SIDEBAR -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/worker/workspace/build/src/dom/base -I/builds/worker/workspace/build/src/obj-firefox/dom/base -I/builds/worker/workspace/build/src/dom/battery -I/builds/worker/workspace/build/src/dom/events -I/builds/worker/workspace/build/src/dom/media -I/builds/worker/workspace/build/src/dom/network -I/builds/worker/workspace/build/src/caps -I/builds/worker/workspace/build/src/docshell/base -I/builds/worker/workspace/build/src/dom/base -I/builds/worker/workspace/build/src/dom/file -I/builds/worker/workspace/build/src/dom/geolocation -I/builds/worker/workspace/build/src/dom/html -I/builds/worker/workspace/build/src/dom/ipc -I/builds/worker/workspace/build/src/dom/storage -I/builds/worker/workspace/build/src/dom/svg -I/builds/worker/workspace/build/src/dom/u2f -I/builds/worker/workspace/build/src/dom/xbl -I/builds/worker/workspace/build/src/dom/xml -I/builds/worker/workspace/build/src/dom/xslt/xpath -I/builds/worker/workspace/build/src/dom/xul -I/builds/worker/workspace/build/src/extensions/permissions -I/builds/worker/workspace/build/src/gfx/2d -I/builds/worker/workspace/build/src/image -I/builds/worker/workspace/build/src/js/xpconnect/loader -I/builds/worker/workspace/build/src/js/xpconnect/src -I/builds/worker/workspace/build/src/js/xpconnect/wrappers -I/builds/worker/workspace/build/src/layout/base -I/builds/worker/workspace/build/src/layout/forms -I/builds/worker/workspace/build/src/layout/generic -I/builds/worker/workspace/build/src/layout/style -I/builds/worker/workspace/build/src/layout/svg -I/builds/worker/workspace/build/src/layout/xul -I/builds/worker/workspace/build/src/netwerk/base -I/builds/worker/workspace/build/src/netwerk/url-classifier -I/builds/worker/workspace/build/src/security/manager/ssl -I/builds/worker/workspace/build/src/widget -I/builds/worker/workspace/build/src/xpcom/ds -I/builds/worker/workspace/build/src/netwerk/sctp/datachannel -I/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/_ipdlheaders -I/builds/worker/workspace/build/src/ipc/chromium/src -I/builds/worker/workspace/build/src/ipc/glue -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Qunused-arguments -U_FORTIFY_SOURCE -fno-common -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-sized-deallocation -fno-aligned-new -fsanitize=bool,bounds,vla-bound -fno-sanitize-recover=bool,bounds,vla-bound -fsanitize-blacklist=/builds/worker/workspace/build/src/obj-firefox/ubsan_blacklist.txt -fsanitize=address -fcrash-diagnostics-dir=/builds/worker/artifacts -U_FORTIFY_SOURCE -fno-common -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -gline-tables-only -fno-omit-frame-pointer -funwind-tables -Werror -I/builds/worker/workspace/build/src/widget/gtk/compat-gtk3 -pthread -I/usr/include/gtk-3.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/gtk-3.0/unix-print -Wno-error=shadow  -MD -MP -MF .deps/Unified_cpp_dom_base10.o.pp   Unified_cpp_dom_base10.cpp
[task 2019-09-20T10:56:01.047Z] 10:56:01     INFO -  In file included from Unified_cpp_dom_base10.cpp:2:
[task 2019-09-20T10:56:01.047Z] 10:56:01     INFO -  In file included from /builds/worker/workspace/build/src/dom/base/nsSyncLoadService.cpp:11:
[task 2019-09-20T10:56:01.047Z] 10:56:01    ERROR -  /builds/worker/workspace/build/src/dom/base/nsSyncLoadService.h:48:21: error: unknown type name 'nsContentPolicyType'
[task 2019-09-20T10:56:01.047Z] 10:56:01     INFO -        nsIURI* aURI, nsContentPolicyType aContentPolicyType,
[task 2019-09-20T10:56:01.047Z] 10:56:01     INFO -                      ^
[task 2019-09-20T10:56:01.048Z] 10:56:01    ERROR -  /builds/worker/workspace/build/src/dom/base/nsSyncLoadService.h:49:39: error: unknown type name 'nsSecurityFlags'
[task 2019-09-20T10:56:01.048Z] 10:56:01     INFO -        nsIPrincipal* aLoaderPrincipal, nsSecurityFlags aSecurityFlags,
[task 2019-09-20T10:56:01.048Z] 10:56:01     INFO -                                        ^
[task 2019-09-20T10:56:01.048Z] 10:56:01    ERROR -  /builds/worker/workspace/build/src/dom/base/nsSyncLoadService.h:51:39: error: no type named 'ReferrerPolicy' in namespace 'mozilla::dom'
[task 2019-09-20T10:56:01.048Z] 10:56:01     INFO -        bool aForceToXML, mozilla::dom::ReferrerPolicy aReferrerPolicy,
[task 2019-09-20T10:56:01.053Z] 10:56:01     INFO -                          ~~~~~~~~~~~~~~^
[task 2019-09-20T10:56:01.053Z] 10:56:01    ERROR -  /builds/worker/workspace/build/src/dom/base/nsSyncLoadService.h:63:44: error: no template named 'already_AddRefed'
[task 2019-09-20T10:56:01.053Z] 10:56:01     INFO -    static nsresult PushSyncStreamToListener(already_AddRefed<nsIInputStream> aIn,
[task 2019-09-20T10:56:01.053Z] 10:56:01     INFO -                                             ^
[task 2019-09-20T10:56:01.053Z] 10:56:01     INFO -  In file included from Unified_cpp_dom_base10.cpp:2:
[task 2019-09-20T10:56:01.053Z] 10:56:01    ERROR -  /builds/worker/workspace/build/src/dom/base/nsSyncLoadService.cpp:281:29: error: out-of-line definition of 'LoadDocument' does not match any declaration in 'nsSyncLoadService'
[task 2019-09-20T10:56:01.053Z] 10:56:01     INFO -  nsresult nsSyncLoadService::LoadDocument(
[task 2019-09-20T10:56:01.053Z] 10:56:01     INFO -                              ^~~~~~~~~~~~
[task 2019-09-20T10:56:01.053Z] 10:56:01    ERROR -  /builds/worker/workspace/build/src/dom/base/nsSyncLoadService.cpp:308:29: error: out-of-line definition of 'PushSyncStreamToListener' does not match any declaration in 'nsSyncLoadService'
[task 2019-09-20T10:56:01.053Z] 10:56:01     INFO -  nsresult nsSyncLoadService::PushSyncStreamToListener(
[task 2019-09-20T10:56:01.053Z] 10:56:01     INFO -                              ^~~~~~~~~~~~~~~~~~~~~~~~
[task 2019-09-20T10:56:01.053Z] 10:56:01     INFO -  6 errors generated.
[task 2019-09-20T10:56:01.053Z] 10:56:01     INFO -  /builds/worker/workspace/build/src/config/rules.mk:785: recipe for target 'Unified_cpp_dom_base10.o' failed
[task 2019-09-20T10:56:01.053Z] 10:56:01    ERROR -  make[4]: *** [Unified_cpp_dom_base10.o] Error 1
[task 2019-09-20T10:56:01.054Z] 10:56:01     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/dom/base'
[task 2019-09-20T10:56:01.054Z] 10:56:01     INFO -  make[4]: *** Waiting for unfinished jobs....
[task 2019-09-20T10:56:01.061Z] 10:56:01     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/dom/commandhandler'
[task 2019-09-20T10:56:01.061Z] 10:56:01     INFO -  mkdir -p '.deps/'
[task 2019-09-20T10:56:01.062Z] 10:56:01     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/dom/commandhandler'
[task 2019-09-20T10:56:01.082Z] 10:56:01     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/dom/commandhandler'
Flags: needinfo?(echen)
Pushed by echen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ece90011ebe1
Part 1: Move user-activation code from EventStateManager to UserActivation; r=smaug
https://hg.mozilla.org/integration/autoland/rev/6f4aab095389
Part 2: Introduce UserActivation::State; r=smaug
https://hg.mozilla.org/integration/autoland/rev/8ebc89142bf2
Part 3: Add the ability to consume transient user activation; r=smaug
You need to log in before you can comment on or make changes to this bug.