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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_importedDocument.get(); } |
73 Document* importedDocument() const; | 73 Document* importedDocument() const; |
74 void addImport(HTMLImportChild*); | 74 void addImport(HTMLImportChild*); |
75 void removeImport(HTMLImportChild*); | 75 void removeImport(HTMLImportChild*); |
76 void moveToFirst(HTMLImportChild*); | 76 void moveToFirst(HTMLImportChild*); |
77 HTMLImportChild* firstImport() const { return m_imports[0]; } | 77 HTMLImportChild* firstImport() const { return m_imports[0]; } |
78 bool isFirstImport(HTMLImportChild* child) const { return m_imports.size() ?
firstImport() == child : false; } | 78 bool isFirstImport(const HTMLImportChild* child) const { return m_imports.si
ze() ? firstImport() == child : false; } |
79 | 79 |
80 bool isDone() const { return m_state == StateLoaded || m_state == StateError
; } | 80 bool isDone() const { return m_state == StateLoaded || m_state == StateError
; } |
81 bool hasError() const { return m_state == StateError; } | 81 bool hasError() const { return m_state == StateError; } |
82 bool shouldBlockScriptExecution() const; | 82 bool shouldBlockScriptExecution() const; |
83 | 83 |
84 void importDestroyed(); | 84 void importDestroyed(); |
85 void startLoading(const ResourcePtr<RawResource>&); | 85 void startLoading(const ResourcePtr<RawResource>&); |
86 void didFinishParsing(); | 86 void didFinishParsing(); |
87 void didRemoveAllPendingStylesheet(); | 87 void didRemoveAllPendingStylesheet(); |
88 | 88 |
(...skipping 21 matching lines...) Expand all Loading... |
110 Vector<HTMLImportChild*> m_imports; | 110 Vector<HTMLImportChild*> m_imports; |
111 State m_state; | 111 State m_state; |
112 RefPtr<Document> m_importedDocument; | 112 RefPtr<Document> m_importedDocument; |
113 RefPtr<DocumentWriter> m_writer; | 113 RefPtr<DocumentWriter> m_writer; |
114 RefPtr<CustomElementMicrotaskQueue> m_microtaskQueue; | 114 RefPtr<CustomElementMicrotaskQueue> m_microtaskQueue; |
115 }; | 115 }; |
116 | 116 |
117 } // namespace WebCore | 117 } // namespace WebCore |
118 | 118 |
119 #endif // HTMLImportLoader_h | 119 #endif // HTMLImportLoader_h |
OLD | NEW |