Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1509 && objectMax - currentScrollOffset <= viewportMax) | 1509 && objectMax - currentScrollOffset <= viewportMax) |
| 1510 return currentScrollOffset; | 1510 return currentScrollOffset; |
| 1511 | 1511 |
| 1512 // Center the object in the viewport. | 1512 // Center the object in the viewport. |
| 1513 return (objectMin + objectMax - viewportMin - viewportMax) / 2; | 1513 return (objectMin + objectMax - viewportMin - viewportMax) / 2; |
| 1514 } | 1514 } |
| 1515 | 1515 |
| 1516 void AXObject::scrollToMakeVisibleWithSubFocus(const IntRect& subfocus) const | 1516 void AXObject::scrollToMakeVisibleWithSubFocus(const IntRect& subfocus) const |
| 1517 { | 1517 { |
| 1518 // Search up the parent chain until we find the first one that's scrollable. | 1518 // Search up the parent chain until we find the first one that's scrollable. |
| 1519 AXObject* scrollParent = parentObject(); | 1519 const AXObject* scrollParent = this; |
|
Elly Fong-Jones
2016/09/26 16:25:39
what's up with this?
dmazzoni
2016/09/26 18:00:40
It's part of the change.
Previously we didn't hav
| |
| 1520 ScrollableArea* scrollableArea = 0; | 1520 ScrollableArea* scrollableArea = 0; |
| 1521 while (scrollParent) { | 1521 while (scrollParent) { |
| 1522 scrollableArea = scrollParent->getScrollableAreaIfScrollable(); | 1522 scrollableArea = scrollParent->getScrollableAreaIfScrollable(); |
| 1523 if (scrollableArea) | 1523 if (scrollableArea) |
| 1524 break; | 1524 break; |
| 1525 scrollParent = scrollParent->parentObject(); | 1525 scrollParent = scrollParent->parentObject(); |
| 1526 } | 1526 } |
| 1527 if (!scrollParent || !scrollableArea) | 1527 if (!scrollParent || !scrollableArea) |
| 1528 return; | 1528 return; |
| 1529 | 1529 |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1796 | 1796 |
| 1797 DEFINE_TRACE(AXObject) | 1797 DEFINE_TRACE(AXObject) |
| 1798 { | 1798 { |
| 1799 visitor->trace(m_children); | 1799 visitor->trace(m_children); |
| 1800 visitor->trace(m_parent); | 1800 visitor->trace(m_parent); |
| 1801 visitor->trace(m_cachedLiveRegionRoot); | 1801 visitor->trace(m_cachedLiveRegionRoot); |
| 1802 visitor->trace(m_axObjectCache); | 1802 visitor->trace(m_axObjectCache); |
| 1803 } | 1803 } |
| 1804 | 1804 |
| 1805 } // namespace blink | 1805 } // namespace blink |
| OLD | NEW |