| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 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 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2038 | 2038 |
| 2039 if (!anchorNode || !focusNode) | 2039 if (!anchorNode || !focusNode) |
| 2040 return; | 2040 return; |
| 2041 | 2041 |
| 2042 LocalFrame* frame = layoutObject()->frame(); | 2042 LocalFrame* frame = layoutObject()->frame(); |
| 2043 if (!frame) | 2043 if (!frame) |
| 2044 return; | 2044 return; |
| 2045 | 2045 |
| 2046 frame->selection().setSelection(VisibleSelection( | 2046 frame->selection().setSelection(VisibleSelection( |
| 2047 Position(anchorNode, selection.anchorOffset), | 2047 Position(anchorNode, selection.anchorOffset), |
| 2048 Position(focusNode, selection.focusOffset), | 2048 Position(focusNode, selection.focusOffset))); |
| 2049 DOWNSTREAM)); | |
| 2050 } | 2049 } |
| 2051 | 2050 |
| 2052 bool AXLayoutObject::isValidSelectionBound(const AXObject* boundObject) const | 2051 bool AXLayoutObject::isValidSelectionBound(const AXObject* boundObject) const |
| 2053 { | 2052 { |
| 2054 return boundObject && !boundObject->isDetached() | 2053 return boundObject && !boundObject->isDetached() |
| 2055 && boundObject->isAXLayoutObject() | 2054 && boundObject->isAXLayoutObject() |
| 2056 && boundObject->layoutObject()->frame() == layoutObject()->frame() | 2055 && boundObject->layoutObject()->frame() == layoutObject()->frame() |
| 2057 && &boundObject->axObjectCache() == &axObjectCache(); | 2056 && &boundObject->axObjectCache() == &axObjectCache(); |
| 2058 } | 2057 } |
| 2059 | 2058 |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2645 if (label && label->layoutObject()) { | 2644 if (label && label->layoutObject()) { |
| 2646 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); | 2645 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); |
| 2647 result.unite(labelRect); | 2646 result.unite(labelRect); |
| 2648 } | 2647 } |
| 2649 } | 2648 } |
| 2650 | 2649 |
| 2651 return result; | 2650 return result; |
| 2652 } | 2651 } |
| 2653 | 2652 |
| 2654 } // namespace blink | 2653 } // namespace blink |
| OLD | NEW |