| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011, 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 | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. 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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 default: | 585 default: |
| 586 break; // If we need another fast path, add here. | 586 break; // If we need another fast path, add here. |
| 587 } | 587 } |
| 588 } | 588 } |
| 589 | 589 |
| 590 findTraverseRootsAndExecute<SelectorQueryTrait>(rootNode, output); | 590 findTraverseRootsAndExecute<SelectorQueryTrait>(rootNode, output); |
| 591 } | 591 } |
| 592 | 592 |
| 593 std::unique_ptr<SelectorQuery> SelectorQuery::adopt( | 593 std::unique_ptr<SelectorQuery> SelectorQuery::adopt( |
| 594 CSSSelectorList selectorList) { | 594 CSSSelectorList selectorList) { |
| 595 return wrapUnique(new SelectorQuery(std::move(selectorList))); | 595 return WTF::wrapUnique(new SelectorQuery(std::move(selectorList))); |
| 596 } | 596 } |
| 597 | 597 |
| 598 SelectorQuery::SelectorQuery(CSSSelectorList selectorList) { | 598 SelectorQuery::SelectorQuery(CSSSelectorList selectorList) { |
| 599 m_selectorList = std::move(selectorList); | 599 m_selectorList = std::move(selectorList); |
| 600 m_selectors.initialize(m_selectorList); | 600 m_selectors.initialize(m_selectorList); |
| 601 } | 601 } |
| 602 | 602 |
| 603 bool SelectorQuery::matches(Element& element) const { | 603 bool SelectorQuery::matches(Element& element) const { |
| 604 return m_selectors.matches(element); | 604 return m_selectors.matches(element); |
| 605 } | 605 } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 | 641 |
| 642 return m_entries.add(selectors, SelectorQuery::adopt(std::move(selectorList))) | 642 return m_entries.add(selectors, SelectorQuery::adopt(std::move(selectorList))) |
| 643 .storedValue->value.get(); | 643 .storedValue->value.get(); |
| 644 } | 644 } |
| 645 | 645 |
| 646 void SelectorQueryCache::invalidate() { | 646 void SelectorQueryCache::invalidate() { |
| 647 m_entries.clear(); | 647 m_entries.clear(); |
| 648 } | 648 } |
| 649 | 649 |
| 650 } // namespace blink | 650 } // namespace blink |
| OLD | NEW |