Title: [151745] trunk/Source
Revision
151745
Author
[email protected]
Date
2013-06-19 11:45:59 -0700 (Wed, 19 Jun 2013)

Log Message

../WebCore: [Windows] AX: Extend notification handling
https://bugs.webkit.org/show_bug.cgi?id=117761.

Reviewed by Anders Carlsson.

accessibility/press-works-on-control-types.html

* accessibility/win/AXObjectCacheWin.cpp:
(WebCore::AXObjectCache::postPlatformNotification): Add handlers for more event notifications.
* accessibility/win/AccessibilityObjectWrapperWin.cpp:
(WebCore::AccessibilityObjectWrapper::accessibilityAttributeValue): Protect against null
pointer dereference found during testing.
* dom/Document.cpp:
(WebCore::Document::implicitClose): Execute notification handler for Windows as well as Mac.
* page/FrameView.cpp:
(WebCore::FrameView::layout): Ditto.

../WebKit/win: [Windows] AX: Extend notification support.
https://bugs.webkit.org/show_bug.cgi?id=117761

Reviewed by Anders Carlsson.

* AccessibleDocument.cpp:
(AccessibleDocument::state): Improve handling of focus state.
* AccessibleDocument.h: Provide signature for new state override.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (151744 => 151745)


--- trunk/Source/WebCore/ChangeLog	2013-06-19 18:38:00 UTC (rev 151744)
+++ trunk/Source/WebCore/ChangeLog	2013-06-19 18:45:59 UTC (rev 151745)
@@ -1,3 +1,22 @@
+2013-06-19  Brent Fulgham  <[email protected]>
+
+        [Windows] AX: Extend notification handling
+        https://bugs.webkit.org/show_bug.cgi?id=117761.
+
+        Reviewed by Anders Carlsson.
+
+        accessibility/press-works-on-control-types.html
+
+        * accessibility/win/AXObjectCacheWin.cpp:
+        (WebCore::AXObjectCache::postPlatformNotification): Add handlers for more event notifications.
+        * accessibility/win/AccessibilityObjectWrapperWin.cpp:
+        (WebCore::AccessibilityObjectWrapper::accessibilityAttributeValue): Protect against null
+        pointer dereference found during testing.
+        * dom/Document.cpp:
+        (WebCore::Document::implicitClose): Execute notification handler for Windows as well as Mac.
+        * page/FrameView.cpp:
+        (WebCore::FrameView::layout): Ditto.
+
 2013-06-19  [email protected]  <[email protected]>
 
         [WinCairo] Webfont rendering is broken.

Modified: trunk/Source/WebCore/accessibility/win/AXObjectCacheWin.cpp (151744 => 151745)


--- trunk/Source/WebCore/accessibility/win/AXObjectCacheWin.cpp	2013-06-19 18:38:00 UTC (rev 151744)
+++ trunk/Source/WebCore/accessibility/win/AXObjectCacheWin.cpp	2013-06-19 18:45:59 UTC (rev 151745)
@@ -1,5 +1,6 @@
 /*
- * Copyright (C) 2008, 2009, 2010 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2008, 2009, 2010, 2013 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2012 Serotek Corporation. All Rights Reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -33,6 +34,9 @@
 #include "Page.h"
 #include "RenderObject.h"
 
+// Provided by IAccessibleEventID.idl
+#define IA2_EVENT_DOCUMENT_LOAD_COMPLETE    261
+
 using namespace std;
 
 namespace WebCore {
@@ -74,6 +78,10 @@
 
     DWORD msaaEvent;
     switch (notification) {
+        case AXCheckedStateChanged:
+            msaaEvent = EVENT_OBJECT_STATECHANGE;
+            break;
+
         case AXFocusedUIElementChanged:
         case AXActiveDescendantChanged:
             msaaEvent = EVENT_OBJECT_FOCUS;
@@ -83,6 +91,14 @@
             msaaEvent = EVENT_SYSTEM_SCROLLINGSTART;
             break;
 
+        case AXLayoutComplete:
+            msaaEvent = EVENT_OBJECT_REORDER;
+            break;
+
+        case AXLoadComplete:
+            msaaEvent = IA2_EVENT_DOCUMENT_LOAD_COMPLETE;
+            break;
+
         case AXValueChanged:
         case AXMenuListValueChanged:
             msaaEvent = EVENT_OBJECT_VALUECHANGE;

Modified: trunk/Source/WebCore/accessibility/win/AccessibilityObjectWrapperWin.cpp (151744 => 151745)


--- trunk/Source/WebCore/accessibility/win/AccessibilityObjectWrapperWin.cpp	2013-06-19 18:38:00 UTC (rev 151744)
+++ trunk/Source/WebCore/accessibility/win/AccessibilityObjectWrapperWin.cpp	2013-06-19 18:45:59 UTC (rev 151745)
@@ -49,8 +49,10 @@
         if (obj) {
             ASSERT(V_VT(result) == VT_EMPTY);
             V_VT(result) = VT_UNKNOWN;
-            V_UNKNOWN(result) = obj->wrapper();
-            obj->wrapper()->AddRef();
+            AccessibilityObjectWrapper* wrapper = obj->wrapper();
+            V_UNKNOWN(result) = wrapper;
+            if (wrapper)
+                wrapper->AddRef();
         }
         return;
     }

Modified: trunk/Source/WebCore/dom/Document.cpp (151744 => 151745)


--- trunk/Source/WebCore/dom/Document.cpp	2013-06-19 18:38:00 UTC (rev 151744)
+++ trunk/Source/WebCore/dom/Document.cpp	2013-06-19 18:45:59 UTC (rev 151745)
@@ -2446,7 +2446,7 @@
 
     m_processingLoadEvent = false;
 
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) || PLATFORM(WIN)
     if (f && renderer() && AXObjectCache::accessibilityEnabled()) {
         // The AX cache may have been cleared at this point, but we need to make sure it contains an
         // AX object to send the notification to. getOrCreate will make sure that an valid AX object

Modified: trunk/Source/WebCore/page/FrameView.cpp (151744 => 151745)


--- trunk/Source/WebCore/page/FrameView.cpp	2013-06-19 18:38:00 UTC (rev 151744)
+++ trunk/Source/WebCore/page/FrameView.cpp	2013-06-19 18:45:59 UTC (rev 151745)
@@ -1355,7 +1355,7 @@
     
     m_layoutCount++;
 
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) || PLATFORM(WIN)
     if (AXObjectCache* cache = root->document()->existingAXObjectCache())
         cache->postNotification(root, AXObjectCache::AXLayoutComplete, true);
 #endif

Modified: trunk/Source/WebKit/win/AccessibleDocument.cpp (151744 => 151745)


--- trunk/Source/WebKit/win/AccessibleDocument.cpp	2013-06-19 18:38:00 UTC (rev 151744)
+++ trunk/Source/WebKit/win/AccessibleDocument.cpp	2013-06-19 18:45:59 UTC (rev 151745)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2008, 2013 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2012 Serotek Corporation. All Rights Reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -49,3 +50,17 @@
         return 0;
     return m_object->document();
 }
+
+long AccessibleDocument::state() const
+{
+    long state = AccessibleBase::state();
+
+    // The document is considered focusable on Windows.
+    state |= STATE_SYSTEM_FOCUSABLE;
+
+    // The document must expose itself as focused if no element has focus.
+    if (m_object->focusedUIElement() == m_object)
+        state |= STATE_SYSTEM_FOCUSED;
+
+    return state;
+}

Modified: trunk/Source/WebKit/win/AccessibleDocument.h (151744 => 151745)


--- trunk/Source/WebKit/win/AccessibleDocument.h	2013-06-19 18:38:00 UTC (rev 151744)
+++ trunk/Source/WebKit/win/AccessibleDocument.h	2013-06-19 18:45:59 UTC (rev 151745)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008,2013 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2008, 2013 Apple Inc. All Rights Reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -34,7 +34,8 @@
     WebCore::Document* document() const;
 
 protected:
-    virtual long role() const;
+    virtual long role() const OVERRIDE;
+    virtual long state() const OVERRIDE;
 };
 
 #endif // AccessibleDocument_h

Modified: trunk/Source/WebKit/win/ChangeLog (151744 => 151745)


--- trunk/Source/WebKit/win/ChangeLog	2013-06-19 18:38:00 UTC (rev 151744)
+++ trunk/Source/WebKit/win/ChangeLog	2013-06-19 18:45:59 UTC (rev 151745)
@@ -1,3 +1,14 @@
+2013-06-19  Brent Fulgham  <[email protected]>
+
+        [Windows] AX: Extend notification support.
+        https://bugs.webkit.org/show_bug.cgi?id=117761
+
+        Reviewed by Anders Carlsson.
+
+        * AccessibleDocument.cpp:
+        (AccessibleDocument::state): Improve handling of focus state.
+        * AccessibleDocument.h: Provide signature for new state override.
+
 2013-06-19  [email protected]  <[email protected]>
 
         [WinCairo] Does not compile.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to