| Differences between
and this patch
- a/Source/WebCore/ChangeLog +10 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2017-05-11  Tim Horton  <timothy_horton@apple.com>
2
3
        Mail spins launching spell checker when typing
4
        https://bugs.webkit.org/show_bug.cgi?id=171986
5
        <rdar://problem/26305327>
6
7
        Reviewed by NOBODY (OOPS!).
8
9
        * platform/spi/mac/NSSpellCheckerSPI.h:
10
1
2017-05-10  Tim Horton  <timothy_horton@apple.com>
11
2017-05-10  Tim Horton  <timothy_horton@apple.com>
2
12
3
        Add an experimental feature flag for viewport-fit
13
        Add an experimental feature flag for viewport-fit
- a/Source/WebKit/mac/ChangeLog +12 lines
Lines 1-3 a/Source/WebKit/mac/ChangeLog_sec1
1
2017-05-11  Tim Horton  <timothy_horton@apple.com>
2
3
        Mail spins launching spell checker when typing
4
        https://bugs.webkit.org/show_bug.cgi?id=171986
5
        <rdar://problem/26305327>
6
7
        Reviewed by NOBODY (OOPS!).
8
9
        * WebView/WebView.mm:
10
        (-[WebView setEditable:]):
11
        Asynchronously pre-warm the spell checker when a WebView becomes editable.
12
1
2017-05-10  Chris Dumez  <cdumez@apple.com>
13
2017-05-10  Chris Dumez  <cdumez@apple.com>
2
14
3
        Simplify relationship between Attr and Element now that Attr is childless
15
        Simplify relationship between Attr and Element now that Attr is childless
- a/Source/WebKit2/ChangeLog +16 lines
Lines 1-3 a/Source/WebKit2/ChangeLog_sec1
1
2017-05-11  Tim Horton  <timothy_horton@apple.com>
2
3
        Mail spins launching spell checker when typing
4
        https://bugs.webkit.org/show_bug.cgi?id=171986
5
        <rdar://problem/26305327>
6
7
        Reviewed by NOBODY (OOPS!).
8
9
        * UIProcess/API/Cocoa/WKWebView.mm:
10
        (-[WKWebView _setEditable:]):
11
        * UIProcess/Cocoa/WebViewImpl.h:
12
        * UIProcess/Cocoa/WebViewImpl.mm:
13
        (WebKit::WebViewImpl::didBecomeEditable):
14
        (WebKit::WebViewImpl::startObservingFontPanel): Deleted.
15
        Asynchronously pre-warm the spell checker when a WKWebView becomes editable.
16
1
2017-05-10  Tim Horton  <timothy_horton@apple.com>
17
2017-05-10  Tim Horton  <timothy_horton@apple.com>
2
18
3
        Add an experimental feature flag for viewport-fit
19
        Add an experimental feature flag for viewport-fit
- a/Source/WebCore/platform/spi/mac/NSSpellCheckerSPI.h +1 lines
Lines 35-40 extern NSString *NSTextCheckingInsertionPointKey; a/Source/WebCore/platform/spi/mac/NSSpellCheckerSPI.h_sec1
35
35
36
@interface NSSpellChecker ()
36
@interface NSSpellChecker ()
37
- (BOOL)deletesAutospaceBeforeString:(NSString *)string language:(NSString *)language;
37
- (BOOL)deletesAutospaceBeforeString:(NSString *)string language:(NSString *)language;
38
- (void)_preflightChosenSpellServer;
38
@end
39
@end
39
40
40
#endif
41
#endif
- a/Source/WebKit/mac/WebView/WebView.mm +5 lines
Lines 8056-8061 - (void)setEditable:(BOOL)flag a/Source/WebKit/mac/WebView/WebView.mm_sec1
8056
        _private->page->setEditable(flag);
8056
        _private->page->setEditable(flag);
8057
        if (!_private->tabKeyCyclesThroughElementsChanged)
8057
        if (!_private->tabKeyCyclesThroughElementsChanged)
8058
            _private->page->setTabKeyCyclesThroughElements(!flag);
8058
            _private->page->setTabKeyCyclesThroughElements(!flag);
8059
        if (flag) {
8060
            dispatch_async(dispatch_get_main_queue(), [] {
8061
                [[NSSpellChecker sharedSpellChecker] _preflightChosenSpellServer];
8062
            });
8063
        }
8059
        Frame* mainFrame = [self _mainCoreFrame];
8064
        Frame* mainFrame = [self _mainCoreFrame];
8060
        if (mainFrame) {
8065
        if (mainFrame) {
8061
            if (flag) {
8066
            if (flag) {
- a/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm -1 / +2 lines
Lines 3629-3635 - (void)_setEditable:(BOOL)editable a/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm_sec1
3629
{
3629
{
3630
    _page->setEditable(editable);
3630
    _page->setEditable(editable);
3631
#if PLATFORM(MAC)
3631
#if PLATFORM(MAC)
3632
    _impl->startObservingFontPanel();
3632
    if (editable)
3633
        _impl->didBecomeEditable();
3633
#endif
3634
#endif
3634
}
3635
}
3635
3636
- a/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h -1 / +1 lines
Lines 287-293 public: a/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h_sec1
287
    id validRequestorForSendAndReturnTypes(NSString *sendType, NSString *returnType);
287
    id validRequestorForSendAndReturnTypes(NSString *sendType, NSString *returnType);
288
    void centerSelectionInVisibleArea();
288
    void centerSelectionInVisibleArea();
289
    void selectionDidChange();
289
    void selectionDidChange();
290
    void startObservingFontPanel();
290
    void didBecomeEditable();
291
    void updateFontPanelIfNeeded();
291
    void updateFontPanelIfNeeded();
292
    void changeFontFromFontPanel();
292
    void changeFontFromFontPanel();
293
    bool validateUserInterfaceItem(id <NSValidatedUserInterfaceItem>);
293
    bool validateUserInterfaceItem(id <NSValidatedUserInterfaceItem>);
- a/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm -1 / +5 lines
Lines 2610-2618 void WebViewImpl::selectionDidChange() a/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm_sec1
2610
#endif
2610
#endif
2611
}
2611
}
2612
2612
2613
void WebViewImpl::startObservingFontPanel()
2613
void WebViewImpl::didBecomeEditable()
2614
{
2614
{
2615
    [m_windowVisibilityObserver startObservingFontPanel];
2615
    [m_windowVisibilityObserver startObservingFontPanel];
2616
2617
    dispatch_async(dispatch_get_main_queue(), [] {
2618
        [[NSSpellChecker sharedSpellChecker] _preflightChosenSpellServer];
2619
    });
2616
}
2620
}
2617
2621
2618
void WebViewImpl::updateFontPanelIfNeeded()
2622
void WebViewImpl::updateFontPanelIfNeeded()

Return to Bug 171986