Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1006)

Side by Side Diff: Source/WebCore/platform/text/PlatformLocale.cpp

Issue 14141002: Remove ENABLE_INPUT_TYPE_WEEK compile-time flag. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update html.css Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011,2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011,2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 { 327 {
328 initializeLocaleData(); 328 initializeLocaleData();
329 return m_decimalSymbols[DecimalSeparatorIndex]; 329 return m_decimalSymbols[DecimalSeparatorIndex];
330 } 330 }
331 #endif 331 #endif
332 332
333 String Locale::formatDateTime(const DateComponents& date, FormatType formatType) 333 String Locale::formatDateTime(const DateComponents& date, FormatType formatType)
334 { 334 {
335 if (date.type() == DateComponents::Invalid) 335 if (date.type() == DateComponents::Invalid)
336 return String(); 336 return String();
337 #if !ENABLE(INPUT_TYPE_WEEK)
338 if (date.type() == DateComponents::Week)
339 return String();
340 #endif
341 337
342 DateTimeStringBuilder builder(*this, date); 338 DateTimeStringBuilder builder(*this, date);
343 switch (date.type()) { 339 switch (date.type()) {
344 case DateComponents::Time: 340 case DateComponents::Time:
345 builder.build(formatType == FormatTypeShort ? shortTimeFormat() : timeFo rmat()); 341 builder.build(formatType == FormatTypeShort ? shortTimeFormat() : timeFo rmat());
346 break; 342 break;
347 case DateComponents::Date: 343 case DateComponents::Date:
348 builder.build(dateFormat()); 344 builder.build(dateFormat());
349 break; 345 break;
350 case DateComponents::Month: 346 case DateComponents::Month:
351 builder.build(formatType == FormatTypeShort ? shortMonthFormat() : month Format()); 347 builder.build(formatType == FormatTypeShort ? shortMonthFormat() : month Format());
352 break; 348 break;
353 case DateComponents::Week: 349 case DateComponents::Week:
354 #if ENABLE(INPUT_TYPE_WEEK)
355 builder.build(weekFormatInLDML()); 350 builder.build(weekFormatInLDML());
356 break; 351 break;
357 #endif
358 case DateComponents::DateTime: 352 case DateComponents::DateTime:
359 case DateComponents::DateTimeLocal: 353 case DateComponents::DateTimeLocal:
360 builder.build(formatType == FormatTypeShort ? dateTimeFormatWithoutSecon ds() : dateTimeFormatWithSeconds()); 354 builder.build(formatType == FormatTypeShort ? dateTimeFormatWithoutSecon ds() : dateTimeFormatWithSeconds());
361 break; 355 break;
362 case DateComponents::Invalid: 356 case DateComponents::Invalid:
363 ASSERT_NOT_REACHED(); 357 ASSERT_NOT_REACHED();
364 break; 358 break;
365 } 359 }
366 return builder.toString(); 360 return builder.toString();
367 } 361 }
368 362
369 } 363 }
OLDNEW
« no previous file with comments | « Source/WebCore/platform/chromium/LocalizedStringsChromium.cpp ('k') | Source/WebKit/chromium/features.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698