summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/text
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform/text')
-rw-r--r--Source/WebCore/platform/text/BidiResolver.h34
-rw-r--r--Source/WebCore/platform/text/RegularExpression.h3
-rw-r--r--Source/WebCore/platform/text/SegmentedString.cpp3
-rw-r--r--Source/WebCore/platform/text/SegmentedString.h2
-rw-r--r--Source/WebCore/platform/text/TextCodec.h4
-rw-r--r--Source/WebCore/platform/text/transcoder/FontTranscoder.h3
6 files changed, 26 insertions, 23 deletions
diff --git a/Source/WebCore/platform/text/BidiResolver.h b/Source/WebCore/platform/text/BidiResolver.h
index 1f87115..8abd698 100644
--- a/Source/WebCore/platform/text/BidiResolver.h
+++ b/Source/WebCore/platform/text/BidiResolver.h
@@ -126,7 +126,8 @@ struct BidiCharacterRun {
BidiCharacterRun* m_next;
};
-template <class Iterator, class Run> class BidiResolver : public Noncopyable {
+template <class Iterator, class Run> class BidiResolver {
+ WTF_MAKE_NONCOPYABLE(BidiResolver);
public :
BidiResolver()
: m_direction(WTF::Unicode::OtherNeutral)
@@ -314,23 +315,13 @@ void BidiResolver<Iterator, Run>::checkDirectionInLowerRaiseEmbeddingLevel()
using namespace WTF::Unicode;
ASSERT(m_status.eor != OtherNeutral || eor.atEnd());
- // bidi.sor ... bidi.eor ... bidi.last eor; need to append the bidi.sor-bidi.eor run or extend it through bidi.last
- // Bidi control characters are included into BidiRun, so last direction
- // could be one of the bidi embeddings when there are nested embeddings.
- // For example: "&#x202a;&#x202b;....."
- ASSERT(m_status.last == EuropeanNumberSeparator
- || m_status.last == EuropeanNumberTerminator
- || m_status.last == CommonNumberSeparator
- || m_status.last == BoundaryNeutral
- || m_status.last == BlockSeparator
- || m_status.last == SegmentSeparator
- || m_status.last == WhiteSpaceNeutral
- || m_status.last == OtherNeutral
- || m_status.last == RightToLeftEmbedding
- || m_status.last == LeftToRightEmbedding
- || m_status.last == RightToLeftOverride
- || m_status.last == LeftToRightOverride
- || m_status.last == PopDirectionalFormat);
+ ASSERT(m_status.last != NonSpacingMark
+ && m_status.last != BoundaryNeutral
+ && m_status.last != RightToLeftEmbedding
+ && m_status.last != LeftToRightEmbedding
+ && m_status.last != RightToLeftOverride
+ && m_status.last != LeftToRightOverride
+ && m_status.last != PopDirectionalFormat);
if (m_direction == OtherNeutral)
m_direction = m_status.lastStrong == LeftToRight ? LeftToRight : RightToLeft;
}
@@ -342,6 +333,7 @@ void BidiResolver<Iterator, Run>::lowerExplicitEmbeddingLevel(WTF::Unicode::Dire
if (!emptyRun && eor != last) {
checkDirectionInLowerRaiseEmbeddingLevel();
+ // bidi.sor ... bidi.eor ... bidi.last eor; need to append the bidi.sor-bidi.eor run or extend it through bidi.last
if (from == LeftToRight) {
// bidi.sor ... bidi.eor ... bidi.last L
if (m_status.eor == EuropeanNumber) {
@@ -377,6 +369,7 @@ void BidiResolver<Iterator, Run>::raiseExplicitEmbeddingLevel(WTF::Unicode::Dire
if (!emptyRun && eor != last) {
checkDirectionInLowerRaiseEmbeddingLevel();
+ // bidi.sor ... bidi.eor ... bidi.last eor; need to append the bidi.sor-bidi.eor run or extend it through bidi.last
if (to == LeftToRight) {
// bidi.sor ... bidi.eor ... bidi.last L
if (m_status.eor == EuropeanNumber) {
@@ -866,6 +859,11 @@ void BidiResolver<Iterator, Run>::createBidiRunsForLine(const Iterator& end, boo
break;
case NonSpacingMark:
case BoundaryNeutral:
+ case RightToLeftEmbedding:
+ case LeftToRightEmbedding:
+ case RightToLeftOverride:
+ case LeftToRightOverride:
+ case PopDirectionalFormat:
// ignore these
break;
case EuropeanNumber:
diff --git a/Source/WebCore/platform/text/RegularExpression.h b/Source/WebCore/platform/text/RegularExpression.h
index f1611e5..536ed48 100644
--- a/Source/WebCore/platform/text/RegularExpression.h
+++ b/Source/WebCore/platform/text/RegularExpression.h
@@ -30,7 +30,8 @@
namespace WebCore {
-class RegularExpression : public FastAllocBase {
+class RegularExpression {
+ WTF_MAKE_FAST_ALLOCATED;
public:
RegularExpression(const String&, TextCaseSensitivity);
~RegularExpression();
diff --git a/Source/WebCore/platform/text/SegmentedString.cpp b/Source/WebCore/platform/text/SegmentedString.cpp
index a371582..5e9755b 100644
--- a/Source/WebCore/platform/text/SegmentedString.cpp
+++ b/Source/WebCore/platform/text/SegmentedString.cpp
@@ -246,7 +246,8 @@ void SegmentedString::advanceSlowCase(int& lineNumber)
if (*m_currentString.m_current++ == '\n' && m_currentString.doNotExcludeLineNumbers()) {
++lineNumber;
++m_currentLine;
- m_numberOfCharactersConsumedPriorToCurrentLine = numberOfCharactersConsumed();
+ // Plus 1 because numberOfCharactersConsumed value hasn't incremented yet; it does with m_length decrement below.
+ m_numberOfCharactersConsumedPriorToCurrentLine = numberOfCharactersConsumed() + 1;
}
if (--m_currentString.m_length == 0)
advanceSubstring();
diff --git a/Source/WebCore/platform/text/SegmentedString.h b/Source/WebCore/platform/text/SegmentedString.h
index 5f548c7..30c899d 100644
--- a/Source/WebCore/platform/text/SegmentedString.h
+++ b/Source/WebCore/platform/text/SegmentedString.h
@@ -164,7 +164,7 @@ public:
lineNumber += newLineFlag;
m_currentLine += newLineFlag;
if (newLineFlag)
- m_numberOfCharactersConsumedPriorToCurrentLine = numberOfCharactersConsumed();
+ m_numberOfCharactersConsumedPriorToCurrentLine = numberOfCharactersConsumed() + 1;
--m_currentString.m_length;
m_currentChar = ++m_currentString.m_current;
return;
diff --git a/Source/WebCore/platform/text/TextCodec.h b/Source/WebCore/platform/text/TextCodec.h
index c6af38a..35229a3 100644
--- a/Source/WebCore/platform/text/TextCodec.h
+++ b/Source/WebCore/platform/text/TextCodec.h
@@ -57,8 +57,10 @@ namespace WebCore {
typedef char UnencodableReplacementArray[32];
- class TextCodec : public Noncopyable {
+ class TextCodec {
+ WTF_MAKE_NONCOPYABLE(TextCodec); WTF_MAKE_FAST_ALLOCATED;
public:
+ TextCodec() { }
virtual ~TextCodec();
String decode(const char* str, size_t length, bool flush = false)
diff --git a/Source/WebCore/platform/text/transcoder/FontTranscoder.h b/Source/WebCore/platform/text/transcoder/FontTranscoder.h
index 67db977..6990a10 100644
--- a/Source/WebCore/platform/text/transcoder/FontTranscoder.h
+++ b/Source/WebCore/platform/text/transcoder/FontTranscoder.h
@@ -40,7 +40,8 @@ namespace WebCore {
class FontDescription;
class TextEncoding;
-class FontTranscoder : public Noncopyable {
+class FontTranscoder {
+ WTF_MAKE_NONCOPYABLE(FontTranscoder); WTF_MAKE_FAST_ALLOCATED;
public:
void convert(String& text, const FontDescription&, const TextEncoding* = 0) const;
bool needsTranscoding(const FontDescription&, const TextEncoding* = 0) const;