| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 virtual FrameView* documentFrameView() const override; | 68 virtual FrameView* documentFrameView() const override; |
| 69 virtual LayoutRect elementRect() const override; | 69 virtual LayoutRect elementRect() const override; |
| 70 virtual AXObject* parentObject() const override; | 70 virtual AXObject* parentObject() const override; |
| 71 virtual AXObject* parentObjectIfExists() const override; | 71 virtual AXObject* parentObjectIfExists() const override; |
| 72 | 72 |
| 73 AXObject* webAreaObject() const; | 73 AXObject* webAreaObject() const; |
| 74 virtual AXObject* firstChild() const override { return webAreaObject(); } | 74 virtual AXObject* firstChild() const override { return webAreaObject(); } |
| 75 AXScrollbar* addChildScrollbar(Scrollbar*); | 75 AXScrollbar* addChildScrollbar(Scrollbar*); |
| 76 void removeChildScrollbar(AXObject*); | 76 void removeChildScrollbar(AXObject*); |
| 77 | 77 |
| 78 // FIXME: Oilpan: Frame/ScrollView is on the heap and its |
| 79 // AXScrollView is detached&removed from the AX cache when the |
| 80 // FrameView is disposed. Which clears m_scrollView, hence this |
| 81 // bare pointer will not be stale, so the bare pointer use is safe |
| 82 // & acceptable. |
| 83 // |
| 84 // However, it would be preferable to have it be normally traced |
| 85 // as part of moving the AX objects to the heap. Temporarily using |
| 86 // a Persistent risks creating a FrameView leak, and brings no |
| 87 // real benefits overall. |
| 78 FrameView* m_scrollView; | 88 FrameView* m_scrollView; |
| 79 RefPtr<AXObject> m_horizontalScrollbar; | 89 RefPtr<AXObject> m_horizontalScrollbar; |
| 80 RefPtr<AXObject> m_verticalScrollbar; | 90 RefPtr<AXObject> m_verticalScrollbar; |
| 81 bool m_childrenDirty; | 91 bool m_childrenDirty; |
| 82 }; | 92 }; |
| 83 | 93 |
| 84 DEFINE_AX_OBJECT_TYPE_CASTS(AXScrollView, isAXScrollView()); | 94 DEFINE_AX_OBJECT_TYPE_CASTS(AXScrollView, isAXScrollView()); |
| 85 | 95 |
| 86 } // namespace blink | 96 } // namespace blink |
| 87 | 97 |
| 88 #endif // AXScrollView_h | 98 #endif // AXScrollView_h |
| OLD | NEW |