[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:40:49 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit fc996f7feed7607d05bbed8c312c41c50946f811
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu May 20 02:25:23 2004 +0000
Implement support for notification posting to accessibility clients for layouts and loads.
* khtml/khtmlview.cpp:
(KHTMLView::layout):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::close):
* kwq/KWQAccObjectCache.h:
(KWQAccObjectCache::enableAccessibility):
(KWQAccObjectCache::accessibilityEnabled):
* kwq/KWQAccObjectCache.mm:
(KWQAccObjectCache::accObject):
(KWQAccObjectCache::setAccObject):
(KWQAccObjectCache::removeAccObject):
(KWQAccObjectCache::detach):
(KWQAccObjectCache::childrenChanged):
(KWQAccObjectCache::postNotification):
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge accessibilityTree]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 0a6d8ac..75b49a8 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,24 @@
+2004-05-19 David Hyatt <hyatt at apple.com>
+
+ Implement support for notification posting to accessibility clients for layouts and loads.
+
+ * khtml/khtmlview.cpp:
+ (KHTMLView::layout):
+ * khtml/xml/dom_docimpl.cpp:
+ (DocumentImpl::close):
+ * kwq/KWQAccObjectCache.h:
+ (KWQAccObjectCache::enableAccessibility):
+ (KWQAccObjectCache::accessibilityEnabled):
+ * kwq/KWQAccObjectCache.mm:
+ (KWQAccObjectCache::accObject):
+ (KWQAccObjectCache::setAccObject):
+ (KWQAccObjectCache::removeAccObject):
+ (KWQAccObjectCache::detach):
+ (KWQAccObjectCache::childrenChanged):
+ (KWQAccObjectCache::postNotification):
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge accessibilityTree]):
+
2004-05-19 Chris Blumenberg <cblu at apple.com>
Tweaks for forthcoming dragging improvements.
diff --git a/WebCore/khtml/khtmlview.cpp b/WebCore/khtml/khtmlview.cpp
index dce2fc0..36bf68b 100644
--- a/WebCore/khtml/khtmlview.cpp
+++ b/WebCore/khtml/khtmlview.cpp
@@ -64,6 +64,10 @@
#include <kurldrag.h>
#include <qobjectlist.h>
+#if APPLE_CHANGES
+#include "KWQAccObjectCache.h"
+#endif
+
#define PAINT_BUFFER_HEIGHT 128
//#define INSTRUMENT_LAYOUT_SCHEDULING 1
@@ -668,6 +672,10 @@ void KHTMLView::layout()
}
d->layoutCount++;
+#if APPLE_CHANGES
+ if (KWQAccObjectCache::accessibilityEnabled())
+ root->document()->getOrCreateAccObjectCache()->postNotification(root, "AXLayoutComplete");
+#endif
if (root->needsLayout()) {
//qDebug("needs layout, delaying repaint");
diff --git a/WebCore/khtml/xml/dom_docimpl.cpp b/WebCore/khtml/xml/dom_docimpl.cpp
index eb365e1..6fd8519 100644
--- a/WebCore/khtml/xml/dom_docimpl.cpp
+++ b/WebCore/khtml/xml/dom_docimpl.cpp
@@ -1330,12 +1330,18 @@ void DocumentImpl::close()
// Now do our painting/layout, but only if we aren't in a subframe or if we're in a subframe
// that has been sized already. Otherwise, our view size would be incorrect, so doing any
// layout/painting now would be pointless.
- if (doload && (!ownerElement() || (ownerElement()->renderer() && !ownerElement()->renderer()->needsLayout()))) {
- updateRendering();
-
- // Always do a layout after loading if needed.
- if (view() && renderer() && (!renderer()->firstChild() || renderer()->needsLayout()))
- view()->layout();
+ if (doload) {
+ if (!ownerElement() || (ownerElement()->renderer() && !ownerElement()->renderer()->needsLayout())) {
+ updateRendering();
+
+ // Always do a layout after loading if needed.
+ if (view() && renderer() && (!renderer()->firstChild() || renderer()->needsLayout()))
+ view()->layout();
+ }
+#if APPLE_CHANGES
+ if (renderer() && KWQAccObjectCache::accessibilityEnabled())
+ getOrCreateAccObjectCache()->postNotification(renderer(), "AXLoadComplete");
+#endif
}
}
diff --git a/WebCore/kwq/KWQAccObjectCache.h b/WebCore/kwq/KWQAccObjectCache.h
index 0256f9e..07af64b 100644
--- a/WebCore/kwq/KWQAccObjectCache.h
+++ b/WebCore/kwq/KWQAccObjectCache.h
@@ -31,6 +31,8 @@
class KWQAccObject;
#endif
+class QString;
+
namespace khtml {
class RenderObject;
}
@@ -48,7 +50,15 @@ public:
void detach(khtml::RenderObject* renderer);
void childrenChanged(khtml::RenderObject* renderer);
+
+ void postNotification(khtml::RenderObject* renderer, const QString& msg);
+ static void enableAccessibility() { gAccessibilityEnabled = true; }
+ static bool accessibilityEnabled() { return gAccessibilityEnabled; }
+
+private:
+ static bool gAccessibilityEnabled;
+
private:
CFMutableDictionaryRef accCache;
};
diff --git a/WebCore/kwq/KWQAccObjectCache.mm b/WebCore/kwq/KWQAccObjectCache.mm
index 2775007..61062b4 100644
--- a/WebCore/kwq/KWQAccObjectCache.mm
+++ b/WebCore/kwq/KWQAccObjectCache.mm
@@ -25,9 +25,14 @@
#include "KWQAccObjectCache.h"
#include "KWQAccObject.h"
+#include <qstring.h>
+
+using khtml::RenderObject;
// The simple Cocoa calls in this file can't throw.
+bool KWQAccObjectCache::gAccessibilityEnabled = false;
+
KWQAccObjectCache::KWQAccObjectCache()
{
accCache = NULL;
@@ -39,7 +44,7 @@ KWQAccObjectCache::~KWQAccObjectCache()
CFRelease(accCache);
}
-KWQAccObject* KWQAccObjectCache::accObject(khtml::RenderObject* renderer)
+KWQAccObject* KWQAccObjectCache::accObject(RenderObject* renderer)
{
if (!accCache)
// No need to retain/free either impl key, or id value.
@@ -54,7 +59,7 @@ KWQAccObject* KWQAccObjectCache::accObject(khtml::RenderObject* renderer)
return obj;
}
-void KWQAccObjectCache::setAccObject(khtml::RenderObject* impl, KWQAccObject* accObject)
+void KWQAccObjectCache::setAccObject(RenderObject* impl, KWQAccObject* accObject)
{
if (!accCache)
// No need to retain/free either impl key, or id value.
@@ -63,7 +68,7 @@ void KWQAccObjectCache::setAccObject(khtml::RenderObject* impl, KWQAccObject* ac
CFDictionarySetValue(accCache, (const void *)impl, accObject);
}
-void KWQAccObjectCache::removeAccObject(khtml::RenderObject* impl)
+void KWQAccObjectCache::removeAccObject(RenderObject* impl)
{
if (!accCache)
return;
@@ -76,12 +81,12 @@ void KWQAccObjectCache::removeAccObject(khtml::RenderObject* impl)
}
}
-void KWQAccObjectCache::detach(khtml::RenderObject* renderer)
+void KWQAccObjectCache::detach(RenderObject* renderer)
{
removeAccObject(renderer);
}
-void KWQAccObjectCache::childrenChanged(khtml::RenderObject* renderer)
+void KWQAccObjectCache::childrenChanged(RenderObject* renderer)
{
if (!accCache)
return;
@@ -92,3 +97,8 @@ void KWQAccObjectCache::childrenChanged(khtml::RenderObject* renderer)
[obj childrenChanged];
}
+
+void KWQAccObjectCache::postNotification(RenderObject* renderer, const QString& msg)
+{
+ NSAccessibilityPostNotification(accObject(renderer), msg.getNSString());
+}
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 978aa1d..446c909 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -1329,6 +1329,7 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
-(id)accessibilityTree
{
+ KWQAccObjectCache::enableAccessibility();
if (!_part || !_part->xmlDocImpl()) return nil;
RenderCanvas* root = static_cast<khtml::RenderCanvas *>(_part->xmlDocImpl()->renderer());
if (!root) return nil;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list