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

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

Issue 2907133002: Move WebAXObject.cpp to core/ (WIP) (Closed)
Patch Set: Created 3 years, 6 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
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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 return header_container_.Get(); 451 return header_container_.Get();
452 452
453 AXMockObject* table_header = 453 AXMockObject* table_header =
454 ToAXMockObject(AxObjectCache().GetOrCreate(kTableHeaderContainerRole)); 454 ToAXMockObject(AxObjectCache().GetOrCreate(kTableHeaderContainerRole));
455 table_header->SetParent(this); 455 table_header->SetParent(this);
456 456
457 header_container_ = table_header; 457 header_container_ = table_header;
458 return header_container_.Get(); 458 return header_container_.Get();
459 } 459 }
460 460
461 const AXObjectImpl::AXObjectVector& AXTable::Columns() { 461 const AXObjectImpl::AXObjectImplVector& AXTable::Columns() {
462 UpdateChildrenIfNecessary(); 462 UpdateChildrenIfNecessary();
463 463
464 return columns_; 464 return columns_;
465 } 465 }
466 466
467 const AXObjectImpl::AXObjectVector& AXTable::Rows() { 467 const AXObjectImpl::AXObjectImplVector& AXTable::Rows() {
468 UpdateChildrenIfNecessary(); 468 UpdateChildrenIfNecessary();
469 469
470 return rows_; 470 return rows_;
471 } 471 }
472 472
473 void AXTable::ColumnHeaders(AXObjectVector& headers) { 473 void AXTable::ColumnHeaders(AXObjectImplVector& headers) {
474 if (!layout_object_) 474 if (!layout_object_)
475 return; 475 return;
476 476
477 UpdateChildrenIfNecessary(); 477 UpdateChildrenIfNecessary();
478 unsigned column_count = columns_.size(); 478 unsigned column_count = columns_.size();
479 for (unsigned c = 0; c < column_count; c++) { 479 for (unsigned c = 0; c < column_count; c++) {
480 AXObjectImpl* column = columns_[c].Get(); 480 AXObjectImpl* column = columns_[c].Get();
481 if (column->IsTableCol()) 481 if (column->IsTableCol())
482 ToAXTableColumn(column)->HeaderObjectsForColumn(headers); 482 ToAXTableColumn(column)->HeaderObjectsForColumn(headers);
483 } 483 }
484 } 484 }
485 485
486 void AXTable::RowHeaders(AXObjectVector& headers) { 486 void AXTable::RowHeaders(AXObjectImplVector& headers) {
487 if (!layout_object_) 487 if (!layout_object_)
488 return; 488 return;
489 489
490 UpdateChildrenIfNecessary(); 490 UpdateChildrenIfNecessary();
491 unsigned row_count = rows_.size(); 491 unsigned row_count = rows_.size();
492 for (unsigned r = 0; r < row_count; r++) { 492 for (unsigned r = 0; r < row_count; r++) {
493 AXObjectImpl* row = rows_[r].Get(); 493 AXObjectImpl* row = rows_[r].Get();
494 if (row->IsTableRow()) 494 if (row->IsTableRow())
495 ToAXTableRow(rows_[r].Get())->HeaderObjectsForRow(headers); 495 ToAXTableRow(rows_[r].Get())->HeaderObjectsForRow(headers);
496 } 496 }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 } 606 }
607 607
608 DEFINE_TRACE(AXTable) { 608 DEFINE_TRACE(AXTable) {
609 visitor->Trace(rows_); 609 visitor->Trace(rows_);
610 visitor->Trace(columns_); 610 visitor->Trace(columns_);
611 visitor->Trace(header_container_); 611 visitor->Trace(header_container_);
612 AXLayoutObject::Trace(visitor); 612 AXLayoutObject::Trace(visitor);
613 } 613 }
614 614
615 } // namespace blink 615 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698