| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2178 return toLayoutTextControl(m_layoutObject)->textFormControlElement()->vi
siblePositionForIndex(index); | 2178 return toLayoutTextControl(m_layoutObject)->textFormControlElement()->vi
siblePositionForIndex(index); |
| 2179 | 2179 |
| 2180 if (!allowsTextRanges() && !m_layoutObject->isText()) | 2180 if (!allowsTextRanges() && !m_layoutObject->isText()) |
| 2181 return VisiblePosition(); | 2181 return VisiblePosition(); |
| 2182 | 2182 |
| 2183 Node* node = m_layoutObject->node(); | 2183 Node* node = m_layoutObject->node(); |
| 2184 if (!node) | 2184 if (!node) |
| 2185 return VisiblePosition(); | 2185 return VisiblePosition(); |
| 2186 | 2186 |
| 2187 if (index <= 0) | 2187 if (index <= 0) |
| 2188 return VisiblePosition(firstPositionInOrBeforeNode(node)); | 2188 return createVisiblePosition(firstPositionInOrBeforeNode(node)); |
| 2189 | 2189 |
| 2190 Position start, end; | 2190 Position start, end; |
| 2191 bool selected = Range::selectNodeContents(node, start, end); | 2191 bool selected = Range::selectNodeContents(node, start, end); |
| 2192 if (!selected) | 2192 if (!selected) |
| 2193 return VisiblePosition(); | 2193 return VisiblePosition(); |
| 2194 | 2194 |
| 2195 CharacterIterator it(start, end); | 2195 CharacterIterator it(start, end); |
| 2196 it.advance(index - 1); | 2196 it.advance(index - 1); |
| 2197 return VisiblePosition(Position(it.currentContainer(), it.endOffset()), Text
Affinity::Upstream); | 2197 return createVisiblePosition(Position(it.currentContainer(), it.endOffset())
, TextAffinity::Upstream); |
| 2198 } | 2198 } |
| 2199 | 2199 |
| 2200 void AXLayoutObject::addInlineTextBoxChildren(bool force) | 2200 void AXLayoutObject::addInlineTextBoxChildren(bool force) |
| 2201 { | 2201 { |
| 2202 Settings* settings = document()->settings(); | 2202 Settings* settings = document()->settings(); |
| 2203 if (!force && (!settings || !settings->inlineTextBoxAccessibilityEnabled())) | 2203 if (!force && (!settings || !settings->inlineTextBoxAccessibilityEnabled())) |
| 2204 return; | 2204 return; |
| 2205 | 2205 |
| 2206 if (!layoutObject() || !layoutObject()->isText()) | 2206 if (!layoutObject() || !layoutObject()->isText()) |
| 2207 return; | 2207 return; |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2653 if (label && label->layoutObject()) { | 2653 if (label && label->layoutObject()) { |
| 2654 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); | 2654 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); |
| 2655 result.unite(labelRect); | 2655 result.unite(labelRect); |
| 2656 } | 2656 } |
| 2657 } | 2657 } |
| 2658 | 2658 |
| 2659 return result; | 2659 return result; |
| 2660 } | 2660 } |
| 2661 | 2661 |
| 2662 } // namespace blink | 2662 } // namespace blink |
| OLD | NEW |