summaryrefslogtreecommitdiffstats
path: root/dom/smil/nsSMILCSSProperty.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-12-20 23:08:47 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-12-20 23:08:47 +0100
commitd6baead6c8bcd90f04d62908bfaf73b369df4e6f (patch)
tree9d042110d977eea7839bc992d736fdfeb0462f44 /dom/smil/nsSMILCSSProperty.cpp
parentce250e9ccfddff9cae496ed7ad01404fd7135291 (diff)
downloadUXP-d6baead6c8bcd90f04d62908bfaf73b369df4e6f.tar
UXP-d6baead6c8bcd90f04d62908bfaf73b369df4e6f.tar.gz
UXP-d6baead6c8bcd90f04d62908bfaf73b369df4e6f.tar.lz
UXP-d6baead6c8bcd90f04d62908bfaf73b369df4e6f.tar.xz
UXP-d6baead6c8bcd90f04d62908bfaf73b369df4e6f.zip
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
Diffstat (limited to 'dom/smil/nsSMILCSSProperty.cpp')
-rw-r--r--dom/smil/nsSMILCSSProperty.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/dom/smil/nsSMILCSSProperty.cpp b/dom/smil/nsSMILCSSProperty.cpp
index 53f3e0fbf..e74512443 100644
--- a/dom/smil/nsSMILCSSProperty.cpp
+++ b/dom/smil/nsSMILCSSProperty.cpp
@@ -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;