Chromium Code Reviews

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

Issue 18896003: [WIP] Migrate Fullscreen to use top layer instead of RenderFullScreen (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
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 478 matching lines...)
489 489
490 RenderObject* HTMLMediaElement::createRenderer(RenderStyle*) 490 RenderObject* HTMLMediaElement::createRenderer(RenderStyle*)
491 { 491 {
492 return new (document()->renderArena()) RenderMedia(this); 492 return new (document()->renderArena()) RenderMedia(this);
493 } 493 }
494 494
495 bool HTMLMediaElement::childShouldCreateRenderer(const NodeRenderingContext& chi ldContext) const 495 bool HTMLMediaElement::childShouldCreateRenderer(const NodeRenderingContext& chi ldContext) const
496 { 496 {
497 if (!hasMediaControls()) 497 if (!hasMediaControls())
498 return false; 498 return false;
499
499 // <media> doesn't allow its content, including shadow subtree, to 500 // <media> doesn't allow its content, including shadow subtree, to
500 // be rendered. So this should return false for most of the children. 501 // be rendered. So this should return false for most of the children.
501 // One exception is a shadow tree built for rendering controls which should be visible. 502 // One exception is a shadow tree built for rendering controls which should be visible.
502 // So we let them go here by comparing its subtree root with one of the cont rols. 503 // So we let them go here by comparing its subtree root with one of the cont rols.
503 return (mediaControls()->treeScope() == childContext.node()->treeScope() 504 if ((mediaControls()->treeScope() == childContext.node()->treeScope()
504 && childContext.isOnUpperEncapsulationBoundary() && HTMLElement::chi ldShouldCreateRenderer(childContext)); 505 && childContext.isOnUpperEncapsulationBoundary() && HTMLElement::childSh ouldCreateRenderer(childContext)))
506 return true;
507 if (childContext.node()->pseudoId() == BACKDROP)
508 return true;
509
510 return false;
505 } 511 }
506 512
507 Node::InsertionNotificationRequest HTMLMediaElement::insertedInto(ContainerNode* insertionPoint) 513 Node::InsertionNotificationRequest HTMLMediaElement::insertedInto(ContainerNode* insertionPoint)
508 { 514 {
509 LOG(Media, "HTMLMediaElement::insertedInto"); 515 LOG(Media, "HTMLMediaElement::insertedInto");
510 516
511 HTMLElement::insertedInto(insertionPoint); 517 HTMLElement::insertedInto(insertionPoint);
512 if (insertionPoint->inDocument()) { 518 if (insertionPoint->inDocument()) {
513 m_inActiveDocument = true; 519 m_inActiveDocument = true;
514 520
(...skipping 3458 matching lines...)
3973 info.addMember(m_mediaGroup, "mediaGroup"); 3979 info.addMember(m_mediaGroup, "mediaGroup");
3974 info.addMember(m_mediaController, "mediaController"); 3980 info.addMember(m_mediaController, "mediaController");
3975 3981
3976 #if ENABLE(WEB_AUDIO) 3982 #if ENABLE(WEB_AUDIO)
3977 info.addMember(m_audioSourceNode, "audioSourceNode"); 3983 info.addMember(m_audioSourceNode, "audioSourceNode");
3978 #endif 3984 #endif
3979 3985
3980 } 3986 }
3981 3987
3982 } 3988 }
OLDNEW

Powered by Google App Engine