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

Side by Side Diff: Source/web/WebAXObject.cpp

Issue 1121473004: Expose scroll containers via accessibility APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « Source/modules/accessibility/AXScrollView.cpp ('k') | public/web/WebAXObject.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after
1516 WebVector<int> startsWebVector(words.size()); 1516 WebVector<int> startsWebVector(words.size());
1517 WebVector<int> endsWebVector(words.size()); 1517 WebVector<int> endsWebVector(words.size());
1518 for (size_t i = 0; i < words.size(); i++) { 1518 for (size_t i = 0; i < words.size(); i++) {
1519 startsWebVector[i] = words[i].start; 1519 startsWebVector[i] = words[i].start;
1520 endsWebVector[i] = words[i].start + words[i].length; 1520 endsWebVector[i] = words[i].start + words[i].length;
1521 } 1521 }
1522 starts.swap(startsWebVector); 1522 starts.swap(startsWebVector);
1523 ends.swap(endsWebVector); 1523 ends.swap(endsWebVector);
1524 } 1524 }
1525 1525
1526 bool WebAXObject::isScrollableContainer() const
1527 {
1528 if (isDetached())
1529 return false;
1530
1531 return m_private->isScrollableContainer();
1532 }
1533
1534 WebPoint WebAXObject::scrollOffset() const
1535 {
1536 if (isDetached())
1537 return WebPoint();
1538
1539 return m_private->scrollOffset();
1540 }
1541
1542 WebPoint WebAXObject::minimumScrollOffset() const
1543 {
1544 if (isDetached())
1545 return WebPoint();
1546
1547 return m_private->minimumScrollOffset();
1548 }
1549
1550 WebPoint WebAXObject::maximumScrollOffset() const
1551 {
1552 if (isDetached())
1553 return WebPoint();
1554
1555 return m_private->maximumScrollOffset();
1556 }
1557
1558 void WebAXObject::setScrollOffset(const WebPoint& offset) const
1559 {
1560 if (isDetached())
1561 return;
1562
1563 m_private->setScrollOffset(offset);
1564 }
1565
1526 void WebAXObject::scrollToMakeVisible() const 1566 void WebAXObject::scrollToMakeVisible() const
1527 { 1567 {
1528 if (!isDetached()) 1568 if (!isDetached())
1529 m_private->scrollToMakeVisible(); 1569 m_private->scrollToMakeVisible();
1530 } 1570 }
1531 1571
1532 void WebAXObject::scrollToMakeVisibleWithSubFocus(const WebRect& subfocus) const 1572 void WebAXObject::scrollToMakeVisibleWithSubFocus(const WebRect& subfocus) const
1533 { 1573 {
1534 if (!isDetached()) 1574 if (!isDetached())
1535 m_private->scrollToMakeVisibleWithSubFocus(subfocus); 1575 m_private->scrollToMakeVisibleWithSubFocus(subfocus);
(...skipping 15 matching lines...) Expand all
1551 m_private = object; 1591 m_private = object;
1552 return *this; 1592 return *this;
1553 } 1593 }
1554 1594
1555 WebAXObject::operator WTF::PassRefPtr<AXObject>() const 1595 WebAXObject::operator WTF::PassRefPtr<AXObject>() const
1556 { 1596 {
1557 return m_private.get(); 1597 return m_private.get();
1558 } 1598 }
1559 1599
1560 } // namespace blink 1600 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/accessibility/AXScrollView.cpp ('k') | public/web/WebAXObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698