mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Fix bug 403134. r+sr=roc
This commit is contained in:
parent
6d565cfcfa
commit
534ae34647
@ -12362,6 +12362,8 @@ nsCSSFrameConstructor::RemoveLetterFrames(nsPresContext* aPresContext,
|
|||||||
nsFrameManager* aFrameManager,
|
nsFrameManager* aFrameManager,
|
||||||
nsIFrame* aBlockFrame)
|
nsIFrame* aBlockFrame)
|
||||||
{
|
{
|
||||||
|
aBlockFrame = aBlockFrame->GetFirstContinuation();
|
||||||
|
|
||||||
PRBool stopLooking = PR_FALSE;
|
PRBool stopLooking = PR_FALSE;
|
||||||
nsresult rv = RemoveFloatingFirstLetterFrames(aPresContext, aPresShell,
|
nsresult rv = RemoveFloatingFirstLetterFrames(aPresContext, aPresShell,
|
||||||
aFrameManager,
|
aFrameManager,
|
||||||
@ -12378,6 +12380,8 @@ nsresult
|
|||||||
nsCSSFrameConstructor::RecoverLetterFrames(nsFrameConstructorState& aState,
|
nsCSSFrameConstructor::RecoverLetterFrames(nsFrameConstructorState& aState,
|
||||||
nsIFrame* aBlockFrame)
|
nsIFrame* aBlockFrame)
|
||||||
{
|
{
|
||||||
|
aBlockFrame = aBlockFrame->GetFirstContinuation();
|
||||||
|
|
||||||
nsresult rv = NS_OK;
|
nsresult rv = NS_OK;
|
||||||
|
|
||||||
aBlockFrame->AddStateBits(NS_BLOCK_HAS_FIRST_LETTER_STYLE);
|
aBlockFrame->AddStateBits(NS_BLOCK_HAS_FIRST_LETTER_STYLE);
|
||||||
|
@ -6312,11 +6312,11 @@ nsBlockFrame::SetInitialChildList(nsIAtom* aListName,
|
|||||||
// first-letter frame are when it's the block inside a non-anonymous cell,
|
// 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
|
// the block inside a fieldset, a scrolled content block, or a column
|
||||||
// content block. Note that this means that blocks which are the anonymous
|
// 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
|
// block in {ib} splits do NOT get first-letter frames. Note that
|
||||||
// has a previous continuation can't have a first letter frame.
|
// NS_BLOCK_HAS_FIRST_LETTER_STYLE gets set on all continuations of the
|
||||||
|
// block.
|
||||||
nsIAtom *pseudo = GetStyleContext()->GetPseudoType();
|
nsIAtom *pseudo = GetStyleContext()->GetPseudoType();
|
||||||
PRBool haveFirstLetterStyle =
|
PRBool haveFirstLetterStyle =
|
||||||
!GetPrevContinuation() &&
|
|
||||||
(!pseudo ||
|
(!pseudo ||
|
||||||
(pseudo == nsCSSAnonBoxes::cellContent &&
|
(pseudo == nsCSSAnonBoxes::cellContent &&
|
||||||
mParent->GetStyleContext()->GetPseudoType() == nsnull) ||
|
mParent->GetStyleContext()->GetPseudoType() == nsnull) ||
|
||||||
|
8
layout/reftests/bugs/403134-1-ref.html
Normal file
8
layout/reftests/bugs/403134-1-ref.html
Normal 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>
|
16
layout/reftests/bugs/403134-1.html
Normal file
16
layout/reftests/bugs/403134-1.html
Normal 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>
|
@ -451,12 +451,13 @@ fails == 386310-1d.html 386310-1-ref.html
|
|||||||
== 400171-2c.html 400171-2-ref.html
|
== 400171-2c.html 400171-2-ref.html
|
||||||
== 400421-1.html 400421-1-ref.html
|
== 400421-1.html 400421-1-ref.html
|
||||||
== 400826-1.html 400826-1-ref.html
|
== 400826-1.html 400826-1-ref.html
|
||||||
|
== 402338-1.html 402338-1-ref.html
|
||||||
== 402950-1.html 402950-1-ref.html
|
== 402950-1.html 402950-1-ref.html
|
||||||
== 403129-1.html 403129-1-ref.html
|
== 403129-1.html 403129-1-ref.html
|
||||||
== 403129-2.html 403129-2-ref.html
|
== 403129-2.html 403129-2-ref.html
|
||||||
== 403129-3.html 403129-3-ref.html
|
== 403129-3.html 403129-3-ref.html
|
||||||
== 403129-4.html 403129-4-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-1a.html 403249-1-ref.html
|
||||||
== 403249-1b.html 403249-1-ref.html
|
== 403249-1b.html 403249-1-ref.html
|
||||||
== 403455-1.html 403455-1-ref.html
|
== 403455-1.html 403455-1-ref.html
|
||||||
|
Loading…
Reference in New Issue
Block a user