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

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

Issue 1170583002: Recalc style or reattach when adding or removing the audio controls attribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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/HTMLMediaElement.h ('k') | Source/core/html/HTMLVideoElement.h » ('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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 } 560 }
561 561
562 void HTMLMediaElement::finishParsingChildren() 562 void HTMLMediaElement::finishParsingChildren()
563 { 563 {
564 HTMLElement::finishParsingChildren(); 564 HTMLElement::finishParsingChildren();
565 565
566 if (Traversal<HTMLTrackElement>::firstChild(*this)) 566 if (Traversal<HTMLTrackElement>::firstChild(*this))
567 scheduleDelayedAction(LoadTextTrackResource); 567 scheduleDelayedAction(LoadTextTrackResource);
568 } 568 }
569 569
570 bool HTMLMediaElement::layoutObjectIsNeeded(const ComputedStyle& style)
571 {
572 return shouldShowControls() && HTMLElement::layoutObjectIsNeeded(style);
573 }
574
575 LayoutObject* HTMLMediaElement::createLayoutObject(const ComputedStyle&) 570 LayoutObject* HTMLMediaElement::createLayoutObject(const ComputedStyle&)
576 { 571 {
577 return new LayoutMedia(this); 572 return new LayoutMedia(this);
578 } 573 }
579 574
580 Node::InsertionNotificationRequest HTMLMediaElement::insertedInto(ContainerNode* insertionPoint) 575 Node::InsertionNotificationRequest HTMLMediaElement::insertedInto(ContainerNode* insertionPoint)
581 { 576 {
582 WTF_LOG(Media, "HTMLMediaElement::insertedInto(%p, %p)", this, insertionPoin t); 577 WTF_LOG(Media, "HTMLMediaElement::insertedInto(%p, %p)", this, insertionPoin t);
583 578
584 HTMLElement::insertedInto(insertionPoint); 579 HTMLElement::insertedInto(insertionPoint);
(...skipping 3075 matching lines...) Expand 10 before | Expand all | Expand 10 after
3660 3655
3661 #if ENABLE(WEB_AUDIO) 3656 #if ENABLE(WEB_AUDIO)
3662 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) 3657 void HTMLMediaElement::clearWeakMembers(Visitor* visitor)
3663 { 3658 {
3664 if (!Heap::isHeapObjectAlive(m_audioSourceNode) && audioSourceProvider()) 3659 if (!Heap::isHeapObjectAlive(m_audioSourceNode) && audioSourceProvider())
3665 audioSourceProvider()->setClient(nullptr); 3660 audioSourceProvider()->setClient(nullptr);
3666 } 3661 }
3667 #endif 3662 #endif
3668 3663
3669 } 3664 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/HTMLVideoElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698