| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 namespace WebCore { | 42 namespace WebCore { |
| 43 | 43 |
| 44 class CustomElementUpgradeCandidateMap { | 44 class CustomElementUpgradeCandidateMap { |
| 45 WTF_MAKE_NONCOPYABLE(CustomElementUpgradeCandidateMap); | 45 WTF_MAKE_NONCOPYABLE(CustomElementUpgradeCandidateMap); |
| 46 public: | 46 public: |
| 47 CustomElementUpgradeCandidateMap() { } | 47 CustomElementUpgradeCandidateMap() { } |
| 48 | 48 |
| 49 typedef HashSet<Element*> ElementSet; | 49 typedef HashSet<Element*> ElementSet; |
| 50 | 50 |
| 51 void add(CustomElementDefinition::CustomElementKind, const AtomicString& typ
e, Element*); | 51 void add(CustomElementDefinition::CustomElementKind, const AtomicString& typ
e, Element*); |
| 52 bool contains(Element*) const; | |
| 53 void remove(Element*); | 52 void remove(Element*); |
| 54 ElementSet takeUpgradeCandidatesFor(CustomElementDefinition*); | 53 Vector<Element*> takeUpgradeCandidatesFor(CustomElementDefinition*); |
| 55 | 54 |
| 56 private: | 55 private: |
| 57 typedef std::pair<CustomElementDefinition::CustomElementKind, AtomicString>
RequiredDefinition; | 56 typedef std::pair<CustomElementDefinition::CustomElementKind, AtomicString>
RequiredDefinition; |
| 58 typedef HashMap<Element*, RequiredDefinition> UnresolvedElementMap; | 57 typedef HashMap<Element*, RequiredDefinition> UpgradeCandidateMap; |
| 59 typedef HashMap<AtomicString, ElementSet> UnresolvedDefinitionMap; | 58 typedef HashMap<AtomicString, ElementSet> UnresolvedDefinitionMap; |
| 60 | 59 |
| 61 bool matches(CustomElementDefinition*, Element*); | 60 bool matches(CustomElementDefinition*, Element*); |
| 62 | 61 |
| 63 UnresolvedElementMap m_unresolvedElements; | 62 UpgradeCandidateMap m_upgradeCandidates; |
| 64 UnresolvedDefinitionMap m_unresolvedDefinitions; | 63 UnresolvedDefinitionMap m_unresolvedDefinitions; |
| 65 }; | 64 }; |
| 66 | 65 |
| 67 } | 66 } |
| 68 | 67 |
| 69 #endif // CustomElementUpgradeCandidateMap_h | 68 #endif // CustomElementUpgradeCandidateMap_h |
| 70 | 69 |
| OLD | NEW |