| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Igalia S.L. | 2 * Copyright (C) 2009 Igalia S.L. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 82 |
| 83 void FrameSelection::notifyAccessibilityForSelectionChange() | 83 void FrameSelection::notifyAccessibilityForSelectionChange() |
| 84 { | 84 { |
| 85 if (!AXObjectCache::accessibilityEnabled()) | 85 if (!AXObjectCache::accessibilityEnabled()) |
| 86 return; | 86 return; |
| 87 | 87 |
| 88 if (!m_selection.start().isNotNull() || !m_selection.end().isNotNull()) | 88 if (!m_selection.start().isNotNull() || !m_selection.end().isNotNull()) |
| 89 return; | 89 return; |
| 90 | 90 |
| 91 RenderObject* focusedNode = m_selection.end().containerNode()->renderer(); | 91 RenderObject* focusedNode = m_selection.end().containerNode()->renderer(); |
| 92 AXObjectCache* cache = m_frame->document()->existingAXObjectCache(); | 92 AccessibilityObject* accessibilityObject = m_frame->document()->axObjectCach
e()->getOrCreate(focusedNode); |
| 93 if (!cache) | |
| 94 return; | |
| 95 | |
| 96 AccessibilityObject* accessibilityObject = cache->getOrCreate(focusedNode); | |
| 97 if (!accessibilityObject) | 93 if (!accessibilityObject) |
| 98 return; | 94 return; |
| 99 | 95 |
| 100 int offset; | 96 int offset; |
| 101 RefPtr<AccessibilityObject> object = objectFocusedAndCaretOffsetUnignored(ac
cessibilityObject, offset); | 97 RefPtr<AccessibilityObject> object = objectFocusedAndCaretOffsetUnignored(ac
cessibilityObject, offset); |
| 102 if (!object) | 98 if (!object) |
| 103 return; | 99 return; |
| 104 | 100 |
| 105 emitTextSelectionChange(object.get(), m_selection, offset); | 101 emitTextSelectionChange(object.get(), m_selection, offset); |
| 106 maybeEmitTextFocusChange(object.release()); | 102 maybeEmitTextFocusChange(object.release()); |
| 107 } | 103 } |
| 108 | 104 |
| 109 } // namespace WebCore | 105 } // namespace WebCore |
| OLD | NEW |