зеркало из https://github.com/mozilla/gecko-dev.git
Don't compare lines from different blockframes' lists to each other. Also fix handling of text-decorations in in-flows of blocks with text-indent. Bug 393330, r+sr=roc, a=schrep
This commit is contained in:
Родитель
e7ad677649
Коммит
8bcb636fa4
|
@ -664,7 +664,8 @@ nsBlockFrame::GetMinWidth(nsIRenderingContext *aRenderingContext)
|
|||
line->mFirstChild, nsLayoutUtils::MIN_WIDTH);
|
||||
data.ForceBreak(aRenderingContext);
|
||||
} else {
|
||||
if (line == begin_lines()) {
|
||||
if (!curFrame->GetPrevContinuation() &&
|
||||
line == curFrame->begin_lines()) {
|
||||
const nsStyleCoord &indent = GetStyleText()->mTextIndent;
|
||||
if (indent.GetUnit() == eStyleUnit_Coord)
|
||||
data.currentLine += indent.GetCoordValue();
|
||||
|
@ -737,7 +738,8 @@ nsBlockFrame::GetPrefWidth(nsIRenderingContext *aRenderingContext)
|
|||
line->mFirstChild, nsLayoutUtils::PREF_WIDTH);
|
||||
data.ForceBreak(aRenderingContext);
|
||||
} else {
|
||||
if (line == begin_lines()) {
|
||||
if (!curFrame->GetPrevContinuation() &&
|
||||
line == curFrame->begin_lines()) {
|
||||
const nsStyleCoord &indent = GetStyleText()->mTextIndent;
|
||||
if (indent.GetUnit() == eStyleUnit_Coord)
|
||||
data.currentLine += indent.GetCoordValue();
|
||||
|
@ -5852,7 +5854,7 @@ nsBlockFrame::PaintTextDecorationLine(nsIRenderingContext& aRenderingContext,
|
|||
nscoord start = aLine->mBounds.x;
|
||||
nscoord width = aLine->mBounds.width;
|
||||
|
||||
if (aLine == begin_lines().get()) {
|
||||
if (!GetPrevContinuation() && aLine == begin_lines().get()) {
|
||||
// Adjust for the text-indent. See similar code in
|
||||
// nsLineLayout::BeginLineReflow.
|
||||
nscoord indent = 0;
|
||||
|
|
|
@ -965,7 +965,7 @@ BuildTextRuns(gfxContext* aContext, nsTextFrame* aForFrame,
|
|||
scanner.ScanFrame(child);
|
||||
child = child->GetNextSibling();
|
||||
}
|
||||
if (line == startLine) {
|
||||
if (forwardIterator.GetContainer() == aLineContainer && line == startLine) {
|
||||
seenStartLine = PR_TRUE;
|
||||
}
|
||||
if (seenStartLine) {
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#div > div { text-indent: 0 }
|
||||
div > div > div { display: inline-block; width: 30px; }
|
||||
body > div > div { text-decoration: underline; }
|
||||
</style>
|
||||
<body>
|
||||
<div style="height: 20px; line-height: 20px; -moz-column-width: 100px;
|
||||
-moz-column-gap: 0px">
|
||||
<div id="div" style="text-indent: 30px;">
|
||||
<div>a</div>
|
||||
<div>a</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>a</div>
|
||||
<div>a</div>
|
||||
<div>a</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>a</div>
|
||||
<div>a</div>
|
||||
<div>a</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="width: 100px">b</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
function boom()
|
||||
{
|
||||
document.getElementById("div").style.width = "-moz-shrink-wrap";
|
||||
}
|
||||
</script>
|
||||
<style type="text/css">
|
||||
#div > div { text-indent: 0; display: inline-block; width: 30px }
|
||||
</style>
|
||||
</head>
|
||||
<body onload="boom();">
|
||||
|
||||
<div style="height: 20px; line-height: 20px; -moz-column-width: 100px;
|
||||
-moz-column-gap: 0px">
|
||||
<div id="div" style="text-indent: 30px; text-decoration: underline;">
|
||||
<div>a</div>
|
||||
<div>a</div>
|
||||
<div>a</div>
|
||||
<div>a</div>
|
||||
<div>a</div>
|
||||
<div>a</div>
|
||||
<div>a</div>
|
||||
<div>a</div>
|
||||
<div style="width: 100px">b</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -410,6 +410,7 @@ fails == 386310-1d.html 386310-1-ref.html
|
|||
== 391909-1.html 391909-1-ref.html
|
||||
== 391994-1.html 391994-1-ref.html
|
||||
== 392435-1.html 392435-1-ref.html
|
||||
== 393330-1.html 393330-1-ref.html
|
||||
== 393517-1.xhtml about:blank # crash test
|
||||
== 393649-1.html 393649-1-ref.html
|
||||
fails == 393655-1.html 393655-1-ref.html # Remove 'fails' when 393655 lands
|
||||
|
|
Загрузка…
Ссылка в новой задаче