Bug 554230 - Crash [@ nsCopySupport::CanCopy][@ nsCopySupport::CanCopy(nsIDocument*) ]; r=jst

This commit is contained in:
Ehsan Akhgari 2010-03-23 17:10:44 -04:00
Родитель f19665fd9f
Коммит d3e9661eb9
3 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,15 @@
<html class="reftest-wait" xmlns="http://www.w3.org/1999/xhtml"><iframe contenteditable="true"></iframe><span></span><script style="display: none;" id="fuzz1" type="text/javascript">
<![CDATA[
function boom()
{
document.getElementsByTagName("iframe")[0].focus();
document.getElementsByTagName("span")[0].appendChild(document.createElementNS("http://www.w3.org/1999/xhtml", "div"));
document.execCommand("selectAll", false, null);
document.documentElement.removeAttribute("class");
}
window.addEventListener("load", boom, false);
]]>
</script></html>

Просмотреть файл

@ -60,3 +60,4 @@ load 493281-2.html
load 490760-1.xhtml
load 494810-1.html
load 529670.html
load 554230-1.xhtml

Просмотреть файл

@ -629,6 +629,7 @@ nsCopySupport::CanCopy(nsIDocument* aDocument)
nsCOMPtr<nsISelection> sel;
GetSelectionForCopy(aDocument, getter_AddRefs(sel));
NS_ENSURE_TRUE(sel, PR_FALSE);
PRBool isCollapsed;
sel->GetIsCollapsed(&isCollapsed);