Bug 467914. GetOverflowRectRelativeToSelf shouldn't always expect a preEffectsBBox. r=dbaron
authorRobert O'Callahan <robert@ocallahan.org>
Thu, 30 Jul 2009 14:48:13 +1200
changeset 30876 25dff0b211a9357d5db866c5aa6cfd37bc52f9a5
parent 30875 d9eb98022817385b562487a43808097950e37918
child 30877 c353fe809be05e922e2d6146eb8e07cf4cfd79dd
push id8286
push userrocallahan@mozilla.com
push dateThu, 30 Jul 2009 04:00:25 +0000
treeherdermozilla-central@a328a2594cd5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs467914
milestone1.9.2a1pre
Bug 467914. GetOverflowRectRelativeToSelf shouldn't always expect a preEffectsBBox. r=dbaron
layout/generic/crashtests/467914-1.html
layout/generic/crashtests/crashtests.list
layout/generic/nsFrame.cpp
new file mode 100644
--- /dev/null
+++ b/layout/generic/crashtests/467914-1.html
@@ -0,0 +1,3 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:mathml="http://www.w3.org/1998/Math/MathML">
+<mathml:munder style="-moz-transform: translate(50px);clip-path: url(#h);"/>
+</window>
--- a/layout/generic/crashtests/crashtests.list
+++ b/layout/generic/crashtests/crashtests.list
@@ -217,16 +217,17 @@ load 455171-1.html
 load 455171-2.html
 load 455171-3.html
 load 455643-1.xhtml
 load 457375.html
 load 457380-1.html
 load 463741-1.html
 load 465651-1.html
 load 467487-1.html
+load 467914-1.html
 load 468207-1.html
 load 469859-1.xhtml
 load 472587-1.xhtml
 load 472774-1.html
 load 472776-1.html
 load 472950-1.html
 load 477928.html
 load 478170-1.html
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -4018,18 +4018,21 @@ nsIFrame::GetOverflowRectRelativeToParen
 }
   
 nsRect
 nsIFrame::GetOverflowRectRelativeToSelf() const
 {
   if (!(mState & NS_FRAME_MAY_BE_TRANSFORMED_OR_HAVE_RENDERING_OBSERVERS) ||
       !GetStyleDisplay()->HasTransform())
     return GetOverflowRect();
-  return *static_cast<nsRect*>
+  nsRect* preEffectsBBox = static_cast<nsRect*>
     (GetProperty(nsGkAtoms::preEffectsBBoxProperty));
+  if (!preEffectsBBox)
+    return GetOverflowRect();
+  return *preEffectsBBox;
 }
 
 void
 nsFrame::CheckInvalidateSizeChange(nsHTMLReflowMetrics& aNewDesiredSize)
 {
   nsIFrame::CheckInvalidateSizeChange(mRect, GetOverflowRect(),
       nsSize(aNewDesiredSize.width, aNewDesiredSize.height));
 }