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

Side by Side Diff: Source/core/html/imports/HTMLImport.cpp

Issue 249563003: REGRESSION(r171966): Custom elements in async imports don't get upgrade. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « Source/core/html/imports/HTMLImport.h ('k') | Source/core/html/imports/HTMLImportChild.cpp » ('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) 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 bool HTMLImport::precedes(HTMLImport* import) 47 bool HTMLImport::precedes(HTMLImport* import)
48 { 48 {
49 for (HTMLImport* i = this; i; i = traverseNext(i)) { 49 for (HTMLImport* i = this; i; i = traverseNext(i)) {
50 if (i == import) 50 if (i == import)
51 return true; 51 return true;
52 } 52 }
53 53
54 return false; 54 return false;
55 } 55 }
56 56
57 bool HTMLImport::formsCycle() const
58 {
59 for (const HTMLImport* i = this->parent(); i; i = i->parent()) {
60 if (i->document() == this->document())
61 return true;
62 }
63
64 return false;
65
66 }
67
57 void HTMLImport::appendImport(HTMLImport* child) 68 void HTMLImport::appendImport(HTMLImport* child)
58 { 69 {
59 appendChild(child); 70 appendChild(child);
60 71
61 // This prevents HTML parser from going beyond the 72 // This prevents HTML parser from going beyond the
62 // blockage line before the precise state is computed by recalcState(). 73 // blockage line before the precise state is computed by recalcState().
63 if (child->isSync()) 74 if (child->isSync())
64 m_state = HTMLImportState::blockedState(); 75 m_state = HTMLImportState::blockedState();
65 76
66 stateWillChange(); 77 stateWillChange();
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 child->showTree(highlight, depth + 1); 134 child->showTree(highlight, depth + 1);
124 } 135 }
125 136
126 void HTMLImport::showThis() 137 void HTMLImport::showThis()
127 { 138 {
128 fprintf(stderr, "%p state=%d", this, m_state.peekValueForDebug()); 139 fprintf(stderr, "%p state=%d", this, m_state.peekValueForDebug());
129 } 140 }
130 #endif 141 #endif
131 142
132 } // namespace WebCore 143 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/imports/HTMLImport.h ('k') | Source/core/html/imports/HTMLImportChild.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698