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

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

Issue 845103003: ASSERTION FAILED: !node || isElementOfType<const T>(*node) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modified as per review comments Created 5 years, 11 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
« no previous file with comments | « no previous file | 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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 366
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 Node* tableNode = table->node();
377 if (!isHTMLTableElement(tableNode))
378 return;
379
376 // Add caption 380 // Add caption
377 if (HTMLTableElement* tableElement = toHTMLTableElement(table->node())) { 381 if (HTMLTableCaptionElement* caption = toHTMLTableElement(tableNode)->capti on()) {
378 if (HTMLTableCaptionElement* caption = tableElement->caption()) { 382 AXObject* captionObject = axCache->getOrCreate(caption);
379 AXObject* captionObject = axCache->getOrCreate(caption); 383 if (!captionObject->accessibilityIsIgnored())
380 if (!captionObject->accessibilityIsIgnored()) 384 m_children.append(captionObject);
381 m_children.append(captionObject);
382 }
383 } 385 }
384 386
385 // Go through all the available sections to pull out the rows and add them a s children. 387 // Go through all the available sections to pull out the rows and add them a s children.
386 table->recalcSectionsIfNeeded(); 388 table->recalcSectionsIfNeeded();
387 RenderTableSection* tableSection = table->topSection(); 389 RenderTableSection* tableSection = table->topSection();
388 if (!tableSection) 390 if (!tableSection)
389 return; 391 return;
390 392
391 RenderTableSection* initialTableSection = tableSection; 393 RenderTableSection* initialTableSection = tableSection;
392 while (tableSection) { 394 while (tableSection) {
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 } 595 }
594 596
595 // try the standard 597 // try the standard
596 if (title.isEmpty()) 598 if (title.isEmpty())
597 title = AXRenderObject::title(); 599 title = AXRenderObject::title();
598 600
599 return title; 601 return title;
600 } 602 }
601 603
602 } // namespace blink 604 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698