From 8c2791773784a153b8444007ce521ec0f2163acf Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Tue, 24 Feb 2015 18:35:30 +0000 Subject: [PATCH] Bug 1134531 - Remove nsTextFrame::DidSetStyleContext which only contained a (now obsolete) wallpaper. r=heycam --- layout/generic/crashtests/1134531.html | 4 ++++ layout/generic/crashtests/crashtests.list | 1 + layout/generic/nsTextFrame.cpp | 15 --------------- layout/generic/nsTextFrame.h | 2 -- 4 files changed, 5 insertions(+), 17 deletions(-) create mode 100644 layout/generic/crashtests/1134531.html diff --git a/layout/generic/crashtests/1134531.html b/layout/generic/crashtests/1134531.html new file mode 100644 index 000000000000..35ddbb06067e --- /dev/null +++ b/layout/generic/crashtests/1134531.html @@ -0,0 +1,4 @@ + + +
b
+ diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list index c32556742f8e..85cba3fa0ce9 100644 --- a/layout/generic/crashtests/crashtests.list +++ b/layout/generic/crashtests/crashtests.list @@ -570,4 +570,5 @@ load 1039454-1.html load 1042489.html load 1054010-1.html load 1058954-1.html +load 1134531.html load 1134667.html diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index 734016c8c8d2..b6c26fc4b2af 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -4539,21 +4539,6 @@ nsTextFrame::CharacterDataChanged(CharacterDataChangeInfo* aInfo) return NS_OK; } -/* virtual */ void -nsTextFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext) -{ - // A belt-and-braces check just in case we never get the - // MarkIntrinsicISizesDirty call from the style system. - if (StyleText()->mTextTransform == NS_STYLE_TEXT_TRANSFORM_CAPITALIZE && - mTextRun && - !(mTextRun->GetFlags() & nsTextFrameUtils::TEXT_IS_TRANSFORMED)) { - NS_ERROR("the current textrun doesn't match the style"); - // The current textrun is now of the wrong type. - ClearTextRuns(); - } - nsFrame::DidSetStyleContext(aOldStyleContext); -} - class nsDisplayTextGeometry : public nsCharClipGeometry { public: diff --git a/layout/generic/nsTextFrame.h b/layout/generic/nsTextFrame.h index fb7d3f2a613e..b822f27d1d4a 100644 --- a/layout/generic/nsTextFrame.h +++ b/layout/generic/nsTextFrame.h @@ -74,8 +74,6 @@ public: virtual nsresult CharacterDataChanged(CharacterDataChangeInfo* aInfo) MOZ_OVERRIDE; - virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) MOZ_OVERRIDE; - virtual nsIFrame* GetNextContinuation() const MOZ_OVERRIDE { return mNextContinuation; }