From 2599026f4976fef10dae2f7a7a0f21800f3b7130 Mon Sep 17 00:00:00 2001 From: "karnaze%netscape.com" Date: Thu, 2 Mar 2000 06:09:37 +0000 Subject: [PATCH] PDT+ bug 28341 - Destroy caption frame when outer table frame is destroyed. Add caption to outer frame rather than inner frame. r=troy, a=rickg git-svn-id: svn://10.0.0.236/trunk@62032 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsCSSFrameConstructor.cpp | 20 +++++++++----- .../html/style/src/nsCSSFrameConstructor.cpp | 20 +++++++++----- .../html/table/src/nsTableOuterFrame.cpp | 26 ++++++++++++++++-- .../layout/html/table/src/nsTableOuterFrame.h | 16 ++++++++--- .../html/tests/table/bugs/bug28341.html | 8 ++++++ .../html/tests/table/bugs/file_list.txt | 1 + .../html/tests/table/images/animated.gif | Bin 0 -> 21710 bytes mozilla/layout/tables/nsTableOuterFrame.cpp | 26 ++++++++++++++++-- mozilla/layout/tables/nsTableOuterFrame.h | 16 ++++++++--- 9 files changed, 107 insertions(+), 26 deletions(-) create mode 100644 mozilla/layout/html/tests/table/bugs/bug28341.html create mode 100644 mozilla/layout/html/tests/table/images/animated.gif diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 8bcf05c8748..b858665c629 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -1402,12 +1402,6 @@ nsCSSFrameConstructor::ConstructTableCaptionFrame(nsIPresShell* aPres nsLayoutAtoms::floaterList, aState.mFloatedItems.childList); } - - if (outerFrame) { - outerFrame->SetInitialChildList(aPresContext, nsLayoutAtoms::captionList, - aNewCaptionFrame); - } - return rv; } @@ -5096,7 +5090,19 @@ nsCSSFrameConstructor::ConstructFrameByDisplayType(nsIPresShell* aPresShell, // the next 5 cases are only relevant if the parent is not a table, ConstructTableFrame handles children case NS_STYLE_DISPLAY_TABLE_CAPTION: { - rv = ConstructTableCaptionFrame(aPresShell, aPresContext, aState, aContent, aParentFrame, + // aParentFrame may be an inner table frame rather than an outer frame + // In this case we need to get the outer frame. + nsIFrame* parentFrame = aParentFrame; + nsIFrame* outerFrame = nsnull; + aParentFrame->GetParent(&outerFrame); + nsCOMPtr frameType; + if (outerFrame) { + outerFrame->GetFrameType(getter_AddRefs(frameType)); + if (nsLayoutAtoms::tableOuterFrame == frameType.get()) { + parentFrame = outerFrame; + } + } + rv = ConstructTableCaptionFrame(aPresShell, aPresContext, aState, aContent, parentFrame, aStyleContext, newFrame, ignore, tableCreator); aFrameItems.AddChild(newFrame); return rv; diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index 8bcf05c8748..b858665c629 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -1402,12 +1402,6 @@ nsCSSFrameConstructor::ConstructTableCaptionFrame(nsIPresShell* aPres nsLayoutAtoms::floaterList, aState.mFloatedItems.childList); } - - if (outerFrame) { - outerFrame->SetInitialChildList(aPresContext, nsLayoutAtoms::captionList, - aNewCaptionFrame); - } - return rv; } @@ -5096,7 +5090,19 @@ nsCSSFrameConstructor::ConstructFrameByDisplayType(nsIPresShell* aPresShell, // the next 5 cases are only relevant if the parent is not a table, ConstructTableFrame handles children case NS_STYLE_DISPLAY_TABLE_CAPTION: { - rv = ConstructTableCaptionFrame(aPresShell, aPresContext, aState, aContent, aParentFrame, + // aParentFrame may be an inner table frame rather than an outer frame + // In this case we need to get the outer frame. + nsIFrame* parentFrame = aParentFrame; + nsIFrame* outerFrame = nsnull; + aParentFrame->GetParent(&outerFrame); + nsCOMPtr frameType; + if (outerFrame) { + outerFrame->GetFrameType(getter_AddRefs(frameType)); + if (nsLayoutAtoms::tableOuterFrame == frameType.get()) { + parentFrame = outerFrame; + } + } + rv = ConstructTableCaptionFrame(aPresShell, aPresContext, aState, aContent, parentFrame, aStyleContext, newFrame, ignore, tableCreator); aFrameItems.AddChild(newFrame); return rv; diff --git a/mozilla/layout/html/table/src/nsTableOuterFrame.cpp b/mozilla/layout/html/table/src/nsTableOuterFrame.cpp index ccf876607b0..0ec4d1b9595 100644 --- a/mozilla/layout/html/table/src/nsTableOuterFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableOuterFrame.cpp @@ -37,6 +37,8 @@ #include "nsHTMLParts.h" #include "nsIPresShell.h" +/* ----------- nsTableCaptionFrame ---------- */ + #define NS_TABLE_FRAME_CAPTION_LIST_INDEX 0 // caption frame @@ -46,6 +48,20 @@ nsTableCaptionFrame::nsTableCaptionFrame() SetFlags(NS_BLOCK_SPACE_MGR|NS_BLOCK_WRAP_SIZE); } +nsTableCaptionFrame::~nsTableCaptionFrame() +{ +} + +NS_IMETHODIMP +nsTableOuterFrame::Destroy(nsIPresContext* aPresContext) +{ + if (mCaptionFrame) { + mCaptionFrame->Destroy(aPresContext); + } + + return nsHTMLContainerFrame::Destroy(aPresContext); +} + NS_IMETHODIMP nsTableCaptionFrame::GetFrameType(nsIAtom** aType) const { @@ -117,13 +133,19 @@ struct OuterTableReflowState { } }; - - /* ----------- nsTableOuterFrame ---------- */ NS_IMPL_ADDREF_INHERITED(nsTableOuterFrame, nsHTMLContainerFrame) NS_IMPL_RELEASE_INHERITED(nsTableOuterFrame, nsHTMLContainerFrame) +nsTableOuterFrame::nsTableOuterFrame() +{ +} + +nsTableOuterFrame::~nsTableOuterFrame() +{ +} + nsresult nsTableOuterFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr) { if (NULL == aInstancePtr) { diff --git a/mozilla/layout/html/table/src/nsTableOuterFrame.h b/mozilla/layout/html/table/src/nsTableOuterFrame.h index 33a36ebd0b3..48a92930af7 100644 --- a/mozilla/layout/html/table/src/nsTableOuterFrame.h +++ b/mozilla/layout/html/table/src/nsTableOuterFrame.h @@ -32,10 +32,14 @@ struct nsStyleTable; class nsTableCaptionFrame : public nsBlockFrame { - public: +public: // nsISupports - nsTableCaptionFrame(); NS_IMETHOD GetFrameType(nsIAtom** aType) const; + friend nsresult NS_NewTableCaptionFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame); + +protected: + nsTableCaptionFrame(); + virtual ~nsTableCaptionFrame(); }; @@ -60,8 +64,7 @@ public: * * @return NS_OK if the frame was properly allocated, otherwise an error code */ - friend nsresult - NS_NewTableOuterFrame(nsIPresShell* aPresShell, nsIFrame** aResult); + friend nsresult NS_NewTableOuterFrame(nsIPresShell* aPresShell, nsIFrame** aResult); NS_IMETHOD Init(nsIPresContext* aPresContext, nsIContent* aContent, @@ -69,6 +72,8 @@ public: nsIStyleContext* aContext, nsIFrame* aPrevInFlow); + NS_IMETHOD Destroy(nsIPresContext* aPresContext); + NS_IMETHOD AdjustZeroWidth(); /** @see nsIFrame::SetInitialChildList */ @@ -151,6 +156,9 @@ public: protected: + nsTableOuterFrame(); + virtual ~nsTableOuterFrame(); + /** Always returns 0, since the outer table frame has no border of its own * The inner table frame can answer this question in a meaningful way. * @see nsHTMLContainerFrame::GetSkipSides */ diff --git a/mozilla/layout/html/tests/table/bugs/bug28341.html b/mozilla/layout/html/tests/table/bugs/bug28341.html new file mode 100644 index 00000000000..c9709f51edc --- /dev/null +++ b/mozilla/layout/html/tests/table/bugs/bug28341.html @@ -0,0 +1,8 @@ +The bug causes a crash when the page is destroyed +
+ + + +
+ +
foo
diff --git a/mozilla/layout/html/tests/table/bugs/file_list.txt b/mozilla/layout/html/tests/table/bugs/file_list.txt index 5aba3e94b83..bac0f72d478 100644 --- a/mozilla/layout/html/tests/table/bugs/file_list.txt +++ b/mozilla/layout/html/tests/table/bugs/file_list.txt @@ -127,6 +127,7 @@ file:///s|/mozilla/layout/html/tests/table/bugs/bug2684.html file:///s|/mozilla/layout/html/tests/table/bugs/bug2757.html file:///s|/mozilla/layout/html/tests/table/bugs/bug2763.html file:///s|/mozilla/layout/html/tests/table/bugs/bug2773.html +file:///s|/mozilla/layout/html/tests/table/bugs/bug28341.html file:///s|/mozilla/layout/html/tests/table/bugs/bug2886.html file:///s|/mozilla/layout/html/tests/table/bugs/bug2886-2.html file:///s|/mozilla/layout/html/tests/table/bugs/bug28928.html diff --git a/mozilla/layout/html/tests/table/images/animated.gif b/mozilla/layout/html/tests/table/images/animated.gif new file mode 100644 index 0000000000000000000000000000000000000000..c77fbb6609c5326394e543d56ae90fa8f400a7d0 GIT binary patch literal 21710 zcmeIa=Tnq>yye@0rkmX4oHGal0ur^GoNc0Hnw$~ILEYU=&N(AAIU_kLk|cvjP9iyq z5)3H18TUTt&YgKNQ#H5h+&9DXCp=ZZs?S>AwU)Z3nvAS%8-NuM1^DOF2LS#uWp{Vg z_43g3_b~|eH@pS_(gW1Po|%@0NmWEjS4G{eiIu5~ldXzZY)FuAN>OY{z1Nn0zc3sT zi8D)xvPy`tN>8-OOfkZTX;mfac4Q*Dvym@zm0mwrY0fk5D14ZmW>=W)P*UhzQ{h@y z;nv>xsIO41uh4R!NWB-YHB_Q8T%k8osySAvHCe6mu1;^Z;Xz-yNq?2~LbLvItKn+9 z(T8r6t)7PyjkXJ~o%&z;?e*Ai_nPkYnH>yR91U8Yj9O0&2Cnu7ElxjMo_V%AW&df? zd2jO3`K0aFcXpSv_CMwvelI$IS@*yG7__yD{kR?d{UrYS8}|AVcl|r;`djk#b=LKD z!S!|d_4V-e&G&!JAK<(u(Ni@tR7RpyB}B!*zymOV^9KRI;m^Cc_0Qw@=b1oZzX0tp z7L5jcUl@#9$a18iXdnvCt(C9QSo|iA;f|XF0|K9xq^l(1+F!au#mAp{E(ZZWg+SzwB+Ri)v?G_c`q?`V>yY^64mpgA?}w1_wa{5FOrOgrx90rZ4el zAV?Ce2Kn@35)FP%)nb*Z@R;$pca+CV&8YeHIPO2YM6pUn9T#gPtfS;s1?MUZ+>Ku4 zW(X~Qu(s)dvt@diwFocNdmewQyXcy}I7*oQ{=%jYM{-~0Nl;_p@KqA`gZf{TzD}up zinq;PrSG+!DbQ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}3fc!}bzxs9``pc^!NZey1*>G)4&!8ini^yN}_+4F$cXR2NBR!SKo)=~Q zilxRUz&+x{xrWT%50K@Lk}dboak`>Fc^X{wkj1V-jM+>+Dq^quO)c(@uiek3k%F4C z15m?jfMlU7igtr@(qG8i(bN4kuf)>1GfK|4!84Ghffty8fmnQw5dUbDA`sal_;}Ru zC%@hE><5IdpS$=$w`38_VpPBW++$83jR%iV4&msnpzcXLp`-O* zM0ffr^-670m$G&Q_9q$Z;i)2JRM~$2A^MFbQ^l}{{Jc{0E+!w-&Bre!#a?N#+E6n; zU7@kLH}Oy}MMZ#T*RjFf>mrX^&TTg!Z3<13(qi@dNFqnbvAE3N$Rojh(a%xX((KEN z@3YD+JCcv&PpWcf^YR^UU&)5Yw7=Zf{T#A-wSGC(-t&F(^Rug~4*-geUZ~zFj``OH z>_Z>|a3lL~WdDuqzmfenvj0Z*-^l(O+5cZH`)|SkH(`LAFu+Y1;3f=k69%{m1N`3` z2AI8R7~C`rZW;zR4TGD8!A-;9reSc?F!-PMlx~I)ZiWzUh7fLs5N?JLZiWzUh7fLs L5dIfK2=f08n{t-o literal 0 HcmV?d00001 diff --git a/mozilla/layout/tables/nsTableOuterFrame.cpp b/mozilla/layout/tables/nsTableOuterFrame.cpp index ccf876607b0..0ec4d1b9595 100644 --- a/mozilla/layout/tables/nsTableOuterFrame.cpp +++ b/mozilla/layout/tables/nsTableOuterFrame.cpp @@ -37,6 +37,8 @@ #include "nsHTMLParts.h" #include "nsIPresShell.h" +/* ----------- nsTableCaptionFrame ---------- */ + #define NS_TABLE_FRAME_CAPTION_LIST_INDEX 0 // caption frame @@ -46,6 +48,20 @@ nsTableCaptionFrame::nsTableCaptionFrame() SetFlags(NS_BLOCK_SPACE_MGR|NS_BLOCK_WRAP_SIZE); } +nsTableCaptionFrame::~nsTableCaptionFrame() +{ +} + +NS_IMETHODIMP +nsTableOuterFrame::Destroy(nsIPresContext* aPresContext) +{ + if (mCaptionFrame) { + mCaptionFrame->Destroy(aPresContext); + } + + return nsHTMLContainerFrame::Destroy(aPresContext); +} + NS_IMETHODIMP nsTableCaptionFrame::GetFrameType(nsIAtom** aType) const { @@ -117,13 +133,19 @@ struct OuterTableReflowState { } }; - - /* ----------- nsTableOuterFrame ---------- */ NS_IMPL_ADDREF_INHERITED(nsTableOuterFrame, nsHTMLContainerFrame) NS_IMPL_RELEASE_INHERITED(nsTableOuterFrame, nsHTMLContainerFrame) +nsTableOuterFrame::nsTableOuterFrame() +{ +} + +nsTableOuterFrame::~nsTableOuterFrame() +{ +} + nsresult nsTableOuterFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr) { if (NULL == aInstancePtr) { diff --git a/mozilla/layout/tables/nsTableOuterFrame.h b/mozilla/layout/tables/nsTableOuterFrame.h index 33a36ebd0b3..48a92930af7 100644 --- a/mozilla/layout/tables/nsTableOuterFrame.h +++ b/mozilla/layout/tables/nsTableOuterFrame.h @@ -32,10 +32,14 @@ struct nsStyleTable; class nsTableCaptionFrame : public nsBlockFrame { - public: +public: // nsISupports - nsTableCaptionFrame(); NS_IMETHOD GetFrameType(nsIAtom** aType) const; + friend nsresult NS_NewTableCaptionFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame); + +protected: + nsTableCaptionFrame(); + virtual ~nsTableCaptionFrame(); }; @@ -60,8 +64,7 @@ public: * * @return NS_OK if the frame was properly allocated, otherwise an error code */ - friend nsresult - NS_NewTableOuterFrame(nsIPresShell* aPresShell, nsIFrame** aResult); + friend nsresult NS_NewTableOuterFrame(nsIPresShell* aPresShell, nsIFrame** aResult); NS_IMETHOD Init(nsIPresContext* aPresContext, nsIContent* aContent, @@ -69,6 +72,8 @@ public: nsIStyleContext* aContext, nsIFrame* aPrevInFlow); + NS_IMETHOD Destroy(nsIPresContext* aPresContext); + NS_IMETHOD AdjustZeroWidth(); /** @see nsIFrame::SetInitialChildList */ @@ -151,6 +156,9 @@ public: protected: + nsTableOuterFrame(); + virtual ~nsTableOuterFrame(); + /** Always returns 0, since the outer table frame has no border of its own * The inner table frame can answer this question in a meaningful way. * @see nsHTMLContainerFrame::GetSkipSides */