| Index: public/web/WebAXObject.h
|
| diff --git a/public/web/WebAXObject.h b/public/web/WebAXObject.h
|
| index c693bea5feaf8a670f9a0a5cf7d7876989132f04..8106a1474c6490cd7d0a061d31f13f6e17f17044 100644
|
| --- a/public/web/WebAXObject.h
|
| +++ b/public/web/WebAXObject.h
|
| @@ -1,5 +1,5 @@
|
| /*
|
| - * Copyright (C) 2013 Google Inc. All rights reserved.
|
| + * Copyright (C) 2009 Google Inc. All rights reserved.
|
| *
|
| * Redistribution and use in source and binary forms, with or without
|
| * modification, are permitted provided that the following conditions are
|
| @@ -31,12 +31,186 @@
|
| #ifndef WebAXObject_h
|
| #define WebAXObject_h
|
|
|
| -#include "WebAccessibilityObject.h"
|
| +#include "../platform/WebCommon.h"
|
| +#include "../platform/WebPrivatePtr.h"
|
| +#include "../platform/WebVector.h"
|
| +#include "WebAXEnums.h"
|
| +
|
| +#if WEBKIT_IMPLEMENTATION
|
| +namespace WTF { template <typename T> class PassRefPtr; }
|
| +#endif
|
| +
|
| +namespace WebCore { class AccessibilityObject; }
|
|
|
| namespace WebKit {
|
|
|
| -// FIXME: rename WebAccessibilityObject to WebAXObject and get rid of this temporary typedef (http://crbug.com/269034).
|
| -typedef WebAccessibilityObject WebAXObject;
|
| +class WebNode;
|
| +class WebDocument;
|
| +class WebString;
|
| +class WebURL;
|
| +struct WebPoint;
|
| +struct WebRect;
|
| +
|
| +// A container for passing around a reference to AccessibilityObject.
|
| +class WebAXObject {
|
| +public:
|
| + ~WebAXObject() { reset(); }
|
| +
|
| + WebAXObject() { }
|
| + WebAXObject(const WebAXObject& o) { assign(o); }
|
| + WebAXObject& operator=(const WebAXObject& o)
|
| + {
|
| + assign(o);
|
| + return *this;
|
| + }
|
| +
|
| + WEBKIT_EXPORT void reset();
|
| + WEBKIT_EXPORT void assign(const WebAXObject&);
|
| + WEBKIT_EXPORT bool equals(const WebAXObject&) const;
|
| +
|
| + bool isNull() const { return m_private.isNull(); }
|
| + // isDetached also checks for null, so it's safe to just call isDetached.
|
| + WEBKIT_EXPORT bool isDetached() const;
|
| +
|
| + // Static methods for enabling accessibility.
|
| + WEBKIT_EXPORT static void enableAccessibility();
|
| + WEBKIT_EXPORT static bool accessibilityEnabled();
|
| +
|
| + WEBKIT_EXPORT void startCachingComputedObjectAttributesUntilTreeMutates();
|
| + WEBKIT_EXPORT void stopCachingComputedObjectAttributes();
|
| +
|
| + WEBKIT_EXPORT int axID() const;
|
| +
|
| + // Update the underlying tree, and return true if this object is
|
| + // still valid (not detached). Note that calling this method
|
| + // can cause other WebAXObjects to become invalid, too,
|
| + // so always call isDetached if updateBackingStoreAndCheckValidity
|
| + // has been called on any object, or if any other WebCore code has run.
|
| + WEBKIT_EXPORT bool updateBackingStoreAndCheckValidity();
|
| +
|
| + WEBKIT_EXPORT WebString accessibilityDescription() const;
|
| + WEBKIT_EXPORT unsigned childCount() const;
|
| +
|
| + WEBKIT_EXPORT WebAXObject childAt(unsigned) const;
|
| + WEBKIT_EXPORT WebAXObject parentObject() const;
|
| +
|
| + WEBKIT_EXPORT bool isAnchor() const;
|
| + WEBKIT_EXPORT bool isAriaReadOnly() const;
|
| + WEBKIT_EXPORT bool isButtonStateMixed() const;
|
| + WEBKIT_EXPORT bool isChecked() const;
|
| + WEBKIT_EXPORT bool isClickable() const;
|
| + WEBKIT_EXPORT bool isCollapsed() const;
|
| + WEBKIT_EXPORT bool isControl() const;
|
| + WEBKIT_EXPORT bool isEnabled() const;
|
| + WEBKIT_EXPORT bool isFocused() const;
|
| + WEBKIT_EXPORT bool isHovered() const;
|
| + WEBKIT_EXPORT bool isIndeterminate() const;
|
| + WEBKIT_EXPORT bool isLinked() const;
|
| + WEBKIT_EXPORT bool isLoaded() const;
|
| + WEBKIT_EXPORT bool isMultiSelectable() const;
|
| + WEBKIT_EXPORT bool isOffScreen() const;
|
| + WEBKIT_EXPORT bool isPasswordField() const;
|
| + WEBKIT_EXPORT bool isPressed() const;
|
| + WEBKIT_EXPORT bool isReadOnly() const;
|
| + WEBKIT_EXPORT bool isRequired() const;
|
| + WEBKIT_EXPORT bool isSelected() const;
|
| + WEBKIT_EXPORT bool isSelectedOptionActive() const;
|
| + WEBKIT_EXPORT bool isVertical() const;
|
| + WEBKIT_EXPORT bool isVisible() const;
|
| + WEBKIT_EXPORT bool isVisited() const;
|
| +
|
| + WEBKIT_EXPORT WebString accessKey() const;
|
| + WEBKIT_EXPORT bool ariaHasPopup() const;
|
| + WEBKIT_EXPORT bool ariaLiveRegionAtomic() const;
|
| + WEBKIT_EXPORT bool ariaLiveRegionBusy() const;
|
| + WEBKIT_EXPORT WebString ariaLiveRegionRelevant() const;
|
| + WEBKIT_EXPORT WebString ariaLiveRegionStatus() const;
|
| + WEBKIT_EXPORT WebRect boundingBoxRect() const;
|
| + WEBKIT_EXPORT bool canvasHasFallbackContent() const;
|
| + WEBKIT_EXPORT WebPoint clickPoint() const;
|
| + WEBKIT_EXPORT void colorValue(int& r, int& g, int& b) const;
|
| + WEBKIT_EXPORT double estimatedLoadingProgress() const;
|
| + WEBKIT_EXPORT WebString helpText() const;
|
| + WEBKIT_EXPORT int headingLevel() const;
|
| + WEBKIT_EXPORT int hierarchicalLevel() const;
|
| + WEBKIT_EXPORT WebAXObject hitTest(const WebPoint&) const;
|
| + WEBKIT_EXPORT WebString keyboardShortcut() const;
|
| + WEBKIT_EXPORT WebAXRole role() const;
|
| + WEBKIT_EXPORT unsigned selectionEnd() const;
|
| + WEBKIT_EXPORT unsigned selectionEndLineNumber() const;
|
| + WEBKIT_EXPORT unsigned selectionStart() const;
|
| + WEBKIT_EXPORT unsigned selectionStartLineNumber() const;
|
| + WEBKIT_EXPORT WebString stringValue() const;
|
| + WEBKIT_EXPORT WebString title() const;
|
| + WEBKIT_EXPORT WebAXObject titleUIElement() const;
|
| + WEBKIT_EXPORT WebURL url() const;
|
| +
|
| + WEBKIT_EXPORT bool supportsRangeValue() const;
|
| + WEBKIT_EXPORT WebString valueDescription() const;
|
| + WEBKIT_EXPORT float valueForRange() const;
|
| + WEBKIT_EXPORT float maxValueForRange() const;
|
| + WEBKIT_EXPORT float minValueForRange() const;
|
| +
|
| + WEBKIT_EXPORT WebNode node() const;
|
| + WEBKIT_EXPORT WebDocument document() const;
|
| + WEBKIT_EXPORT bool hasComputedStyle() const;
|
| + WEBKIT_EXPORT WebString computedStyleDisplay() const;
|
| + WEBKIT_EXPORT bool accessibilityIsIgnored() const;
|
| + WEBKIT_EXPORT bool lineBreaks(WebVector<int>&) const;
|
| +
|
| + // Actions
|
| + WEBKIT_EXPORT WebString actionVerb() const; // The verb corresponding to performDefaultAction.
|
| + WEBKIT_EXPORT bool canDecrement() const;
|
| + WEBKIT_EXPORT bool canIncrement() const;
|
| + WEBKIT_EXPORT bool canPress() const;
|
| + WEBKIT_EXPORT bool canSetFocusAttribute() const;
|
| + WEBKIT_EXPORT bool canSetSelectedAttribute() const;
|
| + WEBKIT_EXPORT bool canSetValueAttribute() const;
|
| + WEBKIT_EXPORT bool performDefaultAction() const;
|
| + WEBKIT_EXPORT bool press() const;
|
| + WEBKIT_EXPORT bool increment() const;
|
| + WEBKIT_EXPORT bool decrement() const;
|
| + WEBKIT_EXPORT void setFocused(bool) const;
|
| + WEBKIT_EXPORT void setSelectedTextRange(int selectionStart, int selectionEnd) const;
|
| +
|
| + // For a table
|
| + WEBKIT_EXPORT unsigned columnCount() const;
|
| + WEBKIT_EXPORT unsigned rowCount() const;
|
| + WEBKIT_EXPORT WebAXObject cellForColumnAndRow(unsigned column, unsigned row) const;
|
| + WEBKIT_EXPORT WebAXObject headerContainerObject() const;
|
| + WEBKIT_EXPORT WebAXObject rowAtIndex(unsigned rowIndex) const;
|
| + WEBKIT_EXPORT WebAXObject columnAtIndex(unsigned columnIndex) const;
|
| +
|
| + // For a table row
|
| + WEBKIT_EXPORT unsigned rowIndex() const;
|
| + WEBKIT_EXPORT WebAXObject rowHeader() const;
|
| +
|
| + // For a table column
|
| + WEBKIT_EXPORT unsigned columnIndex() const;
|
| + WEBKIT_EXPORT WebAXObject columnHeader() const;
|
| +
|
| + // For a table cell
|
| + WEBKIT_EXPORT unsigned cellColumnIndex() const;
|
| + WEBKIT_EXPORT unsigned cellColumnSpan() const;
|
| + WEBKIT_EXPORT unsigned cellRowIndex() const;
|
| + WEBKIT_EXPORT unsigned cellRowSpan() const;
|
| +
|
| + // Make this object visible by scrolling as many nested scrollable views as needed.
|
| + WEBKIT_EXPORT void scrollToMakeVisible() const;
|
| + // Same, but if the whole object can't be made visible, try for this subrect, in local coordinates.
|
| + WEBKIT_EXPORT void scrollToMakeVisibleWithSubFocus(const WebRect&) const;
|
| + // Scroll this object to a given point in global coordinates of the top-level window.
|
| + WEBKIT_EXPORT void scrollToGlobalPoint(const WebPoint&) const;
|
| +
|
| +#if WEBKIT_IMPLEMENTATION
|
| + WebAXObject(const WTF::PassRefPtr<WebCore::AccessibilityObject>&);
|
| + WebAXObject& operator=(const WTF::PassRefPtr<WebCore::AccessibilityObject>&);
|
| + operator WTF::PassRefPtr<WebCore::AccessibilityObject>() const;
|
| +#endif
|
| +
|
| +private:
|
| + WebPrivatePtr<WebCore::AccessibilityObject> m_private;
|
| +};
|
|
|
| } // namespace WebKit
|
|
|
|
|