mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Bug 1413619 - Fix insertion point computation when display: contents pseudos are involved.
Tag #1375
This commit is contained in:
parent
9b5061e795
commit
5b1452e120
10 changed files with 192 additions and 243 deletions
|
|
@ -1587,33 +1587,6 @@ nsLayoutUtils::GetFloatFromPlaceholder(nsIFrame* aFrame) {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
// static
|
||||
bool
|
||||
nsLayoutUtils::IsGeneratedContentFor(nsIContent* aContent,
|
||||
nsIFrame* aFrame,
|
||||
nsIAtom* aPseudoElement)
|
||||
{
|
||||
NS_PRECONDITION(aFrame, "Must have a frame");
|
||||
NS_PRECONDITION(aPseudoElement, "Must have a pseudo name");
|
||||
|
||||
if (!aFrame->IsGeneratedContentFrame()) {
|
||||
return false;
|
||||
}
|
||||
nsIFrame* parent = aFrame->GetParent();
|
||||
NS_ASSERTION(parent, "Generated content can't be root frame");
|
||||
if (parent->IsGeneratedContentFrame()) {
|
||||
// Not the root of the generated content
|
||||
return false;
|
||||
}
|
||||
|
||||
if (aContent && parent->GetContent() != aContent) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (aFrame->GetContent()->NodeInfo()->NameAtom() == nsGkAtoms::mozgeneratedcontentbefore) ==
|
||||
(aPseudoElement == nsCSSPseudoElements::before);
|
||||
}
|
||||
|
||||
// static
|
||||
nsIFrame*
|
||||
nsLayoutUtils::GetCrossDocParentFrame(const nsIFrame* aFrame,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue