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

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

Issue 2393003002: reflow comments in modules/accessiblity (Closed)
Patch Set: Created 4 years, 2 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 AXObject** outContainer, 105 AXObject** outContainer,
106 FloatRect& outBoundsInContainer, 106 FloatRect& outBoundsInContainer,
107 SkMatrix44& outContainerTransform) const { 107 SkMatrix44& outContainerTransform) const {
108 *outContainer = nullptr; 108 *outContainer = nullptr;
109 outBoundsInContainer = FloatRect(); 109 outBoundsInContainer = FloatRect();
110 outContainerTransform.setIdentity(); 110 outContainerTransform.setIdentity();
111 111
112 if (!parentObject()) 112 if (!parentObject())
113 return; 113 return;
114 114
115 // FIXME: This logic should exist in the layout tree or elsewhere, but there i s no 115 // FIXME: This logic should exist in the layout tree or elsewhere, but there
116 // relationship that exists that can be queried. 116 // is no relationship that exists that can be queried.
117 parentObject()->getRelativeBounds(outContainer, outBoundsInContainer, 117 parentObject()->getRelativeBounds(outContainer, outBoundsInContainer,
118 outContainerTransform); 118 outContainerTransform);
119 outBoundsInContainer = FloatRect(0, 0, outBoundsInContainer.width(), 119 outBoundsInContainer = FloatRect(0, 0, outBoundsInContainer.width(),
120 outBoundsInContainer.height()); 120 outBoundsInContainer.height());
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() const {
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

Powered by Google App Engine
This is Rietveld 408576698