⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 159295 in webkit


Ignore:
Timestamp:
Nov 14, 2013, 10:57:11 AM (13 years ago)
Author:
Samuel White
Message:

AX: Calling NSAccessibilityColumnsAttribute and NSAccessibilityRowsAttribute simply to get column/row count can be very expensive.
​https://bugs.webkit.org/show_bug.cgi?id=124293

Reviewed by Chris Fleizach.

Source/WebCore:

Added ability to get accessibility table column or row count without fetching all columns or rows.

Test: platform/mac/accessibility/table-column-and-row-count.html

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

LayoutTests:

Added test to ensure NSAccessibilityColumnsAttribute and NSAccessibilityRowsAttribute
behave as expected. Also updated existing table tests to reflect this additional API.

  • platform/mac/accessibility/table-column-and-row-count-expected.txt: Added.
  • platform/mac/accessibility/table-column-and-row-count.html: Added.
  • platform/mac/accessibility/table-detection-expected.txt:
  • platform/mac/accessibility/table-with-rules-expected.txt:
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r159292 r159295  
     12013-11-14  Samuel White  <samuel_white@apple.com>
     2
     3        AX: Calling NSAccessibilityColumnsAttribute and NSAccessibilityRowsAttribute simply to get column/row count can be very expensive.
     4        https://bugs.webkit.org/show_bug.cgi?id=124293
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Added test to ensure NSAccessibilityColumnsAttribute and NSAccessibilityRowsAttribute
     9        behave as expected. Also updated existing table tests to reflect this additional API.
     10
     11        * platform/mac/accessibility/table-column-and-row-count-expected.txt: Added.
     12        * platform/mac/accessibility/table-column-and-row-count.html: Added.
     13        * platform/mac/accessibility/table-detection-expected.txt:
     14        * platform/mac/accessibility/table-with-rules-expected.txt:
     15
    1162013-11-14  Alexey Proskuryakov  <ap@apple.com>
    217
  • trunk/LayoutTests/platform/mac/accessibility/table-detection-expected.txt

    r156011 r159295  
    3434AXRowHeaderUIElements: <array of size 0>
    3535AXHeader: <AXTable>
     36AXColumnCount: 2
     37AXRowCount: 2
    3638AXElementBusy: 0
    3739
    … …  
    7476AXRowHeaderUIElements: <array of size 0>
    7577AXHeader: <AXTable>
     78AXColumnCount: 2
     79AXRowCount: 1
    7680AXElementBusy: 0
    7781
    … …  
    145149AXRowHeaderUIElements: <array of size 0>
    146150AXHeader: <AXTable>
     151AXColumnCount: 2
     152AXRowCount: 1
    147153AXElementBusy: 0
    148154
    … …  
    184190AXRowHeaderUIElements: <array of size 0>
    185191AXHeader: <AXTable>
     192AXColumnCount: 2
     193AXRowCount: 1
    186194AXElementBusy: 0
    187195
    … …  
    223231AXRowHeaderUIElements: <array of size 0>
    224232AXHeader: <AXTable>
     233AXColumnCount: 2
     234AXRowCount: 2
    225235AXElementBusy: 0
    226236
    … …  
    263273AXRowHeaderUIElements: <array of size 0>
    264274AXHeader: <AXTable>
     275AXColumnCount: 2
     276AXRowCount: 1
    265277AXElementBusy: 0
    266278
    … …  
    366378AXRowHeaderUIElements: <array of size 0>
    367379AXHeader: <AXTable>
     380AXColumnCount: 2
     381AXRowCount: 1
    368382AXElementBusy: 0
    369383
    … …  
    475489AXRowHeaderUIElements: <array of size 0>
    476490AXHeader: <AXTable>
     491AXColumnCount: 2
     492AXRowCount: 1
    477493AXElementBusy: 0
    478494
    … …  
    514530AXRowHeaderUIElements: <array of size 0>
    515531AXHeader: <AXTable>
     532AXColumnCount: 2
     533AXRowCount: 2
    516534AXElementBusy: 0
    517535
    … …  
    587605AXRowHeaderUIElements: <array of size 0>
    588606AXHeader: <AXTable>
     607AXColumnCount: 2
     608AXRowCount: 3
    589609AXElementBusy: 0
    590610
    … …  
    628648AXRowHeaderUIElements: <array of size 0>
    629649AXHeader: <AXTable>
     650AXColumnCount: 2
     651AXRowCount: 3
    630652AXElementBusy: 0
    631653
    … …  
    669691AXRowHeaderUIElements: <array of size 0>
    670692AXHeader: <AXTable>
     693AXColumnCount: 2
     694AXRowCount: 2
    671695AXElementBusy: 0
    672696
    … …  
    709733AXRowHeaderUIElements: <array of size 0>
    710734AXHeader: <AXTable>
    711 AXElementBusy: 0
    712 
    713 
    714 asdf
    715 asdf
    716 asdf
    717 asdf
    718 asdf
    719 asdf
    720 asdf
    721 asdf
    722 asdf
    723 asdf
    724 asdf
    725 asdf
    726 asdf
    727 asdf
    728 asdf
    729 asdf
    730 asdf
    731 asdf
    732 asdf
    733 asdf
    734 asdf
    735 asdf
    736 asdf
    737 asdf
    738 
     735AXColumnCount: 1
     736AXRowCount: 24
     737AXElementBusy: 0
     738
     739
     740asdf
     741asdf
     742asdf
     743asdf
     744asdf
     745asdf
     746asdf
     747asdf
     748asdf
     749asdf
     750asdf
     751asdf
     752asdf
     753asdf
     754asdf
     755asdf
     756asdf
     757asdf
     758asdf
     759asdf
     760asdf
     761asdf
     762asdf
     763asdf
     764
  • trunk/LayoutTests/platform/mac/accessibility/table-with-rules-expected.txt

    r156011 r159295  
    3838AXRowHeaderUIElements: <array of size 0>
    3939AXHeader: <AXTable>
     40AXColumnCount: 2
     41AXRowCount: 1
    4042AXElementBusy: 0
    4143
    … …  
    7375AXRowHeaderUIElements: <array of size 0>
    7476AXHeader: <AXTable>
     77AXColumnCount: 2
     78AXRowCount: 1
    7579AXElementBusy: 0
    7680
    … …  
    108112AXRowHeaderUIElements: <array of size 0>
    109113AXHeader: <AXTable>
     114AXColumnCount: 2
     115AXRowCount: 1
    110116AXElementBusy: 0
    111117
  • trunk/Source/WebCore/ChangeLog

    r159292 r159295  
     12013-11-14  Samuel White  <samuel_white@apple.com>
     2
     3        AX: Calling NSAccessibilityColumnsAttribute and NSAccessibilityRowsAttribute simply to get column/row count can be very expensive.
     4        https://bugs.webkit.org/show_bug.cgi?id=124293
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Added ability to get accessibility table column or row count without fetching all columns or rows.
     9
     10        Test: platform/mac/accessibility/table-column-and-row-count.html
     11
     12        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
     13        (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
     14        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
     15
    1162013-11-14  Alexey Proskuryakov  <ap@apple.com>
    217
  • trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

    r159026 r159295  
    13101310        [tempArray addObject:NSAccessibilityRowHeaderUIElementsAttribute];
    13111311        [tempArray addObject:NSAccessibilityHeaderAttribute];
     1312        [tempArray addObject:NSAccessibilityColumnCountAttribute];
     1313        [tempArray addObject:NSAccessibilityRowCountAttribute];
    13121314        tableAttrs = [[NSArray alloc] initWithArray:tempArray];
    13131315        [tempArray release];
    … …  
    23982400            return convertToNSArray(cells);
    23992401        }
     2402       
     2403        if ([attributeName isEqualToString:NSAccessibilityColumnCountAttribute])
     2404            return @(toAccessibilityTable(m_object)->columnCount());
     2405       
     2406        if ([attributeName isEqualToString:NSAccessibilityRowCountAttribute])
     2407            return @(toAccessibilityTable(m_object)->rowCount());
    24002408    }
    24012409   
Note: See TracChangeset for help on using the changeset viewer.