summaryrefslogtreecommitdiff
path: root/layout/generic
diff options
context:
space:
mode:
authorJob Bautista <jobbautista9@protonmail.com>2022-12-23 19:21:40 +0800
committerJob Bautista <jobbautista9@protonmail.com>2022-12-23 19:21:40 +0800
commit6f635acadcfd3e2618c98a1a4b49134441c94cf8 (patch)
tree82dc57293e04d1aab02cd82e806749b4da321e24 /layout/generic
parentfc62ce007670111f3b7f76b27d22810a530d8973 (diff)
downloaduxp-6f635acadcfd3e2618c98a1a4b49134441c94cf8.tar.gz
Issue #2063 - Ensure a floated ::first-letter inherits from ::first-line.
This fixes the 24 year old Mozilla bug 13610. Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
Diffstat (limited to 'layout/generic')
-rw-r--r--layout/generic/nsFrame.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp
index 43ad970890..a4d4427f69 100644
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -9033,6 +9033,13 @@ nsFrame::CorrectStyleParentFrame(nsIFrame* aProspectiveParent,
parent = sibling;
}
}
+
+ // Ensure ::first-letter inherits from ::first-line even when floated, see
+ // Issue #2063 / Mozilla bug 13610.
+ if (parent->GetType() == nsGkAtoms::lineFrame &&
+ parent == parent->FirstInFlow()) {
+ return parent;
+ }
nsIAtom* parentPseudo = parent->StyleContext()->GetPseudo();
if (!parentPseudo ||