summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderText.h
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-04-27 16:31:00 +0100
committerSteve Block <steveblock@google.com>2010-05-11 14:42:12 +0100
commitdcc8cf2e65d1aa555cce12431a16547e66b469ee (patch)
tree92a8d65cd5383bca9749f5327fb5e440563926e6 /WebCore/rendering/RenderText.h
parentccac38a6b48843126402088a309597e682f40fe6 (diff)
downloadexternal_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.zip
external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.tar.gz
external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.tar.bz2
Merge webkit.org at r58033 : Initial merge by git
Change-Id: If006c38561af287c50cd578d251629b51e4d8cd1
Diffstat (limited to 'WebCore/rendering/RenderText.h')
-rw-r--r--WebCore/rendering/RenderText.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/WebCore/rendering/RenderText.h b/WebCore/rendering/RenderText.h
index d46bce9..92c82e1 100644
--- a/WebCore/rendering/RenderText.h
+++ b/WebCore/rendering/RenderText.h
@@ -50,7 +50,8 @@ public:
virtual void destroy();
- StringImpl* text() const { return m_text.get(); }
+ StringImpl* text() const { return m_text.impl(); }
+ String textWithoutTranscoding() const;
InlineTextBox* createInlineTextBox();
void dirtyLineBoxes(bool fullLayout);
@@ -63,12 +64,12 @@ public:
virtual VisiblePosition positionForPoint(const IntPoint&);
- const UChar* characters() const { return m_text->characters(); }
- unsigned textLength() const { return m_text->length(); } // non virtual implementation of length()
+ const UChar* characters() const { return m_text.characters(); }
+ unsigned textLength() const { return m_text.length(); } // non virtual implementation of length()
void positionLineBox(InlineBox*);
- virtual unsigned width(unsigned from, unsigned len, const Font&, int xPos, HashSet<const SimpleFontData*>* fallbackFonts = 0) const;
- virtual unsigned width(unsigned from, unsigned len, int xPos, bool firstLine = false, HashSet<const SimpleFontData*>* fallbackFonts = 0) const;
+ virtual unsigned width(unsigned from, unsigned len, const Font&, int xPos, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
+ virtual unsigned width(unsigned from, unsigned len, int xPos, bool firstLine = false, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
virtual int lineHeight(bool firstLine, bool isRootLineBox = false) const;
@@ -128,12 +129,12 @@ protected:
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
virtual void setTextInternal(PassRefPtr<StringImpl>);
- virtual UChar previousCharacter();
+ virtual UChar previousCharacter() const;
virtual InlineTextBox* createTextBox(); // Subclassed by SVG.
private:
- void calcPrefWidths(int leadWidth, HashSet<const SimpleFontData*>& fallbackFonts);
+ void calcPrefWidths(int leadWidth, HashSet<const SimpleFontData*>& fallbackFonts, GlyphOverflow&);
// Make length() private so that callers that have a RenderText*
// will use the more efficient textLength() instead, while
@@ -146,12 +147,15 @@ private:
void deleteTextBoxes();
bool containsOnlyWhitespace(unsigned from, unsigned len) const;
- int widthFromCache(const Font&, int start, int len, int xPos, HashSet<const SimpleFontData*>* fallbackFonts) const;
+ int widthFromCache(const Font&, int start, int len, int xPos, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow*) const;
bool isAllASCII() const { return m_isAllASCII; }
+ void updateNeedsTranscoding();
+
+ inline void transformText(String&) const;
int m_minWidth; // here to minimize padding in 64-bit.
- RefPtr<StringImpl> m_text;
+ String m_text;
InlineTextBox* m_firstTextBox;
InlineTextBox* m_lastTextBox;
@@ -171,7 +175,8 @@ private:
// or removed).
bool m_containsReversedText : 1;
bool m_isAllASCII : 1;
- mutable bool m_knownNotToUseFallbackFonts : 1;
+ mutable bool m_knownToHaveNoOverflowAndNoFallbackFonts : 1;
+ bool m_needsTranscoding : 1;
};
inline RenderText* toRenderText(RenderObject* object)