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

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

Issue 2149893003: Rename Node::inShadowIncludingDocument() to Node::isConnected() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Created 4 years, 5 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
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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 LayoutObject* HTMLMediaElement::createLayoutObject(const ComputedStyle&) 588 LayoutObject* HTMLMediaElement::createLayoutObject(const ComputedStyle&)
589 { 589 {
590 return new LayoutMedia(this); 590 return new LayoutMedia(this);
591 } 591 }
592 592
593 Node::InsertionNotificationRequest HTMLMediaElement::insertedInto(ContainerNode* insertionPoint) 593 Node::InsertionNotificationRequest HTMLMediaElement::insertedInto(ContainerNode* insertionPoint)
594 { 594 {
595 MEDIA_LOG << "insertedInto(" << (void*)this << ", " << insertionPoint << ")" ; 595 MEDIA_LOG << "insertedInto(" << (void*)this << ", " << insertionPoint << ")" ;
596 596
597 HTMLElement::insertedInto(insertionPoint); 597 HTMLElement::insertedInto(insertionPoint);
598 if (insertionPoint->inShadowIncludingDocument()) { 598 if (insertionPoint->isConnected()) {
599 UseCounter::count(document(), UseCounter::HTMLMediaElementInDocument); 599 UseCounter::count(document(), UseCounter::HTMLMediaElementInDocument);
600 if ((!getAttribute(srcAttr).isEmpty() || m_srcObject) && m_networkState == NETWORK_EMPTY) { 600 if ((!getAttribute(srcAttr).isEmpty() || m_srcObject) && m_networkState == NETWORK_EMPTY) {
601 m_ignorePreloadNone = false; 601 m_ignorePreloadNone = false;
602 invokeLoadAlgorithm(); 602 invokeLoadAlgorithm();
603 } 603 }
604 } 604 }
605 605
606 return InsertionShouldCallDidNotifySubtreeInsertions; 606 return InsertionShouldCallDidNotifySubtreeInsertions;
607 } 607 }
608 608
(...skipping 2888 matching lines...) Expand 10 before | Expand all | Expand 10 after
3497 3497
3498 ShadowRoot& shadowRoot = ensureUserAgentShadowRoot(); 3498 ShadowRoot& shadowRoot = ensureUserAgentShadowRoot();
3499 assertShadowRootChildren(shadowRoot); 3499 assertShadowRootChildren(shadowRoot);
3500 3500
3501 // The media controls should be inserted after the text track container, 3501 // The media controls should be inserted after the text track container,
3502 // so that they are rendered in front of captions and subtitles. 3502 // so that they are rendered in front of captions and subtitles.
3503 shadowRoot.appendChild(mediaControls); 3503 shadowRoot.appendChild(mediaControls);
3504 3504
3505 assertShadowRootChildren(shadowRoot); 3505 assertShadowRootChildren(shadowRoot);
3506 3506
3507 if (!shouldShowControls() || !inShadowIncludingDocument()) 3507 if (!shouldShowControls() || !isConnected())
3508 mediaControls->hide(); 3508 mediaControls->hide();
3509 } 3509 }
3510 3510
3511 void HTMLMediaElement::configureMediaControls() 3511 void HTMLMediaElement::configureMediaControls()
3512 { 3512 {
3513 if (!inShadowIncludingDocument()) { 3513 if (!isConnected()) {
3514 if (mediaControls()) 3514 if (mediaControls())
3515 mediaControls()->hide(); 3515 mediaControls()->hide();
3516 return; 3516 return;
3517 } 3517 }
3518 3518
3519 ensureMediaControls(); 3519 ensureMediaControls();
3520 mediaControls()->reset(); 3520 mediaControls()->reset();
3521 3521
3522 if (shouldShowControls(RecordMetricsBehavior::DoRecord)) 3522 if (shouldShowControls(RecordMetricsBehavior::DoRecord))
3523 mediaControls()->show(); 3523 mediaControls()->show();
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
4033 4033
4034 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co nst 4034 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co nst
4035 { 4035 {
4036 IntRect result; 4036 IntRect result;
4037 if (LayoutObject* object = m_element->layoutObject()) 4037 if (LayoutObject* object = m_element->layoutObject())
4038 result = object->absoluteBoundingBoxRect(); 4038 result = object->absoluteBoundingBoxRect();
4039 return result; 4039 return result;
4040 } 4040 }
4041 4041
4042 } // namespace blink 4042 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMarqueeElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLMetaElement-in.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698