mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Percentage margins thrown on the floor during bidi reordering. Bug 413542, r+sr=dbaron, blocking1.9=schrep
This commit is contained in:
parent
2815fb857a
commit
2550756945
@ -825,8 +825,10 @@ nsBidiPresUtils::RepositionFrame(nsIFrame* aFrame,
|
||||
else
|
||||
aFrame->RemoveStateBits(NS_INLINE_FRAME_BIDI_VISUAL_IS_RIGHT_MOST);
|
||||
}
|
||||
nsMargin margin;
|
||||
aFrame->GetMargin(margin);
|
||||
// This method is called from nsBlockFrame::PlaceLine via the call to
|
||||
// bidiUtils->ReorderFrames, so this is guaranteed to be after the inlines
|
||||
// have been reflowed, which is required for GetUsedMargin/Border/Padding
|
||||
nsMargin margin = aFrame->GetUsedMargin();
|
||||
if (isLeftMost)
|
||||
aLeft += margin.left;
|
||||
|
||||
@ -835,8 +837,7 @@ nsBidiPresUtils::RepositionFrame(nsIFrame* aFrame,
|
||||
if (!IsBidiLeaf(aFrame))
|
||||
{
|
||||
nscoord x = 0;
|
||||
nsMargin borderPadding;
|
||||
aFrame->GetBorderAndPadding(borderPadding);
|
||||
nsMargin borderPadding = aFrame->GetUsedBorderAndPadding();
|
||||
if (isLeftMost) {
|
||||
x += borderPadding.left;
|
||||
}
|
||||
@ -905,12 +906,14 @@ nsBidiPresUtils::InitContinuationStates(nsIFrame* aFrame,
|
||||
void
|
||||
nsBidiPresUtils::RepositionInlineFrames(nsIFrame* aFirstChild) const
|
||||
{
|
||||
nsMargin margin;
|
||||
const nsStyleVisibility* vis = aFirstChild->GetStyleVisibility();
|
||||
PRBool isLTR = (NS_STYLE_DIRECTION_LTR == vis->mDirection);
|
||||
nscoord leftSpace = 0;
|
||||
|
||||
aFirstChild->GetMargin(margin);
|
||||
// This method is called from nsBlockFrame::PlaceLine via the call to
|
||||
// bidiUtils->ReorderFrames, so this is guaranteed to be after the inlines
|
||||
// have been reflowed, which is required for GetUsedMargin/Border/Padding
|
||||
nsMargin margin = aFirstChild->GetUsedMargin();
|
||||
if (!aFirstChild->GetPrevContinuation())
|
||||
leftSpace = isLTR ? margin.left : margin.right;
|
||||
|
||||
|
20
layout/reftests/bidi/413542-1-ref.html
Normal file
20
layout/reftests/bidi/413542-1-ref.html
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Percentage padding on inlines ignored in presence of certain characters in source</title>
|
||||
<style type="text/css">
|
||||
#test {
|
||||
border: 1px solid #000;
|
||||
width: 500px;
|
||||
}
|
||||
#test span {
|
||||
border: 1px solid #f00;
|
||||
padding: 0 10%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="test"><span>one</span><span>two</span></div>
|
||||
</body>
|
||||
</html>
|
21
layout/reftests/bidi/413542-1.html
Normal file
21
layout/reftests/bidi/413542-1.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Percentage padding on inlines ignored in presence of certain characters in source</title>
|
||||
<style type="text/css">
|
||||
#test {
|
||||
border: 1px solid #000;
|
||||
width: 500px;
|
||||
}
|
||||
#test span {
|
||||
border: 1px solid #f00;
|
||||
padding: 0 10%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- To enable bidi: א -->
|
||||
<div id="test"><span>one</span><span>two</span></div>
|
||||
</body>
|
||||
</html>
|
20
layout/reftests/bidi/413542-2-ref.html
Normal file
20
layout/reftests/bidi/413542-2-ref.html
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Percentage margin on inlines ignored in presence of certain characters in source</title>
|
||||
<style type="text/css">
|
||||
#test {
|
||||
border: 1px solid #000;
|
||||
width: 500px;
|
||||
}
|
||||
#test span {
|
||||
border: 1px solid #f00;
|
||||
margin: 0 10%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="test"><span>one</span><span>two</span></div>
|
||||
</body>
|
||||
</html>
|
21
layout/reftests/bidi/413542-2.html
Normal file
21
layout/reftests/bidi/413542-2.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Percentage margin on inlines ignored in presence of certain characters in source</title>
|
||||
<style type="text/css">
|
||||
#test {
|
||||
border: 1px solid #000;
|
||||
width: 500px;
|
||||
}
|
||||
#test span {
|
||||
border: 1px solid #f00;
|
||||
margin: 0 10%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- To enable bidi: א -->
|
||||
<div id="test"><span>one</span><span>two</span></div>
|
||||
</body>
|
||||
</html>
|
@ -19,3 +19,5 @@ random-if(MOZ_WIDGET_TOOLKIT=="gtk2") == mixedChartype-03.html mixedChartype-03-
|
||||
random-if(MOZ_WIDGET_TOOLKIT=="gtk2") == mixedChartype-03-j.html mixedChartype-03-ref.html
|
||||
== 386339.html 386339-ref.html
|
||||
fails-if(MOZ_WIDGET_TOOLKIT!="gtk2") == 387653.html 387653-ref.html # Linux-specific bug
|
||||
== 413542-1.html 413542-1-ref.html
|
||||
== 413542-2.html 413542-2-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user