Changeset 53384 in webkit


Ignore:
Timestamp:
Jan 17, 2010 6:47:00 PM (14 years ago)
Author:
mjs@apple.com
Message:

2010-01-17 Maciej Stachowiak <mjs@apple.com>

Reviewed by Dan Bernstein.

Avoid slow access to AX objects on attribute access when AX is off
https://bugs.webkit.org/show_bug.cgi?id=33779

~4% Dromaeo attributes test speedup

  • dom/Element.cpp: (WebCore::Element::updateAfterAttributeChanged): Don't do expensive lookup of AX object cache unless accessibility is on and an AX-related attribute is changed.
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r53373 r53384  
     12010-01-17  Maciej Stachowiak  <mjs@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Avoid slow access to AX objects on attribute access when AX is off
     6        https://bugs.webkit.org/show_bug.cgi?id=33779
     7
     8        ~4% Dromaeo attributes test speedup
     9
     10        * dom/Element.cpp:
     11        (WebCore::Element::updateAfterAttributeChanged): Don't do expensive lookup of
     12        AX object cache unless accessibility is on and an AX-related attribute is
     13        changed.
     14
    1152010-01-17  Kevin Watters  <kevinwatters@gmail.com>
    216
  • trunk/WebCore/dom/Element.cpp

    r53363 r53384  
    594594void Element::updateAfterAttributeChanged(Attribute* attr)
    595595{
    596     AXObjectCache* axObjectCache = document()->axObjectCache();
    597     if (!axObjectCache->accessibilityEnabled())
     596    if (!AXObjectCache::accessibilityEnabled())
    598597        return;
    599598
     
    601600    if (attrName == aria_activedescendantAttr) {
    602601        // any change to aria-activedescendant attribute triggers accessibility focus change, but document focus remains intact
    603         axObjectCache->handleActiveDescendantChanged(renderer());
     602        document()->axObjectCache()->handleActiveDescendantChanged(renderer());
    604603    } else if (attrName == roleAttr) {
    605604        // the role attribute can change at any time, and the AccessibilityObject must pick up these changes
    606         axObjectCache->handleAriaRoleChanged(renderer());
     605        document()->axObjectCache()->handleAriaRoleChanged(renderer());
    607606    } else if (attrName == aria_valuenowAttr) {
    608607        // If the valuenow attribute changes, AX clients need to be notified.
    609         axObjectCache->postNotification(renderer(), AXObjectCache::AXValueChanged, true);
     608        document()->axObjectCache()->postNotification(renderer(), AXObjectCache::AXValueChanged, true);
    610609    } else if (attrName == aria_labelAttr || attrName == aria_labeledbyAttr || attrName == altAttr || attrName == titleAttr) {
    611610        // If the content of an element changes due to an attribute change, notify accessibility.
    612         axObjectCache->contentChanged(renderer());
     611        document()->axObjectCache()->contentChanged(renderer());
    613612    }
    614613}
Note: See TracChangeset for help on using the changeset viewer.