mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug695538 - Make sure that trailing spaces don't get dropped by nsCSSFrameConstructor::CreateNeededTablePseudos in certain cases. r=bz
This commit is contained in:
parent
e86f414e30
commit
5d17969b84
@ -9288,9 +9288,15 @@ nsCSSFrameConstructor::CreateNeededTablePseudos(nsFrameConstructorState& aState,
|
||||
spaceEndIter.item().IsWhitespace(aState)) {
|
||||
bool trailingSpaces = spaceEndIter.SkipWhitespace(aState);
|
||||
|
||||
// See whether we can drop the whitespace
|
||||
if (trailingSpaces ||
|
||||
spaceEndIter.item().DesiredParentType() != eTypeBlock) {
|
||||
// We drop the whitespace if these are not trailing spaces and the next item
|
||||
// does not want a block parent (see case 2 above)
|
||||
// if these are trailing spaces and aParentFrame is a tabular container
|
||||
// according to rule 1.3 of CSS 2.1 Sec 17.2.1. (Being a tabular container
|
||||
// pretty much means ourParentType != eTypeBlock besides the eTypeColGroup case,
|
||||
// which won't reach here.)
|
||||
if ((trailingSpaces && ourParentType != eTypeBlock) ||
|
||||
(!trailingSpaces && spaceEndIter.item().DesiredParentType() !=
|
||||
eTypeBlock)) {
|
||||
bool updateStart = (iter == endIter);
|
||||
endIter.DeleteItemsTo(spaceEndIter);
|
||||
NS_ASSERTION(trailingSpaces == endIter.IsDone(), "These should match");
|
||||
|
21
layout/reftests/table-anonymous-boxes/695538-1-ref.html
Normal file
21
layout/reftests/table-anonymous-boxes/695538-1-ref.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
:root {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 1px;
|
||||
}
|
||||
.cell {
|
||||
display: table-cell;
|
||||
border: solid black;
|
||||
}
|
||||
.pre {
|
||||
white-space: pre;
|
||||
border: solid blue;
|
||||
}
|
||||
.table {
|
||||
display: table;
|
||||
}
|
||||
</style>
|
||||
<span class="pre"> <span cless="table"><span class="cell">A</span>
|
||||
<span class="cell">B</span></span> </span>
|
||||
|
17
layout/reftests/table-anonymous-boxes/695538-1.html
Normal file
17
layout/reftests/table-anonymous-boxes/695538-1.html
Normal file
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
:root {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 1px;
|
||||
}
|
||||
.cell {
|
||||
display: table-cell;
|
||||
border: solid black;
|
||||
}
|
||||
.pre {
|
||||
white-space: pre;
|
||||
border: solid blue;
|
||||
}
|
||||
</style>
|
||||
<span class="pre"> <span class="cell">A</span> <span class="cell">B</span> </span>
|
||||
|
@ -35,6 +35,7 @@ random-if(d2d) == 394402-1a.html 394402-1-ref.html # bug 586833
|
||||
== 443616-1b.html 443616-1-ref.html
|
||||
== 448111-1.html 448111-1-ref.html
|
||||
== 490174-1.html 490174-1-ref.html
|
||||
== 695538-1.html 695538-1-ref.html
|
||||
== infer-first-row.html 3x3-ref.html
|
||||
== infer-first-row-and-table.html 3x3-ref.html
|
||||
== infer-second-row.html 3x3-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user