Bug 1264837 Part 15 - Remove nsVideoFrameBase r=dholbert

MozReview-Commit-ID: JUBNfhJ9LlJ

--HG--
extra : rebase_source : 0ce35a28bfadb27a690eb103b9d7cd94e056061f
This commit is contained in:
Ting-Yu Lin 2016-04-18 14:26:44 +08:00
parent f930931ef5
commit 669dc32fe5
2 changed files with 8 additions and 9 deletions

View File

@ -42,7 +42,7 @@ NS_NewHTMLVideoFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
NS_IMPL_FRAMEARENA_HELPERS(nsVideoFrame) NS_IMPL_FRAMEARENA_HELPERS(nsVideoFrame)
nsVideoFrame::nsVideoFrame(nsStyleContext* aContext) nsVideoFrame::nsVideoFrame(nsStyleContext* aContext)
: nsVideoFrameBase(aContext) : nsContainerFrame(aContext)
{ {
EnableVisibilityTracking(); EnableVisibilityTracking();
} }
@ -54,7 +54,7 @@ nsVideoFrame::~nsVideoFrame()
NS_QUERYFRAME_HEAD(nsVideoFrame) NS_QUERYFRAME_HEAD(nsVideoFrame)
NS_QUERYFRAME_ENTRY(nsVideoFrame) NS_QUERYFRAME_ENTRY(nsVideoFrame)
NS_QUERYFRAME_ENTRY(nsIAnonymousContentCreator) NS_QUERYFRAME_ENTRY(nsIAnonymousContentCreator)
NS_QUERYFRAME_TAIL_INHERITING(nsVideoFrameBase) NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
nsresult nsresult
nsVideoFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements) nsVideoFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
@ -145,7 +145,7 @@ nsVideoFrame::DestroyFrom(nsIFrame* aDestructRoot)
nsContentUtils::DestroyAnonymousContent(&mCaptionDiv); nsContentUtils::DestroyAnonymousContent(&mCaptionDiv);
nsContentUtils::DestroyAnonymousContent(&mVideoControls); nsContentUtils::DestroyAnonymousContent(&mVideoControls);
nsContentUtils::DestroyAnonymousContent(&mPosterImage); nsContentUtils::DestroyAnonymousContent(&mPosterImage);
nsVideoFrameBase::DestroyFrom(aDestructRoot); nsContainerFrame::DestroyFrom(aDestructRoot);
} }
bool bool
@ -612,7 +612,7 @@ nsVideoFrame::AttributeChanged(int32_t aNameSpaceID,
if (aAttribute == nsGkAtoms::poster && HasVideoElement()) { if (aAttribute == nsGkAtoms::poster && HasVideoElement()) {
UpdatePosterSource(true); UpdatePosterSource(true);
} }
return nsVideoFrameBase::AttributeChanged(aNameSpaceID, return nsContainerFrame::AttributeChanged(aNameSpaceID,
aAttribute, aAttribute,
aModType); aModType);
} }
@ -623,13 +623,13 @@ nsVideoFrame::OnVisibilityChange(Visibility aNewVisibility,
{ {
nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(mPosterImage); nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(mPosterImage);
if (!imageLoader) { if (!imageLoader) {
nsVideoFrameBase::OnVisibilityChange(aNewVisibility, aNonvisibleAction); nsContainerFrame::OnVisibilityChange(aNewVisibility, aNonvisibleAction);
return; return;
} }
imageLoader->OnVisibilityChange(aNewVisibility, aNonvisibleAction); imageLoader->OnVisibilityChange(aNewVisibility, aNonvisibleAction);
nsVideoFrameBase::OnVisibilityChange(aNewVisibility, aNonvisibleAction); nsContainerFrame::OnVisibilityChange(aNewVisibility, aNonvisibleAction);
} }
bool nsVideoFrame::HasVideoElement() { bool nsVideoFrame::HasVideoElement() {

View File

@ -26,9 +26,8 @@ class nsAString;
class nsPresContext; class nsPresContext;
class nsDisplayItem; class nsDisplayItem;
typedef nsContainerFrame nsVideoFrameBase; class nsVideoFrame : public nsContainerFrame
, public nsIAnonymousContentCreator
class nsVideoFrame : public nsVideoFrameBase, public nsIAnonymousContentCreator
{ {
public: public:
template <typename T> using Maybe = mozilla::Maybe<T>; template <typename T> using Maybe = mozilla::Maybe<T>;