| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 class Frame; | 29 class Frame; |
| 30 | 30 |
| 31 class CORE_EXPORT FrameTree final { | 31 class CORE_EXPORT FrameTree final { |
| 32 WTF_MAKE_NONCOPYABLE(FrameTree); | 32 WTF_MAKE_NONCOPYABLE(FrameTree); |
| 33 DISALLOW_NEW(); | 33 DISALLOW_NEW(); |
| 34 | 34 |
| 35 public: | 35 public: |
| 36 explicit FrameTree(Frame* thisFrame); | 36 explicit FrameTree(Frame* thisFrame); |
| 37 ~FrameTree(); | 37 ~FrameTree(); |
| 38 | 38 |
| 39 const AtomicString& name() const { return m_name; } | 39 const AtomicString& name() const; |
| 40 void setName(const AtomicString&); | 40 void setName(const AtomicString&); |
| 41 | 41 |
| 42 // TODO(andypaicu): remove this once we have gathered the data |
| 43 void experimentalSetNulledName(); |
| 44 |
| 42 Frame* parent() const; | 45 Frame* parent() const; |
| 43 Frame* top() const; | 46 Frame* top() const; |
| 44 Frame* nextSibling() const; | 47 Frame* nextSibling() const; |
| 45 Frame* firstChild() const; | 48 Frame* firstChild() const; |
| 46 | 49 |
| 47 bool isDescendantOf(const Frame* ancestor) const; | 50 bool isDescendantOf(const Frame* ancestor) const; |
| 48 Frame* traverseNext(const Frame* stayWithin = nullptr) const; | 51 Frame* traverseNext(const Frame* stayWithin = nullptr) const; |
| 49 | 52 |
| 50 Frame* find(const AtomicString& name) const; | 53 Frame* find(const AtomicString& name) const; |
| 51 unsigned childCount() const; | 54 unsigned childCount() const; |
| 52 | 55 |
| 53 Frame* scopedChild(unsigned index) const; | 56 Frame* scopedChild(unsigned index) const; |
| 54 Frame* scopedChild(const AtomicString& name) const; | 57 Frame* scopedChild(const AtomicString& name) const; |
| 55 unsigned scopedChildCount() const; | 58 unsigned scopedChildCount() const; |
| 56 void invalidateScopedChildCount(); | 59 void invalidateScopedChildCount(); |
| 57 | 60 |
| 58 DECLARE_TRACE(); | 61 DECLARE_TRACE(); |
| 59 | 62 |
| 60 private: | 63 private: |
| 61 Member<Frame> m_thisFrame; | 64 Member<Frame> m_thisFrame; |
| 62 | 65 |
| 63 AtomicString m_name; // The actual frame name (may be empty). | 66 AtomicString m_name; // The actual frame name (may be empty). |
| 64 | 67 |
| 65 mutable unsigned m_scopedChildCount; | 68 mutable unsigned m_scopedChildCount; |
| 69 |
| 70 // TODO(andypaicu): remove this once we have gathered the data |
| 71 bool m_experimentalSetNulledName; |
| 66 }; | 72 }; |
| 67 | 73 |
| 68 } // namespace blink | 74 } // namespace blink |
| 69 | 75 |
| 70 #ifndef NDEBUG | 76 #ifndef NDEBUG |
| 71 // Outside the WebCore namespace for ease of invocation from gdb. | 77 // Outside the WebCore namespace for ease of invocation from gdb. |
| 72 void showFrameTree(const blink::Frame*); | 78 void showFrameTree(const blink::Frame*); |
| 73 #endif | 79 #endif |
| 74 | 80 |
| 75 #endif // FrameTree_h | 81 #endif // FrameTree_h |
| OLD | NEW |