Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
| 3 * 1999-2001 Lars Knoll <knoll@kde.org> | 3 * 1999-2001 Lars Knoll <knoll@kde.org> |
| 4 * 1999-2001 Antti Koivisto <koivisto@kde.org> | 4 * 1999-2001 Antti Koivisto <koivisto@kde.org> |
| 5 * 2000-2001 Simon Hausmann <hausmann@kde.org> | 5 * 2000-2001 Simon Hausmann <hausmann@kde.org> |
| 6 * 2000-2001 Dirk Mueller <mueller@kde.org> | 6 * 2000-2001 Dirk Mueller <mueller@kde.org> |
| 7 * 2000 Stefan Schimanski <1Stein@gmx.de> | 7 * 2000 Stefan Schimanski <1Stein@gmx.de> |
| 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
| 9 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 10 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 135 inline HTMLFrameOwnerElement* Frame::ownerElement() const | 135 inline HTMLFrameOwnerElement* Frame::ownerElement() const |
| 136 { | 136 { |
| 137 return m_ownerElement; | 137 return m_ownerElement; |
| 138 } | 138 } |
| 139 | 139 |
| 140 inline FrameTree& Frame::tree() const | 140 inline FrameTree& Frame::tree() const |
| 141 { | 141 { |
| 142 return m_treeNode; | 142 return m_treeNode; |
| 143 } | 143 } |
| 144 | 144 |
| 145 // Allow equality comparisons of Frames by reference or pointer, interchangeably . | |
|
eseidel
2014/06/02 05:20:27
Can we make this a macro? Seems silly to have to
Inactive
2014/06/02 12:16:37
Makes sense. We already duplicate this for several
| |
| 146 inline bool operator==(const Frame& a, const Frame& b) { return &a == &b; } | |
| 147 inline bool operator==(const Frame& a, const Frame* b) { return &a == b; } | |
| 148 inline bool operator==(const Frame* a, const Frame& b) { return a == &b; } | |
| 149 inline bool operator!=(const Frame& a, const Frame& b) { return !(a == b); } | |
| 150 inline bool operator!=(const Frame& a, const Frame* b) { return !(a == b); } | |
| 151 inline bool operator!=(const Frame* a, const Frame& b) { return !(a == b); } | |
| 152 inline bool operator==(const PassRefPtr<Frame>& a, const Frame& b) { return a.ge t() == &b; } | |
| 153 inline bool operator==(const Frame& a, const PassRefPtr<Frame>& b) { return &a = = b.get(); } | |
| 154 inline bool operator!=(const PassRefPtr<Frame>& a, const Frame& b) { return !(a == b); } | |
| 155 inline bool operator!=(const Frame& a, const PassRefPtr<Frame>& b) { return !(a == b); } | |
| 156 | |
| 145 } // namespace WebCore | 157 } // namespace WebCore |
| 146 | 158 |
| 147 #endif // Frame_h | 159 #endif // Frame_h |
| OLD | NEW |