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

Side by Side Diff: sky/engine/core/dom/custom/CustomElementRegistry.cpp

Issue 838463004: Remove embedder custom elements. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/engine/core/dom/custom/CustomElementRegistry.h ('k') | sky/engine/public/BUILD.gn » ('j') | 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #if ENABLE(OILPAN) 52 #if ENABLE(OILPAN)
53 // In oilpan we don't have the disposed phase for context lifecycle observer . 53 // In oilpan we don't have the disposed phase for context lifecycle observer .
54 virtual void documentWasDetached() override { m_wentAway = true; } 54 virtual void documentWasDetached() override { m_wentAway = true; }
55 #else 55 #else
56 virtual void documentWasDisposed() override { m_wentAway = true; } 56 virtual void documentWasDisposed() override { m_wentAway = true; }
57 #endif 57 #endif
58 58
59 bool m_wentAway; 59 bool m_wentAway;
60 }; 60 };
61 61
62 CustomElementDefinition* CustomElementRegistry::registerElement(Document* docume nt, CustomElementConstructorBuilder* constructorBuilder, const AtomicString& use rSuppliedName, CustomElement::NameSet validNames, ExceptionState& exceptionState ) 62 CustomElementDefinition* CustomElementRegistry::registerElement(Document* docume nt, CustomElementConstructorBuilder* constructorBuilder, const AtomicString& use rSuppliedName, ExceptionState& exceptionState)
63 { 63 {
64 // FIXME: In every instance except one it is the 64 // FIXME: In every instance except one it is the
65 // CustomElementConstructorBuilder that observes document 65 // CustomElementConstructorBuilder that observes document
66 // destruction during registration. This responsibility should be 66 // destruction during registration. This responsibility should be
67 // consolidated in one place. 67 // consolidated in one place.
68 RegistrationContextObserver observer(document); 68 RegistrationContextObserver observer(document);
69 69
70 AtomicString type = userSuppliedName.lower(); 70 AtomicString type = userSuppliedName.lower();
71 71
72 if (!CustomElement::isValidName(type, validNames)) { 72 if (!CustomElement::isValidName(type)) {
73 CustomElementException::throwException(CustomElementException::InvalidNa me, type, exceptionState); 73 CustomElementException::throwException(CustomElementException::InvalidNa me, type, exceptionState);
74 return 0; 74 return 0;
75 } 75 }
76 76
77 if (m_definitions.contains(type)) { 77 if (m_definitions.contains(type)) {
78 CustomElementException::throwException(CustomElementException::TypeAlrea dyRegistered, type, exceptionState); 78 CustomElementException::throwException(CustomElementException::TypeAlrea dyRegistered, type, exceptionState);
79 return 0; 79 return 0;
80 } 80 }
81 81
82 QualifiedName tagName = nullName; 82 QualifiedName tagName = nullName;
(...skipping 26 matching lines...) Expand all
109 109
110 return definition.get(); 110 return definition.get();
111 } 111 }
112 112
113 CustomElementDefinition* CustomElementRegistry::find(const CustomElementDescript or& descriptor) const 113 CustomElementDefinition* CustomElementRegistry::find(const CustomElementDescript or& descriptor) const
114 { 114 {
115 return m_definitions.get(descriptor); 115 return m_definitions.get(descriptor);
116 } 116 }
117 117
118 } // namespace blink 118 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/dom/custom/CustomElementRegistry.h ('k') | sky/engine/public/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698