mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 15:28:39 +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
|
|
@ -9,6 +9,7 @@
|
|||
#include "mozilla/dom/ElementInlines.h"
|
||||
#include "nsContentUtils.h" // nsAutoScriptBlocker
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
nsresult
|
||||
|
|
@ -29,4 +30,26 @@ nsXMLElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
|
|||
return ElementBinding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
void
|
||||
nsXMLElement::UnbindFromTree(bool aDeep, bool aNullParent)
|
||||
{
|
||||
CSSPseudoElementType pseudoType = GetPseudoElementType();
|
||||
bool isBefore = pseudoType == CSSPseudoElementType::before;
|
||||
nsIAtom* property = isBefore
|
||||
? nsGkAtoms::beforePseudoProperty : nsGkAtoms::afterPseudoProperty;
|
||||
|
||||
switch (pseudoType) {
|
||||
case CSSPseudoElementType::before:
|
||||
case CSSPseudoElementType::after: {
|
||||
MOZ_ASSERT(GetParent());
|
||||
MOZ_ASSERT(GetParent()->IsElement());
|
||||
GetParent()->DeleteProperty(property);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Element::UnbindFromTree(aDeep, aNullParent);
|
||||
}
|
||||
|
||||
NS_IMPL_ELEMENT_CLONE(nsXMLElement)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue