WebCore:
authoralice.liu@apple.com <alice.liu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 May 2008 05:35:24 +0000 (05:35 +0000)
committeralice.liu@apple.com <alice.liu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 May 2008 05:35:24 +0000 (05:35 +0000)
2008-05-06  Alice Liu  <alice.liu@apple.com>

        Reviewed by Adele Peterson and John Sullivan.

        changes needed to build on Windows after r32911 and r32927

        * WebCore.vcproj/WebCore.vcproj:
        * page/AXObjectCache.cpp:
        (WebCore::AXObjectCache::selectedChildrenChanged):
        * page/AccessibilityObject.h:
        (WebCore::AccessibilityObject::document):
        (WebCore::AccessibilityObject::topDocumentFrameView):
        (WebCore::AccessibilityObject::documentFrameView):
        * page/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::document):
        (WebCore::AccessibilityRenderObject::topDocumentFrameView):
        (WebCore::AccessibilityRenderObject::documentFrameView):
        * page/AccessibilityRenderObject.h:
        * page/mac/AXObjectCacheMac.mm:
        * page/mac/AccessibilityObjectWrapper.mm:
        (-[AccessibilityObjectWrapper position]):
        (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):

WebKit/win:

2008-05-06  Alice Liu  <alice.liu@apple.com>

        Reviewed by Adele Peterson and John Sullivan.

        changes needed to build on Windows after r32911 and r32927

        * AccessibleBase.cpp:
        (AccessibleBase::get_accParent):
        * AccessibleDocument.cpp:
        (AccessibleDocument::document):

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

WebCore/ChangeLog
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/page/AXObjectCache.cpp
WebCore/page/AccessibilityObject.h
WebCore/page/AccessibilityRenderObject.cpp
WebCore/page/AccessibilityRenderObject.h
WebCore/page/mac/AXObjectCacheMac.mm
WebCore/page/mac/AccessibilityObjectWrapper.mm
WebKit/win/AccessibleBase.cpp
WebKit/win/AccessibleDocument.cpp
WebKit/win/ChangeLog

index 611ad2a..8780875 100644 (file)
@@ -1,3 +1,26 @@
+2008-05-06  Alice Liu  <alice.liu@apple.com>
+
+        Reviewed by Adele Peterson and John Sullivan.
+
+        changes needed to build on Windows after r32911 and r32927
+
+        * WebCore.vcproj/WebCore.vcproj:
+        * page/AXObjectCache.cpp:
+        (WebCore::AXObjectCache::selectedChildrenChanged):
+        * page/AccessibilityObject.h:
+        (WebCore::AccessibilityObject::document):
+        (WebCore::AccessibilityObject::topDocumentFrameView):
+        (WebCore::AccessibilityObject::documentFrameView):
+        * page/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::document):
+        (WebCore::AccessibilityRenderObject::topDocumentFrameView):
+        (WebCore::AccessibilityRenderObject::documentFrameView):
+        * page/AccessibilityRenderObject.h:
+        * page/mac/AXObjectCacheMac.mm:
+        * page/mac/AccessibilityObjectWrapper.mm:
+        (-[AccessibilityObjectWrapper position]):
+        (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+
 2008-05-06  Brady Eidson  <beidson@apple.com>
 
         Reviewed by Sam Weinig
index 68c0263..80dda1c 100644 (file)
                        Name="page"\r
                        >\r
                        <File\r
+                               RelativePath="..\page\AccessibilityListBox.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\page\AccessibilityListBox.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\page\AccessibilityListBoxOption.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\page\AccessibilityListBoxOption.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\page\AccessibilityObject.cpp"\r
                                >\r
                        </File>\r
index 05b5160..dac7bb3 100644 (file)
@@ -180,4 +180,9 @@ void AXObjectCache::childrenChanged(RenderObject* renderer)
         obj->childrenChanged();
 }
 
+void AXObjectCache::selectedChildrenChanged(RenderObject* renderer)
+{
+    postNotificationToElement(renderer, "AXSelectedChildrenChanged");
+}
+
 } // namespace WebCore
index 5079c7c..46ed61b 100644 (file)
@@ -270,7 +270,10 @@ public:
     virtual Widget* widget() const;
     virtual Widget* widgetForAttachmentView() const;
     void getDocumentLinks(Vector< RefPtr<AccessibilityObject> >&) const;
-    
+    virtual Document* document() const { return 0; }
+    virtual FrameView* topDocumentFrameView() const { return 0; }
+    virtual FrameView* documentFrameView() const { return 0; }
+
     void setAXObjectID(unsigned);
     virtual void setFocused(bool);
     virtual void setSelectedText(const String&);
index 628f58e..6f7c3e1 100644 (file)
@@ -1037,6 +1037,16 @@ RenderObject* AccessibilityRenderObject::topRenderer() const
     return m_renderer->document()->topDocument()->renderer();
 }
 
+Document* AccessibilityRenderObject::document() const
+{
+    return m_renderer->document();
+}
+
+FrameView* AccessibilityRenderObject::topDocumentFrameView() const
+{
+    return topRenderer()->view()->frameView();
+}
+
 Widget* AccessibilityRenderObject::widget() const
 {
     if (!m_renderer->isWidget())
@@ -1068,6 +1078,15 @@ void AccessibilityRenderObject::getDocumentLinks(Vector<RefPtr<AccessibilityObje
     }
 }
 
+FrameView* AccessibilityRenderObject::documentFrameView() const 
+{ 
+    if (!m_renderer || !m_renderer->document()) 
+        return 0; 
+
+    // this is the RenderObject's Document's Frame's FrameView 
+    return m_renderer->document()->view();
+}
+
 Widget* AccessibilityRenderObject::widgetForAttachmentView() const
 {
     if (!isAttachment())
index facc871..1e2f631 100644 (file)
@@ -127,6 +127,8 @@ public:
     RenderObject* renderer() const { return m_renderer; }
     RenderObject* topRenderer() const;
     RenderTextControl* textControl() const;
+    Document* document() const;
+    FrameView* topDocumentFrameView() const;  
     
     virtual KURL url() const;
     virtual PlainTextRange selectedTextRange() const;
@@ -148,6 +150,7 @@ public:
     virtual Widget* widget() const;
     virtual Widget* widgetForAttachmentView() const;
     virtual void getDocumentLinks(Vector< RefPtr<AccessibilityObject> >&) const;
+    virtual FrameView* documentFrameView() const;
     
     virtual const Vector<RefPtr<AccessibilityObject> >& children();
     
index ad3427a..10ae1cc 100644 (file)
@@ -49,11 +49,6 @@ void AXObjectCache::attachWrapper(AccessibilityObject* obj)
     obj->setWrapper([[AccessibilityObjectWrapper alloc] initWithAccessibilityObject:obj]);
 }
 
-void AXObjectCache::selectedChildrenChanged(RenderObject* renderer)
-{
-    postNotificationToElement(renderer, "AXSelectedChildrenChanged");
-}
-
 void AXObjectCache::postNotification(RenderObject* renderer, const String& message)
 {
     if (!renderer)
index c8dfeb9..2ccca40 100644 (file)
@@ -621,29 +621,13 @@ static NSMutableArray* convertToNSArray(const Vector<RefPtr<AccessibilityObject>
     return textMarkerRangeFromVisiblePositions(selection.visibleStart(), selection.visibleEnd());
 }
 
-- (FrameView *)documentFrameView:(AccessibilityObject *)object
-{
-    while (object && !object->isAccessibilityRenderObject()) 
-        object = object->parentObject();
-    
-    RenderObject* renderer = 0;
-    if (object)
-        renderer = static_cast<AccessibilityRenderObject*>(object)->renderer();
-    
-    if (!renderer || !renderer->document())
-        return 0;
-    
-    // this is the RenderObject's Document's Frame's FrameView
-    return renderer->document()->view();    
-}
-
 - (NSValue*)position
 {
     IntRect rect = m_object->elementRect();
     
     // The Cocoa accessibility API wants the lower-left corner.
     NSPoint point = NSMakePoint(rect.x(), rect.bottom());
-    FrameView* frameView = [self documentFrameView:m_object];
+    FrameView* frameView = m_object->documentFrameView();
     if (frameView) {
         NSView* view = frameView->documentView();
         point = [[view window] convertBaseToScreen: [view convertPoint: point toView:nil]];
@@ -958,7 +942,7 @@ static NSString* roleValueToNSString(AccessibilityRole value)
         return [self position];
 
     if ([attributeName isEqualToString: NSAccessibilityWindowAttribute]) {
-        FrameView* fv = [self documentFrameView:m_object];
+        FrameView* fv = m_object->documentFrameView();
         if (fv)
             return [fv->getView() window];
         return nil;
index 8cbb47f..5c534b8 100644 (file)
@@ -102,7 +102,7 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::get_accParent(IDispatch** parent)
     if (!m_object)
         return E_FAIL;
 
-    return WebView::AccessibleObjectFromWindow(m_object->topRenderer()->view()->frameView()->containingWindow(),
+    return WebView::AccessibleObjectFromWindow(m_object->topDocumentFrameView()->containingWindow(),
         OBJID_WINDOW, __uuidof(IAccessible), reinterpret_cast<void**>(parent));
 }
 
index 6dfa466..600443f 100644 (file)
@@ -42,5 +42,5 @@ Document* AccessibleDocument::document() const
 {
     if (!m_object)
         return 0;
-    return m_object->renderer()->document();
+    return m_object->document();
 }
index e952181..ec3b72a 100644 (file)
@@ -1,3 +1,14 @@
+2008-05-06  Alice Liu  <alice.liu@apple.com>
+
+        Reviewed by Adele Peterson and John Sullivan.
+
+        changes needed to build on Windows after r32911 and r32927
+
+        * AccessibleBase.cpp:
+        (AccessibleBase::get_accParent):
+        * AccessibleDocument.cpp:
+        (AccessibleDocument::document):
+
 2008-05-06  Brady Eidson  <beidson@apple.com>
 
         Reviewed by Darin Adler