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. 6b3d8c4f9d011faa2f8b


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. 6b3d8c4f9d011faa2f8b3292c94987a2285e2e7b
Date: Sun, 17 Oct 2010 14:09:26 +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  6b3d8c4f9d011faa2f8b3292c94987a2285e2e7b (commit)
      from  d0d861cf12c83ce384a698c0fb52329259126935 (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=6b3d8c4f9d011faa2f8b3292c94987a2285e2e7b


commit 6b3d8c4f9d011faa2f8b3292c94987a2285e2e7b
Author: Sandro Santilli <address@hidden>
Date:   Sun Oct 17 16:08:54 2010 +0200

    Implement hit test for static text as a point-in-bounds check. Not 100% 
compatible but much better than nothing for normal use.

diff --git a/libcore/StaticText.cpp b/libcore/StaticText.cpp
index 53fc810..5790a0e 100644
--- a/libcore/StaticText.cpp
+++ b/libcore/StaticText.cpp
@@ -20,6 +20,7 @@
 
 #include "StaticText.h"
 #include "swf/DefineTextTag.h"
+#include "log.h"
 
 namespace gnash
 {
@@ -46,12 +47,12 @@ StaticText::setSelectionColor(boost::uint32_t color)
 }
 
 bool
-StaticText::pointInShape(boost::int32_t /*x*/, boost::int32_t /*y*/) const
+StaticText::pointInShape(boost::int32_t x, boost::int32_t y) const
 {
-    // TODO: this has never worked as it relied on the default
-    // pointTestLocal in DefinitionTag, which returned false. There are
-    // no tests for whether StaticText has a proper hit test.
-    return false;
+    // TODO: check actual point in shape, as tested 
+    //       in misc-ming.all/DefineTextTest.swf
+    LOG_ONCE(log_unimpl("StaticText::pointInShape"));
+    return pointInBounds(x, y);
 }
 
 
diff --git a/testsuite/misc-ming.all/DefineTextTest-Runner.cpp 
b/testsuite/misc-ming.all/DefineTextTest-Runner.cpp
index 54046d3..686c60d 100644
--- a/testsuite/misc-ming.all/DefineTextTest-Runner.cpp
+++ b/testsuite/misc-ming.all/DefineTextTest-Runner.cpp
@@ -116,9 +116,9 @@ main(int /*argc*/, char** /*argv*/)
 
        as_value eot;
        bool endOfTestFound = getObject(root)->get_member(st.find("endoftest"), 
&eot);
-       xcheck(endOfTestFound);
-       xcheck(eot.is_bool());
-       xcheck(eot.to_bool(8));
+       check(endOfTestFound);
+       check(eot.is_bool());
+       check(eot.to_bool(8));
 
        // TODO: use check_pixel for checking bacground colors
 }

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

Summary of changes:
 libcore/StaticText.cpp                            |   11 ++++++-----
 testsuite/misc-ming.all/DefineTextTest-Runner.cpp |    6 +++---
 2 files changed, 9 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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