Changeset 44508 in webkit for trunk/JavaScriptCore/wtf/DateMath.h


Ignore:
Timestamp:
Jun 8, 2009, 3:37:06 PM (16 years ago)
Author:
Dimitri Glazkov
Message:

JavaScriptCore:

2009-06-08 Dimitri Glazkov <Dimitri Glazkov>

Reviewed by Eric Seidel.

https://bugs.webkit.org/show_bug.cgi?id=26238
Move most of runtime/DateMath functions to wtf/DateMath, and split off conversion-related
helpers to DateConversion.

  • AllInOneFile.cpp: Changed DateMath->DateConversion.
  • GNUmakefile.am: Ditto and added DateMath.
  • JavaScriptCore.exp: Ditto.
  • JavaScriptCore.pri: Ditto.
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
  • JavaScriptCore.vcproj/WTF/WTF.vcproj: Added DateMath.
  • JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
  • JavaScriptCoreSources.bkl: Ditto.
  • pcre/pcre_exec.cpp: Changed to use DateMath.
  • profiler/ProfileNode.cpp: (JSC::getCount): Changed to use DateConversion.
  • runtime/DateConstructor.cpp: Ditto.
  • runtime/DateConversion.cpp: Copied from JavaScriptCore/runtime/DateMath.cpp. (JSC::parseDate): Refactored to use null-terminated characters as input.
  • runtime/DateConversion.h: Copied from JavaScriptCore/runtime/DateMath.h.
  • runtime/DateInstance.cpp: Changed to use wtf/DateMath.
  • runtime/DateInstance.h: Ditto.
  • runtime/DateMath.cpp: Removed.
  • runtime/DateMath.h: Removed.
  • runtime/DatePrototype.cpp: Ditto.
  • runtime/InitializeThreading.cpp: Ditto.
  • wtf/DateMath.cpp: Copied from JavaScriptCore/runtime/DateMath.cpp.
  • wtf/DateMath.h: Copied from JavaScriptCore/runtime/DateMath.h.

WebCore:

2009-06-08 Dimitri Glazkov <Dimitri Glazkov>

Reviewed by Eric Seidel.

https://bugs.webkit.org/show_bug.cgi?id=26238
Add parseDate helper to HTTPParsers, which uses WTF::parseDateFromNullTerminatedCharacters.

  • ForwardingHeaders/runtime/DateMath.h: Removed.
  • ForwardingHeaders/wtf/DateMath.h: Copied from WebCore/ForwardingHeaders/runtime/DateMath.h.
  • platform/network/HTTPParsers.cpp: (WebCore::parseDate): Added.
  • platform/network/HTTPParsers.h:
  • platform/network/ResourceResponseBase.cpp: (WebCore::parseDateValueInHeader): Changed to use the new helper.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/DateMath.h

    r44501 r44508  
    22 * Copyright (C) 1999-2000 Harri Porten ([email protected])
    33 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
     4 * Copyright (C) 2009 Google Inc. All rights reserved.
    45 *
    56 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
     
    4647#include <wtf/Noncopyable.h>
    4748
    48 namespace JSC {
     49namespace WTF {
    4950
    50 class UString;
    5151struct GregorianDateTime;
    5252
    53 void initDateMath();
     53void initializeDates();
    5454void msToGregorianDateTime(double, bool outputIsUTC, GregorianDateTime&);
    5555double gregorianDateTimeToMS(const GregorianDateTime&, double, bool inputIsUTC);
     
    6161
    6262// Not really math related, but this is currently the only shared place to put these. 
    63 double parseDate(const UString&);
     63double parseDateFromNullTerminatedCharacters(const char*);
    6464double timeClip(double);
    65 UString formatDate(const GregorianDateTime&);
    66 UString formatDateUTCVariant(const GregorianDateTime&);
    67 UString formatTime(const GregorianDateTime&, bool inputIsUTC);
    68 
    6965
    7066const char * const weekdayName[7] = { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" };
     
    187183}
    188184
    189 } // namespace JSC
     185} // namespace WTF
    190186
    191187#endif // DateMath_h
Note: See TracChangeset for help on using the changeset viewer.