gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/edit_text_character.cpp ...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/edit_text_character.cpp ...
Date: Tue, 03 Jul 2007 01:12:45 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/07/03 01:12:45

Modified files:
        .              : ChangeLog 
        server         : edit_text_character.cpp edit_text_character.h 
        server/parser  : edit_text_character_def.h 

Log message:
                * server/parser/edit_text_character_def.h: add an htmlAllowed()
                  public inspector.
                * server/edit_text_character.h: add an htmlAllowed() private
                  inspector.
                * server/edit_text_character.cpp (format_text): if HTML is 
allowed
                  and found in the textfield text, just skip the tags and show 
the
                  content, logging a debugging info about the fact (only once).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3643&r2=1.3644
http://cvs.savannah.gnu.org/viewcvs/gnash/server/edit_text_character.cpp?cvsroot=gnash&r1=1.71&r2=1.72
http://cvs.savannah.gnu.org/viewcvs/gnash/server/edit_text_character.h?cvsroot=gnash&r1=1.34&r2=1.35
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/edit_text_character_def.h?cvsroot=gnash&r1=1.14&r2=1.15

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3643
retrieving revision 1.3644
diff -u -b -r1.3643 -r1.3644
--- ChangeLog   2 Jul 2007 23:20:14 -0000       1.3643
+++ ChangeLog   3 Jul 2007 01:12:44 -0000       1.3644
@@ -1,5 +1,15 @@
 2007-07-02 Sandro Santilli <address@hidden>
 
+       * server/parser/edit_text_character_def.h: add an htmlAllowed()
+         public inspector.
+       * server/edit_text_character.h: add an htmlAllowed() private
+         inspector.
+       * server/edit_text_character.cpp (format_text): if HTML is allowed
+         and found in the textfield text, just skip the tags and show the 
+         content, logging a debugging info about the fact (only once).
+
+2007-07-02 Sandro Santilli <address@hidden>
+
        * server/FreetypeGlyphsProvider.cpp: protect debugging calls
          by a GNASH_DEBUG_DEVICEFONTS, defaulting to undefined.
        * libbase/GC.{cpp,h}: Implement an heuristic to reduce

Index: server/edit_text_character.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/edit_text_character.cpp,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -b -r1.71 -r1.72
--- server/edit_text_character.cpp      1 Jul 2007 10:54:22 -0000       1.71
+++ server/edit_text_character.cpp      3 Jul 2007 01:12:44 -0000       1.72
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: edit_text_character.cpp,v 1.71 2007/07/01 10:54:22 bjacques Exp $ */
+/* $Id: edit_text_character.cpp,v 1.72 2007/07/03 01:12:44 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1082,6 +1082,29 @@
                        continue;
                }
 
+               if (code == '<' && htmlAllowed() )
+               {
+                       static bool warned = false;
+                       if ( ! warned )
+                       {
+                               log_debug(_("HTML in a text field is 
unsupported, gnash will just forget the tags and print their content"));
+                               warned = true;
+                       }
+
+                       // HTML tag, just skip it...
+                       bool closingTagFound = false;
+                       while ( (code = 
utf8::decode_next_unicode_character(&text)) )
+                       {
+                               if (code == '>')
+                               {
+                                       closingTagFound = true;
+                                       break;
+                               }
+                       }
+                       if ( ! closingTagFound ) break;
+                       else continue;
+               }
+
                if (code == 9) // tab (ASCII HT)
                {
                        int index = _font->get_glyph_index(32); // ascii SPACE
@@ -1158,7 +1181,6 @@
 
                        if ( ! m_def->do_word_wrap() )
                        {
-                               // TODO: scan more glyphs till newline and 
continue
                                bool newlinefound = false;
                                while ( (code = 
utf8::decode_next_unicode_character(&text)) )
                                {

Index: server/edit_text_character.h
===================================================================
RCS file: /sources/gnash/gnash/server/edit_text_character.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- server/edit_text_character.h        1 Jul 2007 10:54:22 -0000       1.34
+++ server/edit_text_character.h        3 Jul 2007 01:12:45 -0000       1.35
@@ -107,6 +107,9 @@
 
 private:
 
+       /// Return true if HTML was allowed by definition
+       bool htmlAllowed() const { return m_def->htmlAllowed(); }
+
        /// The actual text
        std::string _text;
 

Index: server/parser/edit_text_character_def.h
===================================================================
RCS file: /sources/gnash/gnash/server/parser/edit_text_character_def.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- server/parser/edit_text_character_def.h     1 Jul 2007 10:54:34 -0000       
1.14
+++ server/parser/edit_text_character_def.h     3 Jul 2007 01:12:45 -0000       
1.15
@@ -211,6 +211,9 @@
     return get_bounds(); 
   }
        
+       /// Return true if HTML was allowed by definition
+       bool htmlAllowed() const { return m_html; }
+       
 protected:
 
 #ifdef GNASH_USE_GC




reply via email to

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