<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@apple.com" title="Tim Horton <thorton@apple.com>"> <span class="fn">Tim Horton</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=293959&action=diff" name="attach_293959" title="Patch">attachment 293959</a> <a href="attachment.cgi?id=293959&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=293959&action=review">https://bugs.webkit.org/attachment.cgi?id=293959&action=review</a>
<span class="quote">> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:176
> +#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">> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:4573
> + return NO;</span >
If HAVE(TOUCH_BAR) is true, you return twice?
<span class="quote">> Source/WebKit2/UIProcess/API/mac/WKView.mm:1505
> + return NO;</span >
And here.
<span class="quote">> Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm:971
> + NSTextAlignment textAlignment;
> + switch (editorState.postLayoutData().textAlignment) {
> + case NoAlignment:
> + textAlignment = NSTextAlignmentNatural;
> + break;</span >
Should factor this out. Maybe we already have one?
<span class="quote">> Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm:1111
> + CFNotificationCenterRemoveObserver(CFNotificationCenterGetLocalCenter(), this, (__bridge CFStringRef)NSTouchBarDidExitCustomization, 0);</span >
__bridge? In non-ARC code?
<span class="quote">> Source/WebKit/mac/WebView/WebView.mm:5136
> +#if HAVE(TOUCH_BAR)</span >
Why not around the whole thing?
<span class="quote">> Source/WebKit/mac/WebView/WebView.mm:6865
> + NSRange resultRange = [nsResult range];</span >
Dots.
<span class="quote">> Source/WebKit/mac/WebView/WebView.mm:6868
> + result.replacement = [nsResult replacementString];</span >
Dots.
<span class="quote">> Source/WebKit/mac/WebView/WebView.mm:9465
> + NSTextAlignment textAlignment;
> + switch (style->textAlign()) {
> + case RIGHT:
> + case WEBKIT_RIGHT:
> + 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>