| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 // If this is the layoutObject for a first-letter pseudoNode then we have to loo
k | 124 // If this is the layoutObject for a first-letter pseudoNode then we have to |
| 125 // at the node for the remaining text to find our content. | 125 // look at the node for the remaining text to find our content. |
| 126 Text* LayoutTextFragment::associatedTextNode() const { | 126 Text* LayoutTextFragment::associatedTextNode() const { |
| 127 Node* node = this->firstLetterPseudoElement(); | 127 Node* node = this->firstLetterPseudoElement(); |
| 128 if (m_isRemainingTextLayoutObject || !node) { | 128 if (m_isRemainingTextLayoutObject || !node) { |
| 129 // If we don't have a node, then we aren't part of a first-letter pseudo | 129 // If we don't have a node, then we aren't part of a first-letter pseudo |
| 130 // element, so use the actual node. Likewise, if we have a node, but | 130 // element, so use the actual node. Likewise, if we have a node, but |
| 131 // we're the remainingTextLayoutObject for a pseudo element use the real | 131 // we're the remainingTextLayoutObject for a pseudo element use the real |
| 132 // text node. | 132 // text node. |
| 133 node = this->node(); | 133 node = this->node(); |
| 134 } | 134 } |
| 135 | 135 |
| (...skipping 19 matching lines...) Expand all 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 |