Skip to content

Instantly share code, notes, and snippets.

@tsupo
Created May 13, 2011 10:10
Show Gist options
  • Save tsupo/970292 to your computer and use it in GitHub Desktop.
Save tsupo/970292 to your computer and use it in GitHub Desktop.
patch for "webkitdotnet-webkitdotnet-160a223/WebKitBrowserTest/MainForm.cs"
*** webkit.net/webkitdotnet-webkitdotnet-160a223/WebKitBrowserTest/MainForm.cs Fri Mar 18 00:16:04 2011
--- WEBKIT_test_working002/webkit.net/webkitdotnet-webkitdotnet-160a223/WebKitBrowserTest/MainForm.cs Fri May 13 15:17:01 2011
***************
*** 78,84 ****
// navigation bar events
navigationBar.Back += () => { currentPage.browser.GoBack(); ActivateBrowser(); };
navigationBar.Forward += () => { currentPage.browser.GoForward(); ActivateBrowser(); };
! navigationBar.Go += () => { currentPage.browser.Navigate(navigationBar.UrlText); ActivateBrowser(); };
navigationBar.Refresh += () => { currentPage.browser.Reload(); ActivateBrowser(); };
navigationBar.Stop += () => { currentPage.Stop(); ActivateBrowser(); };
}
--- 78,90 ----
// navigation bar events
navigationBar.Back += () => { currentPage.browser.GoBack(); ActivateBrowser(); };
navigationBar.Forward += () => { currentPage.browser.GoForward(); ActivateBrowser(); };
! navigationBar.Go += () => { /* @@ */
! if (navigationBar.UrlText.StartsWith("javascript:")) /* @@ */
! currentPage.browser.StringByEvaluatingJavaScriptFromString(navigationBar.UrlText); /* @@ */
! else /* @@ */
! currentPage.browser.Navigate(navigationBar.UrlText); /* @@ */
! ActivateBrowser(); /* @@ */
! }; /* @@ */
navigationBar.Refresh += () => { currentPage.browser.Reload(); ActivateBrowser(); };
navigationBar.Stop += () => { currentPage.Stop(); ActivateBrowser(); };
}
***************
*** 254,260 ****
{
JSContext ctx = (JSContext)currentPage.browser.GetGlobalScriptContext();
JSValue val = ctx.EvaluateScript("f()");
! MessageBox.Show(val.ToString());
}
private void jSTestPageToolStripMenuItem_Click(object sender, EventArgs e)
--- 260,267 ----
{
JSContext ctx = (JSContext)currentPage.browser.GetGlobalScriptContext();
JSValue val = ctx.EvaluateScript("f()");
! if (val != null) /* @@ */
! MessageBox.Show(val.ToString()); /* @@ */
}
private void jSTestPageToolStripMenuItem_Click(object sender, EventArgs e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment