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

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

Issue 1435113003: Make use of new AX name calc in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ChromeVox and Automation API tests Created 5 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
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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 return false; 561 return false;
562 if (decision == IgnoreObject) 562 if (decision == IgnoreObject)
563 return true; 563 return true;
564 564
565 if (!isAXTable()) 565 if (!isAXTable())
566 return AXLayoutObject::computeAccessibilityIsIgnored(ignoredReasons); 566 return AXLayoutObject::computeAccessibilityIsIgnored(ignoredReasons);
567 567
568 return false; 568 return false;
569 } 569 }
570 570
571 String AXTable::deprecatedTitle(TextUnderElementMode mode) const
572 {
573 if (!isAXTable())
574 return AXLayoutObject::deprecatedTitle(mode);
575
576 String title;
577 if (!m_layoutObject)
578 return title;
579
580 // see if there is a caption
581 Node* tableElement = m_layoutObject->node();
582 if (isHTMLTableElement(tableElement)) {
583 HTMLTableCaptionElement* caption = toHTMLTableElement(tableElement)->cap tion();
584 if (caption)
585 title = caption->innerText();
586 }
587
588 // try the standard
589 if (title.isEmpty())
590 title = AXLayoutObject::deprecatedTitle(mode);
591
592 return title;
593 }
594
595 DEFINE_TRACE(AXTable) 571 DEFINE_TRACE(AXTable)
596 { 572 {
597 visitor->trace(m_rows); 573 visitor->trace(m_rows);
598 visitor->trace(m_columns); 574 visitor->trace(m_columns);
599 visitor->trace(m_headerContainer); 575 visitor->trace(m_headerContainer);
600 AXLayoutObject::trace(visitor); 576 AXLayoutObject::trace(visitor);
601 } 577 }
602 578
603 } // namespace blink 579 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698