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 | 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 10 matching lines...) Expand all Loading... |
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef CustomElementMicrotaskImportStep_h | 31 #ifndef V0CustomElementMicrotaskImportStep_h |
32 #define CustomElementMicrotaskImportStep_h | 32 #define V0CustomElementMicrotaskImportStep_h |
33 | 33 |
34 #include "core/dom/custom/CustomElementMicrotaskStep.h" | 34 #include "core/dom/custom/V0CustomElementMicrotaskStep.h" |
35 #include "platform/heap/Handle.h" | 35 #include "platform/heap/Handle.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 class CustomElementSyncMicrotaskQueue; | 39 class V0CustomElementSyncMicrotaskQueue; |
40 class HTMLImportChild; | 40 class HTMLImportChild; |
41 | 41 |
42 // Processes the Custom Elements in an HTML Import. This is a | 42 // Processes the Custom Elements in an HTML Import. This is a |
43 // composite step which processes the Custom Elements created by | 43 // composite step which processes the Custom Elements created by |
44 // parsing the import, and its sub-imports. | 44 // parsing the import, and its sub-imports. |
45 // | 45 // |
46 // This step blocks further Custom Element microtask processing if its | 46 // This step blocks further Custom Element microtask processing if its |
47 // import isn't "ready" (finished parsing and running script.) | 47 // import isn't "ready" (finished parsing and running script.) |
48 class CustomElementMicrotaskImportStep final : public CustomElementMicrotaskStep
{ | 48 class V0CustomElementMicrotaskImportStep final : public V0CustomElementMicrotask
Step { |
49 public: | 49 public: |
50 static CustomElementMicrotaskImportStep* create(HTMLImportChild* import) | 50 static V0CustomElementMicrotaskImportStep* create(HTMLImportChild* import) |
51 { | 51 { |
52 return new CustomElementMicrotaskImportStep(import); | 52 return new V0CustomElementMicrotaskImportStep(import); |
53 } | 53 } |
54 | 54 |
55 ~CustomElementMicrotaskImportStep() override; | 55 ~V0CustomElementMicrotaskImportStep() override; |
56 | 56 |
57 // API for HTML Imports | 57 // API for HTML Imports |
58 void invalidate(); | 58 void invalidate(); |
59 void importDidFinishLoading(); | 59 void importDidFinishLoading(); |
60 | 60 |
61 DECLARE_VIRTUAL_TRACE(); | 61 DECLARE_VIRTUAL_TRACE(); |
62 | 62 |
63 private: | 63 private: |
64 explicit CustomElementMicrotaskImportStep(HTMLImportChild*); | 64 explicit V0CustomElementMicrotaskImportStep(HTMLImportChild*); |
65 | 65 |
66 void didUpgradeAllCustomElements(); | 66 void didUpgradeAllCustomElements(); |
67 bool shouldWaitForImport() const; | 67 bool shouldWaitForImport() const; |
68 | 68 |
69 // CustomElementMicrotaskStep | 69 // V0CustomElementMicrotaskStep |
70 Result process() final; | 70 Result process() final; |
71 | 71 |
72 #if !defined(NDEBUG) | 72 #if !defined(NDEBUG) |
73 void show(unsigned indent) override; | 73 void show(unsigned indent) override; |
74 #endif | 74 #endif |
75 WeakMember<HTMLImportChild> m_import; | 75 WeakMember<HTMLImportChild> m_import; |
76 Member<CustomElementSyncMicrotaskQueue> m_queue; | 76 Member<V0CustomElementSyncMicrotaskQueue> m_queue; |
77 }; | 77 }; |
78 | 78 |
79 } // namespace blink | 79 } // namespace blink |
80 | 80 |
81 #endif // CustomElementMicrotaskImportStep_h | 81 #endif // V0CustomElementMicrotaskImportStep_h |
OLD | NEW |