<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:simon.fraser&#64;apple.com" title="Simon Fraser (smfr) &lt;simon.fraser&#64;apple.com&gt;"> <span class="fn">Simon Fraser (smfr)</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Use _NSScrollingPredominantAxisFilter for wheel event filtering on Mac"
   href="https://bugs.webkit.org/show_bug.cgi?id=147320">bug 147320</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #259483 Flags</td>
           <td>review?
           </td>
           <td>review-
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Use _NSScrollingPredominantAxisFilter for wheel event filtering on Mac"
   href="https://bugs.webkit.org/show_bug.cgi?id=147320#c15">Comment # 15</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Use _NSScrollingPredominantAxisFilter for wheel event filtering on Mac"
   href="https://bugs.webkit.org/show_bug.cgi?id=147320">bug 147320</a>
              from <span class="vcard"><a class="email" href="mailto:simon.fraser&#64;apple.com" title="Simon Fraser (smfr) &lt;simon.fraser&#64;apple.com&gt;"> <span class="fn">Simon Fraser (smfr)</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=259483&amp;action=diff" name="attach_259483" title="Patch">attachment 259483</a> <a href="attachment.cgi?id=259483&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=259483&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=259483&amp;action=review</a>

<span class="quote">&gt; Source/WebCore/page/WheelEventDeltaFilter.cpp:34
&gt; +    : m_currentFilteredDelta(0, 0)</span >

No need to initialize FloatSize.

<span class="quote">&gt; Source/WebCore/page/WheelEventDeltaFilter.cpp:44
&gt; +    , m_deltaTracker(WheelEventDeltaTracker())</span >

No need to explicitly call zero-argument constructor.

<span class="quote">&gt; Source/WebCore/page/WheelEventDeltaFilter.h:50
&gt; +class WheelEventDeltaFilterPlatformInvariant final : public WheelEventDeltaFilter {</span >

&quot;PlatformInvariant&quot; seems like naming overkill. Maybe BasicWheelEventDeltaFilter

<span class="quote">&gt; Source/WebCore/page/WheelEventDeltaFilter.h:60
&gt; +    WheelEventDeltaTracker m_deltaTracker;</span >

Why does WheelEventDeltaTracker exist independently from this class? Can it just be merged into this?

<span class="quote">&gt; Source/WebCore/page/mac/WheelEventDeltaFilterMac.mm:31
&gt; +#import &lt;AppKit/NSScrollingInputFilter_Private.h&gt;</span >

This will need some SPI header stuff.

<span class="quote">&gt; Source/WebCore/page/mac/WheelEventDeltaFilterMac.mm:83
&gt; +bool WheelEventDeltaFilterMac::isFilteringDeltas() const
&gt; +{
&gt; +    return m_isFilteringDeltas;
&gt; +}
&gt; +
&gt; +FloatSize WheelEventDeltaFilterMac::filteredDelta() const
&gt; +{
&gt; +    return m_currentFilteredDelta;
&gt; +}
&gt; +    
&gt; +FloatSize WheelEventDeltaFilterMac::filteredVelocity() const
&gt; +{
&gt; +    return m_currentFilteredVelocity;
&gt; +}</span >

These could all be inline.

<span class="quote">&gt; Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp:66
&gt; +#if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101100
&gt; +    , m_recentWheelEventDeltaFilter(std::make_unique&lt;WheelEventDeltaFilterMac&gt;())
&gt; +#else
&gt; +    , m_recentWheelEventDeltaFilter(std::make_unique&lt;WheelEventDeltaFilterPlatformInvariant&gt;())
&gt; +#endif</span >

Shame to see all this here. Maybe add static WheelEventDeltaFilter::create() which is implemented per-platform.</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>