Bug 1264837 Part 15 - Remove nsVideoFrameBase
MozReview-Commit-ID: JUBNfhJ9LlJ
--- a/layout/generic/nsVideoFrame.cpp
+++ b/layout/generic/nsVideoFrame.cpp
@@ -37,29 +37,29 @@ nsIFrame*
NS_NewHTMLVideoFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsVideoFrame(aContext);
}
NS_IMPL_FRAMEARENA_HELPERS(nsVideoFrame)
nsVideoFrame::nsVideoFrame(nsStyleContext* aContext)
- : nsVideoFrameBase(aContext)
+ : nsContainerFrame(aContext)
{
EnableVisibilityTracking();
}
nsVideoFrame::~nsVideoFrame()
{
}
NS_QUERYFRAME_HEAD(nsVideoFrame)
NS_QUERYFRAME_ENTRY(nsVideoFrame)
NS_QUERYFRAME_ENTRY(nsIAnonymousContentCreator)
-NS_QUERYFRAME_TAIL_INHERITING(nsVideoFrameBase)
+NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
nsresult
nsVideoFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
{
nsNodeInfoManager *nodeInfoManager = GetContent()->GetComposedDoc()->NodeInfoManager();
RefPtr<NodeInfo> nodeInfo;
Element *element;
@@ -140,17 +140,17 @@ nsVideoFrame::AppendAnonymousContentTo(n
}
void
nsVideoFrame::DestroyFrom(nsIFrame* aDestructRoot)
{
nsContentUtils::DestroyAnonymousContent(&mCaptionDiv);
nsContentUtils::DestroyAnonymousContent(&mVideoControls);
nsContentUtils::DestroyAnonymousContent(&mPosterImage);
- nsVideoFrameBase::DestroyFrom(aDestructRoot);
+ nsContainerFrame::DestroyFrom(aDestructRoot);
}
bool
nsVideoFrame::IsLeaf() const
{
return true;
}
@@ -607,34 +607,34 @@ nsVideoFrame::UpdatePosterSource(bool aN
nsresult
nsVideoFrame::AttributeChanged(int32_t aNameSpaceID,
nsIAtom* aAttribute,
int32_t aModType)
{
if (aAttribute == nsGkAtoms::poster && HasVideoElement()) {
UpdatePosterSource(true);
}
- return nsVideoFrameBase::AttributeChanged(aNameSpaceID,
+ return nsContainerFrame::AttributeChanged(aNameSpaceID,
aAttribute,
aModType);
}
void
nsVideoFrame::OnVisibilityChange(Visibility aNewVisibility,
Maybe<OnNonvisible> aNonvisibleAction)
{
nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(mPosterImage);
if (!imageLoader) {
- nsVideoFrameBase::OnVisibilityChange(aNewVisibility, aNonvisibleAction);
+ nsContainerFrame::OnVisibilityChange(aNewVisibility, aNonvisibleAction);
return;
}
imageLoader->OnVisibilityChange(aNewVisibility, aNonvisibleAction);
- nsVideoFrameBase::OnVisibilityChange(aNewVisibility, aNonvisibleAction);
+ nsContainerFrame::OnVisibilityChange(aNewVisibility, aNonvisibleAction);
}
bool nsVideoFrame::HasVideoElement() {
nsCOMPtr<nsIDOMHTMLMediaElement> mediaDomElement = do_QueryInterface(mContent);
return mediaDomElement->IsVideo();
}
bool nsVideoFrame::HasVideoData()
--- a/layout/generic/nsVideoFrame.h
+++ b/layout/generic/nsVideoFrame.h
@@ -21,19 +21,18 @@ class Layer;
class LayerManager;
} // namespace layers
} // namespace mozilla
class nsAString;
class nsPresContext;
class nsDisplayItem;
-typedef nsContainerFrame nsVideoFrameBase;
-
-class nsVideoFrame : public nsVideoFrameBase, public nsIAnonymousContentCreator
+class nsVideoFrame : public nsContainerFrame
+ , public nsIAnonymousContentCreator
{
public:
template <typename T> using Maybe = mozilla::Maybe<T>;
using Nothing = mozilla::Nothing;
using Visibility = mozilla::Visibility;
typedef mozilla::layers::Layer Layer;
typedef mozilla::layers::LayerManager LayerManager;