Chromium Code Reviews| Index: Source/modules/accessibility/AXNodeObject.cpp |
| diff --git a/Source/modules/accessibility/AXNodeObject.cpp b/Source/modules/accessibility/AXNodeObject.cpp |
| index c9294b0ff1f2039b98b16582f4c5c83e50ccc39a..5e59ed1a85c3740e345bfe9fbe707a5dbf8c5e50 100644 |
| --- a/Source/modules/accessibility/AXNodeObject.cpp |
| +++ b/Source/modules/accessibility/AXNodeObject.cpp |
| @@ -1172,6 +1172,29 @@ InvalidState AXNodeObject::invalidState() const |
| return InvalidStateUndefined; |
| } |
| +int AXNodeObject::posInSet() const |
| +{ |
| + if (supportsSetSizeAndPosInSet()) { |
| + if (hasAttribute(aria_posinsetAttr)) |
| + return getAttribute(aria_posinsetAttr).toInt(); |
| + return node()->nodeIndex(); |
|
dmazzoni
2015/04/10 17:35:21
Do a null check here.
(The reason this can be nul
|
| + } |
| + |
| + return 0; |
| +} |
| + |
| +int AXNodeObject::setSize() const |
| +{ |
| + if (supportsSetSizeAndPosInSet()) { |
| + if (hasAttribute(aria_setsizeAttr)) |
| + return getAttribute(aria_setsizeAttr).toInt(); |
| + if (node()->parentNode()) |
| + return node()->parentNode()->countChildren(); |
|
dmazzoni
2015/04/10 17:35:21
I just realized that this isn't going to do the ri
shreeramk
2015/04/13 03:49:59
Yes it doesn't exist currently.
From blink we can
|
| + } |
| + |
| + return 0; |
| +} |
| + |
| String AXNodeObject::ariaInvalidValue() const |
| { |
| if (invalidState() == InvalidStateOther) |