mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 00:08:39 +09:00
Issue #1219 - Align computed DOM styles with mainstream behvior.
This updates our behavior for computed DOM styling to no longer return null on elements that have no display, but return a 0-length (empty) style instead and don't throw. For this we stop looking at having a presentation for the style and just look at the document instead. This resolves #1219
This commit is contained in:
parent
f24dcfdaa4
commit
72b9aaa248
6 changed files with 47 additions and 74 deletions
|
|
@ -38,14 +38,8 @@ GetCSSComputedValue(Element* aElem,
|
|||
return false;
|
||||
}
|
||||
|
||||
nsIPresShell* shell = doc->GetShell();
|
||||
if (!shell) {
|
||||
NS_WARNING("Unable to look up computed style -- no pres shell");
|
||||
return false;
|
||||
}
|
||||
|
||||
RefPtr<nsComputedDOMStyle> computedStyle =
|
||||
NS_NewComputedDOMStyle(aElem, EmptyString(), shell);
|
||||
NS_NewComputedDOMStyle(aElem, EmptyString(), doc);
|
||||
|
||||
computedStyle->GetPropertyValue(aPropID, aResult);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue