<!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>[170321] trunk/Source/WebKit2</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/170321">170321</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2014-06-23 14:33:34 -0700 (Mon, 23 Jun 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Don't use the WK prefix for internal C++ types
https://bugs.webkit.org/show_bug.cgi?id=134214
Reviewed by Dan Bernstein.
* Shared/AssistedNodeInformation.cpp:
(WebKit::OptionItem::encode):
(WebKit::OptionItem::decode):
(WebKit::WKOptionItem::encode): Deleted.
(WebKit::WKOptionItem::decode): Deleted.
* Shared/AssistedNodeInformation.h:
(WebKit::OptionItem::OptionItem):
(WebKit::AssistedNodeInformation::AssistedNodeInformation):
(WebKit::WKOptionItem::WKOptionItem): Deleted.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _requiresKeyboardWhenFirstResponder]):
(-[WKContentView inputView]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView _updateAccessory]):
(-[WKContentView textInputTraits]):
(-[WKContentView assistedNodeSelectOptions]):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
(-[WKContentView _stopAssistingNode]):
* UIProcess/ios/forms/WKFormInputControl.mm:
(-[WKDateTimePicker initWithView:datePickerMode:]):
(-[WKFormInputControl initWithView:]):
* UIProcess/ios/forms/WKFormSelectControl.h:
* UIProcess/ios/forms/WKFormSelectControl.mm:
(adjustedFontSize):
* UIProcess/ios/forms/WKFormSelectPicker.mm:
(-[WKOptionPickerCell initWithOptionItem:]):
(-[WKOptionGroupPickerCell initWithOptionItem:]):
(-[WKMultipleSelectPicker initWithView:]):
(-[WKMultipleSelectPicker pickerView:viewForRow:forComponent:reusingView:]):
(-[WKMultipleSelectPicker pickerView:row:column:checked:]):
(-[WKSelectSinglePicker pickerView:attributedTitleForRow:forComponent:]):
(-[WKSelectSinglePicker pickerView:didSelectRow:inComponent:]):
* UIProcess/ios/forms/WKFormSelectPopover.mm:
(-[WKSelectTableViewController initWithView:hasGroups:]):
(-[WKSelectTableViewController tableView:numberOfRowsInSection:]):
(-[WKSelectTableViewController tableView:titleForHeaderInSection:]):
(-[WKSelectTableViewController populateCell:withItem:]):
(-[WKSelectTableViewController findItemIndexAt:]):
(-[WKSelectTableViewController findItemAt:]):
(-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
(-[WKSelectTableViewController tableView:didSelectRowAtIndexPath:]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getAssistedNodeInformation):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedAssistedNodeInformationcpp">trunk/Source/WebKit2/Shared/AssistedNodeInformation.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedAssistedNodeInformationh">trunk/Source/WebKit2/Shared/AssistedNodeInformation.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewInteractionh">trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewInteractionmm">trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosformsWKFormInputControlmm">trunk/Source/WebKit2/UIProcess/ios/forms/WKFormInputControl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosformsWKFormSelectControlh">trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosformsWKFormSelectControlmm">trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosformsWKFormSelectPickermm">trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectPicker.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosformsWKFormSelectPopovermm">trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectPopover.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm">trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (170320 => 170321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-06-23 21:32:43 UTC (rev 170320)
+++ trunk/Source/WebKit2/ChangeLog        2014-06-23 21:33:34 UTC (rev 170321)
</span><span class="lines">@@ -1,3 +1,55 @@
</span><ins>+2014-06-23 Anders Carlsson <andersca@apple.com>
+
+ Don't use the WK prefix for internal C++ types
+ https://bugs.webkit.org/show_bug.cgi?id=134214
+
+ Reviewed by Dan Bernstein.
+
+ * Shared/AssistedNodeInformation.cpp:
+ (WebKit::OptionItem::encode):
+ (WebKit::OptionItem::decode):
+ (WebKit::WKOptionItem::encode): Deleted.
+ (WebKit::WKOptionItem::decode): Deleted.
+ * Shared/AssistedNodeInformation.h:
+ (WebKit::OptionItem::OptionItem):
+ (WebKit::AssistedNodeInformation::AssistedNodeInformation):
+ (WebKit::WKOptionItem::WKOptionItem): Deleted.
+ * UIProcess/ios/WKContentViewInteraction.h:
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView _requiresKeyboardWhenFirstResponder]):
+ (-[WKContentView inputView]):
+ (-[WKContentView requiresAccessoryView]):
+ (-[WKContentView _updateAccessory]):
+ (-[WKContentView textInputTraits]):
+ (-[WKContentView assistedNodeSelectOptions]):
+ (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
+ (-[WKContentView _stopAssistingNode]):
+ * UIProcess/ios/forms/WKFormInputControl.mm:
+ (-[WKDateTimePicker initWithView:datePickerMode:]):
+ (-[WKFormInputControl initWithView:]):
+ * UIProcess/ios/forms/WKFormSelectControl.h:
+ * UIProcess/ios/forms/WKFormSelectControl.mm:
+ (adjustedFontSize):
+ * UIProcess/ios/forms/WKFormSelectPicker.mm:
+ (-[WKOptionPickerCell initWithOptionItem:]):
+ (-[WKOptionGroupPickerCell initWithOptionItem:]):
+ (-[WKMultipleSelectPicker initWithView:]):
+ (-[WKMultipleSelectPicker pickerView:viewForRow:forComponent:reusingView:]):
+ (-[WKMultipleSelectPicker pickerView:row:column:checked:]):
+ (-[WKSelectSinglePicker pickerView:attributedTitleForRow:forComponent:]):
+ (-[WKSelectSinglePicker pickerView:didSelectRow:inComponent:]):
+ * UIProcess/ios/forms/WKFormSelectPopover.mm:
+ (-[WKSelectTableViewController initWithView:hasGroups:]):
+ (-[WKSelectTableViewController tableView:numberOfRowsInSection:]):
+ (-[WKSelectTableViewController tableView:titleForHeaderInSection:]):
+ (-[WKSelectTableViewController populateCell:withItem:]):
+ (-[WKSelectTableViewController findItemIndexAt:]):
+ (-[WKSelectTableViewController findItemAt:]):
+ (-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
+ (-[WKSelectTableViewController tableView:didSelectRowAtIndexPath:]):
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::getAssistedNodeInformation):
+
</ins><span class="cx"> 2014-06-23 Dan Bernstein <mitz@apple.com>
</span><span class="cx">
</span><span class="cx"> [Cocoa] No way to grant storage quotas for web application cache
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAssistedNodeInformationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/AssistedNodeInformation.cpp (170320 => 170321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/AssistedNodeInformation.cpp        2014-06-23 21:32:43 UTC (rev 170320)
+++ trunk/Source/WebKit2/Shared/AssistedNodeInformation.cpp        2014-06-23 21:33:34 UTC (rev 170321)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-void WKOptionItem::encode(IPC::ArgumentEncoder& encoder) const
</del><ins>+void OptionItem::encode(IPC::ArgumentEncoder& encoder) const
</ins><span class="cx"> {
</span><span class="cx"> encoder << text;
</span><span class="cx"> encoder << isGroup;
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> encoder << parentGroupID;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool WKOptionItem::decode(IPC::ArgumentDecoder& decoder, WKOptionItem& result)
</del><ins>+bool OptionItem::decode(IPC::ArgumentDecoder& decoder, OptionItem& result)
</ins><span class="cx"> {
</span><span class="cx"> if (!decoder.decode(result.text))
</span><span class="cx"> return false;
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAssistedNodeInformationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/AssistedNodeInformation.h (170320 => 170321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/AssistedNodeInformation.h        2014-06-23 21:32:43 UTC (rev 170320)
+++ trunk/Source/WebKit2/Shared/AssistedNodeInformation.h        2014-06-23 21:33:34 UTC (rev 170321)
</span><span class="lines">@@ -33,30 +33,30 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-enum WKInputType {
- WKTypeNone,
- WKTypeContentEditable,
- WKTypeText,
- WKTypePassword,
- WKTypeTextArea,
- WKTypeSearch,
- WKTypeEmail,
- WKTypeURL,
- WKTypePhone,
- WKTypeNumber,
- WKTypeNumberPad,
- WKTypeDate,
- WKTypeDateTime,
- WKTypeDateTimeLocal,
- WKTypeMonth,
- WKTypeWeek,
- WKTypeTime,
- WKTypeSelect
</del><ins>+enum class InputType {
+ None,
+ ContentEditable,
+ Text,
+ Password,
+ TextArea,
+ Search,
+ Email,
+ URL,
+ Phone,
+ Number,
+ NumberPad,
+ Date,
+ DateTime,
+ DateTimeLocal,
+ Month,
+ Week,
+ Time,
+ Select
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-struct WKOptionItem {
- WKOptionItem()
</del><ins>+struct OptionItem {
+ OptionItem()
</ins><span class="cx"> : isGroup(false)
</span><span class="cx"> , isSelected(false)
</span><span class="cx"> , disabled(false)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>- WKOptionItem(const WKOptionItem& item)
</del><ins>+ OptionItem(const OptionItem& item)
</ins><span class="cx"> : text(item.text)
</span><span class="cx"> , isGroup(item.isGroup)
</span><span class="cx"> , isSelected(item.isSelected)
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>- WKOptionItem(const String& text, bool isGroup, int parentID, bool selected, bool disabled)
</del><ins>+ OptionItem(const String& text, bool isGroup, int parentID, bool selected, bool disabled)
</ins><span class="cx"> : text(text)
</span><span class="cx"> , isGroup(isGroup)
</span><span class="cx"> , isSelected(selected)
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx"> int parentGroupID;
</span><span class="cx">
</span><span class="cx"> void encode(IPC::ArgumentEncoder&) const;
</span><del>- static bool decode(IPC::ArgumentDecoder&, WKOptionItem&);
</del><ins>+ static bool decode(IPC::ArgumentDecoder&, OptionItem&);
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> struct AssistedNodeInformation {
</span><span class="lines">@@ -103,7 +103,7 @@
</span><span class="cx"> , isReadOnly(false)
</span><span class="cx"> , allowsUserScaling(false)
</span><span class="cx"> , autocapitalizeType(WebAutocapitalizeTypeDefault)
</span><del>- , elementType(WKTypeNone)
</del><ins>+ , elementType(InputType::None)
</ins><span class="cx"> , selectedIndex(-1)
</span><span class="cx"> , valueAsNumber(0)
</span><span class="cx"> {
</span><span class="lines">@@ -121,9 +121,9 @@
</span><span class="cx"> bool isReadOnly;
</span><span class="cx"> bool allowsUserScaling;
</span><span class="cx"> WebAutocapitalizeType autocapitalizeType;
</span><del>- WKInputType elementType;
</del><ins>+ InputType elementType;
</ins><span class="cx"> String formAction;
</span><del>- Vector<WKOptionItem> selectOptions;
</del><ins>+ Vector<OptionItem> selectOptions;
</ins><span class="cx"> int selectedIndex;
</span><span class="cx"> String value;
</span><span class="cx"> double valueAsNumber;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewInteractionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (170320 => 170321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h        2014-06-23 21:32:43 UTC (rev 170320)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h        2014-06-23 21:33:34 UTC (rev 170321)
</span><span class="lines">@@ -174,7 +174,7 @@
</span><span class="cx"> - (void)_showRunOpenPanel:(WebKit::WebOpenPanelParameters*)parameters resultListener:(WebKit::WebOpenPanelResultListenerProxy*)listener;
</span><span class="cx"> - (void)accessoryDone;
</span><span class="cx"> - (void)_didHandleKeyEvent:(WebIOSEvent *)event;
</span><del>-- (Vector<WebKit::WKOptionItem>&) assistedNodeSelectOptions;
</del><ins>+- (Vector<WebKit::OptionItem>&) assistedNodeSelectOptions;
</ins><span class="cx"> - (void)_updateUnscaledView;
</span><span class="cx"> @end
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewInteractionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (170320 => 170321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2014-06-23 21:32:43 UTC (rev 170320)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2014-06-23 21:33:34 UTC (rev 170321)
</span><span class="lines">@@ -533,14 +533,14 @@
</span><span class="cx"> {
</span><span class="cx"> // FIXME: We should add the logic to handle keyboard visibility during focus redirects.
</span><span class="cx"> switch (_assistedNodeInformation.elementType) {
</span><del>- case WebKit::WKTypeNone:
</del><ins>+ case InputType::None:
</ins><span class="cx"> return NO;
</span><del>- case WebKit::WKTypeSelect:
</del><ins>+ case InputType::Select:
</ins><span class="cx"> return !UICurrentUserInterfaceIdiomIsPad();
</span><del>- case WebKit::WKTypeDate:
- case WebKit::WKTypeMonth:
- case WebKit::WKTypeDateTimeLocal:
- case WebKit::WKTypeTime:
</del><ins>+ case InputType::Date:
+ case InputType::Month:
+ case InputType::DateTimeLocal:
+ case InputType::Time:
</ins><span class="cx"> return !UICurrentUserInterfaceIdiomIsPad();
</span><span class="cx"> default:
</span><span class="cx"> return !_assistedNodeInformation.isReadOnly;
</span><span class="lines">@@ -567,11 +567,11 @@
</span><span class="cx">
</span><span class="cx"> - (UIView *)inputView
</span><span class="cx"> {
</span><del>- if (_assistedNodeInformation.elementType == WKTypeNone)
</del><ins>+ if (_assistedNodeInformation.elementType == InputType::None)
</ins><span class="cx"> return nil;
</span><span class="cx">
</span><span class="cx"> if (!_inputPeripheral)
</span><del>- _inputPeripheral = adoptNS(_assistedNodeInformation.elementType == WKTypeSelect ? [WKFormSelectControl createPeripheralWithView:self] : [WKFormInputControl createPeripheralWithView:self]);
</del><ins>+ _inputPeripheral = adoptNS(_assistedNodeInformation.elementType == InputType::Select ? [WKFormSelectControl createPeripheralWithView:self] : [WKFormInputControl createPeripheralWithView:self]);
</ins><span class="cx"> else
</span><span class="cx"> [self _displayFormNodeInputView];
</span><span class="cx">
</span><span class="lines">@@ -959,27 +959,27 @@
</span><span class="cx"> - (BOOL)requiresAccessoryView
</span><span class="cx"> {
</span><span class="cx"> switch (_assistedNodeInformation.elementType) {
</span><del>- case WKTypeNone:
</del><ins>+ case InputType::None:
</ins><span class="cx"> return NO;
</span><del>- case WKTypeText:
- case WKTypePassword:
- case WKTypeSearch:
- case WKTypeEmail:
- case WKTypeURL:
- case WKTypePhone:
- case WKTypeNumber:
- case WKTypeNumberPad:
</del><ins>+ case InputType::Text:
+ case InputType::Password:
+ case InputType::Search:
+ case InputType::Email:
+ case InputType::URL:
+ case InputType::Phone:
+ case InputType::Number:
+ case InputType::NumberPad:
</ins><span class="cx"> return YES;
</span><del>- case WKTypeContentEditable:
- case WKTypeTextArea:
</del><ins>+ case InputType::ContentEditable:
+ case InputType::TextArea:
</ins><span class="cx"> return YES;
</span><del>- case WKTypeSelect:
- case WKTypeDate:
- case WKTypeDateTime:
- case WKTypeDateTimeLocal:
- case WKTypeMonth:
- case WKTypeWeek:
- case WKTypeTime:
</del><ins>+ case InputType::Select:
+ case InputType::Date:
+ case InputType::DateTime:
+ case InputType::DateTimeLocal:
+ case InputType::Month:
+ case InputType::Week:
+ case InputType::Time:
</ins><span class="cx"> return !UICurrentUserInterfaceIdiomIsPad();
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -1668,10 +1668,10 @@
</span><span class="cx"> [_formAccessoryView setClearVisible:NO];
</span><span class="cx"> else {
</span><span class="cx"> switch (_assistedNodeInformation.elementType) {
</span><del>- case WebKit::WKTypeDate:
- case WebKit::WKTypeMonth:
- case WebKit::WKTypeDateTimeLocal:
- case WebKit::WKTypeTime:
</del><ins>+ case InputType::Date:
+ case InputType::Month:
+ case InputType::DateTimeLocal:
+ case InputType::Time:
</ins><span class="cx"> [_formAccessoryView setClearVisible:YES];
</span><span class="cx"> break;
</span><span class="cx"> default:
</span><span class="lines">@@ -1912,13 +1912,13 @@
</span><span class="cx"> if (!_traits)
</span><span class="cx"> _traits = adoptNS([[UITextInputTraits alloc] init]);
</span><span class="cx">
</span><del>- [_traits setSecureTextEntry:_assistedNodeInformation.elementType == WKTypePassword];
- [_traits setShortcutConversionType:_assistedNodeInformation.elementType == WKTypePassword ? UITextShortcutConversionTypeNo : UITextShortcutConversionTypeDefault];
</del><ins>+ [_traits setSecureTextEntry:_assistedNodeInformation.elementType == InputType::Password];
+ [_traits setShortcutConversionType:_assistedNodeInformation.elementType == InputType::Password ? UITextShortcutConversionTypeNo : UITextShortcutConversionTypeDefault];
</ins><span class="cx">
</span><span class="cx"> if (!_assistedNodeInformation.formAction.isEmpty())
</span><del>- [_traits setReturnKeyType:(_assistedNodeInformation.elementType == WebKit::WKTypeSearch) ? UIReturnKeySearch : UIReturnKeyGo];
</del><ins>+ [_traits setReturnKeyType:(_assistedNodeInformation.elementType == InputType::Search) ? UIReturnKeySearch : UIReturnKeyGo];
</ins><span class="cx">
</span><del>- if (_assistedNodeInformation.elementType == WKTypePassword || _assistedNodeInformation.elementType == WKTypeEmail || _assistedNodeInformation.elementType == WKTypeURL || _assistedNodeInformation.formAction.contains("login")) {
</del><ins>+ if (_assistedNodeInformation.elementType == InputType::Password || _assistedNodeInformation.elementType == InputType::Email || _assistedNodeInformation.elementType == InputType::URL || _assistedNodeInformation.formAction.contains("login")) {
</ins><span class="cx"> [_traits setAutocapitalizationType:UITextAutocapitalizationTypeNone];
</span><span class="cx"> [_traits setAutocorrectionType:UITextAutocorrectionTypeNo];
</span><span class="cx"> } else {
</span><span class="lines">@@ -1927,19 +1927,19 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> switch (_assistedNodeInformation.elementType) {
</span><del>- case WebKit::WKTypePhone:
</del><ins>+ case InputType::Phone:
</ins><span class="cx"> [_traits setKeyboardType:UIKeyboardTypePhonePad];
</span><span class="cx"> break;
</span><del>- case WebKit::WKTypeURL:
</del><ins>+ case InputType::URL:
</ins><span class="cx"> [_traits setKeyboardType:UIKeyboardTypeURL];
</span><span class="cx"> break;
</span><del>- case WebKit::WKTypeEmail:
</del><ins>+ case InputType::Email:
</ins><span class="cx"> [_traits setKeyboardType:UIKeyboardTypeEmailAddress];
</span><span class="cx"> break;
</span><del>- case WebKit::WKTypeNumber:
</del><ins>+ case InputType::Number:
</ins><span class="cx"> [_traits setKeyboardType:UIKeyboardTypeNumbersAndPunctuation];
</span><span class="cx"> break;
</span><del>- case WebKit::WKTypeNumberPad:
</del><ins>+ case InputType::NumberPad:
</ins><span class="cx"> [_traits setKeyboardType:UIKeyboardTypeNumberPad];
</span><span class="cx"> break;
</span><span class="cx"> default:
</span><span class="lines">@@ -2243,7 +2243,7 @@
</span><span class="cx"> return _assistedNodeInformation;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (Vector<WKOptionItem>&)assistedNodeSelectOptions
</del><ins>+- (Vector<OptionItem>&)assistedNodeSelectOptions
</ins><span class="cx"> {
</span><span class="cx"> return _assistedNodeInformation.selectOptions;
</span><span class="cx"> }
</span><span class="lines">@@ -2274,15 +2274,15 @@
</span><span class="cx"> [self becomeFirstResponder];
</span><span class="cx">
</span><span class="cx"> switch (information.elementType) {
</span><del>- case WKTypeSelect:
- case WKTypeDateTimeLocal:
- case WKTypeTime:
- case WKTypeMonth:
- case WKTypeDate:
- break;
- default:
- [self _startAssistingKeyboard];
- break;
</del><ins>+ case InputType::Select:
+ case InputType::DateTimeLocal:
+ case InputType::Time:
+ case InputType::Month:
+ case InputType::Date:
+ break;
+ default:
+ [self _startAssistingKeyboard];
+ break;
</ins><span class="cx"> }
</span><span class="cx"> [self reloadInputViews];
</span><span class="cx"> [self _displayFormNodeInputView];
</span><span class="lines">@@ -2302,7 +2302,7 @@
</span><span class="cx"> [_formInputSession invalidate];
</span><span class="cx"> _formInputSession = nil;
</span><span class="cx"> _isEditable = NO;
</span><del>- _assistedNodeInformation.elementType = WKTypeNone;
</del><ins>+ _assistedNodeInformation.elementType = InputType::None;
</ins><span class="cx"> _inputPeripheral = nil;
</span><span class="cx">
</span><span class="cx"> [self _stopAssistingKeyboard];
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosformsWKFormInputControlmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/forms/WKFormInputControl.mm (170320 => 170321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/forms/WKFormInputControl.mm        2014-06-23 21:32:43 UTC (rev 170320)
+++ trunk/Source/WebKit2/UIProcess/ios/forms/WKFormInputControl.mm        2014-06-23 21:33:34 UTC (rev 170321)
</span><span class="lines">@@ -90,17 +90,17 @@
</span><span class="cx"> _shouldRemoveTimeZoneInformation = NO;
</span><span class="cx"> _isTimeInput = NO;
</span><span class="cx"> switch (view.assistedNodeInformation.elementType) {
</span><del>- case WebKit::WKTypeDate:
</del><ins>+ case InputType::Date:
</ins><span class="cx"> _formatString = kDateFormatString;
</span><span class="cx"> break;
</span><del>- case WebKit::WKTypeMonth:
</del><ins>+ case InputType::Month:
</ins><span class="cx"> _formatString = kMonthFormatString;
</span><span class="cx"> break;
</span><del>- case WebKit::WKTypeTime:
</del><ins>+ case InputType::Time:
</ins><span class="cx"> _formatString = kTimeFormatString;
</span><span class="cx"> _isTimeInput = YES;
</span><span class="cx"> break;
</span><del>- case WebKit::WKTypeDateTimeLocal:
</del><ins>+ case InputType::DateTimeLocal:
</ins><span class="cx"> _shouldRemoveTimeZoneInformation = YES;
</span><span class="cx"> break;
</span><span class="cx"> default:
</span><span class="lines">@@ -236,25 +236,25 @@
</span><span class="cx"> UIDatePickerMode mode;
</span><span class="cx">
</span><span class="cx"> switch (view.assistedNodeInformation.elementType) {
</span><del>- case WebKit::WKTypeDate:
- mode = UIDatePickerModeDate;
- break;
</del><ins>+ case InputType::Date:
+ mode = UIDatePickerModeDate;
+ break;
</ins><span class="cx">
</span><del>- case WebKit::WKTypeDateTimeLocal:
- mode = UIDatePickerModeDateAndTime;
- break;
</del><ins>+ case InputType::DateTimeLocal:
+ mode = UIDatePickerModeDateAndTime;
+ break;
</ins><span class="cx">
</span><del>- case WebKit::WKTypeTime:
- mode = UIDatePickerModeTime;
- break;
</del><ins>+ case InputType::Time:
+ mode = UIDatePickerModeTime;
+ break;
</ins><span class="cx">
</span><del>- case WebKit::WKTypeMonth:
- mode = (UIDatePickerMode)UIDatePickerModeYearAndMonth;
- break;
</del><ins>+ case InputType::Month:
+ mode = (UIDatePickerMode)UIDatePickerModeYearAndMonth;
+ break;
</ins><span class="cx">
</span><del>- default:
- [self release];
- return nil;
</del><ins>+ default:
+ [self release];
+ return nil;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (UICurrentUserInterfaceIdiomIsPad())
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosformsWKFormSelectControlh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.h (170320 => 170321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.h        2014-06-23 21:32:43 UTC (rev 170320)
+++ trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.h        2014-06-23 21:33:34 UTC (rev 170321)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> #import <UIKit/UIPickerView.h>
</span><span class="cx"> #import <UIKit/UIPickerView_Private.h>
</span><span class="cx">
</span><del>-CGFloat adjustedFontSize(CGFloat textWidth, UIFont *font, CGFloat initialFontSize, const Vector<WebKit::WKOptionItem>& items);
</del><ins>+CGFloat adjustedFontSize(CGFloat textWidth, UIFont *, CGFloat initialFontSize, const Vector<WebKit::OptionItem>& items);
</ins><span class="cx">
</span><span class="cx"> @class WKContentView;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosformsWKFormSelectControlmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.mm (170320 => 170321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.mm        2014-06-23 21:32:43 UTC (rev 170320)
+++ trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.mm        2014-06-23 21:33:34 UTC (rev 170321)
</span><span class="lines">@@ -46,11 +46,11 @@
</span><span class="cx">
</span><span class="cx"> static const CGFloat minimumOptionFontSize = 12;
</span><span class="cx">
</span><del>-CGFloat adjustedFontSize(CGFloat textWidth, UIFont *font, CGFloat initialFontSize, const Vector<WKOptionItem>& items)
</del><ins>+CGFloat adjustedFontSize(CGFloat textWidth, UIFont *font, CGFloat initialFontSize, const Vector<OptionItem>& items)
</ins><span class="cx"> {
</span><span class="cx"> CGFloat adjustedSize = initialFontSize;
</span><span class="cx"> for (size_t i = 0; i < items.size(); ++i) {
</span><del>- const WKOptionItem& item = items[i];
</del><ins>+ const OptionItem& item = items[i];
</ins><span class="cx"> if (item.text.isEmpty())
</span><span class="cx"> continue;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosformsWKFormSelectPickermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectPicker.mm (170320 => 170321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectPicker.mm        2014-06-23 21:32:43 UTC (rev 170320)
+++ trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectPicker.mm        2014-06-23 21:33:34 UTC (rev 170321)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">
</span><span class="cx"> @property(nonatomic) BOOL disabled;
</span><span class="cx">
</span><del>-- (instancetype)initWithOptionItem:(const WKOptionItem&)item;
</del><ins>+- (instancetype)initWithOptionItem:(const OptionItem&)item;
</ins><span class="cx">
</span><span class="cx"> @end
</span><span class="cx">
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx"> return self;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (instancetype)initWithOptionItem:(const WKOptionItem&)item
</del><ins>+- (instancetype)initWithOptionItem:(const OptionItem&)item
</ins><span class="cx"> {
</span><span class="cx"> if (!(self = [self init]))
</span><span class="cx"> return nil;
</span><span class="lines">@@ -95,12 +95,12 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> @interface WKOptionGroupPickerCell : WKOptionPickerCell
</span><del>-- (instancetype)initWithOptionItem:(const WKOptionItem&)item;
</del><ins>+- (instancetype)initWithOptionItem:(const OptionItem&)item;
</ins><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> @implementation WKOptionGroupPickerCell
</span><span class="cx">
</span><del>-- (instancetype)initWithOptionItem:(const WKOptionItem&)item
</del><ins>+- (instancetype)initWithOptionItem:(const OptionItem&)item
</ins><span class="cx"> {
</span><span class="cx"> if (!(self = [self init]))
</span><span class="cx"> return nil;
</span><span class="lines">@@ -166,10 +166,10 @@
</span><span class="cx"> [self setSize:[UIKeyboard defaultSizeForInterfaceOrientation:[UIApp interfaceOrientation]]];
</span><span class="cx"> [self reloadAllComponents];
</span><span class="cx">
</span><del>- const Vector<WKOptionItem>& selectOptions = [_view assistedNodeSelectOptions];
</del><ins>+ const Vector<OptionItem>& selectOptions = [_view assistedNodeSelectOptions];
</ins><span class="cx"> int currentIndex = 0;
</span><span class="cx"> for (size_t i = 0; i < selectOptions.size(); ++i) {
</span><del>- const WKOptionItem& item = selectOptions[i];
</del><ins>+ const OptionItem& item = selectOptions[i];
</ins><span class="cx"> if (item.isGroup)
</span><span class="cx"> continue;
</span><span class="cx">
</span><span class="lines">@@ -222,7 +222,7 @@
</span><span class="cx">
</span><span class="cx"> - (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)rowIndex forComponent:(NSInteger)columnIndex reusingView:(UIView *)view
</span><span class="cx"> {
</span><del>- const WKOptionItem& item = [_view assistedNodeSelectOptions][rowIndex];
</del><ins>+ const OptionItem& item = [_view assistedNodeSelectOptions][rowIndex];
</ins><span class="cx"> UIPickerContentView* pickerItem = item.isGroup ? [[[WKOptionGroupPickerCell alloc] initWithOptionItem:item] autorelease] : [[[WKOptionPickerCell alloc] initWithOptionItem:item] autorelease];
</span><span class="cx">
</span><span class="cx"> // The cell starts out with a null frame. We need to set its frame now so we can find the right font size.
</span><span class="lines">@@ -275,10 +275,11 @@
</span><span class="cx">
</span><span class="cx"> - (void)pickerView:(UIPickerView *)pickerView row:(int)rowIndex column:(int)columnIndex checked:(BOOL)isChecked
</span><span class="cx"> {
</span><ins>+
</ins><span class="cx"> if ((size_t)rowIndex >= [_view assistedNodeSelectOptions].size())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- WKOptionItem& item = [_view assistedNodeSelectOptions][rowIndex];
</del><ins>+ OptionItem& item = [_view assistedNodeSelectOptions][rowIndex];
</ins><span class="cx">
</span><span class="cx"> if ([self allowsMultipleSelection]) {
</span><span class="cx"> [_view page]->setAssistedNodeSelectedIndex([self findItemIndexAt:rowIndex], isChecked);
</span><span class="lines">@@ -374,7 +375,7 @@
</span><span class="cx"> if (row < 0 || row >= (NSInteger)[_view assistedNodeSelectOptions].size())
</span><span class="cx"> return nil;
</span><span class="cx">
</span><del>- const WKOptionItem& option = [_view assistedNodeSelectOptions][row];
</del><ins>+ const OptionItem& option = [_view assistedNodeSelectOptions][row];
</ins><span class="cx"> NSMutableString *trimmedText = [[option.text mutableCopy] autorelease];
</span><span class="cx"> CFStringTrimWhitespace((CFMutableStringRef)trimmedText);
</span><span class="cx">
</span><span class="lines">@@ -390,13 +391,13 @@
</span><span class="cx"> if (row < 0 || row >= (NSInteger)[_view assistedNodeSelectOptions].size())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- const WKOptionItem& newSelectedOption = [_view assistedNodeSelectOptions][row];
</del><ins>+ const OptionItem& newSelectedOption = [_view assistedNodeSelectOptions][row];
</ins><span class="cx"> if (newSelectedOption.disabled) {
</span><span class="cx"> NSInteger rowToSelect = NSNotFound;
</span><span class="cx">
</span><span class="cx"> // Search backwards for the previous enabled option.
</span><span class="cx"> for (NSInteger i = row - 1; i >= 0; --i) {
</span><del>- const WKOptionItem& earlierOption = [_view assistedNodeSelectOptions][i];
</del><ins>+ const OptionItem& earlierOption = [_view assistedNodeSelectOptions][i];
</ins><span class="cx"> if (!earlierOption.disabled) {
</span><span class="cx"> rowToSelect = i;
</span><span class="cx"> break;
</span><span class="lines">@@ -406,7 +407,7 @@
</span><span class="cx"> // If nothing previous, search forwards for the next enabled option.
</span><span class="cx"> if (rowToSelect == NSNotFound) {
</span><span class="cx"> for (size_t i = row + 1; i < [_view assistedNodeSelectOptions].size(); ++i) {
</span><del>- const WKOptionItem& laterOption = [_view assistedNodeSelectOptions][i];
</del><ins>+ const OptionItem& laterOption = [_view assistedNodeSelectOptions][i];
</ins><span class="cx"> if (!laterOption.disabled) {
</span><span class="cx"> rowToSelect = i;
</span><span class="cx"> break;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosformsWKFormSelectPopovermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectPopover.mm (170320 => 170321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectPopover.mm        2014-06-23 21:32:43 UTC (rev 170320)
+++ trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectPopover.mm        2014-06-23 21:33:34 UTC (rev 170321)
</span><span class="lines">@@ -109,7 +109,7 @@
</span><span class="cx"> return nil;
</span><span class="cx">
</span><span class="cx"> _contentView = view;
</span><del>- Vector<WKOptionItem>& selectOptions = [_contentView assistedNodeSelectOptions];
</del><ins>+ Vector<OptionItem>& selectOptions = [_contentView assistedNodeSelectOptions];
</ins><span class="cx"> _allowsMultipleSelection = _contentView.assistedNodeInformation.isMultiSelect;
</span><span class="cx">
</span><span class="cx"> // Even if the select is empty, there is at least one tableview section.
</span><span class="lines">@@ -117,7 +117,7 @@
</span><span class="cx"> _singleSelectionIndex = NSNotFound;
</span><span class="cx"> NSInteger currentIndex = 0;
</span><span class="cx"> for (size_t i = 0; i < selectOptions.size(); ++i) {
</span><del>- const WKOptionItem& item = selectOptions[i];
</del><ins>+ const OptionItem& item = selectOptions[i];
</ins><span class="cx"> if (item.isGroup) {
</span><span class="cx"> _numberOfSections++;
</span><span class="cx"> currentIndex = 0;
</span><span class="lines">@@ -164,7 +164,7 @@
</span><span class="cx">
</span><span class="cx"> int rowCount = 0;
</span><span class="cx"> for (size_t i = 0; i < [_contentView assistedNodeSelectOptions].size(); ++i) {
</span><del>- const WKOptionItem& item = [_contentView assistedNodeSelectOptions][i];
</del><ins>+ const OptionItem& item = [_contentView assistedNodeSelectOptions][i];
</ins><span class="cx"> if (item.isGroup)
</span><span class="cx"> continue;
</span><span class="cx"> if (item.parentGroupID == section)
</span><span class="lines">@@ -183,7 +183,7 @@
</span><span class="cx">
</span><span class="cx"> int groupCount = 0;
</span><span class="cx"> for (size_t i = 0; i < [_contentView assistedNodeSelectOptions].size(); ++i) {
</span><del>- const WKOptionItem& item = [_contentView assistedNodeSelectOptions][i];
</del><ins>+ const OptionItem& item = [_contentView assistedNodeSelectOptions][i];
</ins><span class="cx"> if (!item.isGroup)
</span><span class="cx"> continue;
</span><span class="cx"> groupCount++;
</span><span class="lines">@@ -193,12 +193,12 @@
</span><span class="cx"> return nil;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)populateCell:(UITableViewCell *)cell withItem:(const WKOptionItem *)item
</del><ins>+- (void)populateCell:(UITableViewCell *)cell withItem:(const OptionItem&)item
</ins><span class="cx"> {
</span><del>- [cell.textLabel setText:item->text];
- [cell.textLabel setEnabled:!item->disabled];
- [cell setSelectionStyle:item->disabled ? UITableViewCellSelectionStyleNone : UITableViewCellSelectionStyleBlue];
- [cell setAccessoryType:item->isSelected ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone];
</del><ins>+ [cell.textLabel setText:item.text];
+ [cell.textLabel setEnabled:!item.disabled];
+ [cell setSelectionStyle:item.disabled ? UITableViewCellSelectionStyleNone : UITableViewCellSelectionStyleBlue];
+ [cell setAccessoryType:item.isSelected ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (NSInteger)findItemIndexAt:(NSIndexPath *)indexPath
</span><span class="lines">@@ -209,7 +209,7 @@
</span><span class="cx"> int optionIndex = 0;
</span><span class="cx"> int rowIndex = 0;
</span><span class="cx"> for (size_t i = 0; i < [_contentView assistedNodeSelectOptions].size(); ++i) {
</span><del>- const WKOptionItem& item = [_contentView assistedNodeSelectOptions][i];
</del><ins>+ const OptionItem& item = [_contentView assistedNodeSelectOptions][i];
</ins><span class="cx"> if (item.isGroup) {
</span><span class="cx"> rowIndex = 0;
</span><span class="cx"> continue;
</span><span class="lines">@@ -222,14 +222,14 @@
</span><span class="cx"> return NSNotFound;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (WKOptionItem *)findItemAt:(NSIndexPath *)indexPath
</del><ins>+- (OptionItem *)findItemAt:(NSIndexPath *)indexPath
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(indexPath.row >= 0);
</span><span class="cx"> ASSERT(indexPath.section <= _numberOfSections);
</span><span class="cx">
</span><span class="cx"> int index = 0;
</span><span class="cx"> for (size_t i = 0; i < [_contentView assistedNodeSelectOptions].size(); ++i) {
</span><del>- WKOptionItem& item = [_contentView assistedNodeSelectOptions][i];
</del><ins>+ OptionItem& item = [_contentView assistedNodeSelectOptions][i];
</ins><span class="cx"> if (item.isGroup || item.parentGroupID != indexPath.section)
</span><span class="cx"> continue;
</span><span class="cx"> if (index == indexPath.row)
</span><span class="lines">@@ -267,10 +267,10 @@
</span><span class="cx"> _fontSize = adjustedFontSize(_maximumTextWidth, font, initialFontSize, _contentView.assistedNodeInformation.selectOptions);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- const WKOptionItem* item = [self findItemAt:indexPath];
</del><ins>+ const OptionItem* item = [self findItemAt:indexPath];
</ins><span class="cx"> ASSERT(item);
</span><span class="cx">
</span><del>- [self populateCell:cell withItem:item];
</del><ins>+ [self populateCell:cell withItem:*item];
</ins><span class="cx"> [cell.textLabel setFont:[font fontWithSize:_fontSize]];
</span><span class="cx"> [cell.textLabel setLineBreakMode:NSLineBreakByWordWrapping];
</span><span class="cx"> [cell.textLabel setNumberOfLines:2];
</span><span class="lines">@@ -303,7 +303,7 @@
</span><span class="cx"> // changes do not trigger "change" events on such selects.
</span><span class="cx">
</span><span class="cx"> [_contentView page]->setAssistedNodeSelectedIndex(itemIndex, true);
</span><del>- WKOptionItem& item = [_contentView assistedNodeSelectOptions][itemIndex];
</del><ins>+ OptionItem& item = [_contentView assistedNodeSelectOptions][itemIndex];
</ins><span class="cx"> item.isSelected = newStateIsSelected;
</span><span class="cx"> } else {
</span><span class="cx"> [tableView deselectRowAtIndexPath:indexPath animated:NO];
</span><span class="lines">@@ -336,14 +336,13 @@
</span><span class="cx"> _singleSelectionSection = indexPath.section;
</span><span class="cx">
</span><span class="cx"> [_contentView page]->setAssistedNodeSelectedIndex(itemIndex);
</span><del>- WKOptionItem& newItem = [_contentView assistedNodeSelectOptions][itemIndex];
</del><ins>+ OptionItem& newItem = [_contentView assistedNodeSelectOptions][itemIndex];
</ins><span class="cx"> newItem.isSelected = true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Need to update the model even if there isn't a cell.
</span><span class="cx"> if (oldIndexPath) {
</span><del>- WKOptionItem* oldItem = [self findItemAt:oldIndexPath];
- if (oldItem)
</del><ins>+ if (OptionItem* oldItem = [self findItemAt:oldIndexPath])
</ins><span class="cx"> oldItem->isSelected = false;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (170320 => 170321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2014-06-23 21:32:43 UTC (rev 170320)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2014-06-23 21:33:34 UTC (rev 170321)
</span><span class="lines">@@ -1835,7 +1835,7 @@
</span><span class="cx">
</span><span class="cx"> if (isHTMLSelectElement(m_assistedNode.get())) {
</span><span class="cx"> HTMLSelectElement* element = toHTMLSelectElement(m_assistedNode.get());
</span><del>- information.elementType = WKTypeSelect;
</del><ins>+ information.elementType = InputType::Select;
</ins><span class="cx"> size_t count = element->listItems().size();
</span><span class="cx"> int parentGroupID = 0;
</span><span class="cx"> // The parent group ID indicates the group the option belongs to and is 0 for group elements.
</span><span class="lines">@@ -1845,11 +1845,11 @@
</span><span class="cx"> HTMLElement* item = element->listItems()[i];
</span><span class="cx"> if (isHTMLOptionElement(item)) {
</span><span class="cx"> HTMLOptionElement* option = toHTMLOptionElement(item);
</span><del>- information.selectOptions.append(WKOptionItem(option->text(), false, parentGroupID, option->selected(), option->fastHasAttribute(WebCore::HTMLNames::disabledAttr)));
</del><ins>+ information.selectOptions.append(OptionItem(option->text(), false, parentGroupID, option->selected(), option->fastHasAttribute(WebCore::HTMLNames::disabledAttr)));
</ins><span class="cx"> } else if (isHTMLOptGroupElement(item)) {
</span><span class="cx"> HTMLOptGroupElement* group = toHTMLOptGroupElement(item);
</span><span class="cx"> parentGroupID++;
</span><del>- information.selectOptions.append(WKOptionItem(group->groupLabelText(), true, 0, false, group->fastHasAttribute(WebCore::HTMLNames::disabledAttr)));
</del><ins>+ information.selectOptions.append(OptionItem(group->groupLabelText(), true, 0, false, group->fastHasAttribute(WebCore::HTMLNames::disabledAttr)));
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> information.selectedIndex = element->selectedIndex();
</span><span class="lines">@@ -1858,7 +1858,7 @@
</span><span class="cx"> HTMLTextAreaElement* element = toHTMLTextAreaElement(m_assistedNode.get());
</span><span class="cx"> information.autocapitalizeType = static_cast<WebAutocapitalizeType>(element->autocapitalizeType());
</span><span class="cx"> information.isAutocorrect = element->autocorrect();
</span><del>- information.elementType = WKTypeTextArea;
</del><ins>+ information.elementType = InputType::TextArea;
</ins><span class="cx"> information.isReadOnly = element->isReadOnly();
</span><span class="cx"> information.value = element->value();
</span><span class="cx"> } else if (isHTMLInputElement(m_assistedNode.get())) {
</span><span class="lines">@@ -1869,38 +1869,38 @@
</span><span class="cx"> information.autocapitalizeType = static_cast<WebAutocapitalizeType>(element->autocapitalizeType());
</span><span class="cx"> information.isAutocorrect = element->autocorrect();
</span><span class="cx"> if (element->isPasswordField())
</span><del>- information.elementType = WKTypePassword;
</del><ins>+ information.elementType = InputType::Password;
</ins><span class="cx"> else if (element->isSearchField())
</span><del>- information.elementType = WKTypeSearch;
</del><ins>+ information.elementType = InputType::Search;
</ins><span class="cx"> else if (element->isEmailField())
</span><del>- information.elementType = WKTypeEmail;
</del><ins>+ information.elementType = InputType::Email;
</ins><span class="cx"> else if (element->isTelephoneField())
</span><del>- information.elementType = WKTypePhone;
</del><ins>+ information.elementType = InputType::Phone;
</ins><span class="cx"> else if (element->isNumberField())
</span><del>- information.elementType = element->getAttribute("pattern") == "\\d*" || element->getAttribute("pattern") == "[0-9]*" ? WKTypeNumberPad : WKTypeNumber;
</del><ins>+ information.elementType = element->getAttribute("pattern") == "\\d*" || element->getAttribute("pattern") == "[0-9]*" ? InputType::NumberPad : InputType::Number;
</ins><span class="cx"> else if (element->isDateTimeLocalField())
</span><del>- information.elementType = WKTypeDateTimeLocal;
</del><ins>+ information.elementType = InputType::DateTimeLocal;
</ins><span class="cx"> else if (element->isDateField())
</span><del>- information.elementType = WKTypeDate;
</del><ins>+ information.elementType = InputType::Date;
</ins><span class="cx"> else if (element->isDateTimeField())
</span><del>- information.elementType = WKTypeDateTime;
</del><ins>+ information.elementType = InputType::DateTime;
</ins><span class="cx"> else if (element->isTimeField())
</span><del>- information.elementType = WKTypeTime;
</del><ins>+ information.elementType = InputType::Time;
</ins><span class="cx"> else if (element->isWeekField())
</span><del>- information.elementType = WKTypeWeek;
</del><ins>+ information.elementType = InputType::Week;
</ins><span class="cx"> else if (element->isMonthField())
</span><del>- information.elementType = WKTypeMonth;
</del><ins>+ information.elementType = InputType::Month;
</ins><span class="cx"> else if (element->isURLField())
</span><del>- information.elementType = WKTypeURL;
</del><ins>+ information.elementType = InputType::URL;
</ins><span class="cx"> else if (element->isText()) {
</span><span class="cx"> const AtomicString& pattern = element->fastGetAttribute(HTMLNames::patternAttr);
</span><span class="cx"> if (pattern == "\\d*" || pattern == "[0-9]*")
</span><del>- information.elementType = WKTypeNumberPad;
</del><ins>+ information.elementType = InputType::NumberPad;
</ins><span class="cx"> else {
</span><del>- information.elementType = WKTypeText;
</del><ins>+ information.elementType = InputType::Text;
</ins><span class="cx"> if (!information.formAction.isEmpty()
</span><span class="cx"> && (element->getNameAttribute().contains("search") || element->getIdAttribute().contains("search") || element->fastGetAttribute(HTMLNames::titleAttr).contains("search")))
</span><del>- information.elementType = WKTypeSearch;
</del><ins>+ information.elementType = InputType::Search;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1909,7 +1909,7 @@
</span><span class="cx"> information.valueAsNumber = element->valueAsNumber();
</span><span class="cx"> information.title = element->title();
</span><span class="cx"> } else if (m_assistedNode->hasEditableStyle()) {
</span><del>- information.elementType = WKTypeContentEditable;
</del><ins>+ information.elementType = InputType::ContentEditable;
</ins><span class="cx"> information.isAutocorrect = true; // FIXME: Should we look at the attribute?
</span><span class="cx"> information.autocapitalizeType = WebAutocapitalizeTypeSentences; // FIXME: Should we look at the attribute?
</span><span class="cx"> information.isReadOnly = false;
</span></span></pre>
</div>
</div>
</body>
</html>