summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics
diff options
context:
space:
mode:
authorclaireho <chinglanho@gmail.com>2011-10-17 17:41:52 -0700
committerclaireho <chinglanho@gmail.com>2011-10-18 10:49:25 -0700
commit8e5d85b1ff1ced0fdf8c01083a14b63d35ee4515 (patch)
tree401f0265839e52206fa785cc35844c69881b310e /Source/WebCore/platform/graphics
parent2b708bc49715a3512379f1f7f1dd31d6a26eeb1a (diff)
downloadexternal_webkit-8e5d85b1ff1ced0fdf8c01083a14b63d35ee4515.zip
external_webkit-8e5d85b1ff1ced0fdf8c01083a14b63d35ee4515.tar.gz
external_webkit-8e5d85b1ff1ced0fdf8c01083a14b63d35ee4515.tar.bz2
Changed VerticalTextMap class to meet webkit coding style.
Bug 5094208 : VerticalWring mode support for Books Japan. Changed VerticalTextMap class to meet webkit coding style for https://android-git.corp.google.com/g/#/c/141357/. Change-Id: Ifce9968702b7ebe6d7a7da563645ec7d5e639438
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