зеркало из https://github.com/mozilla/pjs.git
Plug a nsLineIterator leak. b=414740 r+sr=roc a=blocking1.9
This commit is contained in:
Родитель
8d70bdbdca
Коммит
e7c6c707de
|
@ -0,0 +1,31 @@
|
||||||
|
<html><head>
|
||||||
|
<title>Testcase bug 344164 - Hang when moving right in caret browsing with this testcase</title>
|
||||||
|
<script>
|
||||||
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||||
|
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
|
||||||
|
.getService(Components.interfaces.nsIPrefBranch);
|
||||||
|
prefs.setBoolPref("accessibility.browsewithcaret", true);
|
||||||
|
|
||||||
|
function keymove(i){
|
||||||
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
|
||||||
|
|
||||||
|
var ev = document.createEvent ('KeyEvents');
|
||||||
|
ev.initKeyEvent('keypress', true,true, window, false,false, false, false, 39, 0);
|
||||||
|
document.dispatchEvent(ev);
|
||||||
|
|
||||||
|
setTimeout(keymove,50,i);
|
||||||
|
}
|
||||||
|
setTimeout(keymove,500,0);
|
||||||
|
window.focus();
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
text
|
||||||
|
<button>
|
||||||
|
<div>
|
||||||
|
ع
|
||||||
|
<input type="submit">
|
||||||
|
<map>ع</map>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
</body></html>
|
|
@ -91,3 +91,4 @@ load 407009-1.xhtml
|
||||||
load 408749-1.xhtml
|
load 408749-1.xhtml
|
||||||
load 408883-1.html
|
load 408883-1.html
|
||||||
load 410228-1.html
|
load 410228-1.html
|
||||||
|
load 414740.html
|
||||||
|
|
|
@ -426,7 +426,7 @@ nsFrameList::List(FILE* out) const
|
||||||
nsIFrame*
|
nsIFrame*
|
||||||
nsFrameList::GetPrevVisualFor(nsIFrame* aFrame) const
|
nsFrameList::GetPrevVisualFor(nsIFrame* aFrame) const
|
||||||
{
|
{
|
||||||
nsILineIterator* iter;
|
nsCOMPtr<nsILineIterator> iter;
|
||||||
|
|
||||||
if (!mFirstChild)
|
if (!mFirstChild)
|
||||||
return nsnull;
|
return nsnull;
|
||||||
|
@ -438,7 +438,7 @@ nsFrameList::GetPrevVisualFor(nsIFrame* aFrame) const
|
||||||
nsBidiLevel baseLevel = nsBidiPresUtils::GetFrameBaseLevel(mFirstChild);
|
nsBidiLevel baseLevel = nsBidiPresUtils::GetFrameBaseLevel(mFirstChild);
|
||||||
nsBidiPresUtils* bidiUtils = mFirstChild->PresContext()->GetBidiUtils();
|
nsBidiPresUtils* bidiUtils = mFirstChild->PresContext()->GetBidiUtils();
|
||||||
|
|
||||||
nsresult result = parent->QueryInterface(NS_GET_IID(nsILineIterator), (void**)&iter);
|
nsresult result = parent->QueryInterface(NS_GET_IID(nsILineIterator), getter_AddRefs(iter));
|
||||||
if (NS_FAILED(result) || !iter) {
|
if (NS_FAILED(result) || !iter) {
|
||||||
// Parent is not a block Frame
|
// Parent is not a block Frame
|
||||||
if (parent->GetType() == nsGkAtoms::lineFrame) {
|
if (parent->GetType() == nsGkAtoms::lineFrame) {
|
||||||
|
@ -503,7 +503,7 @@ nsFrameList::GetPrevVisualFor(nsIFrame* aFrame) const
|
||||||
nsIFrame*
|
nsIFrame*
|
||||||
nsFrameList::GetNextVisualFor(nsIFrame* aFrame) const
|
nsFrameList::GetNextVisualFor(nsIFrame* aFrame) const
|
||||||
{
|
{
|
||||||
nsILineIterator* iter;
|
nsCOMPtr<nsILineIterator> iter;
|
||||||
|
|
||||||
if (!mFirstChild)
|
if (!mFirstChild)
|
||||||
return nsnull;
|
return nsnull;
|
||||||
|
@ -515,7 +515,7 @@ nsFrameList::GetNextVisualFor(nsIFrame* aFrame) const
|
||||||
nsBidiLevel baseLevel = nsBidiPresUtils::GetFrameBaseLevel(mFirstChild);
|
nsBidiLevel baseLevel = nsBidiPresUtils::GetFrameBaseLevel(mFirstChild);
|
||||||
nsBidiPresUtils* bidiUtils = mFirstChild->PresContext()->GetBidiUtils();
|
nsBidiPresUtils* bidiUtils = mFirstChild->PresContext()->GetBidiUtils();
|
||||||
|
|
||||||
nsresult result = parent->QueryInterface(NS_GET_IID(nsILineIterator), (void**)&iter);
|
nsresult result = parent->QueryInterface(NS_GET_IID(nsILineIterator), getter_AddRefs(iter));
|
||||||
if (NS_FAILED(result) || !iter) {
|
if (NS_FAILED(result) || !iter) {
|
||||||
// Parent is not a block Frame
|
// Parent is not a block Frame
|
||||||
if (parent->GetType() == nsGkAtoms::lineFrame) {
|
if (parent->GetType() == nsGkAtoms::lineFrame) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче