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

Side by Side Diff: third_party/WebKit/Source/wtf/DateMath.cpp

Issue 1444173002: third_party/WebKit: fix typos found in comments (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CL Description change, Typo patch apply to upstream master. Created 5 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
3 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
4 * Copyright (C) 2009 Google Inc. All rights reserved. 4 * Copyright (C) 2009 Google Inc. All rights reserved.
5 * Copyright (C) 2007-2009 Torch Mobile, Inc. 5 * Copyright (C) 2007-2009 Torch Mobile, Inc.
6 * Copyright (C) 2010 &yet, LLC. (nate@andyet.net) 6 * Copyright (C) 2010 &yet, LLC. (nate@andyet.net)
7 * 7 *
8 * The Original Code is Mozilla Communicator client code, released 8 * The Original Code is Mozilla Communicator client code, released
9 * March 31, 1998. 9 * March 31, 1998.
10 * 10 *
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 486
487 static bool parseLong(const char* string, char** stopPosition, int base, long* r esult) 487 static bool parseLong(const char* string, char** stopPosition, int base, long* r esult)
488 { 488 {
489 *result = strtol(string, stopPosition, base); 489 *result = strtol(string, stopPosition, base);
490 // Avoid the use of errno as it is not available on Windows CE 490 // Avoid the use of errno as it is not available on Windows CE
491 if (string == *stopPosition || *result == std::numeric_limits<long>::min() | | *result == std::numeric_limits<long>::max()) 491 if (string == *stopPosition || *result == std::numeric_limits<long>::min() | | *result == std::numeric_limits<long>::max())
492 return false; 492 return false;
493 return true; 493 return true;
494 } 494 }
495 495
496 // Odd case where 'exec' is allowed to be 0, to accomodate a caller in WebCore. 496 // Odd case where 'exec' is allowed to be 0, to accommodate a caller in WebCore.
497 static double parseDateFromNullTerminatedCharacters(const char* dateString, bool & haveTZ, int& offset) 497 static double parseDateFromNullTerminatedCharacters(const char* dateString, bool & haveTZ, int& offset)
498 { 498 {
499 haveTZ = false; 499 haveTZ = false;
500 offset = 0; 500 offset = 0;
501 501
502 // This parses a date in the form: 502 // This parses a date in the form:
503 // Tuesday, 09-Nov-99 23:12:40 GMT 503 // Tuesday, 09-Nov-99 23:12:40 GMT
504 // or 504 // or
505 // Sat, 01-Jan-2000 08:00:00 GMT 505 // Sat, 01-Jan-2000 08:00:00 GMT
506 // or 506 // or
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 // There was no year; the number was the hour. 635 // There was no year; the number was the hour.
636 year = -1; 636 year = -1;
637 } else { 637 } else {
638 // in the normal case (we parsed the year), advance to the next numb er 638 // in the normal case (we parsed the year), advance to the next numb er
639 dateString = ++newPosStr; 639 dateString = ++newPosStr;
640 skipSpacesAndComments(dateString); 640 skipSpacesAndComments(dateString);
641 } 641 }
642 642
643 parseLong(dateString, &newPosStr, 10, &hour); 643 parseLong(dateString, &newPosStr, 10, &hour);
644 // Do not check for errno here since we want to continue 644 // Do not check for errno here since we want to continue
645 // even if errno was set becasue we are still looking 645 // even if errno was set because we are still looking
646 // for the timezone! 646 // for the timezone!
647 647
648 // Read a number? If not, this might be a timezone name. 648 // Read a number? If not, this might be a timezone name.
649 if (newPosStr != dateString) { 649 if (newPosStr != dateString) {
650 dateString = newPosStr; 650 dateString = newPosStr;
651 651
652 if (hour < 0 || hour > 23) 652 if (hour < 0 || hour > 23)
653 return std::numeric_limits<double>::quiet_NaN(); 653 return std::numeric_limits<double>::quiet_NaN();
654 654
655 if (!*dateString) 655 if (!*dateString)
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 } 825 }
826 826
827 double convertToLocalTime(double ms) 827 double convertToLocalTime(double ms)
828 { 828 {
829 double utcOffset = calculateUTCOffset(); 829 double utcOffset = calculateUTCOffset();
830 double dstOffset = calculateDSTOffset(ms, utcOffset); 830 double dstOffset = calculateDSTOffset(ms, utcOffset);
831 return (ms + utcOffset + dstOffset); 831 return (ms + utcOffset + dstOffset);
832 } 832 }
833 833
834 } // namespace WTF 834 } // namespace WTF
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebFrameTest.cpp ('k') | third_party/WebKit/Source/wtf/PartitionAlloc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698