Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp

Issue 2312613002: Fix 'will execute script' condition for creating custom elements in imports (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/custom-elements/imports/resources/attribute-upgrade.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/custom-elements/imports/resources/attribute-upgrade.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698