| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2014 Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2014 Samsung Electronics. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #include "wtf/RefPtr.h" | 36 #include "wtf/RefPtr.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 class EmptyNodeList final : public NodeList { | 40 class EmptyNodeList final : public NodeList { |
| 41 public: | 41 public: |
| 42 static PassRefPtrWillBeRawPtr<EmptyNodeList> create(Node& rootNode) | 42 static PassRefPtrWillBeRawPtr<EmptyNodeList> create(Node& rootNode) |
| 43 { | 43 { |
| 44 return adoptRefWillBeNoop(new EmptyNodeList(rootNode)); | 44 return adoptRefWillBeNoop(new EmptyNodeList(rootNode)); |
| 45 } | 45 } |
| 46 virtual ~EmptyNodeList(); | 46 ~EmptyNodeList() override; |
| 47 | 47 |
| 48 Node& ownerNode() const { return *m_owner; } | 48 Node& ownerNode() const { return *m_owner; } |
| 49 | 49 |
| 50 DECLARE_VIRTUAL_TRACE(); | 50 DECLARE_VIRTUAL_TRACE(); |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 explicit EmptyNodeList(Node& rootNode) : m_owner(rootNode) { } | 53 explicit EmptyNodeList(Node& rootNode) : m_owner(rootNode) { } |
| 54 | 54 |
| 55 virtual unsigned length() const override { return 0; } | 55 unsigned length() const override { return 0; } |
| 56 virtual Node* item(unsigned) const override { return 0; } | 56 Node* item(unsigned) const override { return 0; } |
| 57 | 57 |
| 58 virtual bool isEmptyNodeList() const override { return true; } | 58 bool isEmptyNodeList() const override { return true; } |
| 59 virtual Node* virtualOwnerNode() const override; | 59 Node* virtualOwnerNode() const override; |
| 60 | 60 |
| 61 RefPtrWillBeMember<Node> m_owner; | 61 RefPtrWillBeMember<Node> m_owner; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 DEFINE_TYPE_CASTS(EmptyNodeList, NodeList, nodeList, nodeList->isEmptyNodeList()
, nodeList.isEmptyNodeList()); | 64 DEFINE_TYPE_CASTS(EmptyNodeList, NodeList, nodeList, nodeList->isEmptyNodeList()
, nodeList.isEmptyNodeList()); |
| 65 | 65 |
| 66 } // namespace blink | 66 } // namespace blink |
| 67 | 67 |
| 68 #endif // EmptyNodeList_h | 68 #endif // EmptyNodeList_h |
| OLD | NEW |