From dcc8cf2e65d1aa555cce12431a16547e66b469ee Mon Sep 17 00:00:00 2001 From: Steve Block Date: Tue, 27 Apr 2010 16:31:00 +0100 Subject: Merge webkit.org at r58033 : Initial merge by git Change-Id: If006c38561af287c50cd578d251629b51e4d8cd1 --- WebCore/rendering/RenderText.h | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'WebCore/rendering/RenderText.h') 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* fallbackFonts = 0) const; - virtual unsigned width(unsigned from, unsigned len, int xPos, bool firstLine = false, HashSet* fallbackFonts = 0) const; + virtual unsigned width(unsigned from, unsigned len, const Font&, int xPos, HashSet* fallbackFonts = 0, GlyphOverflow* = 0) const; + virtual unsigned width(unsigned from, unsigned len, int xPos, bool firstLine = false, HashSet* 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); - virtual UChar previousCharacter(); + virtual UChar previousCharacter() const; virtual InlineTextBox* createTextBox(); // Subclassed by SVG. private: - void calcPrefWidths(int leadWidth, HashSet& fallbackFonts); + void calcPrefWidths(int leadWidth, HashSet& 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* fallbackFonts) const; + int widthFromCache(const Font&, int start, int len, int xPos, HashSet* 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 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) -- cgit v1.1