<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[200901] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/200901">200901</a></dd>
<dt>Author</dt> <dd>ryanhaddad@apple.com</dd>
<dt>Date</dt> <dd>2016-05-13 17:03:43 -0700 (Fri, 13 May 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/200894">r200894</a>.
https://bugs.webkit.org/show_bug.cgi?id=157695
This change broke the iOS build (Requested by ryanhaddad on
#webkit).
Reverted changeset:
"Remove unused initializer for WebEvent on iOS."
https://bugs.webkit.org/show_bug.cgi?id=157689
http://trac.webkit.org/changeset/200894
Patch by Commit Queue <commit-queue@webkit.org> on 2016-05-13</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformiosWebEventh">trunk/Source/WebCore/platform/ios/WebEvent.h</a></li>
<li><a href="#trunkSourceWebCoreplatformiosWebEventmm">trunk/Source/WebCore/platform/ios/WebEvent.mm</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebHTMLViewmm">trunk/Source/WebKit/mac/WebView/WebHTMLView.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (200900 => 200901)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-05-14 00:01:21 UTC (rev 200900)
+++ trunk/Source/WebCore/ChangeLog        2016-05-14 00:03:43 UTC (rev 200901)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-05-13 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r200894.
+ https://bugs.webkit.org/show_bug.cgi?id=157695
+
+ This change broke the iOS build (Requested by ryanhaddad on
+ #webkit).
+
+ Reverted changeset:
+
+ "Remove unused initializer for WebEvent on iOS."
+ https://bugs.webkit.org/show_bug.cgi?id=157689
+ http://trac.webkit.org/changeset/200894
+
</ins><span class="cx"> 2016-05-13 Brady Eidson <beidson@apple.com>
</span><span class="cx">
</span><span class="cx"> Rename all protector variables that should be called `protectedThis`
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformiosWebEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/WebEvent.h (200900 => 200901)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/WebEvent.h        2016-05-14 00:01:21 UTC (rev 200900)
+++ trunk/Source/WebCore/platform/ios/WebEvent.h        2016-05-14 00:03:43 UTC (rev 200901)
</span><span class="lines">@@ -86,9 +86,11 @@
</span><span class="cx"> NSString *_charactersIgnoringModifiers;
</span><span class="cx"> WebEventFlags _modifierFlags;
</span><span class="cx"> BOOL _keyRepeating;
</span><ins>+ BOOL _popupVariant; // FIXME: to be removed
</ins><span class="cx"> NSUInteger _keyboardFlags;
</span><span class="cx"> uint16_t _keyCode;
</span><span class="cx"> BOOL _tabKey;
</span><ins>+ WebEventCharacterSet _characterSet;
</ins><span class="cx">
</span><span class="cx"> float _deltaX;
</span><span class="cx"> float _deltaY;
</span><span class="lines">@@ -125,12 +127,24 @@
</span><span class="cx"> gestureScale:(float)gestureScale
</span><span class="cx"> gestureRotation:(float)gestureRotation;
</span><span class="cx">
</span><ins>+// FIXME: this is deprecated. It will be removed when UIKit adopts the new one below.
</ins><span class="cx"> - (WebEvent *)initWithKeyEventType:(WebEventType)type
</span><span class="cx"> timeStamp:(CFTimeInterval)timeStamp
</span><span class="cx"> characters:(NSString *)characters
</span><span class="cx"> charactersIgnoringModifiers:(NSString *)charactersIgnoringModifiers
</span><span class="cx"> modifiers:(WebEventFlags)modifiers
</span><span class="cx"> isRepeating:(BOOL)repeating
</span><ins>+ isPopupVariant:(BOOL)popupVariant
+ keyCode:(uint16_t)keyCode
+ isTabKey:(BOOL)tabKey
+ characterSet:(WebEventCharacterSet)characterSet;
+
+- (WebEvent *)initWithKeyEventType:(WebEventType)type
+ timeStamp:(CFTimeInterval)timeStamp
+ characters:(NSString *)characters
+ charactersIgnoringModifiers:(NSString *)charactersIgnoringModifiers
+ modifiers:(WebEventFlags)modifiers
+ isRepeating:(BOOL)repeating
</ins><span class="cx"> withFlags:(NSUInteger)flags
</span><span class="cx"> keyCode:(uint16_t)keyCode
</span><span class="cx"> isTabKey:(BOOL)tabKey
</span><span class="lines">@@ -148,9 +162,12 @@
</span><span class="cx"> @property(nonatomic, readonly) WebEventFlags modifierFlags;
</span><span class="cx"> @property(nonatomic, readonly, getter = isKeyRepeating) BOOL keyRepeating;
</span><span class="cx">
</span><ins>+// FIXME: this is deprecated. It will be removed when UIKit adopts the new initWithKeyEventType.
+@property(nonatomic, readonly, getter = isPopupVariant) BOOL popupVariant;
</ins><span class="cx"> @property(nonatomic, readonly) NSUInteger keyboardFlags;
</span><span class="cx"> @property(nonatomic, readonly) uint16_t keyCode;
</span><span class="cx"> @property(nonatomic, readonly, getter = isTabKey) BOOL tabKey;
</span><ins>+@property(nonatomic, readonly) WebEventCharacterSet characterSet;
</ins><span class="cx">
</span><span class="cx"> // Scroll Wheel
</span><span class="cx"> @property(nonatomic, readonly) float deltaX;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformiosWebEventmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/WebEvent.mm (200900 => 200901)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/WebEvent.mm        2016-05-14 00:01:21 UTC (rev 200900)
+++ trunk/Source/WebCore/platform/ios/WebEvent.mm        2016-05-14 00:03:43 UTC (rev 200901)
</span><span class="lines">@@ -127,12 +127,54 @@
</span><span class="cx"> charactersIgnoringModifiers:(NSString *)charactersIgnoringModifiers
</span><span class="cx"> modifiers:(WebEventFlags)modifiers
</span><span class="cx"> isRepeating:(BOOL)repeating
</span><ins>+ isPopupVariant:(BOOL)popupVariant
+ keyCode:(uint16_t)keyCode
+ isTabKey:(BOOL)tabKey
+ characterSet:(WebEventCharacterSet)characterSet
+{
+ self = [super init];
+ if (!self)
+ return nil;
+
+ _type = type;
+ _timestamp = timeStamp;
+
+ _characters = [characters retain];
+ _charactersIgnoringModifiers = [charactersIgnoringModifiers retain];
+ _modifierFlags = modifiers;
+ _keyRepeating = repeating;
+ _popupVariant = popupVariant;
+ _tabKey = tabKey;
+ _characterSet = characterSet;
+
+ if (keyCode)
+ _keyCode = windowsKeyCodeForKeyCode(keyCode);
+
+ // NOTE: this preserves the original semantics which used the
+ // characters string for the keyCode. This should be changed in iOS 4.0 to
+ // allow the client to explicitly specify a keyCode, otherwise default to
+ // mapping the characters string to a keyCode.
+ // e.g. add an 'else' before this 'if'.
+ if ([charactersIgnoringModifiers length] == 1) {
+ unichar ch = [charactersIgnoringModifiers characterAtIndex:0];
+ _keyCode = windowsKeyCodeForCharCodeIOS(ch);
+ }
+
+ return self;
+}
+
+
+- (WebEvent *)initWithKeyEventType:(WebEventType)type
+ timeStamp:(CFTimeInterval)timeStamp
+ characters:(NSString *)characters
+ charactersIgnoringModifiers:(NSString *)charactersIgnoringModifiers
+ modifiers:(WebEventFlags)modifiers
+ isRepeating:(BOOL)repeating
</ins><span class="cx"> withFlags:(NSUInteger)flags
</span><span class="cx"> keyCode:(uint16_t)keyCode
</span><span class="cx"> isTabKey:(BOOL)tabKey
</span><span class="cx"> characterSet:(WebEventCharacterSet)characterSet
</span><span class="cx"> {
</span><del>- UNUSED_PARAM(characterSet);
</del><span class="cx"> self = [super init];
</span><span class="cx"> if (!self)
</span><span class="cx"> return nil;
</span><span class="lines">@@ -146,6 +188,7 @@
</span><span class="cx"> _keyRepeating = repeating;
</span><span class="cx"> _keyboardFlags = flags;
</span><span class="cx"> _tabKey = tabKey;
</span><ins>+ _characterSet = characterSet;
</ins><span class="cx">
</span><span class="cx"> if (keyCode)
</span><span class="cx"> _keyCode = windowsKeyCodeForKeyCode(keyCode);
</span><span class="lines">@@ -233,6 +276,25 @@
</span><span class="cx"> return @"Unknown";
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (NSString *)_characterSetDescription
+{
+ switch (_characterSet) {
+ case WebEventCharacterSetASCII:
+ return @"WebEventCharacterSetASCII";
+ case WebEventCharacterSetSymbol:
+ return @"WebEventCharacterSetSymbol";
+ case WebEventCharacterSetDingbats:
+ return @"WebEventCharacterSetDingbats";
+ case WebEventCharacterSetUnicode:
+ return @"WebEventCharacterSetUnicode";
+ case WebEventCharacterSetFunctionKeys:
+ return @"WebEventCharacterSetFunctionKeys";
+ default:
+ ASSERT_NOT_REACHED();
+ }
+ return @"Unknown";
+}
+
</ins><span class="cx"> - (NSString *)_touchLocationsDescription:(NSArray *)locations
</span><span class="cx"> {
</span><span class="cx"> BOOL shouldAddComma = NO;
</span><span class="lines">@@ -297,7 +359,7 @@
</span><span class="cx"> return [NSString stringWithFormat:@"location: (%f, %f) deltaX: %f deltaY: %f", _locationInWindow.x, _locationInWindow.y, _deltaX, _deltaY];
</span><span class="cx"> case WebEventKeyDown:
</span><span class="cx"> case WebEventKeyUp:
</span><del>- return [NSString stringWithFormat:@"chars: %@ charsNoModifiers: %@ flags: %d repeating: %d keyboardFlags: %lu keyCode %d, isTab: %d", _characters, _charactersIgnoringModifiers, _modifierFlags, _keyRepeating, static_cast<unsigned long>(_keyboardFlags), _keyCode, _tabKey];
</del><ins>+ return [NSString stringWithFormat:@"chars: %@ charsNoModifiers: %@ flags: %d repeating: %d keyboardFlags: %lu keyCode %d, isTab: %d charSet: %@", _characters, _charactersIgnoringModifiers, _modifierFlags, _keyRepeating, static_cast<unsigned long>(_keyboardFlags), _keyCode, _tabKey, [self _characterSetDescription]];
</ins><span class="cx"> case WebEventTouchBegin:
</span><span class="cx"> case WebEventTouchChange:
</span><span class="cx"> case WebEventTouchEnd:
</span><span class="lines">@@ -346,6 +408,13 @@
</span><span class="cx"> return _keyRepeating;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+// FIXME: to be removed
+- (BOOL)isPopupVariant
+{
+ ASSERT(_type == WebEventKeyDown || _type == WebEventKeyUp);
+ return _popupVariant;
+}
+
</ins><span class="cx"> - (NSUInteger)keyboardFlags
</span><span class="cx"> {
</span><span class="cx"> ASSERT(_type == WebEventKeyDown || _type == WebEventKeyUp);
</span><span class="lines">@@ -364,6 +433,12 @@
</span><span class="cx"> return _tabKey;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (WebEventCharacterSet)characterSet
+{
+ ASSERT(_type == WebEventKeyDown || _type == WebEventKeyUp);
+ return _characterSet;
+}
+
</ins><span class="cx"> - (float)deltaX
</span><span class="cx"> {
</span><span class="cx"> ASSERT(_type == WebEventScrollWheel);
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (200900 => 200901)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-05-14 00:01:21 UTC (rev 200900)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-05-14 00:03:43 UTC (rev 200901)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-05-13 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r200894.
+ https://bugs.webkit.org/show_bug.cgi?id=157695
+
+ This change broke the iOS build (Requested by ryanhaddad on
+ #webkit).
+
+ Reverted changeset:
+
+ "Remove unused initializer for WebEvent on iOS."
+ https://bugs.webkit.org/show_bug.cgi?id=157689
+ http://trac.webkit.org/changeset/200894
+
</ins><span class="cx"> 2016-05-13 Enrica Casucci <enrica@apple.com>
</span><span class="cx">
</span><span class="cx"> Remove unused initializer for WebEvent on iOS.
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebHTMLViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (200900 => 200901)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm        2016-05-14 00:01:21 UTC (rev 200900)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm        2016-05-14 00:03:43 UTC (rev 200901)
</span><span class="lines">@@ -6511,6 +6511,10 @@
</span><span class="cx"> #define kWebBackspaceKey 0x0008
</span><span class="cx"> #define kWebReturnKey 0x000d
</span><span class="cx"> #define kWebDeleteKey 0x007F
</span><ins>+#define kWebLeftArrowKey 0x00AC
+#define kWebUpArrowKey 0x00AD
+#define kWebRightArrowKey 0x00AE
+#define kWebDownArrowKey 0x00AF
</ins><span class="cx"> #define kWebDeleteForwardKey 0xF728
</span><span class="cx">
</span><span class="cx"> - (BOOL)_handleEditingKeyEvent:(KeyboardEvent *)wcEvent
</span><span class="lines">@@ -6522,36 +6526,79 @@
</span><span class="cx"> // embedded as the whole view, as in Mail, and tabs should input tabs as expected
</span><span class="cx"> // in a text editor.
</span><span class="cx">
</span><ins>+ // FIXME - this code will break when content editable is supported.
</ins><span class="cx"> if (const PlatformKeyboardEvent* platformEvent = wcEvent->keyEvent()) {
</span><span class="cx"> WebEvent *event = platformEvent->event();
</span><span class="cx"> if (![[self _webView] isEditable] && event.isTabKey)
</span><span class="cx"> return NO;
</span><span class="cx">
</span><del>- NSString *s = [event characters];
- if (!s.length)
- return NO;
- WebView* webView = [self _webView];
- switch ([s characterAtIndex:0]) {
- case kWebBackspaceKey:
- case kWebDeleteKey:
- [[webView _UIKitDelegateForwarder] deleteFromInputWithFlags:event.keyboardFlags];
- return YES;
- case kWebEnterKey:
- case kWebReturnKey:
- if (platformEvent->type() == PlatformKeyboardEvent::Char) {
- // Map \r from HW keyboard to \n to match the behavior of the soft keyboard.
- [[webView _UIKitDelegateForwarder] addInputString:@"\n" withFlags:0];
- return YES;
</del><ins>+ // Now process the key normally
+ BOOL shift = platformEvent->shiftKey();
+
+ switch (event.characterSet) {
+ case WebEventCharacterSetSymbol: {
+ SEL sel = 0;
+ NSString *s = [event charactersIgnoringModifiers];
+ if ([s length] == 0)
+ break;
+ switch ([s characterAtIndex:0]) {
+ case kWebLeftArrowKey:
+ sel = shift ? @selector(moveLeftAndModifySelection:) : @selector(moveLeft:);
+ break;
+ case kWebUpArrowKey:
+ sel = shift ? @selector(moveUpAndModifySelection:) : @selector(moveUp:);
+ break;
+ case kWebRightArrowKey:
+ sel = shift ? @selector(moveRightAndModifySelection:) : @selector(moveRight:);
+ break;
+ case kWebDownArrowKey:
+ sel = shift ? @selector(moveDownAndModifySelection:) : @selector(moveDown:);
+ break;
+ }
+ if (sel) {
+ [self performSelector:sel withObject:self];
+ return YES;
+ }
+ break;
</ins><span class="cx"> }
</span><del>- break;
- case kWebDeleteForwardKey:
- [self deleteForward:self];
- return YES;
- default:
- if (platformEvent->type() == PlatformKeyboardEvent::Char) {
- [[webView _UIKitDelegateForwarder] addInputString:event.characters withFlags:event.keyboardFlags];
- return YES;
</del><ins>+ case WebEventCharacterSetASCII:
+ case WebEventCharacterSetUnicode: {
+ NSString *s = [event characters];
+ if ([s length] == 0)
+ break;
+ WebView* webView = [self _webView];
+ switch ([s characterAtIndex:0]) {
+ case kWebBackspaceKey:
+ case kWebDeleteKey:
+ // FIXME: remove the call to deleteFromInput when UIKit implements deleteFromInputWithFlags.
+ if ([webView respondsToSelector:@selector(deleteFromInputWithFlags:)])
+ [[webView _UIKitDelegateForwarder] deleteFromInputWithFlags:event.keyboardFlags];
+ else
+ [[webView _UIKitDelegateForwarder] deleteFromInput];
+ return YES;
+ case kWebEnterKey:
+ case kWebReturnKey:
+ if (platformEvent->type() == PlatformKeyboardEvent::Char) {
+ // Map \r from HW keyboard to \n to match the behavior of the soft keyboard.
+ [[webView _UIKitDelegateForwarder] addInputString:@"\n" withFlags:0];
+ return YES;
+ }
+ return NO;
+ case kWebDeleteForwardKey:
+ [self deleteForward:self];
+ return YES;
+ default: {
+ if (platformEvent->type() == PlatformKeyboardEvent::Char) {
+ [[webView _UIKitDelegateForwarder] addInputString:event.characters withFlags:event.keyboardFlags];
+ return YES;
+ }
+ return NO;
+ }
+ }
+ break;
</ins><span class="cx"> }
</span><ins>+ default:
+ return NO;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> return NO;
</span></span></pre>
</div>
</div>
</body>
</html>