| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 { | 69 { |
| 70 if (!document || !document->view()) | 70 if (!document || !document->view()) |
| 71 return false; | 71 return false; |
| 72 return document->lifecycle().state() >= DocumentLifecycle::LayoutClean | 72 return document->lifecycle().state() >= DocumentLifecycle::LayoutClean |
| 73 || ((document->lifecycle().state() == DocumentLifecycle::StyleClean || d
ocument->lifecycle().state() == DocumentLifecycle::LayoutSubtreeChangeClean) | 73 || ((document->lifecycle().state() == DocumentLifecycle::StyleClean || d
ocument->lifecycle().state() == DocumentLifecycle::LayoutSubtreeChangeClean) |
| 74 && !document->view()->needsLayout()); | 74 && !document->view()->needsLayout()); |
| 75 } | 75 } |
| 76 #endif | 76 #endif |
| 77 | 77 |
| 78 WebScopedAXContext::WebScopedAXContext(WebDocument& rootDocument) | 78 WebScopedAXContext::WebScopedAXContext(WebDocument& rootDocument) |
| 79 : m_private(adoptRef(new ScopedAXObjectCache(*rootDocument.unwrap<Document>(
)))) | 79 : m_private(ScopedAXObjectCache::create(*rootDocument.unwrap<Document>())) |
| 80 { | 80 { |
| 81 } | 81 } |
| 82 | 82 |
| 83 WebScopedAXContext::~WebScopedAXContext() | |
| 84 { | |
| 85 m_private.reset(); | |
| 86 } | |
| 87 | |
| 88 WebAXObject WebScopedAXContext::root() const | 83 WebAXObject WebScopedAXContext::root() const |
| 89 { | 84 { |
| 90 return WebAXObject(static_cast<AXObjectCacheImpl*>(m_private->get())->root()
); | 85 return WebAXObject(static_cast<AXObjectCacheImpl*>(m_private->get())->root()
); |
| 91 } | 86 } |
| 92 | 87 |
| 93 void WebAXObject::reset() | 88 void WebAXObject::reset() |
| 94 { | 89 { |
| 95 m_private.reset(); | 90 m_private.reset(); |
| 96 } | 91 } |
| 97 | 92 |
| (...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1591 m_private = object; | 1586 m_private = object; |
| 1592 return *this; | 1587 return *this; |
| 1593 } | 1588 } |
| 1594 | 1589 |
| 1595 WebAXObject::operator WTF::PassRefPtr<AXObject>() const | 1590 WebAXObject::operator WTF::PassRefPtr<AXObject>() const |
| 1596 { | 1591 { |
| 1597 return m_private.get(); | 1592 return m_private.get(); |
| 1598 } | 1593 } |
| 1599 | 1594 |
| 1600 } // namespace blink | 1595 } // namespace blink |
| OLD | NEW |