summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics
diff options
context:
space:
mode:
authorclaireho <chinglanho@gmail.com>2011-10-18 13:28:09 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-10-18 13:28:09 -0700
commit35f6049abf3249c63fa0da5f814b63ccd03115de (patch)
treeaea6fd911a7747c08d4207bccc09d7660b8a6da4 /Source/WebCore/platform/graphics
parentff5c8a747577c62ebfecfb18013d2744a3eb73e7 (diff)
parent8e5d85b1ff1ced0fdf8c01083a14b63d35ee4515 (diff)
downloadexternal_webkit-35f6049abf3249c63fa0da5f814b63ccd03115de.zip
external_webkit-35f6049abf3249c63fa0da5f814b63ccd03115de.tar.gz
external_webkit-35f6049abf3249c63fa0da5f814b63ccd03115de.tar.bz2
Merge "Changed VerticalTextMap class to meet webkit coding style."
Diffstat (limited to 'Source/WebCore/platform/graphics')
-rw-r--r--Source/WebCore/platform/graphics/android/GlyphMapAndroid.cpp15
-rw-r--r--Source/WebCore/platform/graphics/android/VerticalTextMap.cpp7
-rw-r--r--Source/WebCore/platform/graphics/android/VerticalTextMap.h15
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