| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 LayoutRect AbstractInlineTextBox::bounds() const | 84 LayoutRect AbstractInlineTextBox::bounds() const |
| 85 { | 85 { |
| 86 if (!m_inlineTextBox || !m_renderText) | 86 if (!m_inlineTextBox || !m_renderText) |
| 87 return LayoutRect(); | 87 return LayoutRect(); |
| 88 | 88 |
| 89 FloatRect boundaries = m_inlineTextBox->calculateBoundaries(); | 89 FloatRect boundaries = m_inlineTextBox->calculateBoundaries(); |
| 90 return m_renderText->localToAbsoluteQuad(boundaries).enclosingBoundingBox(); | 90 return m_renderText->localToAbsoluteQuad(boundaries).enclosingBoundingBox(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 unsigned AbstractInlineTextBox::start() const | |
| 94 { | |
| 95 if (!m_inlineTextBox) | |
| 96 return 0; | |
| 97 | |
| 98 return m_inlineTextBox->start(); | |
| 99 } | |
| 100 | |
| 101 unsigned AbstractInlineTextBox::len() const | 93 unsigned AbstractInlineTextBox::len() const |
| 102 { | 94 { |
| 103 if (!m_inlineTextBox) | 95 if (!m_inlineTextBox) |
| 104 return 0; | 96 return 0; |
| 105 | 97 |
| 106 return m_inlineTextBox->len(); | 98 return m_inlineTextBox->len(); |
| 107 } | 99 } |
| 108 | 100 |
| 109 AbstractInlineTextBox::Direction AbstractInlineTextBox::direction() const | 101 AbstractInlineTextBox::Direction AbstractInlineTextBox::direction() const |
| 110 { | 102 { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 return plainText(range.get(), TextIteratorIgnoresStyleVisibility); | 152 return plainText(range.get(), TextIteratorIgnoresStyleVisibility); |
| 161 } | 153 } |
| 162 | 154 |
| 163 String result = m_renderText->text().substring(start, len).simplifyWhiteSpac
e(WTF::DoNotStripWhiteSpace); | 155 String result = m_renderText->text().substring(start, len).simplifyWhiteSpac
e(WTF::DoNotStripWhiteSpace); |
| 164 if (m_inlineTextBox->nextTextBox() && m_inlineTextBox->nextTextBox()->start(
) > m_inlineTextBox->end() && result.length() && !result.right(1).containsOnlyWh
itespace()) | 156 if (m_inlineTextBox->nextTextBox() && m_inlineTextBox->nextTextBox()->start(
) > m_inlineTextBox->end() && result.length() && !result.right(1).containsOnlyWh
itespace()) |
| 165 return result + " "; | 157 return result + " "; |
| 166 return result; | 158 return result; |
| 167 } | 159 } |
| 168 | 160 |
| 169 } // namespace blink | 161 } // namespace blink |
| OLD | NEW |