mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Don't reserve space for start (end) margin on the first- (last-) in-flow if it has a previous (next) bidi continuation. bug=421419 r+sr=dbaron a1.9=dsicore
This commit is contained in:
parent
ff89c4a3fb
commit
130962d56a
@ -660,13 +660,19 @@ nsContainerFrame::DoInlineIntrinsicWidth(nsIRenderingContext *aRenderingContext,
|
||||
// messy the bidi situations are, since per CSS2.1 section 8.6
|
||||
// (implemented in bug 328168), the startSide border is always on the
|
||||
// first line.
|
||||
aData->currentLine +=
|
||||
GetCoord(stylePadding->mPadding.Get(startSide), 0) +
|
||||
styleBorder->GetBorderWidth(startSide) +
|
||||
GetCoord(styleMargin->mMargin.Get(startSide), 0);
|
||||
// This frame is a first-in-flow, but it might have a previous bidi
|
||||
// continuation, in which case that continuation should handle the startSide
|
||||
// border.
|
||||
if (!GetPrevContinuation()) {
|
||||
aData->currentLine +=
|
||||
GetCoord(stylePadding->mPadding.Get(startSide), 0) +
|
||||
styleBorder->GetBorderWidth(startSide) +
|
||||
GetCoord(styleMargin->mMargin.Get(startSide), 0);
|
||||
}
|
||||
|
||||
const nsLineList_iterator* savedLine = aData->line;
|
||||
|
||||
nsContainerFrame *lastInFlow;
|
||||
for (nsContainerFrame *nif = this; nif;
|
||||
nif = (nsContainerFrame*) nif->GetNextInFlow()) {
|
||||
for (nsIFrame *kid = nif->mFrames.FirstChild(); kid;
|
||||
@ -682,6 +688,7 @@ nsContainerFrame::DoInlineIntrinsicWidth(nsIRenderingContext *aRenderingContext,
|
||||
// After we advance to our next-in-flow, the stored line may not
|
||||
// longer be the correct line. Just forget it.
|
||||
aData->line = nsnull;
|
||||
lastInFlow = nif;
|
||||
}
|
||||
|
||||
aData->line = savedLine;
|
||||
@ -690,10 +697,15 @@ nsContainerFrame::DoInlineIntrinsicWidth(nsIRenderingContext *aRenderingContext,
|
||||
// messy the bidi situations are, since per CSS2.1 section 8.6
|
||||
// (implemented in bug 328168), the endSide border is always on the
|
||||
// last line.
|
||||
aData->currentLine +=
|
||||
GetCoord(stylePadding->mPadding.Get(endSide), 0) +
|
||||
styleBorder->GetBorderWidth(endSide) +
|
||||
GetCoord(styleMargin->mMargin.Get(endSide), 0);
|
||||
// We reached the last-in-flow, but it might have a next bidi
|
||||
// continuation, in which case that continuation should handle
|
||||
// the endSide border.
|
||||
if (!lastInFlow->GetNextContinuation()) {
|
||||
aData->currentLine +=
|
||||
GetCoord(stylePadding->mPadding.Get(endSide), 0) +
|
||||
styleBorder->GetBorderWidth(endSide) +
|
||||
GetCoord(styleMargin->mMargin.Get(endSide), 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* virtual */ nsSize
|
||||
|
14
layout/reftests/bugs/421419-1-ref.html
Normal file
14
layout/reftests/bugs/421419-1-ref.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
div {
|
||||
float: left;
|
||||
border: medium solid black;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div><span style="padding-right: 10em;"><br>‎</span></div>
|
||||
</body>
|
||||
</html>
|
14
layout/reftests/bugs/421419-1.html
Normal file
14
layout/reftests/bugs/421419-1.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
div {
|
||||
float: left;
|
||||
border: medium solid black;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div><span style="padding-right: 10em;"><br>‏</span></div>
|
||||
</body>
|
||||
</html>
|
@ -754,3 +754,4 @@ random == 403134-1.html 403134-1-ref.html # bug 405377
|
||||
== 420069-2.html 420069-2-ref.html
|
||||
# == 420351-1.html 420351-1-ref.html
|
||||
== 421234-1.html 421234-1-ref.html
|
||||
== 421419-1.html 421419-1-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user