Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Side by Side Diff: Source/modules/accessibility/AXScrollView.cpp

Issue 742353004: Implement computedRole and computedName (behind a flag) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Finished pulling out ScopedAXObjectCache etc. Many fprintfs remain. Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 16 matching lines...) Expand all
27 #include "modules/accessibility/AXScrollView.h" 27 #include "modules/accessibility/AXScrollView.h"
28 28
29 #include "core/frame/FrameView.h" 29 #include "core/frame/FrameView.h"
30 #include "core/frame/LocalFrame.h" 30 #include "core/frame/LocalFrame.h"
31 #include "core/html/HTMLFrameOwnerElement.h" 31 #include "core/html/HTMLFrameOwnerElement.h"
32 #include "modules/accessibility/AXObjectCacheImpl.h" 32 #include "modules/accessibility/AXObjectCacheImpl.h"
33 #include "modules/accessibility/AXScrollbar.h" 33 #include "modules/accessibility/AXScrollbar.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 AXScrollView::AXScrollView(FrameView* view) 37 AXScrollView::AXScrollView(FrameView* view, AXObjectCache* axObjectCache)
38 : m_scrollView(view) 38 : AXObject(axObjectCache)
39 , m_scrollView(view)
39 , m_childrenDirty(false) 40 , m_childrenDirty(false)
40 { 41 {
41 } 42 }
42 43
43 AXScrollView::~AXScrollView() 44 AXScrollView::~AXScrollView()
44 { 45 {
45 ASSERT(isDetached()); 46 ASSERT(isDetached());
46 } 47 }
47 48
48 void AXScrollView::detach() 49 void AXScrollView::detach()
49 { 50 {
50 AXObject::detach(); 51 AXObject::detach();
51 m_scrollView = 0; 52 m_scrollView = 0;
52 } 53 }
53 54
54 PassRefPtr<AXScrollView> AXScrollView::create(FrameView* view) 55 PassRefPtr<AXScrollView> AXScrollView::create(FrameView* view, AXObjectCache* ax ObjectCache)
55 { 56 {
56 return adoptRef(new AXScrollView(view)); 57 return adoptRef(new AXScrollView(view, axObjectCache));
57 } 58 }
58 59
59 AXObject* AXScrollView::scrollBar(AccessibilityOrientation orientation) 60 AXObject* AXScrollView::scrollBar(AccessibilityOrientation orientation)
60 { 61 {
61 updateScrollbars(); 62 updateScrollbars();
62 63
63 switch (orientation) { 64 switch (orientation) {
64 case AccessibilityOrientationVertical: 65 case AccessibilityOrientationVertical:
65 return m_verticalScrollbar ? m_verticalScrollbar.get() : 0; 66 return m_verticalScrollbar ? m_verticalScrollbar.get() : 0;
66 case AccessibilityOrientationHorizontal: 67 case AccessibilityOrientationHorizontal:
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 return m_scrollView; 247 return m_scrollView;
247 } 248 }
248 249
249 void AXScrollView::scrollTo(const IntPoint& point) const 250 void AXScrollView::scrollTo(const IntPoint& point) const
250 { 251 {
251 if (m_scrollView) 252 if (m_scrollView)
252 m_scrollView->setScrollPosition(point); 253 m_scrollView->setScrollPosition(point);
253 } 254 }
254 255
255 } // namespace blink 256 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698