From ff3e7f88a3f55affe6aff87eb094f08351e29af3 Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Thu, 30 Jan 2014 18:40:23 +1300 Subject: [PATCH] Bug 965030 - Pass the correct positioned frame to PushAbsoluteContainingBlock. r=roc --- layout/base/nsCSSFrameConstructor.cpp | 2 +- layout/reftests/svg/foreignObject-fixedpos-02.html | 9 +++++++++ layout/reftests/svg/foreignObject-fixedpos-ref.html | 4 ++++ layout/reftests/svg/reftest.list | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 layout/reftests/svg/foreignObject-fixedpos-02.html create mode 100644 layout/reftests/svg/foreignObject-fixedpos-ref.html diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index cccaa5279aa0..57f5730005f5 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -3659,7 +3659,7 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt (maybeAbsoluteContainingBlockDisplay->HasTransformStyle() && cb->IsFrameOfType(nsIFrame::eSupportsCSSTransforms))) && !cb->IsSVGText()) { - aState.PushAbsoluteContainingBlock(cb, primaryFrame, absoluteSaveState); + aState.PushAbsoluteContainingBlock(cb, cb, absoluteSaveState); } } diff --git a/layout/reftests/svg/foreignObject-fixedpos-02.html b/layout/reftests/svg/foreignObject-fixedpos-02.html new file mode 100644 index 000000000000..c4047625c00c --- /dev/null +++ b/layout/reftests/svg/foreignObject-fixedpos-02.html @@ -0,0 +1,9 @@ + +
+
+ + +
+
+
+
diff --git a/layout/reftests/svg/foreignObject-fixedpos-ref.html b/layout/reftests/svg/foreignObject-fixedpos-ref.html new file mode 100644 index 000000000000..da29d249b478 --- /dev/null +++ b/layout/reftests/svg/foreignObject-fixedpos-ref.html @@ -0,0 +1,4 @@ + +
+
+
diff --git a/layout/reftests/svg/reftest.list b/layout/reftests/svg/reftest.list index 8e0eff4d88d9..023175d6b41c 100644 --- a/layout/reftests/svg/reftest.list +++ b/layout/reftests/svg/reftest.list @@ -172,6 +172,7 @@ skip-if(B2G) == foreignObject-start-hidden-02.svg pass.svg skip-if(B2G) == foreignObject-style-change-01.svg pass.svg == foreignObject-dynamic-abspos-01.html foreignObject-dynamic-abspos-01-ref.html fuzzy-if(Android,18,600) == foreignObject-fixedpos-01.html foreignObject-dynamic-abspos-01-ref.html +== foreignObject-fixedpos-02.html foreignObject-fixedpos-ref.html == foreignObject-dynamic-fixedpos-01.html foreignObject-dynamic-abspos-01-ref.html == g-transform-01.svg pass.svg == getElementById-a-element-01.svg pass.svg