Title: [186650] trunk/Source/WebCore
Revision
186650
Author
cfleiz...@apple.com
Date
2015-07-09 16:43:08 -0700 (Thu, 09 Jul 2015)

Log Message

AX: <details> element should allow expand/close through AX API
https://bugs.webkit.org/show_bug.cgi?id=146549

Reviewed by Mario Sanchez Prada.

Forgot this file with the original commit.

* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::toggleOpen):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (186649 => 186650)


--- trunk/Source/WebCore/ChangeLog	2015-07-09 23:33:25 UTC (rev 186649)
+++ trunk/Source/WebCore/ChangeLog	2015-07-09 23:43:08 UTC (rev 186650)
@@ -1,3 +1,15 @@
+2015-07-09  Chris Fleizach  <cfleiz...@apple.com>
+
+        AX: <details> element should allow expand/close through AX API
+        https://bugs.webkit.org/show_bug.cgi?id=146549
+
+        Reviewed by Mario Sanchez Prada.
+
+        Forgot this file with the original commit.
+
+        * html/HTMLDetailsElement.cpp:
+        (WebCore::HTMLDetailsElement::toggleOpen):
+
 2015-07-09  Alex Christensen  <achristen...@webkit.org>
 
         [Content Extensions] Add 3 byte jump size.

Modified: trunk/Source/WebCore/html/HTMLDetailsElement.cpp (186649 => 186650)


--- trunk/Source/WebCore/html/HTMLDetailsElement.cpp	2015-07-09 23:33:25 UTC (rev 186649)
+++ trunk/Source/WebCore/html/HTMLDetailsElement.cpp	2015-07-09 23:43:08 UTC (rev 186650)
@@ -22,6 +22,7 @@
 #include "HTMLDetailsElement.h"
 
 #if ENABLE(DETAILS_ELEMENT)
+#include "AXObjectCache.h"
 #include "ElementIterator.h"
 #include "HTMLSummaryElement.h"
 #include "InsertionPoint.h"
@@ -161,6 +162,10 @@
 void HTMLDetailsElement::toggleOpen()
 {
     setAttribute(openAttr, m_isOpen ? nullAtom : emptyAtom);
+
+    // We need to post to the document because toggling this element will delete it.
+    if (AXObjectCache* cache = document().existingAXObjectCache())
+        cache->postNotification(nullptr, &document(), AXObjectCache::AXExpandedChanged);
 }
 
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to