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

Side by Side Diff: Source/modules/accessibility/AXRenderObject.cpp

Issue 718403002: Input type number should return Spinbuttonrole from blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: adding layout test in testexpectations Created 6 years, 1 month 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 | « LayoutTests/TestExpectations ('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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 return ImageRole; 297 return ImageRole;
298 } 298 }
299 299
300 // Note: if JavaScript is disabled, the renderer won't be a RenderHTMLCanvas . 300 // Note: if JavaScript is disabled, the renderer won't be a RenderHTMLCanvas .
301 if (isHTMLCanvasElement(node) && m_renderer->isCanvas()) 301 if (isHTMLCanvasElement(node) && m_renderer->isCanvas())
302 return CanvasRole; 302 return CanvasRole;
303 303
304 if (cssBox && cssBox->isRenderView()) 304 if (cssBox && cssBox->isRenderView())
305 return WebAreaRole; 305 return WebAreaRole;
306 306
307 if (cssBox && cssBox->isTextField())
308 return TextFieldRole;
309
310 if (cssBox && cssBox->isTextArea()) 307 if (cssBox && cssBox->isTextArea())
311 return TextAreaRole; 308 return TextAreaRole;
312 309
313 if (isHTMLInputElement(node)) { 310 if (isHTMLInputElement(node)) {
314 HTMLInputElement& input = toHTMLInputElement(*node); 311 HTMLInputElement& input = toHTMLInputElement(*node);
315 const AtomicString& type = input.type(); 312 const AtomicString& type = input.type();
316 if (type == InputTypeNames::button) { 313 if (type == InputTypeNames::button) {
317 if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) || (parentObject() && parentObject()->roleValue() == MenuRole)) 314 if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) || (parentObject() && parentObject()->roleValue() == MenuRole))
318 return MenuItemRole; 315 return MenuItemRole;
319 return buttonRoleType(); 316 return buttonRoleType();
(...skipping 16 matching lines...) Expand all
336 return RadioButtonRole; 333 return RadioButtonRole;
337 } 334 }
338 if (type == InputTypeNames::number) 335 if (type == InputTypeNames::number)
339 return SpinButtonRole; 336 return SpinButtonRole;
340 if (input.isTextButton()) 337 if (input.isTextButton())
341 return buttonRoleType(); 338 return buttonRoleType();
342 if (type == InputTypeNames::color) 339 if (type == InputTypeNames::color)
343 return ColorWellRole; 340 return ColorWellRole;
344 if (type == InputTypeNames::time) 341 if (type == InputTypeNames::time)
345 return TimeRole; 342 return TimeRole;
343 return TextFieldRole;
346 } 344 }
347 345
348 if (isFileUploadButton()) 346 if (isFileUploadButton())
349 return ButtonRole; 347 return ButtonRole;
350 348
351 if (cssBox && cssBox->isMenuList()) 349 if (cssBox && cssBox->isMenuList())
352 return PopUpButtonRole; 350 return PopUpButtonRole;
353 351
354 if (headingLevel()) 352 if (headingLevel())
355 return HeadingRole; 353 return HeadingRole;
(...skipping 2087 matching lines...) Expand 10 before | Expand all | Expand 10 after
2443 if (label && label->renderer()) { 2441 if (label && label->renderer()) {
2444 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); 2442 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect();
2445 result.unite(labelRect); 2443 result.unite(labelRect);
2446 } 2444 }
2447 } 2445 }
2448 2446
2449 return result; 2447 return result;
2450 } 2448 }
2451 2449
2452 } // namespace blink 2450 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698