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

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

Issue 192413002: Use new is*Element() helper functions in accessibility code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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) 2010 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2010 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 20 matching lines...) Expand all
31 namespace WebCore { 31 namespace WebCore {
32 32
33 using namespace HTMLNames; 33 using namespace HTMLNames;
34 34
35 AXMenuListOption::AXMenuListOption() 35 AXMenuListOption::AXMenuListOption()
36 { 36 {
37 } 37 }
38 38
39 void AXMenuListOption::setElement(HTMLElement* element) 39 void AXMenuListOption::setElement(HTMLElement* element)
40 { 40 {
41 ASSERT_ARG(element, element->hasTagName(optionTag)); 41 ASSERT_ARG(element, isHTMLOptionElement(element));
42 m_element = element; 42 m_element = element;
43 } 43 }
44 44
45 Element* AXMenuListOption::actionElement() const 45 Element* AXMenuListOption::actionElement() const
46 { 46 {
47 return m_element.get(); 47 return m_element.get();
48 } 48 }
49 49
50 bool AXMenuListOption::isEnabled() const 50 bool AXMenuListOption::isEnabled() const
51 { 51 {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 return grandparent->elementRect(); 104 return grandparent->elementRect();
105 } 105 }
106 106
107 String AXMenuListOption::stringValue() const 107 String AXMenuListOption::stringValue() const
108 { 108 {
109 return toHTMLOptionElement(m_element)->text(); 109 return toHTMLOptionElement(m_element)->text();
110 } 110 }
111 111
112 } // namespace WebCore 112 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698