Changeset 91174 in webkit
- Timestamp:
- Jul 18, 2011 12:34:20 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r91170 r91174 1 2011-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 1 28 2011-07-17 Luke Macpherson <macpherson@chromium.org> 2 29 -
trunk/Source/WebCore/accessibility/AXObjectCache.h
r91132 r91174 130 130 AXScrolledToAnchor, 131 131 AXLiveRegionChanged, 132 AXMenuListItemSelected,133 132 AXMenuListValueChanged, 134 133 AXRowCountChanged, -
trunk/Source/WebCore/accessibility/AccessibilityMenuList.cpp
r91132 r91174 83 83 } 84 84 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 103 85 } // namespace WebCore -
trunk/Source/WebCore/accessibility/AccessibilityMenuList.h
r91132 r91174 43 43 virtual bool press() const; 44 44 45 void didUpdateActiveOption(int optionIndex);46 47 45 private: 48 46 AccessibilityMenuList(RenderMenuList*); -
trunk/Source/WebCore/accessibility/AccessibilityMenuListPopup.cpp
r91135 r91174 124 124 } 125 125 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 139 126 } // namespace WebCore -
trunk/Source/WebCore/accessibility/AccessibilityMenuListPopup.h
r91132 r91174 34 34 class AccessibilityMenuListOption; 35 35 class HTMLElement; 36 class HTMLSelectElement;37 36 38 37 class AccessibilityMenuListPopup : public AccessibilityObject { … … 44 43 virtual bool isEnabled() const; 45 44 virtual bool isOffScreen() const; 46 47 void didUpdateActiveOption(int optionIndex);48 45 49 46 private: -
trunk/Source/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp
r91132 r91174 88 88 case AXLiveRegionChanged: 89 89 case AXLoadComplete: 90 case AXMenuListItemSelected:91 90 case AXMenuListValueChanged: 92 91 case AXRowCollapsed: -
trunk/Source/WebCore/accessibility/win/AXObjectCacheWin.cpp
r91132 r91174 89 89 break; 90 90 91 case AXMenuListItemSelected:92 msaaEvent = EVENT_OBJECT_SELECTION;93 break;94 95 91 default: 96 92 return; -
trunk/Source/WebCore/dom/SelectElement.cpp
r91149 r91174 391 391 if (renderer) { 392 392 if (data.usesMenuList()) 393 toRenderMenuList(renderer)->didSetSelectedIndex( listIndex);393 toRenderMenuList(renderer)->didSetSelectedIndex(); 394 394 else if (renderer->isListBox()) 395 395 toRenderListBox(renderer)->selectionChanged(); -
trunk/Source/WebCore/rendering/RenderMenuList.cpp
r91132 r91174 27 27 28 28 #include "AXObjectCache.h" 29 #include "AccessibilityMenuList.h"30 29 #include "CSSFontSelector.h" 31 30 #include "CSSStyleSelector.h" … … 59 58 , m_optionsChanged(true) 60 59 , m_optionsWidth(0) 61 , m_last ActiveIndex(-1)60 , m_lastSelectedIndex(-1) 62 61 , m_popupIsVisible(false) 63 62 { … … 206 205 207 206 setText(text.stripWhiteSpace()); 208 didUpdateActiveOption(optionIndex);209 207 } 210 208 … … 341 339 #endif 342 340 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()) 341 void RenderMenuList::didSetSelectedIndex() 342 { 343 int index = selectedIndex(); 344 if (m_lastSelectedIndex == index) 352 345 return; 353 346 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); 366 351 } 367 352 -
trunk/Source/WebCore/rendering/RenderMenuList.h
r91132 r91174 56 56 void setOptionsChanged(bool changed) { m_optionsChanged = changed; } 57 57 58 void didSetSelectedIndex( int listIndex);58 void didSetSelectedIndex(); 59 59 60 60 String text() const; … … 125 125 void updateOptionsWidth(); 126 126 127 void didUpdateActiveOption(int optionIndex);128 129 127 RenderText* m_buttonText; 130 128 RenderBlock* m_innerBlock; … … 133 131 int m_optionsWidth; 134 132 135 int m_last ActiveIndex;133 int m_lastSelectedIndex; 136 134 137 135 RefPtr<RenderStyle> m_optionStyle; -
trunk/Tools/ChangeLog
r91167 r91174 1 2011-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 1 19 2011-07-17 Philippe Normand <pnormand@igalia.com> 2 20 -
trunk/Tools/DumpRenderTree/AccessibilityController.h
r91132 r91174 67 67 68 68 HWINEVENTHOOK m_allEventsHook; 69 HWINEVENTHOOK m_notificationsEventHook;70 69 HashMap<PlatformUIElement, JSObjectRef> m_notificationListeners; 71 70 #endif -
trunk/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp
r91132 r91174 45 45 , m_valueChangeEventHook(0) 46 46 , m_allEventsHook(0) 47 , m_notificationsEventHook(0)48 47 { 49 48 } … … 52 51 { 53 52 setLogFocusEvents(false); 54 setLogAccessibilityEvents(false);55 53 setLogValueChangeEvents(false); 56 54 57 if (m_ notificationsEventHook)58 UnhookWinEvent(m_ notificationsEventHook);55 if (m_allEventsHook) 56 UnhookWinEvent(m_allEventsHook); 59 57 60 58 for (HashMap<PlatformUIElement, JSObjectRef>::iterator it = m_notificationListeners.begin(); it != m_notificationListeners.end(); ++it) … … 133 131 break; 134 132 135 case EVENT_OBJECT_SELECTION:136 printf("Received selection event for object '%S'.\n", name.c_str());137 break;138 139 133 case EVENT_OBJECT_VALUECHANGE: { 140 134 BSTR valueBSTR; … … 220 214 } 221 215 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); 216 void AccessibilityController::setLogAccessibilityEvents(bool) 217 { 240 218 } 241 219 … … 314 292 void AccessibilityController::addNotificationListener(PlatformUIElement element, JSObjectRef functionCallback) 315 293 { 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); 318 296 319 297 JSValueProtect(frame->globalContext(), functionCallback);
Note: See TracChangeset
for help on using the changeset viewer.