Ok after this checkin we now have all the functionality of Sun's JDIC
WebBrowser <https://jdic.dev.java.net/nonav/documentation/javadoc/jdic/org/jdesktop/jdic/browser/WebBrowser.html>, with the following exceptions: - we're based on mozilla 1.6 - it only works on windows - we don't have mouse event support - we only support mozilla, not IE So, webclient still has a ways to go until we reach its former glory, but reach it we will. I'm going to assemble a 2.0 alpha 1 source code only release, including build instructions, from what we have now. I'd love it if someone could get the unit tests working on GNU/Linux again. I think the problem has to do with our old friend GDKSUPERWIN. Next step is to assemble the 2.0 alpha 1 source code release! Ed M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/NavigationImpl.java M webclient/src_moz/NavigationImpl.cpp - re-enable POST M webclient/src_moz/EmbedWindow.cpp M webclient/src_moz/EmbedWindow.h - expose DocShell post method. M webclient/test/automated/src/classes/org/mozilla/util/THTTPD.java M webclient/test/automated/src/classes/org/mozilla/webclient/NavigationTest.java - test code for POST git-svn-id: svn://10.0.0.236/trunk@158472 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
#include <nsCWebBrowser.h>
|
||||
#include <nsIComponentManager.h>
|
||||
#include <nsIDocShellTreeItem.h>
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIContentViewerEdit.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsISelection.h"
|
||||
@@ -270,6 +272,33 @@ EmbedWindow::GetSelection(JNIEnv *env, jobject mSelection)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
EmbedWindow::CopySelection()
|
||||
{
|
||||
nsCOMPtr<nsIDocShell> docShell = do_GetInterface(mWebBrowser);
|
||||
nsCOMPtr<nsIContentViewer> contentViewer = nsnull;
|
||||
nsCOMPtr<nsIContentViewerEdit> contentViewerEdit = nsnull;
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
if (!docShell) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
rv = docShell->GetContentViewer(getter_AddRefs(contentViewer));
|
||||
if (!contentViewer || NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
contentViewerEdit = do_QueryInterface(contentViewer, &rv);
|
||||
|
||||
if (!contentViewerEdit || NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
rv = contentViewerEdit->CopySelection();
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
EmbedWindow::LoadStream(nsIInputStream *aStream, nsIURI * aURI,
|
||||
const nsACString &aContentType,
|
||||
|
||||
Reference in New Issue
Block a user