<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - New force-related DOM events should fire in WK1 views"
   href="https://bugs.webkit.org/show_bug.cgi?id=144663#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - New force-related DOM events should fire in WK1 views"
   href="https://bugs.webkit.org/show_bug.cgi?id=144663">bug 144663</a>
              from <span class="vcard"><a class="email" href="mailto:bdakin&#64;apple.com" title="Beth Dakin &lt;bdakin&#64;apple.com&gt;"> <span class="fn">Beth Dakin</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=144663#c5">comment #5</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=252527&amp;action=diff" name="attach_252527" title="Patch">attachment 252527</a> <a href="attachment.cgi?id=252527&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=252527&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=252527&amp;action=review</a>
&gt; 
&gt; &gt; Source/WebCore/page/mac/EventHandlerMac.mm:86
&gt; &gt; +    static NeverDestroyed&lt;RetainPtr&lt;NSEvent&gt;&gt; event;
&gt; 
&gt; Is it really right for this to be stored between views? That seems weird.
&gt; </span >

Hmm, maybe not. I was copying what's done for currentNSEventSlot(). I think it makes as much sense in this new case as it did in the old, but I'm a little unsure here.

<span class="quote">&gt; &gt; Source/WebCore/platform/mac/PlatformEventFactoryMac.mm:428
&gt; &gt; +        if ([event type] == NSEventTypePressure) {
&gt; 
&gt; You check this three times in this function. Maybe put it in a local?
&gt; </span >

Sure, I can fix this up.

<span class="quote">&gt; &gt; Source/WebCore/platform/mac/PlatformEventFactoryMac.mm:439
&gt; &gt; +    UNUSED_PARAM(lastPressureEvent);
&gt; 
&gt; Indentation is wrong I think.
&gt; </span >

Will look.

<span class="quote">&gt; &gt; Source/WebKit/mac/WebView/WebHTMLView.mm:-3844
&gt; &gt; -    [[[self _webView] _immediateActionController] webView:[self _webView] willHandleMouseDown:event];
&gt; 
&gt; Whaaaaaa?
&gt; </span >

This is because mouseDown used to come after the immediate action! Remember? We used to have shenanigans like this in WK2 as well, and we were able to remove them when we switched to delaysPrimaryMouseEvents:NO. This code was there purely because we were getting mouse down at a weird time.

<span class="quote">&gt; &gt; Source/WebKit/mac/WebView/WebViewData.h:178
&gt; &gt; +    NSEvent *pressureEvent;
&gt; 
&gt; Maybe lastPressureEvent?
&gt; </span >

Sure.

<span class="quote">&gt; Could you not keep this in EventHandler instead and avoid keeping it here?</span >

Hmmmmmmm. I'll have to think this over. This is a closer mirror to what we do in WK2. If we moved it to EventHandler, we would have WK1 only member variables there, which we actually manage to avoid at this point.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>