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

Side by Side Diff: Source/core/accessibility/AccessibilityListBox.cpp

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 3 months 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 | Annotate | Revision Log
OLDNEW
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 result.append(m_children[i]); 122 result.append(m_children[i]);
123 } 123 }
124 } 124 }
125 125
126 AccessibilityObject* AccessibilityListBox::listBoxOptionAccessibilityObject(HTML Element* element) const 126 AccessibilityObject* AccessibilityListBox::listBoxOptionAccessibilityObject(HTML Element* element) const
127 { 127 {
128 // skip hr elements 128 // skip hr elements
129 if (!element || element->hasTagName(hrTag)) 129 if (!element || element->hasTagName(hrTag))
130 return 0; 130 return 0;
131 131
132 AccessibilityObject* listBoxObject = m_renderer->document()->axObjectCache() ->getOrCreate(ListBoxOptionRole); 132 AccessibilityObject* listBoxObject = m_renderer->document().axObjectCache()- >getOrCreate(ListBoxOptionRole);
133 static_cast<AccessibilityListBoxOption*>(listBoxObject)->setHTMLElement(elem ent); 133 static_cast<AccessibilityListBoxOption*>(listBoxObject)->setHTMLElement(elem ent);
134 134
135 return listBoxObject; 135 return listBoxObject;
136 } 136 }
137 137
138 AccessibilityObject* AccessibilityListBox::elementAccessibilityHitTest(const Int Point& point) const 138 AccessibilityObject* AccessibilityListBox::elementAccessibilityHitTest(const Int Point& point) const
139 { 139 {
140 // the internal HTMLSelectElement methods for returning a listbox option at a point 140 // the internal HTMLSelectElement methods for returning a listbox option at a point
141 // ignore optgroup elements. 141 // ignore optgroup elements.
142 if (!m_renderer) 142 if (!m_renderer)
(...skipping 17 matching lines...) Expand all
160 } 160 }
161 } 161 }
162 162
163 if (listBoxOption && !listBoxOption->accessibilityIsIgnored()) 163 if (listBoxOption && !listBoxOption->accessibilityIsIgnored())
164 return listBoxOption; 164 return listBoxOption;
165 165
166 return axObjectCache()->getOrCreate(m_renderer); 166 return axObjectCache()->getOrCreate(m_renderer);
167 } 167 }
168 168
169 } // namespace WebCore 169 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/accessibility/AccessibilityImageMapLink.cpp ('k') | Source/core/accessibility/AccessibilityListBoxOption.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698