+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:
+
=== Safari-521.30 ===
2006-11-08 Ada Chan <adachan@apple.com>
#define WTF_PLATFORM_CAIRO 1
#endif
+
+#ifdef __S60__
+// we are cross-compiling, it is not really windows
+#undef WTF_PLATFORM_WIN_OS
+#undef WTF_PLATFORM_WIN
+#undef WTF_PLATFORM_CAIRO
+#define WTF_PLATFORM_S60 1
+#define WTF_PLATFORM_SYMBIAN 1
+#endif
+
/* CPU */
/* PLATFORM(PPC) */
#if PLATFORM(KDE)
/* FIXME: Not using Qt4 unicode for now! */
#define WTF_USE_ICU_UNICODE 1
+#elif PLATFORM(SYMBIAN)
+#define WTF_USE_SYMBIAN_UNICODE 1
#else
#define WTF_USE_ICU_UNICODE 1
#endif
+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):
+
2006-11-10 Zack Rusin <zack@kde.org>
Reviewed by Anders.
#endif /* PLATFORM(WIN_OS) */
+#if !PLATFORM(SYMBIAN)
+#define IMPORT_C
+#define EXPORT_C
+#endif
#ifdef __cplusplus
#define WTF_USE_JAVASCRIPTCORE_BINDINGS 1
#define WTF_USE_NPOBJECT 1
#endif
+
+#if PLATFORM(SYMBIAN)
+#define WTF_USE_JAVASCRIPTCORE_BINDINGS 1
+#define WTF_USE_NPOBJECT 1
+#undef XSLT_SUPPORT
+#undef WIN32
+#undef _WIN32
+#undef AVOID_STATIC_CONSTRUCTORS
+#define USE_SYSTEM_MALLOC 1
+#define U_HAVE_INT8_T 0
+#define U_HAVE_INT16_T 0
+#define U_HAVE_INT32_T 0
+#define U_HAVE_INT64_T 0
+#define U_HAVE_INTTYPES_H 0
+
+#include <stdio.h>
+#include <snprintf.h>
+#include <limits.h>
+#include <wtf/MathExtras.h>
+#endif
AtomicString(NSString* s) : m_string(add(String(s).impl())) { }
operator NSString*() const { return m_string; }
#endif
+#if PLATFORM(SYMBIAN)
+ AtomicString(const TDesC& s) : m_string(add(String(s).impl())) { }
+ operator TPtrC() const { return m_string; }
+#endif
AtomicString(const DeprecatedString&);
DeprecatedString deprecatedString() const;
#define CHECK_FOR_HANDLE_LEAKS 0
+#if PLATFORM(SYMBIAN)
+#undef CHECK_FOR_HANDLE_LEAKS
+// symbian:fixme need page aligned allocations as Symbian platform does not have support for valloc
+#define CHECK_FOR_HANDLE_LEAKS 1
+#endif
+
#define ALLOC_QCHAR_GOOD_SIZE(X) (X)
#define ALLOC_CHAR_GOOD_SIZE(X) (X)
#if PLATFORM(WIN_OS)
block = (HandleNode*)VirtualAlloc(0, pageSize, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
+#elif PLATFORM(SYMBIAN)
+ // symbian::fixme needs to do page aligned allocation as valloc is not supported.
+ block = NULL;
#else
block = (HandleNode*)valloc(pageSize);
#endif
unsigned _length;
mutable DeprecatedChar *_unicode;
mutable char *_ascii;
+ char _internalBuffer[WEBCORE_DS_INTERNAL_BUFFER_SIZE]; // Pad out to a (((size + 1) & ~15) + 14) size
+
unsigned _maxUnicode : 30;
bool _isUnicodeValid : 1;
bool _isHeapAllocated : 1; // Fragile, but the only way we can be sure the instance was created with 'new'.
unsigned _maxAscii : 31;
bool _isAsciiValid : 1;
- char _internalBuffer[WEBCORE_DS_INTERNAL_BUFFER_SIZE]; // Pad out to a (((size + 1) & ~15) + 14) size
-
private:
DeprecatedStringData(const DeprecatedStringData &);
DeprecatedStringData &operator=(const DeprecatedStringData &);
#endif
#if PLATFORM(MAC)
static DeprecatedString fromNSString(NSString*);
+#endif
+#if PLATFORM(SYMBIAN)
+ static DeprecatedString fromDes(const TDesC&);
+ static DeprecatedString fromDes(const TDesC8&);
#endif
DeprecatedString &operator=(char);
DeprecatedString &operator=(DeprecatedChar);
#endif
+#if PLATFORM(SYMBIAN)
+ TPtrC des() const;
+ TPtrC8 des8() const;
+ void setBufferFromDes(const TDesC&);
+ void setBufferFromDes(const TDesC8&);
+#endif
+
private:
// Used by DeprecatedConstString.
DeprecatedString(DeprecatedStringData *constData, bool /*dummy*/);
class QPointF;
#endif
+#if PLATFORM(SYMBIAN)
+class TPoint;
+#endif
+
namespace WebCore {
class IntPoint;
operator QPointF() const;
#endif
+#if PLATFORM(SYMBIAN)
+ operator TPoint() const;
+ FloatPoint(const TPoint& );
+#endif
+
private:
float m_x, m_y;
};
FloatRect(const QRectF&);
operator QRectF() const;
#endif
+#if PLATFORM(SYMBIAN)
+ FloatRect(const TRect&);
+ operator TRect() const;
+ TRect rect() const;
+#endif
private:
FloatPoint m_location;
#elif PLATFORM(QT)
class QPoint;
#endif
+#if PLATFORM(SYMBIAN)
+class TPoint;
+#endif
namespace WebCore {
IntPoint(const QPoint&);
operator QPoint() const;
#endif
+#if PLATFORM(SYMBIAN)
+ IntPoint(const TPoint&);
+ operator TPoint() const;
+#endif
private:
int m_x, m_y;
#elif PLATFORM(QT)
class QRect;
#endif
+#if PLATFORM(SYMBIAN)
+class TRect;
+#endif
namespace WebCore {
IntRect(const QRect&);
operator QRect() const;
#endif
+#if PLATFORM(SYMBIAN)
+ IntRect(const TRect&);
+ operator TRect() const;
+ TRect Rect() const;
+#endif
#if PLATFORM(CG)
operator CGRect() const;
#elif PLATFORM(QT)
class QSize;
#endif
+#if PLATFORM(SYMBIAN)
+class TSize;
+#endif
namespace WebCore {
IntSize(const QSize&);
operator QSize() const;
#endif
+#if PLATFORM(SYMBIAN)
+ IntSize(const TSize&);
+ operator TSize() const;
+#endif
private:
operator QString() const;
#endif
+#if PLATFORM(SYMBIAN)
+ String(const TDesC&);
+ operator TPtrC() const { return des(); }
+ TPtrC des() const { if (!m_impl) return KNullDesC(); return m_impl->des(); }
+#endif
+
#ifndef NDEBUG
// For debugging only, leaks memory.
Vector<char> ascii() const;
StringImpl(NSString*);
operator NSString*() const;
#endif
+#if PLATFORM(SYMBIAN)
+ StringImpl(const TDesC&);
+ TPtrC des() const;
+#endif
StringImpl(const DeprecatedString&);
--- /dev/null
+/*
+* ==============================================================================
+* Copyright (c) 2006, Nokia Corporation
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in
+* the documentation and/or other materials provided with the
+* distribution.
+* * Neither the name of the Nokia Corporation nor the names of its
+* contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+* DAMAGE.
+*
+* ==============================================================================
+*/
+
+#include "config.h"
+#include "DeprecatedString.h"
+
+namespace WebCore {
+
+void DeprecatedString::setBufferFromDes(const TDesC& des)
+{
+ setUnicode((const DeprecatedChar *)des.Ptr(), (uint)des.Length());
+}
+
+void DeprecatedString::setBufferFromDes(const TDesC8& des)
+{
+ setLatin1((const char*)des.Ptr(), (uint)des.Length());
+}
+
+DeprecatedString DeprecatedString::fromDes(const TDesC& des)
+{
+ DeprecatedString s;
+ s.setBufferFromDes(des);
+ return s;
+}
+
+DeprecatedString DeprecatedString::fromDes(const TDesC8& des)
+{
+ DeprecatedString s;
+ s.setBufferFromDes(des);
+ return s;
+}
+
+TPtrC DeprecatedString::des() const
+{
+ if (!dataHandle[0]->_isUnicodeValid)
+ dataHandle[0]->makeUnicode();
+
+ TPtrC tstr((const TUint16*)unicode(), length() );
+
+ return tstr;
+}
+
+TPtrC8 DeprecatedString::des8() const
+{
+ TPtrC8 tstr((const TUint8*)latin1(), length());
+
+ return tstr;
+}
+
+}
\ No newline at end of file
--- /dev/null
+/*
+* ==============================================================================
+* Copyright (c) 2006, Nokia Corporation
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in
+* the documentation and/or other materials provided with the
+* distribution.
+* * Neither the name of the Nokia Corporation nor the names of its
+* contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+* DAMAGE.
+*
+* ==============================================================================
+*/
+
+#include "config.h"
+#include "FloatPoint.h"
+#include <e32cmn.h>
+
+namespace WebCore {
+
+FloatPoint::FloatPoint(const TPoint& p)
+ : m_x(p.iX)
+ , m_y(p.iY)
+{
+}
+
+FloatPoint::operator TPoint() const
+{
+ return TPoint(m_x, m_y);
+}
+
+}
--- /dev/null
+/*
+* ==============================================================================
+* Copyright (c) 2006, Nokia Corporation
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in
+* the documentation and/or other materials provided with the
+* distribution.
+* * Neither the name of the Nokia Corporation nor the names of its
+* contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+* DAMAGE.
+*
+* ==============================================================================
+*/
+
+#include "config.h"
+#include "FloatRect.h"
+#include "IntSize.h"
+#include "IntPoint.h"
+#include <e32std.h>
+
+namespace WebCore {
+
+FloatRect::FloatRect(const TRect& r)
+ : m_location(IntPoint(r.iTl.iX, r.iTl.iY))
+ , m_size(IntSize(r.Size().iWidth, r.Size().iHeight))
+{
+}
+
+FloatRect::operator TRect() const
+{
+ return TRect(x(), y(), right(), bottom());
+}
+
+TRect FloatRect::rect() const
+{
+ return TRect(x(), y(), right(), bottom());
+}
+
+}
--- /dev/null
+/*
+* ==============================================================================
+* Copyright (c) 2006, Nokia Corporation
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in
+* the documentation and/or other materials provided with the
+* distribution.
+* * Neither the name of the Nokia Corporation nor the names of its
+* contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+* DAMAGE.
+*
+* ==============================================================================
+*/
+
+#include "config.h"
+#include "IntPoint.h"
+#include <e32std.h>
+
+namespace WebCore {
+
+IntPoint::IntPoint(const TPoint& p)
+ : m_x(p.iX)
+ , m_y(p.iY)
+{
+}
+
+IntPoint::operator TPoint() const
+{
+ return TPoint(m_x, m_y);
+}
+
+}
--- /dev/null
+/*
+* ==============================================================================
+* Copyright (c) 2006, Nokia Corporation
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in
+* the documentation and/or other materials provided with the
+* distribution.
+* * Neither the name of the Nokia Corporation nor the names of its
+* contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+* DAMAGE.
+*
+* ==============================================================================
+*/
+
+#include "config.h"
+#include "IntRect.h"
+#include <e32std.h>
+
+namespace WebCore {
+
+IntRect::IntRect(const TRect& r)
+ : m_location(IntPoint(r.iTl.iX, r.iTl.iY))
+ , m_size(IntSize(r.Size().iWidth, r.Size().iHeight))
+{
+}
+
+IntRect::operator TRect() const
+{
+ return TRect(x(), y(), right(), bottom());
+}
+
+TRect IntRect::Rect() const
+{
+ return TRect(x(), y(), right(), bottom());
+}
+
+}
--- /dev/null
+/*
+* ==============================================================================
+* Copyright (c) 2006, Nokia Corporation
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in
+* the documentation and/or other materials provided with the
+* distribution.
+* * Neither the name of the Nokia Corporation nor the names of its
+* contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+* DAMAGE.
+*
+* ==============================================================================
+*/
+
+#include "config.h"
+#include "IntSize.h"
+#include <e32std.h>
+
+namespace WebCore {
+
+IntSize::IntSize(const TSize& s)
+ : m_width(s.iWidth)
+ , m_height(s.iHeight)
+{
+}
+
+IntSize::operator TSize() const
+{
+ return TSize(m_width, m_height);
+}
+
+}
--- /dev/null
+/*
+* ==============================================================================
+* Copyright (c) 2006, Nokia Corporation
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in
+* the documentation and/or other materials provided with the
+* distribution.
+* * Neither the name of the Nokia Corporation nor the names of its
+* contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+* DAMAGE.
+*
+* ==============================================================================
+*/
+
+#include "config.h"
+#include "StringImpl.h"
+#include <e32std.h>
+
+namespace WebCore {
+
+StringImpl::StringImpl(const TDesC& des)
+{
+ init(des.Ptr(), des.Length());
+}
+
+TPtrC StringImpl::des() const
+{
+ TPtrC tstr((const TUint16 *)m_data, m_length);
+ return tstr;
+}
+
+}
--- /dev/null
+/*
+* ==============================================================================
+* Copyright (c) 2006, Nokia Corporation
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in
+* the documentation and/or other materials provided with the
+* distribution.
+* * Neither the name of the Nokia Corporation nor the names of its
+* contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+* DAMAGE.
+*
+* ==============================================================================
+*/
+
+#include "config.h"
+#include "PlatformString.h"
+#include <e32std.h>
+
+namespace WebCore {
+
+String::String(const TDesC& des)
+{
+ if (!des.Length())
+ m_impl = StringImpl::empty();
+ else
+ m_impl = new StringImpl(des);
+}
+
+}
\ No newline at end of file