Chromium Code Reviews| Index: Source/web/ChromeClientImpl.cpp |
| diff --git a/Source/web/ChromeClientImpl.cpp b/Source/web/ChromeClientImpl.cpp |
| index a567df5fb456590ea758bd5021d11a271bdce7d8..b17390bd98deddd8a4e01d5d57532d152fd42c67 100644 |
| --- a/Source/web/ChromeClientImpl.cpp |
| +++ b/Source/web/ChromeClientImpl.cpp |
| @@ -129,6 +129,13 @@ static WebAccessibilityNotification toWebAccessibilityNotification(AXObjectCache |
| return static_cast<WebAccessibilityNotification>(notification); |
| } |
| +// Converts a WebCore::AXObjectCache::AXNotification to a WebKit::WebAXEvent |
| +static WebAXTypes::Event toWebAXEvent(AXObjectCache::AXNotification notification) |
| +{ |
| + // These enums have the same values; enforced in AssertMatchingEnums.cpp. |
| + return static_cast<WebAXTypes::Event>(notification); |
| +} |
| + |
| ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) |
| : m_webView(webView) |
| , m_toolbarsVisible(true) |
| @@ -805,8 +812,12 @@ void ChromeClientImpl::getPopupMenuInfo(PopupContainer* popupContainer, |
| void ChromeClientImpl::postAccessibilityNotification(AccessibilityObject* obj, AXObjectCache::AXNotification notification) |
| { |
| // Alert assistive technology about the accessibility object notification. |
| - if (obj) |
| + if (obj) { |
|
jamesr
2013/08/21 02:22:52
early return on !obj is more readable and requires
dmazzoni
2013/08/22 20:58:23
Done.
|
| + // TODO(dmazzoni): remove this first call once Chromium has |
|
jamesr
2013/08/21 02:22:52
Blink style is FIXME:, not TODO(name). You have a
dmazzoni
2013/08/22 20:58:23
TODO changed to FIXME throughout.
|
| + // switched over. (http://crbug.com/269034) |
| m_webView->client()->postAccessibilityNotification(WebAccessibilityObject(obj), toWebAccessibilityNotification(notification)); |
| + m_webView->client()->postAccessibilityEvent(WebAccessibilityObject(obj), toWebAXEvent(notification)); |
| + } |
| } |
| String ChromeClientImpl::acceptLanguages() |