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

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

Issue 214513011: HTMLLinkElement should not run script inside ::insertedInto (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/HTMLLinkElement.cpp ('k') | no next file » | 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 if (m_child) { 98 if (m_child) {
99 m_child->clearClient(); 99 m_child->clearClient();
100 m_child = 0; 100 m_child = 0;
101 } 101 }
102 } 102 }
103 103
104 void LinkImport::didFinish() 104 void LinkImport::didFinish()
105 { 105 {
106 if (!m_owner || !m_owner->inDocument()) 106 if (!m_owner || !m_owner->inDocument())
107 return; 107 return;
108 // Because didFinish() is called from import's own scheduler in HTMLImportsC ontroller, 108 m_owner->scheduleEvent();
109 // we don't need to scheduleEvent() here.
110 m_owner->dispatchEventImmediately();
111 } 109 }
112 110
113 void LinkImport::importChildWasDestroyed(HTMLImportChild* child) 111 void LinkImport::importChildWasDestroyed(HTMLImportChild* child)
114 { 112 {
115 ASSERT(m_child == child); 113 ASSERT(m_child == child);
116 m_child = 0; 114 m_child = 0;
117 clear(); 115 clear();
118 } 116 }
119 117
120 bool LinkImport::isSync() const 118 bool LinkImport::isSync() const
(...skipping 10 matching lines...) Expand all
131 { 129 {
132 return m_child && m_child->isDone() && !m_child->loaderHasError(); 130 return m_child && m_child->isDone() && !m_child->loaderHasError();
133 } 131 }
134 132
135 bool LinkImport::ownsLoader() const 133 bool LinkImport::ownsLoader() const
136 { 134 {
137 return m_child && m_child->hasLoader() && m_child->ownsLoader(); 135 return m_child && m_child->hasLoader() && m_child->ownsLoader();
138 } 136 }
139 137
140 } // namespace WebCore 138 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLLinkElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698