Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2204)

Unified Diff: Source/modules/accessibility/AXLayoutObject.h

Issue 1185343003: Implements the ability to get and set the caret position and the current selection from anywhere in… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed more comments from reviewer. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/accessibility/AXLayoutObject.h
diff --git a/Source/modules/accessibility/AXLayoutObject.h b/Source/modules/accessibility/AXLayoutObject.h
index cde758e3bc0ae7217de6f90871e9f1560f79b51e..01d9609d3d3dfd8452327a7e0cf4cc151e61dfc4 100644
--- a/Source/modules/accessibility/AXLayoutObject.h
+++ b/Source/modules/accessibility/AXLayoutObject.h
@@ -43,7 +43,6 @@ class FrameView;
class HTMLAreaElement;
class IntPoint;
class Node;
-class VisibleSelection;
class Widget;
class MODULES_EXPORT AXLayoutObject : public AXNodeObject {
@@ -151,6 +150,12 @@ protected:
// Accessibility Text - (To be deprecated).
virtual String deprecatedHelpText() const override;
+ // Methods that retrieve or manipulate the current selection.
+
+ virtual AXRange selection() const override;
+ virtual AXRange selectionUnderObject() const override;
+ virtual void setSelection(const AXRange&) override;
+
// Location and click point in frame-relative coordinates.
virtual void markCachedElementRectDirty() const override;
virtual IntPoint clickPoint() override;
@@ -183,11 +188,7 @@ protected:
virtual Element* anchorElement() const override;
virtual Widget* widgetForAttachmentView() const override;
- // Selected text.
- virtual PlainTextRange selectedTextRange() const override;
-
// Modify or take an action on an object.
- virtual void setSelectedTextRange(const PlainTextRange&) override;
virtual void setValue(const String&) override;
// Notifications that this object may have changed.
@@ -203,7 +204,6 @@ protected:
private:
AXObject* treeAncestorDisallowingChild() const;
void ariaListboxSelectedChildren(AccessibilityChildrenVector&);
- PlainTextRange visibleSelectionUnderObject() const;
bool nodeIsTextControl(const Node*) const;
bool isTabItemSelected() const;
AXObject* accessibilityImageMapHitTest(HTMLAreaElement*, const IntPoint&) const;
@@ -225,7 +225,7 @@ private:
void ariaSelectedRows(AccessibilityChildrenVector&);
bool elementAttributeValue(const QualifiedName&) const;
LayoutRect computeElementRect() const;
- VisibleSelection selection() const;
+ AXRange textControlSelection() const;
int indexForVisiblePosition(const VisiblePosition&) const;
};

Powered by Google App Engine
This is Rietveld 408576698