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. c854e6b13de275065097


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. c854e6b13de275065097c6e4f7461b065656c411
Date: Sun, 17 Oct 2010 16:58:48 +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  c854e6b13de275065097c6e4f7461b065656c411 (commit)
       via  d8632fd03833b51b0c8fb3fecd7aeda89095734e (commit)
       via  41d1f7beb5131f3e1f75a5622101e3f0b75d64a7 (commit)
       via  bbf2ca2ba6c09f345e2d1a5eb35875a9b8a727ea (commit)
       via  93116439638a743d58b367428a1465e9c3fe792a (commit)
       via  84baa2aeec6406e657254fc35c8b0a7f79dd851f (commit)
      from  ddf7b5a6a645ed66aa77ccae96582281303591a8 (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=c854e6b13de275065097c6e4f7461b065656c411


commit c854e6b13de275065097c6e4f7461b065656c411
Merge: d8632fd ddf7b5a
Author: Sandro Santilli <address@hidden>
Date:   Sun Oct 17 18:58:35 2010 +0200

    Merge branch 'master' of ssh://address@hidden/srv/git/gnash


http://git.savannah.gnu.org/cgit//commit/?id=d8632fd03833b51b0c8fb3fecd7aeda89095734e


commit d8632fd03833b51b0c8fb3fecd7aeda89095734e
Author: Sandro Santilli <address@hidden>
Date:   Sun Oct 17 18:53:35 2010 +0200

    Do not check for RELEASE for saying if hand cursor is to be used. Fixes bug 
#31344

diff --git a/libcore/DisplayObject.cpp b/libcore/DisplayObject.cpp
index f03c7da..5e19d2d 100644
--- a/libcore/DisplayObject.cpp
+++ b/libcore/DisplayObject.cpp
@@ -736,6 +736,7 @@ DisplayObject::markReachableResources() const
 /// 1. Only AS-referenceable objects may use a hand cursor (TODO: check
 ///    Video). 
 /// 2. Only objects with a release event may use a hand cursor.
+///    CANNOT CONFIRM THE ABOVE, SEE ButtonEventsTest.swf in misc-ming.all
 /// 3. The default value (if the property is not defined) is true.
 bool
 DisplayObject::allowHandCursor() const
@@ -743,7 +744,10 @@ DisplayObject::allowHandCursor() const
     as_object* obj = getObject(this);
     if (!obj) return false;
 
-    if (!hasEventHandler(event_id::RELEASE)) return false;
+    // Checking for RELEASE breaks ButtonEventsTest.
+    // I guess such an event would influence wheter or not this
+    // character would become an active one, despite hand cursor
+    //if (!hasEventHandler(event_id::RELEASE)) return false;
 
     as_value val;
     if (!obj->get_member(NSV::PROP_USEHANDCURSOR, &val)) {

http://git.savannah.gnu.org/cgit//commit/?id=41d1f7beb5131f3e1f75a5622101e3f0b75d64a7


commit 41d1f7beb5131f3e1f75a5622101e3f0b75d64a7
Author: Sandro Santilli <address@hidden>
Date:   Sun Oct 17 18:25:25 2010 +0200

    Check for hand cursor

diff --git a/testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp 
b/testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp
index 4b8609e..60349bb 100644
--- a/testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp
+++ b/testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp
@@ -51,6 +51,7 @@ test_mouse_activity(MovieTester& tester, const TextField* 
text, const TextField*
        // the textfield value, if enabled
        tester.movePointerTo(60, 60);
        if ( enabled ) {
+               check(tester.usingHandCursor());
                check_equals(string(text->get_text_value()), 
string("MouseOver"));
                check_equals(string(text2->get_text_value()), 
string("RollOver"));
                check(tester.isMouseOverMouseEntity());
@@ -69,6 +70,7 @@ test_mouse_activity(MovieTester& tester, const TextField* 
text, const TextField*
                        check_pixel(72, 64, 2, dark_yellow, 2); 
                }
        } else {
+               check(!tester.usingHandCursor());
                check_equals(string(text->get_text_value()), 
string("MouseUpOutside"));
                check_equals(string(text2->get_text_value()), 
string("ReleaseOutside"));
                check(!tester.isMouseOverMouseEntity());
@@ -262,6 +264,8 @@ main(int /*argc*/, char** /*argv*/)
        check_equals(mc1->get_depth(), 2+DisplayObject::staticDepthOffset);
 
        check(!tester.isMouseOverMouseEntity());
+       check(!tester.usingHandCursor());
+
        // check that pixel @ 60,60 is red !
        rgba red(255,0,0,255);
        check_pixel(60, 60, 2, red, 2);
@@ -272,8 +276,13 @@ main(int /*argc*/, char** /*argv*/)
        check_equals(root->get_current_frame(), 2); // need to roll out
 
        tester.movePointerTo(60, 60); // roll over the square
+       check(tester.isMouseOverMouseEntity());
+       check(tester.usingHandCursor());
        check_equals(root->get_current_frame(), 2); // need to roll out
+
        tester.movePointerTo(0, 0); // roll out, should go to next frame
+       check(!tester.isMouseOverMouseEntity());
+       check(!tester.usingHandCursor());
        check_equals(root->get_current_frame(), 3); 
 
        for (size_t fno=root->get_current_frame(); fno<root->get_frame_count(); 
fno++)

http://git.savannah.gnu.org/cgit//commit/?id=bbf2ca2ba6c09f345e2d1a5eb35875a9b8a727ea


commit bbf2ca2ba6c09f345e2d1a5eb35875a9b8a727ea
Author: Sandro Santilli <address@hidden>
Date:   Sun Oct 17 18:24:13 2010 +0200

    Add MovieTester::usingHandCursor

diff --git a/testsuite/MovieTester.cpp b/testsuite/MovieTester.cpp
index 1c1921b..ee581ff 100644
--- a/testsuite/MovieTester.cpp
+++ b/testsuite/MovieTester.cpp
@@ -447,6 +447,21 @@ MovieTester::isMouseOverMouseEntity()
     return (_movie_root->getActiveEntityUnderPointer());
 }
 
+bool
+MovieTester::usingHandCursor()
+{
+       DisplayObject* activeEntity = 
_movie_root->getActiveEntityUnderPointer();
+       if ( ! activeEntity ) return false;
+
+    if ( activeEntity->isSelectableTextField() ) {
+        return false; // setCursor(CURSOR_INPUT);
+    } else if ( activeEntity->allowHandCursor() ) {
+        return true; // setCursor(CURSOR_HAND);
+    } else {
+        return false; // setCursor(CURSOR_NORMAL);
+    }
+}
+
 geometry::SnappingRanges2d<int>
 MovieTester::getInvalidatedRanges() const
 {
diff --git a/testsuite/MovieTester.h b/testsuite/MovieTester.h
index 53fa49e..4b7b488 100644
--- a/testsuite/MovieTester.h
+++ b/testsuite/MovieTester.h
@@ -244,6 +244,10 @@ public:
        /// handles mouse events
        bool isMouseOverMouseEntity();
 
+       /// Return true if a gui would be using an hand
+       /// cursor in the current position.
+       bool usingHandCursor();
+
        /// \brief
        /// Return the number of times a sound has been stopped,
        /// or 0 if sound testing is not supported. See canTestSound().

http://git.savannah.gnu.org/cgit//commit/?id=93116439638a743d58b367428a1465e9c3fe792a


commit 93116439638a743d58b367428a1465e9c3fe792a
Author: Sandro Santilli <address@hidden>
Date:   Sun Oct 17 18:11:21 2010 +0200

    Write what's the expected cursor when rolling over the button

diff --git a/testsuite/misc-ming.all/ButtonEventsTest.c 
b/testsuite/misc-ming.all/ButtonEventsTest.c
index e59d9bf..812ee26 100644
--- a/testsuite/misc-ming.all/ButtonEventsTest.c
+++ b/testsuite/misc-ming.all/ButtonEventsTest.c
@@ -590,7 +590,7 @@ main(int argc, char **argv)
                "_root.testno=0;"
                "_root.square1.onRollOut = function() { _root.testno++; delete 
_root.square1.onRollOut; nextFrame(); };"
                "_root.note('"
-               "0. Roll over and out the red square, not touching the small 
dark-red square in it."
+               "0. Roll over and out the red square, not touching the small 
dark-red square in it.\n   The cursor should turn to an hand while on the 
square."
                "');");
 
        /* hitTest should work on every child, not just first added */

http://git.savannah.gnu.org/cgit//commit/?id=84baa2aeec6406e657254fc35c8b0a7f79dd851f


commit 84baa2aeec6406e657254fc35c8b0a7f79dd851f
Author: Sandro Santilli <address@hidden>
Date:   Sun Oct 17 18:03:30 2010 +0200

    Add test for useHandCursor in Button test

diff --git a/testsuite/misc-ming.all/ButtonEventsTest.c 
b/testsuite/misc-ming.all/ButtonEventsTest.c
index 03266f4..e59d9bf 100644
--- a/testsuite/misc-ming.all/ButtonEventsTest.c
+++ b/testsuite/misc-ming.all/ButtonEventsTest.c
@@ -479,7 +479,8 @@ main(int argc, char **argv)
 
        check_equals(mo, "typeof(square1.button)", "'object'");
        check(mo, "square1.button instanceOf Button");
-    // TODO: check existance of useHandCursor
+       check_equals(mo, "typeof(square1.button.useHandCursor)", "'boolean'");
+       check_equals(mo, "square1.button.useHandCursor", "true");
 
        //
        // Mouse buttons events
@@ -746,7 +747,7 @@ main(int argc, char **argv)
             "square1.button._visible = true;"
                        "square1.button.enabled = false;"
                        "stop();"
-                       "_root.totals(162);"
+                       "_root.totals(164);"
                        "_root.note('-- Button disabled, try playing with it, 
nothing should happen --');"
                );
                SWFMovie_nextFrame(mo); /* showFrame */

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

Summary of changes:
 libcore/DisplayObject.cpp                          |    6 +++++-
 testsuite/MovieTester.cpp                          |   15 +++++++++++++++
 testsuite/MovieTester.h                            |    4 ++++
 .../misc-ming.all/ButtonEventsTest-Runner.cpp      |    9 +++++++++
 testsuite/misc-ming.all/ButtonEventsTest.c         |    7 ++++---
 5 files changed, 37 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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