summaryrefslogtreecommitdiff
path: root/editor/libeditor
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 /editor/libeditor
parentce250e9ccfddff9cae496ed7ad01404fd7135291 (diff)
downloaduxp-d6baead6c8bcd90f04d62908bfaf73b369df4e6f.tar.gz
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 'editor/libeditor')
-rw-r--r--editor/libeditor/CSSEditUtils.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/editor/libeditor/CSSEditUtils.cpp b/editor/libeditor/CSSEditUtils.cpp
index 5199838c01..d8146ca654 100644
--- a/editor/libeditor/CSSEditUtils.cpp
+++ b/editor/libeditor/CSSEditUtils.cpp
@@ -569,11 +569,8 @@ CSSEditUtils::GetComputedStyle(Element* aElement)
nsIDocument* doc = aElement->GetUncomposedDoc();
NS_ENSURE_TRUE(doc, nullptr);
- nsIPresShell* presShell = doc->GetShell();
- NS_ENSURE_TRUE(presShell, nullptr);
-
RefPtr<nsComputedDOMStyle> style =
- NS_NewComputedDOMStyle(aElement, EmptyString(), presShell);
+ NS_NewComputedDOMStyle(aElement, EmptyString(), doc);
return style.forget();
}