#14623: A wxWebView virtual file system handler class to support wxMemoryFSHandler

14 views
Skip to first unread message

wxTrac

unread,
Aug 31, 2012, 12:40:10 PM8/31/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14623>

#14623: A wxWebView virtual file system handler class to support wxMemoryFSHandler
--------------------------------------------+-------------------------------
Reporter: nickmat | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: WebView | Version: 2.9-svn
Keywords: wxFileSystem wxMemoryFSHandler | Blockedby:
Patch: 1 | Blocking:
--------------------------------------------+-------------------------------
I've been looking at updating my app to use wxWebView in place of wxHtml.
The app makes significant use of wxMemoryFSHandler but the documentation
is a bit sparse so I hope this is a suitable solution.

I've added a very simple wxWebView file scheme handler class,
wxWebViewFSHandler to make it easier to use wxWidget's virtual file
system.

I've updated the documentation and in particular, amended the example
given with the wxMemoryFSHandler class to show how it can be used with
both the wxHtml and wxWebView systems.

The patch also adds a menu option to the WebView sample which demonstrates
how the new class is used.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14623>

wxTrac

unread,
Sep 5, 2012, 5:52:49 AM9/5/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14623#comment:1>

#14623: A wxWebView virtual file system handler class to support wxMemoryFSHandler
------------------------------------------------------+---------------------
Reporter: nickmat | Owner:
Type: enhancement | Status: confirmed
Priority: normal | Milestone:
Component: WebView | Version: 2.9-svn
Keywords: wxFileSystem wxMemoryFSHandler wxWebView | Blockedby:
Patch: 1 | Blocking:
------------------------------------------------------+---------------------
Changes (by steve_lamerton):

* keywords: wxFileSystem wxMemoryFSHandler => wxFileSystem
wxMemoryFSHandler wxWebView
* status: new => confirmed



--
Ticket URL: <http://trac.wxwidgets.org/ticket/14623#comment:1>

wxTrac

unread,
Sep 9, 2012, 10:46:03 AM9/9/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14623#comment:2>

#14623: A wxWebView virtual file system handler class to support wxMemoryFSHandler
------------------------------------------------------+---------------------
Reporter: nickmat | Owner:
Type: enhancement | Status: infoneeded_new
Priority: normal | Milestone:
Component: WebView | Version: 2.9-svn
Keywords: wxFileSystem wxMemoryFSHandler wxWebView | Blockedby:
Patch: 1 | Blocking:
------------------------------------------------------+---------------------
Changes (by steve_lamerton):

* status: confirmed => infoneeded_new


Comment:

Thank you very much for this patch! I have tested it on MSW and it works
great. Just a couple of questions before I apply the patch. Firstly how
would you like to be credited in the changelog? Also have you done any
testing with file systems other than the memory handler? When I originally
wrote the wxWebViewArchiveHandler it was because the existing wxFileSystem
syntax for archive didn't work very well.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14623#comment:2>

wxTrac

unread,
Sep 10, 2012, 9:36:33 AM9/10/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14623#comment:3>

#14623: A wxWebView virtual file system handler class to support wxMemoryFSHandler
------------------------------------------------------+---------------------
Reporter: nickmat | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: WebView | Version: 2.9-svn
Keywords: wxFileSystem wxMemoryFSHandler wxWebView | Blockedby:
Patch: 1 | Blocking:
------------------------------------------------------+---------------------
Changes (by nickmat):

* status: infoneeded_new => new


Comment:

I did consider other protocols, but after looking at the "wxFileSystem
Overview" I guessed that the way wxFileSystem implemented combined
protocols would confuse the browser engines, which is why a different
approach is needed for these. But I don't see why it shouldn't work for
any single-protocol handler. Of the 4 built-in file system handlers: 2 are
combined-protocols and the wxInternetFSHandler is a bit redundant here -
leaving only the wxMemoryFSHandler.

Maybe this should be documented, but since it was mostly guesswork, I just
left it open.

I did briefly look at converting the html/virtual sample, but it documents
a hack which is acceptable for wxHtml but probably not for wxWebView, so I
didn't pursue it.

One test I did do, which I didn't include in the sample, was to test the #
anchor part. This worked as expected.

Nick Matthews, happy to take the blame.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14623#comment:3>

wxTrac

unread,
Sep 11, 2012, 5:27:00 AM9/11/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14623#comment:4>

#14623: A wxWebView virtual file system handler class to support wxMemoryFSHandler
--------------------------+-------------------------------------------------
Reporter: nickmat | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: WebView | Version: 2.9-svn
Resolution: fixed | Keywords: wxFileSystem wxMemoryFSHandler wxWebView
Blockedby: | Patch: 1
Blocking: |
--------------------------+-------------------------------------------------
Changes (by SJL):

* status: new => closed
* resolution: => fixed


Comment:

(In [72461]) Add generic wxFileSystem support to wxWebView using
wxWebViewFSHandler.

Closes #14623.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14623#comment:4>
Reply all
Reply to author
Forward
0 new messages