| 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() | 83 WebScopedAXContext::~WebScopedAXContext() |
| 84 { | 84 { |
| 85 m_private.reset(); | 85 m_private.reset(0); |
| 86 } | 86 } |
| 87 | 87 |
| 88 WebAXObject WebScopedAXContext::root() const | 88 WebAXObject WebScopedAXContext::root() const |
| 89 { | 89 { |
| 90 return WebAXObject(static_cast<AXObjectCacheImpl*>(m_private->get())->root()
); | 90 return WebAXObject(static_cast<AXObjectCacheImpl*>(m_private->get())->root()
); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void WebAXObject::reset() | 93 void WebAXObject::reset() |
| 94 { | 94 { |
| 95 m_private.reset(); | 95 m_private.reset(); |
| (...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1570 m_private = object; | 1570 m_private = object; |
| 1571 return *this; | 1571 return *this; |
| 1572 } | 1572 } |
| 1573 | 1573 |
| 1574 WebAXObject::operator WTF::PassRefPtr<AXObject>() const | 1574 WebAXObject::operator WTF::PassRefPtr<AXObject>() const |
| 1575 { | 1575 { |
| 1576 return m_private.get(); | 1576 return m_private.get(); |
| 1577 } | 1577 } |
| 1578 | 1578 |
| 1579 } // namespace blink | 1579 } // namespace blink |
| OLD | NEW |