| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 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 Loading... |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #ifndef AXSlider_h | 29 #ifndef AXSlider_h |
| 30 #define AXSlider_h | 30 #define AXSlider_h |
| 31 | 31 |
| 32 #include "modules/accessibility/AXMockObject.h" | 32 #include "modules/accessibility/AXMockObject.h" |
| 33 #include "modules/accessibility/AXRenderObject.h" | 33 #include "modules/accessibility/AXRenderObject.h" |
| 34 | 34 |
| 35 namespace blink { | 35 namespace blink { |
| 36 | 36 |
| 37 class AXObjectCache; |
| 37 class HTMLInputElement; | 38 class HTMLInputElement; |
| 38 | 39 |
| 39 class AXSlider : public AXRenderObject { | 40 class AXSlider : public AXRenderObject { |
| 40 | 41 |
| 41 public: | 42 public: |
| 42 static PassRefPtr<AXSlider> create(RenderObject*); | 43 static PassRefPtr<AXSlider> create(RenderObject*, AXObjectCache*); |
| 43 virtual ~AXSlider() { } | 44 virtual ~AXSlider() { } |
| 44 | 45 |
| 45 protected: | 46 protected: |
| 46 explicit AXSlider(RenderObject*); | 47 explicit AXSlider(RenderObject*, AXObjectCache*); |
| 47 | 48 |
| 48 private: | 49 private: |
| 49 HTMLInputElement* element() const; | 50 HTMLInputElement* element() const; |
| 50 virtual AXObject* elementAccessibilityHitTest(const IntPoint&) const overrid
e final; | 51 virtual AXObject* elementAccessibilityHitTest(const IntPoint&) const overrid
e final; |
| 51 | 52 |
| 52 virtual AccessibilityRole roleValue() const override { return SliderRole; } | 53 virtual AccessibilityRole roleValue() const override { return SliderRole; } |
| 53 virtual bool isSlider() const override final { return true; } | 54 virtual bool isSlider() const override final { return true; } |
| 54 virtual bool isControl() const override final { return true; } | 55 virtual bool isControl() const override final { return true; } |
| 55 | 56 |
| 56 virtual void addChildren() override final; | 57 virtual void addChildren() override final; |
| 57 | 58 |
| 58 virtual bool canSetValueAttribute() const override final { return true; } | 59 virtual bool canSetValueAttribute() const override final { return true; } |
| 59 const AtomicString& getAttribute(const QualifiedName& attribute) const; | 60 const AtomicString& getAttribute(const QualifiedName& attribute) const; |
| 60 | 61 |
| 61 virtual void setValue(const String&) override final; | 62 virtual void setValue(const String&) override final; |
| 62 virtual AccessibilityOrientation orientation() const override final; | 63 virtual AccessibilityOrientation orientation() const override final; |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 class AXSliderThumb final : public AXMockObject { | 66 class AXSliderThumb final : public AXMockObject { |
| 66 | 67 |
| 67 public: | 68 public: |
| 68 static PassRefPtr<AXSliderThumb> create(); | 69 static PassRefPtr<AXSliderThumb> create(AXObjectCache*); |
| 69 virtual ~AXSliderThumb() { } | 70 virtual ~AXSliderThumb() { } |
| 70 | 71 |
| 71 virtual AccessibilityRole roleValue() const override { return SliderThumbRol
e; } | 72 virtual AccessibilityRole roleValue() const override { return SliderThumbRol
e; } |
| 72 | 73 |
| 73 virtual LayoutRect elementRect() const override; | 74 virtual LayoutRect elementRect() const override; |
| 74 | 75 |
| 75 private: | 76 private: |
| 76 AXSliderThumb(); | 77 AXSliderThumb(AXObjectCache*); |
| 77 | 78 |
| 78 virtual bool computeAccessibilityIsIgnored() const override; | 79 virtual bool computeAccessibilityIsIgnored() const override; |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 | 82 |
| 82 } // namespace blink | 83 } // namespace blink |
| 83 | 84 |
| 84 #endif // AXSlider_h | 85 #endif // AXSlider_h |
| OLD | NEW |