Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 367 ASSERT(!m_haveChildren); | 367 ASSERT(!m_haveChildren); |
| 368 | 368 |
| 369 m_haveChildren = true; | 369 m_haveChildren = true; |
| 370 if (!m_renderer || !m_renderer->isTable()) | 370 if (!m_renderer || !m_renderer->isTable()) |
| 371 return; | 371 return; |
| 372 | 372 |
| 373 RenderTable* table = toRenderTable(m_renderer); | 373 RenderTable* table = toRenderTable(m_renderer); |
| 374 AXObjectCacheImpl* axCache = axObjectCache(); | 374 AXObjectCacheImpl* axCache = axObjectCache(); |
| 375 | 375 |
| 376 // Add caption | 376 // Add caption |
| 377 if (HTMLTableElement* tableElement = toHTMLTableElement(table->node())) { | 377 Node* tableNode = table->node(); |
| 378 if (HTMLTableCaptionElement* caption = tableElement->caption()) { | 378 if (isHTMLTableElement(tableNode)) { |
|
dmazzoni
2015/01/14 08:00:02
Just return from this function if isHTMLTableEleme
| |
| 379 if (HTMLTableCaptionElement* caption = toHTMLTableElement(tableNode)->c aption()) { | |
| 379 AXObject* captionObject = axCache->getOrCreate(caption); | 380 AXObject* captionObject = axCache->getOrCreate(caption); |
| 380 if (!captionObject->accessibilityIsIgnored()) | 381 if (!captionObject->accessibilityIsIgnored()) |
| 381 m_children.append(captionObject); | 382 m_children.append(captionObject); |
| 382 } | 383 } |
| 383 } | 384 } |
| 384 | 385 |
| 385 // Go through all the available sections to pull out the rows and add them a s children. | 386 // Go through all the available sections to pull out the rows and add them a s children. |
| 386 table->recalcSectionsIfNeeded(); | 387 table->recalcSectionsIfNeeded(); |
| 387 RenderTableSection* tableSection = table->topSection(); | 388 RenderTableSection* tableSection = table->topSection(); |
| 388 if (!tableSection) | 389 if (!tableSection) |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 593 } | 594 } |
| 594 | 595 |
| 595 // try the standard | 596 // try the standard |
| 596 if (title.isEmpty()) | 597 if (title.isEmpty()) |
| 597 title = AXRenderObject::title(); | 598 title = AXRenderObject::title(); |
| 598 | 599 |
| 599 return title; | 600 return title; |
| 600 } | 601 } |
| 601 | 602 |
| 602 } // namespace blink | 603 } // namespace blink |
| OLD | NEW |