| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 101 |
| 102 m_start = start; | 102 m_start = start; |
| 103 m_fragmentLength = length; | 103 m_fragmentLength = length; |
| 104 } | 104 } |
| 105 | 105 |
| 106 void LayoutTextFragment::transformText() { | 106 void LayoutTextFragment::transformText() { |
| 107 // Note, we have to call LayoutText::setText here because, if we use our | 107 // Note, we have to call LayoutText::setText here because, if we use our |
| 108 // version we will, potentially, screw up the first-letter settings where | 108 // version we will, potentially, screw up the first-letter settings where |
| 109 // we only use portions of the string. | 109 // we only use portions of the string. |
| 110 if (RefPtr<StringImpl> textToTransform = originalText()) | 110 if (RefPtr<StringImpl> textToTransform = originalText()) |
| 111 LayoutText::setText(textToTransform.release(), true); | 111 LayoutText::setText(std::move(textToTransform), true); |
| 112 } | 112 } |
| 113 | 113 |
| 114 UChar LayoutTextFragment::previousCharacter() const { | 114 UChar LayoutTextFragment::previousCharacter() const { |
| 115 if (start()) { | 115 if (start()) { |
| 116 StringImpl* original = completeText().get(); | 116 StringImpl* original = completeText().get(); |
| 117 if (original && start() <= original->length()) | 117 if (original && start() <= original->length()) |
| 118 return (*original)[start() - 1]; | 118 return (*original)[start() - 1]; |
| 119 } | 119 } |
| 120 | 120 |
| 121 return LayoutText::previousCharacter(); | 121 return LayoutText::previousCharacter(); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 LayoutObject::updateHitTestResult(result, point); | 155 LayoutObject::updateHitTestResult(result, point); |
| 156 | 156 |
| 157 // If we aren't part of a first-letter element, or if we | 157 // If we aren't part of a first-letter element, or if we |
| 158 // are part of first-letter but we're the remaining text then return. | 158 // are part of first-letter but we're the remaining text then return. |
| 159 if (m_isRemainingTextLayoutObject || !firstLetterPseudoElement()) | 159 if (m_isRemainingTextLayoutObject || !firstLetterPseudoElement()) |
| 160 return; | 160 return; |
| 161 result.setInnerNode(firstLetterPseudoElement()); | 161 result.setInnerNode(firstLetterPseudoElement()); |
| 162 } | 162 } |
| 163 | 163 |
| 164 } // namespace blink | 164 } // namespace blink |
| OLD | NEW |