author = ashuk

r = a = edburns
Bug = 48356, 51326


git-svn-id: svn://10.0.0.236/trunk@78880 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ashuk%eng.sun.com
2000-09-12 16:33:45 +00:00
parent 84f9b74705
commit fb265f1a57

View File

@@ -106,6 +106,12 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImp
nsCOMPtr<nsIDOMWindow> domWindow;
if (initContext->docShell != nsnull) {
nsCOMPtr<nsIInterfaceRequestor> interfaceRequestor(do_QueryInterface(initContext->docShell));
nsCOMPtr<nsIURI> url;
rv = initContext->docShell->GetCurrentURI(getter_AddRefs(url));
if (NS_FAILED(rv) || nsnull == url) {
::util_ThrowExceptionToJava(env, "Exception: NULL URL passed to Find call");
return;
}
if (interfaceRequestor != nsnull) {
rv = interfaceRequestor->GetInterface(NS_GET_IID(nsIDOMWindow), getter_AddRefs(domWindow));
@@ -200,6 +206,9 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImp
return;
}
// Set the forward flag as per input parameter
searchContext->SetSearchBackwards(!forward);
// Pass searchContext to findComponent for the actual find call
PRBool found = PR_TRUE;
findComponent->FindNext(searchContext, &found);