gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-2196-g2d5a928
Date: Tue, 25 Aug 2015 17:19:17 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  2d5a92810cde81303f87961431d9634319f3a652 (commit)
      from  e04f9e25c68ba879e82d206716eae76fc4542cb8 (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 -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=2d5a92810cde81303f87961431d9634319f3a652


commit 2d5a92810cde81303f87961431d9634319f3a652
Author: Nutchanon Wetchasit <address@hidden>
Date:   Tue Aug 25 19:16:55 2015 +0200

    Make TextField.getFontList() return empty Array.
    
    Changing `TextField.getFontList()` to return an empty Array
    instead of `undefined` (but still emit `UNIMPLEMENTED` log message)
    is an easy way to fix errors in Panopticlick and possibly other site
    that tries to use this feature, without actually implementing
    the whole functionality.
    
    Includes method calling tests (only testing type of return).
    See https://savannah.gnu.org/patch/?8723
    
    Signed-off-by: Sandro Santilli <address@hidden>

diff --git a/libcore/asobj/TextField_as.cpp b/libcore/asobj/TextField_as.cpp
index ffbd843..18e4717 100644
--- a/libcore/asobj/TextField_as.cpp
+++ b/libcore/asobj/TextField_as.cpp
@@ -593,7 +593,10 @@ textfield_getFontList(const fn_call& fn)
 {
     LOG_ONCE(log_unimpl(_("TextField.getFontList()")));
 
-    return as_value();
+    Global_as& gl = getGlobal(fn);
+    as_object* fontlist = gl.createArray();
+
+    return as_value(fontlist);
 }
 
 as_value
diff --git a/testsuite/actionscript.all/TextField.as 
b/testsuite/actionscript.all/TextField.as
index f56984f..48dc6f5 100644
--- a/testsuite/actionscript.all/TextField.as
+++ b/testsuite/actionscript.all/TextField.as
@@ -113,9 +113,17 @@ xcheck( !TextField.prototype.hasOwnProperty('wordWrap') );
 
 // this is a static method
 check_equals(typeof(TextField.getFontList), 'function');
-
 check_equals(typeof(TextField.prototype.getFontList), 'undefined');
 
+tfGetFontList = TextField.getFontList;
+tfGetFontListObj = new Object();
+tfGetFontListObj.f = tfGetFontList;
+check_equals(TextField.getFontList() instanceof Array, true);
+check_equals(tfGetFontList() instanceof Array, true);
+check_equals(tfGetFontListObj.f() instanceof Array, true);
+check_equals(tfGetFontList.call(null) instanceof Array, true);
+check_equals(tfGetFontList.call(undefined) instanceof Array, true);
+
 check(TextField.prototype.hasOwnProperty('replaceText'));
 #if OUTPUT_VERSION > 6
 check_equals(typeof(TextField.prototype.replaceText), 'function');
@@ -1299,11 +1307,11 @@ o = new CTF();
 //------------------------------------------------------------
 
 #if OUTPUT_VERSION == 6
-     check_totals(526);
+     check_totals(531);
 #elif OUTPUT_VERSION == 7
- check_totals(550);
+ check_totals(555);
 #elif OUTPUT_VERSION == 8
- check_totals(551);
+ check_totals(556);
 #endif
 
 #endif

-----------------------------------------------------------------------

Summary of changes:
 libcore/asobj/TextField_as.cpp          |    5 ++++-
 testsuite/actionscript.all/TextField.as |   16 ++++++++++++----
 2 files changed, 16 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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