diff options
author | Ben Murdoch <benm@google.com> | 2010-10-22 13:02:20 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-10-26 15:21:41 +0100 |
commit | a94275402997c11dd2e778633dacf4b7e630a35d (patch) | |
tree | e66f56c67e3b01f22c9c23cd932271ee9ac558ed /WebCore/rendering/RenderText.cpp | |
parent | 09e26c78506587b3f5d930d7bc72a23287ffbec0 (diff) | |
download | external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.zip external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.gz external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.bz2 |
Merge WebKit at r70209: Initial merge by Git
Change-Id: Id23a68efa36e9d1126bcce0b137872db00892c8e
Diffstat (limited to 'WebCore/rendering/RenderText.cpp')
-rw-r--r-- | WebCore/rendering/RenderText.cpp | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/WebCore/rendering/RenderText.cpp b/WebCore/rendering/RenderText.cpp index fada8b4..510d830 100644 --- a/WebCore/rendering/RenderText.cpp +++ b/WebCore/rendering/RenderText.cpp @@ -511,7 +511,7 @@ IntRect RenderText::localCaretRect(InlineBox* inlineBox, int caretOffset, int* e switch (cbStyle->textAlign()) { case TAAUTO: case JUSTIFY: - rightAligned = cbStyle->direction() == RTL; + rightAligned = !cbStyle->isLeftToRightDirection(); break; case RIGHT: case WEBKIT_RIGHT: @@ -1084,35 +1084,6 @@ void RenderText::setTextInternal(PassRefPtr<StringImpl> text) } ASSERT(m_text); -#if ENABLE(SVG) - if (isSVGInlineText()) { - if (style() && style()->whiteSpace() == PRE) { - // Spec: When xml:space="preserve", the SVG user agent will do the following using a - // copy of the original character data content. It will convert all newline and tab - // characters into space characters. Then, it will draw all space characters, including - // leading, trailing and multiple contiguous space characters. - - m_text.replace('\n', ' '); - - // If xml:space="preserve" is set, white-space is set to "pre", which - // preserves leading, trailing & contiguous space character for us. - } else { - // Spec: When xml:space="default", the SVG user agent will do the following using a - // copy of the original character data content. First, it will remove all newline - // characters. Then it will convert all tab characters into space characters. - // Then, it will strip off all leading and trailing space characters. - // Then, all contiguous space characters will be consolidated. - - m_text.replace('\n', StringImpl::empty()); - - // If xml:space="default" is set, white-space is set to "nowrap", which handles - // leading, trailing & contiguous space character removal for us. - } - - m_text.replace('\t', ' '); - } -#endif - if (style()) { transformText(m_text); @@ -1168,12 +1139,6 @@ String RenderText::textWithoutTranscoding() const return text; } -int RenderText::lineHeight(bool firstLine, bool) const -{ - // Always use the interior line height of the parent (e.g., if our parent is an inline block). - return parent()->lineHeight(firstLine, true); -} - void RenderText::dirtyLineBoxes(bool fullLayout) { if (fullLayout) @@ -1224,7 +1189,7 @@ void RenderText::positionLineBox(InlineBox* box) return; } - m_containsReversedText |= s->direction() == RTL; + m_containsReversedText |= !s->isLeftToRightDirection(); } unsigned RenderText::width(unsigned from, unsigned len, int xPos, bool firstLine, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const |