From dd8bb3de4f353a81954234999f1fea748aee2ea9 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Wed, 11 Aug 2010 14:44:44 +0100 Subject: Merge WebKit at r65072 : Initial merge by git. Change-Id: Ibcf418498376b2660aacb7f8d46ea7085ef91585 --- .../graphics/wx/FontCustomPlatformData.cpp | 49 ++++++++++++++++++++++ .../platform/graphics/wx/FontCustomPlatformData.h | 47 +++++++++++++++++++++ WebCore/platform/graphics/wx/FontPlatformData.h | 4 +- 3 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 WebCore/platform/graphics/wx/FontCustomPlatformData.cpp create mode 100644 WebCore/platform/graphics/wx/FontCustomPlatformData.h (limited to 'WebCore/platform/graphics/wx') diff --git a/WebCore/platform/graphics/wx/FontCustomPlatformData.cpp b/WebCore/platform/graphics/wx/FontCustomPlatformData.cpp new file mode 100644 index 0000000..4cebe43 --- /dev/null +++ b/WebCore/platform/graphics/wx/FontCustomPlatformData.cpp @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2008 Alp Toker + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ + +#include "config.h" +#include "FontCustomPlatformData.h" + +#include "SharedBuffer.h" +#include "FontPlatformData.h" + + +namespace WebCore { + +FontCustomPlatformData::~FontCustomPlatformData() +{ +} + +FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontRenderingMode) +{ + return FontPlatformData(size, bold, italic); +} + +FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer) +{ + return 0; +} + +bool FontCustomPlatformData::supportsFormat(const String& /* format */) +{ + return false; +} + +} diff --git a/WebCore/platform/graphics/wx/FontCustomPlatformData.h b/WebCore/platform/graphics/wx/FontCustomPlatformData.h new file mode 100644 index 0000000..a7dfe37 --- /dev/null +++ b/WebCore/platform/graphics/wx/FontCustomPlatformData.h @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2008 Alp Toker + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ + +#ifndef FontCustomPlatformData_h +#define FontCustomPlatformData_h + +#include "FontRenderingMode.h" +#include +#include + +namespace WebCore { + + class FontPlatformData; + class SharedBuffer; + + struct FontCustomPlatformData : Noncopyable { + public: + FontCustomPlatformData() { } + ~FontCustomPlatformData(); + + static bool supportsFormat(const String&); + + FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontRenderingMode = NormalRenderingMode); + }; + + FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer*); + +} + +#endif diff --git a/WebCore/platform/graphics/wx/FontPlatformData.h b/WebCore/platform/graphics/wx/FontPlatformData.h index 952368e..4f8d740 100644 --- a/WebCore/platform/graphics/wx/FontPlatformData.h +++ b/WebCore/platform/graphics/wx/FontPlatformData.h @@ -32,6 +32,7 @@ #include "FontDescription.h" #include "AtomicString.h" #include "StringImpl.h" +#include #include #include @@ -56,8 +57,6 @@ inline CTFontRef toCTFontRef(NSFont *nsFont) { return reinterpret_cast { public: @@ -157,6 +156,7 @@ public: ATSUFontID m_atsuFontID; CGFontRef cgFont() const; NSFont* nsFont() const { return m_nsFont; } + CTFontRef ctFont() const { return reinterpret_cast(m_nsFont); } void cacheNSFont(); #endif -- cgit v1.1