mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 419285. nsCSSFrameConstructor should stop looking for first-letter content after a <br>. r+sr=dbaron
This commit is contained in:
parent
535288ced1
commit
4370d37432
@ -11890,7 +11890,8 @@ nsCSSFrameConstructor::WrapFramesInFirstLetterFrame(
|
||||
while (frame) {
|
||||
nsIFrame* nextFrame = frame->GetNextSibling();
|
||||
|
||||
if (nsGkAtoms::textFrame == frame->GetType()) {
|
||||
nsIAtom* frameType = frame->GetType();
|
||||
if (nsGkAtoms::textFrame == frameType) {
|
||||
// Wrap up first-letter content in a letter frame
|
||||
nsIContent* textContent = frame->GetContent();
|
||||
if (IsFirstLetterContent(textContent)) {
|
||||
@ -11909,7 +11910,7 @@ nsCSSFrameConstructor::WrapFramesInFirstLetterFrame(
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
else if (IsInlineFrame(frame)) {
|
||||
else if (IsInlineFrame(frame) && frameType != nsGkAtoms::brFrame) {
|
||||
nsIFrame* kids = frame->GetFirstChild(nsnull);
|
||||
WrapFramesInFirstLetterFrame(aState, aBlockFrame, frame, kids,
|
||||
aModifiedParent, aTextFrame,
|
||||
|
@ -236,6 +236,8 @@ nsFirstLetterFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsLineLayout* ll = aReflowState.mLineLayout;
|
||||
PRBool pushedFrame;
|
||||
|
||||
NS_ASSERTION(ll->GetFirstLetterStyleOK() || GetPrevInFlow(),
|
||||
"First-in-flow first-letter should have first-letter style enabled in nsLineLayout!");
|
||||
ll->BeginSpan(this, &aReflowState, bp.left, availSize.width);
|
||||
ll->ReflowFrame(kid, aReflowStatus, &aMetrics, pushedFrame);
|
||||
ll->EndSpan(this);
|
||||
|
7
layout/reftests/bugs/419285-1-ref.html
Normal file
7
layout/reftests/bugs/419285-1-ref.html
Normal file
@ -0,0 +1,7 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body style="line-height:50px">
|
||||
<p><br>Hello
|
||||
<p><span style="font-size:200%">"</span><br>Hello
|
||||
</body>
|
||||
</html>
|
12
layout/reftests/bugs/419285-1.html
Normal file
12
layout/reftests/bugs/419285-1.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
p::first-letter { font-size:200%; }
|
||||
</style>
|
||||
</head>
|
||||
<body style="line-height:50px">
|
||||
<p><br>Hello
|
||||
<p>"<br>Hello
|
||||
</body>
|
||||
</html>
|
@ -789,6 +789,7 @@ skip-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 413292-1.html 413292-1-ref.html # disabl
|
||||
== 417676.html 417676-ref.html
|
||||
== 418766-1a.html 418766-1-ref.html
|
||||
== 418766-1b.html 418766-1-ref.html
|
||||
== 419285-1.html 419285-1-ref.html
|
||||
== 419060.html 419060-ref.html
|
||||
== 419531-1.html 419531-1-ref.html
|
||||
== 420069-1.html 420069-1-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user