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

Side by Side Diff: Source/core/html/imports/HTMLImportLoader.h

Issue 274213003: HTML Imports: Make sure new imports being added to the "first child" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ready to review Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_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 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; }
77 79
78 bool isDone() const { return m_state == StateLoaded || m_state == StateError ; } 80 bool isDone() const { return m_state == StateLoaded || m_state == StateError ; }
79 bool hasError() const { return m_state == StateError; } 81 bool hasError() const { return m_state == StateError; }
80 bool shouldBlockScriptExecution() const; 82 bool shouldBlockScriptExecution() const;
81 83
82 void importDestroyed(); 84 void importDestroyed();
83 void startLoading(const ResourcePtr<RawResource>&); 85 void startLoading(const ResourcePtr<RawResource>&);
84 void didFinishParsing(); 86 void didFinishParsing();
85 void didRemoveAllPendingStylesheet(); 87 void didRemoveAllPendingStylesheet();
86 88
(...skipping 21 matching lines...) Expand all
108 Vector<HTMLImportChild*> m_imports; 110 Vector<HTMLImportChild*> m_imports;
109 State m_state; 111 State m_state;
110 RefPtr<Document> m_importedDocument; 112 RefPtr<Document> m_importedDocument;
111 RefPtr<DocumentWriter> m_writer; 113 RefPtr<DocumentWriter> m_writer;
112 RefPtr<CustomElementMicrotaskQueue> m_microtaskQueue; 114 RefPtr<CustomElementMicrotaskQueue> m_microtaskQueue;
113 }; 115 };
114 116
115 } // namespace WebCore 117 } // namespace WebCore
116 118
117 #endif // HTMLImportLoader_h 119 #endif // HTMLImportLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698