Bug 1251519 Part 1 - Remove nsTextFrameBase as an nsFrame alias. r?mats
Bug 655877 Part 20 made this deliberately to let nsTextFrame
QueryFrame-able. https://hg.mozilla.org/mozilla-central/rev/d8c6025c0881
But other types like nsPlaceholderFrame or nsBulletFrame are also
implemented QureyFrame, which do not have this inheritance indirection.
I guess it was for historical reason, and can be removed safely.
MozReview-Commit-ID: CPeQvpKzEKh
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -2681,17 +2681,17 @@ BuildTextRunsScanner::AssignTextRun(gfxT
? TEXT_IN_TEXTRUN_USER_DATA
: TEXT_IN_UNINFLATED_TEXTRUN_USER_DATA;
startFrame->AddStateBits(whichTextRunState);
}
}
NS_QUERYFRAME_HEAD(nsTextFrame)
NS_QUERYFRAME_ENTRY(nsTextFrame)
-NS_QUERYFRAME_TAIL_INHERITING(nsTextFrameBase)
+NS_QUERYFRAME_TAIL_INHERITING(nsFrame)
gfxSkipCharsIterator
nsTextFrame::EnsureTextRun(TextRunType aWhichTextRun,
DrawTarget* aRefDrawTarget,
nsIFrame* aLineContainer,
const nsLineList::iterator* aLine,
uint32_t* aFlowEndInTextRun)
{
@@ -4442,30 +4442,30 @@ nsTextFrame::InvalidateFrame(uint32_t aD
{
if (IsSVGText()) {
nsIFrame* svgTextFrame =
nsLayoutUtils::GetClosestFrameOfType(GetParent(),
nsGkAtoms::svgTextFrame);
svgTextFrame->InvalidateFrame();
return;
}
- nsTextFrameBase::InvalidateFrame(aDisplayItemKey);
+ nsFrame::InvalidateFrame(aDisplayItemKey);
}
void
nsTextFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey)
{
if (IsSVGText()) {
nsIFrame* svgTextFrame =
nsLayoutUtils::GetClosestFrameOfType(GetParent(),
nsGkAtoms::svgTextFrame);
svgTextFrame->InvalidateFrame();
return;
}
- nsTextFrameBase::InvalidateFrameWithRect(aRect, aDisplayItemKey);
+ nsFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey);
}
gfxTextRun*
nsTextFrame::GetUninflatedTextRun()
{
return Properties().Get(UninflatedTextRunProperty());
}
--- a/layout/generic/nsTextFrame.h
+++ b/layout/generic/nsTextFrame.h
@@ -23,28 +23,26 @@
#undef DrawText
#endif
class nsTextPaintStyle;
class PropertyProvider;
struct SelectionDetails;
class nsTextFragment;
-typedef nsFrame nsTextFrameBase;
-
class nsDisplayTextGeometry;
class nsDisplayText;
class nsTextFrameTextRunCache {
public:
static void Init();
static void Shutdown();
};
-class nsTextFrame : public nsTextFrameBase {
+class nsTextFrame : public nsFrame {
typedef mozilla::LayoutDeviceRect LayoutDeviceRect;
typedef mozilla::TextRangeStyle TextRangeStyle;
typedef mozilla::gfx::DrawTarget DrawTarget;
typedef mozilla::gfx::Point Point;
typedef mozilla::gfx::Rect Rect;
typedef mozilla::gfx::Size Size;
typedef gfxTextRun::Range Range;
@@ -52,17 +50,17 @@ public:
NS_DECL_QUERYFRAME_TARGET(nsTextFrame)
NS_DECL_FRAMEARENA_HELPERS
friend class nsContinuingTextFrame;
friend class nsDisplayTextGeometry;
friend class nsDisplayText;
explicit nsTextFrame(nsStyleContext* aContext)
- : nsTextFrameBase(aContext)
+ : nsFrame(aContext)
{
NS_ASSERTION(mContentOffset == 0, "Bogus content offset");
}
// nsQueryFrame
NS_DECL_QUERYFRAME
// nsIFrame