gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/gnash.h server/impl.cpp ...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/gnash.h server/impl.cpp ...
Date: Wed, 27 Sep 2006 13:22:01 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/09/27 13:22:01

Modified files:
        .              : ChangeLog 
        server         : gnash.h impl.cpp 
        server/swf     : ASHandlers.cpp 

Log message:
                * server/impl.cpp, server/gnash.h: changed get_base_url() to
                  return a "const" URL.
                * server/swf/ASHandlers.cpp (CommonGetUrl): use base url
                  for relative urls resolution.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.938&r2=1.939
http://cvs.savannah.gnu.org/viewcvs/gnash/server/gnash.h?cvsroot=gnash&r1=1.51&r2=1.52
http://cvs.savannah.gnu.org/viewcvs/gnash/server/impl.cpp?cvsroot=gnash&r1=1.57&r2=1.58
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/ASHandlers.cpp?cvsroot=gnash&r1=1.66&r2=1.67

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.938
retrieving revision 1.939
diff -u -b -r1.938 -r1.939
--- ChangeLog   27 Sep 2006 12:59:35 -0000      1.938
+++ ChangeLog   27 Sep 2006 13:22:00 -0000      1.939
@@ -1,5 +1,12 @@
 2006-09-27 Sandro Santilli  <address@hidden>
 
+       * server/impl.cpp, server/gnash.h: changed get_base_url() to
+         return a "const" URL.
+       * server/swf/ASHandlers.cpp (CommonGetUrl): use base url
+         for relative urls resolution.
+
+2006-09-27 Sandro Santilli  <address@hidden>
+
        * plugin/plugin.cpp: use the new -U switch when invoking
          gnash (pass it the base url)
 

Index: server/gnash.h
===================================================================
RCS file: /sources/gnash/gnash/server/gnash.h,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -b -r1.51 -r1.52
--- server/gnash.h      27 Sep 2006 12:52:15 -0000      1.51
+++ server/gnash.h      27 Sep 2006 13:22:00 -0000      1.52
@@ -124,7 +124,7 @@
 DSOEXPORT void set_base_url(const URL& url);
 
 /// Return base url
-DSOEXPORT gnash::URL& get_base_url();
+DSOEXPORT const gnash::URL& get_base_url();
 
 /// You probably don't need this. (@@ make it private?)
 sound_handler* get_sound_handler();

Index: server/impl.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/impl.cpp,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- server/impl.cpp     27 Sep 2006 12:52:15 -0000      1.57
+++ server/impl.cpp     27 Sep 2006 13:22:00 -0000      1.58
@@ -110,7 +110,7 @@
        log_msg("Base url set to: %s", globals::baseurl->str().c_str());
 }
 
-URL&
+const URL&
 get_base_url()
 {
        // Don't call me if you haven't set me !

Index: server/swf/ASHandlers.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/swf/ASHandlers.cpp,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -b -r1.66 -r1.67
--- server/swf/ASHandlers.cpp   19 Sep 2006 09:42:48 -0000      1.66
+++ server/swf/ASHandlers.cpp   27 Sep 2006 13:22:00 -0000      1.67
@@ -1654,17 +1654,21 @@
        // same directory or use absolute URLs when invoking getURL().
        // --------8<------------------------------------------------------
        //
-       // Since there's no standard behaviour we'll stick to the simpler
-       // one of resolving relative to the location of the .swf file.
+       // We'll resolve relative to our "base url".
+       // The base url must be set with the set_base_url() command.
        //
 
        string url_s(url_c);
 
+#if 0 // changed to resolve relative to the base url
        sprite_instance* tgt_sprt = \
                dynamic_cast<sprite_instance*>(env.get_target());
        assert(tgt_sprt);
-       URL target_url(tgt_sprt->get_movie_definition()->get_url());
-       URL url(url_s, target_url);
+       URL baseurl(tgt_sprt->get_movie_definition()->get_url());
+#else
+       const URL& baseurl = get_base_url();
+#endif
+       URL url(url_s, baseurl);
 
        log_msg("get url: target=%s, url=%s (%s)", target_string,
                url.str().c_str(), url_c);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]