| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 m_children.append(webArea); | 159 m_children.append(webArea); |
| 160 | 160 |
| 161 updateScrollbars(); | 161 updateScrollbars(); |
| 162 } | 162 } |
| 163 | 163 |
| 164 AccessibilityObject* AccessibilityScrollView::webAreaObject() const | 164 AccessibilityObject* AccessibilityScrollView::webAreaObject() const |
| 165 { | 165 { |
| 166 if (!m_scrollView || !m_scrollView->isFrameView()) | 166 if (!m_scrollView || !m_scrollView->isFrameView()) |
| 167 return 0; | 167 return 0; |
| 168 | 168 |
| 169 Document* doc = toFrameView(m_scrollView)->frame()->document(); | 169 Document* doc = toFrameView(m_scrollView)->frame().document(); |
| 170 if (!doc || !doc->renderer()) | 170 if (!doc || !doc->renderer()) |
| 171 return 0; | 171 return 0; |
| 172 | 172 |
| 173 return axObjectCache()->getOrCreate(doc); | 173 return axObjectCache()->getOrCreate(doc); |
| 174 } | 174 } |
| 175 | 175 |
| 176 AccessibilityObject* AccessibilityScrollView::accessibilityHitTest(const IntPoin
t& point) const | 176 AccessibilityObject* AccessibilityScrollView::accessibilityHitTest(const IntPoin
t& point) const |
| 177 { | 177 { |
| 178 AccessibilityObject* webArea = webAreaObject(); | 178 AccessibilityObject* webArea = webAreaObject(); |
| 179 if (!webArea) | 179 if (!webArea) |
| (...skipping 21 matching lines...) Expand all Loading... |
| 201 return 0; | 201 return 0; |
| 202 | 202 |
| 203 return toFrameView(m_scrollView); | 203 return toFrameView(m_scrollView); |
| 204 } | 204 } |
| 205 | 205 |
| 206 AccessibilityObject* AccessibilityScrollView::parentObject() const | 206 AccessibilityObject* AccessibilityScrollView::parentObject() const |
| 207 { | 207 { |
| 208 if (!m_scrollView || !m_scrollView->isFrameView()) | 208 if (!m_scrollView || !m_scrollView->isFrameView()) |
| 209 return 0; | 209 return 0; |
| 210 | 210 |
| 211 HTMLFrameOwnerElement* owner = toFrameView(m_scrollView)->frame()->ownerElem
ent(); | 211 HTMLFrameOwnerElement* owner = toFrameView(m_scrollView)->frame().ownerEleme
nt(); |
| 212 if (owner && owner->renderer()) | 212 if (owner && owner->renderer()) |
| 213 return axObjectCache()->getOrCreate(owner); | 213 return axObjectCache()->getOrCreate(owner); |
| 214 | 214 |
| 215 return 0; | 215 return 0; |
| 216 } | 216 } |
| 217 | 217 |
| 218 AccessibilityObject* AccessibilityScrollView::parentObjectIfExists() const | 218 AccessibilityObject* AccessibilityScrollView::parentObjectIfExists() const |
| 219 { | 219 { |
| 220 if (!m_scrollView || !m_scrollView->isFrameView()) | 220 if (!m_scrollView || !m_scrollView->isFrameView()) |
| 221 return 0; | 221 return 0; |
| 222 | 222 |
| 223 HTMLFrameOwnerElement* owner = toFrameView(m_scrollView)->frame()->ownerElem
ent(); | 223 HTMLFrameOwnerElement* owner = toFrameView(m_scrollView)->frame().ownerEleme
nt(); |
| 224 if (owner && owner->renderer()) | 224 if (owner && owner->renderer()) |
| 225 return axObjectCache()->get(owner); | 225 return axObjectCache()->get(owner); |
| 226 | 226 |
| 227 return 0; | 227 return 0; |
| 228 } | 228 } |
| 229 | 229 |
| 230 ScrollableArea* AccessibilityScrollView::getScrollableAreaIfScrollable() const | 230 ScrollableArea* AccessibilityScrollView::getScrollableAreaIfScrollable() const |
| 231 { | 231 { |
| 232 return m_scrollView; | 232 return m_scrollView; |
| 233 } | 233 } |
| 234 | 234 |
| 235 void AccessibilityScrollView::scrollTo(const IntPoint& point) const | 235 void AccessibilityScrollView::scrollTo(const IntPoint& point) const |
| 236 { | 236 { |
| 237 if (m_scrollView) | 237 if (m_scrollView) |
| 238 m_scrollView->setScrollPosition(point); | 238 m_scrollView->setScrollPosition(point); |
| 239 } | 239 } |
| 240 | 240 |
| 241 } // namespace WebCore | 241 } // namespace WebCore |
| OLD | NEW |