Title: [126662] trunk/Source/WebKit/chromium
Revision
126662
Author
[email protected]
Date
2012-08-24 17:34:02 -0700 (Fri, 24 Aug 2012)

Log Message

Chromium: WebAccessibilityObject should expose updateBackingStore
https://bugs.webkit.org/show_bug.cgi?id=94611

Reviewed by Chris Fleizach.

This change just exposes a method, with no new tests. Next, Chromium
will be modified to call this new method, and this will be followed
by a change that gets rid of calls to updateBackingStore under the
hood. That last change may add a test or update an existing test.

* public/WebAccessibilityObject.h:
(WebAccessibilityObject):
* src/WebAccessibilityObject.cpp:
(WebKit::WebAccessibilityObject::updateBackingStoreAndCheckValidity):
(WebKit):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (126661 => 126662)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-08-25 00:32:10 UTC (rev 126661)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-08-25 00:34:02 UTC (rev 126662)
@@ -1,3 +1,21 @@
+2012-08-24  Dominic Mazzoni  <[email protected]>
+
+        Chromium: WebAccessibilityObject should expose updateBackingStore
+        https://bugs.webkit.org/show_bug.cgi?id=94611
+
+        Reviewed by Chris Fleizach.
+
+        This change just exposes a method, with no new tests. Next, Chromium
+        will be modified to call this new method, and this will be followed
+        by a change that gets rid of calls to updateBackingStore under the
+        hood. That last change may add a test or update an existing test.
+
+        * public/WebAccessibilityObject.h:
+        (WebAccessibilityObject):
+        * src/WebAccessibilityObject.cpp:
+        (WebKit::WebAccessibilityObject::updateBackingStoreAndCheckValidity):
+        (WebKit):
+
 2012-08-24  W. James MacLean  <[email protected]>
 
         [chromium] WebViewImpl::enableTouchHighlight() should always clear any existing highlight when invoked.

Modified: trunk/Source/WebKit/chromium/public/WebAccessibilityObject.h (126661 => 126662)


--- trunk/Source/WebKit/chromium/public/WebAccessibilityObject.h	2012-08-25 00:32:10 UTC (rev 126661)
+++ trunk/Source/WebKit/chromium/public/WebAccessibilityObject.h	2012-08-25 00:34:02 UTC (rev 126662)
@@ -69,6 +69,7 @@
     WEBKIT_EXPORT bool equals(const WebAccessibilityObject&) const;
 
     bool isNull() const { return m_private.isNull(); }
+    // isDetached also checks for null, so it's safe to just call isDetached.
     WEBKIT_EXPORT bool isDetached() const;
 
     // Static methods for enabling accessibility.
@@ -77,6 +78,13 @@
 
     WEBKIT_EXPORT int axID() const;
 
+    // Update the underlying tree, and return true if this object is
+    // still valid (not detached). Note that calling this method
+    // can cause other WebAccessibilityObjects to become invalid, too,
+    // so always call isDetached if updateBackingStoreAndCheckValidity
+    // has been called on any object, or if any other WebCore code has run.
+    WEBKIT_EXPORT bool updateBackingStoreAndCheckValidity();
+
     WEBKIT_EXPORT WebString accessibilityDescription() const;
     WEBKIT_EXPORT WebString actionVerb() const;
     WEBKIT_EXPORT bool canSetFocusAttribute() const;

Modified: trunk/Source/WebKit/chromium/src/WebAccessibilityObject.cpp (126661 => 126662)


--- trunk/Source/WebKit/chromium/src/WebAccessibilityObject.cpp	2012-08-25 00:32:10 UTC (rev 126661)
+++ trunk/Source/WebKit/chromium/src/WebAccessibilityObject.cpp	2012-08-25 00:34:02 UTC (rev 126662)
@@ -99,6 +99,13 @@
     return m_private->axObjectID();
 }
 
+bool WebAccessibilityObject::updateBackingStoreAndCheckValidity()
+{
+    if (!isDetached())
+        m_private->updateBackingStore();
+    return !isDetached();
+}
+
 WebString WebAccessibilityObject::accessibilityDescription() const
 {
     if (isDetached())
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to