diff options
3 files changed, 16 insertions, 21 deletions
diff --git a/Source/WebCore/platform/graphics/android/GlyphMapAndroid.cpp b/Source/WebCore/platform/graphics/android/GlyphMapAndroid.cpp index c5193b7..a327b79 100644 --- a/Source/WebCore/platform/graphics/android/GlyphMapAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/GlyphMapAndroid.cpp @@ -27,14 +27,14 @@ #include "config.h" #include "EmojiFont.h" +#include "Font.h" #include "GlyphPageTreeNode.h" -#include "SkTemplates.h" -#include "SkPaint.h" -#include "SkUtils.h" +#include "HarfbuzzSkia.h" #include "SimpleFontData.h" -#include "Font.h" #include "SkFontHost.h" -#include "HarfbuzzSkia.h" +#include "SkPaint.h" +#include "SkTemplates.h" +#include "SkUtils.h" #include "VerticalTextMap.h" @@ -42,7 +42,7 @@ using namespace android; namespace WebCore { -#define NO_BREAK_SPACE_UNICHAR 0xA0 +#define NO_BREAK_SPACE_UNICHAR 0xA0 static int substituteWithVerticalGlyphs(const FontPlatformData& platformData, uint16_t* glyphs, unsigned bufferLength) { @@ -90,8 +90,7 @@ bool GlyphPage::fill(unsigned offset, unsigned length, UChar* buffer, unsigned b UChar *textBuffer = buffer; UChar vTextBuffer[bufferLength]; - if (fontData->platformData().orientation() == Vertical && - !fontData->hasVerticalGlyphs()) { + if (fontData->platformData().orientation() == Vertical && !fontData->hasVerticalGlyphs()) { // Convert to vertical form if there is no vertical glyphs. for (unsigned i = 0; i < bufferLength; ++i) { vTextBuffer[i] = VerticalTextMap::getVerticalForm(buffer[i]); diff --git a/Source/WebCore/platform/graphics/android/VerticalTextMap.cpp b/Source/WebCore/platform/graphics/android/VerticalTextMap.cpp index 2bb008f..6e715e2 100644 --- a/Source/WebCore/platform/graphics/android/VerticalTextMap.cpp +++ b/Source/WebCore/platform/graphics/android/VerticalTextMap.cpp @@ -24,6 +24,7 @@ * SUCH DAMAGE. */ +#include "config.h" #include "VerticalTextMap.h" #include <wtf/Forward.h> @@ -81,16 +82,14 @@ static const UChar vTextCnvTable[][2] = { // {0xff61, 0xfe12}, // halfwidth ideo full stop }; -using namespace android; - namespace WebCore { -static WTF::Mutex m_verticalTextHashMapMutex; +static WTF::Mutex verticalTextHashMapMutex; static HashMap<UChar, UChar>* verticalTextHashMap = 0; UChar VerticalTextMap::getVerticalForm(UChar c) { { - MutexLocker lock(m_verticalTextHashMapMutex); + MutexLocker lock(verticalTextHashMapMutex); if (!verticalTextHashMap) { // Lazy initialization. verticalTextHashMap = new HashMap<UChar, UChar>; diff --git a/Source/WebCore/platform/graphics/android/VerticalTextMap.h b/Source/WebCore/platform/graphics/android/VerticalTextMap.h index f614633..2955589 100644 --- a/Source/WebCore/platform/graphics/android/VerticalTextMap.h +++ b/Source/WebCore/platform/graphics/android/VerticalTextMap.h @@ -27,21 +27,18 @@ #ifndef android_VerticalTextMap_DEFINED #define android_VerticalTextMap_DEFINED -#include "config.h" #include "WebViewCore.h" #include <wtf/StdLibExtras.h> #include <wtf/HashMap.h> #include <wtf/unicode/CharacterNames.h> -using namespace android; - namespace WebCore { - class VerticalTextMap { - public: - // This function converts given char to its corresponding vertical form. - // Rerturns 0 if there is no vertical form. - static UChar getVerticalForm(UChar c); - }; +class VerticalTextMap { +public: + // This function converts given char to its corresponding vertical form. + // Rerturns 0 if there is no vertical form. + static UChar getVerticalForm(UChar c); +}; } #endif |