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

Side by Side Diff: Source/modules/accessibility/AXListBoxOption.h

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) 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 17 matching lines...) Expand all
28 28
29 #ifndef AXListBoxOption_h 29 #ifndef AXListBoxOption_h
30 #define AXListBoxOption_h 30 #define AXListBoxOption_h
31 31
32 #include "core/html/HTMLElement.h" 32 #include "core/html/HTMLElement.h"
33 #include "modules/accessibility/AXRenderObject.h" 33 #include "modules/accessibility/AXRenderObject.h"
34 #include "wtf/Forward.h" 34 #include "wtf/Forward.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 class AXObjectCache;
38 class HTMLSelectElement; 39 class HTMLSelectElement;
39 40
40 class AXListBoxOption final : public AXRenderObject { 41 class AXListBoxOption final : public AXRenderObject {
41 42
42 private: 43 private:
43 AXListBoxOption(RenderObject*); 44 AXListBoxOption(RenderObject*, AXObjectCache*);
45
44 public: 46 public:
45 static PassRefPtr<AXListBoxOption> create(RenderObject*); 47 static PassRefPtr<AXListBoxOption> create(RenderObject*, AXObjectCache*);
46 virtual ~AXListBoxOption(); 48 virtual ~AXListBoxOption();
47 49
48 virtual AccessibilityRole roleValue() const override { return ListBoxOptionR ole; } 50 virtual AccessibilityRole roleValue() const override { return ListBoxOptionR ole; }
49 virtual bool isSelected() const override; 51 virtual bool isSelected() const override;
50 virtual bool isEnabled() const override; 52 virtual bool isEnabled() const override;
51 virtual bool isSelectedOptionActive() const override; 53 virtual bool isSelectedOptionActive() const override;
52 virtual void setSelected(bool) override; 54 virtual void setSelected(bool) override;
53 virtual bool canSetSelectedAttribute() const override; 55 virtual bool canSetSelectedAttribute() const override;
54 virtual String stringValue() const override; 56 virtual String stringValue() const override;
55 virtual String title() const override { return String(); } 57 virtual String title() const override { return String(); }
56 58
57 private: 59 private:
58 virtual bool isListBoxOption() const override { return true; } 60 virtual bool isListBoxOption() const override { return true; }
59 virtual bool canHaveChildren() const override { return false; } 61 virtual bool canHaveChildren() const override { return false; }
60 virtual bool computeAccessibilityIsIgnored() const override; 62 virtual bool computeAccessibilityIsIgnored() const override;
61 63
62 HTMLSelectElement* listBoxOptionParentNode() const; 64 HTMLSelectElement* listBoxOptionParentNode() const;
63 int listBoxOptionIndex() const; 65 int listBoxOptionIndex() const;
64 AXObject* listBoxOptionAXObject(HTMLElement*) const; 66 AXObject* listBoxOptionAXObject(HTMLElement*) const;
65 }; 67 };
66 68
67 DEFINE_AX_OBJECT_TYPE_CASTS(AXListBoxOption, isListBoxOption()); 69 DEFINE_AX_OBJECT_TYPE_CASTS(AXListBoxOption, isListBoxOption());
68 70
69 } // namespace blink 71 } // namespace blink
70 72
71 #endif // AXListBoxOption_h 73 #endif // AXListBoxOption_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698