Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / ui / accessibility / ax_node.cc
index 8adb940..587f737 100644 (file)
@@ -19,6 +19,10 @@ void AXNode::SetData(const AXNodeData& src) {
   data_ = src;
 }
 
+void AXNode::SetLocation(const gfx::Rect& new_location) {
+  data_.location = new_location;
+}
+
 void AXNode::SetIndexInParent(int index_in_parent) {
   index_in_parent_ = index_in_parent;
 }
@@ -31,4 +35,13 @@ void AXNode::Destroy() {
   delete this;
 }
 
+bool AXNode::IsDescendantOf(AXNode* ancestor) {
+  if (this == ancestor)
+    return true;
+  else if (parent())
+    return parent()->IsDescendantOf(ancestor);
+
+  return false;
+}
+
 }  // namespace ui