Changeset 91174 in webkit


Ignore:
Timestamp:
Jul 18, 2011 12:34:20 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r91132 and r91135.
http://trac.webkit.org/changeset/91132
http://trac.webkit.org/changeset/91135
https://bugs.webkit.org/show_bug.cgi?id=64681

Broke GTK and Chromium debug bots (Requested by rniwa on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-07-18

Source/WebCore:

  • accessibility/AXObjectCache.h:
  • accessibility/AccessibilityMenuList.cpp:
  • accessibility/AccessibilityMenuList.h:
  • accessibility/AccessibilityMenuListPopup.cpp:
  • accessibility/AccessibilityMenuListPopup.h:
  • accessibility/chromium/AXObjectCacheChromium.cpp:

(WebCore::AXObjectCache::postPlatformNotification):

  • accessibility/win/AXObjectCacheWin.cpp:

(WebCore::AXObjectCache::postPlatformNotification):

  • dom/SelectElement.cpp:

(WebCore::SelectElement::setSelectedIndex):

  • rendering/RenderMenuList.cpp:

(WebCore::RenderMenuList::RenderMenuList):
(WebCore::RenderMenuList::setTextFromOption):
(WebCore::RenderMenuList::didSetSelectedIndex):

  • rendering/RenderMenuList.h:

Tools:

  • DumpRenderTree/AccessibilityController.h:
  • DumpRenderTree/win/AccessibilityControllerWin.cpp:

(AccessibilityController::AccessibilityController):
(AccessibilityController::~AccessibilityController):
(logEventProc):
(AccessibilityController::setLogAccessibilityEvents):
(AccessibilityController::addNotificationListener):

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r91170 r91174  
     12011-07-18  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r91132 and r91135.
     4        http://trac.webkit.org/changeset/91132
     5        http://trac.webkit.org/changeset/91135
     6        https://bugs.webkit.org/show_bug.cgi?id=64681
     7
     8        Broke GTK and Chromium debug bots (Requested by rniwa on
     9        #webkit).
     10
     11        * accessibility/AXObjectCache.h:
     12        * accessibility/AccessibilityMenuList.cpp:
     13        * accessibility/AccessibilityMenuList.h:
     14        * accessibility/AccessibilityMenuListPopup.cpp:
     15        * accessibility/AccessibilityMenuListPopup.h:
     16        * accessibility/chromium/AXObjectCacheChromium.cpp:
     17        (WebCore::AXObjectCache::postPlatformNotification):
     18        * accessibility/win/AXObjectCacheWin.cpp:
     19        (WebCore::AXObjectCache::postPlatformNotification):
     20        * dom/SelectElement.cpp:
     21        (WebCore::SelectElement::setSelectedIndex):
     22        * rendering/RenderMenuList.cpp:
     23        (WebCore::RenderMenuList::RenderMenuList):
     24        (WebCore::RenderMenuList::setTextFromOption):
     25        (WebCore::RenderMenuList::didSetSelectedIndex):
     26        * rendering/RenderMenuList.h:
     27
    1282011-07-17  Luke Macpherson   <macpherson@chromium.org>
    229
  • trunk/Source/WebCore/accessibility/AXObjectCache.h

    r91132 r91174  
    130130        AXScrolledToAnchor,
    131131        AXLiveRegionChanged,
    132         AXMenuListItemSelected,
    133132        AXMenuListValueChanged,
    134133        AXRowCountChanged,
  • trunk/Source/WebCore/accessibility/AccessibilityMenuList.cpp

    r91132 r91174  
    8383}
    8484
    85 void AccessibilityMenuList::didUpdateActiveOption(int optionIndex)
    86 {
    87     const AccessibilityChildrenVector& childObjects = children();
    88     if (childObjects.isEmpty())
    89         return;
    90 
    91     ASSERT(childObjects.size() == 1);
    92     ASSERT(childObjects[0]->isMenuListPopup());
    93 
    94     RefPtr<Document> document = m_renderer->document();
    95     AXObjectCache* cache = document->axObjectCache();
    96 
    97     if (AccessibilityMenuListPopup* popup = static_cast<AccessibilityMenuListPopup*>(childObjects[0].get()))
    98         popup->didUpdateActiveOption(optionIndex);
    99 
    100     cache->postNotification(this, document.get(), AXObjectCache::AXMenuListValueChanged, true, PostSynchronously);
    101 }
    102 
    10385} // namespace WebCore
  • trunk/Source/WebCore/accessibility/AccessibilityMenuList.h

    r91132 r91174  
    4343    virtual bool press() const;
    4444
    45     void didUpdateActiveOption(int optionIndex);
    46 
    4745private:
    4846    AccessibilityMenuList(RenderMenuList*);
  • trunk/Source/WebCore/accessibility/AccessibilityMenuListPopup.cpp

    r91135 r91174  
    124124}
    125125
    126 void AccessibilityMenuListPopup::didUpdateActiveOption(int optionIndex)
    127 {
    128     ASSERT_ARG(optionIndex, optionIndex >= 0);
    129     ASSERT_ARG(optionIndex, optionIndex < static_cast<int>(m_children.size()));
    130 
    131     RefPtr<Document> document = m_menuList->renderer()->document();
    132     AXObjectCache* cache = document->axObjectCache();
    133     RefPtr<AccessibilityObject> child = m_children[optionIndex].get();
    134 
    135     cache->postNotification(child.get(), document.get(), AXObjectCache::AXFocusedUIElementChanged, true, PostSynchronously);
    136     cache->postNotification(child.get(), document.get(), AXObjectCache::AXMenuListItemSelected, true, PostSynchronously);
    137 }
    138 
    139126} // namespace WebCore
  • trunk/Source/WebCore/accessibility/AccessibilityMenuListPopup.h

    r91132 r91174  
    3434class AccessibilityMenuListOption;
    3535class HTMLElement;
    36 class HTMLSelectElement;
    3736
    3837class AccessibilityMenuListPopup : public AccessibilityObject {
     
    4443    virtual bool isEnabled() const;
    4544    virtual bool isOffScreen() const;
    46 
    47     void didUpdateActiveOption(int optionIndex);
    4845
    4946private:
  • trunk/Source/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp

    r91132 r91174  
    8888    case AXLiveRegionChanged:
    8989    case AXLoadComplete:
    90     case AXMenuListItemSelected:
    9190    case AXMenuListValueChanged:
    9291    case AXRowCollapsed:
  • trunk/Source/WebCore/accessibility/win/AXObjectCacheWin.cpp

    r91132 r91174  
    8989            break;
    9090
    91         case AXMenuListItemSelected:
    92             msaaEvent = EVENT_OBJECT_SELECTION;
    93             break;
    94 
    9591        default:
    9692            return;
  • trunk/Source/WebCore/dom/SelectElement.cpp

    r91149 r91174  
    391391        if (renderer) {
    392392            if (data.usesMenuList())
    393                 toRenderMenuList(renderer)->didSetSelectedIndex(listIndex);
     393                toRenderMenuList(renderer)->didSetSelectedIndex();
    394394            else if (renderer->isListBox())
    395395                toRenderListBox(renderer)->selectionChanged();
  • trunk/Source/WebCore/rendering/RenderMenuList.cpp

    r91132 r91174  
    2727
    2828#include "AXObjectCache.h"
    29 #include "AccessibilityMenuList.h"
    3029#include "CSSFontSelector.h"
    3130#include "CSSStyleSelector.h"
     
    5958    , m_optionsChanged(true)
    6059    , m_optionsWidth(0)
    61     , m_lastActiveIndex(-1)
     60    , m_lastSelectedIndex(-1)
    6261    , m_popupIsVisible(false)
    6362{
     
    206205
    207206    setText(text.stripWhiteSpace());
    208     didUpdateActiveOption(optionIndex);
    209207}
    210208
     
    341339#endif
    342340
    343 void RenderMenuList::didSetSelectedIndex(int listIndex)
    344 {
    345     SelectElement* select = toSelectElement(static_cast<Element*>(node()));
    346     didUpdateActiveOption(select->listToOptionIndex(listIndex));
    347 }
    348 
    349 void RenderMenuList::didUpdateActiveOption(int optionIndex)
    350 {
    351     if (!AXObjectCache::accessibilityEnabled())
     341void RenderMenuList::didSetSelectedIndex()
     342{
     343    int index = selectedIndex();
     344    if (m_lastSelectedIndex == index)
    352345        return;
    353346
    354     if (m_lastActiveIndex == optionIndex)
    355         return;
    356     m_lastActiveIndex = optionIndex;
    357 
    358     SelectElement* select = toSelectElement(static_cast<Element*>(node()));
    359     if (optionIndex < 0 || optionIndex > static_cast<int>(select->listItems().size()))
    360         return;
    361 
    362     ASSERT(toOptionElement(select->listItems()[optionIndex]));
    363 
    364     if (AccessibilityMenuList* menuList = static_cast<AccessibilityMenuList*>(document()->axObjectCache()->get(this)))
    365         menuList->didUpdateActiveOption(optionIndex);
     347    m_lastSelectedIndex = index;
     348
     349    if (AXObjectCache::accessibilityEnabled())
     350        document()->axObjectCache()->postNotification(this, AXObjectCache::AXMenuListValueChanged, true, PostSynchronously);
    366351}
    367352
  • trunk/Source/WebCore/rendering/RenderMenuList.h

    r91132 r91174  
    5656    void setOptionsChanged(bool changed) { m_optionsChanged = changed; }
    5757
    58     void didSetSelectedIndex(int listIndex);
     58    void didSetSelectedIndex();
    5959
    6060    String text() const;
     
    125125    void updateOptionsWidth();
    126126
    127     void didUpdateActiveOption(int optionIndex);
    128 
    129127    RenderText* m_buttonText;
    130128    RenderBlock* m_innerBlock;
     
    133131    int m_optionsWidth;
    134132
    135     int m_lastActiveIndex;
     133    int m_lastSelectedIndex;
    136134
    137135    RefPtr<RenderStyle> m_optionStyle;
  • trunk/Tools/ChangeLog

    r91167 r91174  
     12011-07-18  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r91132 and r91135.
     4        http://trac.webkit.org/changeset/91132
     5        http://trac.webkit.org/changeset/91135
     6        https://bugs.webkit.org/show_bug.cgi?id=64681
     7
     8        Broke GTK and Chromium debug bots (Requested by rniwa on
     9        #webkit).
     10
     11        * DumpRenderTree/AccessibilityController.h:
     12        * DumpRenderTree/win/AccessibilityControllerWin.cpp:
     13        (AccessibilityController::AccessibilityController):
     14        (AccessibilityController::~AccessibilityController):
     15        (logEventProc):
     16        (AccessibilityController::setLogAccessibilityEvents):
     17        (AccessibilityController::addNotificationListener):
     18
    1192011-07-17  Philippe Normand  <pnormand@igalia.com>
    220
  • trunk/Tools/DumpRenderTree/AccessibilityController.h

    r91132 r91174  
    6767
    6868    HWINEVENTHOOK m_allEventsHook;
    69     HWINEVENTHOOK m_notificationsEventHook;
    7069    HashMap<PlatformUIElement, JSObjectRef> m_notificationListeners;
    7170#endif
  • trunk/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp

    r91132 r91174  
    4545    , m_valueChangeEventHook(0)
    4646    , m_allEventsHook(0)
    47     , m_notificationsEventHook(0)
    4847{
    4948}
     
    5251{
    5352    setLogFocusEvents(false);
    54     setLogAccessibilityEvents(false);
    5553    setLogValueChangeEvents(false);
    5654
    57     if (m_notificationsEventHook)
    58         UnhookWinEvent(m_notificationsEventHook);
     55    if (m_allEventsHook)
     56        UnhookWinEvent(m_allEventsHook);
    5957
    6058    for (HashMap<PlatformUIElement, JSObjectRef>::iterator it = m_notificationListeners.begin(); it != m_notificationListeners.end(); ++it)
     
    133131            break;
    134132
    135         case EVENT_OBJECT_SELECTION:
    136             printf("Received selection event for object '%S'.\n", name.c_str());
    137             break;
    138 
    139133        case EVENT_OBJECT_VALUECHANGE: {
    140134            BSTR valueBSTR;
     
    220214}
    221215
    222 void AccessibilityController::setLogAccessibilityEvents(bool logAccessibilityEvents)
    223 {
    224     if (!!m_allEventsHook == logAccessibilityEvents)
    225         return;
    226 
    227     if (!logAccessibilityEvents) {
    228         UnhookWinEvent(m_allEventsHook);
    229         m_allEventsHook = 0;
    230         return;
    231     }
    232 
    233     // Ensure that accessibility is initialized for the WebView by querying for
    234     // the root accessible object.
    235     rootElement();
    236 
    237     m_allEventsHook = SetWinEventHook(EVENT_MIN, EVENT_MAX, GetModuleHandle(0), logEventProc, GetCurrentProcessId(), 0, WINEVENT_INCONTEXT);
    238 
    239     ASSERT(m_allEventsHook);
     216void AccessibilityController::setLogAccessibilityEvents(bool)
     217{
    240218}
    241219
     
    314292void AccessibilityController::addNotificationListener(PlatformUIElement element, JSObjectRef functionCallback)
    315293{
    316     if (!m_notificationsEventHook)
    317         m_notificationsEventHook = SetWinEventHook(EVENT_MIN, EVENT_MAX, GetModuleHandle(0), notificationListenerProc, GetCurrentProcessId(), 0, WINEVENT_INCONTEXT);
     294    if (!m_allEventsHook)
     295        m_allEventsHook = SetWinEventHook(EVENT_MIN, EVENT_MAX, GetModuleHandle(0), notificationListenerProc, GetCurrentProcessId(), 0, WINEVENT_INCONTEXT);
    318296
    319297    JSValueProtect(frame->globalContext(), functionCallback);
Note: See TracChangeset for help on using the changeset viewer.