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

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

Issue 347773002: Implement select listbox using shadow DOM (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/accessibility/AXListBoxOption.cpp ('k') | Source/core/css/CSSSelector.h » ('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) 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 return AXARIAGrid::create(renderer); 283 return AXARIAGrid::create(renderer);
284 if (nodeHasRole(node, "row")) 284 if (nodeHasRole(node, "row"))
285 return AXARIAGridRow::create(renderer); 285 return AXARIAGridRow::create(renderer);
286 if (nodeHasRole(node, "gridcell") || nodeHasRole(node, "columnheader") || no deHasRole(node, "rowheader")) 286 if (nodeHasRole(node, "gridcell") || nodeHasRole(node, "columnheader") || no deHasRole(node, "rowheader"))
287 return AXARIAGridCell::create(renderer); 287 return AXARIAGridCell::create(renderer);
288 288
289 // media controls 289 // media controls
290 if (node && node->isMediaControlElement()) 290 if (node && node->isMediaControlElement())
291 return AccessibilityMediaControl::create(renderer); 291 return AccessibilityMediaControl::create(renderer);
292 292
293 if (isHTMLOptionElement(node))
294 return AXListBoxOption::create(renderer);
295
293 if (renderer->isSVGRoot()) 296 if (renderer->isSVGRoot())
294 return AXSVGRoot::create(renderer); 297 return AXSVGRoot::create(renderer);
295 298
296 if (renderer->isBoxModelObject()) { 299 if (renderer->isBoxModelObject()) {
297 RenderBoxModelObject* cssBox = toRenderBoxModelObject(renderer); 300 RenderBoxModelObject* cssBox = toRenderBoxModelObject(renderer);
298 if (cssBox->isListBox()) 301 if (cssBox->isListBox())
299 return AXListBox::create(toRenderListBox(cssBox)); 302 return AXListBox::create(toRenderListBox(cssBox));
300 if (cssBox->isMenuList()) 303 if (cssBox->isMenuList())
301 return AXMenuList::create(toRenderMenuList(cssBox)); 304 return AXMenuList::create(toRenderMenuList(cssBox));
302 305
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 456
454 return getOrCreate(m_document.view()); 457 return getOrCreate(m_document.view());
455 } 458 }
456 459
457 AXObject* AXObjectCache::getOrCreate(AccessibilityRole role) 460 AXObject* AXObjectCache::getOrCreate(AccessibilityRole role)
458 { 461 {
459 RefPtr<AXObject> obj = nullptr; 462 RefPtr<AXObject> obj = nullptr;
460 463
461 // will be filled in... 464 // will be filled in...
462 switch (role) { 465 switch (role) {
463 case ListBoxOptionRole:
464 obj = AXListBoxOption::create();
465 break;
466 case ImageMapLinkRole: 466 case ImageMapLinkRole:
467 obj = AXImageMapLink::create(); 467 obj = AXImageMapLink::create();
468 break; 468 break;
469 case ColumnRole: 469 case ColumnRole:
470 obj = AXTableColumn::create(); 470 obj = AXTableColumn::create();
471 break; 471 break;
472 case TableHeaderContainerRole: 472 case TableHeaderContainerRole:
473 obj = AXTableHeaderContainer::create(); 473 obj = AXTableHeaderContainer::create();
474 break; 474 break;
475 case SliderThumbRole: 475 case SliderThumbRole:
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 void AXObjectCache::setCanvasObjectBounds(Element* element, const LayoutRect& re ct) 1021 void AXObjectCache::setCanvasObjectBounds(Element* element, const LayoutRect& re ct)
1022 { 1022 {
1023 AXObject* obj = getOrCreate(element); 1023 AXObject* obj = getOrCreate(element);
1024 if (!obj) 1024 if (!obj)
1025 return; 1025 return;
1026 1026
1027 obj->setElementRect(rect); 1027 obj->setElementRect(rect);
1028 } 1028 }
1029 1029
1030 } // namespace WebCore 1030 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/accessibility/AXListBoxOption.cpp ('k') | Source/core/css/CSSSelector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698