Fix bug 403134. r+sr=roc

This commit is contained in:
bzbarsky@mit.edu 2007-11-25 16:15:20 -08:00
parent 6d565cfcfa
commit 534ae34647
5 changed files with 33 additions and 4 deletions

View File

@ -12362,6 +12362,8 @@ nsCSSFrameConstructor::RemoveLetterFrames(nsPresContext* aPresContext,
nsFrameManager* aFrameManager,
nsIFrame* aBlockFrame)
{
aBlockFrame = aBlockFrame->GetFirstContinuation();
PRBool stopLooking = PR_FALSE;
nsresult rv = RemoveFloatingFirstLetterFrames(aPresContext, aPresShell,
aFrameManager,
@ -12378,6 +12380,8 @@ nsresult
nsCSSFrameConstructor::RecoverLetterFrames(nsFrameConstructorState& aState,
nsIFrame* aBlockFrame)
{
aBlockFrame = aBlockFrame->GetFirstContinuation();
nsresult rv = NS_OK;
aBlockFrame->AddStateBits(NS_BLOCK_HAS_FIRST_LETTER_STYLE);

View File

@ -6312,11 +6312,11 @@ nsBlockFrame::SetInitialChildList(nsIAtom* aListName,
// first-letter frame are when it's the block inside a non-anonymous cell,
// the block inside a fieldset, a scrolled content block, or a column
// content block. Note that this means that blocks which are the anonymous
// block in {ib} splits do NOT get first-letter frames. Also, a block that
// has a previous continuation can't have a first letter frame.
// block in {ib} splits do NOT get first-letter frames. Note that
// NS_BLOCK_HAS_FIRST_LETTER_STYLE gets set on all continuations of the
// block.
nsIAtom *pseudo = GetStyleContext()->GetPseudoType();
PRBool haveFirstLetterStyle =
!GetPrevContinuation() &&
(!pseudo ||
(pseudo == nsCSSAnonBoxes::cellContent &&
mParent->GetStyleContext()->GetPseudoType() == nsnull) ||

View File

@ -0,0 +1,8 @@
<!DOCTYPE html>
<html>
<body>
<div style="-moz-column-width: 0.5em; -moz-column-gap: 100px;" id="div"><span style="color: green">x</span>x ! </div>
</body>
</html>

View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<style>
#div:first-letter { color: green; }
</style>
</head>
<body onload="document.getElementById('div').appendChild(document.createTextNode(''));">
<div style="-moz-column-width: 0.5em; -moz-column-gap: 100px;" id="div">xx ! </div>
</body>
</html>

View File

@ -451,12 +451,13 @@ fails == 386310-1d.html 386310-1-ref.html
== 400171-2c.html 400171-2-ref.html
== 400421-1.html 400421-1-ref.html
== 400826-1.html 400826-1-ref.html
== 402338-1.html 402338-1-ref.html
== 402950-1.html 402950-1-ref.html
== 403129-1.html 403129-1-ref.html
== 403129-2.html 403129-2-ref.html
== 403129-3.html 403129-3-ref.html
== 403129-4.html 403129-4-ref.html
== 402338-1.html 402338-1-ref.html
== 403134-1.html 403134-1-ref.html
== 403249-1a.html 403249-1-ref.html
== 403249-1b.html 403249-1-ref.html
== 403455-1.html 403455-1-ref.html