LayoutTests/ChangeLog

 12011-05-15 Kent Tamura <tkent@chromium.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Initial LocalizedDateICU.cpp implementation
 6 https://bugs.webkit.org/show_bug.cgi?id=60868
 7
 8 Convert date-input-visible-strings.html to dumpAsText(),
 9 and add a Chromium expectation.
 10
 11 * fast/forms/date-input-visible-strings-expected.txt: Added.
 12 * fast/forms/date-input-visible-strings.html:
 13 * platform/chromium-linux/fast/forms/date-input-visible-strings-expected.png: Removed.
 14 * platform/chromium-mac-leopard/fast/forms/date-input-visible-strings-expected.png: Removed.
 15 * platform/chromium-mac/fast/forms/date-input-visible-strings-expected.txt: Added.
 16 * platform/chromium-win/fast/forms/date-input-visible-strings-expected.png: Removed.
 17 * platform/chromium-win/fast/forms/date-input-visible-strings-expected.txt: Removed.
 18 * platform/gtk/fast/forms/date-input-visible-strings-expected.png: Removed.
 19 * platform/gtk/fast/forms/date-input-visible-strings-expected.txt: Removed.
 20 * platform/mac/fast/forms/date-input-visible-strings-expected.png: Removed.
 21 * platform/mac/fast/forms/date-input-visible-strings-expected.txt: Removed.
 22 * platform/win/fast/forms/date-input-visible-strings-expected.txt: Removed.
 23
1242011-05-15 Rob Buis <rbuis@rim.com>
225
326 Reviewed by Eric Seidel.

LayoutTests/fast/forms/date-input-visible-strings-expected.txt

 1The user-visible values of the input fields should be localized if the platform has a LocalizedDate implementation. Otherwise, they should be in the HTML5 formats.
 2
 3date: value='2011-04-27' visible='2011-04-27'
 4datetime: value='2011-04-27T01:56:20.391Z' visible='2011-04-27T01:56:20.391Z'
 5datetime-local: value='2011-04-27T01:56:20.391' visible='2011-04-27T01:56:20.391'
 6month: value='2011-04' visible='2011-04'
 7time: value='01:56:20.391' visible='01:56:20.391'
 8week: value='2011-W17' visible='2011-W17'
 9PASS successfullyParsed is true
 10
 11TEST COMPLETE
 12

LayoutTests/fast/forms/date-input-visible-strings.html

11<!DOCTYPE html>
22<html>
33<head>
4  <title>Date Input Test</title>
5  <style>
6  input { width: 300px; }
7  </style>
 4<title>Date Input Test</title>
 5<script src="../js/resources/js-test-pre.js"></script>
86</head>
97<body>
10  <!--
11  The user-visible values of the input fields should be localized if the platform has
12  a LocalizedDate implementation. Otherwise, they should be in the HTML5 formats.
13  -->
14  <form method="get" action="#">
15  <input title="test" type="date"><br>
16  <input type="datetime"><br>
17  <input type="datetime-local"><br>
18  <input type="month"><br>
19  <input type="time"><br>
20  <input type="week"><br>
21  </form>
22  <script>
23  // Tue Apr 26 2011 18:56:20 GMT-0700 (PDT) which is Wed Apr 27 2011 01:56:20 GMT.
24  var date = new Date(1303869380391);
25  var dateAsNumber = +date;
26  var inputs = document.getElementsByTagName("input");
27  for (var i=0, len=inputs.length; i<len; ++i) {
28  var input = inputs[i];
29  input.name = i;
30  if ("valueAsNumber" in input && input.type !== "month")
31  input.valueAsNumber = dateAsNumber;
32  else if ("valueAsDate" in input)
33  input.valueAsDate = date;
34  }
35  </script>
 8<p>The user-visible values of the input fields should be localized if the platform has
 9a LocalizedDate implementation. Otherwise, they should be in the HTML5 formats.</p>
 10
 11<form method="get" action="#">
 12 <input title="test" type="date"><br>
 13 <input type="datetime"><br>
 14 <input type="datetime-local"><br>
 15 <input type="month"><br>
 16 <input type="time"><br>
 17 <input type="week"><br>
 18</form>
 19
 20<div id=console></div>
 21<script>
 22// Tue Apr 26 2011 18:56:20 GMT-0700 (PDT) which is Wed Apr 27 2011 01:56:20 GMT.
 23var date = new Date(1303869380391);
 24var dateAsNumber = +date;
 25var inputs = document.getElementsByTagName("input");
 26for (var i = 0, len = inputs.length; i < len; ++i) {
 27 var input = inputs[i];
 28 input.name = i;
 29 if ("valueAsNumber" in input && input.type !== "month")
 30 input.valueAsNumber = dateAsNumber;
 31 else if ("valueAsDate" in input)
 32 input.valueAsDate = date;
 33 input.focus();
 34 document.execCommand('SelectAll');
 35 debug(input.type + ": value='" + input.value + "' visible='" + document.getSelection().toString() + "'");
 36}
 37document.body.removeChild(document.getElementsByTagName("form")[0]);
 38var successfullyParsed = true;
 39</script>
 40<script src="../js/resources/js-test-post.js"></script>
3641</body>
3742</html>

LayoutTests/platform/chromium-linux/fast/forms/date-input-visible-strings-expected.png

Exception raised during decoding git binary patch:
Error running git apply --directory=/tmp
with patch:
diff --git a/PrettyPatch20260325-3920-y0q8px.bin b/PrettyPatch20260325-3920-y0q8px.bin
new file mode 100644
index 0000000000000000000000000000000000000000..c1c535aba78f8609a22281843d1dbd44b20cbbb0
GIT binary patch
literal 11211
zcmeHtcUY6@w(ke1s36P;h(Z8o9FZnfAaqAWHboGTqI3}frT31Gj*Qe%K%`~>A<_h-
zL^=#Y3<%Ps6Obw`p$7<ryW-5=clJ5^?7Po?p8Ll+&*UE-^O@v*zjv))Ti@d=dYVTL
z^BhJH<cQW^E?z|trjrQ5XnK$l-r?fpIs<=%y);a{Y#r=u?|OPWBl41Vw<M*|Hn*j2
zO3O+~-d3=alsYFVD<^4#mXedYC38ji;5`I6iD+H?{+eIP;z+1dk9XSU@`s-;_$u9M
zJrLp...
error: invalid path '/tmp/PrettyPatch20260325-3920-y0q8px.bin'

/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:924:in `run_git_apply_on_patch'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:935:in `extract_contents_from_git_binary_literal_chunk'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:950:in `extract_contents_from_remote'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:713:in `initialize'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `new'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `block in parse'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `collect'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `parse'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:21:in `prettify'
/var/www/html/PrettyPatch/prettify.rb:30:in `<main>'

LayoutTests/platform/chromium-mac-leopard/fast/forms/date-input-visible-strings-expected.png

Exception raised during decoding git binary patch:
Error running git apply --directory=/tmp
with patch:
diff --git a/PrettyPatch20260325-3920-c194aa.bin b/PrettyPatch20260325-3920-c194aa.bin
new file mode 100644
index 0000000000000000000000000000000000000000..8a9f10bca0e7f1be5abcd76352a5fa0d416d5dd2
GIT binary patch
literal 16794
zcmeHv2UL{lnr5M`7{OLC0D=Lq5rsyQWE2Gv0TBfys^n0BL?sn%ZUxaoLCHwYN-BZ`
z6Nrc)sU)LFP9ix~?elx@otd7yJ9F>u&YnGU`W(-xE()st@O@8wtA9VCsk(L*=PDA3
zv{vot;gclN((NSDk~1ro<0m0*R~+#m=yK$Yi>Z~lsjagsnRMV+Gc&3E2ShE*&zqeW
zJuh~_{JhwK0}>a^_e+@V7Zo#o#Szv>B5fzB9X@#KQrJ+Nr_1T?aOPOG^vdYpdw6cG
z+_93...
error: invalid path '/tmp/PrettyPatch20260325-3920-c194aa.bin'

/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:924:in `run_git_apply_on_patch'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:935:in `extract_contents_from_git_binary_literal_chunk'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:950:in `extract_contents_from_remote'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:713:in `initialize'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `new'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `block in parse'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `collect'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `parse'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:21:in `prettify'
/var/www/html/PrettyPatch/prettify.rb:30:in `<main>'

LayoutTests/platform/chromium-mac/fast/forms/date-input-visible-strings-expected.txt

 1The user-visible values of the input fields should be localized if the platform has a LocalizedDate implementation. Otherwise, they should be in the HTML5 formats.
 2
 3date: value='2011-04-27' visible='4/27/11'
 4datetime: value='2011-04-27T01:56:20.391Z' visible='2011-04-27T01:56:20.391Z'
 5datetime-local: value='2011-04-27T01:56:20.391' visible='2011-04-27T01:56:20.391'
 6month: value='2011-04' visible='2011-04'
 7time: value='01:56:20.391' visible='01:56:20.391'
 8week: value='2011-W17' visible='2011-W17'
 9PASS successfullyParsed is true
 10
 11TEST COMPLETE
 12

LayoutTests/platform/chromium-win/fast/forms/date-input-visible-strings-expected.png

Exception raised during decoding git binary patch:
Error running git apply --directory=/tmp
with patch:
diff --git a/PrettyPatch20260325-3920-1fdsrd2.bin b/PrettyPatch20260325-3920-1fdsrd2.bin
new file mode 100644
index 0000000000000000000000000000000000000000..272089a4ce10fe6d8718230a88e0058c6584bb4e
GIT binary patch
literal 4969
zcmeHLXH-*Z8vY1UBos#khZ=Qo6bVHk5IRE<EK~(TGZ_$!H0dZch=4c(R#536ogke6
z0s#gc4Gfuq&_fxdNHYpVq$GPSyF2TivuF35J$v>CzwSBrd++z%^Sn=a?~S)GGZx?z
z=K}x;oG>x80)TTL05A+M47ww-N8}K6kqt1y1i0W`T|E2)y#U%x={!owS=ITNGD=<5
zRYhG{P07twMcGwZU0GG>m^wUiI1Yf_8z&5ZID0v5k?!PI(vTBl=|87R**Ym<)?(J;
zhj7...
error: invalid path '/tmp/PrettyPatch20260325-3920-1fdsrd2.bin'

/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:924:in `run_git_apply_on_patch'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:935:in `extract_contents_from_git_binary_literal_chunk'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:950:in `extract_contents_from_remote'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:713:in `initialize'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `new'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `block in parse'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `collect'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `parse'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:21:in `prettify'
/var/www/html/PrettyPatch/prettify.rb:30:in `<main>'

LayoutTests/platform/chromium-win/fast/forms/date-input-visible-strings-expected.txt

1 layer at (0,0) size 800x600
2  RenderView at (0,0) size 800x600
3 layer at (0,0) size 800x172
4  RenderBlock {HTML} at (0,0) size 800x172
5  RenderBody {BODY} at (8,8) size 784x156
6  RenderBlock {FORM} at (0,0) size 784x156
7  RenderTextControl {INPUT} at (0,2) size 304x22 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
8  RenderBR {BR} at (304,3) size 0x19
9  RenderTextControl {INPUT} at (0,28) size 304x22 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
10  RenderBR {BR} at (304,29) size 0x19
11  RenderTextControl {INPUT} at (0,54) size 304x22 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
12  RenderBR {BR} at (304,55) size 0x19
13  RenderTextControl {INPUT} at (0,80) size 304x22 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
14  RenderBR {BR} at (304,81) size 0x19
15  RenderTextControl {INPUT} at (0,106) size 304x22 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
16  RenderBR {BR} at (304,107) size 0x19
17  RenderTextControl {INPUT} at (0,132) size 304x22 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
18  RenderBR {BR} at (304,133) size 0x19
19 layer at (10,13) size 285x16
20  RenderBlock {DIV} at (2,3) size 285x16
21  RenderText {#text} at (1,0) size 64x16
22  text run at (1,0) width 64: "2011-04-27"
23 layer at (10,39) size 285x16
24  RenderBlock {DIV} at (2,3) size 285x16
25  RenderText {#text} at (1,0) size 153x16
26  text run at (1,0) width 153: "2011-04-27T01:56:20.391Z"
27 layer at (10,65) size 285x16
28  RenderBlock {DIV} at (2,3) size 285x16
29  RenderText {#text} at (1,0) size 146x16
30  text run at (1,0) width 146: "2011-04-27T01:56:20.391"
31 layer at (10,91) size 285x16
32  RenderBlock {DIV} at (2,3) size 285x16
33  RenderText {#text} at (1,0) size 46x16
34  text run at (1,0) width 46: "2011-04"
35 layer at (10,117) size 285x16
36  RenderBlock {DIV} at (2,3) size 285x16
37  RenderText {#text} at (1,0) size 75x16
38  text run at (1,0) width 75: "01:56:20.391"
39 layer at (10,143) size 285x16
40  RenderBlock {DIV} at (2,3) size 285x16
41  RenderText {#text} at (1,0) size 59x16
42  text run at (1,0) width 59: "2011-W17"
43 layer at (295,12) size 15x18
44  RenderBlock (relative positioned) {DIV} at (287,2) size 15x18
45 layer at (295,38) size 15x18
46  RenderBlock (relative positioned) {DIV} at (287,2) size 15x18
47 layer at (295,64) size 15x18
48  RenderBlock (relative positioned) {DIV} at (287,2) size 15x18
49 layer at (295,90) size 15x18
50  RenderBlock (relative positioned) {DIV} at (287,2) size 15x18
51 layer at (295,116) size 15x18
52  RenderBlock (relative positioned) {DIV} at (287,2) size 15x18
53 layer at (295,142) size 15x18
54  RenderBlock (relative positioned) {DIV} at (287,2) size 15x18

LayoutTests/platform/gtk/fast/forms/date-input-visible-strings-expected.png

Exception raised during decoding git binary patch:
Error running git apply --directory=/tmp
with patch:
diff --git a/PrettyPatch20260325-3920-qkz9ve.bin b/PrettyPatch20260325-3920-qkz9ve.bin
new file mode 100644
index 0000000000000000000000000000000000000000..600ac2a37fec891fe4e13346b2f6ef8f6cfe5901
GIT binary patch
literal 15284
zcmeHuby$`8y7r5Rphy^qk}d;OO6f)sK}AZGPU-H>5fl^wM@cCK$whaEh?IbIw+mRn
zqNMXYYi9O2XYW1xoZ08w`=9R`y)F^K#moCXzx%n17xJ=FWXEWZAqYZt@2<o{1R*?+
zAcs^)4#B@rou*=jH&^ZNsMzZn8|azYIanaqIk`9ucno;CpBU(K3Gnmsa2s-S>l^aw
z@jVgXy77ejC)W%3S3B}VT1o;r!2f<<k^B}x&Lj6EZas32#tnNtdW5O0UpAtA9mj(*
z6?}h...
error: invalid path '/tmp/PrettyPatch20260325-3920-qkz9ve.bin'

/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:924:in `run_git_apply_on_patch'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:935:in `extract_contents_from_git_binary_literal_chunk'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:950:in `extract_contents_from_remote'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:713:in `initialize'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `new'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `block in parse'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `collect'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `parse'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:21:in `prettify'
/var/www/html/PrettyPatch/prettify.rb:30:in `<main>'

LayoutTests/platform/gtk/fast/forms/date-input-visible-strings-expected.txt

1 layer at (0,0) size 800x600
2  RenderView at (0,0) size 800x600
3 layer at (0,0) size 800x190
4  RenderBlock {HTML} at (0,0) size 800x190
5  RenderBody {BODY} at (8,8) size 784x174
6  RenderBlock {FORM} at (0,0) size 784x174
7  RenderTextControl {INPUT} at (0,2) size 306x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
8  RenderBR {BR} at (306,5) size 0x19
9  RenderTextControl {INPUT} at (0,31) size 306x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
10  RenderBR {BR} at (306,34) size 0x19
11  RenderTextControl {INPUT} at (0,60) size 306x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
12  RenderBR {BR} at (306,63) size 0x19
13  RenderTextControl {INPUT} at (0,89) size 306x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
14  RenderBR {BR} at (306,92) size 0x19
15  RenderTextControl {INPUT} at (0,118) size 306x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
16  RenderBR {BR} at (306,121) size 0x19
17  RenderTextControl {INPUT} at (0,147) size 306x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
18  RenderBR {BR} at (306,150) size 0x19
19 layer at (11,13) size 280x19
20  RenderBlock {DIV} at (3,3) size 280x19
21  RenderText {#text} at (1,0) size 82x19
22  text run at (1,0) width 82: "2011-04-27"
23 layer at (11,42) size 280x19
24  RenderBlock {DIV} at (3,3) size 280x19
25  RenderText {#text} at (1,0) size 195x19
26  text run at (1,0) width 195: "2011-04-27T01:56:20.391Z"
27 layer at (11,71) size 280x19
28  RenderBlock {DIV} at (3,3) size 280x19
29  RenderText {#text} at (1,0) size 185x19
30  text run at (1,0) width 185: "2011-04-27T01:56:20.391"
31 layer at (11,100) size 280x19
32  RenderBlock {DIV} at (3,3) size 280x19
33  RenderText {#text} at (1,0) size 59x19
34  text run at (1,0) width 59: "2011-04"
35 layer at (11,129) size 280x19
36  RenderBlock {DIV} at (3,3) size 280x19
37  RenderText {#text} at (1,0) size 93x19
38  text run at (1,0) width 93: "01:56:20.391"
39 layer at (11,158) size 280x19
40  RenderBlock {DIV} at (3,3) size 280x19
41  RenderText {#text} at (1,0) size 74x19
42  text run at (1,0) width 74: "2011-W17"
43 layer at (292,12) size 15x21
44  RenderBlock (relative positioned) {DIV} at (284,2) size 15x21
45 layer at (292,41) size 15x21
46  RenderBlock (relative positioned) {DIV} at (284,2) size 15x21
47 layer at (292,70) size 15x21
48  RenderBlock (relative positioned) {DIV} at (284,2) size 15x21
49 layer at (292,99) size 15x21
50  RenderBlock (relative positioned) {DIV} at (284,2) size 15x21
51 layer at (292,128) size 15x21
52  RenderBlock (relative positioned) {DIV} at (284,2) size 15x21
53 layer at (292,157) size 15x21
54  RenderBlock (relative positioned) {DIV} at (284,2) size 15x21

LayoutTests/platform/mac/fast/forms/date-input-visible-strings-expected.png

Exception raised during decoding git binary patch:
Error running git apply --directory=/tmp
with patch:
diff --git a/PrettyPatch20260325-3920-184o1pk.bin b/PrettyPatch20260325-3920-184o1pk.bin
new file mode 100644
index 0000000000000000000000000000000000000000..238528cf27c3492ab44486fd63f2b36310b198be
GIT binary patch
literal 24175
zcmeHvc{r5c|F<nvk|kSZiI8LqS;CMtdr9^siY(D&><rRkD@yidRF;I1?CYq;k}M(n
zGTF&8S;sOno-@?v`}zK^&+mDj>vuitb@f+q&D{67&wbAO{o0OjLw(I7hmId2BO^O<
zSxfCI85t!H85xBsEj9Q}ve*5);2$BFx+%>5_APrC56?SfGUDgu#AT)IZphw{vcF+}
z{)XKRdvWO-=jColO4^;5mR79__zAAC<fN)<cv)4I$MBxJgOlqmGBO|Xhu1n>m{pDu
zFS...
error: invalid path '/tmp/PrettyPatch20260325-3920-184o1pk.bin'

/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:924:in `run_git_apply_on_patch'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:935:in `extract_contents_from_git_binary_literal_chunk'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:950:in `extract_contents_from_remote'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:713:in `initialize'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `new'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `block in parse'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `collect'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `parse'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:21:in `prettify'
/var/www/html/PrettyPatch/prettify.rb:30:in `<main>'

LayoutTests/platform/mac/fast/forms/date-input-visible-strings-expected.txt

1 layer at (0,0) size 800x600
2  RenderView at (0,0) size 800x600
3 layer at (0,0) size 800x154
4  RenderBlock {HTML} at (0,0) size 800x154
5  RenderBody {BODY} at (8,8) size 784x138
6  RenderBlock {FORM} at (0,0) size 784x138
7  RenderTextControl {INPUT} at (0,2) size 306x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
8  RenderBR {BR} at (306,2) size 0x18
9  RenderTextControl {INPUT} at (0,25) size 306x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
10  RenderBR {BR} at (306,25) size 0x18
11  RenderTextControl {INPUT} at (0,48) size 306x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
12  RenderBR {BR} at (306,48) size 0x18
13  RenderTextControl {INPUT} at (0,71) size 306x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
14  RenderBR {BR} at (306,71) size 0x18
15  RenderTextControl {INPUT} at (0,94) size 306x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
16  RenderBR {BR} at (306,94) size 0x18
17  RenderTextControl {INPUT} at (0,117) size 306x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
18  RenderBR {BR} at (306,117) size 0x18
19 layer at (11,13) size 282x13
20  RenderBlock {DIV} at (3,3) size 282x13
21  RenderText {#text} at (1,0) size 69x13
22  text run at (1,0) width 69: "2011-04-27"
23 layer at (11,36) size 282x13
24  RenderBlock {DIV} at (3,3) size 282x13
25  RenderText {#text} at (1,0) size 156x13
26  text run at (1,0) width 156: "2011-04-27T01:56:20.391Z"
27 layer at (11,59) size 282x13
28  RenderBlock {DIV} at (3,3) size 282x13
29  RenderText {#text} at (1,0) size 149x13
30  text run at (1,0) width 149: "2011-04-27T01:56:20.391"
31 layer at (11,82) size 282x13
32  RenderBlock {DIV} at (3,3) size 282x13
33  RenderText {#text} at (1,0) size 49x13
34  text run at (1,0) width 49: "2011-04"
35 layer at (11,105) size 282x13
36  RenderBlock {DIV} at (3,3) size 282x13
37  RenderText {#text} at (1,0) size 74x13
38  text run at (1,0) width 74: "01:56:20.391"
39 layer at (11,128) size 282x13
40  RenderBlock {DIV} at (3,3) size 282x13
41  RenderText {#text} at (1,0) size 58x13
42  text run at (1,0) width 58: "2011-W17"
43 layer at (298,12) size 13x15
44  RenderBlock (relative positioned) {DIV} at (290,2) size 13x15
45 layer at (298,35) size 13x15
46  RenderBlock (relative positioned) {DIV} at (290,2) size 13x15
47 layer at (298,58) size 13x15
48  RenderBlock (relative positioned) {DIV} at (290,2) size 13x15
49 layer at (298,81) size 13x15
50  RenderBlock (relative positioned) {DIV} at (290,2) size 13x15
51 layer at (298,104) size 13x15
52  RenderBlock (relative positioned) {DIV} at (290,2) size 13x15
53 layer at (298,127) size 13x15
54  RenderBlock (relative positioned) {DIV} at (290,2) size 13x15

LayoutTests/platform/win/fast/forms/date-input-visible-strings-expected.txt

1 layer at (0,0) size 800x600
2  RenderView at (0,0) size 800x600
3 layer at (0,0) size 800x154
4  RenderBlock {HTML} at (0,0) size 800x154
5  RenderBody {BODY} at (8,8) size 784x138
6  RenderBlock {FORM} at (0,0) size 784x138
7  RenderTextControl {INPUT} at (0,2) size 306x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
8  RenderBR {BR} at (306,2) size 0x18
9  RenderTextControl {INPUT} at (0,25) size 306x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
10  RenderBR {BR} at (306,25) size 0x18
11  RenderTextControl {INPUT} at (0,48) size 306x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
12  RenderBR {BR} at (306,48) size 0x18
13  RenderTextControl {INPUT} at (0,71) size 306x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
14  RenderBR {BR} at (306,71) size 0x18
15  RenderTextControl {INPUT} at (0,94) size 306x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
16  RenderBR {BR} at (306,94) size 0x18
17  RenderTextControl {INPUT} at (0,117) size 306x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
18  RenderBR {BR} at (306,117) size 0x18
19 layer at (11,13) size 295x13
20  RenderBlock {DIV} at (3,3) size 295x13
21  RenderText {#text} at (1,0) size 69x13
22  text run at (1,0) width 69: "2011-04-27"
23 layer at (11,36) size 295x13
24  RenderBlock {DIV} at (3,3) size 295x13
25  RenderText {#text} at (1,0) size 156x13
26  text run at (1,0) width 156: "2011-04-27T01:56:20.391Z"
27 layer at (11,59) size 295x13
28  RenderBlock {DIV} at (3,3) size 295x13
29  RenderText {#text} at (1,0) size 149x13
30  text run at (1,0) width 149: "2011-04-27T01:56:20.391"
31 layer at (11,82) size 295x13
32  RenderBlock {DIV} at (3,3) size 295x13
33  RenderText {#text} at (1,0) size 49x13
34  text run at (1,0) width 49: "2011-04"
35 layer at (11,105) size 295x13
36  RenderBlock {DIV} at (3,3) size 295x13
37  RenderText {#text} at (1,0) size 74x13
38  text run at (1,0) width 74: "01:56:20.391"
39 layer at (11,128) size 295x13
40  RenderBlock {DIV} at (3,3) size 295x13
41  RenderText {#text} at (1,0) size 58x13
42  text run at (1,0) width 58: "2011-W17"

Source/WebCore/ChangeLog

 12011-05-15 Kent Tamura <tkent@chromium.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Initial LocalizedDateICU.cpp implementation
 6 https://bugs.webkit.org/show_bug.cgi?id=60868
 7
 8 Add LocalizedDateICU.cpp, which supports only Date type.
 9 It uses a short format. e.g. 5/15/11 in US locale.
 10
 11 * WebCore.gyp/WebCore.gyp: Exclude LocalizedDateNone.cpp.
 12 * WebCore.gypi: Add LocalizedDateICu.cpp.
 13 * platform/text/LocalizedDateICU.cpp: Added.
 14 (WebCore::parseLocalizedDate):
 15 (WebCore::formatLocalizedDate):
 16
1172011-05-15 Ilya Tikhonovsky <loislo@chromium.org>
218
319 Reviewed by Yury Semikhatsky.

Source/WebCore/WebCore.gyp/WebCore.gyp

12691269 ['exclude', 'platform/image-encoders/PNGImageEncoder\\.(cpp|h)$'],
12701270 ['exclude', 'platform/network/ResourceHandle\\.cpp$'],
12711271 ['exclude', 'platform/sql/SQLiteFileSystem\\.cpp$'],
 1272 ['exclude', 'platform/text/LocalizedDateNone\\.cpp$'],
12721273 ['exclude', 'platform/text/LocalizedNumberNone\\.cpp$'],
12731274 ['exclude', 'platform/text/TextEncodingDetectorNone\\.cpp$'],
12741275 ],

Source/WebCore/WebCore.gypi

49094909 'platform/text/Hyphenation.h',
49104910 'platform/text/LineEnding.cpp',
49114911 'platform/text/LocalizedDate.h',
 4912 'platform/text/LocalizedDateICU.cpp',
49124913 'platform/text/LocalizedDateNone.cpp',
49134914 'platform/text/LocalizedNumber.h',
49144915 'platform/text/LocalizedNumberICU.cpp',

Source/WebCore/platform/text/LocalizedDateICU.cpp

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#include "config.h"
 32#include "LocalizedDate.h"
 33
 34#include <limits>
 35#include <unicode/datefmt.h> // smpdtfmt.h?
 36#include <wtf/OwnPtr.h>
 37#include <wtf/PassOwnPtr.h>
 38
 39using namespace icu;
 40using namespace std;
 41
 42namespace WebCore {
 43
 44double parseLocalizedDate(const String& input, DateComponents::Type type)
 45{
 46 switch (type) {
 47 case DateComponents::Date: {
 48 OwnPtr<DateFormat> formatter = adoptPtr(DateFormat::createDateInstance(DateFormat::kShort));
 49 UnicodeString inputUnicodeString(input.characters(), input.length());
 50 ParsePosition position(0);
 51 UDate resultDate = formatter->parse(inputUnicodeString, position);
 52 if (position.getIndex() != inputUnicodeString.length())
 53 break;
 54 return resultDate;
 55 }
 56 case DateComponents::DateTime:
 57 case DateComponents::DateTimeLocal:
 58 case DateComponents::Month:
 59 case DateComponents::Time:
 60 case DateComponents::Week:
 61 case DateComponents::Invalid:
 62 break;
 63 }
 64 return numeric_limits<double>::quiet_NaN();
 65}
 66
 67String formatLocalizedDate(const DateComponents& dateComponents)
 68{
 69 switch (dateComponents.type()) {
 70 case DateComponents::Date: {
 71 OwnPtr<DateFormat> formatter = adoptPtr(DateFormat::createDateInstance(DateFormat::kShort));
 72 UnicodeString result;
 73 formatter->format(dateComponents.millisecondsSinceEpoch(), result);
 74 return String(result.getBuffer(), result.length());
 75 }
 76 case DateComponents::DateTime:
 77 case DateComponents::DateTimeLocal:
 78 case DateComponents::Month:
 79 case DateComponents::Time:
 80 case DateComponents::Week:
 81 case DateComponents::Invalid:
 82 break;
 83 }
 84 return String();
 85}
 86
 87}