| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. |
| 3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 if (isHTMLTemplateElement(*currentNode())) | 755 if (isHTMLTemplateElement(*currentNode())) |
| 756 return toHTMLTemplateElement(currentElement())->content()->document(); | 756 return toHTMLTemplateElement(currentElement())->content()->document(); |
| 757 return currentNode()->document(); | 757 return currentNode()->document(); |
| 758 } | 758 } |
| 759 | 759 |
| 760 // "look up a custom element definition" for a token | 760 // "look up a custom element definition" for a token |
| 761 // https://html.spec.whatwg.org/#look-up-a-custom-element-definition | 761 // https://html.spec.whatwg.org/#look-up-a-custom-element-definition |
| 762 CustomElementDefinition* HTMLConstructionSite::lookUpCustomElementDefinition(Doc
ument& document, AtomicHTMLToken* token) | 762 CustomElementDefinition* HTMLConstructionSite::lookUpCustomElementDefinition(Doc
ument& document, AtomicHTMLToken* token) |
| 763 { | 763 { |
| 764 // "2. If document does not have a browsing context, return null." | 764 // "2. If document does not have a browsing context, return null." |
| 765 LocalDOMWindow* window = document.domWindow(); | 765 LocalDOMWindow* window = document.executingWindow(); |
| 766 if (!window) | 766 if (!window) |
| 767 return nullptr; | 767 return nullptr; |
| 768 | 768 |
| 769 // "3. Let registry be document's browsing context's Window's | 769 // "3. Let registry be document's browsing context's Window's |
| 770 // CustomElementRegistry object." | 770 // CustomElementRegistry object." |
| 771 CustomElementRegistry* registry = window->maybeCustomElements(); | 771 CustomElementRegistry* registry = window->maybeCustomElements(); |
| 772 if (!registry) | 772 if (!registry) |
| 773 return nullptr; | 773 return nullptr; |
| 774 | 774 |
| 775 const AtomicString& localName = token->name(); | 775 const AtomicString& localName = token->name(); |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 queueTask(task); | 979 queueTask(task); |
| 980 } | 980 } |
| 981 | 981 |
| 982 DEFINE_TRACE(HTMLConstructionSite::PendingText) | 982 DEFINE_TRACE(HTMLConstructionSite::PendingText) |
| 983 { | 983 { |
| 984 visitor->trace(parent); | 984 visitor->trace(parent); |
| 985 visitor->trace(nextChild); | 985 visitor->trace(nextChild); |
| 986 } | 986 } |
| 987 | 987 |
| 988 } // namespace blink | 988 } // namespace blink |
| OLD | NEW |