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

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

Issue 2772913003: AXObject::performDefaultAction() should focus if it can't click (Closed)
Patch Set: Add test Created 3 years, 9 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 | « third_party/WebKit/Source/modules/accessibility/AXSpinButton.h ('k') | no next file » | 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 if (m_isIncrementor) { 121 if (m_isIncrementor) {
122 outBoundsInContainer.setHeight(outBoundsInContainer.height() / 2); 122 outBoundsInContainer.setHeight(outBoundsInContainer.height() / 2);
123 } else { 123 } else {
124 outBoundsInContainer.setY(outBoundsInContainer.y() + 124 outBoundsInContainer.setY(outBoundsInContainer.y() +
125 outBoundsInContainer.height() / 2); 125 outBoundsInContainer.height() / 2);
126 outBoundsInContainer.setHeight(outBoundsInContainer.height() / 2); 126 outBoundsInContainer.setHeight(outBoundsInContainer.height() / 2);
127 } 127 }
128 *outContainer = parentObject(); 128 *outContainer = parentObject();
129 } 129 }
130 130
131 bool AXSpinButtonPart::press() const { 131 bool AXSpinButtonPart::press() {
132 if (!m_parent || !m_parent->isSpinButton()) 132 if (!m_parent || !m_parent->isSpinButton())
133 return false; 133 return false;
134 134
135 AXSpinButton* spinButton = toAXSpinButton(parentObject()); 135 AXSpinButton* spinButton = toAXSpinButton(parentObject());
136 if (m_isIncrementor) 136 if (m_isIncrementor)
137 spinButton->step(1); 137 spinButton->step(1);
138 else 138 else
139 spinButton->step(-1); 139 spinButton->step(-1);
140 140
141 return true; 141 return true;
142 } 142 }
143 143
144 } // namespace blink 144 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXSpinButton.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698