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

cfleizach at apple.com cfleizach at apple.com
Wed Dec 22 11:30:16 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit eaf882b60d969daa98e3a334d3e39e77b7bfae50
Author: cfleizach at apple.com <cfleizach at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jul 27 17:14:12 2010 +0000

    AX: consolidate parentObjectIfExists() and parentObject() code
    https://bugs.webkit.org/show_bug.cgi?id=42981
    
    Reviewed by Darin Adler.
    
    Consolidate duplicate code in parentObject and parentObjectIfExists
    
    No tests. No functionality changed.
    
    * accessibility/AccessibilityRenderObject.cpp:
    (WebCore::AccessibilityRenderObject::renderParentObject):
    (WebCore::AccessibilityRenderObject::parentObjectIfExists):
    (WebCore::AccessibilityRenderObject::parentObject):
    * accessibility/AccessibilityRenderObject.h:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64139 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c499a68..fc9d9e5 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,22 @@
 2010-07-27  Chris Fleizach  <cfleizach at apple.com>
 
+        Reviewed by Darin Adler.
+
+        AX: consolidate parentObjectIfExists() and parentObject() code
+        https://bugs.webkit.org/show_bug.cgi?id=42981
+
+        Consolidate duplicate code in parentObject and parentObjectIfExists
+
+        No tests. No functionality changed.
+
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::renderParentObject):
+        (WebCore::AccessibilityRenderObject::parentObjectIfExists):
+        (WebCore::AccessibilityRenderObject::parentObject):
+        * accessibility/AccessibilityRenderObject.h:
+
+2010-07-27  Chris Fleizach  <cfleizach at apple.com>
+
         Reviewed by Adam Barth.
 
         AX: replace m_renderer->document->axObjectCache() with just axObjectCache()
diff --git a/WebCore/accessibility/AccessibilityRenderObject.cpp b/WebCore/accessibility/AccessibilityRenderObject.cpp
index 70e07d2..5144950 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -357,7 +357,7 @@ AccessibilityObject* AccessibilityRenderObject::nextSibling() const
     return axObjectCache()->getOrCreate(nextSibling);
 }
 
-AccessibilityObject* AccessibilityRenderObject::parentObjectIfExists() const
+RenderObject* AccessibilityRenderObject::renderParentObject() const
 {
     if (!m_renderer)
         return 0;
@@ -374,11 +374,13 @@ AccessibilityObject* AccessibilityRenderObject::parentObjectIfExists() const
     // the earliest node in the continuation chain.
     else if (parent && parent->isRenderInline() && (startOfConts = startOfContinuations(parent)))
         parent = startOfConts;
-
-    if (!parent)
-        return 0;
-
-    return axObjectCache()->get(parent);
+    
+    return parent;
+}
+    
+AccessibilityObject* AccessibilityRenderObject::parentObjectIfExists() const
+{
+    return axObjectCache()->get(renderParentObject());
 }
     
 AccessibilityObject* AccessibilityRenderObject::parentObject() const
@@ -386,24 +388,8 @@ AccessibilityObject* AccessibilityRenderObject::parentObject() const
     if (!m_renderer)
         return 0;
     
-    RenderObject* parent = m_renderer->parent();
-
-    // Case 1: node is a block and is an inline's continuation. Parent
-    // is the start of the continuation chain.
-    RenderInline* startOfConts = 0;
-    if (m_renderer->isRenderBlock() && (startOfConts = startOfContinuations(m_renderer)))
-        parent = 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)
-        return 0;
-    
     if (ariaRoleAttribute() == MenuBarRole)
-        return axObjectCache()->getOrCreate(parent);
+        return axObjectCache()->getOrCreate(m_renderer->parent());
 
     // menuButton and its corresponding menu are DOM siblings, but Accessibility needs them to be parent/child
     if (ariaRoleAttribute() == MenuRole) {
@@ -412,7 +398,7 @@ AccessibilityObject* AccessibilityRenderObject::parentObject() const
             return parent;
     }
     
-    return axObjectCache()->getOrCreate(parent);
+    return axObjectCache()->getOrCreate(renderParentObject());
 }
 
 bool AccessibilityRenderObject::isWebArea() const
diff --git a/WebCore/accessibility/AccessibilityRenderObject.h b/WebCore/accessibility/AccessibilityRenderObject.h
index 86fcbd4..c05bc2d 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.h
+++ b/WebCore/accessibility/AccessibilityRenderObject.h
@@ -290,6 +290,7 @@ private:
     AccessibilityObject* accessibilityImageMapHitTest(HTMLAreaElement*, const IntPoint&) const;
     AccessibilityObject* accessibilityParentForImageMap(HTMLMapElement* map) const;
     bool renderObjectIsObservable(RenderObject*) const;
+    RenderObject* renderParentObject() const;
     
     void ariaSelectedRows(AccessibilityChildrenVector&);
     

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list