mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
Fix strict mode text-decoration when one line of the inline contains no text. b=210016,210012 r+sr=bzbarsky
This commit is contained in:
parent
a1bc56e855
commit
3daaacd191
@ -147,7 +147,7 @@ nsHTMLContainerFrame::PaintDecorationsAndChildren(
|
||||
}
|
||||
|
||||
static PRBool
|
||||
HasTextFrameDescendant(nsIPresContext* aPresContext, nsIFrame* parent);
|
||||
HasTextFrameDescendantOrInFlow(nsIPresContext* aPresContext, nsIFrame* aFrame);
|
||||
|
||||
void
|
||||
nsHTMLContainerFrame::GetTextDecorations(nsIPresContext* aPresContext,
|
||||
@ -220,7 +220,7 @@ nsHTMLContainerFrame::GetTextDecorations(nsIPresContext* aPresContext,
|
||||
|
||||
if (aDecorations) {
|
||||
// If this frame contains no text, we're required to ignore this property
|
||||
if (!HasTextFrameDescendant(aPresContext, this)) {
|
||||
if (!HasTextFrameDescendantOrInFlow(aPresContext, this)) {
|
||||
aDecorations = NS_STYLE_TEXT_DECORATION_NONE;
|
||||
}
|
||||
}
|
||||
@ -259,6 +259,17 @@ HasTextFrameDescendant(nsIPresContext* aPresContext, nsIFrame* aParent)
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
static PRBool
|
||||
HasTextFrameDescendantOrInFlow(nsIPresContext* aPresContext, nsIFrame* aFrame)
|
||||
{
|
||||
for (nsIFrame *f = aFrame->GetFirstInFlow(); f; f->GetNextInFlow(&f)) {
|
||||
if (HasTextFrameDescendant(aPresContext, f))
|
||||
return PR_TRUE;
|
||||
}
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*virtual*/ void
|
||||
nsHTMLContainerFrame::PaintTextDecorationLines(
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
|
@ -147,7 +147,7 @@ nsHTMLContainerFrame::PaintDecorationsAndChildren(
|
||||
}
|
||||
|
||||
static PRBool
|
||||
HasTextFrameDescendant(nsIPresContext* aPresContext, nsIFrame* parent);
|
||||
HasTextFrameDescendantOrInFlow(nsIPresContext* aPresContext, nsIFrame* aFrame);
|
||||
|
||||
void
|
||||
nsHTMLContainerFrame::GetTextDecorations(nsIPresContext* aPresContext,
|
||||
@ -220,7 +220,7 @@ nsHTMLContainerFrame::GetTextDecorations(nsIPresContext* aPresContext,
|
||||
|
||||
if (aDecorations) {
|
||||
// If this frame contains no text, we're required to ignore this property
|
||||
if (!HasTextFrameDescendant(aPresContext, this)) {
|
||||
if (!HasTextFrameDescendantOrInFlow(aPresContext, this)) {
|
||||
aDecorations = NS_STYLE_TEXT_DECORATION_NONE;
|
||||
}
|
||||
}
|
||||
@ -259,6 +259,17 @@ HasTextFrameDescendant(nsIPresContext* aPresContext, nsIFrame* aParent)
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
static PRBool
|
||||
HasTextFrameDescendantOrInFlow(nsIPresContext* aPresContext, nsIFrame* aFrame)
|
||||
{
|
||||
for (nsIFrame *f = aFrame->GetFirstInFlow(); f; f->GetNextInFlow(&f)) {
|
||||
if (HasTextFrameDescendant(aPresContext, f))
|
||||
return PR_TRUE;
|
||||
}
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*virtual*/ void
|
||||
nsHTMLContainerFrame::PaintTextDecorationLines(
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
|
Loading…
Reference in New Issue
Block a user