mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 09:18:42 +09:00
Bug 1355351 - Make pseudo-elements return the correct style via getComputedStyle
* Add a node property to access the ::before and ::after pseudo-elements * Look for the frame for ::before and ::after pseudos * Clean up pseudo-element props * Simplify nsLayoutUtils callers, and make child iterators notice display: contents pseudos Tag #1375
This commit is contained in:
parent
6b48075b57
commit
d3ffda520f
16 changed files with 188 additions and 241 deletions
|
|
@ -9995,19 +9995,16 @@ nsIFrame::IsPseudoStackingContextFromStyle() {
|
|||
Element*
|
||||
nsIFrame::GetPseudoElement(CSSPseudoElementType aType)
|
||||
{
|
||||
nsIFrame* frame = nullptr;
|
||||
|
||||
if (aType == CSSPseudoElementType::before) {
|
||||
frame = nsLayoutUtils::GetBeforeFrame(this);
|
||||
} else if (aType == CSSPseudoElementType::after) {
|
||||
frame = nsLayoutUtils::GetAfterFrame(this);
|
||||
if (!mContent) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (frame) {
|
||||
nsIContent* content = frame->GetContent();
|
||||
if (content->IsElement()) {
|
||||
return content->AsElement();
|
||||
}
|
||||
if (aType == CSSPseudoElementType::before) {
|
||||
return nsLayoutUtils::GetBeforePseudo(mContent);
|
||||
}
|
||||
|
||||
if (aType == CSSPseudoElementType::after) {
|
||||
return nsLayoutUtils::GetAfterPseudo(mContent);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
|
|
|||
|
|
@ -1062,10 +1062,6 @@ public:
|
|||
return GetBidiData().embeddingLevel;
|
||||
}
|
||||
|
||||
nsTArray<nsIContent*>* GetGenConPseudos() {
|
||||
return GetProperty(GenConProperty());
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the distance between the border edge of the frame and the
|
||||
* margin edge of the frame. Like GetRect(), returns the dimensions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue