| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 Vector<FloatQuad> quads; | 55 Vector<FloatQuad> quads; |
| 56 m_spinButtonElement->renderer()->absoluteFocusRingQuads(quads); | 56 m_spinButtonElement->renderer()->absoluteFocusRingQuads(quads); |
| 57 | 57 |
| 58 return boundingBoxForQuads(m_spinButtonElement->renderer(), quads); | 58 return boundingBoxForQuads(m_spinButtonElement->renderer(), quads); |
| 59 } | 59 } |
| 60 | 60 |
| 61 void AXSpinButton::addChildren() | 61 void AXSpinButton::addChildren() |
| 62 { | 62 { |
| 63 m_haveChildren = true; | 63 m_haveChildren = true; |
| 64 | 64 |
| 65 AXSpinButtonPart* incrementor = static_cast<AXSpinButtonPart*>(axObjectCache
()->getOrCreate(SpinButtonPartRole)); | 65 AXSpinButtonPart* incrementor = toAXSpinButtonPart(axObjectCache()->getOrCre
ate(SpinButtonPartRole)); |
| 66 incrementor->setIsIncrementor(true); | 66 incrementor->setIsIncrementor(true); |
| 67 incrementor->setParent(this); | 67 incrementor->setParent(this); |
| 68 m_children.append(incrementor); | 68 m_children.append(incrementor); |
| 69 | 69 |
| 70 AXSpinButtonPart* decrementor = static_cast<AXSpinButtonPart*>(axObjectCache
()->getOrCreate(SpinButtonPartRole)); | 70 AXSpinButtonPart* decrementor = toAXSpinButtonPart(axObjectCache()->getOrCre
ate(SpinButtonPartRole)); |
| 71 decrementor->setIsIncrementor(false); | 71 decrementor->setIsIncrementor(false); |
| 72 decrementor->setParent(this); | 72 decrementor->setParent(this); |
| 73 m_children.append(decrementor); | 73 m_children.append(decrementor); |
| 74 } | 74 } |
| 75 | 75 |
| 76 void AXSpinButton::step(int amount) | 76 void AXSpinButton::step(int amount) |
| 77 { | 77 { |
| 78 ASSERT(m_spinButtonElement); | 78 ASSERT(m_spinButtonElement); |
| 79 if (!m_spinButtonElement) | 79 if (!m_spinButtonElement) |
| 80 return; | 80 return; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 AXSpinButton* spinButton = toAXSpinButton(parentObject()); | 118 AXSpinButton* spinButton = toAXSpinButton(parentObject()); |
| 119 if (m_isIncrementor) | 119 if (m_isIncrementor) |
| 120 spinButton->step(1); | 120 spinButton->step(1); |
| 121 else | 121 else |
| 122 spinButton->step(-1); | 122 spinButton->step(-1); |
| 123 | 123 |
| 124 return true; | 124 return true; |
| 125 } | 125 } |
| 126 | 126 |
| 127 } // namespace WebCore | 127 } // namespace WebCore |
| OLD | NEW |