[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 17:59:02 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 99bc0f33ce34487417b0c0ba2d119f2434d33fdb
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 3 22:27:53 2010 +0000

    2010-12-03  Chris Guillory  <chris.guillory at google.com>
    
            Reviewed by Chris Fleizach.
    
            Include the FrameView widget of a RenderWidget in the accessibility tree.
            https://bugs.webkit.org/show_bug.cgi?id=49106
    
            * platform/win/Skipped:
    2010-12-03  Chris Guillory  <chris.guillory at google.com>
    
            Reviewed by Chris Fleizach.
    
            Include the FrameView widget of a RenderWidget in the accessibility tree.
            https://bugs.webkit.org/show_bug.cgi?id=49106
    
            Include render widget children in the accessibility tree for not mac webkit ports.
    
            * accessibility/AccessibilityRenderObject.cpp:
            (WebCore::AccessibilityRenderObject::renderParentObject):
            (WebCore::AccessibilityRenderObject::addChildren):
            (WebCore::AccessibilityRenderObject::addRenderWidgetChildren):
            * accessibility/AccessibilityRenderObject.h:
            * accessibility/chromium/AccessibilityObjectChromium.cpp:
            (WebCore::AccessibilityObject::accessibilityIgnoreAttachment):
    2010-12-03  Chris Guillory  <chris.guillory at google.com>
    
            Reviewed by Chris Fleizach.
    
            Include the FrameView widget of a RenderWidget in the accessibility tree.
            https://bugs.webkit.org/show_bug.cgi?id=49106
    
            * public/WebAccessibilityObject.h:
            * src/WebAccessibilityObject.cpp:
            (WebKit::WebAccessibilityObject::equals):
            (WebKit::WebAccessibilityObject::parentObject):
    2010-12-03  Chris Guillory  <chris.guillory at google.com>
    
            Reviewed by Chris Fleizach.
    
            Include the FrameView widget of a RenderWidget in the accessibility tree.
            https://bugs.webkit.org/show_bug.cgi?id=49106
    
            * DumpRenderTree/chromium/AccessibilityUIElement.cpp:
            (AccessibilityUIElement::AccessibilityUIElement):
            (AccessibilityUIElement::parentElementCallback):
            (AccessibilityUIElement::isEqualCallback):
            * DumpRenderTree/chromium/AccessibilityUIElement.h:
            * DumpRenderTree/chromium/CppBoundClass.cpp:
            (CppBoundClass::getFromCppVariant):
            * DumpRenderTree/chromium/CppBoundClass.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73302 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 2dda33c..2feb36a 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2010-12-03  Chris Guillory  <chris.guillory at google.com>
+
+        Reviewed by Chris Fleizach.
+
+        Include the FrameView widget of a RenderWidget in the accessibility tree.
+        https://bugs.webkit.org/show_bug.cgi?id=49106
+
+        * platform/win/Skipped:
+
 2010-12-03  Victor Wang  <victorw at chromium.org>
 
         Unreviewed.
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index cbdc46a..c5c9824 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -381,9 +381,6 @@ fast/workers/storage/change-version-handle-reuse-sync.html
 # Sometimes fails http://webkit.org/b/49182
 animations/stop-animation-on-suspend.html
 
-# Crashing in AccessibilityUIElement::parentElement http://webkit.org/b/49379
-accessibility/iframe-bastardization.html
-
 ################################################################################
 ####################### No bugs filed about the below yet#######################
 ################################################################################
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 32b4021..efcee8f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-12-03  Chris Guillory  <chris.guillory at google.com>
+
+        Reviewed by Chris Fleizach.
+
+        Include the FrameView widget of a RenderWidget in the accessibility tree.
+        https://bugs.webkit.org/show_bug.cgi?id=49106
+
+        Include render widget children in the accessibility tree for not mac webkit ports.
+
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::renderParentObject):
+        (WebCore::AccessibilityRenderObject::addChildren):
+        (WebCore::AccessibilityRenderObject::addRenderWidgetChildren):
+        * accessibility/AccessibilityRenderObject.h:
+        * accessibility/chromium/AccessibilityObjectChromium.cpp:
+        (WebCore::AccessibilityObject::accessibilityIgnoreAttachment):
+
 2010-11-30  Abhishek Arya  <inferno at chromium.org>
 
         Reviewed by Dave Hyatt.
diff --git a/WebCore/accessibility/AccessibilityRenderObject.cpp b/WebCore/accessibility/AccessibilityRenderObject.cpp
index 3c6079b..f93efda 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -390,26 +390,33 @@ RenderObject* AccessibilityRenderObject::renderParentObject() const
     RenderObject* startOfConts = 0;
     RenderObject* firstChild = 0;
     if (m_renderer->isRenderBlock() && (startOfConts = startOfContinuations(m_renderer)))
-        parent = startOfConts;
+        return startOfConts;
 
     // Case 2: node's parent is an inline which is some node's continuation; parent is 
     // the earliest node in the continuation chain.
-    else if (parent && parent->isRenderInline() && (startOfConts = startOfContinuations(parent)))
-        parent = startOfConts;
+    if (parent && parent->isRenderInline() && (startOfConts = startOfContinuations(parent)))
+        return startOfConts;
     
     // Case 3: The first sibling is the beginning of a continuation chain. Find the origin of that continuation.
-    else if (parent && (firstChild = parent->firstChild()) && firstChild->node()) {
+    if (parent && (firstChild = parent->firstChild()) && firstChild->node()) {
         // Get the node's renderer and follow that continuation chain until the first child is found
         RenderObject* nodeRenderFirstChild = firstChild->node()->renderer();
         if (nodeRenderFirstChild != firstChild) {
             for (RenderObject* contsTest = nodeRenderFirstChild; contsTest; contsTest = nextContinuation(contsTest)) {
-                if (contsTest == firstChild) {
-                    parent = nodeRenderFirstChild->parent();
-                    break;
-                }
+                if (contsTest == firstChild)
+                    return nodeRenderFirstChild->parent();
             }
         }
     }
+
+#if !PLATFORM(MAC)
+    // Case 4: The node is a RenderView whose FrameView has an associated RenderWidget.
+    // The parent is the associated RenderWidget.
+    // On the mac port this parent logic is in AccessibilityObjectWrapper.mm.
+    RenderWidget* renderWidget = 0;
+    if (!parent && (renderWidget = RenderWidget::find(frameViewIfRenderView())))
+        return renderWidget;
+#endif
         
     return parent;
 }
@@ -3371,6 +3378,27 @@ void AccessibilityRenderObject::addChildren()
             }
         }
     }
+
+    addRenderWidgetChildren();
+}
+
+void AccessibilityRenderObject::addRenderWidgetChildren()
+{
+#if !PLATFORM(MAC)
+    // For RenderWidget, add frame's content renderer if the widget is a FrameView.
+    // On the mac port this children logic is in AccessibilityObjectWrapper.mm.
+    Widget* widget = widgetForAttachmentView();
+    if (!widget || !widget->isFrameView())
+        return;
+    Frame* frame = static_cast<FrameView*>(widget)->frame();
+    if (!frame)
+        return;
+    RenderView* renderView = frame->contentRenderer();
+    if (!renderView)
+        return;
+    ASSERT(!m_children.size());
+    m_children.append(axObjectCache()->getOrCreate(renderView));
+#endif
 }
         
 const AtomicString& AccessibilityRenderObject::ariaLiveRegionStatus() const
diff --git a/WebCore/accessibility/AccessibilityRenderObject.h b/WebCore/accessibility/AccessibilityRenderObject.h
index a01008a..8eca418 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.h
+++ b/WebCore/accessibility/AccessibilityRenderObject.h
@@ -269,6 +269,7 @@ protected:
     virtual bool isDetached() const { return !m_renderer; }
 
 private:
+    void addRenderWidgetChildren();
     void ariaListboxSelectedChildren(AccessibilityChildrenVector&);
     void ariaListboxVisibleChildren(AccessibilityChildrenVector&);
     bool ariaIsHidden() const;
diff --git a/WebCore/accessibility/chromium/AccessibilityObjectChromium.cpp b/WebCore/accessibility/chromium/AccessibilityObjectChromium.cpp
index 5b4cfd5..2bd3bbe 100644
--- a/WebCore/accessibility/chromium/AccessibilityObjectChromium.cpp
+++ b/WebCore/accessibility/chromium/AccessibilityObjectChromium.cpp
@@ -26,11 +26,25 @@
 
 #include "config.h"
 #include "AccessibilityObject.h"
+#include "Frame.h"
+#include "FrameView.h"
+#include "Widget.h"
 
 namespace WebCore {
 
 bool AccessibilityObject::accessibilityIgnoreAttachment() const
 {
+    // Ignore render widgets with an attached RenderView because they have
+    // no role and are not useful in the accessibility tree.
+    // On the mac port, these render widgets are ignored by forwarding
+    // calls the to the attached widget.
+    Widget* widget = widgetForAttachmentView();
+    if (widget && widget->isFrameView()) {
+        Frame* frame = static_cast<FrameView*>(widget)->frame();
+        if (frame && frame->contentRenderer())
+            return true;
+    }
+
     return false;
 }
 
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index c93c262..0afefe9 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-03  Chris Guillory  <chris.guillory at google.com>
+
+        Reviewed by Chris Fleizach.
+
+        Include the FrameView widget of a RenderWidget in the accessibility tree.
+        https://bugs.webkit.org/show_bug.cgi?id=49106
+
+        * public/WebAccessibilityObject.h:
+        * src/WebAccessibilityObject.cpp:
+        (WebKit::WebAccessibilityObject::equals):
+        (WebKit::WebAccessibilityObject::parentObject):
+
 2010-11-29  Jeremy Orlow  <jorlow at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebKit/chromium/public/WebAccessibilityObject.h b/WebKit/chromium/public/WebAccessibilityObject.h
index f7c93f2..2d562f6 100644
--- a/WebKit/chromium/public/WebAccessibilityObject.h
+++ b/WebKit/chromium/public/WebAccessibilityObject.h
@@ -63,6 +63,7 @@ public:
 
     WEBKIT_API void reset();
     WEBKIT_API void assign(const WebAccessibilityObject&);
+    WEBKIT_API bool equals(const WebAccessibilityObject&) const;
 
     bool isNull() const { return !m_private; }
 
diff --git a/WebKit/chromium/src/WebAccessibilityObject.cpp b/WebKit/chromium/src/WebAccessibilityObject.cpp
index 9df69cf..f1d4574 100644
--- a/WebKit/chromium/src/WebAccessibilityObject.cpp
+++ b/WebKit/chromium/src/WebAccessibilityObject.cpp
@@ -65,6 +65,11 @@ void WebAccessibilityObject::assign(const WebKit::WebAccessibilityObject& other)
     assign(p);
 }
 
+bool WebAccessibilityObject::equals(const WebKit::WebAccessibilityObject& other) const
+{
+    return (m_private == other.m_private);
+}
+
 WebString WebAccessibilityObject::accessibilityDescription() const
 {
     if (!m_private)
@@ -178,7 +183,7 @@ WebAccessibilityObject WebAccessibilityObject::parentObject() const
         return WebAccessibilityObject();
 
     m_private->updateBackingStore();
-    return WebAccessibilityObject(m_private->parentObject());
+    return WebAccessibilityObject(m_private->parentObjectUnignored());
 }
 
 
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index afd2d95..96f0368 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,19 @@
+2010-12-03  Chris Guillory  <chris.guillory at google.com>
+
+        Reviewed by Chris Fleizach.
+
+        Include the FrameView widget of a RenderWidget in the accessibility tree.
+        https://bugs.webkit.org/show_bug.cgi?id=49106
+
+        * DumpRenderTree/chromium/AccessibilityUIElement.cpp:
+        (AccessibilityUIElement::AccessibilityUIElement):
+        (AccessibilityUIElement::parentElementCallback):
+        (AccessibilityUIElement::isEqualCallback):
+        * DumpRenderTree/chromium/AccessibilityUIElement.h:
+        * DumpRenderTree/chromium/CppBoundClass.cpp:
+        (CppBoundClass::getFromCppVariant):
+        * DumpRenderTree/chromium/CppBoundClass.h:
+
 2010-12-03  Mihai Parparita  <mihaip at chromium.org>
 
         Reviewed by Tony Chang.
diff --git a/WebKitTools/DumpRenderTree/chromium/AccessibilityUIElement.cpp b/WebKitTools/DumpRenderTree/chromium/AccessibilityUIElement.cpp
index dbd025a..43a7380 100644
--- a/WebKitTools/DumpRenderTree/chromium/AccessibilityUIElement.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/AccessibilityUIElement.cpp
@@ -304,6 +304,7 @@ AccessibilityUIElement::AccessibilityUIElement(const WebAccessibilityObject& obj
     bindMethod("parentElement", &AccessibilityUIElement::parentElementCallback);
     bindMethod("increment", &AccessibilityUIElement::incrementCallback);
     bindMethod("decrement", &AccessibilityUIElement::decrementCallback);
+    bindMethod("isEqual", &AccessibilityUIElement::isEqualCallback);
 
     bindProperty("role", &AccessibilityUIElement::roleGetterCallback);
     bindProperty("subrole", &m_subrole);
@@ -490,7 +491,11 @@ void AccessibilityUIElement::isActionSupportedCallback(const CppArgumentList&, C
 
 void AccessibilityUIElement::parentElementCallback(const CppArgumentList&, CppVariant* result)
 {
-    result->setNull();
+    AccessibilityUIElement* parent = m_factory->create(accessibilityObject().parentObject());
+    if (parent)
+        result->set(*(parent->getAsCppVariant()));
+    else
+        result->setNull();        
 }
 
 void AccessibilityUIElement::incrementCallback(const CppArgumentList&, CppVariant* result)
@@ -503,6 +508,15 @@ void AccessibilityUIElement::decrementCallback(const CppArgumentList&, CppVarian
     result->setNull();
 }
 
+void AccessibilityUIElement::isEqualCallback(const CppArgumentList& arguments, CppVariant* result)
+{
+    bool equal = false;
+    AccessibilityUIElement* element = static_cast<AccessibilityUIElement*>(CppBoundClass::getFromCppVariant(arguments[0]));
+    if (element)
+        equal = accessibilityObject().equals(element->accessibilityObject());
+    result->set(equal);
+}
+
 void AccessibilityUIElement::fallbackCallback(const CppArgumentList &, CppVariant* result)
 {
     // FIXME: Implement this.
diff --git a/WebKitTools/DumpRenderTree/chromium/AccessibilityUIElement.h b/WebKitTools/DumpRenderTree/chromium/AccessibilityUIElement.h
index 366ed42..f2ce2e4 100644
--- a/WebKitTools/DumpRenderTree/chromium/AccessibilityUIElement.h
+++ b/WebKitTools/DumpRenderTree/chromium/AccessibilityUIElement.h
@@ -82,6 +82,7 @@ private:
     void parentElementCallback(const CppArgumentList&, CppVariant*);
     void incrementCallback(const CppArgumentList&, CppVariant*);
     void decrementCallback(const CppArgumentList&, CppVariant*);
+    void isEqualCallback(const CppArgumentList&, CppVariant*);
     void fallbackCallback(const CppArgumentList&, CppVariant*);
 
     void childrenCountGetterCallback(CppVariant*);
diff --git a/WebKitTools/DumpRenderTree/chromium/CppBoundClass.cpp b/WebKitTools/DumpRenderTree/chromium/CppBoundClass.cpp
index 1348bbf..2d3d0e1 100644
--- a/WebKitTools/DumpRenderTree/chromium/CppBoundClass.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/CppBoundClass.cpp
@@ -324,6 +324,18 @@ bool CppBoundClass::isMethodRegistered(const string& name) const
     return callback != m_methods.end();
 }
 
+// static
+CppBoundClass* CppBoundClass::getFromCppVariant(const CppVariant& value)
+{
+    if (!value.isObject())
+        return 0;
+    NPObject* npObj = NPVARIANT_TO_OBJECT(value);
+    if (!npObj || npObj->_class != &CppNPObject::npClass)
+        return 0;
+    CppNPObject* obj = reinterpret_cast<CppNPObject*>(npObj);
+    return obj->boundClass;
+}
+
 CppVariant* CppBoundClass::getAsCppVariant()
 {
     if (!m_selfVariant.isObject()) {
diff --git a/WebKitTools/DumpRenderTree/chromium/CppBoundClass.h b/WebKitTools/DumpRenderTree/chromium/CppBoundClass.h
index 6cb638e..3e271f9 100644
--- a/WebKitTools/DumpRenderTree/chromium/CppBoundClass.h
+++ b/WebKitTools/DumpRenderTree/chromium/CppBoundClass.h
@@ -85,6 +85,10 @@ public:
     CppBoundClass() : m_boundToFrame(false) {}
     virtual ~CppBoundClass();
 
+    // Return the CppBoundClass bound to a CppVariant if it exists. Returns null
+    // otherwise.
+    static CppBoundClass* getFromCppVariant(const CppVariant&);
+
     // Return a CppVariant representing this class, for use with BindProperty().
     // The variant type is guaranteed to be NPVariantType_Object.
     CppVariant* getAsCppVariant();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list