Changeset 17722 in webkit


Ignore:
Timestamp:
Nov 10, 2006 6:55:57 PM (17 years ago)
Author:
bdash
Message:

2006-11-10 Zalan Bujtas <zalan.bujtas@nokia.com>

Reviewed by Maciej.

Added s60/symbian platform defines.
http://bugs.webkit.org/show_bug.cgi?id=11540

  • wtf/Platform.h:

2006-11-10 Zalan Bujtas <zalan.bujtas@nokia.com>

Reviewed by Maciej.

Added basic types for symbian platform.
http://bugs.webkit.org/show_bug.cgi?id=11540

  • config.h:
  • platform/AtomicString.h: (WebCore::AtomicString::AtomicString): (WebCore::AtomicString::operator TPtrC):
  • platform/DeprecatedString.cpp: (WebCore::initializeHandleNodeBlock):
  • platform/DeprecatedString.h: char _internalBuffer has to be in front of the bitfields as Codewarrior (3.2.5 build 461) compiler cannot cope with bitfields and breaks byte aligment
  • platform/FloatPoint.h:
  • platform/FloatRect.h:
  • platform/IntPoint.h:
  • platform/IntRect.h:
  • platform/IntSize.h:
  • platform/PlatformString.h: (WebCore::String::operator TPtrC): (WebCore::String::des):
  • platform/StringImpl.h:
  • platform/symbian/DeprecatedStringSymbian.cpp: Added. (WebCore::DeprecatedString::setBufferFromDes): (WebCore::DeprecatedString::fromDes): (WebCore::DeprecatedString::des): (WebCore::DeprecatedString::des8):
  • platform/symbian/FloatPointSymbian.cpp: Added. (WebCore::FloatPoint::FloatPoint): (WebCore::FloatPoint::operator TPoint):
  • platform/symbian/FloatRectSymbian.cpp: Added. (WebCore::FloatRect::FloatRect): (WebCore::FloatRect::operator TRect): (WebCore::FloatRect::rect):
  • platform/symbian/IntPointSymbian.cpp: Added. (WebCore::IntPoint::IntPoint): (WebCore::IntPoint::operator TPoint):
  • platform/symbian/IntRectSymbian.cpp: Added. (WebCore::IntRect::IntRect): (WebCore::IntRect::operator TRect): (WebCore::IntRect::Rect):
  • platform/symbian/IntSizeSymbian.cpp: Added. (WebCore::IntSize::IntSize): (WebCore::IntSize::operator TSize):
  • platform/symbian/StringImplSymbian.cpp: Added. (WebCore::StringImpl::StringImpl): (WebCore::StringImpl::des):
  • platform/symbian/StringSymbian.cpp: Added. (WebCore::String::String):
Location:
trunk
Files:
9 added
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r17718 r17722  
     12006-11-10  Zalan Bujtas  <zalan.bujtas@nokia.com>
     2
     3        Reviewed by Maciej.
     4
     5        Added s60/symbian platform defines.
     6        http://bugs.webkit.org/show_bug.cgi?id=11540
     7
     8        * wtf/Platform.h:
     9
    110=== Safari-521.30 ===
    211
  • trunk/JavaScriptCore/wtf/Platform.h

    r17491 r17722  
    9696#endif
    9797
     98
     99#ifdef __S60__
     100// we are cross-compiling, it is not really windows
     101#undef WTF_PLATFORM_WIN_OS
     102#undef WTF_PLATFORM_WIN
     103#undef WTF_PLATFORM_CAIRO
     104#define WTF_PLATFORM_S60 1
     105#define WTF_PLATFORM_SYMBIAN 1
     106#endif
     107
    98108/* CPU */
    99109
     
    170180/* FIXME: Not using Qt4 unicode for now! */
    171181#define WTF_USE_ICU_UNICODE 1
     182#elif PLATFORM(SYMBIAN)
     183#define WTF_USE_SYMBIAN_UNICODE 1
    172184#else
    173185#define WTF_USE_ICU_UNICODE 1
  • trunk/WebCore/ChangeLog

    r17721 r17722  
     12006-11-10  Zalan Bujtas <zalan.bujtas@nokia.com>
     2
     3        Reviewed by Maciej.
     4
     5        Added basic types for symbian platform.
     6        http://bugs.webkit.org/show_bug.cgi?id=11540
     7
     8        * config.h:
     9        * platform/AtomicString.h:
     10        (WebCore::AtomicString::AtomicString):
     11        (WebCore::AtomicString::operator TPtrC):
     12        * platform/DeprecatedString.cpp:
     13        (WebCore::initializeHandleNodeBlock):
     14        * platform/DeprecatedString.h: char _internalBuffer has to be in front of
     15          the bitfields as Codewarrior (3.2.5 build 461) compiler cannot cope with
     16          bitfields and breaks byte aligment
     17        * platform/FloatPoint.h:
     18        * platform/FloatRect.h:
     19        * platform/IntPoint.h:
     20        * platform/IntRect.h:
     21        * platform/IntSize.h:
     22        * platform/PlatformString.h:
     23        (WebCore::String::operator TPtrC):
     24        (WebCore::String::des):
     25        * platform/StringImpl.h:
     26        * platform/symbian/DeprecatedStringSymbian.cpp: Added.
     27        (WebCore::DeprecatedString::setBufferFromDes):
     28        (WebCore::DeprecatedString::fromDes):
     29        (WebCore::DeprecatedString::des):
     30        (WebCore::DeprecatedString::des8):
     31        * platform/symbian/FloatPointSymbian.cpp: Added.
     32        (WebCore::FloatPoint::FloatPoint):
     33        (WebCore::FloatPoint::operator TPoint):
     34        * platform/symbian/FloatRectSymbian.cpp: Added.
     35        (WebCore::FloatRect::FloatRect):
     36        (WebCore::FloatRect::operator TRect):
     37        (WebCore::FloatRect::rect):
     38        * platform/symbian/IntPointSymbian.cpp: Added.
     39        (WebCore::IntPoint::IntPoint):
     40        (WebCore::IntPoint::operator TPoint):
     41        * platform/symbian/IntRectSymbian.cpp: Added.
     42        (WebCore::IntRect::IntRect):
     43        (WebCore::IntRect::operator TRect):
     44        (WebCore::IntRect::Rect):
     45        * platform/symbian/IntSizeSymbian.cpp: Added.
     46        (WebCore::IntSize::IntSize):
     47        (WebCore::IntSize::operator TSize):
     48        * platform/symbian/StringImplSymbian.cpp: Added.
     49        (WebCore::StringImpl::StringImpl):
     50        (WebCore::StringImpl::des):
     51        * platform/symbian/StringSymbian.cpp: Added.
     52        (WebCore::String::String):
     53
    1542006-11-10  Zack Rusin  <zack@kde.org>
    255
  • trunk/WebCore/config.h

    r17127 r17722  
    6060#endif /* PLATFORM(WIN_OS) */
    6161
     62#if !PLATFORM(SYMBIAN)
     63#define IMPORT_C
     64#define EXPORT_C
     65#endif
    6266
    6367#ifdef __cplusplus
     
    7983#define WTF_USE_NPOBJECT 1
    8084#endif
     85
     86#if PLATFORM(SYMBIAN)
     87#define WTF_USE_JAVASCRIPTCORE_BINDINGS 1
     88#define WTF_USE_NPOBJECT 1
     89#undef XSLT_SUPPORT
     90#undef WIN32
     91#undef _WIN32
     92#undef AVOID_STATIC_CONSTRUCTORS
     93#define USE_SYSTEM_MALLOC 1
     94#define U_HAVE_INT8_T 0
     95#define U_HAVE_INT16_T 0
     96#define U_HAVE_INT32_T 0
     97#define U_HAVE_INT64_T 0
     98#define U_HAVE_INTTYPES_H 0
     99
     100#include <stdio.h>
     101#include <snprintf.h>
     102#include <limits.h>
     103#include <wtf/MathExtras.h>
     104#endif
  • trunk/WebCore/platform/AtomicString.h

    r17421 r17722  
    8383    operator NSString*() const { return m_string; }
    8484#endif
     85#if PLATFORM(SYMBIAN)
     86    AtomicString(const TDesC& s) : m_string(add(String(s).impl())) { }
     87    operator TPtrC() const { return m_string; }
     88#endif
    8589
    8690    AtomicString(const DeprecatedString&);
  • trunk/WebCore/platform/DeprecatedString.cpp

    r17700 r17722  
    5252
    5353#define CHECK_FOR_HANDLE_LEAKS 0
     54
     55#if PLATFORM(SYMBIAN)
     56#undef CHECK_FOR_HANDLE_LEAKS
     57// symbian:fixme need page aligned allocations as Symbian platform does not have support for valloc
     58#define CHECK_FOR_HANDLE_LEAKS 1
     59#endif
    5460
    5561#define ALLOC_QCHAR_GOOD_SIZE(X) (X)
     
    24502456#if PLATFORM(WIN_OS)
    24512457    block = (HandleNode*)VirtualAlloc(0, pageSize, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
     2458#elif PLATFORM(SYMBIAN)
     2459    // symbian::fixme needs to do page aligned allocation as valloc is not supported.
     2460    block = NULL;
    24522461#else
    24532462    block = (HandleNode*)valloc(pageSize);
  • trunk/WebCore/platform/DeprecatedString.h

    r17700 r17722  
    216216    mutable DeprecatedChar *_unicode;
    217217    mutable char *_ascii;
     218    char _internalBuffer[WEBCORE_DS_INTERNAL_BUFFER_SIZE]; // Pad out to a (((size + 1) & ~15) + 14) size
     219
    218220    unsigned _maxUnicode : 30;
    219221    bool _isUnicodeValid : 1;
     
    222224    bool _isAsciiValid : 1;
    223225   
    224     char _internalBuffer[WEBCORE_DS_INTERNAL_BUFFER_SIZE]; // Pad out to a (((size + 1) & ~15) + 14) size
    225 
    226226private:
    227227    DeprecatedStringData(const DeprecatedStringData &);
     
    268268#if PLATFORM(MAC)
    269269    static DeprecatedString fromNSString(NSString*);
     270#endif
     271#if PLATFORM(SYMBIAN)
     272    static DeprecatedString fromDes(const TDesC&);
     273    static DeprecatedString fromDes(const TDesC8&);
    270274#endif
    271275    DeprecatedString &operator=(char);
     
    405409#endif
    406410
     411#if PLATFORM(SYMBIAN)
     412    TPtrC des() const;
     413    TPtrC8 des8() const;
     414    void setBufferFromDes(const TDesC&);
     415    void setBufferFromDes(const TDesC8&);
     416#endif
     417
    407418private:
    408419    // Used by DeprecatedConstString.
  • trunk/WebCore/platform/FloatPoint.h

    r15999 r17722  
    4747#endif
    4848
     49#if PLATFORM(SYMBIAN)
     50class TPoint;
     51#endif
     52
    4953namespace WebCore {
    5054
     
    7781    FloatPoint(const QPointF&);
    7882    operator QPointF() const;
     83#endif
     84
     85#if PLATFORM(SYMBIAN)
     86    operator TPoint() const;
     87    FloatPoint(const TPoint& );
    7988#endif
    8089
  • trunk/WebCore/platform/FloatRect.h

    r16690 r17722  
    121121    operator QRectF() const;
    122122#endif
     123#if PLATFORM(SYMBIAN)
     124    FloatRect(const TRect&);
     125    operator TRect() const;
     126    TRect rect() const;
     127#endif
    123128
    124129private:
  • trunk/WebCore/platform/IntPoint.h

    r17151 r17722  
    4848class QPoint;
    4949#endif
     50#if PLATFORM(SYMBIAN)
     51class TPoint;
     52#endif
    5053
    5154namespace WebCore {
     
    8285    IntPoint(const QPoint&);
    8386    operator QPoint() const;
     87#endif
     88#if PLATFORM(SYMBIAN)
     89    IntPoint(const TPoint&);
     90    operator TPoint() const;
    8491#endif
    8592
  • trunk/WebCore/platform/IntRect.h

    r15999 r17722  
    4646#elif PLATFORM(QT)
    4747class QRect;
     48#endif
     49#if PLATFORM(SYMBIAN)
     50class TRect;
    4851#endif
    4952
     
    114117    operator QRect() const;
    115118#endif
     119#if PLATFORM(SYMBIAN)
     120    IntRect(const TRect&);
     121    operator TRect() const;
     122    TRect Rect() const;
     123#endif
    116124
    117125#if PLATFORM(CG)
  • trunk/WebCore/platform/IntSize.h

    r15999 r17722  
    4545#elif PLATFORM(QT)
    4646class QSize;
     47#endif
     48#if PLATFORM(SYMBIAN)
     49class TSize;
    4750#endif
    4851
     
    98101    operator QSize() const;
    99102#endif
     103#if PLATFORM(SYMBIAN)
     104    IntSize(const TSize&);
     105    operator TSize() const;
     106#endif
    100107
    101108
  • trunk/WebCore/platform/PlatformString.h

    r17700 r17722  
    168168#endif
    169169
     170#if PLATFORM(SYMBIAN)
     171    String(const TDesC&);
     172    operator TPtrC() const { return des(); }
     173    TPtrC des() const { if (!m_impl) return KNullDesC(); return m_impl->des(); }
     174#endif
     175
    170176#ifndef NDEBUG
    171177    // For debugging only, leaks memory.
  • trunk/WebCore/platform/StringImpl.h

    r17346 r17722  
    143143    operator NSString*() const;
    144144#endif
     145#if PLATFORM(SYMBIAN)
     146    StringImpl(const TDesC&);
     147    TPtrC des() const;
     148#endif
    145149
    146150    StringImpl(const DeprecatedString&);
Note: See TracChangeset for help on using the changeset viewer.