<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Support TouchBar in WebKit"
   href="https://bugs.webkit.org/show_bug.cgi?id=164437#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Support TouchBar in WebKit"
   href="https://bugs.webkit.org/show_bug.cgi?id=164437">bug 164437</a>
              from <span class="vcard"><a class="email" href="mailto:thorton&#64;apple.com" title="Tim Horton &lt;thorton&#64;apple.com&gt;"> <span class="fn">Tim Horton</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=293959&amp;action=diff" name="attach_293959" title="Patch">attachment 293959</a> <a href="attachment.cgi?id=293959&amp;action=edit" title="Patch">[details]</a></span>
Patch

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

<span class="quote">&gt; Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:176
&gt; +#if HAVE(TOUCH_BAR)</span >

I think this would look less ugly as its own class extension (you can have as many as you want!) but either way is fine.

<span class="quote">&gt; Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:4573
&gt; +    return NO;</span >

If HAVE(TOUCH_BAR) is true, you return twice?

<span class="quote">&gt; Source/WebKit2/UIProcess/API/mac/WKView.mm:1505
&gt; +    return NO;</span >

And here.

<span class="quote">&gt; Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm:971
&gt; +            NSTextAlignment textAlignment;
&gt; +            switch (editorState.postLayoutData().textAlignment) {
&gt; +            case NoAlignment:
&gt; +                textAlignment = NSTextAlignmentNatural;
&gt; +                break;</span >

Should factor this out. Maybe we already have one?

<span class="quote">&gt; Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm:1111
&gt; +    CFNotificationCenterRemoveObserver(CFNotificationCenterGetLocalCenter(), this, (__bridge CFStringRef)NSTouchBarDidExitCustomization, 0);</span >

__bridge? In non-ARC code?

<span class="quote">&gt; Source/WebKit/mac/WebView/WebView.mm:5136
&gt; +#if HAVE(TOUCH_BAR)</span >

Why not around the whole thing?

<span class="quote">&gt; Source/WebKit/mac/WebView/WebView.mm:6865
&gt; +    NSRange resultRange = [nsResult range];</span >

Dots.

<span class="quote">&gt; Source/WebKit/mac/WebView/WebView.mm:6868
&gt; +    result.replacement = [nsResult replacementString];</span >

Dots.

<span class="quote">&gt; Source/WebKit/mac/WebView/WebView.mm:9465
&gt; +                NSTextAlignment textAlignment;
&gt; +                switch (style-&gt;textAlign()) {
&gt; +                case RIGHT:
&gt; +                case WEBKIT_RIGHT:
&gt; +                    textAlignment = NSTextAlignmentRight;</span >

And again.</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>