| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 m_spinButtonElement = nullptr; | 73 m_spinButtonElement = nullptr; |
| 74 } | 74 } |
| 75 | 75 |
| 76 AccessibilityRole AXSpinButton::roleValue() const | 76 AccessibilityRole AXSpinButton::roleValue() const |
| 77 { | 77 { |
| 78 return m_spinButtonElement ? SpinButtonRole : UnknownRole; | 78 return m_spinButtonElement ? SpinButtonRole : UnknownRole; |
| 79 } | 79 } |
| 80 | 80 |
| 81 void AXSpinButton::addChildren() | 81 void AXSpinButton::addChildren() |
| 82 { | 82 { |
| 83 ASSERT(!isDetached()); |
| 83 m_haveChildren = true; | 84 m_haveChildren = true; |
| 84 | 85 |
| 85 AXSpinButtonPart* incrementor = toAXSpinButtonPart(axObjectCache().getOrCrea
te(SpinButtonPartRole)); | 86 AXSpinButtonPart* incrementor = toAXSpinButtonPart(axObjectCache().getOrCrea
te(SpinButtonPartRole)); |
| 86 incrementor->setIsIncrementor(true); | 87 incrementor->setIsIncrementor(true); |
| 87 incrementor->setParent(this); | 88 incrementor->setParent(this); |
| 88 m_children.append(incrementor); | 89 m_children.append(incrementor); |
| 89 | 90 |
| 90 AXSpinButtonPart* decrementor = toAXSpinButtonPart(axObjectCache().getOrCrea
te(SpinButtonPartRole)); | 91 AXSpinButtonPart* decrementor = toAXSpinButtonPart(axObjectCache().getOrCrea
te(SpinButtonPartRole)); |
| 91 decrementor->setIsIncrementor(false); | 92 decrementor->setIsIncrementor(false); |
| 92 decrementor->setParent(this); | 93 decrementor->setParent(this); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 AXSpinButton* spinButton = toAXSpinButton(parentObject()); | 140 AXSpinButton* spinButton = toAXSpinButton(parentObject()); |
| 140 if (m_isIncrementor) | 141 if (m_isIncrementor) |
| 141 spinButton->step(1); | 142 spinButton->step(1); |
| 142 else | 143 else |
| 143 spinButton->step(-1); | 144 spinButton->step(-1); |
| 144 | 145 |
| 145 return true; | 146 return true; |
| 146 } | 147 } |
| 147 | 148 |
| 148 } // namespace blink | 149 } // namespace blink |
| OLD | NEW |