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

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 issue with ariaTextAlternative 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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 return false; 562 return false;
563 if (decision == IgnoreObject) 563 if (decision == IgnoreObject)
564 return true; 564 return true;
565 565
566 if (!isAXTable()) 566 if (!isAXTable())
567 return AXLayoutObject::computeAccessibilityIsIgnored(ignoredReasons); 567 return AXLayoutObject::computeAccessibilityIsIgnored(ignoredReasons);
568 568
569 return false; 569 return false;
570 } 570 }
571 571
572 String AXTable::deprecatedTitle(TextUnderElementMode mode) const
573 {
574 if (!isAXTable())
575 return AXLayoutObject::deprecatedTitle(mode);
576
577 String title;
578 if (!m_layoutObject)
579 return title;
580
581 // see if there is a caption
582 Node* tableElement = m_layoutObject->node();
583 if (isHTMLTableElement(tableElement)) {
584 HTMLTableCaptionElement* caption = toHTMLTableElement(tableElement)->cap tion();
585 if (caption)
586 title = caption->innerText();
587 }
588
589 // try the standard
590 if (title.isEmpty())
591 title = AXLayoutObject::deprecatedTitle(mode);
592
593 return title;
594 }
595
596 DEFINE_TRACE(AXTable) 572 DEFINE_TRACE(AXTable)
597 { 573 {
598 visitor->trace(m_rows); 574 visitor->trace(m_rows);
599 visitor->trace(m_columns); 575 visitor->trace(m_columns);
600 visitor->trace(m_headerContainer); 576 visitor->trace(m_headerContainer);
601 AXLayoutObject::trace(visitor); 577 AXLayoutObject::trace(visitor);
602 } 578 }
603 579
604 } // namespace blink 580 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698