⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 201592 in webkit


Ignore:
Timestamp:
Jun 1, 2016, 10:21:30 PM (10 years ago)
Author:
BJ Burg
Message:

REGRESSION(r191907): Can't enter combining diacritic marks in Web Inspector fields
https://bugs.webkit.org/show_bug.cgi?id=158227
<rdar://problem/26232464>

Source/WebKit2:

Reviewed by Darin Adler and Alexey Proskuryakov.

Web Inspector uses a WKWebView subclass for the inspector frontend interface.
Since r191907, WKWebView does not have an inner WKView, and instead shares
a WebViewImpl to implement the same methods as WKView. So, WKView is no longer
involved at all when delivering keystrokes to the Web Inspector interface.

This caused a subtle regression where some keystrokes were not being interpreted
in the same way by AppKit because WKWebView does not conform to NSTextInputClient
but WKView does. AppKit won't automatically create a NSTextInputContext for a NSView
unless the subclass is declared as conforming to NSTextInputClient. Thus, the keystroke
never goes through NSTextInputContext machinery which converts the keystroke into
a combining diacritic character.

This regression is covered by a new API test.

  • UIProcess/API/Cocoa/WKWebView.mm: mark WKWebView as conforming to NSTextInputClient.

Tools:

Reviewed by Alexey Proskuryakov.

Add a regression test that runs on Mac only.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewTextInput.mm: Added.

(-[DummyNavigationDelegate webView:didFinishNavigation:]):
(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/editable-body.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r201591 r201592  
     12016-05-31  Brian Burg  <bburg@apple.com>
     2 
     3        REGRESSION(r191907): Can't enter combining diacritic marks in Web Inspector fields
     4        https://bugs.webkit.org/show_bug.cgi?id=158227
     5        <rdar://problem/26232464>
     6
     7        Reviewed by Darin Adler and Alexey Proskuryakov.
     8
     9        Web Inspector uses a WKWebView subclass for the inspector frontend interface.
     10        Since r191907, WKWebView does not have an inner WKView, and instead shares
     11        a WebViewImpl to implement the same methods as WKView. So, WKView is no longer
     12        involved at all when delivering keystrokes to the Web Inspector interface.
     13
     14        This caused a subtle regression where some keystrokes were not being interpreted
     15        in the same way by AppKit because WKWebView does not conform to NSTextInputClient
     16        but WKView does. AppKit won't automatically create a NSTextInputContext for a NSView
     17        unless the subclass is declared as conforming to NSTextInputClient. Thus, the keystroke
     18        never goes through NSTextInputContext machinery which converts the keystroke into
     19        a combining diacritic character.
     20
     21        This regression is covered by a new API test.
     22
     23        * UIProcess/API/Cocoa/WKWebView.mm: mark WKWebView as conforming to NSTextInputClient.
     24
    1252016-06-01  Dan Bernstein  <mitz@apple.com>
    226
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm

    r201351 r201592  
    169169#import <WebCore/ColorMac.h>
    170170
    171 @interface WKWebView () <WebViewImplDelegate>
     171@interface WKWebView () <WebViewImplDelegate, NSTextInputClient>
    172172@end
    173173#endif
  • trunk/Tools/ChangeLog

    r201568 r201592  
     12016-06-01  Brian Burg  <bburg@apple.com>
     2
     3        REGRESSION(r191907): Can't enter combining diacritic marks in Web Inspector fields
     4        https://bugs.webkit.org/show_bug.cgi?id=158227
     5        <rdar://problem/26232464>
     6
     7        Reviewed by Alexey Proskuryakov.
     8
     9        Add a regression test that runs on Mac only.
     10
     11        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
     12        * TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewTextInput.mm: Added.
     13        (-[DummyNavigationDelegate webView:didFinishNavigation:]):
     14        (TEST):
     15        * TestWebKitAPI/Tests/WebKit2Cocoa/editable-body.html: Added.
     16
    1172016-06-01  Chris Fleizach  <cfleizach@apple.com>
    218
  • trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj

    r201530 r201592  
    308308                93F1DB5714DB1B840024C362 /* NewFirstVisuallyNonEmptyLayoutFails_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93F1DB5614DB1B840024C362 /* NewFirstVisuallyNonEmptyLayoutFails_Bundle.cpp */; };
    309309                93F7E86F14DC8E5C00C84A99 /* NewFirstVisuallyNonEmptyLayoutFrames_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93F7E86E14DC8E5B00C84A99 /* NewFirstVisuallyNonEmptyLayoutFrames_Bundle.cpp */; };
     310                9984FACC1CFFAF60008D198C /* WKWebViewTextInput.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9984FACA1CFFAEEE008D198C /* WKWebViewTextInput.mm */; };
     311                9984FACE1CFFB090008D198C /* editable-body.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 9984FACD1CFFB038008D198C /* editable-body.html */; };
    310312                9B0786A31C58830F00D159E3 /* InjectedBundleMakeAllShadowRootsOpen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9B0786A21C58830F00D159E3 /* InjectedBundleMakeAllShadowRootsOpen.cpp */; };
    311313                9B0786A51C5885C300D159E3 /* InjectedBundleMakeAllShadowRootOpen_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9B0786A41C5885C300D159E3 /* InjectedBundleMakeAllShadowRootOpen_Bundle.cpp */; };
     
    430432                        dstSubfolderSpec = 7;
    431433                        files = (
     434                                9984FACE1CFFB090008D198C /* editable-body.html in Copy Resources */,
    432435                                51714EB41CF8C78C004723C4 /* WebProcessKillIDBCleanup-1.html in Copy Resources */,
    433436                                51714EB51CF8C78C004723C4 /* WebProcessKillIDBCleanup-2.html in Copy Resources */,
     
    768771                93F7E86B14DC8E4D00C84A99 /* NewFirstVisuallyNonEmptyLayoutFrames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NewFirstVisuallyNonEmptyLayoutFrames.cpp; sourceTree = "<group>"; };
    769772                93F7E86E14DC8E5B00C84A99 /* NewFirstVisuallyNonEmptyLayoutFrames_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NewFirstVisuallyNonEmptyLayoutFrames_Bundle.cpp; sourceTree = "<group>"; };
     773                9984FACA1CFFAEEE008D198C /* WKWebViewTextInput.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewTextInput.mm; sourceTree = "<group>"; };
     774                9984FACD1CFFB038008D198C /* editable-body.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "editable-body.html"; sourceTree = "<group>"; };
    770775                9B0786A21C58830F00D159E3 /* InjectedBundleMakeAllShadowRootsOpen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleMakeAllShadowRootsOpen.cpp; sourceTree = "<group>"; };
    771776                9B0786A41C5885C300D159E3 /* InjectedBundleMakeAllShadowRootOpen_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleMakeAllShadowRootOpen_Bundle.cpp; sourceTree = "<group>"; };
     
    10941099                                2D00065D1C1F58940088E6A7 /* WKPDFViewResizeCrash.mm */,
    10951100                                0F3B94A51A77266C00DE3272 /* WKWebViewEvaluateJavaScript.mm */,
     1101                                9984FACA1CFFAEEE008D198C /* WKWebViewTextInput.mm */,
    10961102                                51714EB61CF8C7A4004723C4 /* WebProcessKillIDBCleanup.mm */,
    10971103                        );
     
    11691175                        isa = PBXGroup;
    11701176                        children = (
     1177                                9984FACD1CFFB038008D198C /* editable-body.html */,
    11711178                                CDE195B21CFE0ADE0053D256 /* FullscreenTopContentInset.html */,
    11721179                                A16F66B91C40EA2000BD4D24 /* ContentFiltering.html */,
     
    18401847                                7CCE7EEC1A411AE600447C4C /* DOMWindowExtensionBasic.cpp in Sources */,
    18411848                                7CCE7EED1A411AE600447C4C /* DOMWindowExtensionNoCache.cpp in Sources */,
     1849                                9984FACC1CFFAF60008D198C /* WKWebViewTextInput.mm in Sources */,
    18421850                                7CCE7F231A411AF600447C4C /* Download.mm in Sources */,
    18431851                                7CCE7EEE1A411AE600447C4C /* DownloadDecideDestinationCrash.cpp in Sources */,
Note: See TracChangeset for help on using the changeset viewer.