2011-04-06 Mario Sanchez Prada <msanchez@igalia.com>
authormario@webkit.org <mario@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Apr 2011 16:50:25 +0000 (16:50 +0000)
committermario@webkit.org <mario@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Apr 2011 16:50:25 +0000 (16:50 +0000)
        Reviewed by Chris Fleizach.

        [GTK] Do not reference AccessibilityRenderObject from platform dependent code
        https://bugs.webkit.org/show_bug.cgi?id=57955

        Do not reference AccessibilityRenderObject from platform specific code

        Added new virtual functions to AccessibilityObject.h and removed
        explicit references to AccessibilityRenderObject from GTK code.

        * accessibility/AccessibilityObject.h:
        (WebCore::AccessibilityObject::renderer): New virtual method,
        returning 0 by default. Overriden by AccessibilityRenderObject.
        (WebCore::AccessibilityObject::correspondingLabelForControlElement):
        New virtual method, returning 0 by default. It complements the
        already present method correspondingControlForLabelElement().

        * accessibility/AccessibilityRenderObject.h:
        (WebCore::AccessibilityRenderObject::renderer): Made virtual.

        * accessibility/gtk/AXObjectCacheAtk.cpp:
        (WebCore::emitTextChanged): Reference  AccessibilityObject,
        instead of AccessibilityRenderObject.
        (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
        Ditto.

        * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
        (webkit_accessible_get_name): Do not reference
        AccessibilityRenderObject.
        (webkit_accessible_get_description): Ditto.
        (setAtkRelationSetFromCoreObject): Ditto.
        (optionFromList): Ditto.
        (optionFromSelection): Ditto.
        (webkit_accessible_selection_clear_selection): Ditto.
        (webkit_accessible_selection_get_selection_count): Ditto.
        (webkit_accessible_selection_select_all_selection): Ditto.
        (textForObject): Ditto.
        (webkit_accessible_text_get_text): Ditto.
        (getPangoLayoutForAtk): Ditto.
        (webkit_accessible_text_get_caret_offset): Ditto.
        (baselinePositionForRenderObject): Ditto.
        (getAttributeSetForAccessibilityObject): Ditto.
        (accessibilityObjectLength): Ditto.
        (getSelectionOffsetsForObject): Ditto.
        (webkit_accessible_text_set_selection): Ditto.
        (webkit_accessible_text_set_caret_offset): Ditto.
        (webkit_accessible_table_get_caption): Ditto.
        (getInterfaceMaskFromObject): Ditto.

        * accessibility/gtk/WebKitAccessibleHyperlink.cpp:
        (getRangeLengthForObject): Ditto.

        Removed unused renderer() method from AccessibilityMenuList.

        * accessibility/AccessibilityMenuList.h: Removed unused method.
        * accessibility/AccessibilityMenuList.cpp: Removed unused method.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83064 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityMenuList.cpp
Source/WebCore/accessibility/AccessibilityMenuList.h
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.h
Source/WebCore/accessibility/gtk/AXObjectCacheAtk.cpp
Source/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
Source/WebCore/accessibility/gtk/WebKitAccessibleHyperlink.cpp

index 9570cc2..a846427 100644 (file)
@@ -1,3 +1,62 @@
+2011-04-06  Mario Sanchez Prada  <msanchez@igalia.com>
+
+        Reviewed by Chris Fleizach.
+
+        [GTK] Do not reference AccessibilityRenderObject from platform dependent code
+        https://bugs.webkit.org/show_bug.cgi?id=57955
+
+        Do not reference AccessibilityRenderObject from platform specific code
+
+        Added new virtual functions to AccessibilityObject.h and removed
+        explicit references to AccessibilityRenderObject from GTK code.
+
+        * accessibility/AccessibilityObject.h:
+        (WebCore::AccessibilityObject::renderer): New virtual method,
+        returning 0 by default. Overriden by AccessibilityRenderObject.
+        (WebCore::AccessibilityObject::correspondingLabelForControlElement):
+        New virtual method, returning 0 by default. It complements the
+        already present method correspondingControlForLabelElement().
+
+        * accessibility/AccessibilityRenderObject.h:
+        (WebCore::AccessibilityRenderObject::renderer): Made virtual.
+
+        * accessibility/gtk/AXObjectCacheAtk.cpp:
+        (WebCore::emitTextChanged): Reference  AccessibilityObject,
+        instead of AccessibilityRenderObject.
+        (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
+        Ditto.
+
+        * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+        (webkit_accessible_get_name): Do not reference
+        AccessibilityRenderObject.
+        (webkit_accessible_get_description): Ditto.
+        (setAtkRelationSetFromCoreObject): Ditto.
+        (optionFromList): Ditto.
+        (optionFromSelection): Ditto.
+        (webkit_accessible_selection_clear_selection): Ditto.
+        (webkit_accessible_selection_get_selection_count): Ditto.
+        (webkit_accessible_selection_select_all_selection): Ditto.
+        (textForObject): Ditto.
+        (webkit_accessible_text_get_text): Ditto.
+        (getPangoLayoutForAtk): Ditto.
+        (webkit_accessible_text_get_caret_offset): Ditto.
+        (baselinePositionForRenderObject): Ditto.
+        (getAttributeSetForAccessibilityObject): Ditto.
+        (accessibilityObjectLength): Ditto.
+        (getSelectionOffsetsForObject): Ditto.
+        (webkit_accessible_text_set_selection): Ditto.
+        (webkit_accessible_text_set_caret_offset): Ditto.
+        (webkit_accessible_table_get_caption): Ditto.
+        (getInterfaceMaskFromObject): Ditto.
+
+        * accessibility/gtk/WebKitAccessibleHyperlink.cpp:
+        (getRangeLengthForObject): Ditto.
+
+        Removed unused renderer() method from AccessibilityMenuList.
+
+        * accessibility/AccessibilityMenuList.h: Removed unused method.
+        * accessibility/AccessibilityMenuList.cpp: Removed unused method.
+
 2011-04-06  Alexander Pavlov  <apavlov@chromium.org>
 
         Reviewed by Pavel Feldman.
index bde4cd4..e0c03c3 100644 (file)
@@ -37,11 +37,6 @@ AccessibilityMenuList::AccessibilityMenuList(RenderMenuList* renderer)
 {
 }
 
-RenderMenuList* AccessibilityMenuList::renderer() const
-{
-    return toRenderMenuList(AccessibilityRenderObject::renderer());
-}
-
 bool AccessibilityMenuList::press() const
 {
     RenderMenuList* menuList = static_cast<RenderMenuList*>(m_renderer);
index 4082f0a..cdb3ac2 100644 (file)
@@ -42,8 +42,6 @@ public:
     virtual bool isCollapsed() const;
     virtual bool press() const;
 
-    RenderMenuList* renderer() const;
-
 private:
     AccessibilityMenuList(RenderMenuList*);
 
index 2d27e39..953863f 100644 (file)
@@ -353,6 +353,7 @@ public:
     virtual void setAccessibleName(String&) { }
     
     virtual Node* node() const { return 0; }
+    virtual RenderObject* renderer() const { return 0; }
     virtual bool accessibilityIsIgnored() const  { return true; }
 
     virtual int headingLevel() const { return 0; }
@@ -404,6 +405,7 @@ public:
     virtual void linkedUIElements(AccessibilityChildrenVector&) const { }
     virtual AccessibilityObject* titleUIElement() const { return 0; }
     virtual bool exposesTitleUIElement() const { return true; }
+    virtual AccessibilityObject* correspondingLabelForControlElement() const { return 0; }
     virtual AccessibilityObject* correspondingControlForLabelElement() const { return 0; }
     virtual AccessibilityObject* scrollBar(AccessibilityOrientation) const { return 0; }
     
index 3a29fe9..ccd33d5 100644 (file)
@@ -161,7 +161,7 @@ public:
     virtual IntPoint clickPoint() const;
     
     void setRenderer(RenderObject* renderer) { m_renderer = renderer; }
-    RenderObject* renderer() const { return m_renderer; }
+    virtual RenderObject* renderer() const { return m_renderer; }
     RenderBoxModelObject* renderBoxModelObject() const;
     virtual Node* node() const;
 
index f910ca6..0e720c2 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "AccessibilityObject.h"
 #include "AccessibilityObjectWrapperAtk.h"
-#include "AccessibilityRenderObject.h"
 #include "GOwnPtr.h"
 #include "Range.h"
 #include "SelectElement.h"
@@ -157,7 +156,7 @@ void AXObjectCache::postPlatformNotification(AccessibilityObject* coreObject, AX
     }
 }
 
-static void emitTextChanged(AccessibilityRenderObject* object, AXObjectCache::AXTextChange textChange, unsigned offset, unsigned count)
+static void emitTextChanged(AccessibilityObject* object, AXObjectCache::AXTextChange textChange, unsigned offset, unsigned count)
 {
     // Get the axObject for the parent object
     AtkObject* wrapper = object->parentObjectUnignored()->wrapper();
@@ -187,7 +186,7 @@ void AXObjectCache::nodeTextChangePlatformNotification(AccessibilityObject* obje
 
     Node* node = object->node();
     RefPtr<Range> range = Range::create(node->document(),  Position(node->parentNode(), 0), Position(node, 0));
-    emitTextChanged(toAccessibilityRenderObject(object), textChange, offset + TextIterator::rangeLength(range.get()), count);
+    emitTextChanged(object, textChange, offset + TextIterator::rangeLength(range.get()), count);
 }
 
 void AXObjectCache::handleFocusedUIElementChanged(RenderObject* oldFocusedRender, RenderObject* newFocusedRender)
index a558e22..6d662e4 100644 (file)
@@ -37,7 +37,6 @@
 #include "AccessibilityList.h"
 #include "AccessibilityListBox.h"
 #include "AccessibilityListBoxOption.h"
-#include "AccessibilityRenderObject.h"
 #include "AccessibilityTable.h"
 #include "AccessibilityTableCell.h"
 #include "AccessibilityTableColumn.h"
@@ -171,9 +170,8 @@ static const gchar* webkit_accessible_get_name(AtkObject* object)
     if (!coreObject->isAccessibilityRenderObject())
         return returnString(coreObject->stringValue());
 
-    AccessibilityRenderObject* renderObject = static_cast<AccessibilityRenderObject*>(coreObject);
     if (coreObject->isControl()) {
-        AccessibilityObject* label = renderObject->correspondingLabelForControlElement();
+        AccessibilityObject* label = coreObject->correspondingLabelForControlElement();
         if (label) {
             AtkObject* atkObject = label->wrapper();
             if (ATK_IS_TEXT(atkObject))
@@ -181,13 +179,13 @@ static const gchar* webkit_accessible_get_name(AtkObject* object)
         }
 
         // Try text under the node.
-        String textUnder = renderObject->textUnderElement();
+        String textUnder = coreObject->textUnderElement();
         if (textUnder.length())
             return returnString(textUnder);
     }
 
-    if (renderObject->isImage() || renderObject->isInputImage()) {
-        Node* node = renderObject->renderer()->node();
+    if (coreObject->isImage() || coreObject->isInputImage()) {
+        Node* node = coreObject->node();
         if (node && node->isHTMLElement()) {
             // Get the attribute rather than altText String so as not to fall back on title.
             String alt = toHTMLElement(node)->getAttribute(HTMLNames::altAttr);
@@ -197,7 +195,7 @@ static const gchar* webkit_accessible_get_name(AtkObject* object)
     }
 
     // Fallback for the webArea object: just return the document's title.
-    if (renderObject->isWebArea()) {
+    if (coreObject->isWebArea()) {
         Document* document = coreObject->document();
         if (document)
             return returnString(document->title());
@@ -211,7 +209,7 @@ static const gchar* webkit_accessible_get_description(AtkObject* object)
     AccessibilityObject* coreObject = core(object);
     Node* node = 0;
     if (coreObject->isAccessibilityRenderObject())
-        node = static_cast<AccessibilityRenderObject*>(coreObject)->renderer()->node();
+        node = coreObject->node();
     if (!node || !node->isHTMLElement() || coreObject->ariaRoleAttribute() != UnknownRole)
         return returnString(coreObject->accessibilityDescription());
 
@@ -233,13 +231,12 @@ static const gchar* webkit_accessible_get_description(AtkObject* object)
 
 static void setAtkRelationSetFromCoreObject(AccessibilityObject* coreObject, AtkRelationSet* relationSet)
 {
-    AccessibilityRenderObject* accObject = static_cast<AccessibilityRenderObject*>(coreObject);
-    if (accObject->isControl()) {
-        AccessibilityObject* label = accObject->correspondingLabelForControlElement();
+    if (coreObject->isControl()) {
+        AccessibilityObject* label = coreObject->correspondingLabelForControlElement();
         if (label)
             atk_relation_set_add_relation_by_type(relationSet, ATK_RELATION_LABELLED_BY, label->wrapper());
     } else {
-        AccessibilityObject* control = accObject->correspondingControlForLabelElement();
+        AccessibilityObject* control = coreObject->correspondingControlForLabelElement();
         if (control)
             atk_relation_set_add_relation_by_type(relationSet, ATK_RELATION_LABEL_FOR, control->wrapper());
     }
@@ -823,7 +820,7 @@ static AccessibilityObject* optionFromList(AtkSelection* selection, gint i)
     if (!listObject)
         return 0;
 
-    AccessibilityRenderObject::AccessibilityChildrenVector options = listObject->children();
+    AccessibilityObject::AccessibilityChildrenVector options = listObject->children();
     if (i < static_cast<gint>(options.size()))
         return options.at(i).get();
 
@@ -838,11 +835,11 @@ static AccessibilityObject* optionFromSelection(AtkSelection* selection, gint i)
     if (!coreSelection || !coreSelection->isAccessibilityRenderObject() || i < 0)
         return 0;
 
-    AccessibilityRenderObject::AccessibilityChildrenVector selectedItems;
+    AccessibilityObject::AccessibilityChildrenVector selectedItems;
     if (coreSelection->isListBox())
         coreSelection->selectedChildren(selectedItems);
     else if (coreSelection->isMenuList()) {
-        RenderObject* renderer = toAccessibilityRenderObject(coreSelection)->renderer();
+        RenderObject* renderer = coreSelection->renderer();
         if (!renderer)
             return 0;
 
@@ -883,7 +880,7 @@ static gboolean webkit_accessible_selection_clear_selection(AtkSelection* select
     if (!coreSelection)
         return false;
 
-    AccessibilityRenderObject::AccessibilityChildrenVector selectedItems;
+    AccessibilityObject::AccessibilityChildrenVector selectedItems;
     if (coreSelection->isListBox() || coreSelection->isMenuList()) {
         // Set the list of selected items to an empty list; then verify that it worked.
         AccessibilityListBox* listBox = static_cast<AccessibilityListBox*>(coreSelection);
@@ -913,13 +910,13 @@ static gint webkit_accessible_selection_get_selection_count(AtkSelection* select
         return 0;
 
     if (coreSelection->isListBox()) {
-        AccessibilityRenderObject::AccessibilityChildrenVector selectedItems;
+        AccessibilityObject::AccessibilityChildrenVector selectedItems;
         coreSelection->selectedChildren(selectedItems);
         return static_cast<gint>(selectedItems.size());
     }
 
     if (coreSelection->isMenuList()) {
-        RenderObject* renderer = toAccessibilityRenderObject(coreSelection)->renderer();
+        RenderObject* renderer = coreSelection->renderer();
         if (!renderer)
             return 0;
 
@@ -968,11 +965,11 @@ static gboolean webkit_accessible_selection_select_all_selection(AtkSelection* s
     if (!coreSelection || !coreSelection->isMultiSelectable())
         return false;
 
-    AccessibilityRenderObject::AccessibilityChildrenVector children = coreSelection->children();
+    AccessibilityObject::AccessibilityChildrenVector children = coreSelection->children();
     if (coreSelection->isListBox()) {
         AccessibilityListBox* listBox = static_cast<AccessibilityListBox*>(coreSelection);
         listBox->setSelectedChildren(children);
-        AccessibilityRenderObject::AccessibilityChildrenVector selectedItems;
+        AccessibilityObject::AccessibilityChildrenVector selectedItems;
         listBox->selectedChildren(selectedItems);
         return selectedItems.size() == children.size();
     }
@@ -1089,26 +1086,26 @@ gchar* textForRenderer(RenderObject* renderer)
     return g_string_free(resultText, FALSE);
 }
 
-gchar* textForObject(AccessibilityRenderObject* accObject)
+gchar* textForObject(AccessibilityObject* coreObject)
 {
     GString* str = g_string_new(0);
 
     // For text controls, we can get the text line by line.
-    if (accObject->isTextControl()) {
-        unsigned textLength = accObject->textLength();
+    if (coreObject->isTextControl()) {
+        unsigned textLength = coreObject->textLength();
         int lineNumber = 0;
-        PlainTextRange range = accObject->doAXRangeForLine(lineNumber);
+        PlainTextRange range = coreObject->doAXRangeForLine(lineNumber);
         while (range.length) {
             // When a line of text wraps in a text area, the final space is removed.
             if (range.start + range.length < textLength)
                 range.length -= 1;
-            String lineText = accObject->doAXStringForRange(range);
+            String lineText = coreObject->doAXStringForRange(range);
             g_string_append(str, lineText.utf8().data());
             g_string_append(str, "\n");
-            range = accObject->doAXRangeForLine(++lineNumber);
+            range = coreObject->doAXRangeForLine(++lineNumber);
         }
-    } else if (accObject->isAccessibilityRenderObject()) {
-        GOwnPtr<gchar> rendererText(textForRenderer(accObject->renderer()));
+    } else if (coreObject->isAccessibilityRenderObject()) {
+        GOwnPtr<gchar> rendererText(textForRenderer(coreObject->renderer()));
         g_string_append(str, rendererText.get());
     }
 
@@ -1137,14 +1134,14 @@ static gchar* webkit_accessible_text_get_text(AtkText* text, gint startOffset, g
 
     if (!ret.length()) {
         // This can happen at least with anonymous RenderBlocks (e.g. body text amongst paragraphs)
-        ret = String(textForObject(toAccessibilityRenderObject(coreObject)));
+        ret = String(textForObject(coreObject));
         if (!end)
             end = ret.length();
     }
 
     // Prefix a item number/bullet if needed
     if (coreObject->roleValue() == ListItemRole) {
-        RenderObject* objRenderer = static_cast<AccessibilityRenderObject*>(coreObject)->renderer();
+        RenderObject* objRenderer = coreObject->renderer();
         if (objRenderer && objRenderer->isListItem()) {
             String markerText = toRenderListItem(objRenderer)->markerTextWithSuffix();
             ret = objRenderer->style()->direction() == LTR ? markerText + ret : ret + markerText;
@@ -1180,12 +1177,8 @@ static PangoLayout* getPangoLayoutForAtk(AtkText* textObject)
     if (!webView)
         return 0;
 
-    AccessibilityRenderObject* accObject = static_cast<AccessibilityRenderObject*>(coreObject);
-    if (!accObject)
-        return 0;
-
     // Create a string with the layout as it appears on the screen
-    PangoLayout* layout = gtk_widget_create_pango_layout(static_cast<GtkWidget*>(webView), textForObject(accObject));
+    PangoLayout* layout = gtk_widget_create_pango_layout(static_cast<GtkWidget*>(webView), textForObject(coreObject));
     g_object_set_data_full(G_OBJECT(textObject), "webkit-accessible-pango-layout", layout, g_object_unref);
     return layout;
 }
@@ -1231,7 +1224,7 @@ static gint webkit_accessible_text_get_caret_offset(AtkText* text)
     if (!objectAndOffsetUnignored(focusedObject, offset, !coreObject->isLink()))
         return 0;
 
-    RenderObject* renderer = toAccessibilityRenderObject(coreObject)->renderer();
+    RenderObject* renderer = coreObject->renderer();
     if (renderer && renderer->isListItem()) {
         String markerText = toRenderListItem(renderer)->markerTextWithSuffix();
 
@@ -1243,7 +1236,7 @@ static gint webkit_accessible_text_get_caret_offset(AtkText* text)
     return offset;
 }
 
-static int baselinePositionForAccessibilityRenderObject(RenderObject* renderObject)
+static int baselinePositionForRenderObject(RenderObject* renderObject)
 {
     // FIXME: This implementation of baselinePosition originates from RenderObject.cpp and was
     // removed in r70072. The implementation looks incorrect though, because this is not the
@@ -1257,7 +1250,7 @@ static AtkAttributeSet* getAttributeSetForAccessibilityObject(const Accessibilit
     if (!object->isAccessibilityRenderObject())
         return 0;
 
-    RenderObject* renderer = static_cast<const AccessibilityRenderObject*>(object)->renderer();
+    RenderObject* renderer = object->renderer();
     RenderStyle* style = renderer->style();
 
     AtkAttributeSet* result = 0;
@@ -1282,10 +1275,10 @@ static AtkAttributeSet* getAttributeSetForAccessibilityObject(const Accessibilit
     bool includeRise = true;
     switch (style->verticalAlign()) {
     case SUB:
-        baselinePosition = -1 * baselinePositionForAccessibilityRenderObject(renderer);
+        baselinePosition = -1 * baselinePositionForRenderObject(renderer);
         break;
     case SUPER:
-        baselinePosition = baselinePositionForAccessibilityRenderObject(renderer);
+        baselinePosition = baselinePositionForRenderObject(renderer);
         break;
     case BASELINE:
         baselinePosition = 0;
@@ -1431,7 +1424,7 @@ static guint accessibilityObjectLength(const AccessibilityObject* object)
     // Technologies, we need to have a way to measure their length
     // for those cases when it's needed to take it into account
     // separately (as in getAccessibilityObjectForOffset)
-    RenderObject* renderer = static_cast<const AccessibilityRenderObject*>(object)->renderer();
+    RenderObject* renderer = object->renderer();
     if (renderer && renderer->isListMarker()) {
         RenderListMarker* marker = toRenderListMarker(renderer);
         return marker->text().length() + marker->suffix().length();
@@ -1630,7 +1623,7 @@ static void getSelectionOffsetsForObject(AccessibilityObject* coreObject, Visibl
     startOffset = TextIterator::rangeLength(rangeInParent.get());
 
     // We need to adjust the offsets for the list item marker.
-    RenderObject* renderer = toAccessibilityRenderObject(coreObject)->renderer();
+    RenderObject* renderer = coreObject->renderer();
     if (renderer && renderer->isListItem()) {
         String markerText = toRenderListItem(renderer)->markerTextWithSuffix();
         startOffset += markerText.length();
@@ -1704,7 +1697,7 @@ static gboolean webkit_accessible_text_set_selection(AtkText* text, gint selecti
         endOffset = textCount;
 
     // We need to adjust the offsets for the list item marker.
-    RenderObject* renderer = toAccessibilityRenderObject(coreObject)->renderer();
+    RenderObject* renderer = coreObject->renderer();
     if (renderer && renderer->isListItem()) {
         String markerText = toRenderListItem(renderer)->markerTextWithSuffix();
         int markerLength = markerText.length();
@@ -1747,7 +1740,7 @@ static gboolean webkit_accessible_text_set_caret_offset(AtkText* text, gint offs
     if (!coreObject->isAccessibilityRenderObject())
         return FALSE;
 
-    RenderObject* renderer = toAccessibilityRenderObject(coreObject)->renderer();
+    RenderObject* renderer = coreObject->renderer();
     if (renderer && renderer->isListItem()) {
         String markerText = toRenderListItem(renderer)->markerTextWithSuffix();
         int markerLength = markerText.length();
@@ -2117,7 +2110,7 @@ static AtkObject* webkit_accessible_table_get_caption(AtkTable* table)
 {
     AccessibilityObject* accTable = core(table);
     if (accTable->isAccessibilityRenderObject()) {
-        Node* node = static_cast<AccessibilityRenderObject*>(accTable)->renderer()->node();
+        Node* node = accTable->node();
         if (node && node->hasTagName(HTMLNames::tableTag)) {
             HTMLTableCaptionElement* caption = static_cast<HTMLTableElement*>(node)->caption();
             if (caption)
@@ -2472,7 +2465,7 @@ static guint16 getInterfaceMaskFromObject(AccessibilityObject* coreObject)
             // Add the TEXT interface for list items whose
             // first accessible child has a text renderer
             if (role == ListItemRole) {
-                AccessibilityObject::AccessibilityChildrenVector children = axRenderObject->children();
+                AccessibilityObject::AccessibilityChildrenVector children = coreObject->children();
                 if (children.size()) {
                     AccessibilityObject* axRenderChild = children.at(0).get();
                     interfaceMask |= getInterfaceMaskFromObject(axRenderChild);
index b9e483c..5d36e9d 100644 (file)
@@ -25,7 +25,6 @@
 #include "AXObjectCache.h"
 #include "AccessibilityObject.h"
 #include "AccessibilityObjectWrapperAtk.h"
-#include "AccessibilityRenderObject.h"
 #include "NotImplemented.h"
 #include "Position.h"
 #include "Range.h"
@@ -215,7 +214,7 @@ static gint getRangeLengthForObject(AccessibilityObject* obj, Range* range)
     if (!markerObj)
         return baseLength;
 
-    RenderObject* renderer = static_cast<const AccessibilityRenderObject*>(markerObj)->renderer();
+    RenderObject* renderer = markerObj->renderer();
     if (!renderer || !renderer->isListMarker())
         return baseLength;