<!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>[210724] branches/safari-603-branch</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/210724">210724</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2017-01-12 23:05:20 -0800 (Thu, 12 Jan 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/210447">r210447</a>. rdar://problem/29872292</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari603branchLayoutTestsChangeLog">branches/safari-603-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari603branchLayoutTestsplatformiossimulatorTestExpectations">branches/safari-603-branch/LayoutTests/platform/ios-simulator/TestExpectations</a></li>
<li><a href="#branchessafari603branchSourceWebCoreChangeLog">branches/safari-603-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari603branchSourceWebCoreEnglishlprojLocalizablestrings">branches/safari-603-branch/Source/WebCore/English.lproj/Localizable.strings</a></li>
<li><a href="#branchessafari603branchSourceWebCoreWebCorexcodeprojprojectpbxproj">branches/safari-603-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchessafari603branchSourceWebCoreextractlocalizablestringspl">branches/safari-603-branch/Source/WebCore/extract-localizable-strings.pl</a></li>
<li><a href="#branchessafari603branchSourceWebCoreplatformLocalizedStringscpp">branches/safari-603-branch/Source/WebCore/platform/LocalizedStrings.cpp</a></li>
<li><a href="#branchessafari603branchSourceWebCoreplatformLocalizedStringsh">branches/safari-603-branch/Source/WebCore/platform/LocalizedStrings.h</a></li>
<li><a href="#branchessafari603branchSourceWebCoreplatformcocoaLocalizedStringsCocoamm">branches/safari-603-branch/Source/WebCore/platform/cocoa/LocalizedStringsCocoa.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari603branchLayoutTestsfastformsvalidationmessagemaxLengthexpectedtxt">branches/safari-603-branch/LayoutTests/fast/forms/validation-message-maxLength-expected.txt</a></li>
<li><a href="#branchessafari603branchLayoutTestsfastformsvalidationmessagemaxLengthhtml">branches/safari-603-branch/LayoutTests/fast/forms/validation-message-maxLength.html</a></li>
<li><a href="#branchessafari603branchSourceWebCoreEnglishlprojLocalizablestringsdict">branches/safari-603-branch/Source/WebCore/English.lproj/Localizable.stringsdict</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari603branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/LayoutTests/ChangeLog (210723 => 210724)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/LayoutTests/ChangeLog        2017-01-13 07:05:15 UTC (rev 210723)
+++ branches/safari-603-branch/LayoutTests/ChangeLog        2017-01-13 07:05:20 UTC (rev 210724)
</span><span class="lines">@@ -1,5 +1,23 @@
</span><span class="cx"> 2017-01-12  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r210447. rdar://problem/29872292
+
+    2017-01-06  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+            [Form Validation] &quot;character&quot; in maxlength validation message should be singular when maxlength is 1
+            https://bugs.webkit.org/show_bug.cgi?id=166712
+            &lt;rdar://problem/29872292&gt;
+
+            Reviewed by Darin Adler.
+
+            Add layout test coverage.
+
+            * fast/forms/validation-message-maxLength-expected.txt: Added.
+            * fast/forms/validation-message-maxLength.html: Added.
+            * platform/ios-simulator/TestExpectations:
+
+2017-01-12  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r210586. rdar://problem/29861147
</span><span class="cx"> 
</span><span class="cx">     2017-01-11  Chris Dumez  &lt;cdumez@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari603branchLayoutTestsfastformsvalidationmessagemaxLengthexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-603-branch/LayoutTests/fast/forms/validation-message-maxLength-expected.txt (0 => 210724)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/LayoutTests/fast/forms/validation-message-maxLength-expected.txt                                (rev 0)
+++ branches/safari-603-branch/LayoutTests/fast/forms/validation-message-maxLength-expected.txt        2017-01-13 07:05:20 UTC (rev 210724)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+Tests the validation message when maxlength is used.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS input.value is &quot;abc&quot;
+PASS input.checkValidity() is false
+PASS input.validationMessage is &quot;Use no more than 2 characters&quot;
+PASS input.value is &quot;ab&quot;
+PASS input.checkValidity() is false
+PASS input.validationMessage is &quot;Use no more than one character&quot;
+PASS input.value is &quot;a&quot;
+PASS input.checkValidity() is false
+PASS input.validationMessage is &quot;Use no more than 0 characters&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE

</ins></span></pre></div>
<a id="branchessafari603branchLayoutTestsfastformsvalidationmessagemaxLengthhtml"></a>
<div class="addfile"><h4>Added: branches/safari-603-branch/LayoutTests/fast/forms/validation-message-maxLength.html (0 => 210724)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/LayoutTests/fast/forms/validation-message-maxLength.html                                (rev 0)
+++ branches/safari-603-branch/LayoutTests/fast/forms/validation-message-maxLength.html        2017-01-13 07:05:20 UTC (rev 210724)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;form id=&quot;testForm&quot;&gt;
+&lt;input type=&quot;submit&quot; id=&quot;submitButton&quot;&gt;
+&lt;/form&gt;
+&lt;script&gt;
+description(&quot;Tests the validation message when maxlength is used.&quot;);
+
+var form = document.getElementById(&quot;testForm&quot;);
+var submit = document.getElementById(&quot;submitButton&quot;);
+
+var input = document.createElement(&quot;input&quot;);
+input.value = &quot;abcd&quot;;
+input.maxLength = 2;
+form.prepend(input);
+
+input.focus();
+eventSender.keyDown(String.fromCharCode(0x0008)); // Delete.
+shouldBeEqualToString(&quot;input.value&quot;, &quot;abc&quot;);
+shouldBeFalse(&quot;input.checkValidity()&quot;);
+shouldBeEqualToString(&quot;input.validationMessage&quot;, &quot;Use no more than 2 characters&quot;);
+
+input.maxLength = 1;
+eventSender.keyDown(String.fromCharCode(0x0008)); // Delete.
+shouldBeEqualToString(&quot;input.value&quot;, &quot;ab&quot;);
+shouldBeFalse(&quot;input.checkValidity()&quot;);
+shouldBeEqualToString(&quot;input.validationMessage&quot;, &quot;Use no more than one character&quot;);
+
+input.maxLength = 0;
+eventSender.keyDown(String.fromCharCode(0x0008)); // Delete.
+shouldBeEqualToString(&quot;input.value&quot;, &quot;a&quot;);
+shouldBeFalse(&quot;input.checkValidity()&quot;);
+shouldBeEqualToString(&quot;input.validationMessage&quot;, &quot;Use no more than 0 characters&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari603branchLayoutTestsplatformiossimulatorTestExpectations"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/LayoutTests/platform/ios-simulator/TestExpectations (210723 => 210724)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/LayoutTests/platform/ios-simulator/TestExpectations        2017-01-13 07:05:15 UTC (rev 210723)
+++ branches/safari-603-branch/LayoutTests/platform/ios-simulator/TestExpectations        2017-01-13 07:05:20 UTC (rev 210724)
</span><span class="lines">@@ -350,6 +350,7 @@
</span><span class="cx"> 
</span><span class="cx"> # This test relies on EventSender.keydown(), which is not supported on iOS
</span><span class="cx"> webkit.org/b/155233 fast/events/max-tabindex-focus.html [ Skip ]
</span><ins>+fast/forms/validation-message-maxLength.html [ Skip ]
</ins><span class="cx"> fast/shadow-dom/shadow-host-removal-crash.html [ Skip ]
</span><span class="cx"> fast/shadow-dom/input-element-in-shadow.html [ Skip ]
</span><span class="cx"> fast/shadow-dom/activate-over-slotted-content.html [ Skip ]
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (210723 => 210724)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/ChangeLog        2017-01-13 07:05:15 UTC (rev 210723)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog        2017-01-13 07:05:20 UTC (rev 210724)
</span><span class="lines">@@ -1,5 +1,32 @@
</span><span class="cx"> 2017-01-12  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r210447. rdar://problem/29872292
+
+    2017-01-06  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+            [Form Validation] &quot;character&quot; in maxlength validation message should be singular when maxlength is 1
+            https://bugs.webkit.org/show_bug.cgi?id=166712
+            &lt;rdar://problem/29872292&gt;
+
+            Reviewed by Darin Adler.
+
+            Fix validation message to use singular form of &quot;character&quot; when maxLength value is 1.
+
+            Test: fast/forms/validation-message-maxLength.html
+
+            * English.lproj/Localizable.strings:
+            * English.lproj/Localizable.stringsdict: Added.
+            * WebCore.xcodeproj/project.pbxproj:
+            * extract-localizable-strings.pl:
+            * platform/LocalizedStrings.cpp:
+            * platform/LocalizedStrings.h:
+            * platform/cocoa/LocalizedStringsCocoa.mm:
+            (WebCore::localizedNString):
+            (WebCore::localizedString):
+            (WebCore::validationMessageTooLongText):
+
+2017-01-12  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r210474. rdar://problem/29762809
</span><span class="cx"> 
</span><span class="cx">     2017-01-06  Daniel Bates  &lt;dabates@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCoreEnglishlprojLocalizablestrings"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/English.lproj/Localizable.strings (210723 => 210724)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/English.lproj/Localizable.strings        2017-01-13 07:05:15 UTC (rev 210723)
+++ branches/safari-603-branch/Source/WebCore/English.lproj/Localizable.strings        2017-01-13 07:05:20 UTC (rev 210724)
</span><span class="lines">@@ -743,6 +743,9 @@
</span><span class="cx"> &quot;Use at least %d characters&quot; = &quot;Use at least %d characters&quot;;
</span><span class="cx"> 
</span><span class="cx"> /* Validation message for form control elements with a value shorter than maximum allowed length */
</span><ins>+&quot;Use no more than %d character(s)&quot; = &quot;Use no more than %d character(s)&quot;;
+
+/* Validation message for form control elements with a value shorter than maximum allowed length */
</ins><span class="cx"> &quot;Use no more than %d characters&quot; = &quot;Use no more than %d characters&quot;;
</span><span class="cx"> 
</span><span class="cx"> /* Description of WebCrypto master keys in Keychain */
</span><span class="lines">@@ -847,6 +850,9 @@
</span><span class="cx"> /* accessibility help text for elapsed time display */
</span><span class="cx"> &quot;current movie time in seconds&quot; = &quot;current movie time in seconds&quot;;
</span><span class="cx"> 
</span><ins>+/* accessibility role description for a date and time field. */
+&quot;date and time field&quot; = &quot;date and time field&quot;;
+
</ins><span class="cx"> /* accessibility role description for a date field. */
</span><span class="cx"> &quot;date field&quot; = &quot;date field&quot;;
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCoreEnglishlprojLocalizablestringsdict"></a>
<div class="addfile"><h4>Added: branches/safari-603-branch/Source/WebCore/English.lproj/Localizable.stringsdict (0 => 210724)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/English.lproj/Localizable.stringsdict                                (rev 0)
+++ branches/safari-603-branch/Source/WebCore/English.lproj/Localizable.stringsdict        2017-01-13 07:05:20 UTC (rev 210724)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
+&lt;plist version=&quot;1.0&quot;&gt;
+&lt;dict&gt;
+        &lt;key&gt;Use no more than %d character(s)&lt;/key&gt;
+        &lt;dict&gt;
+                &lt;key&gt;NSStringLocalizedFormatKey&lt;/key&gt;
+                &lt;string&gt;Use no more than %#@characters@&lt;/string&gt;
+                &lt;key&gt;characters&lt;/key&gt;
+                &lt;dict&gt;
+                        &lt;key&gt;NSStringFormatSpecTypeKey&lt;/key&gt;
+                        &lt;string&gt;NSStringPluralRuleType&lt;/string&gt;
+                        &lt;key&gt;NSStringFormatValueTypeKey&lt;/key&gt;
+                        &lt;string&gt;d&lt;/string&gt;
+                        &lt;key&gt;one&lt;/key&gt;
+                        &lt;string&gt;one character&lt;/string&gt;
+                        &lt;key&gt;other&lt;/key&gt;
+                        &lt;string&gt;%d characters&lt;/string&gt;
+                &lt;/dict&gt;
+        &lt;/dict&gt;
+&lt;/dict&gt;
+&lt;/plist&gt;
</ins></span></pre></div>
<a id="branchessafari603branchSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (210723 => 210724)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-01-13 07:05:15 UTC (rev 210723)
+++ branches/safari-603-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-01-13 07:05:20 UTC (rev 210724)
</span><span class="lines">@@ -3021,6 +3021,7 @@
</span><span class="cx">                 836FBCEC178C117F00B21A15 /* SVGAnimatedProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 836FBCEB178C117F00B21A15 /* SVGAnimatedProperty.cpp */; };
</span><span class="cx">                 8372DB311A6780A800C697C5 /* DiagnosticLoggingResultType.h in Headers */ = {isa = PBXBuildFile; fileRef = 8372DB301A6780A800C697C5 /* DiagnosticLoggingResultType.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 83765F951DAC522F00C06537 /* MouseEventInit.h in Headers */ = {isa = PBXBuildFile; fileRef = 83765F941DAC521800C06537 /* MouseEventInit.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                837A80131E1E127300026B9F /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = 837A80111E1E127300026B9F /* Localizable.stringsdict */; };
</ins><span class="cx">                 837B7D201DC3F55000D051FC /* ValidationBubbleIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 837B7D1F1DC3F54C00D051FC /* ValidationBubbleIOS.mm */; };
</span><span class="cx">                 8386A96D19F61B2E00E1EC4A /* StyleBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 8386A96C19F61B2E00E1EC4A /* StyleBuilder.h */; };
</span><span class="cx">                 8386A97019F61E4F00E1EC4A /* StyleBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8386A96E19F61E4F00E1EC4A /* StyleBuilder.cpp */; };
</span><span class="lines">@@ -10554,6 +10555,7 @@
</span><span class="cx">                 8372DB301A6780A800C697C5 /* DiagnosticLoggingResultType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiagnosticLoggingResultType.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 83765F931DAC521800C06537 /* MouseEventInit.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MouseEventInit.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 83765F941DAC521800C06537 /* MouseEventInit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MouseEventInit.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                837A80121E1E127300026B9F /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = English; path = English.lproj/Localizable.stringsdict; sourceTree = SOURCE_ROOT; };
</ins><span class="cx">                 837B7D1F1DC3F54C00D051FC /* ValidationBubbleIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ValidationBubbleIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 8386A96C19F61B2E00E1EC4A /* StyleBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleBuilder.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 8386A96E19F61E4F00E1EC4A /* StyleBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleBuilder.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -15600,6 +15602,7 @@
</span><span class="cx">                                 7CC7E3D617208C0F003C5277 /* IDNScriptWhiteList.txt */,
</span><span class="cx">                                 2D9F0E1214FF1CBF00BA0FF7 /* linearSRGB.icc */,
</span><span class="cx">                                 BCAD1808131C7A0D00990406 /* Localizable.strings */,
</span><ins>+                                837A80111E1E127300026B9F /* Localizable.stringsdict */,
</ins><span class="cx">                                 7A1D7FC918F85F0F00C385AD /* mediaControlsLocalizedStrings.js */,
</span><span class="cx">                                 93153BE114195A5700FCF5BE /* missingImage.png */,
</span><span class="cx">                                 93153BD914181F7A00FCF5BE /* missingImage@2x.png */,
</span><span class="lines">@@ -28586,6 +28589,7 @@
</span><span class="cx">                                 7CC7E3D717208C0F003C5277 /* IDNScriptWhiteList.txt in Resources */,
</span><span class="cx">                                 2D9F0E1314FF1CBF00BA0FF7 /* linearSRGB.icc in Resources */,
</span><span class="cx">                                 BCAD180A131C7A0D00990406 /* Localizable.strings in Resources */,
</span><ins>+                                837A80131E1E127300026B9F /* Localizable.stringsdict in Resources */,
</ins><span class="cx">                                 311C08BD18EB7CAF00B65615 /* mediaControlsApple.css in Resources */,
</span><span class="cx">                                 311C08BE18EB7CAF00B65615 /* mediaControlsApple.js in Resources */,
</span><span class="cx">                                 311C08BF18EB7CAF00B65615 /* mediaControlsiOS.css in Resources */,
</span><span class="lines">@@ -31993,6 +31997,14 @@
</span><span class="cx">                         name = mediaControlsLocalizedStrings.js;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="cx">                 };
</span><ins>+                837A80111E1E127300026B9F /* Localizable.stringsdict */ = {
+                        isa = PBXVariantGroup;
+                        children = (
+                                837A80121E1E127300026B9F /* English */,
+                        );
+                        name = Localizable.stringsdict;
+                        sourceTree = &quot;&lt;group&gt;&quot;;
+                };
</ins><span class="cx">                 BCAD1808131C7A0D00990406 /* Localizable.strings */ = {
</span><span class="cx">                         isa = PBXVariantGroup;
</span><span class="cx">                         children = (
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCoreextractlocalizablestringspl"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/extract-localizable-strings.pl (210723 => 210724)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/extract-localizable-strings.pl        2017-01-13 07:05:15 UTC (rev 210723)
+++ branches/safari-603-branch/Source/WebCore/extract-localizable-strings.pl        2017-01-13 07:05:20 UTC (rev 210724)
</span><span class="lines">@@ -153,7 +153,11 @@
</span><span class="cx">         # Handle all the tokens in the line.
</span><span class="cx">         while (s-^\s*([#\w]+|/\*|//|[^#\w/'&quot;()\[\],]+|.)--) {
</span><span class="cx">             my $token = $1;
</span><del>-            
</del><ins>+
+            if ($token eq &quot;@&quot; and $expected and $expected eq &quot;a quoted string&quot;) {
+                next;
+            }
+
</ins><span class="cx">             if ($token eq &quot;\&quot;&quot;) {
</span><span class="cx">                 if ($expected and $expected ne &quot;a quoted string&quot;) {
</span><span class="cx">                     emitError($file, $., &quot;found a quoted string but expected $expected&quot;);
</span><span class="lines">@@ -236,7 +240,7 @@
</span><span class="cx">                     emitError($file, $., &quot;found $token but expected $expected&quot;);
</span><span class="cx">                     $expected = &quot;&quot;;
</span><span class="cx">                 }
</span><del>-                if ($token =~ /(WEB_)?UI_STRING(_KEY)?(_INTERNAL)?$/) {
</del><ins>+                if (($token =~ /(WEB_)?UI_STRING(_KEY)?(_INTERNAL)?$/) || ($token =~ /WEB_UI_NSSTRING$/)) {
</ins><span class="cx">                     $expected = &quot;(&quot;;
</span><span class="cx">                     $macro = $token;
</span><span class="cx">                     $UIString = undef;
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCoreplatformLocalizedStringscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/platform/LocalizedStrings.cpp (210723 => 210724)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/platform/LocalizedStrings.cpp        2017-01-13 07:05:15 UTC (rev 210723)
+++ branches/safari-603-branch/Source/WebCore/platform/LocalizedStrings.cpp        2017-01-13 07:05:20 UTC (rev 210724)
</span><span class="lines">@@ -1126,11 +1126,15 @@
</span><span class="cx">     return formatLocalizedString(WEB_UI_STRING(&quot;Use at least %d characters&quot;, &quot;Validation message for form control elements with a value shorter than minimum allowed length&quot;), minLength);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(COCOA)
+
</ins><span class="cx"> String validationMessageTooLongText(int, int maxLength)
</span><span class="cx"> {
</span><span class="cx">     return formatLocalizedString(WEB_UI_STRING(&quot;Use no more than %d characters&quot;, &quot;Validation message for form control elements with a value shorter than maximum allowed length&quot;), maxLength);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#endif
+
</ins><span class="cx"> String validationMessageRangeUnderflowText(const String&amp; minimum)
</span><span class="cx"> {
</span><span class="cx"> #if USE(CF)
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCoreplatformLocalizedStringsh"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/platform/LocalizedStrings.h (210723 => 210724)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/platform/LocalizedStrings.h        2017-01-13 07:05:15 UTC (rev 210723)
+++ branches/safari-603-branch/Source/WebCore/platform/LocalizedStrings.h        2017-01-13 07:05:20 UTC (rev 210724)
</span><span class="lines">@@ -308,6 +308,11 @@
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT String localizedString(const char* key);
</span><span class="cx"> 
</span><ins>+#ifdef __OBJC__
+#define WEB_UI_NSSTRING(string, description) WebCore::localizedNSString(string)
+    WEBCORE_EXPORT NSString *localizedNSString(NSString *key) NS_FORMAT_ARGUMENT(1);
+#endif
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // LocalizedStrings_h
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCoreplatformcocoaLocalizedStringsCocoamm"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/platform/cocoa/LocalizedStringsCocoa.mm (210723 => 210724)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/platform/cocoa/LocalizedStringsCocoa.mm        2017-01-13 07:05:15 UTC (rev 210723)
+++ branches/safari-603-branch/Source/WebCore/platform/cocoa/LocalizedStringsCocoa.mm        2017-01-13 07:05:20 UTC (rev 210724)
</span><span class="lines">@@ -26,7 +26,6 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;LocalizedStrings.h&quot;
</span><span class="cx"> 
</span><del>-#include &lt;CoreFoundation/CFBundle.h&gt;
</del><span class="cx"> #include &lt;wtf/Assertions.h&gt;
</span><span class="cx"> #include &lt;wtf/MainThread.h&gt;
</span><span class="cx"> #include &lt;wtf/RetainPtr.h&gt;
</span><span class="lines">@@ -34,10 +33,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-String localizedString(const char* key)
</del><ins>+NSString *localizedNSString(NSString *key)
</ins><span class="cx"> {
</span><del>-    static CFBundleRef bundle = CFBundleGetBundleWithIdentifier(CFSTR(&quot;com.apple.WebCore&quot;));
-
</del><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx">     // Can be called on a dispatch queue when initializing strings on iOS.
</span><span class="cx">     // See LoadWebLocalizedStrings and &lt;rdar://problem/7902473&gt;.
</span><span class="lines">@@ -44,16 +41,19 @@
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    static NSBundle *bundle = [NSBundle bundleWithIdentifier:@&quot;com.apple.WebCore&quot;];
+    return [bundle localizedStringForKey:key value:@&quot;localized string not found&quot; table:nullptr];
+}
+
+String localizedString(const char* key)
+{
</ins><span class="cx">     RetainPtr&lt;CFStringRef&gt; keyString = adoptCF(CFStringCreateWithCStringNoCopy(0, key, kCFStringEncodingUTF8, kCFAllocatorNull));
</span><del>-    CFStringRef notFound = CFSTR(&quot;localized string not found&quot;);
-    RetainPtr&lt;CFStringRef&gt; result;
-    if (bundle) {
-        result = adoptCF(CFBundleCopyLocalizedString(bundle, keyString.get(), notFound, 0));
-        ASSERT_WITH_MESSAGE(result.get() != notFound, &quot;could not find localizable string %s in bundle&quot;, key);
-    } else
-        result = notFound;
</del><ins>+    return localizedNSString((NSString *)keyString.get());
+}
</ins><span class="cx"> 
</span><del>-    return String(result.get());
</del><ins>+String validationMessageTooLongText(int, int maxLength)
+{
+    return [NSString localizedStringWithFormat:WEB_UI_NSSTRING(@&quot;Use no more than %d character(s)&quot;, @&quot;Validation message for form control elements with a value shorter than maximum allowed length&quot;), maxLength];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre>
</div>
</div>

</body>
</html>