Title: [237007] trunk/Source/WebCore
- Revision
- 237007
- Author
- [email protected]
- Date
- 2018-10-10 11:20:08 -0700 (Wed, 10 Oct 2018)
Log Message
[iOS] Compare input string to UIKeyInput constants using string comparison instead of pointer comparison
https://bugs.webkit.org/show_bug.cgi?id=190432
Reviewed by Tim Horton.
Pointer comparision is brittle. We should be more forgiving and perform string comparision
of an input string to a UIKeyInput constant.
* platform/ios/WebEvent.mm:
(normalizedStringWithAppKitCompatibilityMapping):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (237006 => 237007)
--- trunk/Source/WebCore/ChangeLog 2018-10-10 18:01:25 UTC (rev 237006)
+++ trunk/Source/WebCore/ChangeLog 2018-10-10 18:20:08 UTC (rev 237007)
@@ -1,3 +1,16 @@
+2018-10-10 Daniel Bates <[email protected]>
+
+ [iOS] Compare input string to UIKeyInput constants using string comparison instead of pointer comparison
+ https://bugs.webkit.org/show_bug.cgi?id=190432
+
+ Reviewed by Tim Horton.
+
+ Pointer comparision is brittle. We should be more forgiving and perform string comparision
+ of an input string to a UIKeyInput constant.
+
+ * platform/ios/WebEvent.mm:
+ (normalizedStringWithAppKitCompatibilityMapping):
+
2018-10-10 Chris Dumez <[email protected]>
Unreviewed, rolling out r236802.
Modified: trunk/Source/WebCore/platform/ios/WebEvent.mm (237006 => 237007)
--- trunk/Source/WebCore/platform/ios/WebEvent.mm 2018-10-10 18:01:25 UTC (rev 237006)
+++ trunk/Source/WebCore/platform/ios/WebEvent.mm 2018-10-10 18:20:08 UTC (rev 237007)
@@ -146,19 +146,19 @@
{
auto makeNSStringWithCharacter = [] (unichar c) { return [NSString stringWithCharacters:&c length:1]; };
- if (characters == UIKeyInputUpArrow)
+ if ([characters isEqualToString:UIKeyInputUpArrow])
return makeNSStringWithCharacter(NSUpArrowFunctionKey);
- if (characters == UIKeyInputDownArrow)
+ if ([characters isEqualToString:UIKeyInputDownArrow])
return makeNSStringWithCharacter(NSDownArrowFunctionKey);
- if (characters == UIKeyInputLeftArrow)
+ if ([characters isEqualToString:UIKeyInputLeftArrow])
return makeNSStringWithCharacter(NSLeftArrowFunctionKey);
- if (characters == UIKeyInputRightArrow)
+ if ([characters isEqualToString:UIKeyInputRightArrow])
return makeNSStringWithCharacter(NSRightArrowFunctionKey);
- if (characters == UIKeyInputPageUp)
+ if ([characters isEqualToString:UIKeyInputPageUp])
return makeNSStringWithCharacter(NSPageUpFunctionKey);
- if (characters == UIKeyInputPageDown)
+ if ([characters isEqualToString:UIKeyInputPageDown])
return makeNSStringWithCharacter(NSPageDownFunctionKey);
- if (characters == UIKeyInputEscape)
+ if ([characters isEqualToString:UIKeyInputEscape])
return @"\x1B";
if ([characters isEqualToString:@"\x1B"]) // Num Lock / Clear
return makeNSStringWithCharacter(NSClearLineFunctionKey);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes