| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 21 matching lines...) Expand all Loading... |
| 32 #define HTMLContentElement_h | 32 #define HTMLContentElement_h |
| 33 | 33 |
| 34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
| 35 #include "core/css/CSSSelectorList.h" | 35 #include "core/css/CSSSelectorList.h" |
| 36 #include "core/dom/shadow/InsertionPoint.h" | 36 #include "core/dom/shadow/InsertionPoint.h" |
| 37 #include "platform/heap/Handle.h" | 37 #include "platform/heap/Handle.h" |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 class HTMLContentSelectFilter : public NoBaseWillBeGarbageCollectedFinalized<HTM
LContentSelectFilter> { | 41 class HTMLContentSelectFilter : public NoBaseWillBeGarbageCollectedFinalized<HTM
LContentSelectFilter> { |
| 42 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(HTMLContentSelectFilter); |
| 42 public: | 43 public: |
| 43 virtual ~HTMLContentSelectFilter() { } | 44 virtual ~HTMLContentSelectFilter() { } |
| 44 virtual bool canSelectNode(const WillBeHeapVector<RawPtrWillBeMember<Node>,
32>& siblings, int nth) const = 0; | 45 virtual bool canSelectNode(const WillBeHeapVector<RawPtrWillBeMember<Node>,
32>& siblings, int nth) const = 0; |
| 45 | 46 |
| 46 DEFINE_INLINE_VIRTUAL_TRACE() { } | 47 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 47 }; | 48 }; |
| 48 | 49 |
| 49 class CORE_EXPORT HTMLContentElement final : public InsertionPoint { | 50 class CORE_EXPORT HTMLContentElement final : public InsertionPoint { |
| 50 DEFINE_WRAPPERTYPEINFO(); | 51 DEFINE_WRAPPERTYPEINFO(); |
| 51 public: | 52 public: |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 if (!isSelectValid()) | 102 if (!isSelectValid()) |
| 102 return false; | 103 return false; |
| 103 if (!siblings[nth]->isElementNode()) | 104 if (!siblings[nth]->isElementNode()) |
| 104 return false; | 105 return false; |
| 105 return matchSelector(*toElement(siblings[nth])); | 106 return matchSelector(*toElement(siblings[nth])); |
| 106 } | 107 } |
| 107 | 108 |
| 108 } // namespace blink | 109 } // namespace blink |
| 109 | 110 |
| 110 #endif // HTMLContentElement_h | 111 #endif // HTMLContentElement_h |
| OLD | NEW |