<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>259028</bug_id>
          
          <creation_ts>2023-07-09 01:36:57 -0700</creation_ts>
          <short_desc>[user-activation] Fix html/user-activation/activation-trigger-pointerevent.html WPT</short_desc>
          <delta_ts>2024-09-12 21:48:24 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://github.com/web-platform-tests/wpt/pull/42118</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=263887</see_also>
          <bug_file_loc>https://wpt.fyi/results/html/user-activation/activation-trigger-pointerevent.html%3Fmouse?label=master&amp;label=experimental&amp;product=chrome&amp;product=firefox&amp;product=safari&amp;aligned&amp;view=interop&amp;q=label%3Ainterop-2023-events</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Nguyen (:ntim)">ntim</reporter>
          <assigned_to name="Abrar Rahman Protyasha">a_protyasha</assigned_to>
          <cc>a_protyasha</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1965819</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2023-07-09 01:36:57 -0700</bug_when>
    <thetext>https://searchfox.org/wubkat/rev/2517a540e6f5a2037c6843102f3a9cb753f2f9f0/Source/WebCore/dom/UserGestureIndicator.cpp#133-138

The function call (`window-&gt;notifyActivated(currentToken()-&gt;startTime());`) should happen only for specific events:

An activation triggering input event is any event whose isTrusted attribute is true and whose type is one of:

&quot;keydown&quot;, provided the key is neither the Esc key nor a shortcut key reserved by the user agent.
&quot;mousedown&quot;.
&quot;pointerdown&quot;, provided the event&apos;s pointerType is &quot;mouse&quot;.
&quot;pointerup&quot;, provided the event&apos;s pointerType is not &quot;mouse&quot;.
&quot;touchend&quot;.

Here&apos;s where we currently trigger it (see EventHandler.cpp notably): https://searchfox.org/wubkat/search?q=symbol:_ZN7WebCore20UserGestureIndicatorC1ESt8optionalINS_26ProcessingUserGestureStateEEPNS_8DocumentENS_15UserGestureTypeENS0_23ProcessInteractionStyleES1_IN3WTF4UUIDEE&amp;redirect=false

We don&apos;t seem to currently trigger it from pointer events.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1965820</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-07-09 01:37:06 -0700</bug_when>
    <thetext>&lt;rdar://problem/111970701&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1965821</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2023-07-09 01:37:29 -0700</bug_when>
    <thetext>The spec for this is at: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1965822</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2023-07-09 01:38:37 -0700</bug_when>
    <thetext>WPT: https://wpt.fyi/results/html/user-activation/activation-trigger-pointerevent.html%3Fmouse?label=master&amp;label=experimental&amp;product=chrome&amp;product=firefox&amp;product=safari&amp;aligned&amp;view=interop&amp;q=label%3Ainterop-2023-events</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1979288</commentid>
    <comment_count>4</comment_count>
    <who name="Abrar Rahman Protyasha">a_protyasha</who>
    <bug_when>2023-09-22 00:09:16 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/18067</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1979387</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-09-22 10:36:06 -0700</bug_when>
    <thetext>Committed 268320@main (df336e8effd7): &lt;https://commits.webkit.org/268320@main&gt;

Reviewed commits have been landed. Closing PR #18067 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1996018</commentid>
    <comment_count>6</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2023-11-30 14:53:30 -0800</bug_when>
    <thetext>This was reverted</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1996020</commentid>
    <comment_count>7</comment_count>
    <who name="Abrar Rahman Protyasha">a_protyasha</who>
    <bug_when>2023-11-30 14:54:23 -0800</bug_when>
    <thetext>Thanks for flipping the bits, Tim. I&apos;ll address re-landing soon!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1998915</commentid>
    <comment_count>8</comment_count>
    <who name="Abrar Rahman Protyasha">a_protyasha</who>
    <bug_when>2023-12-12 02:49:09 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/21668</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1998916</commentid>
    <comment_count>9</comment_count>
    <who name="Abrar Rahman Protyasha">a_protyasha</who>
    <bug_when>2023-12-12 02:55:38 -0800</bug_when>
    <thetext>The original fix to address this bug was reverted because it introduced the regression in bug 263887.

The PR posted just now attempts to do things &quot;the right way&quot; by imbibing certain web automation script to execute with user activation and not have a blanket &quot;make all web automation script blessed with user activation&quot; policy.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2058676</commentid>
    <comment_count>10</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-09-09 11:26:45 -0700</bug_when>
    <thetext>Committed 283353@main (5d09b59ae940): &lt;https://commits.webkit.org/283353@main&gt;

Reviewed commits have been landed. Closing PR #21668 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2059880</commentid>
    <comment_count>11</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-09-12 21:48:24 -0700</bug_when>
    <thetext>Committed 283286.32@safari-7620-branch (5c4d89309ff0): &lt;https://commits.webkit.org/283286.32@safari-7620-branch&gt;

Reviewed commits have been landed. Closing PR #1735 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>