From 02389a3abaaa0698f85913859db19b54b9809d57 Mon Sep 17 00:00:00 2001 From: Ting-Yu Lin Date: Thu, 10 Mar 2016 17:38:31 +0800 Subject: [PATCH] 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 --HG-- extra : rebase_source : 86e784648cab3982ff16b3d45a312b98cd963841 --- layout/generic/nsTextFrame.cpp | 6 +++--- layout/generic/nsTextFrame.h | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index 7025414d8968..ccdbd1631aa5 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -2686,7 +2686,7 @@ BuildTextRunsScanner::AssignTextRun(gfxTextRun* aTextRun, float aInflation) NS_QUERYFRAME_HEAD(nsTextFrame) NS_QUERYFRAME_ENTRY(nsTextFrame) -NS_QUERYFRAME_TAIL_INHERITING(nsTextFrameBase) +NS_QUERYFRAME_TAIL_INHERITING(nsFrame) gfxSkipCharsIterator nsTextFrame::EnsureTextRun(TextRunType aWhichTextRun, @@ -4447,7 +4447,7 @@ nsTextFrame::InvalidateFrame(uint32_t aDisplayItemKey) svgTextFrame->InvalidateFrame(); return; } - nsTextFrameBase::InvalidateFrame(aDisplayItemKey); + nsFrame::InvalidateFrame(aDisplayItemKey); } void @@ -4460,7 +4460,7 @@ nsTextFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemK svgTextFrame->InvalidateFrame(); return; } - nsTextFrameBase::InvalidateFrameWithRect(aRect, aDisplayItemKey); + nsFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey); } gfxTextRun* diff --git a/layout/generic/nsTextFrame.h b/layout/generic/nsTextFrame.h index 954c61c91eaf..5e1db0021c9d 100644 --- a/layout/generic/nsTextFrame.h +++ b/layout/generic/nsTextFrame.h @@ -28,8 +28,6 @@ class PropertyProvider; struct SelectionDetails; class nsTextFragment; -typedef nsFrame nsTextFrameBase; - class nsDisplayTextGeometry; class nsDisplayText; @@ -39,7 +37,7 @@ public: static void Shutdown(); }; -class nsTextFrame : public nsTextFrameBase { +class nsTextFrame : public nsFrame { typedef mozilla::LayoutDeviceRect LayoutDeviceRect; typedef mozilla::TextRangeStyle TextRangeStyle; typedef mozilla::gfx::DrawTarget DrawTarget; @@ -57,7 +55,7 @@ public: friend class nsDisplayText; explicit nsTextFrame(nsStyleContext* aContext) - : nsTextFrameBase(aContext) + : nsFrame(aContext) { NS_ASSERTION(mContentOffset == 0, "Bogus content offset"); }