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

Side by Side Diff: Source/core/html/HTMLMediaElement.cpp

Issue 304003002: Don't mutate the DOM from inside an Element's constructor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix includes Created 6 years, 6 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/HTMLKeygenElement.cpp ('k') | Source/core/html/HTMLVideoElement.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) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 #endif 293 #endif
294 { 294 {
295 ASSERT(RuntimeEnabledFeatures::mediaEnabled()); 295 ASSERT(RuntimeEnabledFeatures::mediaEnabled());
296 296
297 WTF_LOG(Media, "HTMLMediaElement::HTMLMediaElement"); 297 WTF_LOG(Media, "HTMLMediaElement::HTMLMediaElement");
298 ScriptWrappable::init(this); 298 ScriptWrappable::init(this);
299 299
300 if (document.settings() && document.settings()->mediaPlaybackRequiresUserGes ture()) 300 if (document.settings() && document.settings()->mediaPlaybackRequiresUserGes ture())
301 m_userGestureRequiredForPlay = true; 301 m_userGestureRequiredForPlay = true;
302 302
303 // We must always have a ShadowRoot so children like <source> will not rende r
304 // as they never have an insertion point.
305 ensureUserAgentShadowRoot();
306 setHasCustomStyleCallbacks(); 303 setHasCustomStyleCallbacks();
307 addElementToDocumentMap(this, &document); 304 addElementToDocumentMap(this, &document);
308 } 305 }
309 306
310 HTMLMediaElement::~HTMLMediaElement() 307 HTMLMediaElement::~HTMLMediaElement()
311 { 308 {
312 WTF_LOG(Media, "HTMLMediaElement::~HTMLMediaElement"); 309 WTF_LOG(Media, "HTMLMediaElement::~HTMLMediaElement");
313 310
314 m_asyncEventQueue->close(); 311 m_asyncEventQueue->close();
315 312
(...skipping 3350 matching lines...) Expand 10 before | Expand all | Expand 10 after
3666 visitor->trace(m_error); 3663 visitor->trace(m_error);
3667 visitor->trace(m_currentSourceNode); 3664 visitor->trace(m_currentSourceNode);
3668 visitor->trace(m_nextChildNodeToConsider); 3665 visitor->trace(m_nextChildNodeToConsider);
3669 visitor->trace(m_textTracks); 3666 visitor->trace(m_textTracks);
3670 visitor->trace(m_textTracksWhenResourceSelectionBegan); 3667 visitor->trace(m_textTracksWhenResourceSelectionBegan);
3671 WillBeHeapSupplementable<HTMLMediaElement>::trace(visitor); 3668 WillBeHeapSupplementable<HTMLMediaElement>::trace(visitor);
3672 HTMLElement::trace(visitor); 3669 HTMLElement::trace(visitor);
3673 } 3670 }
3674 3671
3675 } 3672 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLKeygenElement.cpp ('k') | Source/core/html/HTMLVideoElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698