1. 15 Apr, 2008 1 commit
  2. 04 Apr, 2008 3 commits
    • jhoneycutt@apple.com's avatar
      2008-04-04 Jon Honeycutt <jhoneycutt@apple.com> · 3da811d0
      jhoneycutt@apple.com authored
              Reviewed by Oliver.
      
              Replace AccessibilityObject::isRenderImage() with a virtual
              RenderObject::isRenderImage().
      
              * page/AccessibilityObject.cpp:
              (WebCore::AccessibilityObject::accessibilityIsIgnored):
              (WebCore::AccessibilityObject::addChildren):
              * page/AccessibilityObject.h:
              (WebCore::AccessibilityObject::isDetached):
              * rendering/RenderImage.h:
              (WebCore::RenderImage::isRenderImage):
              * rendering/RenderObject.h:
              (WebCore::RenderObject::isRenderImage):
      
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3da811d0
    • jhoneycutt@apple.com's avatar
      2008-04-04 Jon Honeycutt <jhoneycutt@apple.com> · 760da6dc
      jhoneycutt@apple.com authored
              Reviewed by Beth.
      
              Some more clean-up of AccessibilityObject:
              - Rearranged/grouped methods.
              - Marked many methods const.
              - Changed many methods to take args by const ref instead of by val.
              - Made headingLevel() static.
              - Renamed detached() to isDetached(), loaded() to isLoaded(),
                documentLinks to getDocumentLinks().
              - Made clearChildren(), removeAXObjectID(), isDetached() private.
              - Added notImplemented() calls for unimplemented methods.
              - Replaced stringForReplacedNode method with static function.
      
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      760da6dc
    • jhoneycutt@apple.com's avatar
      2008-04-04 Jon Honeycutt <jhoneycutt@apple.com> · 47e63d77
      jhoneycutt@apple.com authored
              Reviewed by Beth.
      
              Some clean up of AccessibilityObject:
              - Use existing isImage() in more places.
              - Use existing isTextControl() in more places.
              - Added isRenderImage(). Check this before casting to RenderImage,
                since other, non-RenderImage derived RenderObjects (e.g.
                RenderListMarker) can return true for isImage().
              - Fix two copy/paste errors with improper semicolons.
      
              * page/AccessibilityObject.cpp:
              (WebCore::AccessibilityObject::isImageButton): Use isImage().
              (WebCore::AccessibilityObject::isRenderImage): Added.
              (WebCore::AccessibilityObject::isAnchor): Use isImage().
              (WebCore::AccessibilityObject::isAttachment): Same.
              (WebCore::AccessibilityObject::accessibilityDescription): Same.
              (WebCore::AccessibilityObject::accessibilityIsIgnored): Use
              isRenderImage() instead of isImage().
              (WebCore::AccessibilityObject::url): Use isImage().
              (WebCore::AccessibilityObject::textControl): Remove improper semicolon, 
              and use isTextControl().
              (WebCore::AccessibilityObject::textMarkerForIndex): Same.
              (WebCore::AccessibilityObject::indexForTextMarker): Use isTextControl().
              (WebCore::AccessibilityObject::doAXRangeForLine): Same.
              (WebCore::AccessibilityObject::doAXRangeForIndex): Same
              (WebCore::AccessibilityObject::doAXStringForRange): Same.
              (WebCore::AccessibilityObject::roleValue):  Use isImage().
              (WebCore::AccessibilityObject::addChildren): Use isRenderImage().
              * page/AccessibilityObject.h:
      
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      47e63d77
  3. 03 Apr, 2008 1 commit
    • bdakin@apple.com's avatar
      2008-04-02 Beth Dakin <bdakin@apple.com> · 27bfeaf8
      bdakin@apple.com authored
              Reviewed by Hyatt.
      
              This patch eliminates AccessibilityObjectMac. All of the platform-
              specific code is now in AccessibilityObjectWrapper.
      
              * WebCore.xcodeproj/project.pbxproj:
              * dom/Element.h:
              (WebCore::Element::isPasswordField):
              * html/HTMLInputElement.h:
              (WebCore::HTMLInputElement::isPasswordField):
              * page/AXObjectCache.h:
              (WebCore::AXObjectCache::isIDinUse):
              * page/AccessibilityObject.cpp:
              (WebCore::AccessibilityObject::isPasswordField):
              (WebCore::AccessibilityObject::press):
              (WebCore::AccessibilityObject::widgetForAttachmentView):
              (WebCore::AccessibilityObject::doAXBoundsForTextMarkerRange):
              (WebCore::AccessibilityObject::doAXTextMarkerForPosition):
              * page/AccessibilityObject.h:
              (WebCore::AccessibilityObject::areaElement):
              (WebCore::AccessibilityObject::setWrapper):
              * page/mac/AXObjectCacheMac.mm:
              * page/mac/AccessibilityObjectMac.mm: Removed.
              * page/mac/AccessibilityObjectWrapper.h:
              * page/mac/AccessibilityObjectWrapper.mm:
              (-[AccessibilityObjectWrapper attachmentView]):
              (textMarkerForVisiblePosition):
              (visiblePositionForTextMarker):
              (visiblePositionForStartOfTextMarkerRange):
              (visiblePositionForEndOfTextMarkerRange):
              (textMarkerRangeFromMarkers):
              (AXAttributeStringSetFont):
              (CreateCGColorIfDifferent):
              (AXAttributeStringSetColor):
              (AXAttributeStringSetNumber):
              (AXAttributeStringSetStyle):
              (blockquoteLevel):
              (AXAttributeStringSetBlockquoteLevel):
              (AXAttributeStringSetSpelling):
              (AXAttributeStringSetHeadingLevel):
              (AXLinkElementForNode):
              (AXAttributeStringSetElement):
              (AXAttributedStringAppendText):
              (nsStringForReplacedNode):
              (-[AccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]):
              (textMarkerRangeFromVisiblePositions):
              (-[AccessibilityObjectWrapper accessibilityActionNames]):
              (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
              (-[AccessibilityObjectWrapper visiblePositionRangeForTextMarkerRange:]):
              (-[AccessibilityObjectWrapper textMarkerRangeForSelection]):
              (-[AccessibilityObjectWrapper position]):
              (createAccessibilityRoleMap):
              (RoleEntry::):
              (roleValueToNSString):
              (-[AccessibilityObjectWrapper role]):
              (-[AccessibilityObjectWrapper subrole]):
              (-[AccessibilityObjectWrapper roleDescription]):
              (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
              (-[AccessibilityObjectWrapper accessibilityIsIgnored]):
              (-[AccessibilityObjectWrapper accessibilityPerformAction:]):
              (-[AccessibilityObjectWrapper doAXAttributedStringForRange:]):
              (-[AccessibilityObjectWrapper doAXRTFForRange:]):
              (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
              (-[AccessibilityObjectWrapper accessibilityShouldUseUniqueId]):
              * platform/ScrollView.h:
              * platform/mac/ScrollViewMac.mm:
              (WebCore::ScrollView::viewRectToScreen):
              (WebCore::ScrollView::absolutePointToView):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31608 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      27bfeaf8
  4. 01 Apr, 2008 3 commits
    • darin@apple.com's avatar
      2008-04-01 Darin Adler <darin@apple.com> · 2c6695d5
      darin@apple.com authored
              Reviewed by Sam.
      
              - speed up hasChildNodes, which does not need to be virtual
      
              * dom/ContainerNode.cpp: Removed hasChildNodes.
              * dom/ContainerNode.h: Added non-virtual inline hasChildNodes.
              * dom/Node.cpp: Removed hasChildNodes.
              * dom/Node.h: Added non-vritual inline hasChildNodes.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31526 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2c6695d5
    • hausmann@webkit.org's avatar
      Fix the non-mac build. · 2120e612
      hausmann@webkit.org authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31522 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2120e612
    • alice.liu@apple.com's avatar
      WebCore: · 3b8e8b97
      alice.liu@apple.com authored
      2008-04-01  Alice Liu  <alice.liu@apple.com>
              Patch by Beth Dakin <bdakin@apple.com> and Alice Liu
      
              Reviewed by Darin.
      
              Refactored WebCore Accessibility code.  Prior to this patch, WebCore
              accessibility was implemented in an ObjC class named WebCoreAXObject,
              with much of the "guts" in C++.  This patch the next natural step of
              factoring out the C++ code into a class named AccessibilityObject, and 
              in order to maintain the required ObjC object ties, also implements an
              ObjC class named AccessibilityObjectWrapper as a thin wrapper around the
              C++ object.  Internally within WebCore we operate on the C++ object as
              much as possible, and the ObjC object gets used mostly when we need to
              return something to AppKit or call something implemented on NSObject.
              The AXObjectCache still keeps one HashMap, now of RenderObjects to
              AccessibilityObjects instead of WebCoreAXObjects, and the
              AccessibilityObject keeps track of its ObjC wrapper.
      
              * WebCore.xcodeproj/project.pbxproj:
              * page/AXObjectCache.h:
              (WebCore::AXObjectCache::get):
              (WebCore::AXObjectCache::removeAXID):
              * page/AccessibilityObject.cpp: Added.
              (WebCore::AccessibilityObject::AccessibilityObject):
              (WebCore::AccessibilityObject::~AccessibilityObject):
              (WebCore::AccessibilityObject::create):
              (WebCore::AccessibilityObject::detach):
              (WebCore::AccessibilityObject::firstChild):
              (WebCore::AccessibilityObject::lastChild):
              (WebCore::AccessibilityObject::previousSibling):
              (WebCore::AccessibilityObject::nextSibling):
              (WebCore::AccessibilityObject::parentObject):
              (WebCore::AccessibilityObject::parentObjectUnignored):
              (WebCore::AccessibilityObject::isWebArea):
              (WebCore::AccessibilityObject::isImageButton):
              (WebCore::AccessibilityObject::isAnchor):
              (WebCore::AccessibilityObject::isTextControl):
              (WebCore::AccessibilityObject::isImage):
              (WebCore::AccessibilityObject::isAttachment):
              (WebCore::isPasswordFieldElement):
              (WebCore::AccessibilityObject::isPasswordField):
              (WebCore::AccessibilityObject::headingLevel):
              (WebCore::AccessibilityObject::isHeading):
              (WebCore::AccessibilityObject::anchorElement):
              (WebCore::isCheckboxOrRadio):
              (WebCore::AccessibilityObject::actionElement):
              (WebCore::AccessibilityObject::mouseButtonListener):
              (WebCore::AccessibilityObject::helpText):
              (WebCore::AccessibilityObject::textUnderElement):
              (WebCore::AccessibilityObject::hasIntValue):
              (WebCore::AccessibilityObject::intValue):
              (WebCore::AccessibilityObject::stringValue):
              (WebCore::labelForElement):
              (WebCore::AccessibilityObject::title):
              (WebCore::AccessibilityObject::accessibilityDescription):
              (WebCore::AccessibilityObject::boundingBoxRect):
              (WebCore::AccessibilityObject::size):
              (WebCore::AccessibilityObject::linkedUIElement):
              (WebCore::AccessibilityObject::accessibilityShouldUseUniqueId):
              (WebCore::AccessibilityObject::accessibilityIsIgnored):
              (WebCore::AccessibilityObject::loaded):
              (WebCore::AccessibilityObject::layoutCount):
              (WebCore::AccessibilityObject::textLength):
              (WebCore::AccessibilityObject::selectedText):
              (WebCore::AccessibilityObject::selection):
              (WebCore::AccessibilityObject::selectedTextRange):
              (WebCore::AccessibilityObject::setSelectedText):
              (WebCore::AccessibilityObject::setSelectedTextRange):
              (WebCore::AccessibilityObject::makeRangeVisible):
              (WebCore::AccessibilityObject::url):
              (WebCore::AccessibilityObject::isVisited):
              (WebCore::AccessibilityObject::isFocused):
              (WebCore::AccessibilityObject::setFocused):
              (WebCore::AccessibilityObject::setValue):
              (WebCore::AccessibilityObject::isEnabled):
              (WebCore::AccessibilityObject::press):
              (WebCore::AccessibilityObject::topRenderer):
              (WebCore::AccessibilityObject::textControl):
              (WebCore::AccessibilityObject::widget):
              (WebCore::AccessibilityObject::axObjectCache):
              (WebCore::AccessibilityObject::documentLinks):
              (WebCore::AccessibilityObject::documentFrameView):
              (WebCore::AccessibilityObject::frameViewIfRenderView):
              (WebCore::AccessibilityObject::visiblePositionRange):
              (WebCore::AccessibilityObject::doAXTextMarkerRangeForLine):
              (WebCore::AccessibilityObject::doAXTextMarkerRangeForUnorderedTextMarkers):
              (WebCore::AccessibilityObject::doAXLeftWordTextMarkerRangeForTextMarker):
              (WebCore::AccessibilityObject::doAXRightWordTextMarkerRangeForTextMarker):
              (WebCore::updateAXLineStartForVisiblePosition):
              (WebCore::AccessibilityObject::doAXLeftLineTextMarkerRangeForTextMarker):
              (WebCore::AccessibilityObject::doAXRightLineTextMarkerRangeForTextMarker):
              (WebCore::AccessibilityObject::doAXSentenceTextMarkerRangeForTextMarker):
              (WebCore::AccessibilityObject::doAXParagraphTextMarkerRangeForTextMarker):
              (WebCore::startOfStyleRange):
              (WebCore::endOfStyleRange):
              (WebCore::AccessibilityObject::doAXStyleTextMarkerRangeForTextMarker):
              (WebCore::AccessibilityObject::textMarkerRangeForRange):
              (WebCore::AccessibilityObject::stringForReplacedNode):
              (WebCore::AccessibilityObject::doAXStringForTextMarkerRange):
              (WebCore::AccessibilityObject::doAXBoundsForTextMarkerRange):
              (WebCore::AccessibilityObject::doAXLengthForTextMarkerRange):
              (WebCore::AccessibilityObject::doSetAXSelectedTextMarkerRange):
              (WebCore::AccessibilityObject::doAXTextMarkerForPosition):
              (WebCore::AccessibilityObject::doAXNextTextMarkerForTextMarker):
              (WebCore::AccessibilityObject::doAXPreviousTextMarkerForTextMarker):
              (WebCore::AccessibilityObject::doAXNextWordEndTextMarkerForTextMarker):
              (WebCore::AccessibilityObject::doAXPreviousWordStartTextMarkerForTextMarker):
              (WebCore::AccessibilityObject::doAXNextLineEndTextMarkerForTextMarker):
              (WebCore::AccessibilityObject::doAXPreviousLineStartTextMarkerForTextMarker):
              (WebCore::AccessibilityObject::doAXNextSentenceEndTextMarkerForTextMarker):
              (WebCore::AccessibilityObject::doAXPreviousSentenceStartTextMarkerForTextMarker):
              (WebCore::AccessibilityObject::doAXNextParagraphEndTextMarkerForTextMarker):
              (WebCore::AccessibilityObject::doAXPreviousParagraphStartTextMarkerForTextMarker):
              (WebCore::AccessibilityObject::textMarkerForIndex):
              (WebCore::AccessibilityObject::doAXUIElementForTextMarker):
              (WebCore::AccessibilityObject::doAXLineForTextMarker):
              (WebCore::AccessibilityObject::rangeForTextMarkerRange):
              (WebCore::AccessibilityObject::indexForTextMarker):
              (WebCore::AccessibilityObject::doAXRangeForLine):
              (WebCore::AccessibilityObject::doAXRangeForPosition):
              (WebCore::AccessibilityObject::doAXRangeForIndex):
              (WebCore::AccessibilityObject::doAXStyleRangeForIndex):
              (WebCore::AccessibilityObject::doAXStringForRange):
              (WebCore::AccessibilityObject::doAXBoundsForRange):
              (WebCore::AccessibilityObject::doAXLineForIndex):
              (WebCore::AccessibilityObject::doAccessibilityHitTest):
              (WebCore::AccessibilityObject::focusedUIElement):
              (WebCore::AccessibilityObject::observableObject):
              (WebCore::AccessibilityObject::roleValue):
              (WebCore::AccessibilityObject::canSetFocusAttribute):
              (WebCore::AccessibilityObject::canSetValueAttribute):
              (WebCore::AccessibilityObject::canSetTextRangeAttributes):
              (WebCore::AccessibilityObject::childrenChanged):
              (WebCore::AccessibilityObject::clearChildren):
              (WebCore::AccessibilityObject::hasChildren):
              (WebCore::AccessibilityObject::addChildren):
              (WebCore::AccessibilityObject::axObjectID):
              (WebCore::AccessibilityObject::setAXObjectID):
              (WebCore::AccessibilityObject::removeAXObjectID):
              * page/AccessibilityObject.h: Added.
              (WebCore::):
              (WebCore::VisiblePositionRange::VisiblePositionRange):
              (WebCore::VisiblePositionRange::isNull):
              (WebCore::AccessibilityObject::detached):
              (WebCore::AccessibilityObject::PlainTextRange::PlainTextRange):
              (WebCore::AccessibilityObject::PlainTextRange::isNull):
              (WebCore::AccessibilityObject::renderer):
              (WebCore::AccessibilityObject::children):
              (WebCore::AccessibilityObject::wrapper):
              (WebCore::AccessibilityObject::setWrapper):
              * page/mac/AXObjectCacheMac.mm:
              (WebCore::AXObjectCache::~AXObjectCache):
              (WebCore::AXObjectCache::get):
              (WebCore::AXObjectCache::remove):
              (WebCore::AXObjectCache::getAXID):
              (WebCore::AXObjectCache::removeAXID):
              (WebCore::AXObjectCache::textMarkerForVisiblePosition):
              (WebCore::AXObjectCache::childrenChanged):
              (WebCore::AXObjectCache::postNotification):
              (WebCore::AXObjectCache::postNotificationToElement):
              * page/mac/AccessibilityObjectMac.mm: Added.
              (createAccessibilityRoleMap):
              (RoleEntry::):
              (roleValueToNSString):
              (AccessibilityObject::attachmentView):
              (AccessibilityObject::performPressActionForAttachment):
              (AccessibilityObject::textMarkerRange):
              (AccessibilityObject::textMarkerForVisiblePosition):
              (AccessibilityObject::startTextMarker):
              (AccessibilityObject::visiblePositionForTextMarker):
              (AccessibilityObject::visiblePositionForStartOfTextMarkerRange):
              (AccessibilityObject::visiblePositionForEndOfTextMarkerRange):
              (AccessibilityObject::textMarkerRangeFromVisiblePositions):
              (AccessibilityObject::textMarkerRangeForSelection):
              (AccessibilityObject::textMarkerRangeFromMarkers):
              (AccessibilityObject::convertViewRectToScreenCoords):
              (AccessibilityObject::convertAbsolutePointToViewCoords):
              (AccessibilityObject::convertWidgetChildrenToNSArray):
              (AccessibilityObject::position):
              (AccessibilityObject::role):
              (AccessibilityObject::subrole):
              (AccessibilityObject::roleDescription):
              (blockquoteLevel):
              (AccessibilityObject::AXAttributeStringSetElement):
              (AXAttributeStringSetBlockquoteLevel):
              (CreateCGColorIfDifferent):
              (AXAttributeStringSetColor):
              (AXAttributeStringSetNumber):
              (AXAttributeStringSetFont):
              (AXAttributeStringSetStyle):
              (AccessibilityObject::AXAttributeStringSetHeadingLevel):
              (AccessibilityObject::AXLinkElementForNode):
              (AXAttributeStringSetSpelling):
              (AccessibilityObject::AXAttributedStringAppendText):
              (nsStringForReplacedNode):
              (AccessibilityObject::doAXAttributedStringForTextMarkerRange):
              (AccessibilityObject::doAXAttributedStringForRange):
              (AccessibilityObject::doAXRTFForRange):
              * page/mac/AccessibilityObjectWrapper.h: Added.
              * page/mac/AccessibilityObjectWrapper.mm: Added.
              (-[AccessibilityObjectWrapper initWithAccessibilityObject:]):
              (-[AccessibilityObjectWrapper unregisterUniqueIdForUIElement]):
              (-[AccessibilityObjectWrapper detach]):
              (-[AccessibilityObjectWrapper accessibilityObject]):
              (-[AccessibilityObjectWrapper accessibilityActionNames]):
              (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
              (-[AccessibilityObjectWrapper visiblePositionRangeForTextMarkerRange:]):
              (-[AccessibilityObjectWrapper renderWidgetChildren]):
              (convertToNSArray):
              (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
              (-[AccessibilityObjectWrapper accessibilityFocusedUIElement]):
              (-[AccessibilityObjectWrapper accessibilityHitTest:]):
              (-[AccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
              (-[AccessibilityObjectWrapper accessibilityIsIgnored]):
              (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
              (-[AccessibilityObjectWrapper accessibilityPerformAction:]):
              (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
              (rendererForView):
              (-[AccessibilityObjectWrapper _accessibilityParentForSubview:]):
              (-[AccessibilityObjectWrapper accessibilityActionDescription:]):
              (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
              (-[AccessibilityObjectWrapper accessibilityShouldUseUniqueId]):
              * page/mac/WebCoreAXObject.h: Removed.
              * page/mac/WebCoreAXObject.mm: Removed.
              * rendering/RenderMenuList.cpp:
              (WebCore::RenderMenuList::selectElement):
              * rendering/RenderMenuList.h:
      
      WebKit/mac:
      
      2008-03-31  Alice Liu  <alice.liu@apple.com>
      
              Reviewed by Darin.
      
              * WebView/WebFrame.mm:
              (-[WebFrame _accessibilityTree]):
              The syntax for fetching an object from the AXObjectCache changed slightly
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31517 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3b8e8b97