r3515 rjek - in /branches/1/netsurf: ChangeLog ReadMe
by netsurf@semichrome.net
Author: rjek
Date: Tue Aug 14 12:54:32 2007
New Revision: 3515
URL: http://source.netsurf-browser.org?rev=3515&view=rev
Log:
Update ReadMe to say 1.1, include ChangeLog for changes between 1.0 and 1.1
Added:
branches/1/netsurf/ChangeLog
Modified:
branches/1/netsurf/ReadMe
Added: branches/1/netsurf/ChangeLog
URL: http://source.netsurf-browser.org/branches/1/netsurf/ChangeLog?rev=3515&v...
==============================================================================
--- branches/1/netsurf/ChangeLog (added)
+++ branches/1/netsurf/ChangeLog Tue Aug 14 12:54:32 2007
@@ -1,0 +1,64 @@
+Changes from NetSurf 1.0 to NetSurf 1.1
+
+Core / All
+----------
+
+ * Fix charset detection bugs, fixes #1726341 (WightLink)
+ * Add -v command line option to enable debugging output
+ (this is enabled by default in the RISC OS build via the !Run file)
+ * Rationalise header file includes
+ * Various portability fixes to BSD and Solaris
+ * Abstraction of schemes for fetchers
+ * More encoding detection fixes
+ * Fix cookie domain matching in unverifiable transactions.
+ * Fix cookie issues with launchpad.net
+ * Fix deadlock when fetching stylesheets
+ * Fix bug where the referer header was being sent regardless
+ * Fix bug where strange Accept-Language and other headers could be
+ sent
+ * Fix crash when building error page
+ * Content scaling is now handled centrally, such that both GTK and
+ RISC OS versions act in the same way.
+ * Licence for NetSurf changed to GPLv2 only with clause allowing
+ linking to OpenSSL.
+
+RISC OS-specific
+----------------
+
+ * Tweak default hotlist entries to be more up-to-date
+ * Fix interaction between failed drag saves and pointer
+ tracking (including page scrolling)
+ * Scroll wheel support on hotlist and history windows
+ * Use proper background colour for AW files using transparency
+ * Fix AWRenderer clipping issue (#1756230) and improve rendering
+ performance.
+
+GTK-specific
+------------
+
+ * Add local file browsing MIME type guessing. Also fixes
+ directory browsing
+ * Fix destruction of windows involving frames, fixes crashes
+ on sites such as news.bbc.co.uk
+ * Reduce flicker when periodically reflowing during fetch
+ * Fix bug that caused 100% CPU usage on some sites with frames
+ * Fix scroll-position setting, allowing anchors and
+ back/forward positions to be set/remembered
+ * Fix problems with closing windows with fetches still in progress
+ * New Window menu entry now functions
+ * Open File... menu entry now functions
+ * Fix reentrancy issues with event scheduling
+ * Support for setting the path to find CA certificates (fixes SSL
+ sites)
+ * Stop referer header being sent with URLs entered in the URL bar
+ * Use default homepage if homepage option is blank
+ * Full screen mode now functions
+ * Popup version of the main menu
+ * Removal of menubar/toolbar/statusbar now functions
+ * Fix corruption on some animated GIFs due to new images not being
+ created blank
+ * Fix issues with scrolling from the keyboard.
+ * Add simple SSL certificate verification window.
+
+Also included are many and various smaller bug fixes, documation enhancements
+and updated translations. Thanks to everybody involved in this release!
Modified: branches/1/netsurf/ReadMe
URL: http://source.netsurf-browser.org/branches/1/netsurf/ReadMe?rev=3515&r1=3...
==============================================================================
--- branches/1/netsurf/ReadMe (original)
+++ branches/1/netsurf/ReadMe Tue Aug 14 12:54:32 2007
@@ -1,7 +1,7 @@
NetSurf
=======
-This is version 1.0 of NetSurf, an open source web browser.
+This is version 1.1 of NetSurf, an open source web browser.
Further updates to NetSurf 1, fixing any stability issues will be
available at the project web site:
@@ -40,7 +40,7 @@
Licences
--------
-NetSurf is provided under the GPL. See !NetSurf.Docs.licence_en
+NetSurf is provided under the GPLv2. See !NetSurf.Docs.licence_en
The !Boot and !System directories contain items provided produced
15 years, 5 months
r3513 rjek - in /branches/1/netsurf: ./ desktop/options.c
by netsurf@semichrome.net
Author: rjek
Date: Mon Aug 13 12:39:22 2007
New Revision: 3513
URL: http://source.netsurf-browser.org?rev=3513&view=rev
Log:
Merged revisions 3512 via svnmerge from
svn://svn.netsurf-browser.org/trunk/netsurf
........
r3512 | bursa | 2007-08-13 12:36:25 +0100 (Mon, 13 Aug 2007) | 1 line
Rename default scale option back to "scale" (changed to "option_scale" by mistake).
........
Modified:
branches/1/netsurf/ (props changed)
branches/1/netsurf/desktop/options.c
Propchange: branches/1/netsurf/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Aug 13 12:39:22 2007
@@ -1,1 +1,1 @@
-/trunk/netsurf:1-3295,3299,3301-3337,3345-3382,3384-3404,3408-3419,3421-3426,3428-3431,3434,3437,3439-3440,3442-3447,3449-3476,3478,3480-3481,3483-3484,3486,3493-3495,3498,3507-3508,3510
+/trunk/netsurf:1-3295,3299,3301-3337,3345-3382,3384-3404,3408-3419,3421-3426,3428-3431,3434,3437,3439-3440,3442-3447,3449-3476,3478,3480-3481,3483-3484,3486,3493-3495,3498,3507-3508,3510,3512
Modified: branches/1/netsurf/desktop/options.c
URL: http://source.netsurf-browser.org/branches/1/netsurf/desktop/options.c?re...
==============================================================================
--- branches/1/netsurf/desktop/options.c (original)
+++ branches/1/netsurf/desktop/options.c Mon Aug 13 12:39:22 2007
@@ -191,7 +191,7 @@
{ "window_screen_width", OPTION_INTEGER, &option_window_screen_width },
{ "window_screen_height",OPTION_INTEGER, &option_window_screen_height },
{ "toolbar_status_size", OPTION_INTEGER, &option_toolbar_status_width },
- { "option_scale", OPTION_INTEGER, &option_scale },
+ { "scale", OPTION_INTEGER, &option_scale },
/* Fetcher options */
{ "max_fetchers", OPTION_INTEGER, &option_max_fetchers },
{ "max_fetchers_per_host",
15 years, 5 months
r3512 bursa - /trunk/netsurf/desktop/options.c
by netsurf@semichrome.net
Author: bursa
Date: Mon Aug 13 12:36:25 2007
New Revision: 3512
URL: http://source.netsurf-browser.org?rev=3512&view=rev
Log:
Rename default scale option back to "scale" (changed to "option_scale" by mistake).
Modified:
trunk/netsurf/desktop/options.c
Modified: trunk/netsurf/desktop/options.c
URL: http://source.netsurf-browser.org/trunk/netsurf/desktop/options.c?rev=351...
==============================================================================
--- trunk/netsurf/desktop/options.c (original)
+++ trunk/netsurf/desktop/options.c Mon Aug 13 12:36:25 2007
@@ -191,7 +191,7 @@
{ "window_screen_width", OPTION_INTEGER, &option_window_screen_width },
{ "window_screen_height",OPTION_INTEGER, &option_window_screen_height },
{ "toolbar_status_size", OPTION_INTEGER, &option_toolbar_status_width },
- { "option_scale", OPTION_INTEGER, &option_scale },
+ { "scale", OPTION_INTEGER, &option_scale },
/* Fetcher options */
{ "max_fetchers", OPTION_INTEGER, &option_max_fetchers },
{ "max_fetchers_per_host",
15 years, 5 months
r3511 rjek - in /branches/1/netsurf: ./ gtk/res/netsurf.glade
by netsurf@semichrome.net
Author: rjek
Date: Sun Aug 12 00:33:36 2007
New Revision: 3511
URL: http://source.netsurf-browser.org?rev=3511&view=rev
Log:
Merged revisions 3510 via svnmerge from
svn://svn.netsurf-browser.org/trunk/netsurf
........
r3510 | rjek | 2007-08-12 00:32:21 +0100 (Sun, 12 Aug 2007) | 1 line
Include new licencing terms in nsgtk about window
........
Modified:
branches/1/netsurf/ (props changed)
branches/1/netsurf/gtk/res/netsurf.glade
Propchange: branches/1/netsurf/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Aug 12 00:33:36 2007
@@ -1,1 +1,1 @@
-/trunk/netsurf:1-3295,3299,3301-3337,3345-3382,3384-3404,3408-3419,3421-3426,3428-3431,3434,3437,3439-3440,3442-3447,3449-3476,3478,3480-3481,3483-3484,3486,3493-3495,3498,3507-3508
+/trunk/netsurf:1-3295,3299,3301-3337,3345-3382,3384-3404,3408-3419,3421-3426,3428-3431,3434,3437,3439-3440,3442-3447,3449-3476,3478,3480-3481,3483-3484,3486,3493-3495,3498,3507-3508,3510
Modified: branches/1/netsurf/gtk/res/netsurf.glade
URL: http://source.netsurf-browser.org/branches/1/netsurf/gtk/res/netsurf.glad...
==============================================================================
--- branches/1/netsurf/gtk/res/netsurf.glade (original)
+++ branches/1/netsurf/gtk/res/netsurf.glade Sun Aug 12 00:33:36 2007
@@ -4917,7 +4917,57 @@
<property name="left_margin">0</property>
<property name="right_margin">0</property>
<property name="indent">0</property>
- <property name="text" translatable="yes"> GNU GENERAL PUBLIC LICENSE
+ <property name="text" translatable="yes">The source code, documentation, translatable messages files and UI
+definitions contained within NetSurf are licensed under the following terms:
+
+ NetSurf is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ In addition, as a special exception, permission is granted to link the
+ code of this release of NetSurf with the OpenSSL project's "OpenSSL"
+ library (or with modified versions of it that use the same licence as
+ the "OpenSSL" library), and distribute the linked executables. You must
+ obey the GNU General Public License version 2 in all respects for all of
+ the code used other than "OpenSSL". If you modify the code, you may
+ extend this exception to your version of the code, but you are not
+ obligated to do so. If you do not wish to do so, delete this exception
+ statement from your version.
+
+All visual artwork contained within NetSurf is licensed under the terms of
+the MIT License.
+
+The full text of the MIT and GPL licenses are provided in Annex A and
+Annex B of this document.
+
+
+Annex A: The MIT License
+------------------------
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+
+Annex B: The GNU General Public License
+---------------------------------------
+
+
+ GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
15 years, 5 months
r3510 rjek - /trunk/netsurf/gtk/res/netsurf.glade
by netsurf@semichrome.net
Author: rjek
Date: Sun Aug 12 00:32:21 2007
New Revision: 3510
URL: http://source.netsurf-browser.org?rev=3510&view=rev
Log:
Include new licencing terms in nsgtk about window
Modified:
trunk/netsurf/gtk/res/netsurf.glade
Modified: trunk/netsurf/gtk/res/netsurf.glade
URL: http://source.netsurf-browser.org/trunk/netsurf/gtk/res/netsurf.glade?rev...
==============================================================================
--- trunk/netsurf/gtk/res/netsurf.glade (original)
+++ trunk/netsurf/gtk/res/netsurf.glade Sun Aug 12 00:32:21 2007
@@ -4917,7 +4917,57 @@
<property name="left_margin">0</property>
<property name="right_margin">0</property>
<property name="indent">0</property>
- <property name="text" translatable="yes"> GNU GENERAL PUBLIC LICENSE
+ <property name="text" translatable="yes">The source code, documentation, translatable messages files and UI
+definitions contained within NetSurf are licensed under the following terms:
+
+ NetSurf is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ In addition, as a special exception, permission is granted to link the
+ code of this release of NetSurf with the OpenSSL project's "OpenSSL"
+ library (or with modified versions of it that use the same licence as
+ the "OpenSSL" library), and distribute the linked executables. You must
+ obey the GNU General Public License version 2 in all respects for all of
+ the code used other than "OpenSSL". If you modify the code, you may
+ extend this exception to your version of the code, but you are not
+ obligated to do so. If you do not wish to do so, delete this exception
+ statement from your version.
+
+All visual artwork contained within NetSurf is licensed under the terms of
+the MIT License.
+
+The full text of the MIT and GPL licenses are provided in Annex A and
+Annex B of this document.
+
+
+Annex A: The MIT License
+------------------------
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+
+Annex B: The GNU General Public License
+---------------------------------------
+
+
+ GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
15 years, 5 months
r3509 rjek - in /branches/1/netsurf: ./ gtk/gtk_gui.c gtk/res/netsurf.glade
by netsurf@semichrome.net
Author: rjek
Date: Sun Aug 12 00:23:30 2007
New Revision: 3509
URL: http://source.netsurf-browser.org?rev=3509&view=rev
Log:
Merged revisions 3507-3508 via svnmerge from
svn://svn.netsurf-browser.org/trunk/netsurf
........
r3507 | rjek | 2007-08-12 00:14:33 +0100 (Sun, 12 Aug 2007) | 1 line
Initial trivial (temp) implementation of nsgtk SSL cert window. Currently segfaults if you accept, however.
........
r3508 | rjek | 2007-08-12 00:22:10 +0100 (Sun, 12 Aug 2007) | 1 line
fix nsgtk ssl cert verify window
........
Modified:
branches/1/netsurf/ (props changed)
branches/1/netsurf/gtk/gtk_gui.c
branches/1/netsurf/gtk/res/netsurf.glade
Propchange: branches/1/netsurf/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Aug 12 00:23:30 2007
@@ -1,1 +1,1 @@
-/trunk/netsurf:1-3295,3299,3301-3337,3345-3382,3384-3404,3408-3419,3421-3426,3428-3431,3434,3437,3439-3440,3442-3447,3449-3476,3478,3480-3481,3483-3484,3486,3493-3495,3498
+/trunk/netsurf:1-3295,3299,3301-3337,3345-3382,3384-3404,3408-3419,3421-3426,3428-3431,3434,3437,3439-3440,3442-3447,3449-3476,3478,3480-3481,3483-3484,3486,3493-3495,3498,3507-3508
Modified: branches/1/netsurf/gtk/gtk_gui.c
URL: http://source.netsurf-browser.org/branches/1/netsurf/gtk/gtk_gui.c?rev=35...
==============================================================================
--- branches/1/netsurf/gtk/gtk_gui.c (original)
+++ branches/1/netsurf/gtk/gtk_gui.c Sun Aug 12 00:23:30 2007
@@ -77,6 +77,12 @@
GtkLabel *labelTooltip;
GtkDialog *wndOpenFile;
+static void nsgtk_create_ssl_verify_window(struct browser_window *bw,
+ struct content *c, const struct ssl_cert_info *certs,
+ unsigned long num);
+static void nsgtk_ssl_accept(GtkButton *w, gpointer data);
+static void nsgtk_ssl_reject(GtkButton *w, gpointer data);
+
/**
* Locate a shared resource file by searching known places in order.
*
@@ -450,14 +456,61 @@
void gui_cert_verify(struct browser_window *bw, struct content *c,
const struct ssl_cert_info *certs, unsigned long num)
{
-
- /* TODO: we should open a window showing what the certificate
- * problem is and offer the user the choice to reject it. Until
- * we do this, we just always accept them.
- * */
-
- urldb_set_cert_permissions(c->url, true);
- browser_window_go(bw, c->url, 0, true);
+ nsgtk_create_ssl_verify_window(bw, c, certs, num);
+}
+
+static void nsgtk_create_ssl_verify_window(struct browser_window *bw,
+ struct content *c, const struct ssl_cert_info *certs,
+ unsigned long num)
+{
+ GladeXML *x = glade_xml_new(glade_file_location, NULL, NULL);
+ GtkWindow *wnd = GTK_WINDOW(glade_xml_get_widget(x, "wndSSLProblem"));
+ GtkButton *accept, *reject;
+ void **session = calloc(sizeof(void *), 4);
+
+ session[0] = bw;
+ session[1] = strdup(c->url);
+ session[2] = x;
+ session[3] = wnd;
+
+ accept = GTK_BUTTON(glade_xml_get_widget(x, "sslaccept"));
+ reject = GTK_BUTTON(glade_xml_get_widget(x, "sslreject"));
+
+ g_signal_connect(G_OBJECT(accept), "clicked",
+ G_CALLBACK(nsgtk_ssl_accept), (gpointer)session);
+ g_signal_connect(G_OBJECT(reject), "clicked",
+ G_CALLBACK(nsgtk_ssl_reject), (gpointer)session);
+
+ gtk_widget_show(GTK_WIDGET(wnd));
+}
+
+static void nsgtk_ssl_accept(GtkButton *w, gpointer data)
+{
+ void **session = data;
+ struct browser_window *bw = session[0];
+ char *url = session[1];
+ GladeXML *x = session[2];
+ GtkWindow *wnd = session[3];
+
+ urldb_set_cert_permissions(url, true);
+ browser_window_go(bw, url, 0, true);
+
+ gtk_widget_destroy(GTK_WIDGET(wnd));
+ g_object_unref(G_OBJECT(x));
+ free(url);
+ free(session);
+}
+
+static void nsgtk_ssl_reject(GtkButton *w, gpointer data)
+{
+ void **session = data;
+ GladeXML *x = session[2];
+ GtkWindow *wnd = session[3];
+
+ gtk_widget_destroy(GTK_WIDGET(wnd));
+ g_object_unref(G_OBJECT(x));
+ free(session[1]);
+ free(session);
}
utf8_convert_ret utf8_to_local_encoding(const char *string, size_t len,
Modified: branches/1/netsurf/gtk/res/netsurf.glade
URL: http://source.netsurf-browser.org/branches/1/netsurf/gtk/res/netsurf.glad...
==============================================================================
--- branches/1/netsurf/gtk/res/netsurf.glade (original)
+++ branches/1/netsurf/gtk/res/netsurf.glade Sun Aug 12 00:23:30 2007
@@ -1474,7 +1474,7 @@
<property name="title" translatable="yes">SSL certificate problem</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
+ <property name="modal">True</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="decorated">True</property>
@@ -1498,7 +1498,7 @@
<property name="layout_style">GTK_BUTTONBOX_END</property>
<child>
- <widget class="GtkButton" id="cancelbutton3">
+ <widget class="GtkButton" id="sslreject">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
@@ -1573,7 +1573,7 @@
</child>
<child>
- <widget class="GtkButton" id="okbutton3">
+ <widget class="GtkButton" id="sslaccept">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
@@ -1755,7 +1755,7 @@
<property name="left_margin">0</property>
<property name="right_margin">0</property>
<property name="indent">0</property>
- <property name="text" translatable="yes"></property>
+ <property name="text" translatable="yes">(not implemented)</property>
</widget>
</child>
</widget>
15 years, 5 months
r3508 rjek - /trunk/netsurf/gtk/gtk_gui.c
by netsurf@semichrome.net
Author: rjek
Date: Sun Aug 12 00:22:10 2007
New Revision: 3508
URL: http://source.netsurf-browser.org?rev=3508&view=rev
Log:
fix nsgtk ssl cert verify window
Modified:
trunk/netsurf/gtk/gtk_gui.c
Modified: trunk/netsurf/gtk/gtk_gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/gtk/gtk_gui.c?rev=3508&r1...
==============================================================================
--- trunk/netsurf/gtk/gtk_gui.c (original)
+++ trunk/netsurf/gtk/gtk_gui.c Sun Aug 12 00:22:10 2007
@@ -469,7 +469,7 @@
void **session = calloc(sizeof(void *), 4);
session[0] = bw;
- session[1] = c;
+ session[1] = strdup(c->url);
session[2] = x;
session[3] = wnd;
@@ -488,15 +488,16 @@
{
void **session = data;
struct browser_window *bw = session[0];
- struct content *c = session[1];
+ char *url = session[1];
GladeXML *x = session[2];
GtkWindow *wnd = session[3];
- urldb_set_cert_permissions(c->url, true);
- browser_window_go(bw, c->url, 0, true);
+ urldb_set_cert_permissions(url, true);
+ browser_window_go(bw, url, 0, true);
gtk_widget_destroy(GTK_WIDGET(wnd));
g_object_unref(G_OBJECT(x));
+ free(url);
free(session);
}
@@ -508,6 +509,7 @@
gtk_widget_destroy(GTK_WIDGET(wnd));
g_object_unref(G_OBJECT(x));
+ free(session[1]);
free(session);
}
15 years, 5 months
r3507 rjek - in /trunk/netsurf/gtk: gtk_gui.c res/netsurf.glade
by netsurf@semichrome.net
Author: rjek
Date: Sun Aug 12 00:14:33 2007
New Revision: 3507
URL: http://source.netsurf-browser.org?rev=3507&view=rev
Log:
Initial trivial (temp) implementation of nsgtk SSL cert window. Currently segfaults if you accept, however.
Modified:
trunk/netsurf/gtk/gtk_gui.c
trunk/netsurf/gtk/res/netsurf.glade
Modified: trunk/netsurf/gtk/gtk_gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/gtk/gtk_gui.c?rev=3507&r1...
==============================================================================
--- trunk/netsurf/gtk/gtk_gui.c (original)
+++ trunk/netsurf/gtk/gtk_gui.c Sun Aug 12 00:14:33 2007
@@ -77,6 +77,12 @@
GtkLabel *labelTooltip;
GtkDialog *wndOpenFile;
+static void nsgtk_create_ssl_verify_window(struct browser_window *bw,
+ struct content *c, const struct ssl_cert_info *certs,
+ unsigned long num);
+static void nsgtk_ssl_accept(GtkButton *w, gpointer data);
+static void nsgtk_ssl_reject(GtkButton *w, gpointer data);
+
/**
* Locate a shared resource file by searching known places in order.
*
@@ -450,14 +456,59 @@
void gui_cert_verify(struct browser_window *bw, struct content *c,
const struct ssl_cert_info *certs, unsigned long num)
{
-
- /* TODO: we should open a window showing what the certificate
- * problem is and offer the user the choice to reject it. Until
- * we do this, we just always accept them.
- * */
-
+ nsgtk_create_ssl_verify_window(bw, c, certs, num);
+}
+
+static void nsgtk_create_ssl_verify_window(struct browser_window *bw,
+ struct content *c, const struct ssl_cert_info *certs,
+ unsigned long num)
+{
+ GladeXML *x = glade_xml_new(glade_file_location, NULL, NULL);
+ GtkWindow *wnd = GTK_WINDOW(glade_xml_get_widget(x, "wndSSLProblem"));
+ GtkButton *accept, *reject;
+ void **session = calloc(sizeof(void *), 4);
+
+ session[0] = bw;
+ session[1] = c;
+ session[2] = x;
+ session[3] = wnd;
+
+ accept = GTK_BUTTON(glade_xml_get_widget(x, "sslaccept"));
+ reject = GTK_BUTTON(glade_xml_get_widget(x, "sslreject"));
+
+ g_signal_connect(G_OBJECT(accept), "clicked",
+ G_CALLBACK(nsgtk_ssl_accept), (gpointer)session);
+ g_signal_connect(G_OBJECT(reject), "clicked",
+ G_CALLBACK(nsgtk_ssl_reject), (gpointer)session);
+
+ gtk_widget_show(GTK_WIDGET(wnd));
+}
+
+static void nsgtk_ssl_accept(GtkButton *w, gpointer data)
+{
+ void **session = data;
+ struct browser_window *bw = session[0];
+ struct content *c = session[1];
+ GladeXML *x = session[2];
+ GtkWindow *wnd = session[3];
+
urldb_set_cert_permissions(c->url, true);
- browser_window_go(bw, c->url, 0, true);
+ browser_window_go(bw, c->url, 0, true);
+
+ gtk_widget_destroy(GTK_WIDGET(wnd));
+ g_object_unref(G_OBJECT(x));
+ free(session);
+}
+
+static void nsgtk_ssl_reject(GtkButton *w, gpointer data)
+{
+ void **session = data;
+ GladeXML *x = session[2];
+ GtkWindow *wnd = session[3];
+
+ gtk_widget_destroy(GTK_WIDGET(wnd));
+ g_object_unref(G_OBJECT(x));
+ free(session);
}
utf8_convert_ret utf8_to_local_encoding(const char *string, size_t len,
Modified: trunk/netsurf/gtk/res/netsurf.glade
URL: http://source.netsurf-browser.org/trunk/netsurf/gtk/res/netsurf.glade?rev...
==============================================================================
--- trunk/netsurf/gtk/res/netsurf.glade (original)
+++ trunk/netsurf/gtk/res/netsurf.glade Sun Aug 12 00:14:33 2007
@@ -1474,7 +1474,7 @@
<property name="title" translatable="yes">SSL certificate problem</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
+ <property name="modal">True</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="decorated">True</property>
@@ -1498,7 +1498,7 @@
<property name="layout_style">GTK_BUTTONBOX_END</property>
<child>
- <widget class="GtkButton" id="cancelbutton3">
+ <widget class="GtkButton" id="sslreject">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
@@ -1573,7 +1573,7 @@
</child>
<child>
- <widget class="GtkButton" id="okbutton3">
+ <widget class="GtkButton" id="sslaccept">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
@@ -1755,7 +1755,7 @@
<property name="left_margin">0</property>
<property name="right_margin">0</property>
<property name="indent">0</property>
- <property name="text" translatable="yes"></property>
+ <property name="text" translatable="yes">(not implemented)</property>
</widget>
</child>
</widget>
15 years, 5 months
r3506 jshaw - in /trunk/dom/test/xml/tests: nodeinsertbeforerefchildnull.xml nodelistindexgetlengthofemptylist.xml nodeparentnode.xml
by netsurf@semichrome.net
Author: jshaw
Date: Sun Aug 12 00:13:45 2007
New Revision: 3506
URL: http://source.netsurf-browser.org?rev=3506&view=rev
Log:
Import more W3C tests that compile successfully
Added:
trunk/dom/test/xml/tests/nodeinsertbeforerefchildnull.xml
trunk/dom/test/xml/tests/nodelistindexgetlengthofemptylist.xml
trunk/dom/test/xml/tests/nodeparentnode.xml
Added: trunk/dom/test/xml/tests/nodeinsertbeforerefchildnull.xml
URL: http://source.netsurf-browser.org/trunk/dom/test/xml/tests/nodeinsertbefo...
==============================================================================
--- trunk/dom/test/xml/tests/nodeinsertbeforerefchildnull.xml (added)
+++ trunk/dom/test/xml/tests/nodeinsertbeforerefchildnull.xml Sun Aug 12 00:13:45 2007
@@ -1,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+--><!DOCTYPE test SYSTEM "dom1.dtd">
+
+<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="nodeinsertbeforerefchildnull">
+<metadata>
+<title>nodeInsertBeforeRefChildNull</title>
+<creator>NIST</creator>
+<description>
+ If the "refChild" is null then the
+ "insertBefore(newChild,refChild)" method inserts the
+ node "newChild" at the end of the list of children.
+
+ Retrieve the second employee and invoke the
+ "insertBefore(newChild,refChild)" method with
+ refChild=null. Since "refChild" is null the "newChild"
+ should be added to the end of the list. The last item
+ in the list is checked after insertion. The last Element
+ node of the list should be "newChild".
+</description>
+<contributor>Mary Brady</contributor>
+<date qualifier="created">2001-08-17</date>
+<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-9522..."/>
+</metadata>
+<var name="doc" type="Document"/>
+<var name="elementList" type="NodeList"/>
+<var name="employeeNode" type="Node"/>
+<var name="childList" type="NodeList"/>
+<var name="refChild" type="Node" isNull="true"/>
+<var name="newChild" type="Node"/>
+<var name="child" type="Node"/>
+<var name="childName" type="DOMString"/>
+<var name="insertedNode" type="Node"/>
+<load var="doc" href="staff" willBeModified="true"/>
+<getElementsByTagName interface="Document" obj="doc" tagname=""employee"" var="elementList"/>
+<item interface="NodeList" obj="elementList" index="1" var="employeeNode"/>
+<childNodes obj="employeeNode" var="childList"/>
+<createElement obj="doc" tagName=""newChild"" var="newChild"/>
+<insertBefore var="insertedNode" obj="employeeNode" newChild="newChild" refChild="refChild"/>
+<lastChild interface="Node" obj="employeeNode" var="child"/>
+<nodeName obj="child" var="childName"/>
+<assertEquals actual="childName" expected=""newChild"" id="nodeInsertBeforeRefChildNullAssert1" ignoreCase="false"/>
+</test>
Added: trunk/dom/test/xml/tests/nodelistindexgetlengthofemptylist.xml
URL: http://source.netsurf-browser.org/trunk/dom/test/xml/tests/nodelistindexg...
==============================================================================
--- trunk/dom/test/xml/tests/nodelistindexgetlengthofemptylist.xml (added)
+++ trunk/dom/test/xml/tests/nodelistindexgetlengthofemptylist.xml Sun Aug 12 00:13:45 2007
@@ -1,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+--><!DOCTYPE test SYSTEM "dom1.dtd">
+
+<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="nodelistindexgetlengthofemptylist">
+<metadata>
+<title>nodelistIndexGetLengthOfEmptyList</title>
+<creator>NIST</creator>
+<description>
+ The "getLength()" method returns the number of nodes
+ in the list.(Test for EMPTY list)
+
+ Create a list of all the children of the Text node
+ inside the first child of the third employee and
+ invoke the "getLength()" method. It should contain
+ the value 0.
+</description>
+<contributor>Mary Brady</contributor>
+<date qualifier="created">2001-08-17</date>
+<!--length attribute -->
+<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-2035..."/>
+</metadata>
+<var name="doc" type="Document"/>
+<var name="elementList" type="NodeList"/>
+<var name="employeeNode" type="Node"/>
+<var name="employeeList" type="NodeList"/>
+<var name="childNode" type="Node"/>
+<var name="textNode" type="Node"/>
+<var name="textList" type="NodeList"/>
+<load var="doc" href="staff" willBeModified="false"/>
+<getElementsByTagName interface="Document" obj="doc" var="elementList" tagname=""employee""/>
+<item interface="NodeList" obj="elementList" var="employeeNode" index="2"/>
+<childNodes obj="employeeNode" var="employeeList"/>
+<item interface="NodeList" obj="employeeList" var="childNode" index="1"/>
+<firstChild interface="Node" obj="childNode" var="textNode"/>
+<childNodes obj="textNode" var="textList"/>
+<assertSize collection="textList" size="0" id="nodelistIndexGetLengthOfEmptyListAssert"/>
+</test>
Added: trunk/dom/test/xml/tests/nodeparentnode.xml
URL: http://source.netsurf-browser.org/trunk/dom/test/xml/tests/nodeparentnode...
==============================================================================
--- trunk/dom/test/xml/tests/nodeparentnode.xml (added)
+++ trunk/dom/test/xml/tests/nodeparentnode.xml Sun Aug 12 00:13:45 2007
@@ -1,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2001-2003 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+--><!DOCTYPE test SYSTEM "dom1.dtd">
+
+<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="nodeparentnode">
+<metadata>
+<title>nodeParentNode</title>
+<creator>NIST</creator>
+<description>
+ The "getParentNode()" method returns the parent
+ of this node.
+
+ Retrieve the second employee and invoke the
+ "getParentNode()" method on this node. It should
+ be set to "staff".
+</description>
+<contributor>Mary Brady</contributor>
+<date qualifier="created">2001-08-17</date>
+<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1060..."/>
+<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=251"/>
+</metadata>
+<var name="doc" type="Document"/>
+<var name="elementList" type="NodeList"/>
+<var name="employeeNode" type="Node"/>
+<var name="parentNode" type="Node"/>
+<var name="parentName" type="DOMString"/>
+<load var="doc" href="staff" willBeModified="false"/>
+<getElementsByTagName interface="Document" obj="doc" tagname=""employee"" var="elementList"/>
+<item interface="NodeList" obj="elementList" index="1" var="employeeNode"/>
+<parentNode interface="Node" obj="employeeNode" var="parentNode"/>
+<nodeName obj="parentNode" var="parentName"/>
+<if><contentType type="image/svg+xml"/>
+<assertEquals actual="parentName" expected='"svg"' id="svgTagName" ignoreCase="false"/>
+<else>
+<assertEquals actual="parentName" expected='"staff"' id="nodeParentNodeAssert1" ignoreCase="false"/>
+</else>
+</if>
+</test>
15 years, 5 months