| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 static bool isLayoutClean(Document* document) | 65 static bool isLayoutClean(Document* document) |
| 66 { | 66 { |
| 67 if (!document || !document->view()) | 67 if (!document || !document->view()) |
| 68 return false; | 68 return false; |
| 69 return document->lifecycle().state() >= DocumentLifecycle::LayoutClean | 69 return document->lifecycle().state() >= DocumentLifecycle::LayoutClean |
| 70 || (document->lifecycle().state() == DocumentLifecycle::StyleClean && !d
ocument->view()->needsLayout()); | 70 || (document->lifecycle().state() == DocumentLifecycle::StyleClean && !d
ocument->view()->needsLayout()); |
| 71 } | 71 } |
| 72 #endif | 72 #endif |
| 73 | 73 |
| 74 WebScopedAXContext::WebScopedAXContext(WebDocument& rootDocument) | 74 WebScopedAXContext::WebScopedAXContext(WebDocument& rootDocument) |
| 75 : m_private(adoptRef(new ScopedAXObjectCache(*rootDocument.unwrap<Document>(
)))) | 75 : m_private(adoptPtr(new ScopedAXObjectCache(*rootDocument.unwrap<Document>(
)))) |
| 76 { | 76 { |
| 77 } | 77 } |
| 78 | 78 |
| 79 WebScopedAXContext::~WebScopedAXContext() | |
| 80 { | |
| 81 m_private.reset(); | |
| 82 } | |
| 83 | |
| 84 WebAXObject WebScopedAXContext::root() const | 79 WebAXObject WebScopedAXContext::root() const |
| 85 { | 80 { |
| 86 return WebAXObject(static_cast<AXObjectCacheImpl*>(m_private->get())->root()
); | 81 return WebAXObject(static_cast<AXObjectCacheImpl*>(m_private->get())->root()
); |
| 87 } | 82 } |
| 88 | 83 |
| 89 void WebAXObject::reset() | 84 void WebAXObject::reset() |
| 90 { | 85 { |
| 91 m_private.reset(); | 86 m_private.reset(); |
| 92 } | 87 } |
| 93 | 88 |
| (...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1451 m_private = object; | 1446 m_private = object; |
| 1452 return *this; | 1447 return *this; |
| 1453 } | 1448 } |
| 1454 | 1449 |
| 1455 WebAXObject::operator WTF::PassRefPtr<AXObject>() const | 1450 WebAXObject::operator WTF::PassRefPtr<AXObject>() const |
| 1456 { | 1451 { |
| 1457 return m_private.get(); | 1452 return m_private.get(); |
| 1458 } | 1453 } |
| 1459 | 1454 |
| 1460 } // namespace blink | 1455 } // namespace blink |
| OLD | NEW |