Commit 1c3f6321 authored by eric@webkit.org's avatar eric@webkit.org

2009-08-12 Maxime Simon <simon.maxime@gmail.com>

        Reviewed by Eric Seidel.

        [Haiku] Tiny modifications on WebCore files to allow Haiku port.
        https://bugs.webkit.org/show_bug.cgi?id=28128

        * bindings/js/ScriptControllerHaiku.cpp: Style cleanup.
        * loader/CachedFont.cpp: Haiku behaves like Qt, Gtk, or Chromium,
        so many PLATFORM(HAIKU) were added to these functions.
        (WebCore::CachedFont::~CachedFont):
        (WebCore::CachedFont::ensureCustomFontData):
        (WebCore::CachedFont::platformDataFromCustomData):
        (WebCore::CachedFont::allClientsRemoved):
        * page/EventHandler.cpp: Like the mac and Qt port, Haiku doesn't need the
        invertSenseOfTabsToLinks() function.
        * page/haiku/DragControllerHaiku.cpp: Style cleanup.
        * platform/image-decoders/ImageDecoder.h: For image decoding Haiku
        behaves like Cairo or Wx, (not like Skia).
        (WebCore::RGBA32Buffer::getAddr):
        * platform/text/PlatformString.h: Adding the String(BString&) and BString()
        methods specific to Haiku.
        * platform/text/UnicodeRange.h: Haiku needs to include stdint.h.
        * platform/text/haiku/TextBreakIteratorInternalICUHaiku.cpp:
        (WebCore::currentSearchLocaleID): Missing function.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47144 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8cfa116a
2009-08-12 Maxime Simon <simon.maxime@gmail.com>
Reviewed by Eric Seidel.
[Haiku] Tiny modifications on WebCore files to allow Haiku port.
https://bugs.webkit.org/show_bug.cgi?id=28128
* bindings/js/ScriptControllerHaiku.cpp: Style cleanup.
* loader/CachedFont.cpp: Haiku behaves like Qt, Gtk, or Chromium,
so many PLATFORM(HAIKU) were added to these functions.
(WebCore::CachedFont::~CachedFont):
(WebCore::CachedFont::ensureCustomFontData):
(WebCore::CachedFont::platformDataFromCustomData):
(WebCore::CachedFont::allClientsRemoved):
* page/EventHandler.cpp: Like the mac and Qt port, Haiku doesn't need the
invertSenseOfTabsToLinks() function.
* page/haiku/DragControllerHaiku.cpp: Style cleanup.
* platform/image-decoders/ImageDecoder.h: For image decoding Haiku
behaves like Cairo or Wx, (not like Skia).
(WebCore::RGBA32Buffer::getAddr):
* platform/text/PlatformString.h: Adding the String(BString&) and BString()
methods specific to Haiku.
* platform/text/UnicodeRange.h: Haiku needs to include stdint.h.
* platform/text/haiku/TextBreakIteratorInternalICUHaiku.cpp:
(WebCore::currentSearchLocaleID): Missing function.
2009-08-12 Maxime Simon <simon.maxime@gmail.com>
Reviewed by Eric Seidel.
......@@ -28,8 +28,8 @@
#include "ScriptController.h"
#include "PluginView.h"
#include "runtime_root.h"
#include "runtime.h"
#include "runtime_root.h"
namespace WebCore {
......
......@@ -31,7 +31,7 @@
#include "CachedResourceClientWalker.h"
#include "DOMImplementation.h"
#include "FontPlatformData.h"
#if PLATFORM(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (PLATFORM(WIN_OS) || PLATFORM(LINUX)))
#if PLATFORM(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (PLATFORM(WIN_OS) || PLATFORM(LINUX))) || PLATFORM(HAIKU)
#include "FontCustomPlatformData.h"
#endif
#include "TextResourceDecoder.h"
......@@ -60,7 +60,7 @@ CachedFont::CachedFont(const String &url)
CachedFont::~CachedFont()
{
#if PLATFORM(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (PLATFORM(WIN_OS) || PLATFORM(LINUX)))
#if PLATFORM(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (PLATFORM(WIN_OS) || PLATFORM(LINUX))) || PLATFORM(HAIKU)
delete m_fontData;
#endif
}
......@@ -98,7 +98,7 @@ void CachedFont::beginLoadIfNeeded(DocLoader* dl)
bool CachedFont::ensureCustomFontData()
{
#if PLATFORM(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (PLATFORM(WIN_OS) || PLATFORM(LINUX)))
#if PLATFORM(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (PLATFORM(WIN_OS) || PLATFORM(LINUX))) || PLATFORM(HAIKU)
#if ENABLE(SVG_FONTS)
ASSERT(!m_isSVGFont);
#endif
......@@ -117,7 +117,7 @@ FontPlatformData CachedFont::platformDataFromCustomData(float size, bool bold, b
if (m_externalSVGDocument)
return FontPlatformData(size, bold, italic);
#endif
#if PLATFORM(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (PLATFORM(WIN_OS) || PLATFORM(LINUX)))
#if PLATFORM(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (PLATFORM(WIN_OS) || PLATFORM(LINUX))) || PLATFORM(HAIKU)
ASSERT(m_fontData);
return m_fontData->fontPlatformData(static_cast<int>(size), bold, italic, renderingMode);
#else
......@@ -173,7 +173,7 @@ SVGFontElement* CachedFont::getSVGFontById(const String& fontName) const
void CachedFont::allClientsRemoved()
{
#if PLATFORM(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (PLATFORM(WIN_OS) || PLATFORM(LINUX)))
#if PLATFORM(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (PLATFORM(WIN_OS) || PLATFORM(LINUX))) || PLATFORM(HAIKU)
if (m_fontData) {
delete m_fontData;
m_fontData = 0;
......
......@@ -2320,7 +2320,7 @@ bool EventHandler::handleTextInputEvent(const String& text, Event* underlyingEve
}
#if !PLATFORM(MAC) && !PLATFORM(QT)
#if !PLATFORM(MAC) && !PLATFORM(QT) && !PLATFORM(HAIKU)
bool EventHandler::invertSenseOfTabsToLinks(KeyboardEvent*) const
{
return false;
......
......@@ -32,10 +32,9 @@
#include <InterfaceDefs.h>
namespace WebCore
{
namespace WebCore {
// FIXME: These values are straight out of DragControllerMac, so probably have
// FIXME: These values are straight out of DragControllerMac, so probably have
// little correlation with Haiku standards...
const int DragController::LinkDragBorderInset = 2;
const int DragController::MaxOriginalImageArea = 1500 * 1500;
......
......@@ -134,7 +134,7 @@ namespace WebCore {
inline PixelData* getAddr(int x, int y)
{
#if PLATFORM(CAIRO) || PLATFORM(WX)
#if PLATFORM(CAIRO) || PLATFORM(WX) || PLATFORM(HAIKU)
return m_bytes.data() + (y * width()) + x;
#elif PLATFORM(SKIA)
return m_bitmap.getAddr32(x, y);
......@@ -160,7 +160,7 @@ namespace WebCore {
}
}
#if PLATFORM(CAIRO) || PLATFORM(WX)
#if PLATFORM(CAIRO) || PLATFORM(WX) || PLATFORM(HAIKU)
Vector<PixelData> m_bytes;
IntSize m_size; // The size of the buffer. This should be the
// same as ImageDecoder::m_size.
......
......@@ -56,6 +56,10 @@ QT_END_NAMESPACE
class wxString;
#endif
#if PLATFORM(HAIKU)
class BString;
#endif
namespace WebCore {
class CString;
......@@ -229,6 +233,11 @@ public:
operator wxString() const;
#endif
#if PLATFORM(HAIKU)
String(const BString&);
operator BString() const;
#endif
#ifndef NDEBUG
Vector<char> ascii() const;
#endif
......
......@@ -35,6 +35,10 @@
#ifndef UnicodeRange_H
#define UnicodeRange_H
#if PLATFORM(HAIKU)
#include "stdint.h"
#endif
#include <wtf/unicode/Unicode.h>
namespace WebCore {
......
......@@ -26,6 +26,12 @@
namespace WebCore {
const char* currentSearchLocaleID()
{
notImplemented();
return "";
}
const char* currentTextBreakLocaleID()
{
notImplemented();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment