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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 return m_scrollView; | 217 return m_scrollView; |
218 } | 218 } |
219 | 219 |
220 AXObject* AXScrollView::computeParent() const | 220 AXObject* AXScrollView::computeParent() const |
221 { | 221 { |
222 if (!m_scrollView || !m_scrollView->isFrameView()) | 222 if (!m_scrollView || !m_scrollView->isFrameView()) |
223 return 0; | 223 return 0; |
224 | 224 |
225 // FIXME: Broken for OOPI. | 225 // FIXME: Broken for OOPI. |
226 HTMLFrameOwnerElement* owner = m_scrollView->frame().deprecatedLocalOwner(); | 226 HTMLFrameOwnerElement* owner = m_scrollView->frame().deprecatedLocalOwner(); |
227 if (owner && owner->renderer()) | 227 if (owner && owner->layoutObject()) |
228 return axObjectCache()->getOrCreate(owner); | 228 return axObjectCache()->getOrCreate(owner); |
229 | 229 |
230 return axObjectCache()->getOrCreate(m_scrollView->frame().pagePopupOwner()); | 230 return axObjectCache()->getOrCreate(m_scrollView->frame().pagePopupOwner()); |
231 } | 231 } |
232 | 232 |
233 AXObject* AXScrollView::computeParentIfExists() const | 233 AXObject* AXScrollView::computeParentIfExists() const |
234 { | 234 { |
235 if (!m_scrollView || !m_scrollView->isFrameView()) | 235 if (!m_scrollView || !m_scrollView->isFrameView()) |
236 return 0; | 236 return 0; |
237 | 237 |
238 HTMLFrameOwnerElement* owner = m_scrollView->frame().deprecatedLocalOwner(); | 238 HTMLFrameOwnerElement* owner = m_scrollView->frame().deprecatedLocalOwner(); |
239 if (owner && owner->renderer()) | 239 if (owner && owner->layoutObject()) |
240 return axObjectCache()->get(owner); | 240 return axObjectCache()->get(owner); |
241 | 241 |
242 return axObjectCache()->get(m_scrollView->frame().pagePopupOwner()); | 242 return axObjectCache()->get(m_scrollView->frame().pagePopupOwner()); |
243 } | 243 } |
244 | 244 |
245 ScrollableArea* AXScrollView::getScrollableAreaIfScrollable() const | 245 ScrollableArea* AXScrollView::getScrollableAreaIfScrollable() const |
246 { | 246 { |
247 return m_scrollView; | 247 return m_scrollView; |
248 } | 248 } |
249 | 249 |
250 void AXScrollView::scrollTo(const IntPoint& point) const | 250 void AXScrollView::scrollTo(const IntPoint& point) const |
251 { | 251 { |
252 if (m_scrollView) | 252 if (m_scrollView) |
253 m_scrollView->setScrollPosition(point); | 253 m_scrollView->setScrollPosition(point); |
254 } | 254 } |
255 | 255 |
256 } // namespace blink | 256 } // namespace blink |
OLD | NEW |