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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXSpinButton.h

Issue 2287433003: Get rid of remaining uses of AXObject::elementRect (Closed)
Patch Set: Rebase Created 4 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
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698