Bug 816359. Part 1: When constructing inline frames, we should never treat transforms as making the inline an abs-pos containing block, since transforms don't apply to inlines. r=bz
authorRobert O'Callahan <robert@ocallahan.org>
Mon, 31 Dec 2012 11:45:51 +1300
changeset 126350 96d7b0bfb19e8a1befdea99b4360193dca274cc5
parent 126348 0d771761b9b360a73e4add37d38d5ef6e42f71e9
child 126351 e7eb5d6958184d514cae08e4e3443999ee39c7b0
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs816359
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 816359. Part 1: When constructing inline frames, we should never treat transforms as making the inline an abs-pos containing block, since transforms don't apply to inlines. r=bz
layout/base/nsCSSFrameConstructor.cpp
layout/reftests/bugs/816359-1-ref.html
layout/reftests/bugs/816359-1.html
layout/reftests/bugs/reftest.list
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -5791,18 +5791,17 @@ nsCSSFrameConstructor::AppendFramesToPar
     nsFrameList inlineKids = aFrameList.ExtractHead(firstBlockEnumerator);
     if (!inlineKids.IsEmpty()) {
       AppendFrames(aParentFrame, kPrincipalList, inlineKids);
     }
 
     if (!aFrameList.IsEmpty()) {
       const nsStyleDisplay* parentDisplay = aParentFrame->GetStyleDisplay();
       bool positioned =
-        (parentDisplay->mPosition == NS_STYLE_POSITION_RELATIVE ||
-         parentDisplay->HasTransform()) &&
+        parentDisplay->mPosition == NS_STYLE_POSITION_RELATIVE &&
         !aParentFrame->IsSVGText();
       nsFrameItems ibSiblings;
       CreateIBSiblings(aState, aParentFrame, positioned, aFrameList,
                        ibSiblings);
 
       // Make sure to trigger reflow of the inline that used to be our
       // last one and now isn't anymore, since its GetSkipSides() has
       // changed.
@@ -11103,18 +11102,17 @@ nsCSSFrameConstructor::ConstructInline(n
   // Inline (outer span)
   //   Text("f")
 
   nsIContent* const content = aItem.mContent;
   nsStyleContext* const styleContext = aItem.mStyleContext;
 
   bool positioned =
     NS_STYLE_DISPLAY_INLINE == aDisplay->mDisplay &&
-    (NS_STYLE_POSITION_RELATIVE == aDisplay->mPosition ||
-     aDisplay->HasTransform()) &&
+    NS_STYLE_POSITION_RELATIVE == aDisplay->mPosition &&
     !aParentFrame->IsSVGText();
 
   nsIFrame* newFrame = NS_NewInlineFrame(mPresShell, styleContext);
 
   // Initialize the frame
   InitAndRestoreFrame(aState, content, aParentFrame, nullptr, newFrame);
 
   // Inline frames can always have generated content
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/816359-1-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML>
+<div style="position:absolute; left:0; top:0; width:10px; height:10px; background:black;">
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/816359-1.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<body style="margin:100px;">
+<span style="transform:translate(10px,0)">
+  <div style="position:absolute; left:0; top:0; width:10px; height:10px; background:black;">
+</span>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1731,9 +1731,10 @@ fuzzy(40,800) == 797797-2.html 797797-2-
 == 801994-1.html 801994-1-ref.html
 == 804323-1.html 804323-1-ref.html
 == 811301-1.html 811301-1-ref.html
 == 812824-1.html 812824-1-ref.html
 == 814677.html 814677-ref.html
 == 815593-1.html 815593-1-ref.html
 == 814952-1.html 814952-1-ref.html
 == 816458-1.html 816458-1-ref.html
+== 816359-1.html 816359-1-ref.html
 == 818276-1.html 818276-1-ref.html