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

This commit is contained in:
Robert O'Callahan 2012-12-31 11:45:51 +13:00
parent f65996c27a
commit 7df631d1f7
4 changed files with 10 additions and 4 deletions

View File

@ -5796,8 +5796,7 @@ nsCSSFrameConstructor::AppendFramesToParent(nsFrameConstructorState& aStat
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,
@ -11108,8 +11107,7 @@ nsCSSFrameConstructor::ConstructInline(nsFrameConstructorState& aState,
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);

View File

@ -0,0 +1,2 @@
<!DOCTYPE HTML>
<div style="position:absolute; left:0; top:0; width:10px; height:10px; background:black;">

View File

@ -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>

View File

@ -1736,4 +1736,5 @@ fuzzy(40,800) == 797797-2.html 797797-2-ref.html # 'opacity:N' and rgba(,,,N) te
== 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