summaryrefslogtreecommitdiffstats
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/libeditor/CSSEditUtils.cpp5
-rw-r--r--editor/libeditor/tests/test_htmleditor_keyevent_handling.html2
-rw-r--r--editor/reftests/xul/platform.js2
3 files changed, 4 insertions, 5 deletions
diff --git a/editor/libeditor/CSSEditUtils.cpp b/editor/libeditor/CSSEditUtils.cpp
index 5199838c0..d8146ca65 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();
}
diff --git a/editor/libeditor/tests/test_htmleditor_keyevent_handling.html b/editor/libeditor/tests/test_htmleditor_keyevent_handling.html
index 414045ac0..bfec290a5 100644
--- a/editor/libeditor/tests/test_htmleditor_keyevent_handling.html
+++ b/editor/libeditor/tests/test_htmleditor_keyevent_handling.html
@@ -27,7 +27,7 @@ var htmlEditor = document.getElementById("htmlEditor");
const kIsMac = navigator.platform.indexOf("Mac") == 0;
const kIsWin = navigator.platform.indexOf("Win") == 0;
-const kIsLinux = navigator.platform.indexOf("Linux") == 0;
+const kIsLinux = navigator.platform.indexOf("Linux") == 0 || navigator.platform.indexOf("SunOS") == 0 ;
function runTests()
{
diff --git a/editor/reftests/xul/platform.js b/editor/reftests/xul/platform.js
index a8633fb09..d3f5d33bf 100644
--- a/editor/reftests/xul/platform.js
+++ b/editor/reftests/xul/platform.js
@@ -13,6 +13,8 @@ if (/Windows/.test(ua)) {
}
else if (/Linux/.test(ua))
id = "linux";
+else if (/SunOS/.test(ua))
+ id = "linux";
else if (/Mac OS X/.test(ua))
id = "mac";