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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 StateError | 62 StateError |
63 }; | 63 }; |
64 | 64 |
65 static PassRefPtr<HTMLImportLoader> create(HTMLImportsController* controller
) | 65 static PassRefPtr<HTMLImportLoader> create(HTMLImportsController* controller
) |
66 { | 66 { |
67 return adoptRef(new HTMLImportLoader(controller)); | 67 return adoptRef(new HTMLImportLoader(controller)); |
68 } | 68 } |
69 | 69 |
70 virtual ~HTMLImportLoader(); | 70 virtual ~HTMLImportLoader(); |
71 | 71 |
72 Document* document() const { return m_importedDocument.get(); } | 72 Document* document() const { return m_document.get(); } |
73 Document* importedDocument() const; | |
74 void addImport(HTMLImportChild*); | 73 void addImport(HTMLImportChild*); |
75 void removeImport(HTMLImportChild*); | 74 void removeImport(HTMLImportChild*); |
76 void moveToFirst(HTMLImportChild*); | 75 void moveToFirst(HTMLImportChild*); |
77 HTMLImportChild* firstImport() const { return m_imports[0]; } | 76 HTMLImportChild* firstImport() const { return m_imports[0]; } |
78 bool isFirstImport(const HTMLImportChild* child) const { return m_imports.si
ze() ? firstImport() == child : false; } | 77 bool isFirstImport(const HTMLImportChild* child) const { return m_imports.si
ze() ? firstImport() == child : false; } |
79 | 78 |
80 bool isDone() const { return m_state == StateLoaded || m_state == StateError
; } | 79 bool isDone() const { return m_state == StateLoaded || m_state == StateError
; } |
81 bool hasError() const { return m_state == StateError; } | 80 bool hasError() const { return m_state == StateError; } |
82 bool shouldBlockScriptExecution() const; | 81 bool shouldBlockScriptExecution() const; |
83 | 82 |
(...skipping 18 matching lines...) Expand all Loading... |
102 State finishLoading(); | 101 State finishLoading(); |
103 | 102 |
104 void setState(State); | 103 void setState(State); |
105 void didFinishLoading(); | 104 void didFinishLoading(); |
106 bool hasPendingResources() const; | 105 bool hasPendingResources() const; |
107 void clear(); | 106 void clear(); |
108 | 107 |
109 HTMLImportsController* m_controller; | 108 HTMLImportsController* m_controller; |
110 Vector<HTMLImportChild*> m_imports; | 109 Vector<HTMLImportChild*> m_imports; |
111 State m_state; | 110 State m_state; |
112 RefPtr<Document> m_importedDocument; | 111 RefPtr<Document> m_document; |
113 RefPtr<DocumentWriter> m_writer; | 112 RefPtr<DocumentWriter> m_writer; |
114 RefPtr<CustomElementMicrotaskQueue> m_microtaskQueue; | 113 RefPtr<CustomElementMicrotaskQueue> m_microtaskQueue; |
115 }; | 114 }; |
116 | 115 |
117 } // namespace WebCore | 116 } // namespace WebCore |
118 | 117 |
119 #endif // HTMLImportLoader_h | 118 #endif // HTMLImportLoader_h |
OLD | NEW |