summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/text/SegmentedString.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-24 11:24:40 +0100
committerBen Murdoch <benm@google.com>2011-06-02 09:53:15 +0100
commit81bc750723a18f21cd17d1b173cd2a4dda9cea6e (patch)
tree7a9e5ed86ff429fd347a25153107221543909b19 /Source/WebCore/platform/text/SegmentedString.h
parent94088a6d336c1dd80a1e734af51e96abcbb689a7 (diff)
downloadexternal_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.zip
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.gz
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.bz2
Merge WebKit at r80534: Intial merge by Git
Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61
Diffstat (limited to 'Source/WebCore/platform/text/SegmentedString.h')
-rw-r--r--Source/WebCore/platform/text/SegmentedString.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/WebCore/platform/text/SegmentedString.h b/Source/WebCore/platform/text/SegmentedString.h
index 3784b50..4831166 100644
--- a/Source/WebCore/platform/text/SegmentedString.h
+++ b/Source/WebCore/platform/text/SegmentedString.h
@@ -30,7 +30,13 @@ class SegmentedString;
class SegmentedSubstring {
public:
- SegmentedSubstring() : m_length(0), m_current(0), m_doNotExcludeLineNumbers(true) {}
+ SegmentedSubstring()
+ : m_length(0)
+ , m_current(0)
+ , m_doNotExcludeLineNumbers(true)
+ {
+ }
+
SegmentedSubstring(const String& str)
: m_length(str.length())
, m_current(str.isEmpty() ? 0 : str.characters())
@@ -55,9 +61,8 @@ public:
str = m_string;
else
str.append(m_string);
- } else {
+ } else
str.append(String(m_current, m_length));
- }
}
public:
@@ -78,7 +83,6 @@ public:
, m_numberOfCharactersConsumedPriorToCurrentString(0)
, m_numberOfCharactersConsumedPriorToCurrentLine(0)
, m_currentLine(0)
- , m_composite(false)
, m_closed(false)
{
}
@@ -91,7 +95,6 @@ public:
, m_numberOfCharactersConsumedPriorToCurrentString(0)
, m_numberOfCharactersConsumedPriorToCurrentLine(0)
, m_currentLine(0)
- , m_composite(false)
, m_closed(false)
{
}
@@ -267,6 +270,8 @@ private:
return result;
}
+ bool isComposite() const { return !m_substrings.isEmpty(); }
+
UChar m_pushedChar1;
UChar m_pushedChar2;
SegmentedSubstring m_currentString;
@@ -275,7 +280,6 @@ private:
int m_numberOfCharactersConsumedPriorToCurrentLine;
int m_currentLine;
Deque<SegmentedSubstring> m_substrings;
- bool m_composite;
bool m_closed;
};