| OLD | NEW |
| 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 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 965 if (isDetached()) | 965 if (isDetached()) |
| 966 return; | 966 return; |
| 967 | 967 |
| 968 Node* node = m_private->getNode(); | 968 Node* node = m_private->getNode(); |
| 969 if (!node) | 969 if (!node) |
| 970 return; | 970 return; |
| 971 | 971 |
| 972 Element* element = nullptr; | 972 Element* element = nullptr; |
| 973 if (node->isElementNode()) { | 973 if (node->isElementNode()) { |
| 974 element = toElement(node); | 974 element = toElement(node); |
| 975 } else if (node->isDocumentNode()) { |
| 976 element = node->document().documentElement(); |
| 975 } else { | 977 } else { |
| 976 node->updateDistribution(); | 978 node->updateDistribution(); |
| 977 ContainerNode* parent = FlatTreeTraversal::parent(*node); | 979 ContainerNode* parent = FlatTreeTraversal::parent(*node); |
| 980 if (!parent) |
| 981 return; |
| 978 ASSERT_WITH_SECURITY_IMPLICATION(parent->isElementNode()); | 982 ASSERT_WITH_SECURITY_IMPLICATION(parent->isElementNode()); |
| 979 element = toElement(parent); | 983 element = toElement(parent); |
| 980 } | 984 } |
| 981 | 985 |
| 982 if (!element) | 986 if (!element) |
| 983 return; | 987 return; |
| 984 | 988 |
| 985 LocalFrame* frame = element->document().frame(); | 989 LocalFrame* frame = element->document().frame(); |
| 986 if (!frame) | 990 if (!frame) |
| 987 return; | 991 return; |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1602 m_private = object; | 1606 m_private = object; |
| 1603 return *this; | 1607 return *this; |
| 1604 } | 1608 } |
| 1605 | 1609 |
| 1606 WebAXObject::operator AXObject*() const | 1610 WebAXObject::operator AXObject*() const |
| 1607 { | 1611 { |
| 1608 return m_private.get(); | 1612 return m_private.get(); |
| 1609 } | 1613 } |
| 1610 | 1614 |
| 1611 } // namespace blink | 1615 } // namespace blink |
| OLD | NEW |