Chromium Code Reviews| 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 1897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1908 // This callsite should probably move up the stack. | 1908 // This callsite should probably move up the stack. |
| 1909 frame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 1909 frame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 1910 | 1910 |
| 1911 // Set the selection based on visible positions, because the offsets in acce ssibility nodes | 1911 // Set the selection based on visible positions, because the offsets in acce ssibility nodes |
| 1912 // are based on visible indexes, which often skips redundant whitespace, for example. | 1912 // are based on visible indexes, which often skips redundant whitespace, for example. |
| 1913 VisiblePosition anchorVisiblePosition = toVisiblePosition(anchorObject, sele ction.anchorOffset); | 1913 VisiblePosition anchorVisiblePosition = toVisiblePosition(anchorObject, sele ction.anchorOffset); |
| 1914 VisiblePosition focusVisiblePosition = toVisiblePosition(focusObject, select ion.focusOffset); | 1914 VisiblePosition focusVisiblePosition = toVisiblePosition(focusObject, select ion.focusOffset); |
| 1915 if (anchorVisiblePosition.isNull() || focusVisiblePosition.isNull()) | 1915 if (anchorVisiblePosition.isNull() || focusVisiblePosition.isNull()) |
| 1916 return; | 1916 return; |
| 1917 | 1917 |
| 1918 frame->selection().setSelection(VisibleSelection(anchorVisiblePosition, focu sVisiblePosition)); | 1918 frame->selection().setSelection(createVisibleSelection(anchorVisiblePosition , focusVisiblePosition)); |
|
yosin_UTC9
2016/09/30 01:20:35
Since AXLayoutObject holds |m_layoutObject|, when
| |
| 1919 } | 1919 } |
| 1920 | 1920 |
| 1921 bool AXLayoutObject::isValidSelectionBound(const AXObject* boundObject) const | 1921 bool AXLayoutObject::isValidSelectionBound(const AXObject* boundObject) const |
| 1922 { | 1922 { |
| 1923 return getLayoutObject() && boundObject && !boundObject->isDetached() | 1923 return getLayoutObject() && boundObject && !boundObject->isDetached() |
| 1924 && boundObject->isAXLayoutObject() && boundObject->getLayoutObject() | 1924 && boundObject->isAXLayoutObject() && boundObject->getLayoutObject() |
| 1925 && boundObject->getLayoutObject()->frame() == getLayoutObject()->frame() | 1925 && boundObject->getLayoutObject()->frame() == getLayoutObject()->frame() |
| 1926 && &boundObject->axObjectCache() == &axObjectCache(); | 1926 && &boundObject->axObjectCache() == &axObjectCache(); |
| 1927 } | 1927 } |
| 1928 | 1928 |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2394 | 2394 |
| 2395 bool AXLayoutObject::elementAttributeValue(const QualifiedName& attributeName) c onst | 2395 bool AXLayoutObject::elementAttributeValue(const QualifiedName& attributeName) c onst |
| 2396 { | 2396 { |
| 2397 if (!m_layoutObject) | 2397 if (!m_layoutObject) |
| 2398 return false; | 2398 return false; |
| 2399 | 2399 |
| 2400 return equalIgnoringCase(getAttribute(attributeName), "true"); | 2400 return equalIgnoringCase(getAttribute(attributeName), "true"); |
| 2401 } | 2401 } |
| 2402 | 2402 |
| 2403 } // namespace blink | 2403 } // namespace blink |
| OLD | NEW |