| OLD | NEW |
| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 void setSpinButtonElement(SpinButtonElement* spinButton) { m_spinButtonEleme
nt = spinButton; } | 45 void setSpinButtonElement(SpinButtonElement* spinButton) { m_spinButtonEleme
nt = spinButton; } |
| 46 void step(int amount); | 46 void step(int amount); |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 explicit AXSpinButton(AXObjectCacheImpl&); | 49 explicit AXSpinButton(AXObjectCacheImpl&); |
| 50 | 50 |
| 51 AccessibilityRole roleValue() const override; | 51 AccessibilityRole roleValue() const override; |
| 52 bool isSpinButton() const override { return true; } | 52 bool isSpinButton() const override { return true; } |
| 53 bool isNativeSpinButton() const override { return true; } | 53 bool isNativeSpinButton() const override { return true; } |
| 54 void addChildren() override; | 54 void addChildren() override; |
| 55 LayoutRect elementRect() const override; | 55 LayoutObject* layoutObjectForRelativeBounds() const override; |
| 56 void detach() override; | 56 void detach() override; |
| 57 void detachFromParent() override; | 57 void detachFromParent() override; |
| 58 | 58 |
| 59 Member<SpinButtonElement> m_spinButtonElement; | 59 Member<SpinButtonElement> m_spinButtonElement; |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 class AXSpinButtonPart final : public AXMockObject { | 62 class AXSpinButtonPart final : public AXMockObject { |
| 63 public: | 63 public: |
| 64 static AXSpinButtonPart* create(AXObjectCacheImpl&); | 64 static AXSpinButtonPart* create(AXObjectCacheImpl&); |
| 65 ~AXSpinButtonPart() override { } | 65 ~AXSpinButtonPart() override { } |
| 66 void setIsIncrementor(bool value) { m_isIncrementor = value; } | 66 void setIsIncrementor(bool value) { m_isIncrementor = value; } |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 explicit AXSpinButtonPart(AXObjectCacheImpl&); | 69 explicit AXSpinButtonPart(AXObjectCacheImpl&); |
| 70 bool m_isIncrementor : 1; | 70 bool m_isIncrementor : 1; |
| 71 | 71 |
| 72 bool press() const override; | 72 bool press() const override; |
| 73 AccessibilityRole roleValue() const override { return ButtonRole; } | 73 AccessibilityRole roleValue() const override { return ButtonRole; } |
| 74 bool isSpinButtonPart() const override { return true; } | 74 bool isSpinButtonPart() const override { return true; } |
| 75 LayoutRect elementRect() const override; | 75 void getRelativeBounds(AXObject** outContainer, FloatRect& outBoundsInContai
ner, SkMatrix44& outContainerTransform) const override; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 DEFINE_AX_OBJECT_TYPE_CASTS(AXSpinButton, isNativeSpinButton()); | 78 DEFINE_AX_OBJECT_TYPE_CASTS(AXSpinButton, isNativeSpinButton()); |
| 79 DEFINE_AX_OBJECT_TYPE_CASTS(AXSpinButtonPart, isSpinButtonPart()); | 79 DEFINE_AX_OBJECT_TYPE_CASTS(AXSpinButtonPart, isSpinButtonPart()); |
| 80 | 80 |
| 81 } // namespace blink | 81 } // namespace blink |
| 82 | 82 |
| 83 #endif // AXSpinButton_h | 83 #endif // AXSpinButton_h |
| OLD | NEW |