netsurf-website: branch master updated. e1d9396a99a49c2c2a8d89d45be6961dce58753c
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf-website.git/shortlog/e1d9396a99a49...
...commit http://git.netsurf-browser.org/netsurf-website.git/commit/e1d9396a99a49c2...
...tree http://git.netsurf-browser.org/netsurf-website.git/tree/e1d9396a99a49c2c2...
The branch, master has been updated
via e1d9396a99a49c2c2a8d89d45be6961dce58753c (commit)
from ef77ef6f59d1437e7c16b3ebc6735add62933184 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf-website.git/commit/?id=e1d9396a99a...
commit e1d9396a99a49c2c2a8d89d45be6961dce58753c
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
improve downloads pages
improve main downloads page explanation text
GTK toolkit page uses gtk icon and lists flathub links
Haiku toolkit page updated to point at the haiku depot
diff --git a/downloads/beos/index.html b/downloads/beos/index.html
index 2fe1211..9f6cd72 100644
--- a/downloads/beos/index.html
+++ b/downloads/beos/index.html
@@ -61,31 +61,28 @@
</dl>
</div>
-<div class="downloadlatestouter">
-<div class="downloadlatest">
-<div class="downloadlatestbox">
-<p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/beos/3.8-n..."><span>NetSurf 3.8 for Haiku</span> <span>(11MB)</span> <span class="downloaddate">29 Aug 2018</span></a></p>
-<p class="downloadinstructions">Extract to boot and create symlink for Deskbar</p>
-<!--<p class="preul">Requires:</p>
-<ul>
-<li>Haiku</li>
-</ul>-->
-</div>
+<p>The current port for BeOS Haiku is incomplete but functional. Prebuilt editions are only available for Haiku from their depot Server.</p>
-<div class="downloadlatestbox downloadlast">
-<p class="downloadmain"><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.8-s..."><span>NetSurf 3.8 source code</span> <span>(3.9MB)</span> <span class="downloaddate">29 Aug 2018</span></a></p>
-<p class="downloadinstructions"><a href="/downloads/source/#BuildInstructions">Build instructions</a></p>
-<p class="preul">Build NetSurf for:</p>
-<ul>
-<li>Haiku</li>
-<li>BeOS</li>
-<li>Linux</li>
-<li>Free/NetBSD</li>
-<li>And more</li>
-</ul>
-</div>
-</div>
-<div class="arrow"></div>
+<div class="downloadlatestouter">
+ <div class="downloadlatest">
+ <div class="downloadlatestbox">
+ <p class="downloadmain downloadfirst"><a href="https://depot.haiku-os.org/#!/pkg/netsurf"><span>NetSurf 3.10 for Haiku</span> <span>(4.6MB)</span> <span class="downloaddate">29 Aug 2018</span></a></p>
+ </div>
+
+ <div class="downloadlatestbox downloadlast">
+ <p class="downloadmain"><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-..."><span>NetSurf 3.10 source code</span> <span>(8.5MB)</span> <span class="downloaddate">24 May 2020</span></a></p>
+ <p class="downloadinstructions"><a href="/downloads/source/#BuildInstructions">Build instructions</a></p>
+ <p class="preul">Build NetSurf for:</p>
+ <ul>
+ <li>Haiku</li>
+ <li>BeOS</li>
+ <li>Linux</li>
+ <li>Free/NetBSD</li>
+ <li>And more</li>
+ </ul>
+ </div>
+ </div>
+ <div class="arrow"></div>
</div>
<p>Check out the <a href="http://download.netsurf-browser.org/netsurf/releases/ChangeLog.txt">change log</a> to see what's changed since the last release.</p>
@@ -94,10 +91,27 @@
<h2>Previous releases</h2>
<dl>
+<dt>NetSurf 3.9</dt>
+<dd>
+<ul>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.9-s...">NetSurf 3.9 source code</a> (18 Jul 2019)</li>
+</ul>
+</dd>
+<dt>NetSurf 3.8</dt>
+<dd>
+<ul>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.8-s...">NetSurf 3.8 source code</a> (29 Aug 2018)</li>
+</ul>
+</dd>
+<dt>NetSurf 3.7</dt>
+<dd>
+<ul>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.7-s...">NetSurf 3.7 source code</a> (20 Oct 2017)</li>
+</ul>
+</dd>
<dt>NetSurf 3.6</dt>
<dd>
<ul>
-<li><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/beos/3.6-n...">NetSurf 3.6 browser for Haiku</a> (19 Nov 2016)</li>
<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.6-s...">NetSurf 3.6 source code</a> (19 Nov 2016)</li>
</ul>
</dd>
@@ -116,7 +130,7 @@
<div class="footer">
-<p>Copyright 2003 - 2009 The NetSurf Developers</p>
+<p>Copyright 2003 - 2020 The NetSurf Developers</p>
</div>
</div>
diff --git a/downloads/gtk/index.html b/downloads/gtk/index.html
index e7579d5..337c243 100644
--- a/downloads/gtk/index.html
+++ b/downloads/gtk/index.html
@@ -61,67 +61,55 @@
</dl>
</div>
-<p>NetSurf's GTK front end works on systems that provive a Unix-like environment, such as Linux, FreeBSD, NetBSD, Solaris and others. If your distribution packages NetSurf, you can use that. Otherwise you can download and build the source code.</p>
+<p>The Netsurf <a href="https://www.gtk.org/">GTK toolkit</a> front
+end is targeted at systems that provive a Unix-like environment, such
+as Linux, OpenBSD, FreeBSD, NetBSD, Solaris and similar.</p>
-<div class="downloadlatestouter">
-<div class="downloadlatest">
-<div class="downloadlatestbox downloadlast">
-<p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-..."><span>NetSurf 3.10 source code</span> <span>(8.0MB)</span> <span class="downloaddate">24 May 2020</span></a></p>
-<p class="downloadinstructions"><a href="/downloads/source/#BuildInstructions">Build instructions</a></p>
-<p class="preul">Build NetSurf for:</p>
-<ul>
-<li>Linux</li>
-<li>Free/NetBSD</li>
-<li>Solaris</li>
-<li>RISC OS</li>
-<li>And more</li>
-</ul>
-</div>
-</div>
-<div class="arrow"></div>
-</div>
+<p>By default GTK version 3 is used but version 2 can be used if desired.</p>
-<p>Check out the <a href="http://download.netsurf-browser.org/netsurf/releases/ChangeLog.txt">change log</a> to see what's changed since the last release.</p>
+<p>Some operating systems include NetSurf such as
+<a href="https://tracker.debian.org/pkg/netsurf">Debian packages</a>
+and <a href="https://openports.se/www/netsurf/browser">OpenBSD
+ports</a>. If these are up to date then they are probably the best to
+use.</p>
-<h2>Packages</h2>
-<p>We provide packages for installation of NetSurf releases on various systems.</p>
+<p>A <a href="https://github.com/flathub/org.netsurf_browser.NetSurf">flatpak</a> is available.</p>
-<dl class="packagelist">
-<dt>NetSurf 2.7</dt>
-<dd>
-<ul>
-<li><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/debian/squ...">Debian Squeeze AMD64 package</a></li>
-</ul>
-</dd>
-</dl>
+<p>If none of these options are suitable a build from source will be necessary.</p>
-<!--h2>Externally Hosted Packages</h2>
+<div class="downloadlatestouter">
+ <div class="downloadlatest">
+ <div class="downloadlatestbox downloadlast">
+ <p class="downloadmain downloadfirst"><a href="https://flathub.org/apps/details/org.netsurf_browser.NetSurf"><span>NetSurf on Flathub</span></a> <a href="https://flathub.org/repo/appstream/org.netsurf_browser.NetSurf.flatpakref"><span>Install</span></a> <span class="downloaddate">24 May 2020</span></p>
+ <p class="preul">Some of the distributions available for <a href="https://flatpak.org/setup/">flatpak</a>:</p>
+ <ul>
+ <li>Ubuntu</li>
+ <li>Fedora</li>
+ <li>Endless</li>
+ <li>ChromeOS</li>
+ <li>Redhat</li>
+ </ul>
+ </div>
+ </div>
-<p>NetSurf is available in some distributions' package repositories.</p>
+ <div class="downloadlatestbox downloadlast">
+ <p class="downloadmain"><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-..."><span>NetSurf 3.10 source code</span> <span>(8.5MB)</span> <span class="downloaddate">24 May 2020</span></a></p>
+ <p class="downloadinstructions"><a href="/downloads/source/#BuildInstructions">Build instructions</a></p>
+ <p class="preul">Build NetSurf for:</p>
+ <ul>
+ <li>Linux</li>
+ <li>Free/NetBSD</li>
+ <li>Solaris</li>
+ <li>RISC OS</li>
+ <li>And more</li>
+ </ul>
+ </div>
+ </div>
+ <div class="arrow"></div>
+</div>
+
+<p>Check out the <a href="http://download.netsurf-browser.org/netsurf/releases/ChangeLog.txt">change log</a> to see what's changed since the last release.</p>
-<dl>
-<dt>Debian</dt>
-<dd><ul>
-<li><a href="http://packages.debian.org/lenny/netsurf">Debian Lenny</a></li>
-<li><a href="http://packages.debian.org/sid/netsurf">Debian Sid</a></li>
-</ul></dd>
-<dt>Ubuntu</dt>
-<dd><ul>
-<li><a href="https://launchpad.net/ubuntu/hardy/+source/netsurf">Ubuntu 8.04 (Hardy)</a></li>
-</ul></dd>
-<dt>NetBSD Packages Collection (pkgsrc)</dt>
-<dd><ul>
-<li><a href="http://pkgsrc.se/wip/netsurf">NetBSD and others</a></li>
-</ul></dd>
-<dt>Slackware</dt>
-<dd><ul>
-<li><a href="http://www.slacky.eu/index.php?option=com_content&task=view&id=77...">Slacky - The Italian Slackware Community</a></li>
-</ul></dd>
-<dt>Puppy Linux</dt>
-<dd><ul>
-<li><a href="http://distro.ibiblio.org/pub/linux/distributions/puppylinux/pet_packages-4/">Puppy Linux</a></li>
-</ul></dd>
-</dl>-->
<h2>Previous releases</h2>
<dl>
@@ -249,13 +237,13 @@
<h2>Framebuffer NetSurf</h2>
-<p>There are actually two versions of NetSurf available for Unix-like systems. In addition to the GTK front end, which is for normal desktop usage, there is a framebuffer front end for NetSurf which requires no windowing environment or GUI toolkits. It currently supports the Linux framebuffer and ABLE's framebuffer.</p>
+<p>There are actually two versions of NetSurf available for Unix-like systems. In addition to the GTK front end, which is for normal desktop usage, there is a framebuffer front end for NetSurf which requires no windowing environment or GUI toolkits. It currently supports SDLv1.</p>
<p>Please obtain the <a href="/downloads/source/">latest source</a>, if you want to play with the framebuffer build.</p>
<div class="footer">
-<p>Copyright 2003 - 2016 The NetSurf Developers</p>
+<p>Copyright 2003 - 2020 The NetSurf Developers</p>
</div>
</div>
diff --git a/downloads/index.html b/downloads/index.html
index 9fd1bb9..c3daaa9 100644
--- a/downloads/index.html
+++ b/downloads/index.html
@@ -54,11 +54,19 @@
<h1>NetSurf Downloads</h1>
-<p>Download NetSurf for your operating system:</p>
+<p>The NetSurf project provides prebuilt software for several toolkits
+while some are provided by other organisations.</p>
+
+<p>NetSurf supports several windowing toolkits, some of these toolkits
+are synonymous with their operating system like RISC OS while others
+like GTK can be built on many operating systems.</p>
+
+<p>Please select the appropriate toolkit or Operating system for
+additional details:</p>
<ul class="downloadosselection">
<li class="riscos"><a href="riscos/">RISC OS</a></li>
-<li class="gtk"><a href="gtk/">Linux and other Unix-likes</a></li>
+<li class="gtk"><a href="gtk/">GTK for Linux and other Unix-likes</a></li>
<li class="beos"><a href="beos/">Haiku & BeOS</a></li>
<li class="amiga"><a href="amiga/">AmigaOS</a></li>
<li class="windows"><a href="windows/">Windows</a></li>
diff --git a/downloads/riscos/index.html b/downloads/riscos/index.html
index 7d5dedd..94a2968 100644
--- a/downloads/riscos/index.html
+++ b/downloads/riscos/index.html
@@ -62,39 +62,39 @@
</div>
<div class="downloadlatestouter">
-<div class="downloadlatest">
-<div class="downloadlatestbox">
-<p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/riscos/net..."><span>NetSurf 3.10 for RISC OS</span> <span>(4.0MB)</span> <span class="downloaddate">24 May 2020</span></a></p>
-<p class="downloadinstructions"><a href="/documentation/roinfo#GettingStartedInstallation">Installation instructions</a></p>
-<p class="preul">Binary download includes:</p>
-<ul>
-<li><a href="http://sudden.recoil.org/others/">AcornURI</a></li>
-<li><a href="/projects/iconv/">Iconv</a></li>
-<li><a href="http://www.riscos.info/downloads/gccsdk/sharedunixlib/system.zip">SharedUnixLibrary</a></li>
-<li><a href="/projects/tinct/">Tinct</a></li>
-</ul>
-<p class="preul">Requires either:</p>
-<ul>
-<li>RISC OS 6; any version</li>
-<li>RISC OS 5.07 or later</li>
-<li>RISC OS 4.02 or later</li>
-</ul>
-</div>
+ <div class="downloadlatest">
+ <div class="downloadlatestbox">
+ <p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/riscos/net..."><span>NetSurf 3.10 for RISC OS</span> <span>(4.0MB)</span> <span class="downloaddate">24 May 2020</span></a></p>
+ <p class="downloadinstructions"><a href="/documentation/roinfo#GettingStartedInstallation">Installation instructions</a></p>
+ <p class="preul">Binary download includes:</p>
+ <ul>
+ <li><a href="http://sudden.recoil.org/others/">AcornURI</a></li>
+ <li><a href="/projects/iconv/">Iconv</a></li>
+ <li><a href="http://www.riscos.info/downloads/gccsdk/sharedunixlib/system.zip">SharedUnixLibrary</a></li>
+ <li><a href="/projects/tinct/">Tinct</a></li>
+ </ul>
+ <p class="preul">Requires either:</p>
+ <ul>
+ <li>RISC OS 6; any version</li>
+ <li>RISC OS 5.07 or later</li>
+ <li>RISC OS 4.02 or later</li>
+ </ul>
+ </div>
-<div class="downloadlatestbox downloadlast">
-<p class="downloadmain"><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.10-..."><span>NetSurf 3.10 source code</span> <span>(3.9MB)</span> <span class="downloaddate">24 May 2020</span></a></p>
-<p class="downloadinstructions"><a href="/downloads/source/#BuildInstructions">Build instructions</a></p>
-<p class="preul">Build NetSurf for:</p>
-<ul>
-<li>RISC OS</li>
-<li>Linux</li>
-<li>Free/NetBSD</li>
-<li>Solaris</li>
-<li>And more</li>
-</ul>
-</div>
-</div>
-<div class="arrow"></div>
+ <div class="downloadlatestbox downloadlast">
+ <p class="downloadmain"><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-..."><span>NetSurf 3.10 source code</span> <span>(8.5MB)</span> <span class="downloaddate">24 May 2020</span></a></p>
+ <p class="downloadinstructions"><a href="/downloads/source/#BuildInstructions">Build instructions</a></p>
+ <p class="preul">Build NetSurf for:</p>
+ <ul>
+ <li>RISC OS</li>
+ <li>Linux</li>
+ <li>Free/NetBSD</li>
+ <li>Solaris</li>
+ <li>And more</li>
+ </ul>
+ </div>
+ </div>
+ <div class="arrow"></div>
</div>
<p>Check out the <a href="http://download.netsurf-browser.org/netsurf/releases/ChangeLog.txt">change log</a> to see what's changed since the last release.</p>
diff --git a/index.html b/index.html
index 4175dec..6b33e75 100644
--- a/index.html
+++ b/index.html
@@ -131,9 +131,7 @@
<div class="downloadcontent">
<h2 id="downloadrelease"><a href="/downloads/">Download NetSurf 3.10</a></h2>
<ul>
-<li><a href="/downloads/riscos/">For RISC OS</a></li>
-<li><a href="/downloads/gtk/">For Linux</a></li>
-<li><a href="/downloads/">Other systems</a></li>
+<li><a href="/downloads/">Prebuilt packages</a></li>
<li><a href="/downloads/source/">Source code</a></li>
</ul>
</div>
diff --git a/netsurf.css b/netsurf.css
index c869a48..634cf35 100644
--- a/netsurf.css
+++ b/netsurf.css
@@ -525,7 +525,7 @@ p.award a img {
background: url("webimages/dlriscos.png") no-repeat 0% 50%; }
.downloadosselection li.gtk a {
- background: url("webimages/dllinux.png") no-repeat 0% 50%; }
+ background: url("webimages/dlgtk.png") no-repeat 0% 50%; }
.downloadosselection li.beos a {
background: url("webimages/dlhaiku.png") no-repeat 0% 50%; }
diff --git a/webimages/dlgtk.png b/webimages/dlgtk.png
new file mode 100644
index 0000000..30f9e2a
Binary files /dev/null and b/webimages/dlgtk.png differ
-----------------------------------------------------------------------
Summary of changes:
downloads/beos/index.html | 66 +++++++++++++++++-----------
downloads/gtk/index.html | 100 +++++++++++++++++++------------------------
downloads/index.html | 12 +++++-
downloads/riscos/index.html | 64 +++++++++++++--------------
index.html | 4 +-
netsurf.css | 2 +-
webimages/dlgtk.png | Bin 0 -> 12920 bytes
7 files changed, 128 insertions(+), 120 deletions(-)
create mode 100644 webimages/dlgtk.png
diff --git a/downloads/beos/index.html b/downloads/beos/index.html
index 2fe1211..9f6cd72 100644
--- a/downloads/beos/index.html
+++ b/downloads/beos/index.html
@@ -61,31 +61,28 @@
</dl>
</div>
-<div class="downloadlatestouter">
-<div class="downloadlatest">
-<div class="downloadlatestbox">
-<p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/beos/3.8-n..."><span>NetSurf 3.8 for Haiku</span> <span>(11MB)</span> <span class="downloaddate">29 Aug 2018</span></a></p>
-<p class="downloadinstructions">Extract to boot and create symlink for Deskbar</p>
-<!--<p class="preul">Requires:</p>
-<ul>
-<li>Haiku</li>
-</ul>-->
-</div>
+<p>The current port for BeOS Haiku is incomplete but functional. Prebuilt editions are only available for Haiku from their depot Server.</p>
-<div class="downloadlatestbox downloadlast">
-<p class="downloadmain"><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.8-s..."><span>NetSurf 3.8 source code</span> <span>(3.9MB)</span> <span class="downloaddate">29 Aug 2018</span></a></p>
-<p class="downloadinstructions"><a href="/downloads/source/#BuildInstructions">Build instructions</a></p>
-<p class="preul">Build NetSurf for:</p>
-<ul>
-<li>Haiku</li>
-<li>BeOS</li>
-<li>Linux</li>
-<li>Free/NetBSD</li>
-<li>And more</li>
-</ul>
-</div>
-</div>
-<div class="arrow"></div>
+<div class="downloadlatestouter">
+ <div class="downloadlatest">
+ <div class="downloadlatestbox">
+ <p class="downloadmain downloadfirst"><a href="https://depot.haiku-os.org/#!/pkg/netsurf"><span>NetSurf 3.10 for Haiku</span> <span>(4.6MB)</span> <span class="downloaddate">29 Aug 2018</span></a></p>
+ </div>
+
+ <div class="downloadlatestbox downloadlast">
+ <p class="downloadmain"><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-..."><span>NetSurf 3.10 source code</span> <span>(8.5MB)</span> <span class="downloaddate">24 May 2020</span></a></p>
+ <p class="downloadinstructions"><a href="/downloads/source/#BuildInstructions">Build instructions</a></p>
+ <p class="preul">Build NetSurf for:</p>
+ <ul>
+ <li>Haiku</li>
+ <li>BeOS</li>
+ <li>Linux</li>
+ <li>Free/NetBSD</li>
+ <li>And more</li>
+ </ul>
+ </div>
+ </div>
+ <div class="arrow"></div>
</div>
<p>Check out the <a href="http://download.netsurf-browser.org/netsurf/releases/ChangeLog.txt">change log</a> to see what's changed since the last release.</p>
@@ -94,10 +91,27 @@
<h2>Previous releases</h2>
<dl>
+<dt>NetSurf 3.9</dt>
+<dd>
+<ul>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.9-s...">NetSurf 3.9 source code</a> (18 Jul 2019)</li>
+</ul>
+</dd>
+<dt>NetSurf 3.8</dt>
+<dd>
+<ul>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.8-s...">NetSurf 3.8 source code</a> (29 Aug 2018)</li>
+</ul>
+</dd>
+<dt>NetSurf 3.7</dt>
+<dd>
+<ul>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.7-s...">NetSurf 3.7 source code</a> (20 Oct 2017)</li>
+</ul>
+</dd>
<dt>NetSurf 3.6</dt>
<dd>
<ul>
-<li><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/beos/3.6-n...">NetSurf 3.6 browser for Haiku</a> (19 Nov 2016)</li>
<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.6-s...">NetSurf 3.6 source code</a> (19 Nov 2016)</li>
</ul>
</dd>
@@ -116,7 +130,7 @@
<div class="footer">
-<p>Copyright 2003 - 2009 The NetSurf Developers</p>
+<p>Copyright 2003 - 2020 The NetSurf Developers</p>
</div>
</div>
diff --git a/downloads/gtk/index.html b/downloads/gtk/index.html
index e7579d5..337c243 100644
--- a/downloads/gtk/index.html
+++ b/downloads/gtk/index.html
@@ -61,67 +61,55 @@
</dl>
</div>
-<p>NetSurf's GTK front end works on systems that provive a Unix-like environment, such as Linux, FreeBSD, NetBSD, Solaris and others. If your distribution packages NetSurf, you can use that. Otherwise you can download and build the source code.</p>
+<p>The Netsurf <a href="https://www.gtk.org/">GTK toolkit</a> front
+end is targeted at systems that provive a Unix-like environment, such
+as Linux, OpenBSD, FreeBSD, NetBSD, Solaris and similar.</p>
-<div class="downloadlatestouter">
-<div class="downloadlatest">
-<div class="downloadlatestbox downloadlast">
-<p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-..."><span>NetSurf 3.10 source code</span> <span>(8.0MB)</span> <span class="downloaddate">24 May 2020</span></a></p>
-<p class="downloadinstructions"><a href="/downloads/source/#BuildInstructions">Build instructions</a></p>
-<p class="preul">Build NetSurf for:</p>
-<ul>
-<li>Linux</li>
-<li>Free/NetBSD</li>
-<li>Solaris</li>
-<li>RISC OS</li>
-<li>And more</li>
-</ul>
-</div>
-</div>
-<div class="arrow"></div>
-</div>
+<p>By default GTK version 3 is used but version 2 can be used if desired.</p>
-<p>Check out the <a href="http://download.netsurf-browser.org/netsurf/releases/ChangeLog.txt">change log</a> to see what's changed since the last release.</p>
+<p>Some operating systems include NetSurf such as
+<a href="https://tracker.debian.org/pkg/netsurf">Debian packages</a>
+and <a href="https://openports.se/www/netsurf/browser">OpenBSD
+ports</a>. If these are up to date then they are probably the best to
+use.</p>
-<h2>Packages</h2>
-<p>We provide packages for installation of NetSurf releases on various systems.</p>
+<p>A <a href="https://github.com/flathub/org.netsurf_browser.NetSurf">flatpak</a> is available.</p>
-<dl class="packagelist">
-<dt>NetSurf 2.7</dt>
-<dd>
-<ul>
-<li><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/debian/squ...">Debian Squeeze AMD64 package</a></li>
-</ul>
-</dd>
-</dl>
+<p>If none of these options are suitable a build from source will be necessary.</p>
-<!--h2>Externally Hosted Packages</h2>
+<div class="downloadlatestouter">
+ <div class="downloadlatest">
+ <div class="downloadlatestbox downloadlast">
+ <p class="downloadmain downloadfirst"><a href="https://flathub.org/apps/details/org.netsurf_browser.NetSurf"><span>NetSurf on Flathub</span></a> <a href="https://flathub.org/repo/appstream/org.netsurf_browser.NetSurf.flatpakref"><span>Install</span></a> <span class="downloaddate">24 May 2020</span></p>
+ <p class="preul">Some of the distributions available for <a href="https://flatpak.org/setup/">flatpak</a>:</p>
+ <ul>
+ <li>Ubuntu</li>
+ <li>Fedora</li>
+ <li>Endless</li>
+ <li>ChromeOS</li>
+ <li>Redhat</li>
+ </ul>
+ </div>
+ </div>
-<p>NetSurf is available in some distributions' package repositories.</p>
+ <div class="downloadlatestbox downloadlast">
+ <p class="downloadmain"><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-..."><span>NetSurf 3.10 source code</span> <span>(8.5MB)</span> <span class="downloaddate">24 May 2020</span></a></p>
+ <p class="downloadinstructions"><a href="/downloads/source/#BuildInstructions">Build instructions</a></p>
+ <p class="preul">Build NetSurf for:</p>
+ <ul>
+ <li>Linux</li>
+ <li>Free/NetBSD</li>
+ <li>Solaris</li>
+ <li>RISC OS</li>
+ <li>And more</li>
+ </ul>
+ </div>
+ </div>
+ <div class="arrow"></div>
+</div>
+
+<p>Check out the <a href="http://download.netsurf-browser.org/netsurf/releases/ChangeLog.txt">change log</a> to see what's changed since the last release.</p>
-<dl>
-<dt>Debian</dt>
-<dd><ul>
-<li><a href="http://packages.debian.org/lenny/netsurf">Debian Lenny</a></li>
-<li><a href="http://packages.debian.org/sid/netsurf">Debian Sid</a></li>
-</ul></dd>
-<dt>Ubuntu</dt>
-<dd><ul>
-<li><a href="https://launchpad.net/ubuntu/hardy/+source/netsurf">Ubuntu 8.04 (Hardy)</a></li>
-</ul></dd>
-<dt>NetBSD Packages Collection (pkgsrc)</dt>
-<dd><ul>
-<li><a href="http://pkgsrc.se/wip/netsurf">NetBSD and others</a></li>
-</ul></dd>
-<dt>Slackware</dt>
-<dd><ul>
-<li><a href="http://www.slacky.eu/index.php?option=com_content&task=view&id=77...">Slacky - The Italian Slackware Community</a></li>
-</ul></dd>
-<dt>Puppy Linux</dt>
-<dd><ul>
-<li><a href="http://distro.ibiblio.org/pub/linux/distributions/puppylinux/pet_packages-4/">Puppy Linux</a></li>
-</ul></dd>
-</dl>-->
<h2>Previous releases</h2>
<dl>
@@ -249,13 +237,13 @@
<h2>Framebuffer NetSurf</h2>
-<p>There are actually two versions of NetSurf available for Unix-like systems. In addition to the GTK front end, which is for normal desktop usage, there is a framebuffer front end for NetSurf which requires no windowing environment or GUI toolkits. It currently supports the Linux framebuffer and ABLE's framebuffer.</p>
+<p>There are actually two versions of NetSurf available for Unix-like systems. In addition to the GTK front end, which is for normal desktop usage, there is a framebuffer front end for NetSurf which requires no windowing environment or GUI toolkits. It currently supports SDLv1.</p>
<p>Please obtain the <a href="/downloads/source/">latest source</a>, if you want to play with the framebuffer build.</p>
<div class="footer">
-<p>Copyright 2003 - 2016 The NetSurf Developers</p>
+<p>Copyright 2003 - 2020 The NetSurf Developers</p>
</div>
</div>
diff --git a/downloads/index.html b/downloads/index.html
index 9fd1bb9..c3daaa9 100644
--- a/downloads/index.html
+++ b/downloads/index.html
@@ -54,11 +54,19 @@
<h1>NetSurf Downloads</h1>
-<p>Download NetSurf for your operating system:</p>
+<p>The NetSurf project provides prebuilt software for several toolkits
+while some are provided by other organisations.</p>
+
+<p>NetSurf supports several windowing toolkits, some of these toolkits
+are synonymous with their operating system like RISC OS while others
+like GTK can be built on many operating systems.</p>
+
+<p>Please select the appropriate toolkit or Operating system for
+additional details:</p>
<ul class="downloadosselection">
<li class="riscos"><a href="riscos/">RISC OS</a></li>
-<li class="gtk"><a href="gtk/">Linux and other Unix-likes</a></li>
+<li class="gtk"><a href="gtk/">GTK for Linux and other Unix-likes</a></li>
<li class="beos"><a href="beos/">Haiku & BeOS</a></li>
<li class="amiga"><a href="amiga/">AmigaOS</a></li>
<li class="windows"><a href="windows/">Windows</a></li>
diff --git a/downloads/riscos/index.html b/downloads/riscos/index.html
index 7d5dedd..94a2968 100644
--- a/downloads/riscos/index.html
+++ b/downloads/riscos/index.html
@@ -62,39 +62,39 @@
</div>
<div class="downloadlatestouter">
-<div class="downloadlatest">
-<div class="downloadlatestbox">
-<p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/riscos/net..."><span>NetSurf 3.10 for RISC OS</span> <span>(4.0MB)</span> <span class="downloaddate">24 May 2020</span></a></p>
-<p class="downloadinstructions"><a href="/documentation/roinfo#GettingStartedInstallation">Installation instructions</a></p>
-<p class="preul">Binary download includes:</p>
-<ul>
-<li><a href="http://sudden.recoil.org/others/">AcornURI</a></li>
-<li><a href="/projects/iconv/">Iconv</a></li>
-<li><a href="http://www.riscos.info/downloads/gccsdk/sharedunixlib/system.zip">SharedUnixLibrary</a></li>
-<li><a href="/projects/tinct/">Tinct</a></li>
-</ul>
-<p class="preul">Requires either:</p>
-<ul>
-<li>RISC OS 6; any version</li>
-<li>RISC OS 5.07 or later</li>
-<li>RISC OS 4.02 or later</li>
-</ul>
-</div>
+ <div class="downloadlatest">
+ <div class="downloadlatestbox">
+ <p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/riscos/net..."><span>NetSurf 3.10 for RISC OS</span> <span>(4.0MB)</span> <span class="downloaddate">24 May 2020</span></a></p>
+ <p class="downloadinstructions"><a href="/documentation/roinfo#GettingStartedInstallation">Installation instructions</a></p>
+ <p class="preul">Binary download includes:</p>
+ <ul>
+ <li><a href="http://sudden.recoil.org/others/">AcornURI</a></li>
+ <li><a href="/projects/iconv/">Iconv</a></li>
+ <li><a href="http://www.riscos.info/downloads/gccsdk/sharedunixlib/system.zip">SharedUnixLibrary</a></li>
+ <li><a href="/projects/tinct/">Tinct</a></li>
+ </ul>
+ <p class="preul">Requires either:</p>
+ <ul>
+ <li>RISC OS 6; any version</li>
+ <li>RISC OS 5.07 or later</li>
+ <li>RISC OS 4.02 or later</li>
+ </ul>
+ </div>
-<div class="downloadlatestbox downloadlast">
-<p class="downloadmain"><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.10-..."><span>NetSurf 3.10 source code</span> <span>(3.9MB)</span> <span class="downloaddate">24 May 2020</span></a></p>
-<p class="downloadinstructions"><a href="/downloads/source/#BuildInstructions">Build instructions</a></p>
-<p class="preul">Build NetSurf for:</p>
-<ul>
-<li>RISC OS</li>
-<li>Linux</li>
-<li>Free/NetBSD</li>
-<li>Solaris</li>
-<li>And more</li>
-</ul>
-</div>
-</div>
-<div class="arrow"></div>
+ <div class="downloadlatestbox downloadlast">
+ <p class="downloadmain"><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-..."><span>NetSurf 3.10 source code</span> <span>(8.5MB)</span> <span class="downloaddate">24 May 2020</span></a></p>
+ <p class="downloadinstructions"><a href="/downloads/source/#BuildInstructions">Build instructions</a></p>
+ <p class="preul">Build NetSurf for:</p>
+ <ul>
+ <li>RISC OS</li>
+ <li>Linux</li>
+ <li>Free/NetBSD</li>
+ <li>Solaris</li>
+ <li>And more</li>
+ </ul>
+ </div>
+ </div>
+ <div class="arrow"></div>
</div>
<p>Check out the <a href="http://download.netsurf-browser.org/netsurf/releases/ChangeLog.txt">change log</a> to see what's changed since the last release.</p>
diff --git a/index.html b/index.html
index 4175dec..6b33e75 100644
--- a/index.html
+++ b/index.html
@@ -131,9 +131,7 @@
<div class="downloadcontent">
<h2 id="downloadrelease"><a href="/downloads/">Download NetSurf 3.10</a></h2>
<ul>
-<li><a href="/downloads/riscos/">For RISC OS</a></li>
-<li><a href="/downloads/gtk/">For Linux</a></li>
-<li><a href="/downloads/">Other systems</a></li>
+<li><a href="/downloads/">Prebuilt packages</a></li>
<li><a href="/downloads/source/">Source code</a></li>
</ul>
</div>
diff --git a/netsurf.css b/netsurf.css
index c869a48..634cf35 100644
--- a/netsurf.css
+++ b/netsurf.css
@@ -525,7 +525,7 @@ p.award a img {
background: url("webimages/dlriscos.png") no-repeat 0% 50%; }
.downloadosselection li.gtk a {
- background: url("webimages/dllinux.png") no-repeat 0% 50%; }
+ background: url("webimages/dlgtk.png") no-repeat 0% 50%; }
.downloadosselection li.beos a {
background: url("webimages/dlhaiku.png") no-repeat 0% 50%; }
diff --git a/webimages/dlgtk.png b/webimages/dlgtk.png
new file mode 100644
index 0000000..30f9e2a
Binary files /dev/null and b/webimages/dlgtk.png differ
--
NetSurf website source for *.netsurf-browser.org
2 years, 9 months
netsurf-website: branch master updated. ef77ef6f59d1437e7c16b3ebc6735add62933184
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf-website.git/shortlog/ef77ef6f59d14...
...commit http://git.netsurf-browser.org/netsurf-website.git/commit/ef77ef6f59d1437...
...tree http://git.netsurf-browser.org/netsurf-website.git/tree/ef77ef6f59d1437e7...
The branch, master has been updated
via ef77ef6f59d1437e7c16b3ebc6735add62933184 (commit)
from 44febe319a2ac6b43e2fc1cae846c9da9e69ae79 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf-website.git/commit/?id=ef77ef6f59d...
commit ef77ef6f59d1437e7c16b3ebc6735add62933184
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
update gtk screenshots for 3.10 release
diff --git a/about/screenshots/images/gtk-bbc.png b/about/screenshots/images/gtk-bbc.png
deleted file mode 100644
index c8bba3c..0000000
Binary files a/about/screenshots/images/gtk-bbc.png and /dev/null differ
diff --git a/about/screenshots/images/gtk-netsurf.png b/about/screenshots/images/gtk-netsurf.png
deleted file mode 100644
index e410670..0000000
Binary files a/about/screenshots/images/gtk-netsurf.png and /dev/null differ
diff --git a/about/screenshots/images/gtk-wikipedia.png b/about/screenshots/images/gtk-wikipedia.png
deleted file mode 100644
index 0f531f5..0000000
Binary files a/about/screenshots/images/gtk-wikipedia.png and /dev/null differ
diff --git a/about/screenshots/images/gtk2-bbc.png b/about/screenshots/images/gtk2-bbc.png
new file mode 100644
index 0000000..c8bba3c
Binary files /dev/null and b/about/screenshots/images/gtk2-bbc.png differ
diff --git a/about/screenshots/images/gtk2-netsurf.png b/about/screenshots/images/gtk2-netsurf.png
new file mode 100644
index 0000000..cad956a
Binary files /dev/null and b/about/screenshots/images/gtk2-netsurf.png differ
diff --git a/about/screenshots/images/gtk2-wikipedia.png b/about/screenshots/images/gtk2-wikipedia.png
new file mode 100644
index 0000000..0c6efe7
Binary files /dev/null and b/about/screenshots/images/gtk2-wikipedia.png differ
diff --git a/about/screenshots/images/gtk2thumb-bbc.png b/about/screenshots/images/gtk2thumb-bbc.png
new file mode 100644
index 0000000..09152d4
Binary files /dev/null and b/about/screenshots/images/gtk2thumb-bbc.png differ
diff --git a/about/screenshots/images/gtk2thumb-netsurf.png b/about/screenshots/images/gtk2thumb-netsurf.png
new file mode 100644
index 0000000..31f10b1
Binary files /dev/null and b/about/screenshots/images/gtk2thumb-netsurf.png differ
diff --git a/about/screenshots/images/gtk2thumb-wikipedia.png b/about/screenshots/images/gtk2thumb-wikipedia.png
new file mode 100644
index 0000000..74523c4
Binary files /dev/null and b/about/screenshots/images/gtk2thumb-wikipedia.png differ
diff --git a/about/screenshots/images/gtk3-netsurf.png b/about/screenshots/images/gtk3-netsurf.png
new file mode 100644
index 0000000..7241e33
Binary files /dev/null and b/about/screenshots/images/gtk3-netsurf.png differ
diff --git a/about/screenshots/images/gtk3-wikipedia.png b/about/screenshots/images/gtk3-wikipedia.png
new file mode 100644
index 0000000..2dc419e
Binary files /dev/null and b/about/screenshots/images/gtk3-wikipedia.png differ
diff --git a/about/screenshots/images/gtkthumb-bbc.png b/about/screenshots/images/gtkthumb-bbc.png
deleted file mode 100644
index 09152d4..0000000
Binary files a/about/screenshots/images/gtkthumb-bbc.png and /dev/null differ
diff --git a/about/screenshots/images/gtkthumb-netsurf.png b/about/screenshots/images/gtkthumb-netsurf.png
deleted file mode 100644
index 4384f86..0000000
Binary files a/about/screenshots/images/gtkthumb-netsurf.png and /dev/null differ
diff --git a/about/screenshots/images/gtkthumb-wikipedia.png b/about/screenshots/images/gtkthumb-wikipedia.png
deleted file mode 100644
index 846a4af..0000000
Binary files a/about/screenshots/images/gtkthumb-wikipedia.png and /dev/null differ
diff --git a/about/screenshots/index.html b/about/screenshots/index.html
index 500536c..0c4895c 100644
--- a/about/screenshots/index.html
+++ b/about/screenshots/index.html
@@ -82,9 +82,9 @@
<h2 id="gtk">GTK (e.g. Linux, BSDs, etc...)</h2>
<ul class="screenshotgallery">
-<li><a href="images/gtk-bbc.png"><img alt="" src="images/gtkthumb-bbc.png"></a> <span><a href="http://www.bbc.co.uk/">BBC</a></span></li>
-<li><a href="images/gtk-netsurf.png"><img alt="" src="images/gtkthumb-netsurf.png"></a> <span><a href="http://www.netsurf-browser.org/">NetSurf</a></span></li>
-<li><a href="images/gtk-wikipedia.png"><img alt="" src="images/gtkthumb-wikipedia.png"></a> <span><a href="http://en.wikipedia.org/wiki/Main_Page">Wikipedia</a></span></li>
+<li><a href="images/gtk2-bbc.png"><img alt="" src="images/gtk2thumb-bbc.png"></a> <span><a href="http://www.bbc.co.uk/">BBC</a></span></li>
+<li><a href="images/gtk2-netsurf.png"><img alt="" src="images/gtk2thumb-netsurf.png"></a> <span><a href="http://www.netsurf-browser.org/">NetSurf</a></span></li>
+<li><a href="images/gtk2-wikipedia.png"><img alt="" src="images/gtk2thumb-wikipedia.png"></a> <span><a href="http://en.wikipedia.org/wiki/Main_Page">Wikipedia</a></span></li>
</ul>
<h2 id="amigaos">AmigaOS 4</h2>
-----------------------------------------------------------------------
Summary of changes:
about/screenshots/images/gtk-netsurf.png | Bin 250449 -> 0 bytes
about/screenshots/images/gtk-wikipedia.png | Bin 273316 -> 0 bytes
about/screenshots/images/{gtk-bbc.png => gtk2-bbc.png} | Bin 409398 -> 409398 bytes
about/screenshots/images/gtk2-netsurf.png | Bin 0 -> 256737 bytes
about/screenshots/images/gtk2-wikipedia.png | Bin 0 -> 306523 bytes
about/screenshots/images/{gtkthumb-bbc.png => gtk2thumb-bbc.png} | Bin 48981 -> 48981 bytes
about/screenshots/images/gtk2thumb-netsurf.png | Bin 0 -> 56526 bytes
about/screenshots/images/gtk2thumb-wikipedia.png | Bin 0 -> 53980 bytes
about/screenshots/images/gtk3-netsurf.png | Bin 0 -> 327592 bytes
about/screenshots/images/gtk3-wikipedia.png | Bin 0 -> 302947 bytes
about/screenshots/images/gtkthumb-netsurf.png | Bin 45702 -> 0 bytes
about/screenshots/images/gtkthumb-wikipedia.png | Bin 49689 -> 0 bytes
about/screenshots/index.html | 6 +++---
13 files changed, 3 insertions(+), 3 deletions(-)
delete mode 100644 about/screenshots/images/gtk-netsurf.png
delete mode 100644 about/screenshots/images/gtk-wikipedia.png
rename about/screenshots/images/{gtk-bbc.png => gtk2-bbc.png} (100%)
create mode 100644 about/screenshots/images/gtk2-netsurf.png
create mode 100644 about/screenshots/images/gtk2-wikipedia.png
rename about/screenshots/images/{gtkthumb-bbc.png => gtk2thumb-bbc.png} (100%)
create mode 100644 about/screenshots/images/gtk2thumb-netsurf.png
create mode 100644 about/screenshots/images/gtk2thumb-wikipedia.png
create mode 100644 about/screenshots/images/gtk3-netsurf.png
create mode 100644 about/screenshots/images/gtk3-wikipedia.png
delete mode 100644 about/screenshots/images/gtkthumb-netsurf.png
delete mode 100644 about/screenshots/images/gtkthumb-wikipedia.png
diff --git a/about/screenshots/images/gtk-netsurf.png b/about/screenshots/images/gtk-netsurf.png
deleted file mode 100644
index e410670..0000000
Binary files a/about/screenshots/images/gtk-netsurf.png and /dev/null differ
diff --git a/about/screenshots/images/gtk-wikipedia.png b/about/screenshots/images/gtk-wikipedia.png
deleted file mode 100644
index 0f531f5..0000000
Binary files a/about/screenshots/images/gtk-wikipedia.png and /dev/null differ
diff --git a/about/screenshots/images/gtk-bbc.png b/about/screenshots/images/gtk2-bbc.png
similarity index 100%
rename from about/screenshots/images/gtk-bbc.png
rename to about/screenshots/images/gtk2-bbc.png
diff --git a/about/screenshots/images/gtk2-netsurf.png b/about/screenshots/images/gtk2-netsurf.png
new file mode 100644
index 0000000..cad956a
Binary files /dev/null and b/about/screenshots/images/gtk2-netsurf.png differ
diff --git a/about/screenshots/images/gtk2-wikipedia.png b/about/screenshots/images/gtk2-wikipedia.png
new file mode 100644
index 0000000..0c6efe7
Binary files /dev/null and b/about/screenshots/images/gtk2-wikipedia.png differ
diff --git a/about/screenshots/images/gtkthumb-bbc.png b/about/screenshots/images/gtk2thumb-bbc.png
similarity index 100%
rename from about/screenshots/images/gtkthumb-bbc.png
rename to about/screenshots/images/gtk2thumb-bbc.png
diff --git a/about/screenshots/images/gtk2thumb-netsurf.png b/about/screenshots/images/gtk2thumb-netsurf.png
new file mode 100644
index 0000000..31f10b1
Binary files /dev/null and b/about/screenshots/images/gtk2thumb-netsurf.png differ
diff --git a/about/screenshots/images/gtk2thumb-wikipedia.png b/about/screenshots/images/gtk2thumb-wikipedia.png
new file mode 100644
index 0000000..74523c4
Binary files /dev/null and b/about/screenshots/images/gtk2thumb-wikipedia.png differ
diff --git a/about/screenshots/images/gtk3-netsurf.png b/about/screenshots/images/gtk3-netsurf.png
new file mode 100644
index 0000000..7241e33
Binary files /dev/null and b/about/screenshots/images/gtk3-netsurf.png differ
diff --git a/about/screenshots/images/gtk3-wikipedia.png b/about/screenshots/images/gtk3-wikipedia.png
new file mode 100644
index 0000000..2dc419e
Binary files /dev/null and b/about/screenshots/images/gtk3-wikipedia.png differ
diff --git a/about/screenshots/images/gtkthumb-netsurf.png b/about/screenshots/images/gtkthumb-netsurf.png
deleted file mode 100644
index 4384f86..0000000
Binary files a/about/screenshots/images/gtkthumb-netsurf.png and /dev/null differ
diff --git a/about/screenshots/images/gtkthumb-wikipedia.png b/about/screenshots/images/gtkthumb-wikipedia.png
deleted file mode 100644
index 846a4af..0000000
Binary files a/about/screenshots/images/gtkthumb-wikipedia.png and /dev/null differ
diff --git a/about/screenshots/index.html b/about/screenshots/index.html
index 500536c..0c4895c 100644
--- a/about/screenshots/index.html
+++ b/about/screenshots/index.html
@@ -82,9 +82,9 @@
<h2 id="gtk">GTK (e.g. Linux, BSDs, etc...)</h2>
<ul class="screenshotgallery">
-<li><a href="images/gtk-bbc.png"><img alt="" src="images/gtkthumb-bbc.png"></a> <span><a href="http://www.bbc.co.uk/">BBC</a></span></li>
-<li><a href="images/gtk-netsurf.png"><img alt="" src="images/gtkthumb-netsurf.png"></a> <span><a href="http://www.netsurf-browser.org/">NetSurf</a></span></li>
-<li><a href="images/gtk-wikipedia.png"><img alt="" src="images/gtkthumb-wikipedia.png"></a> <span><a href="http://en.wikipedia.org/wiki/Main_Page">Wikipedia</a></span></li>
+<li><a href="images/gtk2-bbc.png"><img alt="" src="images/gtk2thumb-bbc.png"></a> <span><a href="http://www.bbc.co.uk/">BBC</a></span></li>
+<li><a href="images/gtk2-netsurf.png"><img alt="" src="images/gtk2thumb-netsurf.png"></a> <span><a href="http://www.netsurf-browser.org/">NetSurf</a></span></li>
+<li><a href="images/gtk2-wikipedia.png"><img alt="" src="images/gtk2thumb-wikipedia.png"></a> <span><a href="http://en.wikipedia.org/wiki/Main_Page">Wikipedia</a></span></li>
</ul>
<h2 id="amigaos">AmigaOS 4</h2>
--
NetSurf website source for *.netsurf-browser.org
2 years, 9 months
netsurf-wiki: branch master updated. cc5abbb2532b4f1bebb8ca05ec74caae75401871
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf-wiki.git/shortlog/cc5abbb2532b4f1b...
...commit http://git.netsurf-browser.org/netsurf-wiki.git/commit/cc5abbb2532b4f1beb...
...tree http://git.netsurf-browser.org/netsurf-wiki.git/tree/cc5abbb2532b4f1bebb8...
The branch, master has been updated
via cc5abbb2532b4f1bebb8ca05ec74caae75401871 (commit)
from 916ac380e9931dc85627c7a5b34b6af1c8e8aa86 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf-wiki.git/commit/?id=cc5abbb2532b4f...
commit cc5abbb2532b4f1bebb8ca05ec74caae75401871
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
docuemnt what I did
diff --git a/developer-weekend/may-2020.mdwn b/developer-weekend/may-2020.mdwn
index 5f40f1a..3764c95 100644
--- a/developer-weekend/may-2020.mdwn
+++ b/developer-weekend/may-2020.mdwn
@@ -37,7 +37,7 @@ Outstanding work (from Feb)
Pathway to 3.10
===============
-* Complete RISC OS frontend support for pageinfo core window **DONE**
+* Complete RISC OS frontend support for pageinfo core window (vince) **DONE**
* Add url to about:query/ssl to launch cert viewer (the link needs _blank) (Daniel) **DONE**
* excise sslcert_viewer entirely (Daniel) **DONE**
* Monkey doesn't need it, excise from farmer and driver **DONE**
@@ -299,7 +299,13 @@ Daniel
Vince
-----
-*
+* Clean up text selection code
+* Implemenmt page infor core window for RISC OS
+* fix core window implementation incorrectly (re)opening windows on resize
+* fix [[!bug 2753]] and [[!bug 2762]]
+* Update release process on wiki
+* Release 3.10
+* Update issue tracker for release
Statement of work
=================
-----------------------------------------------------------------------
Summary of changes:
developer-weekend/may-2020.mdwn | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/developer-weekend/may-2020.mdwn b/developer-weekend/may-2020.mdwn
index 5f40f1a..3764c95 100644
--- a/developer-weekend/may-2020.mdwn
+++ b/developer-weekend/may-2020.mdwn
@@ -37,7 +37,7 @@ Outstanding work (from Feb)
Pathway to 3.10
===============
-* Complete RISC OS frontend support for pageinfo core window **DONE**
+* Complete RISC OS frontend support for pageinfo core window (vince) **DONE**
* Add url to about:query/ssl to launch cert viewer (the link needs _blank) (Daniel) **DONE**
* excise sslcert_viewer entirely (Daniel) **DONE**
* Monkey doesn't need it, excise from farmer and driver **DONE**
@@ -299,7 +299,13 @@ Daniel
Vince
-----
-*
+* Clean up text selection code
+* Implemenmt page infor core window for RISC OS
+* fix core window implementation incorrectly (re)opening windows on resize
+* fix [[!bug 2753]] and [[!bug 2762]]
+* Update release process on wiki
+* Release 3.10
+* Update issue tracker for release
Statement of work
=================
--
NetSurf Developer Wiki Backing Store
2 years, 9 months
netsurf: branch master updated. release/3.10-15-ged84f7a
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/ed84f7a0188d8c983db4a...
...commit http://git.netsurf-browser.org/netsurf.git/commit/ed84f7a0188d8c983db4a18...
...tree http://git.netsurf-browser.org/netsurf.git/tree/ed84f7a0188d8c983db4a186b...
The branch, master has been updated
via ed84f7a0188d8c983db4a186b1240d955ee08705 (commit)
from 68f1b41bf0c62b79a95c4547194bf7bde535de47 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=ed84f7a0188d8c983db...
commit ed84f7a0188d8c983db4a186b1240d955ee08705
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Amiga: avoid read from NULL pointer
diff --git a/frontends/amiga/font_bullet.c b/frontends/amiga/font_bullet.c
index 6283a1f..dec39a1 100644
--- a/frontends/amiga/font_bullet.c
+++ b/frontends/amiga/font_bullet.c
@@ -349,6 +349,11 @@ static nserror amiga_nsfont_split(const plot_font_style_t *fstyle,
*/
static struct ami_font_cache_node *ami_font_open(const char *font, bool critical)
{
+ if(font == NULL) {
+ NSLOG(netsurf, INFO, "Requested NULL font");
+ return NULL;
+ }
+
struct ami_font_cache_node *nodedata = ami_font_cache_locate(font);
if(nodedata) return nodedata;
-----------------------------------------------------------------------
Summary of changes:
frontends/amiga/font_bullet.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/frontends/amiga/font_bullet.c b/frontends/amiga/font_bullet.c
index 6283a1f..dec39a1 100644
--- a/frontends/amiga/font_bullet.c
+++ b/frontends/amiga/font_bullet.c
@@ -349,6 +349,11 @@ static nserror amiga_nsfont_split(const plot_font_style_t *fstyle,
*/
static struct ami_font_cache_node *ami_font_open(const char *font, bool critical)
{
+ if(font == NULL) {
+ NSLOG(netsurf, INFO, "Requested NULL font");
+ return NULL;
+ }
+
struct ami_font_cache_node *nodedata = ami_font_cache_locate(font);
if(nodedata) return nodedata;
--
NetSurf Browser
2 years, 9 months
netsurf: branch master updated. release/3.10-14-g68f1b41
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/68f1b41bf0c62b79a95c4...
...commit http://git.netsurf-browser.org/netsurf.git/commit/68f1b41bf0c62b79a95c454...
...tree http://git.netsurf-browser.org/netsurf.git/tree/68f1b41bf0c62b79a95c45471...
The branch, master has been updated
via 68f1b41bf0c62b79a95c4547194bf7bde535de47 (commit)
via 22ea4cbe65b5bf737269dd0deeccb0cdf0124387 (commit)
from 85dea6eed305f0e02a807e1722c06b54f5c31488 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=68f1b41bf0c62b79a95...
commit 68f1b41bf0c62b79a95c4547194bf7bde535de47
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Amiga: Use IANA codeset number to identify local charset
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 36ee756..8eb34fb 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -1095,6 +1095,7 @@ static nserror ami_set_options(struct nsoption_s *defaults)
const char *encname = (const char *)ObtainCharsetInfo(DFCS_NUMBER, codeset,
DFCS_MIMENAME);
nsoption_set_charp(local_charset, strdup(encname));
+ nsoption_set_int(local_codeset, codeset);
#else
nsoption_set_bool(download_notify, false);
nsoption_set_bool(font_antialiasing, false);
diff --git a/frontends/amiga/options.h b/frontends/amiga/options.h
index 196b057..101558f 100644
--- a/frontends/amiga/options.h
+++ b/frontends/amiga/options.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 - 2012 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
+ * Copyright 2008 - 2020 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -89,12 +89,22 @@ NSOPTION_INTEGER(redraw_tile_size_y, 0)
NSOPTION_INTEGER(monitor_aspect_x, 0)
NSOPTION_INTEGER(monitor_aspect_y, 0)
NSOPTION_BOOL(accept_lang_locale, true)
+
+/* Local charset when using iconv */
NSOPTION_STRING(local_charset, "ISO-8859-1")
+
#ifdef __amigaos4__
-/* Options relevant for OS4 only */
+/** Options relevant for OS4 only **/
+
+/* Local charset IANA number when using codesets */
+NSOPTION_INTEGER(local_codeset, 0)
+
+/* Use ExtMem */
NSOPTION_BOOL(use_extmem, true)
+
#else
-/* Options relevant for OS3 only */
+/** Options relevant for OS3 only **/
+
NSOPTION_BOOL(friend_bitmap, false)
#endif
diff --git a/frontends/amiga/utf8.c b/frontends/amiga/utf8.c
index 83872eb..f16cbba 100755
--- a/frontends/amiga/utf8.c
+++ b/frontends/amiga/utf8.c
@@ -38,16 +38,18 @@ static nserror ami_utf8_codesets(const char *string, size_t len, char **result,
ULONG utf8_tag, local_tag;
if(to_local == false) {
- local_tag = CSA_SourceCodeset;
+ local_tag = CSA_SourceMIBenum;
utf8_tag = CSA_DestMIBenum;
} else {
utf8_tag = CSA_SourceMIBenum;
- local_tag = CSA_DestCodeset;
+ local_tag = CSA_DestMIBenum;
}
out = CodesetsConvertStr(CSA_Source, string,
CSA_SourceLen, len,
- local_tag, CodesetsFindA(nsoption_charp(local_charset), NULL),
+#ifdef __amigaos4__
+ local_tag, nsoption_int(local_codeset),
+#endif
utf8_tag, CS_MIBENUM_UTF_8,
CSA_MapForeignChars, TRUE,
TAG_DONE);
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=22ea4cbe65b5bf73726...
commit 22ea4cbe65b5bf737269dd0deeccb0cdf0124387
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Amiga: Use codesets.library for UTF8 conversion if available
diff --git a/frontends/amiga/libs.c b/frontends/amiga/libs.c
index 109baa4..3c09bcb 100644
--- a/frontends/amiga/libs.c
+++ b/frontends/amiga/libs.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2014 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
+ * Copyright 2014-2020 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -189,6 +189,7 @@ AMINS_LIB_STRUCT(Locale);
AMINS_LIB_STRUCT(P96);
AMINS_LIB_STRUCT(Workbench);
+AMINS_LIB_STRUCT(Codesets);
AMINS_LIB_STRUCT(GuiGFX);
AMINS_CLASS_STRUCT(ARexx);
@@ -248,7 +249,8 @@ bool ami_libs_open(void)
AMINS_LIB_OPEN("Picasso96API.library", 0, P96, "main", 1, false)
/* Non-OS provided libraries */
- AMINS_LIB_OPEN("guigfx.library", 9, GuiGFX, "main", 1, false)
+ AMINS_LIB_OPEN("codesets.library", 6, Codesets, "main", 1, false)
+ AMINS_LIB_OPEN("guigfx.library", 9, GuiGFX, "main", 1, false)
/* NB: timer.device is opened in schedule.c (ultimately by the scheduler process).
* The library base and interface are obtained there, rather than here, due to
@@ -324,6 +326,7 @@ void ami_libs_close(void)
AMINS_CLASS_CLOSE(Window)
/* Libraries */
+ AMINS_LIB_CLOSE(Codesets)
AMINS_LIB_CLOSE(GuiGFX)
AMINS_LIB_CLOSE(Asl)
diff --git a/frontends/amiga/utf8.c b/frontends/amiga/utf8.c
index 5d05e95..83872eb 100755
--- a/frontends/amiga/utf8.c
+++ b/frontends/amiga/utf8.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
+ * Copyright 2008-2020 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -22,6 +22,7 @@
#include <string.h>
#include <sys/types.h>
+#include <proto/codesets.h>
#include <proto/exec.h>
#include <proto/utility.h>
@@ -31,20 +32,58 @@
#include "amiga/utf8.h"
+static nserror ami_utf8_codesets(const char *string, size_t len, char **result, bool to_local)
+{
+ char *out;
+ ULONG utf8_tag, local_tag;
+
+ if(to_local == false) {
+ local_tag = CSA_SourceCodeset;
+ utf8_tag = CSA_DestMIBenum;
+ } else {
+ utf8_tag = CSA_SourceMIBenum;
+ local_tag = CSA_DestCodeset;
+ }
+
+ out = CodesetsConvertStr(CSA_Source, string,
+ CSA_SourceLen, len,
+ local_tag, CodesetsFindA(nsoption_charp(local_charset), NULL),
+ utf8_tag, CS_MIBENUM_UTF_8,
+ CSA_MapForeignChars, TRUE,
+ TAG_DONE);
+
+ if(out != NULL) {
+ *result = strdup(out);
+ CodesetsFreeA(out, NULL);
+ } else {
+ return NSERROR_BAD_ENCODING;
+ }
+
+ return NSERROR_OK;
+}
+
nserror utf8_from_local_encoding(const char *string, size_t len, char **result)
{
- return utf8_from_enc(string, nsoption_charp(local_charset), len, result, NULL);
+ if(__builtin_expect((CodesetsBase == NULL), 0)) {
+ return utf8_from_enc(string, nsoption_charp(local_charset), len, result, NULL);
+ } else {
+ return ami_utf8_codesets(string, len, result, false);
+ }
}
nserror utf8_to_local_encoding(const char *string, size_t len, char **result)
{
- nserror err = NSERROR_NOMEM;
- char *local_charset = ASPrintf("%s//IGNORE", nsoption_charp(local_charset));
- if(local_charset) {
- err = utf8_to_enc(string, local_charset, len, result);
- FreeVec(local_charset);
+ if(__builtin_expect((CodesetsBase == NULL), 0)) {
+ nserror err = NSERROR_NOMEM;
+ char *local_charset = ASPrintf("%s//IGNORE", nsoption_charp(local_charset));
+ if(local_charset) {
+ err = utf8_to_enc(string, local_charset, len, result);
+ FreeVec(local_charset);
+ }
+ return err;
+ } else {
+ return ami_utf8_codesets(string, len, result, true);
}
- return err;
}
void ami_utf8_free(char *ptr)
-----------------------------------------------------------------------
Summary of changes:
frontends/amiga/gui.c | 1 +
frontends/amiga/libs.c | 7 ++++--
frontends/amiga/options.h | 16 ++++++++++---
frontends/amiga/utf8.c | 57 ++++++++++++++++++++++++++++++++++++++-------
4 files changed, 68 insertions(+), 13 deletions(-)
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 36ee756..8eb34fb 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -1095,6 +1095,7 @@ static nserror ami_set_options(struct nsoption_s *defaults)
const char *encname = (const char *)ObtainCharsetInfo(DFCS_NUMBER, codeset,
DFCS_MIMENAME);
nsoption_set_charp(local_charset, strdup(encname));
+ nsoption_set_int(local_codeset, codeset);
#else
nsoption_set_bool(download_notify, false);
nsoption_set_bool(font_antialiasing, false);
diff --git a/frontends/amiga/libs.c b/frontends/amiga/libs.c
index 109baa4..3c09bcb 100644
--- a/frontends/amiga/libs.c
+++ b/frontends/amiga/libs.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2014 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
+ * Copyright 2014-2020 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -189,6 +189,7 @@ AMINS_LIB_STRUCT(Locale);
AMINS_LIB_STRUCT(P96);
AMINS_LIB_STRUCT(Workbench);
+AMINS_LIB_STRUCT(Codesets);
AMINS_LIB_STRUCT(GuiGFX);
AMINS_CLASS_STRUCT(ARexx);
@@ -248,7 +249,8 @@ bool ami_libs_open(void)
AMINS_LIB_OPEN("Picasso96API.library", 0, P96, "main", 1, false)
/* Non-OS provided libraries */
- AMINS_LIB_OPEN("guigfx.library", 9, GuiGFX, "main", 1, false)
+ AMINS_LIB_OPEN("codesets.library", 6, Codesets, "main", 1, false)
+ AMINS_LIB_OPEN("guigfx.library", 9, GuiGFX, "main", 1, false)
/* NB: timer.device is opened in schedule.c (ultimately by the scheduler process).
* The library base and interface are obtained there, rather than here, due to
@@ -324,6 +326,7 @@ void ami_libs_close(void)
AMINS_CLASS_CLOSE(Window)
/* Libraries */
+ AMINS_LIB_CLOSE(Codesets)
AMINS_LIB_CLOSE(GuiGFX)
AMINS_LIB_CLOSE(Asl)
diff --git a/frontends/amiga/options.h b/frontends/amiga/options.h
index 196b057..101558f 100644
--- a/frontends/amiga/options.h
+++ b/frontends/amiga/options.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 - 2012 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
+ * Copyright 2008 - 2020 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -89,12 +89,22 @@ NSOPTION_INTEGER(redraw_tile_size_y, 0)
NSOPTION_INTEGER(monitor_aspect_x, 0)
NSOPTION_INTEGER(monitor_aspect_y, 0)
NSOPTION_BOOL(accept_lang_locale, true)
+
+/* Local charset when using iconv */
NSOPTION_STRING(local_charset, "ISO-8859-1")
+
#ifdef __amigaos4__
-/* Options relevant for OS4 only */
+/** Options relevant for OS4 only **/
+
+/* Local charset IANA number when using codesets */
+NSOPTION_INTEGER(local_codeset, 0)
+
+/* Use ExtMem */
NSOPTION_BOOL(use_extmem, true)
+
#else
-/* Options relevant for OS3 only */
+/** Options relevant for OS3 only **/
+
NSOPTION_BOOL(friend_bitmap, false)
#endif
diff --git a/frontends/amiga/utf8.c b/frontends/amiga/utf8.c
index 5d05e95..f16cbba 100755
--- a/frontends/amiga/utf8.c
+++ b/frontends/amiga/utf8.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
+ * Copyright 2008-2020 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -22,6 +22,7 @@
#include <string.h>
#include <sys/types.h>
+#include <proto/codesets.h>
#include <proto/exec.h>
#include <proto/utility.h>
@@ -31,20 +32,60 @@
#include "amiga/utf8.h"
+static nserror ami_utf8_codesets(const char *string, size_t len, char **result, bool to_local)
+{
+ char *out;
+ ULONG utf8_tag, local_tag;
+
+ if(to_local == false) {
+ local_tag = CSA_SourceMIBenum;
+ utf8_tag = CSA_DestMIBenum;
+ } else {
+ utf8_tag = CSA_SourceMIBenum;
+ local_tag = CSA_DestMIBenum;
+ }
+
+ out = CodesetsConvertStr(CSA_Source, string,
+ CSA_SourceLen, len,
+#ifdef __amigaos4__
+ local_tag, nsoption_int(local_codeset),
+#endif
+ utf8_tag, CS_MIBENUM_UTF_8,
+ CSA_MapForeignChars, TRUE,
+ TAG_DONE);
+
+ if(out != NULL) {
+ *result = strdup(out);
+ CodesetsFreeA(out, NULL);
+ } else {
+ return NSERROR_BAD_ENCODING;
+ }
+
+ return NSERROR_OK;
+}
+
nserror utf8_from_local_encoding(const char *string, size_t len, char **result)
{
- return utf8_from_enc(string, nsoption_charp(local_charset), len, result, NULL);
+ if(__builtin_expect((CodesetsBase == NULL), 0)) {
+ return utf8_from_enc(string, nsoption_charp(local_charset), len, result, NULL);
+ } else {
+ return ami_utf8_codesets(string, len, result, false);
+ }
}
nserror utf8_to_local_encoding(const char *string, size_t len, char **result)
{
- nserror err = NSERROR_NOMEM;
- char *local_charset = ASPrintf("%s//IGNORE", nsoption_charp(local_charset));
- if(local_charset) {
- err = utf8_to_enc(string, local_charset, len, result);
- FreeVec(local_charset);
+ if(__builtin_expect((CodesetsBase == NULL), 0)) {
+ nserror err = NSERROR_NOMEM;
+ char *local_charset = ASPrintf("%s//IGNORE", nsoption_charp(local_charset));
+ if(local_charset) {
+ err = utf8_to_enc(string, local_charset, len, result);
+ FreeVec(local_charset);
+ }
+ return err;
+ } else {
+ return ami_utf8_codesets(string, len, result, true);
}
- return err;
}
void ami_utf8_free(char *ptr)
--
NetSurf Browser
2 years, 9 months
netsurf: branch master updated. release/3.10-12-g85dea6e
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/85dea6eed305f0e02a807...
...commit http://git.netsurf-browser.org/netsurf.git/commit/85dea6eed305f0e02a807e1...
...tree http://git.netsurf-browser.org/netsurf.git/tree/85dea6eed305f0e02a807e172...
The branch, master has been updated
via 85dea6eed305f0e02a807e1722c06b54f5c31488 (commit)
from b182cc7617a739f4b42293ef8e43485ef48d7cab (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=85dea6eed305f0e02a8...
commit 85dea6eed305f0e02a807e1722c06b54f5c31488
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
remove unecessary headers from browser window
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 423ff99..546198f 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -1,7 +1,7 @@
/*
* Copyright 2008 Michael Drake <tlsa(a)netsurf-browser.org>
* Copyright 2010 Daniel Silverstone <dsilvers(a)digital-scurf.org>
- * Copyright 2010 Vincent Sanders <vince(a)netsurf-browser.org>
+ * Copyright 2010-2020 Vincent Sanders <vince(a)netsurf-browser.org>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -26,51 +26,41 @@
#include "utils/config.h"
-#include <assert.h>
-#include <limits.h>
-#include <stdbool.h>
-#include <stdint.h>
#include <stdlib.h>
-#include <string.h>
-#include <strings.h>
#include <math.h>
#include <nsutils/time.h>
-#include <nsutils/base64.h>
-#include "utils/corestrings.h"
+#include "utils/errors.h"
#include "utils/log.h"
+#include "utils/corestrings.h"
#include "utils/messages.h"
-#include "utils/nsurl.h"
-#include "utils/utils.h"
-#include "utils/utf8.h"
#include "utils/nsoption.h"
-#include "netsurf/misc.h"
+#include "netsurf/types.h"
+#include "netsurf/browser_window.h"
#include "netsurf/window.h"
-#include "netsurf/search.h"
+#include "netsurf/misc.h"
#include "netsurf/content.h"
+#include "netsurf/search.h"
#include "netsurf/plotters.h"
-#include "content/content_debug.h"
-#include "content/fetch.h"
+#include "content/content.h"
#include "content/hlcache.h"
#include "content/urldb.h"
-#include "css/utils.h"
-#include "html/form_internal.h"
+#include "content/content_debug.h"
+
#include "html/html.h"
+#include "html/form_internal.h"
#include "javascript/js.h"
-#include "desktop/cookie_manager.h"
-#include "desktop/browser_history.h"
#include "desktop/browser_private.h"
+#include "desktop/scrollbar.h"
+#include "desktop/gui_internal.h"
#include "desktop/download.h"
#include "desktop/frames.h"
#include "desktop/global_history.h"
+#include "desktop/textinput.h"
#include "desktop/hotlist.h"
#include "desktop/knockout.h"
-#include "desktop/scrollbar.h"
-#include "desktop/selection.h"
-#include "desktop/theme.h"
-#include "desktop/gui_internal.h"
-#include "desktop/textinput.h"
+#include "desktop/browser_history.h"
/**
* smallest scale that can be applied to a browser window
-----------------------------------------------------------------------
Summary of changes:
desktop/browser_window.c | 40 +++++++++++++++-------------------------
1 file changed, 15 insertions(+), 25 deletions(-)
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 423ff99..546198f 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -1,7 +1,7 @@
/*
* Copyright 2008 Michael Drake <tlsa(a)netsurf-browser.org>
* Copyright 2010 Daniel Silverstone <dsilvers(a)digital-scurf.org>
- * Copyright 2010 Vincent Sanders <vince(a)netsurf-browser.org>
+ * Copyright 2010-2020 Vincent Sanders <vince(a)netsurf-browser.org>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -26,51 +26,41 @@
#include "utils/config.h"
-#include <assert.h>
-#include <limits.h>
-#include <stdbool.h>
-#include <stdint.h>
#include <stdlib.h>
-#include <string.h>
-#include <strings.h>
#include <math.h>
#include <nsutils/time.h>
-#include <nsutils/base64.h>
-#include "utils/corestrings.h"
+#include "utils/errors.h"
#include "utils/log.h"
+#include "utils/corestrings.h"
#include "utils/messages.h"
-#include "utils/nsurl.h"
-#include "utils/utils.h"
-#include "utils/utf8.h"
#include "utils/nsoption.h"
-#include "netsurf/misc.h"
+#include "netsurf/types.h"
+#include "netsurf/browser_window.h"
#include "netsurf/window.h"
-#include "netsurf/search.h"
+#include "netsurf/misc.h"
#include "netsurf/content.h"
+#include "netsurf/search.h"
#include "netsurf/plotters.h"
-#include "content/content_debug.h"
-#include "content/fetch.h"
+#include "content/content.h"
#include "content/hlcache.h"
#include "content/urldb.h"
-#include "css/utils.h"
-#include "html/form_internal.h"
+#include "content/content_debug.h"
+
#include "html/html.h"
+#include "html/form_internal.h"
#include "javascript/js.h"
-#include "desktop/cookie_manager.h"
-#include "desktop/browser_history.h"
#include "desktop/browser_private.h"
+#include "desktop/scrollbar.h"
+#include "desktop/gui_internal.h"
#include "desktop/download.h"
#include "desktop/frames.h"
#include "desktop/global_history.h"
+#include "desktop/textinput.h"
#include "desktop/hotlist.h"
#include "desktop/knockout.h"
-#include "desktop/scrollbar.h"
-#include "desktop/selection.h"
-#include "desktop/theme.h"
-#include "desktop/gui_internal.h"
-#include "desktop/textinput.h"
+#include "desktop/browser_history.h"
/**
* smallest scale that can be applied to a browser window
--
NetSurf Browser
2 years, 9 months
netsurf: branch master updated. release/3.10-11-gb182cc7
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/b182cc7617a739f4b4229...
...commit http://git.netsurf-browser.org/netsurf.git/commit/b182cc7617a739f4b42293e...
...tree http://git.netsurf-browser.org/netsurf.git/tree/b182cc7617a739f4b42293ef8...
The branch, master has been updated
via b182cc7617a739f4b42293ef8e43485ef48d7cab (commit)
from 6d62a068995fb1a50777e90c0b0f36a15eda0903 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=b182cc7617a739f4b42...
commit b182cc7617a739f4b42293ef8e43485ef48d7cab
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
remove box handling from browser window
diff --git a/content/handlers/html/box.h b/content/handlers/html/box.h
index b4da031..d0df735 100644
--- a/content/handlers/html/box.h
+++ b/content/handlers/html/box.h
@@ -448,12 +448,4 @@ struct box {
};
-/* Frame target names (constant pointers to save duplicating the strings many
- * times). We convert _blank to _top for user-friendliness. */
-extern const char *TARGET_SELF;
-extern const char *TARGET_PARENT;
-extern const char *TARGET_TOP;
-extern const char *TARGET_BLANK;
-
-
#endif
diff --git a/content/handlers/html/box_construct.c b/content/handlers/html/box_construct.c
index 5ae7552..5edd88e 100644
--- a/content/handlers/html/box_construct.c
+++ b/content/handlers/html/box_construct.c
@@ -85,12 +85,6 @@ struct box_construct_props {
static const content_type image_types = CONTENT_IMAGE;
-/* the strings are not important, since we just compare the pointers */
-const char *TARGET_SELF = "_self";
-const char *TARGET_PARENT = "_parent";
-const char *TARGET_TOP = "_top";
-const char *TARGET_BLANK = "_blank";
-
/**
* mapping from CSS display to box type this table must be in sync
* with libcss' css_display enum
diff --git a/content/handlers/html/box_special.c b/content/handlers/html/box_special.c
index 2332316..c6be9e6 100644
--- a/content/handlers/html/box_special.c
+++ b/content/handlers/html/box_special.c
@@ -716,18 +716,18 @@ box_a(dom_node *n,
if (err == DOM_NO_ERR && s != NULL) {
if (dom_string_caseless_lwc_isequal(s,
corestring_lwc__blank))
- box->target = TARGET_BLANK;
+ box->target = "_blank";
else if (dom_string_caseless_lwc_isequal(s,
corestring_lwc__top))
- box->target = TARGET_TOP;
+ box->target = "_top";
else if (dom_string_caseless_lwc_isequal(s,
corestring_lwc__parent))
- box->target = TARGET_PARENT;
+ box->target = "_parent";
else if (dom_string_caseless_lwc_isequal(s,
corestring_lwc__self))
/* the default may have been overridden by a
* <base target=...>, so this is different to 0 */
- box->target = TARGET_SELF;
+ box->target = "_self";
else {
/* 6.16 says that frame names must begin with [a-zA-Z]
* This doesn't match reality, so just take anything */
diff --git a/desktop/browser_private.h b/desktop/browser_private.h
index 8ed2dde..40c3b43 100644
--- a/desktop/browser_private.h
+++ b/desktop/browser_private.h
@@ -288,6 +288,13 @@ nserror browser_window_initialise_common(enum browser_window_create_flags flags,
/**
+ * Release all memory associated with a browser window.
+ *
+ * \param bw browser window
+ */
+nserror browser_window_destroy_internal(struct browser_window *bw);
+
+/**
* Get the dimensions of the area a browser window occupies
*
* \param bw The browser window to get dimensions of
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 7bc5cc5..423ff99 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -56,7 +56,6 @@
#include "css/utils.h"
#include "html/form_internal.h"
#include "html/html.h"
-#include "html/box.h"
#include "javascript/js.h"
#include "desktop/cookie_manager.h"
@@ -88,9 +87,6 @@
*/
#define FRAME_DEPTH 8
-/* Have to forward declare browser_window_destroy_internal */
-static void browser_window_destroy_internal(struct browser_window *bw);
-
/* Forward declare internal navigation function */
static nserror browser_window__navigate_internal(
struct browser_window *bw, struct browser_fetch_parameters *params);
@@ -114,14 +110,6 @@ static void browser_window_destroy_children(struct browser_window *bw)
bw->rows = 0;
bw->cols = 0;
}
- if (bw->iframes) {
- for (i = 0; i < bw->iframe_count; i++) {
- browser_window_destroy_internal(&bw->iframes[i]);
- }
- free(bw->iframes);
- bw->iframes = NULL;
- bw->iframe_count = 0;
- }
}
@@ -798,7 +786,8 @@ static void browser_window_update(struct browser_window *bw, bool scroll_to_top)
/** @todo don't do this if the user has scrolled */
frag_scroll(bw);
- html_redraw_a_box(bw->parent->current_content, bw->box);
+ browser_window_invalidate_iframe(bw);
+
break;
case BROWSER_WINDOW_FRAME:
@@ -919,15 +908,10 @@ static nserror browser_window_content_ready(struct browser_window *bw)
browser_window_set_status(bw, content_get_status_message(bw->current_content));
/* frames */
- if ((content_get_type(bw->current_content) == CONTENT_HTML) &&
- (html_get_frameset(bw->current_content) != NULL)) {
- res = browser_window_create_frameset(bw, html_get_frameset(bw->current_content));
- }
+ res = browser_window_create_frameset(bw);
- if (content_get_type(bw->current_content) == CONTENT_HTML &&
- html_get_iframe(bw->current_content) != NULL) {
- browser_window_create_iframes(bw, html_get_iframe(bw->current_content));
- }
+ /* iframes */
+ res = browser_window_create_iframes(bw);
/* Indicate page status may have changed */
if (res == NSERROR_OK) {
@@ -1004,6 +988,7 @@ browser_window__handle_ssl_query_response(bool proceed, void *pw)
browser_window_stop(bw);
browser_window_remove_caret(bw, false);
browser_window_destroy_children(bw);
+ browser_window_destroy_iframes(bw);
}
if (!proceed) {
@@ -1149,6 +1134,7 @@ browser_window__handle_userpass_response(nsurl *url,
browser_window_stop(bw);
browser_window_remove_caret(bw, false);
browser_window_destroy_children(bw);
+ browser_window_destroy_iframes(bw);
}
bw->internal_nav = false;
return browser_window__navigate_internal(bw, &bw->loading_parameters);
@@ -1560,14 +1546,12 @@ browser_window_callback(hlcache_handle *c, const hlcache_event *event, void *pw)
break;
case CONTENT_MSG_REFORMAT:
- if (c == bw->current_content &&
- content_get_type(c) == CONTENT_HTML) {
- /* reposition frames */
- if (html_get_frameset(c) != NULL)
- browser_window_recalculate_frameset(bw);
- /* reflow iframe positions */
- if (html_get_iframe(c) != NULL)
- browser_window_recalculate_iframes(bw);
+ if (c == bw->current_content) {
+ /* recompute frameset */
+ browser_window_recalculate_frameset(bw);
+
+ /* recompute iframe positions, sizes and scrollbars */
+ browser_window_recalculate_iframes(bw);
}
/* Hide any caret, but don't remove it */
@@ -1848,21 +1832,13 @@ static void scheduled_reformat(void *vbw)
}
}
-
-/**
- * Release all memory associated with a browser window.
- *
- * \param bw browser window
- */
-static void browser_window_destroy_internal(struct browser_window *bw)
+/* exported interface documented in desktop/browser_private.h */
+nserror browser_window_destroy_internal(struct browser_window *bw)
{
assert(bw);
- NSLOG(netsurf, INFO, "Destroying window");
-
- if (bw->children != NULL || bw->iframes != NULL) {
- browser_window_destroy_children(bw);
- }
+ browser_window_destroy_children(bw);
+ browser_window_destroy_iframes(bw);
/* Destroy scrollbars */
if (bw->scroll_x != NULL) {
@@ -1926,11 +1902,6 @@ static void browser_window_destroy_internal(struct browser_window *bw)
bw->favicon.current = NULL;
}
- if (bw->box != NULL) {
- bw->box->iframe = NULL;
- bw->box = NULL;
- }
-
if (bw->jsheap != NULL) {
js_destroyheap(bw->jsheap);
bw->jsheap = NULL;
@@ -1956,6 +1927,8 @@ static void browser_window_destroy_internal(struct browser_window *bw)
browser_window__free_fetch_parameters(&bw->loading_parameters);
NSLOG(netsurf, INFO, "Status text cache match:miss %d:%d",
bw->status.match, bw->status.miss);
+
+ return NSERROR_OK;
}
@@ -1991,7 +1964,7 @@ browser_window_set_scale_internal(struct browser_window *bw, float scale)
res = browser_window_set_scale_internal(&bw->children[i], scale);
}
- /* sale iframes */
+ /* scale iframes */
for (i = 0; i < bw->iframe_count; i++) {
res = browser_window_set_scale_internal(&bw->iframes[i], scale);
}
@@ -3487,6 +3460,7 @@ browser_window_navigate(struct browser_window *bw,
browser_window_stop(bw);
browser_window_remove_caret(bw, false);
browser_window_destroy_children(bw);
+ browser_window_destroy_iframes(bw);
/* Set up the fetch parameters */
memset(¶ms, 0, sizeof(params));
@@ -4389,7 +4363,7 @@ browser_window_find_target(struct browser_window *bw,
target = html_get_base_target(c);
}
if (target == NULL) {
- target = TARGET_SELF;
+ target = "_self";
}
/* allow the simple case of target="_blank" to be ignored if requested
@@ -4401,7 +4375,7 @@ browser_window_find_target(struct browser_window *bw,
/* not a mouse button 2 click
* not a mouse button 1 click with ctrl pressed
* configured to ignore target="_blank" */
- if ((target == TARGET_BLANK) || (!strcasecmp(target, "_blank")))
+ if (!strcasecmp(target, "_blank"))
return bw;
}
@@ -4412,8 +4386,7 @@ browser_window_find_target(struct browser_window *bw,
((mouse & BROWSER_MOUSE_CLICK_1) &&
(mouse & BROWSER_MOUSE_MOD_2))) ||
((nsoption_bool(button_2_tab)) &&
- ((target == TARGET_BLANK) ||
- (!strcasecmp(target, "_blank"))))) {
+ (!strcasecmp(target, "_blank")))) {
/* open in new tab if:
* - button_2 opens in new tab and button_2 was pressed
* OR
@@ -4439,8 +4412,7 @@ browser_window_find_target(struct browser_window *bw,
((mouse & BROWSER_MOUSE_CLICK_1) &&
(mouse & BROWSER_MOUSE_MOD_2))) ||
((!nsoption_bool(button_2_tab)) &&
- ((target == TARGET_BLANK) ||
- (!strcasecmp(target, "_blank"))))) {
+ (!strcasecmp(target, "_blank")))) {
/* open in new window if:
* - button_2 doesn't open in new tabs and button_2 was pressed
* OR
@@ -4460,14 +4432,13 @@ browser_window_find_target(struct browser_window *bw,
return bw;
}
return bw_target;
- } else if ((target == TARGET_SELF) || (!strcasecmp(target, "_self"))) {
+ } else if (!strcasecmp(target, "_self")) {
return bw;
- } else if ((target == TARGET_PARENT) ||
- (!strcasecmp(target, "_parent"))) {
+ } else if (!strcasecmp(target, "_parent")) {
if (bw->parent)
return bw->parent;
return bw;
- } else if ((target == TARGET_TOP) || (!strcasecmp(target, "_top"))) {
+ } else if (!strcasecmp(target, "_top")) {
while (bw->parent)
bw = bw->parent;
return bw;
diff --git a/desktop/frames.c b/desktop/frames.c
index 0d70029..85f1879 100644
--- a/desktop/frames.c
+++ b/desktop/frames.c
@@ -181,20 +181,35 @@ void browser_window_handle_scrollbars(struct browser_window *bw)
scrollbar_make_pair(bw->scroll_x, bw->scroll_y);
}
+/* exported function documented in desktop/frames.h */
+nserror browser_window_invalidate_iframe(struct browser_window *bw)
+{
+ html_redraw_a_box(bw->parent->current_content, bw->box);
+ return NSERROR_OK;
+}
/* exported function documented in desktop/frames.h */
-nserror browser_window_create_iframes(struct browser_window *bw,
- struct content_html_iframe *iframe)
+nserror browser_window_create_iframes(struct browser_window *bw)
{
+ nserror ret = NSERROR_OK;
struct browser_window *window;
struct content_html_iframe *cur;
struct rect rect;
int iframes = 0;
int index;
- nserror ret = NSERROR_OK;
+ struct content_html_iframe *iframe;
+
+ bw->iframe_count = 0;
+
+ /* only html contents can have iframes */
+ if (content_get_type(bw->current_content) != CONTENT_HTML) {
+ return NSERROR_OK;
+ }
+ /* obtain the iframes for this content */
+ iframe = html_get_iframe(bw->current_content);
if (iframe == NULL) {
- return NSERROR_BAD_PARAMETER;
+ return NSERROR_OK;
}
/* Count iframe list and allocate enough space within the
@@ -272,12 +287,7 @@ nserror browser_window_create_iframes(struct browser_window *bw,
}
-/**
- * Recalculate iframe positions following a resize.
- *
- * \param bw The browser window to reposition iframes for
- */
-
+/* exported function documented in desktop/frames.h */
void browser_window_recalculate_iframes(struct browser_window *bw)
{
struct browser_window *window;
@@ -293,123 +303,23 @@ void browser_window_recalculate_iframes(struct browser_window *bw)
}
-/* exported interface documented in desktop/frames.h */
-nserror browser_window_create_frameset(struct browser_window *bw,
- struct content_html_frames *frameset)
+/* exported function documented in desktop/frames.h */
+nserror browser_window_destroy_iframes(struct browser_window *bw)
{
- int row, col, index;
- struct content_html_frames *frame;
- struct browser_window *window;
- hlcache_handle *parent;
-
- assert(bw && frameset);
-
- /* 1. Create children */
- assert(bw->children == NULL);
- assert(frameset->cols + frameset->rows != 0);
-
- bw->children = calloc((frameset->cols * frameset->rows), sizeof(*bw));
- if (!bw->children) {
- return NSERROR_NOMEM;
- }
-
- bw->cols = frameset->cols;
- bw->rows = frameset->rows;
- for (row = 0; row < bw->rows; row++) {
- for (col = 0; col < bw->cols; col++) {
- index = (row * bw->cols) + col;
- frame = &frameset->children[index];
- window = &bw->children[index];
-
- /* Initialise common parts */
- browser_window_initialise_common(BW_CREATE_NONE,
- window, NULL);
+ int i;
- /* window characteristics */
- if (frame->children)
- window->browser_window_type =
- BROWSER_WINDOW_FRAMESET;
- else
- window->browser_window_type =
- BROWSER_WINDOW_FRAME;
- window->scrolling = frame->scrolling;
- window->border = frame->border;
- window->border_colour = frame->border_colour;
- window->no_resize = frame->no_resize;
- window->frame_width = frame->width;
- window->frame_height = frame->height;
- window->margin_width = frame->margin_width;
- window->margin_height = frame->margin_height;
- if (frame->name) {
- window->name = strdup(frame->name);
- if (!window->name) {
- free(bw->children);
- bw->children = NULL;
- return NSERROR_NOMEM;
- }
+ if (bw->iframes != NULL) {
+ for (i = 0; i < bw->iframe_count; i++) {
+ if (bw->iframes[i].box != NULL) {
+ bw->iframes[i].box->iframe = NULL;
+ bw->iframes[i].box = NULL;
}
-
- window->scale = bw->scale;
-
- /* linking */
- window->parent = bw;
-
- if (window->name)
- NSLOG(netsurf, INFO, "Created frame '%s'",
- window->name);
- else
- NSLOG(netsurf, INFO,
- "Created frame (unnamed)");
- }
- }
-
- /* 2. Calculate dimensions */
- browser_window_update_extent(bw);
- browser_window_recalculate_frameset(bw);
-
- /* 3. Recurse for grandchildren */
- for (row = 0; row < bw->rows; row++) {
- for (col = 0; col < bw->cols; col++) {
- index = (row * bw->cols) + col;
- frame = &frameset->children[index];
- window = &bw->children[index];
-
- if (frame->children)
- browser_window_create_frameset(window, frame);
+ browser_window_destroy_internal(&bw->iframes[i]);
}
+ free(bw->iframes);
+ bw->iframes = NULL;
+ bw->iframe_count = 0;
}
-
- /* Use the URL of the first ancestor window containing html content
- * as the referer */
- for (window = bw; window->parent; window = window->parent) {
- if (window->current_content &&
- content_get_type(window->current_content) ==
- CONTENT_HTML)
- break;
- }
-
- parent = window->current_content;
-
- /* 4. Launch content */
- for (row = 0; row < bw->rows; row++) {
- for (col = 0; col < bw->cols; col++) {
- index = (row * bw->cols) + col;
- frame = &frameset->children[index];
- window = &bw->children[index];
-
- if (frame->url) {
- browser_window_navigate(window,
- frame->url,
- hlcache_handle_get_url(parent),
- BW_NAVIGATE_HISTORY |
- BW_NAVIGATE_UNVERIFIABLE,
- NULL,
- NULL,
- parent);
- }
- }
- }
-
return NSERROR_OK;
}
@@ -417,10 +327,9 @@ nserror browser_window_create_frameset(struct browser_window *bw,
/**
* Recalculate frameset positions following a resize.
*
- * \param bw The browser window to reposition framesets for
+ * \param bw The browser window to reposition framesets for
*/
-
-void browser_window_recalculate_frameset(struct browser_window *bw)
+static void browser_window_recalculate_frameset_internal(struct browser_window *bw)
{
int widths[bw->cols][bw->rows];
int heights[bw->cols][bw->rows];
@@ -646,9 +555,177 @@ void browser_window_recalculate_frameset(struct browser_window *bw)
x += widths[col][row];
if (window->children)
- browser_window_recalculate_frameset(window);
+ browser_window_recalculate_frameset_internal(window);
+ }
+ }
+}
+
+
+/**
+ * Create and open a frameset for a browser window.
+ *
+ * \param[in,out] bw The browser window to create the frameset for
+ * \param[in] frameset The frameset to create
+ * \return NSERROR_OK or error code on faliure
+ */
+static nserror
+browser_window_create_frameset_internal(struct browser_window *bw,
+ struct content_html_frames *frameset)
+{
+ int row, col, index;
+ struct content_html_frames *frame;
+ struct browser_window *window;
+ hlcache_handle *parent;
+
+ assert(bw && frameset);
+
+ /* 1. Create children */
+ assert(bw->children == NULL);
+ assert(frameset->cols + frameset->rows != 0);
+
+ bw->children = calloc((frameset->cols * frameset->rows), sizeof(*bw));
+ if (!bw->children) {
+ return NSERROR_NOMEM;
+ }
+
+ bw->cols = frameset->cols;
+ bw->rows = frameset->rows;
+ for (row = 0; row < bw->rows; row++) {
+ for (col = 0; col < bw->cols; col++) {
+ index = (row * bw->cols) + col;
+ frame = &frameset->children[index];
+ window = &bw->children[index];
+
+ /* Initialise common parts */
+ browser_window_initialise_common(BW_CREATE_NONE,
+ window, NULL);
+
+ /* window characteristics */
+ if (frame->children)
+ window->browser_window_type =
+ BROWSER_WINDOW_FRAMESET;
+ else
+ window->browser_window_type =
+ BROWSER_WINDOW_FRAME;
+ window->scrolling = frame->scrolling;
+ window->border = frame->border;
+ window->border_colour = frame->border_colour;
+ window->no_resize = frame->no_resize;
+ window->frame_width = frame->width;
+ window->frame_height = frame->height;
+ window->margin_width = frame->margin_width;
+ window->margin_height = frame->margin_height;
+ if (frame->name) {
+ window->name = strdup(frame->name);
+ if (!window->name) {
+ free(bw->children);
+ bw->children = NULL;
+ return NSERROR_NOMEM;
+ }
+ }
+
+ window->scale = bw->scale;
+
+ /* linking */
+ window->parent = bw;
+
+ if (window->name)
+ NSLOG(netsurf, INFO, "Created frame '%s'",
+ window->name);
+ else
+ NSLOG(netsurf, INFO,
+ "Created frame (unnamed)");
}
}
+
+ /* 2. Calculate dimensions */
+ browser_window_update_extent(bw);
+ browser_window_recalculate_frameset_internal(bw);
+
+ /* 3. Recurse for grandchildren */
+ for (row = 0; row < bw->rows; row++) {
+ for (col = 0; col < bw->cols; col++) {
+ index = (row * bw->cols) + col;
+ frame = &frameset->children[index];
+ window = &bw->children[index];
+
+ if (frame->children)
+ browser_window_create_frameset_internal(window, frame);
+ }
+ }
+
+ /* Use the URL of the first ancestor window containing html content
+ * as the referer */
+ for (window = bw; window->parent; window = window->parent) {
+ if (window->current_content &&
+ content_get_type(window->current_content) ==
+ CONTENT_HTML)
+ break;
+ }
+
+ parent = window->current_content;
+
+ /* 4. Launch content */
+ for (row = 0; row < bw->rows; row++) {
+ for (col = 0; col < bw->cols; col++) {
+ index = (row * bw->cols) + col;
+ frame = &frameset->children[index];
+ window = &bw->children[index];
+
+ if (frame->url) {
+ browser_window_navigate(window,
+ frame->url,
+ hlcache_handle_get_url(parent),
+ BW_NAVIGATE_HISTORY |
+ BW_NAVIGATE_UNVERIFIABLE,
+ NULL,
+ NULL,
+ parent);
+ }
+ }
+ }
+
+ return NSERROR_OK;
+}
+
+
+/* exported interface documented in desktop/frames.h */
+nserror browser_window_create_frameset(struct browser_window *bw)
+{
+ struct content_html_frames *frameset;
+
+ if (content_get_type(bw->current_content) != CONTENT_HTML) {
+ return NSERROR_OK;
+ }
+
+ frameset = html_get_frameset(bw->current_content);
+ if (frameset == NULL) {
+ return NSERROR_OK;
+ }
+
+ return browser_window_create_frameset_internal(bw, frameset);
+}
+
+
+
+
+/**
+ * Recalculate frameset positions following a resize.
+ *
+ * \param bw The browser window to reposition framesets for
+ */
+
+void browser_window_recalculate_frameset(struct browser_window *bw)
+{
+ if (content_get_type(bw->current_content) != CONTENT_HTML) {
+ return;
+ }
+
+ if (html_get_frameset(bw->current_content) == NULL) {
+ return;
+ }
+
+ browser_window_recalculate_frameset_internal(bw);
}
@@ -703,7 +780,7 @@ void browser_window_resize_frame(struct browser_window *bw, int x, int y)
}
if (change) {
- browser_window_recalculate_frameset(parent);
+ browser_window_recalculate_frameset_internal(parent);
}
}
diff --git a/desktop/frames.h b/desktop/frames.h
index 063e2c5..dda3182 100644
--- a/desktop/frames.h
+++ b/desktop/frames.h
@@ -16,12 +16,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
+/**
+ * \file
* Frame and frameset creation and manipulation (interface).
*/
-#ifndef _NETSURF_DESKTOP_FRAMES_H_
-#define _NETSURF_DESKTOP_FRAMES_H_
+#ifndef NETSURF_DESKTOP_FRAMES_H_
+#define NETSURF_DESKTOP_FRAMES_H_
struct scrollbar_msg_data;
struct content_html_iframe;
@@ -30,23 +31,40 @@ struct content_html_frames;
/**
* Create and open iframes for a browser window.
*
- * \param bw The browser window to create iframes for.
- * \param iframe The iframes to create from.
+ * \param bw The browser window to create iframes for.
* \return NSERROR_OK or error code on faliure.
*/
-nserror browser_window_create_iframes(struct browser_window *bw,
- struct content_html_iframe *iframe);
+nserror browser_window_create_iframes(struct browser_window *bw);
+
+/**
+ * Recalculate iframe positions following a resize.
+ *
+ * \param bw The browser window to reposition iframes for
+ */
void browser_window_recalculate_iframes(struct browser_window *bw);
/**
+ * Invalidate an iframe causing a redraw.
+ *
+ * \param bw The browser window to invalidate
+ */
+nserror browser_window_invalidate_iframe(struct browser_window *bw);
+
+/**
+ * Destroy iframes opened in browser_window_create_iframes()
+ *
+ * \param bw The browser window to destroy iframes for.
+ * \return NSERROR_OK
+ */
+nserror browser_window_destroy_iframes(struct browser_window *bw);
+
+/**
* Create and open a frameset for a browser window.
*
* \param[in,out] bw The browser window to create the frameset for
- * \param[in] frameset The frameset to create
* \return NSERROR_OK or error code on faliure
*/
-nserror browser_window_create_frameset(struct browser_window *bw,
- struct content_html_frames *frameset);
+nserror browser_window_create_frameset(struct browser_window *bw);
void browser_window_recalculate_frameset(struct browser_window *bw);
bool browser_window_frame_resize_start(struct browser_window *bw,
-----------------------------------------------------------------------
Summary of changes:
content/handlers/html/box.h | 8 -
content/handlers/html/box_construct.c | 6 -
content/handlers/html/box_special.c | 8 +-
desktop/browser_private.h | 7 +
desktop/browser_window.c | 85 +++------
desktop/frames.c | 331 ++++++++++++++++++++-------------
desktop/frames.h | 38 +++-
7 files changed, 271 insertions(+), 212 deletions(-)
diff --git a/content/handlers/html/box.h b/content/handlers/html/box.h
index b4da031..d0df735 100644
--- a/content/handlers/html/box.h
+++ b/content/handlers/html/box.h
@@ -448,12 +448,4 @@ struct box {
};
-/* Frame target names (constant pointers to save duplicating the strings many
- * times). We convert _blank to _top for user-friendliness. */
-extern const char *TARGET_SELF;
-extern const char *TARGET_PARENT;
-extern const char *TARGET_TOP;
-extern const char *TARGET_BLANK;
-
-
#endif
diff --git a/content/handlers/html/box_construct.c b/content/handlers/html/box_construct.c
index 5ae7552..5edd88e 100644
--- a/content/handlers/html/box_construct.c
+++ b/content/handlers/html/box_construct.c
@@ -85,12 +85,6 @@ struct box_construct_props {
static const content_type image_types = CONTENT_IMAGE;
-/* the strings are not important, since we just compare the pointers */
-const char *TARGET_SELF = "_self";
-const char *TARGET_PARENT = "_parent";
-const char *TARGET_TOP = "_top";
-const char *TARGET_BLANK = "_blank";
-
/**
* mapping from CSS display to box type this table must be in sync
* with libcss' css_display enum
diff --git a/content/handlers/html/box_special.c b/content/handlers/html/box_special.c
index 2332316..c6be9e6 100644
--- a/content/handlers/html/box_special.c
+++ b/content/handlers/html/box_special.c
@@ -716,18 +716,18 @@ box_a(dom_node *n,
if (err == DOM_NO_ERR && s != NULL) {
if (dom_string_caseless_lwc_isequal(s,
corestring_lwc__blank))
- box->target = TARGET_BLANK;
+ box->target = "_blank";
else if (dom_string_caseless_lwc_isequal(s,
corestring_lwc__top))
- box->target = TARGET_TOP;
+ box->target = "_top";
else if (dom_string_caseless_lwc_isequal(s,
corestring_lwc__parent))
- box->target = TARGET_PARENT;
+ box->target = "_parent";
else if (dom_string_caseless_lwc_isequal(s,
corestring_lwc__self))
/* the default may have been overridden by a
* <base target=...>, so this is different to 0 */
- box->target = TARGET_SELF;
+ box->target = "_self";
else {
/* 6.16 says that frame names must begin with [a-zA-Z]
* This doesn't match reality, so just take anything */
diff --git a/desktop/browser_private.h b/desktop/browser_private.h
index 8ed2dde..40c3b43 100644
--- a/desktop/browser_private.h
+++ b/desktop/browser_private.h
@@ -288,6 +288,13 @@ nserror browser_window_initialise_common(enum browser_window_create_flags flags,
/**
+ * Release all memory associated with a browser window.
+ *
+ * \param bw browser window
+ */
+nserror browser_window_destroy_internal(struct browser_window *bw);
+
+/**
* Get the dimensions of the area a browser window occupies
*
* \param bw The browser window to get dimensions of
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 7bc5cc5..423ff99 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -56,7 +56,6 @@
#include "css/utils.h"
#include "html/form_internal.h"
#include "html/html.h"
-#include "html/box.h"
#include "javascript/js.h"
#include "desktop/cookie_manager.h"
@@ -88,9 +87,6 @@
*/
#define FRAME_DEPTH 8
-/* Have to forward declare browser_window_destroy_internal */
-static void browser_window_destroy_internal(struct browser_window *bw);
-
/* Forward declare internal navigation function */
static nserror browser_window__navigate_internal(
struct browser_window *bw, struct browser_fetch_parameters *params);
@@ -114,14 +110,6 @@ static void browser_window_destroy_children(struct browser_window *bw)
bw->rows = 0;
bw->cols = 0;
}
- if (bw->iframes) {
- for (i = 0; i < bw->iframe_count; i++) {
- browser_window_destroy_internal(&bw->iframes[i]);
- }
- free(bw->iframes);
- bw->iframes = NULL;
- bw->iframe_count = 0;
- }
}
@@ -798,7 +786,8 @@ static void browser_window_update(struct browser_window *bw, bool scroll_to_top)
/** @todo don't do this if the user has scrolled */
frag_scroll(bw);
- html_redraw_a_box(bw->parent->current_content, bw->box);
+ browser_window_invalidate_iframe(bw);
+
break;
case BROWSER_WINDOW_FRAME:
@@ -919,15 +908,10 @@ static nserror browser_window_content_ready(struct browser_window *bw)
browser_window_set_status(bw, content_get_status_message(bw->current_content));
/* frames */
- if ((content_get_type(bw->current_content) == CONTENT_HTML) &&
- (html_get_frameset(bw->current_content) != NULL)) {
- res = browser_window_create_frameset(bw, html_get_frameset(bw->current_content));
- }
+ res = browser_window_create_frameset(bw);
- if (content_get_type(bw->current_content) == CONTENT_HTML &&
- html_get_iframe(bw->current_content) != NULL) {
- browser_window_create_iframes(bw, html_get_iframe(bw->current_content));
- }
+ /* iframes */
+ res = browser_window_create_iframes(bw);
/* Indicate page status may have changed */
if (res == NSERROR_OK) {
@@ -1004,6 +988,7 @@ browser_window__handle_ssl_query_response(bool proceed, void *pw)
browser_window_stop(bw);
browser_window_remove_caret(bw, false);
browser_window_destroy_children(bw);
+ browser_window_destroy_iframes(bw);
}
if (!proceed) {
@@ -1149,6 +1134,7 @@ browser_window__handle_userpass_response(nsurl *url,
browser_window_stop(bw);
browser_window_remove_caret(bw, false);
browser_window_destroy_children(bw);
+ browser_window_destroy_iframes(bw);
}
bw->internal_nav = false;
return browser_window__navigate_internal(bw, &bw->loading_parameters);
@@ -1560,14 +1546,12 @@ browser_window_callback(hlcache_handle *c, const hlcache_event *event, void *pw)
break;
case CONTENT_MSG_REFORMAT:
- if (c == bw->current_content &&
- content_get_type(c) == CONTENT_HTML) {
- /* reposition frames */
- if (html_get_frameset(c) != NULL)
- browser_window_recalculate_frameset(bw);
- /* reflow iframe positions */
- if (html_get_iframe(c) != NULL)
- browser_window_recalculate_iframes(bw);
+ if (c == bw->current_content) {
+ /* recompute frameset */
+ browser_window_recalculate_frameset(bw);
+
+ /* recompute iframe positions, sizes and scrollbars */
+ browser_window_recalculate_iframes(bw);
}
/* Hide any caret, but don't remove it */
@@ -1848,21 +1832,13 @@ static void scheduled_reformat(void *vbw)
}
}
-
-/**
- * Release all memory associated with a browser window.
- *
- * \param bw browser window
- */
-static void browser_window_destroy_internal(struct browser_window *bw)
+/* exported interface documented in desktop/browser_private.h */
+nserror browser_window_destroy_internal(struct browser_window *bw)
{
assert(bw);
- NSLOG(netsurf, INFO, "Destroying window");
-
- if (bw->children != NULL || bw->iframes != NULL) {
- browser_window_destroy_children(bw);
- }
+ browser_window_destroy_children(bw);
+ browser_window_destroy_iframes(bw);
/* Destroy scrollbars */
if (bw->scroll_x != NULL) {
@@ -1926,11 +1902,6 @@ static void browser_window_destroy_internal(struct browser_window *bw)
bw->favicon.current = NULL;
}
- if (bw->box != NULL) {
- bw->box->iframe = NULL;
- bw->box = NULL;
- }
-
if (bw->jsheap != NULL) {
js_destroyheap(bw->jsheap);
bw->jsheap = NULL;
@@ -1956,6 +1927,8 @@ static void browser_window_destroy_internal(struct browser_window *bw)
browser_window__free_fetch_parameters(&bw->loading_parameters);
NSLOG(netsurf, INFO, "Status text cache match:miss %d:%d",
bw->status.match, bw->status.miss);
+
+ return NSERROR_OK;
}
@@ -1991,7 +1964,7 @@ browser_window_set_scale_internal(struct browser_window *bw, float scale)
res = browser_window_set_scale_internal(&bw->children[i], scale);
}
- /* sale iframes */
+ /* scale iframes */
for (i = 0; i < bw->iframe_count; i++) {
res = browser_window_set_scale_internal(&bw->iframes[i], scale);
}
@@ -3487,6 +3460,7 @@ browser_window_navigate(struct browser_window *bw,
browser_window_stop(bw);
browser_window_remove_caret(bw, false);
browser_window_destroy_children(bw);
+ browser_window_destroy_iframes(bw);
/* Set up the fetch parameters */
memset(¶ms, 0, sizeof(params));
@@ -4389,7 +4363,7 @@ browser_window_find_target(struct browser_window *bw,
target = html_get_base_target(c);
}
if (target == NULL) {
- target = TARGET_SELF;
+ target = "_self";
}
/* allow the simple case of target="_blank" to be ignored if requested
@@ -4401,7 +4375,7 @@ browser_window_find_target(struct browser_window *bw,
/* not a mouse button 2 click
* not a mouse button 1 click with ctrl pressed
* configured to ignore target="_blank" */
- if ((target == TARGET_BLANK) || (!strcasecmp(target, "_blank")))
+ if (!strcasecmp(target, "_blank"))
return bw;
}
@@ -4412,8 +4386,7 @@ browser_window_find_target(struct browser_window *bw,
((mouse & BROWSER_MOUSE_CLICK_1) &&
(mouse & BROWSER_MOUSE_MOD_2))) ||
((nsoption_bool(button_2_tab)) &&
- ((target == TARGET_BLANK) ||
- (!strcasecmp(target, "_blank"))))) {
+ (!strcasecmp(target, "_blank")))) {
/* open in new tab if:
* - button_2 opens in new tab and button_2 was pressed
* OR
@@ -4439,8 +4412,7 @@ browser_window_find_target(struct browser_window *bw,
((mouse & BROWSER_MOUSE_CLICK_1) &&
(mouse & BROWSER_MOUSE_MOD_2))) ||
((!nsoption_bool(button_2_tab)) &&
- ((target == TARGET_BLANK) ||
- (!strcasecmp(target, "_blank"))))) {
+ (!strcasecmp(target, "_blank")))) {
/* open in new window if:
* - button_2 doesn't open in new tabs and button_2 was pressed
* OR
@@ -4460,14 +4432,13 @@ browser_window_find_target(struct browser_window *bw,
return bw;
}
return bw_target;
- } else if ((target == TARGET_SELF) || (!strcasecmp(target, "_self"))) {
+ } else if (!strcasecmp(target, "_self")) {
return bw;
- } else if ((target == TARGET_PARENT) ||
- (!strcasecmp(target, "_parent"))) {
+ } else if (!strcasecmp(target, "_parent")) {
if (bw->parent)
return bw->parent;
return bw;
- } else if ((target == TARGET_TOP) || (!strcasecmp(target, "_top"))) {
+ } else if (!strcasecmp(target, "_top")) {
while (bw->parent)
bw = bw->parent;
return bw;
diff --git a/desktop/frames.c b/desktop/frames.c
index 0d70029..85f1879 100644
--- a/desktop/frames.c
+++ b/desktop/frames.c
@@ -181,20 +181,35 @@ void browser_window_handle_scrollbars(struct browser_window *bw)
scrollbar_make_pair(bw->scroll_x, bw->scroll_y);
}
+/* exported function documented in desktop/frames.h */
+nserror browser_window_invalidate_iframe(struct browser_window *bw)
+{
+ html_redraw_a_box(bw->parent->current_content, bw->box);
+ return NSERROR_OK;
+}
/* exported function documented in desktop/frames.h */
-nserror browser_window_create_iframes(struct browser_window *bw,
- struct content_html_iframe *iframe)
+nserror browser_window_create_iframes(struct browser_window *bw)
{
+ nserror ret = NSERROR_OK;
struct browser_window *window;
struct content_html_iframe *cur;
struct rect rect;
int iframes = 0;
int index;
- nserror ret = NSERROR_OK;
+ struct content_html_iframe *iframe;
+
+ bw->iframe_count = 0;
+
+ /* only html contents can have iframes */
+ if (content_get_type(bw->current_content) != CONTENT_HTML) {
+ return NSERROR_OK;
+ }
+ /* obtain the iframes for this content */
+ iframe = html_get_iframe(bw->current_content);
if (iframe == NULL) {
- return NSERROR_BAD_PARAMETER;
+ return NSERROR_OK;
}
/* Count iframe list and allocate enough space within the
@@ -272,12 +287,7 @@ nserror browser_window_create_iframes(struct browser_window *bw,
}
-/**
- * Recalculate iframe positions following a resize.
- *
- * \param bw The browser window to reposition iframes for
- */
-
+/* exported function documented in desktop/frames.h */
void browser_window_recalculate_iframes(struct browser_window *bw)
{
struct browser_window *window;
@@ -293,123 +303,23 @@ void browser_window_recalculate_iframes(struct browser_window *bw)
}
-/* exported interface documented in desktop/frames.h */
-nserror browser_window_create_frameset(struct browser_window *bw,
- struct content_html_frames *frameset)
+/* exported function documented in desktop/frames.h */
+nserror browser_window_destroy_iframes(struct browser_window *bw)
{
- int row, col, index;
- struct content_html_frames *frame;
- struct browser_window *window;
- hlcache_handle *parent;
-
- assert(bw && frameset);
-
- /* 1. Create children */
- assert(bw->children == NULL);
- assert(frameset->cols + frameset->rows != 0);
-
- bw->children = calloc((frameset->cols * frameset->rows), sizeof(*bw));
- if (!bw->children) {
- return NSERROR_NOMEM;
- }
-
- bw->cols = frameset->cols;
- bw->rows = frameset->rows;
- for (row = 0; row < bw->rows; row++) {
- for (col = 0; col < bw->cols; col++) {
- index = (row * bw->cols) + col;
- frame = &frameset->children[index];
- window = &bw->children[index];
-
- /* Initialise common parts */
- browser_window_initialise_common(BW_CREATE_NONE,
- window, NULL);
+ int i;
- /* window characteristics */
- if (frame->children)
- window->browser_window_type =
- BROWSER_WINDOW_FRAMESET;
- else
- window->browser_window_type =
- BROWSER_WINDOW_FRAME;
- window->scrolling = frame->scrolling;
- window->border = frame->border;
- window->border_colour = frame->border_colour;
- window->no_resize = frame->no_resize;
- window->frame_width = frame->width;
- window->frame_height = frame->height;
- window->margin_width = frame->margin_width;
- window->margin_height = frame->margin_height;
- if (frame->name) {
- window->name = strdup(frame->name);
- if (!window->name) {
- free(bw->children);
- bw->children = NULL;
- return NSERROR_NOMEM;
- }
+ if (bw->iframes != NULL) {
+ for (i = 0; i < bw->iframe_count; i++) {
+ if (bw->iframes[i].box != NULL) {
+ bw->iframes[i].box->iframe = NULL;
+ bw->iframes[i].box = NULL;
}
-
- window->scale = bw->scale;
-
- /* linking */
- window->parent = bw;
-
- if (window->name)
- NSLOG(netsurf, INFO, "Created frame '%s'",
- window->name);
- else
- NSLOG(netsurf, INFO,
- "Created frame (unnamed)");
- }
- }
-
- /* 2. Calculate dimensions */
- browser_window_update_extent(bw);
- browser_window_recalculate_frameset(bw);
-
- /* 3. Recurse for grandchildren */
- for (row = 0; row < bw->rows; row++) {
- for (col = 0; col < bw->cols; col++) {
- index = (row * bw->cols) + col;
- frame = &frameset->children[index];
- window = &bw->children[index];
-
- if (frame->children)
- browser_window_create_frameset(window, frame);
+ browser_window_destroy_internal(&bw->iframes[i]);
}
+ free(bw->iframes);
+ bw->iframes = NULL;
+ bw->iframe_count = 0;
}
-
- /* Use the URL of the first ancestor window containing html content
- * as the referer */
- for (window = bw; window->parent; window = window->parent) {
- if (window->current_content &&
- content_get_type(window->current_content) ==
- CONTENT_HTML)
- break;
- }
-
- parent = window->current_content;
-
- /* 4. Launch content */
- for (row = 0; row < bw->rows; row++) {
- for (col = 0; col < bw->cols; col++) {
- index = (row * bw->cols) + col;
- frame = &frameset->children[index];
- window = &bw->children[index];
-
- if (frame->url) {
- browser_window_navigate(window,
- frame->url,
- hlcache_handle_get_url(parent),
- BW_NAVIGATE_HISTORY |
- BW_NAVIGATE_UNVERIFIABLE,
- NULL,
- NULL,
- parent);
- }
- }
- }
-
return NSERROR_OK;
}
@@ -417,10 +327,9 @@ nserror browser_window_create_frameset(struct browser_window *bw,
/**
* Recalculate frameset positions following a resize.
*
- * \param bw The browser window to reposition framesets for
+ * \param bw The browser window to reposition framesets for
*/
-
-void browser_window_recalculate_frameset(struct browser_window *bw)
+static void browser_window_recalculate_frameset_internal(struct browser_window *bw)
{
int widths[bw->cols][bw->rows];
int heights[bw->cols][bw->rows];
@@ -646,9 +555,177 @@ void browser_window_recalculate_frameset(struct browser_window *bw)
x += widths[col][row];
if (window->children)
- browser_window_recalculate_frameset(window);
+ browser_window_recalculate_frameset_internal(window);
+ }
+ }
+}
+
+
+/**
+ * Create and open a frameset for a browser window.
+ *
+ * \param[in,out] bw The browser window to create the frameset for
+ * \param[in] frameset The frameset to create
+ * \return NSERROR_OK or error code on faliure
+ */
+static nserror
+browser_window_create_frameset_internal(struct browser_window *bw,
+ struct content_html_frames *frameset)
+{
+ int row, col, index;
+ struct content_html_frames *frame;
+ struct browser_window *window;
+ hlcache_handle *parent;
+
+ assert(bw && frameset);
+
+ /* 1. Create children */
+ assert(bw->children == NULL);
+ assert(frameset->cols + frameset->rows != 0);
+
+ bw->children = calloc((frameset->cols * frameset->rows), sizeof(*bw));
+ if (!bw->children) {
+ return NSERROR_NOMEM;
+ }
+
+ bw->cols = frameset->cols;
+ bw->rows = frameset->rows;
+ for (row = 0; row < bw->rows; row++) {
+ for (col = 0; col < bw->cols; col++) {
+ index = (row * bw->cols) + col;
+ frame = &frameset->children[index];
+ window = &bw->children[index];
+
+ /* Initialise common parts */
+ browser_window_initialise_common(BW_CREATE_NONE,
+ window, NULL);
+
+ /* window characteristics */
+ if (frame->children)
+ window->browser_window_type =
+ BROWSER_WINDOW_FRAMESET;
+ else
+ window->browser_window_type =
+ BROWSER_WINDOW_FRAME;
+ window->scrolling = frame->scrolling;
+ window->border = frame->border;
+ window->border_colour = frame->border_colour;
+ window->no_resize = frame->no_resize;
+ window->frame_width = frame->width;
+ window->frame_height = frame->height;
+ window->margin_width = frame->margin_width;
+ window->margin_height = frame->margin_height;
+ if (frame->name) {
+ window->name = strdup(frame->name);
+ if (!window->name) {
+ free(bw->children);
+ bw->children = NULL;
+ return NSERROR_NOMEM;
+ }
+ }
+
+ window->scale = bw->scale;
+
+ /* linking */
+ window->parent = bw;
+
+ if (window->name)
+ NSLOG(netsurf, INFO, "Created frame '%s'",
+ window->name);
+ else
+ NSLOG(netsurf, INFO,
+ "Created frame (unnamed)");
}
}
+
+ /* 2. Calculate dimensions */
+ browser_window_update_extent(bw);
+ browser_window_recalculate_frameset_internal(bw);
+
+ /* 3. Recurse for grandchildren */
+ for (row = 0; row < bw->rows; row++) {
+ for (col = 0; col < bw->cols; col++) {
+ index = (row * bw->cols) + col;
+ frame = &frameset->children[index];
+ window = &bw->children[index];
+
+ if (frame->children)
+ browser_window_create_frameset_internal(window, frame);
+ }
+ }
+
+ /* Use the URL of the first ancestor window containing html content
+ * as the referer */
+ for (window = bw; window->parent; window = window->parent) {
+ if (window->current_content &&
+ content_get_type(window->current_content) ==
+ CONTENT_HTML)
+ break;
+ }
+
+ parent = window->current_content;
+
+ /* 4. Launch content */
+ for (row = 0; row < bw->rows; row++) {
+ for (col = 0; col < bw->cols; col++) {
+ index = (row * bw->cols) + col;
+ frame = &frameset->children[index];
+ window = &bw->children[index];
+
+ if (frame->url) {
+ browser_window_navigate(window,
+ frame->url,
+ hlcache_handle_get_url(parent),
+ BW_NAVIGATE_HISTORY |
+ BW_NAVIGATE_UNVERIFIABLE,
+ NULL,
+ NULL,
+ parent);
+ }
+ }
+ }
+
+ return NSERROR_OK;
+}
+
+
+/* exported interface documented in desktop/frames.h */
+nserror browser_window_create_frameset(struct browser_window *bw)
+{
+ struct content_html_frames *frameset;
+
+ if (content_get_type(bw->current_content) != CONTENT_HTML) {
+ return NSERROR_OK;
+ }
+
+ frameset = html_get_frameset(bw->current_content);
+ if (frameset == NULL) {
+ return NSERROR_OK;
+ }
+
+ return browser_window_create_frameset_internal(bw, frameset);
+}
+
+
+
+
+/**
+ * Recalculate frameset positions following a resize.
+ *
+ * \param bw The browser window to reposition framesets for
+ */
+
+void browser_window_recalculate_frameset(struct browser_window *bw)
+{
+ if (content_get_type(bw->current_content) != CONTENT_HTML) {
+ return;
+ }
+
+ if (html_get_frameset(bw->current_content) == NULL) {
+ return;
+ }
+
+ browser_window_recalculate_frameset_internal(bw);
}
@@ -703,7 +780,7 @@ void browser_window_resize_frame(struct browser_window *bw, int x, int y)
}
if (change) {
- browser_window_recalculate_frameset(parent);
+ browser_window_recalculate_frameset_internal(parent);
}
}
diff --git a/desktop/frames.h b/desktop/frames.h
index 063e2c5..dda3182 100644
--- a/desktop/frames.h
+++ b/desktop/frames.h
@@ -16,12 +16,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
+/**
+ * \file
* Frame and frameset creation and manipulation (interface).
*/
-#ifndef _NETSURF_DESKTOP_FRAMES_H_
-#define _NETSURF_DESKTOP_FRAMES_H_
+#ifndef NETSURF_DESKTOP_FRAMES_H_
+#define NETSURF_DESKTOP_FRAMES_H_
struct scrollbar_msg_data;
struct content_html_iframe;
@@ -30,23 +31,40 @@ struct content_html_frames;
/**
* Create and open iframes for a browser window.
*
- * \param bw The browser window to create iframes for.
- * \param iframe The iframes to create from.
+ * \param bw The browser window to create iframes for.
* \return NSERROR_OK or error code on faliure.
*/
-nserror browser_window_create_iframes(struct browser_window *bw,
- struct content_html_iframe *iframe);
+nserror browser_window_create_iframes(struct browser_window *bw);
+
+/**
+ * Recalculate iframe positions following a resize.
+ *
+ * \param bw The browser window to reposition iframes for
+ */
void browser_window_recalculate_iframes(struct browser_window *bw);
/**
+ * Invalidate an iframe causing a redraw.
+ *
+ * \param bw The browser window to invalidate
+ */
+nserror browser_window_invalidate_iframe(struct browser_window *bw);
+
+/**
+ * Destroy iframes opened in browser_window_create_iframes()
+ *
+ * \param bw The browser window to destroy iframes for.
+ * \return NSERROR_OK
+ */
+nserror browser_window_destroy_iframes(struct browser_window *bw);
+
+/**
* Create and open a frameset for a browser window.
*
* \param[in,out] bw The browser window to create the frameset for
- * \param[in] frameset The frameset to create
* \return NSERROR_OK or error code on faliure
*/
-nserror browser_window_create_frameset(struct browser_window *bw,
- struct content_html_frames *frameset);
+nserror browser_window_create_frameset(struct browser_window *bw);
void browser_window_recalculate_frameset(struct browser_window *bw);
bool browser_window_frame_resize_start(struct browser_window *bw,
--
NetSurf Browser
2 years, 9 months
netsurf: branch master updated. release/3.10-10-g6d62a06
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/6d62a068995fb1a50777e...
...commit http://git.netsurf-browser.org/netsurf.git/commit/6d62a068995fb1a50777e90...
...tree http://git.netsurf-browser.org/netsurf.git/tree/6d62a068995fb1a50777e90c0...
The branch, master has been updated
via 6d62a068995fb1a50777e90c0b0f36a15eda0903 (commit)
from 44e5aea7b50ab80ea2882bc89b0acf25f1b7730d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=6d62a068995fb1a5077...
commit 6d62a068995fb1a50777e90c0b0f36a15eda0903
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Amiga: correct schedule parameter
diff --git a/frontends/amiga/pageinfo.c b/frontends/amiga/pageinfo.c
index 79e3ac6..54de0d0 100644
--- a/frontends/amiga/pageinfo.c
+++ b/frontends/amiga/pageinfo.c
@@ -100,7 +100,7 @@ ami_pageinfo_event(struct ami_corewindow *ami_cw, ULONG result)
{
if((result & WMHI_CLASSMASK) == WMHI_INACTIVE) {
/* Window went inactive, so schedule to close it */
- ami_schedule(0, ami_pageinfo_close_cb, pageinfo_win);
+ ami_schedule(0, ami_pageinfo_close_cb, ami_cw);
/* NB: do not return TRUE here as we're still open for now */
}
return FALSE;
-----------------------------------------------------------------------
Summary of changes:
frontends/amiga/pageinfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontends/amiga/pageinfo.c b/frontends/amiga/pageinfo.c
index 79e3ac6..54de0d0 100644
--- a/frontends/amiga/pageinfo.c
+++ b/frontends/amiga/pageinfo.c
@@ -100,7 +100,7 @@ ami_pageinfo_event(struct ami_corewindow *ami_cw, ULONG result)
{
if((result & WMHI_CLASSMASK) == WMHI_INACTIVE) {
/* Window went inactive, so schedule to close it */
- ami_schedule(0, ami_pageinfo_close_cb, pageinfo_win);
+ ami_schedule(0, ami_pageinfo_close_cb, ami_cw);
/* NB: do not return TRUE here as we're still open for now */
}
return FALSE;
--
NetSurf Browser
2 years, 9 months
netsurf: branch master updated. release/3.10-9-g44e5aea
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/44e5aea7b50ab80ea2882...
...commit http://git.netsurf-browser.org/netsurf.git/commit/44e5aea7b50ab80ea2882bc...
...tree http://git.netsurf-browser.org/netsurf.git/tree/44e5aea7b50ab80ea2882bc89...
The branch, master has been updated
via 44e5aea7b50ab80ea2882bc89b0acf25f1b7730d (commit)
from 8924f0c7f97103a27576ca1a09b7272da2af0c04 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=44e5aea7b50ab80ea28...
commit 44e5aea7b50ab80ea2882bc89b0acf25f1b7730d
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Amiga: avoid use after free
Use the scheduler to trigger page info close as that does not allow the same event to be in the queue multiple times
diff --git a/frontends/amiga/pageinfo.c b/frontends/amiga/pageinfo.c
index d980281..79e3ac6 100644
--- a/frontends/amiga/pageinfo.c
+++ b/frontends/amiga/pageinfo.c
@@ -99,9 +99,9 @@ static BOOL
ami_pageinfo_event(struct ami_corewindow *ami_cw, ULONG result)
{
if((result & WMHI_CLASSMASK) == WMHI_INACTIVE) {
- /* Window went inactive, so close it */
- ami_pageinfo_destroy(ami_cw);
- return TRUE;
+ /* Window went inactive, so schedule to close it */
+ ami_schedule(0, ami_pageinfo_close_cb, pageinfo_win);
+ /* NB: do not return TRUE here as we're still open for now */
}
return FALSE;
}
-----------------------------------------------------------------------
Summary of changes:
frontends/amiga/pageinfo.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/frontends/amiga/pageinfo.c b/frontends/amiga/pageinfo.c
index d980281..79e3ac6 100644
--- a/frontends/amiga/pageinfo.c
+++ b/frontends/amiga/pageinfo.c
@@ -99,9 +99,9 @@ static BOOL
ami_pageinfo_event(struct ami_corewindow *ami_cw, ULONG result)
{
if((result & WMHI_CLASSMASK) == WMHI_INACTIVE) {
- /* Window went inactive, so close it */
- ami_pageinfo_destroy(ami_cw);
- return TRUE;
+ /* Window went inactive, so schedule to close it */
+ ami_schedule(0, ami_pageinfo_close_cb, pageinfo_win);
+ /* NB: do not return TRUE here as we're still open for now */
}
return FALSE;
}
--
NetSurf Browser
2 years, 9 months
netsurf: branch master updated. release/3.10-8-g8924f0c
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/8924f0c7f97103a27576c...
...commit http://git.netsurf-browser.org/netsurf.git/commit/8924f0c7f97103a27576ca1...
...tree http://git.netsurf-browser.org/netsurf.git/tree/8924f0c7f97103a27576ca1a0...
The branch, master has been updated
via 8924f0c7f97103a27576ca1a09b7272da2af0c04 (commit)
via 2b8501b342dc9ac7c3e886c2c93ef73c326392c7 (commit)
via 860fbc2f8c09339213c79d815dce0f67b51f4348 (commit)
from 53d07a8e462488891f248571fd27b00197790bf7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=8924f0c7f97103a2757...
commit 8924f0c7f97103a27576ca1a09b7272da2af0c04
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
fix warnings in amiga stringview
diff --git a/frontends/amiga/stringview/stringview.c b/frontends/amiga/stringview/stringview.c
index 245782b..60c694a 100755
--- a/frontends/amiga/stringview/stringview.c
+++ b/frontends/amiga/stringview/stringview.c
@@ -161,7 +161,7 @@ static uint32 myStringSearch( Class *cl, Object *obj )
if(searchString)
{
searchString += 3;
- if (bufpos >= searchString - data->SearchBuffer)
+ if (bufpos >= (uint32)(searchString - data->SearchBuffer))
bufpos -= searchString - data->SearchBuffer;
}
else
@@ -848,7 +848,7 @@ Class *MakeStringClass( void )
if ( cl )
{
- cl->cl_Dispatcher.h_Entry = (uint32(*)())myStringClassDispatcher;
+ cl->cl_Dispatcher.h_Entry = (uint32(*)(void))myStringClassDispatcher;
}
URLHistory_Init();
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=2b8501b342dc9ac7c3e...
commit 2b8501b342dc9ac7c3e886c2c93ef73c326392c7
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
fix incorrect content handler function table operations return types
diff --git a/frontends/amiga/dt_anim.c b/frontends/amiga/dt_anim.c
index 99ccffe..a9fe809 100644
--- a/frontends/amiga/dt_anim.c
+++ b/frontends/amiga/dt_anim.c
@@ -74,9 +74,9 @@ static void amiga_dt_anim_destroy(struct content *c);
static bool amiga_dt_anim_redraw(struct content *c,
struct content_redraw_data *data, const struct rect *clip,
const struct redraw_context *ctx);
-static void amiga_dt_anim_open(struct content *c, struct browser_window *bw,
+static nserror amiga_dt_anim_open(struct content *c, struct browser_window *bw,
struct content *page, struct object_params *params);
-static void amiga_dt_anim_close(struct content *c);
+static nserror amiga_dt_anim_close(struct content *c);
static nserror amiga_dt_anim_clone(const struct content *old, struct content **newc);
static content_type amiga_dt_anim_content_type(void);
@@ -290,18 +290,18 @@ bool amiga_dt_anim_redraw(struct content *c,
* \param box box containing c, or 0 if not an object
* \param params object parameters, or 0 if not an object
*/
-void amiga_dt_anim_open(struct content *c, struct browser_window *bw,
+nserror amiga_dt_anim_open(struct content *c, struct browser_window *bw,
struct content *page, struct object_params *params)
{
NSLOG(netsurf, INFO, "amiga_dt_anim_open");
- return;
+ return NSERROR_OK;
}
-void amiga_dt_anim_close(struct content *c)
+nserror amiga_dt_anim_close(struct content *c)
{
NSLOG(netsurf, INFO, "amiga_dt_anim_close");
- return;
+ return NSERROR_OK;
}
void amiga_dt_anim_reformat(struct content *c, int width, int height)
diff --git a/frontends/amiga/dt_sound.c b/frontends/amiga/dt_sound.c
index e008103..8b63d6a 100644
--- a/frontends/amiga/dt_sound.c
+++ b/frontends/amiga/dt_sound.c
@@ -58,7 +58,7 @@ static void amiga_dt_sound_destroy(struct content *c);
static bool amiga_dt_sound_redraw(struct content *c,
struct content_redraw_data *data, const struct rect *clip,
const struct redraw_context *ctx);
-static void amiga_dt_sound_open(struct content *c, struct browser_window *bw,
+static nserror amiga_dt_sound_open(struct content *c, struct browser_window *bw,
struct content *page, struct object_params *params);
static nserror amiga_dt_sound_clone(const struct content *old, struct content **newc);
static content_type amiga_dt_sound_content_type(void);
@@ -221,7 +221,7 @@ bool amiga_dt_sound_redraw(struct content *c,
}
-void amiga_dt_sound_open(struct content *c, struct browser_window *bw,
+nserror amiga_dt_sound_open(struct content *c, struct browser_window *bw,
struct content *page, struct object_params *params)
{
amiga_dt_sound_content *plugin = (amiga_dt_sound_content *) c;
@@ -248,7 +248,7 @@ void amiga_dt_sound_open(struct content *c, struct browser_window *bw,
if(plugin->dto && (plugin->immediate == true))
amiga_dt_sound_play(plugin->dto);
- return;
+ return NSERROR_OK;
}
diff --git a/frontends/amiga/plugin_hack.c b/frontends/amiga/plugin_hack.c
index fa75bd9..a775936 100644
--- a/frontends/amiga/plugin_hack.c
+++ b/frontends/amiga/plugin_hack.c
@@ -53,9 +53,9 @@ static void amiga_plugin_hack_destroy(struct content *c);
static bool amiga_plugin_hack_redraw(struct content *c,
struct content_redraw_data *data, const struct rect *clip,
const struct redraw_context *ctx);
-static void amiga_plugin_hack_open(struct content *c, struct browser_window *bw,
+static nserror amiga_plugin_hack_open(struct content *c, struct browser_window *bw,
struct content *page, struct object_params *params);
-static void amiga_plugin_hack_close(struct content *c);
+static nserror amiga_plugin_hack_close(struct content *c);
static nserror amiga_plugin_hack_clone(const struct content *old, struct content **newc);
static content_type amiga_plugin_hack_content_type(void);
@@ -186,7 +186,7 @@ bool amiga_plugin_hack_redraw(struct content *c,
* object within a page
* \param params object parameters, or 0 if not an object
*/
-void amiga_plugin_hack_open(struct content *c, struct browser_window *bw,
+nserror amiga_plugin_hack_open(struct content *c, struct browser_window *bw,
struct content *page, struct object_params *params)
{
NSLOG(netsurf, INFO, "amiga_plugin_hack_open %s",
@@ -199,13 +199,13 @@ void amiga_plugin_hack_open(struct content *c, struct browser_window *bw,
c->height = 0;
}
- return;
+ return NSERROR_OK;
}
-void amiga_plugin_hack_close(struct content *c)
+nserror amiga_plugin_hack_close(struct content *c)
{
NSLOG(netsurf, INFO, "amiga_plugin_hack_close");
- return;
+ return NSERROR_OK;
}
void amiga_plugin_hack_reformat(struct content *c, int width, int height)
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=860fbc2f8c09339213c...
commit 860fbc2f8c09339213c79d815dce0f67b51f4348
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
make browser_window_update internal to browser window as intended
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 096b944..7bc5cc5 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -709,6 +709,129 @@ browser_window_convert_to_download(struct browser_window *bw,
/**
+ * scroll to a fragment if present
+ *
+ * \param bw browser window
+ * \return true if the scroll was sucessful
+ */
+static bool frag_scroll(struct browser_window *bw)
+{
+ struct rect rect;
+
+ if (bw->frag_id == NULL) {
+ return false;
+ }
+
+ if (!html_get_id_offset(bw->current_content,
+ bw->frag_id,
+ &rect.x0,
+ &rect.y0)) {
+ return false;
+ }
+
+ rect.x1 = rect.x0;
+ rect.y1 = rect.y0;
+ if (browser_window_set_scroll(bw, &rect) == NSERROR_OK) {
+ if (bw->current_content != NULL &&
+ bw->history != NULL &&
+ bw->history->current != NULL) {
+ browser_window_history_update(bw, bw->current_content);
+ }
+ return true;
+ }
+ return false;
+}
+
+
+/**
+ * Redraw browser window, set extent to content, and update title.
+ *
+ * \param bw browser_window
+ * \param scroll_to_top move view to top of page
+ */
+static void browser_window_update(struct browser_window *bw, bool scroll_to_top)
+{
+ static const struct rect zrect = {
+ .x0 = 0,
+ .y0 = 0,
+ .x1 = 0,
+ .y1 = 0
+ };
+
+ if (bw->current_content == NULL) {
+ return;
+ }
+
+ switch (bw->browser_window_type) {
+
+ case BROWSER_WINDOW_NORMAL:
+ /* Root browser window, constituting a front end window/tab */
+ guit->window->set_title(bw->window,
+ content_get_title(bw->current_content));
+
+ browser_window_update_extent(bw);
+
+ /* if frag_id exists, then try to scroll to it */
+ /** @todo don't do this if the user has scrolled */
+ if (!frag_scroll(bw)) {
+ if (scroll_to_top) {
+ browser_window_set_scroll(bw, &zrect);
+ }
+ }
+
+ guit->window->invalidate(bw->window, NULL);
+
+ break;
+
+ case BROWSER_WINDOW_IFRAME:
+ /* Internal iframe browser window */
+ assert(bw->parent != NULL);
+ assert(bw->parent->current_content != NULL);
+
+ browser_window_update_extent(bw);
+
+ if (scroll_to_top) {
+ browser_window_set_scroll(bw, &zrect);
+ }
+
+ /* if frag_id exists, then try to scroll to it */
+ /** @todo don't do this if the user has scrolled */
+ frag_scroll(bw);
+
+ html_redraw_a_box(bw->parent->current_content, bw->box);
+ break;
+
+ case BROWSER_WINDOW_FRAME:
+ {
+ struct rect rect;
+ browser_window_update_extent(bw);
+
+ if (scroll_to_top) {
+ browser_window_set_scroll(bw, &zrect);
+ }
+
+ /* if frag_id exists, then try to scroll to it */
+ /** @todo don't do this if the user has scrolled */
+ frag_scroll(bw);
+
+ rect.x0 = scrollbar_get_offset(bw->scroll_x);
+ rect.y0 = scrollbar_get_offset(bw->scroll_y);
+ rect.x1 = rect.x0 + bw->width;
+ rect.y1 = rect.y0 + bw->height;
+
+ browser_window_invalidate_rect(bw, &rect);
+ }
+ break;
+
+ default:
+ case BROWSER_WINDOW_FRAMESET:
+ /* Nothing to do */
+ break;
+ }
+}
+
+
+/**
* handle message for content ready on browser window
*/
static nserror browser_window_content_ready(struct browser_window *bw)
@@ -1837,41 +1960,6 @@ static void browser_window_destroy_internal(struct browser_window *bw)
/**
- * scroll to a fragment if present
- *
- * \param bw browser window
- * \return true if the scroll was sucessful
- */
-static bool frag_scroll(struct browser_window *bw)
-{
- struct rect rect;
-
- if (bw->frag_id == NULL) {
- return false;
- }
-
- if (!html_get_id_offset(bw->current_content,
- bw->frag_id,
- &rect.x0,
- &rect.y0)) {
- return false;
- }
-
- rect.x1 = rect.x0;
- rect.y1 = rect.y0;
- if (browser_window_set_scroll(bw, &rect) == NSERROR_OK) {
- if (bw->current_content != NULL &&
- bw->history != NULL &&
- bw->history->current != NULL) {
- browser_window_history_update(bw, bw->current_content);
- }
- return true;
- }
- return false;
-}
-
-
-/**
* Set browser window scale.
*
* \param bw Browser window.
@@ -2589,7 +2677,7 @@ browser_window_redraw(struct browser_window *bw,
/* Set current child */
child = &bw->children[cur_child];
- /* Get frame edge box in global coordinates */
+ /* Get frame edge area in global coordinates */
content_clip.x0 = (x + child->x) * child->scale;
content_clip.y0 = (y + child->y) * child->scale;
content_clip.x1 = content_clip.x0 +
@@ -3994,89 +4082,6 @@ browser_window_set_dimensions(struct browser_window *bw, int width, int height)
}
-/* Exported interface, documented in netsurf/browser_window.h */
-void browser_window_update(struct browser_window *bw, bool scroll_to_top)
-{
- static const struct rect zrect = {
- .x0 = 0,
- .y0 = 0,
- .x1 = 0,
- .y1 = 0
- };
-
- if (bw->current_content == NULL) {
- return;
- }
-
- switch (bw->browser_window_type) {
-
- case BROWSER_WINDOW_NORMAL:
- /* Root browser window, constituting a front end window/tab */
- guit->window->set_title(bw->window,
- content_get_title(bw->current_content));
-
- browser_window_update_extent(bw);
-
- /* if frag_id exists, then try to scroll to it */
- /** @todo don't do this if the user has scrolled */
- if (!frag_scroll(bw)) {
- if (scroll_to_top) {
- browser_window_set_scroll(bw, &zrect);
- }
- }
-
- guit->window->invalidate(bw->window, NULL);
-
- break;
-
- case BROWSER_WINDOW_IFRAME:
- /* Internal iframe browser window */
- assert(bw->parent != NULL);
- assert(bw->parent->current_content != NULL);
-
- browser_window_update_extent(bw);
-
- if (scroll_to_top) {
- browser_window_set_scroll(bw, &zrect);
- }
-
- /* if frag_id exists, then try to scroll to it */
- /** @todo don't do this if the user has scrolled */
- frag_scroll(bw);
-
- html_redraw_a_box(bw->parent->current_content, bw->box);
- break;
-
- case BROWSER_WINDOW_FRAME:
- {
- struct rect rect;
- browser_window_update_extent(bw);
-
- if (scroll_to_top) {
- browser_window_set_scroll(bw, &zrect);
- }
-
- /* if frag_id exists, then try to scroll to it */
- /** @todo don't do this if the user has scrolled */
- frag_scroll(bw);
-
- rect.x0 = scrollbar_get_offset(bw->scroll_x);
- rect.y0 = scrollbar_get_offset(bw->scroll_y);
- rect.x1 = rect.x0 + bw->width;
- rect.y1 = rect.y0 + bw->height;
-
- browser_window_invalidate_rect(bw, &rect);
- }
- break;
-
- default:
- case BROWSER_WINDOW_FRAMESET:
- /* Nothing to do */
- break;
- }
-}
-
-
/* Exported interface, documented in browser/browser_private.h */
nserror
browser_window_invalidate_rect(struct browser_window *bw, struct rect *rect)
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 673f751..36ee756 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -3596,6 +3596,135 @@ static void ami_change_tab(struct gui_window_2 *gwin, int direction)
ami_switch_tab(gwin, true);
}
+
+static void gui_window_set_title(struct gui_window *g, const char *restrict title)
+{
+ struct Node *node;
+ char *restrict utf8title;
+
+ if(!g) return;
+ if(!title) return;
+
+ utf8title = ami_utf8_easy((char *)title);
+
+ if(g->tab_node) {
+ node = g->tab_node;
+
+ if((g->tabtitle == NULL) || (strcmp(utf8title, g->tabtitle)))
+ {
+ SetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS],
+ g->shared->win, NULL,
+ CLICKTAB_Labels, ~0,
+ TAG_DONE);
+
+ if(g->tabtitle) free(g->tabtitle);
+ g->tabtitle = strdup(utf8title);
+
+ SetClickTabNodeAttrs(node, TNA_Text, g->tabtitle,
+ TNA_HintInfo, g->tabtitle,
+ TAG_DONE);
+
+ RefreshSetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS],
+ g->shared->win, NULL,
+ CLICKTAB_Labels, &g->shared->tab_list,
+ TAG_DONE);
+
+ if(ClickTabBase->lib_Version < 53)
+ RethinkLayout((struct Gadget *)g->shared->objects[GID_TABLAYOUT],
+ g->shared->win, NULL, TRUE);
+ }
+ }
+
+ if(g == g->shared->gw) {
+ if((g->shared->wintitle == NULL) || (strcmp(utf8title, g->shared->wintitle)))
+ {
+ if(g->shared->wintitle) free(g->shared->wintitle);
+ g->shared->wintitle = strdup(utf8title);
+ SetWindowTitles(g->shared->win, g->shared->wintitle, ami_gui_get_screen_title());
+ }
+ }
+
+ ami_utf8_free(utf8title);
+}
+
+static void gui_window_update_extent(struct gui_window *g)
+{
+ struct IBox *bbox;
+
+ if(!g || !g->bw) return;
+ if(browser_window_has_content(g->bw) == false) return;
+
+ if(g == g->shared->gw) {
+ int width, height;
+ if(ami_gui_get_space_box((Object *)g->shared->objects[GID_BROWSER], &bbox) != NSERROR_OK) {
+ amiga_warn_user("NoMemory", "");
+ return;
+ }
+
+ if(g->shared->objects[GID_VSCROLL]) {
+ browser_window_get_extents(g->bw, true, &width, &height);
+ RefreshSetGadgetAttrs((struct Gadget *)(APTR)g->shared->objects[GID_VSCROLL],g->shared->win,NULL,
+ SCROLLER_Total, (ULONG)(height),
+ SCROLLER_Visible, bbox->Height,
+ TAG_DONE);
+ }
+
+ if(g->shared->objects[GID_HSCROLL])
+ {
+ browser_window_get_extents(g->bw, true, &width, &height);
+ RefreshSetGadgetAttrs((struct Gadget *)(APTR)g->shared->objects[GID_HSCROLL],
+ g->shared->win, NULL,
+ SCROLLER_Total, (ULONG)(width),
+ SCROLLER_Visible, bbox->Width,
+ TAG_DONE);
+ }
+
+ ami_gui_free_space_box(bbox);
+ }
+
+ ami_gui_scroller_update(g->shared);
+ g->shared->new_content = true;
+}
+
+
+/**
+ * Invalidates an area of an amiga browser window
+ *
+ * \param g gui_window
+ * \param rect area to redraw or NULL for the entire window area
+ * \return NSERROR_OK on success or appropriate error code
+ */
+static nserror amiga_window_invalidate_area(struct gui_window *g,
+ const struct rect *restrict rect)
+{
+ struct nsObject *nsobj;
+ struct rect *restrict deferred_rect;
+
+ if(!g) return NSERROR_BAD_PARAMETER;
+
+ if (rect == NULL) {
+ if (g != g->shared->gw) {
+ return NSERROR_OK;
+ }
+ } else {
+ if (ami_gui_window_update_box_deferred_check(g->deferred_rects, rect,
+ g->deferred_rects_pool)) {
+ deferred_rect = ami_memory_itempool_alloc(g->deferred_rects_pool,
+ sizeof(struct rect));
+ CopyMem(rect, deferred_rect, sizeof(struct rect));
+ nsobj = AddObject(g->deferred_rects, AMINS_RECT);
+ nsobj->objstruct = deferred_rect;
+ } else {
+ NSLOG(netsurf, INFO,
+ "Ignoring duplicate or subset of queued box redraw");
+ }
+ }
+ ami_schedule_redraw(g->shared, false);
+
+ return NSERROR_OK;
+}
+
+
static void ami_switch_tab(struct gui_window_2 *gwin, bool redraw)
{
struct Node *tabnode;
@@ -3641,7 +3770,10 @@ static void ami_switch_tab(struct gui_window_2 *gwin, bool redraw)
struct rect rect;
ami_plot_clear_bbox(gwin->win->RPort, bbox);
- browser_window_update(gwin->gw->bw, false);
+ gui_window_set_title(gwin->gw,
+ browser_window_get_title(gwin->gw->bw));
+ gui_window_update_extent(gwin->gw);
+ amiga_window_invalidate_area(gwin->gw, NULL);
rect.x0 = rect.x1 = gwin->gw->scrollx;
rect.y0 = rect.y1 = gwin->gw->scrolly;
@@ -4148,7 +4280,12 @@ static void ami_toggletabbar(struct gui_window_2 *gwin, bool show)
RethinkLayout((struct Gadget *)gwin->objects[GID_MAIN],
gwin->win, NULL, TRUE);
- if(gwin->gw && gwin->gw->bw) browser_window_update(gwin->gw->bw, false);
+ if (gwin->gw && gwin->gw->bw) {
+ gui_window_set_title(gwin->gw,
+ browser_window_get_title(gwin->gw->bw));
+ gui_window_update_extent(gwin->gw);
+ amiga_window_invalidate_area(gwin->gw, NULL);
+ }
}
void ami_gui_tabs_toggle_all(void)
@@ -4406,44 +4543,6 @@ static void ami_do_redraw_limits(struct gui_window *g, struct browser_window *bw
}
-/**
- * Invalidates an area of an amiga browser window
- *
- * \param g gui_window
- * \param rect area to redraw or NULL for the entire window area
- * \return NSERROR_OK on success or appropriate error code
- */
-static nserror amiga_window_invalidate_area(struct gui_window *g,
- const struct rect *restrict rect)
-{
- struct nsObject *nsobj;
- struct rect *restrict deferred_rect;
-
- if(!g) return NSERROR_BAD_PARAMETER;
-
- if (rect == NULL) {
- if (g != g->shared->gw) {
- return NSERROR_OK;
- }
- } else {
- if (ami_gui_window_update_box_deferred_check(g->deferred_rects, rect,
- g->deferred_rects_pool)) {
- deferred_rect = ami_memory_itempool_alloc(g->deferred_rects_pool,
- sizeof(struct rect));
- CopyMem(rect, deferred_rect, sizeof(struct rect));
- nsobj = AddObject(g->deferred_rects, AMINS_RECT);
- nsobj->objstruct = deferred_rect;
- } else {
- NSLOG(netsurf, INFO,
- "Ignoring duplicate or subset of queued box redraw");
- }
- }
- ami_schedule_redraw(g->shared, false);
-
- return NSERROR_OK;
-}
-
-
static void ami_refresh_window(struct gui_window_2 *gwin)
{
/* simplerefresh only */
@@ -5509,55 +5608,6 @@ static void gui_window_destroy(struct gui_window *g)
win_destroyed = true;
}
-static void gui_window_set_title(struct gui_window *g, const char *restrict title)
-{
- struct Node *node;
- char *restrict utf8title;
-
- if(!g) return;
- if(!title) return;
-
- utf8title = ami_utf8_easy((char *)title);
-
- if(g->tab_node) {
- node = g->tab_node;
-
- if((g->tabtitle == NULL) || (strcmp(utf8title, g->tabtitle)))
- {
- SetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS],
- g->shared->win, NULL,
- CLICKTAB_Labels, ~0,
- TAG_DONE);
-
- if(g->tabtitle) free(g->tabtitle);
- g->tabtitle = strdup(utf8title);
-
- SetClickTabNodeAttrs(node, TNA_Text, g->tabtitle,
- TNA_HintInfo, g->tabtitle,
- TAG_DONE);
-
- RefreshSetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS],
- g->shared->win, NULL,
- CLICKTAB_Labels, &g->shared->tab_list,
- TAG_DONE);
-
- if(ClickTabBase->lib_Version < 53)
- RethinkLayout((struct Gadget *)g->shared->objects[GID_TABLAYOUT],
- g->shared->win, NULL, TRUE);
- }
- }
-
- if(g == g->shared->gw) {
- if((g->shared->wintitle == NULL) || (strcmp(utf8title, g->shared->wintitle)))
- {
- if(g->shared->wintitle) free(g->shared->wintitle);
- g->shared->wintitle = strdup(utf8title);
- SetWindowTitles(g->shared->win, g->shared->wintitle, ami_gui_get_screen_title());
- }
- }
-
- ami_utf8_free(utf8title);
-}
static void ami_redraw_callback(void *p)
{
@@ -5868,45 +5918,6 @@ gui_window_set_scroll(struct gui_window *g, const struct rect *rect)
return NSERROR_OK;
}
-static void gui_window_update_extent(struct gui_window *g)
-{
- struct IBox *bbox;
-
- if(!g || !g->bw) return;
- if(browser_window_has_content(g->bw) == false) return;
-
- if(g == g->shared->gw) {
- int width, height;
- if(ami_gui_get_space_box((Object *)g->shared->objects[GID_BROWSER], &bbox) != NSERROR_OK) {
- amiga_warn_user("NoMemory", "");
- return;
- }
-
- if(g->shared->objects[GID_VSCROLL]) {
- browser_window_get_extents(g->bw, true, &width, &height);
- RefreshSetGadgetAttrs((struct Gadget *)(APTR)g->shared->objects[GID_VSCROLL],g->shared->win,NULL,
- SCROLLER_Total, (ULONG)(height),
- SCROLLER_Visible, bbox->Height,
- TAG_DONE);
- }
-
- if(g->shared->objects[GID_HSCROLL])
- {
- browser_window_get_extents(g->bw, true, &width, &height);
- RefreshSetGadgetAttrs((struct Gadget *)(APTR)g->shared->objects[GID_HSCROLL],
- g->shared->win, NULL,
- SCROLLER_Total, (ULONG)(width),
- SCROLLER_Visible, bbox->Width,
- TAG_DONE);
- }
-
- ami_gui_free_space_box(bbox);
- }
-
- ami_gui_scroller_update(g->shared);
- g->shared->new_content = true;
-}
-
static void gui_window_set_status(struct gui_window *g, const char *text)
{
char *utf8text;
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index e682eb8..e192191 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -1364,8 +1364,6 @@ nsws_window_resize(struct gui_window *gw,
}
nsws_window_update_forward_back(gw);
- browser_window_update(gw->bw, false);
-
if (gw->toolbar != NULL) {
SendMessage(gw->toolbar, TB_SETSTATE,
(WPARAM) IDM_NAV_STOP,
diff --git a/include/netsurf/browser_window.h b/include/netsurf/browser_window.h
index 73ca8e8..521340a 100644
--- a/include/netsurf/browser_window.h
+++ b/include/netsurf/browser_window.h
@@ -302,15 +302,6 @@ void browser_window_set_dimensions(struct browser_window *bw,
/**
- * Redraw browser window, set extent to content, and update title.
- *
- * \param bw browser_window
- * \param scroll_to_top move view to top of page
- */
-void browser_window_update(struct browser_window *bw, bool scroll_to_top);
-
-
-/**
* Stop all fetching activity in a browser window.
*
* \param bw The browser window to stop activity in.
-----------------------------------------------------------------------
Summary of changes:
desktop/browser_window.c | 243 ++++++++++++++--------------
frontends/amiga/dt_anim.c | 12 +-
frontends/amiga/dt_sound.c | 6 +-
frontends/amiga/gui.c | 267 ++++++++++++++++---------------
frontends/amiga/plugin_hack.c | 12 +-
frontends/amiga/stringview/stringview.c | 4 +-
frontends/windows/window.c | 2 -
include/netsurf/browser_window.h | 9 --
8 files changed, 280 insertions(+), 275 deletions(-)
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 096b944..7bc5cc5 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -709,6 +709,129 @@ browser_window_convert_to_download(struct browser_window *bw,
/**
+ * scroll to a fragment if present
+ *
+ * \param bw browser window
+ * \return true if the scroll was sucessful
+ */
+static bool frag_scroll(struct browser_window *bw)
+{
+ struct rect rect;
+
+ if (bw->frag_id == NULL) {
+ return false;
+ }
+
+ if (!html_get_id_offset(bw->current_content,
+ bw->frag_id,
+ &rect.x0,
+ &rect.y0)) {
+ return false;
+ }
+
+ rect.x1 = rect.x0;
+ rect.y1 = rect.y0;
+ if (browser_window_set_scroll(bw, &rect) == NSERROR_OK) {
+ if (bw->current_content != NULL &&
+ bw->history != NULL &&
+ bw->history->current != NULL) {
+ browser_window_history_update(bw, bw->current_content);
+ }
+ return true;
+ }
+ return false;
+}
+
+
+/**
+ * Redraw browser window, set extent to content, and update title.
+ *
+ * \param bw browser_window
+ * \param scroll_to_top move view to top of page
+ */
+static void browser_window_update(struct browser_window *bw, bool scroll_to_top)
+{
+ static const struct rect zrect = {
+ .x0 = 0,
+ .y0 = 0,
+ .x1 = 0,
+ .y1 = 0
+ };
+
+ if (bw->current_content == NULL) {
+ return;
+ }
+
+ switch (bw->browser_window_type) {
+
+ case BROWSER_WINDOW_NORMAL:
+ /* Root browser window, constituting a front end window/tab */
+ guit->window->set_title(bw->window,
+ content_get_title(bw->current_content));
+
+ browser_window_update_extent(bw);
+
+ /* if frag_id exists, then try to scroll to it */
+ /** @todo don't do this if the user has scrolled */
+ if (!frag_scroll(bw)) {
+ if (scroll_to_top) {
+ browser_window_set_scroll(bw, &zrect);
+ }
+ }
+
+ guit->window->invalidate(bw->window, NULL);
+
+ break;
+
+ case BROWSER_WINDOW_IFRAME:
+ /* Internal iframe browser window */
+ assert(bw->parent != NULL);
+ assert(bw->parent->current_content != NULL);
+
+ browser_window_update_extent(bw);
+
+ if (scroll_to_top) {
+ browser_window_set_scroll(bw, &zrect);
+ }
+
+ /* if frag_id exists, then try to scroll to it */
+ /** @todo don't do this if the user has scrolled */
+ frag_scroll(bw);
+
+ html_redraw_a_box(bw->parent->current_content, bw->box);
+ break;
+
+ case BROWSER_WINDOW_FRAME:
+ {
+ struct rect rect;
+ browser_window_update_extent(bw);
+
+ if (scroll_to_top) {
+ browser_window_set_scroll(bw, &zrect);
+ }
+
+ /* if frag_id exists, then try to scroll to it */
+ /** @todo don't do this if the user has scrolled */
+ frag_scroll(bw);
+
+ rect.x0 = scrollbar_get_offset(bw->scroll_x);
+ rect.y0 = scrollbar_get_offset(bw->scroll_y);
+ rect.x1 = rect.x0 + bw->width;
+ rect.y1 = rect.y0 + bw->height;
+
+ browser_window_invalidate_rect(bw, &rect);
+ }
+ break;
+
+ default:
+ case BROWSER_WINDOW_FRAMESET:
+ /* Nothing to do */
+ break;
+ }
+}
+
+
+/**
* handle message for content ready on browser window
*/
static nserror browser_window_content_ready(struct browser_window *bw)
@@ -1837,41 +1960,6 @@ static void browser_window_destroy_internal(struct browser_window *bw)
/**
- * scroll to a fragment if present
- *
- * \param bw browser window
- * \return true if the scroll was sucessful
- */
-static bool frag_scroll(struct browser_window *bw)
-{
- struct rect rect;
-
- if (bw->frag_id == NULL) {
- return false;
- }
-
- if (!html_get_id_offset(bw->current_content,
- bw->frag_id,
- &rect.x0,
- &rect.y0)) {
- return false;
- }
-
- rect.x1 = rect.x0;
- rect.y1 = rect.y0;
- if (browser_window_set_scroll(bw, &rect) == NSERROR_OK) {
- if (bw->current_content != NULL &&
- bw->history != NULL &&
- bw->history->current != NULL) {
- browser_window_history_update(bw, bw->current_content);
- }
- return true;
- }
- return false;
-}
-
-
-/**
* Set browser window scale.
*
* \param bw Browser window.
@@ -2589,7 +2677,7 @@ browser_window_redraw(struct browser_window *bw,
/* Set current child */
child = &bw->children[cur_child];
- /* Get frame edge box in global coordinates */
+ /* Get frame edge area in global coordinates */
content_clip.x0 = (x + child->x) * child->scale;
content_clip.y0 = (y + child->y) * child->scale;
content_clip.x1 = content_clip.x0 +
@@ -3994,89 +4082,6 @@ browser_window_set_dimensions(struct browser_window *bw, int width, int height)
}
-/* Exported interface, documented in netsurf/browser_window.h */
-void browser_window_update(struct browser_window *bw, bool scroll_to_top)
-{
- static const struct rect zrect = {
- .x0 = 0,
- .y0 = 0,
- .x1 = 0,
- .y1 = 0
- };
-
- if (bw->current_content == NULL) {
- return;
- }
-
- switch (bw->browser_window_type) {
-
- case BROWSER_WINDOW_NORMAL:
- /* Root browser window, constituting a front end window/tab */
- guit->window->set_title(bw->window,
- content_get_title(bw->current_content));
-
- browser_window_update_extent(bw);
-
- /* if frag_id exists, then try to scroll to it */
- /** @todo don't do this if the user has scrolled */
- if (!frag_scroll(bw)) {
- if (scroll_to_top) {
- browser_window_set_scroll(bw, &zrect);
- }
- }
-
- guit->window->invalidate(bw->window, NULL);
-
- break;
-
- case BROWSER_WINDOW_IFRAME:
- /* Internal iframe browser window */
- assert(bw->parent != NULL);
- assert(bw->parent->current_content != NULL);
-
- browser_window_update_extent(bw);
-
- if (scroll_to_top) {
- browser_window_set_scroll(bw, &zrect);
- }
-
- /* if frag_id exists, then try to scroll to it */
- /** @todo don't do this if the user has scrolled */
- frag_scroll(bw);
-
- html_redraw_a_box(bw->parent->current_content, bw->box);
- break;
-
- case BROWSER_WINDOW_FRAME:
- {
- struct rect rect;
- browser_window_update_extent(bw);
-
- if (scroll_to_top) {
- browser_window_set_scroll(bw, &zrect);
- }
-
- /* if frag_id exists, then try to scroll to it */
- /** @todo don't do this if the user has scrolled */
- frag_scroll(bw);
-
- rect.x0 = scrollbar_get_offset(bw->scroll_x);
- rect.y0 = scrollbar_get_offset(bw->scroll_y);
- rect.x1 = rect.x0 + bw->width;
- rect.y1 = rect.y0 + bw->height;
-
- browser_window_invalidate_rect(bw, &rect);
- }
- break;
-
- default:
- case BROWSER_WINDOW_FRAMESET:
- /* Nothing to do */
- break;
- }
-}
-
-
/* Exported interface, documented in browser/browser_private.h */
nserror
browser_window_invalidate_rect(struct browser_window *bw, struct rect *rect)
diff --git a/frontends/amiga/dt_anim.c b/frontends/amiga/dt_anim.c
index 99ccffe..a9fe809 100644
--- a/frontends/amiga/dt_anim.c
+++ b/frontends/amiga/dt_anim.c
@@ -74,9 +74,9 @@ static void amiga_dt_anim_destroy(struct content *c);
static bool amiga_dt_anim_redraw(struct content *c,
struct content_redraw_data *data, const struct rect *clip,
const struct redraw_context *ctx);
-static void amiga_dt_anim_open(struct content *c, struct browser_window *bw,
+static nserror amiga_dt_anim_open(struct content *c, struct browser_window *bw,
struct content *page, struct object_params *params);
-static void amiga_dt_anim_close(struct content *c);
+static nserror amiga_dt_anim_close(struct content *c);
static nserror amiga_dt_anim_clone(const struct content *old, struct content **newc);
static content_type amiga_dt_anim_content_type(void);
@@ -290,18 +290,18 @@ bool amiga_dt_anim_redraw(struct content *c,
* \param box box containing c, or 0 if not an object
* \param params object parameters, or 0 if not an object
*/
-void amiga_dt_anim_open(struct content *c, struct browser_window *bw,
+nserror amiga_dt_anim_open(struct content *c, struct browser_window *bw,
struct content *page, struct object_params *params)
{
NSLOG(netsurf, INFO, "amiga_dt_anim_open");
- return;
+ return NSERROR_OK;
}
-void amiga_dt_anim_close(struct content *c)
+nserror amiga_dt_anim_close(struct content *c)
{
NSLOG(netsurf, INFO, "amiga_dt_anim_close");
- return;
+ return NSERROR_OK;
}
void amiga_dt_anim_reformat(struct content *c, int width, int height)
diff --git a/frontends/amiga/dt_sound.c b/frontends/amiga/dt_sound.c
index e008103..8b63d6a 100644
--- a/frontends/amiga/dt_sound.c
+++ b/frontends/amiga/dt_sound.c
@@ -58,7 +58,7 @@ static void amiga_dt_sound_destroy(struct content *c);
static bool amiga_dt_sound_redraw(struct content *c,
struct content_redraw_data *data, const struct rect *clip,
const struct redraw_context *ctx);
-static void amiga_dt_sound_open(struct content *c, struct browser_window *bw,
+static nserror amiga_dt_sound_open(struct content *c, struct browser_window *bw,
struct content *page, struct object_params *params);
static nserror amiga_dt_sound_clone(const struct content *old, struct content **newc);
static content_type amiga_dt_sound_content_type(void);
@@ -221,7 +221,7 @@ bool amiga_dt_sound_redraw(struct content *c,
}
-void amiga_dt_sound_open(struct content *c, struct browser_window *bw,
+nserror amiga_dt_sound_open(struct content *c, struct browser_window *bw,
struct content *page, struct object_params *params)
{
amiga_dt_sound_content *plugin = (amiga_dt_sound_content *) c;
@@ -248,7 +248,7 @@ void amiga_dt_sound_open(struct content *c, struct browser_window *bw,
if(plugin->dto && (plugin->immediate == true))
amiga_dt_sound_play(plugin->dto);
- return;
+ return NSERROR_OK;
}
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 673f751..36ee756 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -3596,6 +3596,135 @@ static void ami_change_tab(struct gui_window_2 *gwin, int direction)
ami_switch_tab(gwin, true);
}
+
+static void gui_window_set_title(struct gui_window *g, const char *restrict title)
+{
+ struct Node *node;
+ char *restrict utf8title;
+
+ if(!g) return;
+ if(!title) return;
+
+ utf8title = ami_utf8_easy((char *)title);
+
+ if(g->tab_node) {
+ node = g->tab_node;
+
+ if((g->tabtitle == NULL) || (strcmp(utf8title, g->tabtitle)))
+ {
+ SetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS],
+ g->shared->win, NULL,
+ CLICKTAB_Labels, ~0,
+ TAG_DONE);
+
+ if(g->tabtitle) free(g->tabtitle);
+ g->tabtitle = strdup(utf8title);
+
+ SetClickTabNodeAttrs(node, TNA_Text, g->tabtitle,
+ TNA_HintInfo, g->tabtitle,
+ TAG_DONE);
+
+ RefreshSetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS],
+ g->shared->win, NULL,
+ CLICKTAB_Labels, &g->shared->tab_list,
+ TAG_DONE);
+
+ if(ClickTabBase->lib_Version < 53)
+ RethinkLayout((struct Gadget *)g->shared->objects[GID_TABLAYOUT],
+ g->shared->win, NULL, TRUE);
+ }
+ }
+
+ if(g == g->shared->gw) {
+ if((g->shared->wintitle == NULL) || (strcmp(utf8title, g->shared->wintitle)))
+ {
+ if(g->shared->wintitle) free(g->shared->wintitle);
+ g->shared->wintitle = strdup(utf8title);
+ SetWindowTitles(g->shared->win, g->shared->wintitle, ami_gui_get_screen_title());
+ }
+ }
+
+ ami_utf8_free(utf8title);
+}
+
+static void gui_window_update_extent(struct gui_window *g)
+{
+ struct IBox *bbox;
+
+ if(!g || !g->bw) return;
+ if(browser_window_has_content(g->bw) == false) return;
+
+ if(g == g->shared->gw) {
+ int width, height;
+ if(ami_gui_get_space_box((Object *)g->shared->objects[GID_BROWSER], &bbox) != NSERROR_OK) {
+ amiga_warn_user("NoMemory", "");
+ return;
+ }
+
+ if(g->shared->objects[GID_VSCROLL]) {
+ browser_window_get_extents(g->bw, true, &width, &height);
+ RefreshSetGadgetAttrs((struct Gadget *)(APTR)g->shared->objects[GID_VSCROLL],g->shared->win,NULL,
+ SCROLLER_Total, (ULONG)(height),
+ SCROLLER_Visible, bbox->Height,
+ TAG_DONE);
+ }
+
+ if(g->shared->objects[GID_HSCROLL])
+ {
+ browser_window_get_extents(g->bw, true, &width, &height);
+ RefreshSetGadgetAttrs((struct Gadget *)(APTR)g->shared->objects[GID_HSCROLL],
+ g->shared->win, NULL,
+ SCROLLER_Total, (ULONG)(width),
+ SCROLLER_Visible, bbox->Width,
+ TAG_DONE);
+ }
+
+ ami_gui_free_space_box(bbox);
+ }
+
+ ami_gui_scroller_update(g->shared);
+ g->shared->new_content = true;
+}
+
+
+/**
+ * Invalidates an area of an amiga browser window
+ *
+ * \param g gui_window
+ * \param rect area to redraw or NULL for the entire window area
+ * \return NSERROR_OK on success or appropriate error code
+ */
+static nserror amiga_window_invalidate_area(struct gui_window *g,
+ const struct rect *restrict rect)
+{
+ struct nsObject *nsobj;
+ struct rect *restrict deferred_rect;
+
+ if(!g) return NSERROR_BAD_PARAMETER;
+
+ if (rect == NULL) {
+ if (g != g->shared->gw) {
+ return NSERROR_OK;
+ }
+ } else {
+ if (ami_gui_window_update_box_deferred_check(g->deferred_rects, rect,
+ g->deferred_rects_pool)) {
+ deferred_rect = ami_memory_itempool_alloc(g->deferred_rects_pool,
+ sizeof(struct rect));
+ CopyMem(rect, deferred_rect, sizeof(struct rect));
+ nsobj = AddObject(g->deferred_rects, AMINS_RECT);
+ nsobj->objstruct = deferred_rect;
+ } else {
+ NSLOG(netsurf, INFO,
+ "Ignoring duplicate or subset of queued box redraw");
+ }
+ }
+ ami_schedule_redraw(g->shared, false);
+
+ return NSERROR_OK;
+}
+
+
static void ami_switch_tab(struct gui_window_2 *gwin, bool redraw)
{
struct Node *tabnode;
@@ -3641,7 +3770,10 @@ static void ami_switch_tab(struct gui_window_2 *gwin, bool redraw)
struct rect rect;
ami_plot_clear_bbox(gwin->win->RPort, bbox);
- browser_window_update(gwin->gw->bw, false);
+ gui_window_set_title(gwin->gw,
+ browser_window_get_title(gwin->gw->bw));
+ gui_window_update_extent(gwin->gw);
+ amiga_window_invalidate_area(gwin->gw, NULL);
rect.x0 = rect.x1 = gwin->gw->scrollx;
rect.y0 = rect.y1 = gwin->gw->scrolly;
@@ -4148,7 +4280,12 @@ static void ami_toggletabbar(struct gui_window_2 *gwin, bool show)
RethinkLayout((struct Gadget *)gwin->objects[GID_MAIN],
gwin->win, NULL, TRUE);
- if(gwin->gw && gwin->gw->bw) browser_window_update(gwin->gw->bw, false);
+ if (gwin->gw && gwin->gw->bw) {
+ gui_window_set_title(gwin->gw,
+ browser_window_get_title(gwin->gw->bw));
+ gui_window_update_extent(gwin->gw);
+ amiga_window_invalidate_area(gwin->gw, NULL);
+ }
}
void ami_gui_tabs_toggle_all(void)
@@ -4406,44 +4543,6 @@ static void ami_do_redraw_limits(struct gui_window *g, struct browser_window *bw
}
-/**
- * Invalidates an area of an amiga browser window
- *
- * \param g gui_window
- * \param rect area to redraw or NULL for the entire window area
- * \return NSERROR_OK on success or appropriate error code
- */
-static nserror amiga_window_invalidate_area(struct gui_window *g,
- const struct rect *restrict rect)
-{
- struct nsObject *nsobj;
- struct rect *restrict deferred_rect;
-
- if(!g) return NSERROR_BAD_PARAMETER;
-
- if (rect == NULL) {
- if (g != g->shared->gw) {
- return NSERROR_OK;
- }
- } else {
- if (ami_gui_window_update_box_deferred_check(g->deferred_rects, rect,
- g->deferred_rects_pool)) {
- deferred_rect = ami_memory_itempool_alloc(g->deferred_rects_pool,
- sizeof(struct rect));
- CopyMem(rect, deferred_rect, sizeof(struct rect));
- nsobj = AddObject(g->deferred_rects, AMINS_RECT);
- nsobj->objstruct = deferred_rect;
- } else {
- NSLOG(netsurf, INFO,
- "Ignoring duplicate or subset of queued box redraw");
- }
- }
- ami_schedule_redraw(g->shared, false);
-
- return NSERROR_OK;
-}
-
-
static void ami_refresh_window(struct gui_window_2 *gwin)
{
/* simplerefresh only */
@@ -5509,55 +5608,6 @@ static void gui_window_destroy(struct gui_window *g)
win_destroyed = true;
}
-static void gui_window_set_title(struct gui_window *g, const char *restrict title)
-{
- struct Node *node;
- char *restrict utf8title;
-
- if(!g) return;
- if(!title) return;
-
- utf8title = ami_utf8_easy((char *)title);
-
- if(g->tab_node) {
- node = g->tab_node;
-
- if((g->tabtitle == NULL) || (strcmp(utf8title, g->tabtitle)))
- {
- SetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS],
- g->shared->win, NULL,
- CLICKTAB_Labels, ~0,
- TAG_DONE);
-
- if(g->tabtitle) free(g->tabtitle);
- g->tabtitle = strdup(utf8title);
-
- SetClickTabNodeAttrs(node, TNA_Text, g->tabtitle,
- TNA_HintInfo, g->tabtitle,
- TAG_DONE);
-
- RefreshSetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS],
- g->shared->win, NULL,
- CLICKTAB_Labels, &g->shared->tab_list,
- TAG_DONE);
-
- if(ClickTabBase->lib_Version < 53)
- RethinkLayout((struct Gadget *)g->shared->objects[GID_TABLAYOUT],
- g->shared->win, NULL, TRUE);
- }
- }
-
- if(g == g->shared->gw) {
- if((g->shared->wintitle == NULL) || (strcmp(utf8title, g->shared->wintitle)))
- {
- if(g->shared->wintitle) free(g->shared->wintitle);
- g->shared->wintitle = strdup(utf8title);
- SetWindowTitles(g->shared->win, g->shared->wintitle, ami_gui_get_screen_title());
- }
- }
-
- ami_utf8_free(utf8title);
-}
static void ami_redraw_callback(void *p)
{
@@ -5868,45 +5918,6 @@ gui_window_set_scroll(struct gui_window *g, const struct rect *rect)
return NSERROR_OK;
}
-static void gui_window_update_extent(struct gui_window *g)
-{
- struct IBox *bbox;
-
- if(!g || !g->bw) return;
- if(browser_window_has_content(g->bw) == false) return;
-
- if(g == g->shared->gw) {
- int width, height;
- if(ami_gui_get_space_box((Object *)g->shared->objects[GID_BROWSER], &bbox) != NSERROR_OK) {
- amiga_warn_user("NoMemory", "");
- return;
- }
-
- if(g->shared->objects[GID_VSCROLL]) {
- browser_window_get_extents(g->bw, true, &width, &height);
- RefreshSetGadgetAttrs((struct Gadget *)(APTR)g->shared->objects[GID_VSCROLL],g->shared->win,NULL,
- SCROLLER_Total, (ULONG)(height),
- SCROLLER_Visible, bbox->Height,
- TAG_DONE);
- }
-
- if(g->shared->objects[GID_HSCROLL])
- {
- browser_window_get_extents(g->bw, true, &width, &height);
- RefreshSetGadgetAttrs((struct Gadget *)(APTR)g->shared->objects[GID_HSCROLL],
- g->shared->win, NULL,
- SCROLLER_Total, (ULONG)(width),
- SCROLLER_Visible, bbox->Width,
- TAG_DONE);
- }
-
- ami_gui_free_space_box(bbox);
- }
-
- ami_gui_scroller_update(g->shared);
- g->shared->new_content = true;
-}
-
static void gui_window_set_status(struct gui_window *g, const char *text)
{
char *utf8text;
diff --git a/frontends/amiga/plugin_hack.c b/frontends/amiga/plugin_hack.c
index fa75bd9..a775936 100644
--- a/frontends/amiga/plugin_hack.c
+++ b/frontends/amiga/plugin_hack.c
@@ -53,9 +53,9 @@ static void amiga_plugin_hack_destroy(struct content *c);
static bool amiga_plugin_hack_redraw(struct content *c,
struct content_redraw_data *data, const struct rect *clip,
const struct redraw_context *ctx);
-static void amiga_plugin_hack_open(struct content *c, struct browser_window *bw,
+static nserror amiga_plugin_hack_open(struct content *c, struct browser_window *bw,
struct content *page, struct object_params *params);
-static void amiga_plugin_hack_close(struct content *c);
+static nserror amiga_plugin_hack_close(struct content *c);
static nserror amiga_plugin_hack_clone(const struct content *old, struct content **newc);
static content_type amiga_plugin_hack_content_type(void);
@@ -186,7 +186,7 @@ bool amiga_plugin_hack_redraw(struct content *c,
* object within a page
* \param params object parameters, or 0 if not an object
*/
-void amiga_plugin_hack_open(struct content *c, struct browser_window *bw,
+nserror amiga_plugin_hack_open(struct content *c, struct browser_window *bw,
struct content *page, struct object_params *params)
{
NSLOG(netsurf, INFO, "amiga_plugin_hack_open %s",
@@ -199,13 +199,13 @@ void amiga_plugin_hack_open(struct content *c, struct browser_window *bw,
c->height = 0;
}
- return;
+ return NSERROR_OK;
}
-void amiga_plugin_hack_close(struct content *c)
+nserror amiga_plugin_hack_close(struct content *c)
{
NSLOG(netsurf, INFO, "amiga_plugin_hack_close");
- return;
+ return NSERROR_OK;
}
void amiga_plugin_hack_reformat(struct content *c, int width, int height)
diff --git a/frontends/amiga/stringview/stringview.c b/frontends/amiga/stringview/stringview.c
index 245782b..60c694a 100755
--- a/frontends/amiga/stringview/stringview.c
+++ b/frontends/amiga/stringview/stringview.c
@@ -161,7 +161,7 @@ static uint32 myStringSearch( Class *cl, Object *obj )
if(searchString)
{
searchString += 3;
- if (bufpos >= searchString - data->SearchBuffer)
+ if (bufpos >= (uint32)(searchString - data->SearchBuffer))
bufpos -= searchString - data->SearchBuffer;
}
else
@@ -848,7 +848,7 @@ Class *MakeStringClass( void )
if ( cl )
{
- cl->cl_Dispatcher.h_Entry = (uint32(*)())myStringClassDispatcher;
+ cl->cl_Dispatcher.h_Entry = (uint32(*)(void))myStringClassDispatcher;
}
URLHistory_Init();
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index e682eb8..e192191 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -1364,8 +1364,6 @@ nsws_window_resize(struct gui_window *gw,
}
nsws_window_update_forward_back(gw);
- browser_window_update(gw->bw, false);
-
if (gw->toolbar != NULL) {
SendMessage(gw->toolbar, TB_SETSTATE,
(WPARAM) IDM_NAV_STOP,
diff --git a/include/netsurf/browser_window.h b/include/netsurf/browser_window.h
index 73ca8e8..521340a 100644
--- a/include/netsurf/browser_window.h
+++ b/include/netsurf/browser_window.h
@@ -302,15 +302,6 @@ void browser_window_set_dimensions(struct browser_window *bw,
/**
- * Redraw browser window, set extent to content, and update title.
- *
- * \param bw browser_window
- * \param scroll_to_top move view to top of page
- */
-void browser_window_update(struct browser_window *bw, bool scroll_to_top);
-
-
-/**
* Stop all fetching activity in a browser window.
*
* \param bw The browser window to stop activity in.
--
NetSurf Browser
2 years, 9 months