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 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1525 parent->selectionChanged(); | 1525 parent->selectionChanged(); |
1526 } | 1526 } |
1527 | 1527 |
1528 int AXObject::lineForPosition(const VisiblePosition& position) const | 1528 int AXObject::lineForPosition(const VisiblePosition& position) const |
1529 { | 1529 { |
1530 if (position.isNull() || !getNode()) | 1530 if (position.isNull() || !getNode()) |
1531 return -1; | 1531 return -1; |
1532 | 1532 |
1533 // If the position is not in the same editable region as this AX object, ret
urn -1. | 1533 // If the position is not in the same editable region as this AX object, ret
urn -1. |
1534 Node* containerNode = position.deepEquivalent().computeContainerNode(); | 1534 Node* containerNode = position.deepEquivalent().computeContainerNode(); |
1535 if (!containerNode->containsIncludingShadowDOM(getNode()) && !getNode()->con
tainsIncludingShadowDOM(containerNode)) | 1535 if (!containerNode->isShadowIncludingInclusiveAncestorOf(getNode()) && !getN
ode()->isShadowIncludingInclusiveAncestorOf(containerNode)) |
1536 return -1; | 1536 return -1; |
1537 | 1537 |
1538 int lineCount = -1; | 1538 int lineCount = -1; |
1539 VisiblePosition currentPosition = position; | 1539 VisiblePosition currentPosition = position; |
1540 VisiblePosition previousPosition; | 1540 VisiblePosition previousPosition; |
1541 | 1541 |
1542 // move up until we get to the top | 1542 // move up until we get to the top |
1543 // FIXME: This only takes us to the top of the rootEditableElement, not the
top of the | 1543 // FIXME: This only takes us to the top of the rootEditableElement, not the
top of the |
1544 // top document. | 1544 // top document. |
1545 do { | 1545 do { |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1684 | 1684 |
1685 DEFINE_TRACE(AXObject) | 1685 DEFINE_TRACE(AXObject) |
1686 { | 1686 { |
1687 visitor->trace(m_children); | 1687 visitor->trace(m_children); |
1688 visitor->trace(m_parent); | 1688 visitor->trace(m_parent); |
1689 visitor->trace(m_cachedLiveRegionRoot); | 1689 visitor->trace(m_cachedLiveRegionRoot); |
1690 visitor->trace(m_axObjectCache); | 1690 visitor->trace(m_axObjectCache); |
1691 } | 1691 } |
1692 | 1692 |
1693 } // namespace blink | 1693 } // namespace blink |
OLD | NEW |