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

Side by Side Diff: Source/core/accessibility/AXSpinButton.cpp

Issue 370073002: Use type cast macro for AnimatableLengthPoint|3D instead of manual toFoo() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 years, 5 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
« no previous file with comments | « no previous file | Source/core/accessibility/AXTable.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/accessibility/AXTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698