gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r11548: Test and handle case-insensi


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11548: Test and handle case-insensitivity for magic DisplayObject properties.
Date: Tue, 06 Oct 2009 09:45:26 +0200
User-agent: Bazaar (1.16.1)

------------------------------------------------------------
revno: 11548 [merge]
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Tue 2009-10-06 09:45:26 +0200
message:
  Test and handle case-insensitivity for magic DisplayObject properties.
  
  Rename rect to SWFRect.
renamed:
  libcore/rect.cpp => libcore/SWFRect.cpp
  libcore/rect.h => libcore/SWFRect.h
modified:
  backend/ProxyRenderer.cpp
  backend/ProxyRenderer.h
  backend/Renderer.h
  backend/Renderer_agg.cpp
  backend/Renderer_cairo.cpp
  backend/Renderer_cairo.h
  backend/Renderer_ogl.cpp
  gui/dump.h
  gui/fltk_glue_cairo.cpp
  gui/fltk_glue_cairo.h
  gui/gtk.cpp
  gui/gui.cpp
  gui/gui.h
  gui/riscos.cpp
  gui/riscossup.h
  libcore/Bitmap.cpp
  libcore/Bitmap.h
  libcore/Button.cpp
  libcore/Button.h
  libcore/DisplayObject.cpp
  libcore/DisplayObject.h
  libcore/DynamicShape.cpp
  libcore/DynamicShape.h
  libcore/FreetypeGlyphsProvider.cpp
  libcore/FreetypeGlyphsProvider.h
  libcore/Geometry.h
  libcore/InteractiveObject.h
  libcore/Makefile.am
  libcore/MorphShape.cpp
  libcore/MorphShape.h
  libcore/MovieClip.cpp
  libcore/MovieClip.h
  libcore/SWFMatrix.cpp
  libcore/SWFMatrix.h
  libcore/Shape.h
  libcore/StaticText.h
  libcore/TextField.cpp
  libcore/TextField.h
  libcore/Video.cpp
  libcore/Video.h
  libcore/asobj/flash/display/MovieClip_as.cpp
  libcore/drag_state.h
  libcore/movie_root.cpp
  libcore/movie_root.h
  libcore/parser/BitmapMovieDefinition.h
  libcore/parser/SWFMovieDefinition.cpp
  libcore/parser/SWFMovieDefinition.h
  libcore/parser/movie_definition.h
  libcore/parser/sprite_definition.h
  libcore/swf/DefineEditTextTag.h
  libcore/swf/DefineFontTag.cpp
  libcore/swf/DefineMorphShapeTag.cpp
  libcore/swf/DefineMorphShapeTag.h
  libcore/swf/DefineScalingGridTag.cpp
  libcore/swf/DefineShapeTag.h
  libcore/swf/DefineTextTag.h
  libcore/swf/DefineVideoStreamTag.h
  libcore/swf/DefinitionTag.h
  libcore/swf/ShapeRecord.cpp
  libcore/swf/ShapeRecord.h
  libcore/swf/VideoFrameTag.h
  libcore/vm/ASHandlers.cpp
  testsuite/DummyCharacter.h
  testsuite/DummyMovieDefinition.h
  testsuite/actionscript.all/MovieClip.as
  testsuite/actionscript.all/TextField.as
  testsuite/libcore.all/ClassSizes.cpp
  libcore/SWFRect.cpp
  libcore/SWFRect.h
=== modified file 'backend/ProxyRenderer.cpp'
--- a/backend/ProxyRenderer.cpp 2009-07-13 07:07:26 +0000
+++ b/backend/ProxyRenderer.cpp 2009-10-01 13:19:43 +0000
@@ -88,7 +88,7 @@
 
        // Draws the video frames
        void drawVideoFrame(GnashImage* frame, const SWFMatrix* mat,
-            const rect* bounds, bool smooth)
+            const SWFRect* bounds, bool smooth)
     {
                if (s_Renderer) {
             return s_Renderer->drawVideoFrame(frame, mat, bounds, smooth);
@@ -170,7 +170,7 @@
                if (s_Renderer) s_Renderer->drawGlyph(rec, color, mat);
 }
 
-bool bounds_in_clipping_area(const rect& bounds) {
+bool bounds_in_clipping_area(const SWFRect& bounds) {
        return bounds_in_clipping_area(bounds.getRange());
   if (s_Renderer) 
     return s_Renderer->bounds_in_clipping_area(bounds);

=== modified file 'backend/ProxyRenderer.h'
--- a/backend/ProxyRenderer.h   2009-07-13 07:07:26 +0000
+++ b/backend/ProxyRenderer.h   2009-10-01 13:19:43 +0000
@@ -61,7 +61,7 @@
 
                /// See Renderer::drawVideoFrame (in backend/Renderer.h)
                void drawVideoFrame(GnashImage* frame, const SWFMatrix* mat,
-                const rect* bounds, bool smooth);
+                const SWFRect* bounds, bool smooth);
 
                /// See Renderer::begin_display (in backend/Renderer.h)
                void    begin_display(
@@ -90,7 +90,7 @@
                 const SWFMatrix& mat);
 
                /// See Renderer::bounds_in_clipping_area (in 
backend/Renderer.h)
-               bool bounds_in_clipping_area(const rect& bounds);
+               bool bounds_in_clipping_area(const SWFRect& bounds);
                bool bounds_in_clipping_area(const InvalidatedRanges& ranges);
                bool bounds_in_clipping_area(const geometry::Range2d<float>& 
bounds);
                                

=== modified file 'backend/Renderer.h'
--- a/backend/Renderer.h        2009-09-07 17:34:36 +0000
+++ b/backend/Renderer.h        2009-10-01 13:19:43 +0000
@@ -138,7 +138,7 @@
 /// a hint and the GUI /is/ allowed to further process and alter the 
information
 /// in any way.
 /// 
-/// As for the integer/float discussion: I used rect (floats) because all
+/// As for the integer/float discussion: I used SWFRect (floats) because all
 /// the bounds calculation involves floats anyway and so it's probably
 /// faster than converting between ints and floats all the way.
 
@@ -153,7 +153,7 @@
 // Forward declarations.
 namespace gnash {
     class BitmapInfo;
-    class rect;
+    class SWFRect;
     class rgba;
     class SWFMatrix;
     class cxform;
@@ -250,12 +250,12 @@
     ///   renderer has to find the correct scaling for the video inside the
     ///   bounds.                                
     ///
-    /// @param bounds The minX/minY fields of this rect are always zero. 
+    /// @param bounds The minX/minY fields of this SWFRect are always zero. 
     ///   The width and height determine the size of the Flash video instance
     ///   on the stage (in TWIPS) prior to SWFMatrix transformations.         
     ///
     virtual void drawVideoFrame(GnashImage* frame, const SWFMatrix* mat,
-            const rect* bounds, bool smooth) = 0;
+            const SWFRect* bounds, bool smooth) = 0;
 
     /// Draw a line-strip directly, using a thin, solid line.
     //
@@ -328,7 +328,7 @@
     ///
     /// For more info see page \ref region_update.
     ///
-    virtual void set_invalidated_region(const rect& /*bounds*/) {}
+    virtual void set_invalidated_region(const SWFRect& /*bounds*/) {}
 
     virtual void set_invalidated_regions(const InvalidatedRanges& /*ranges*/)
     {        
@@ -378,7 +378,7 @@
     /// ==================================================================
     
     /// Converts world coordinates to pixel coordinates
-    virtual geometry::Range2d<int> world_to_pixel(const rect& worldbounds) = 0;
+    virtual geometry::Range2d<int> world_to_pixel(const SWFRect& worldbounds) 
= 0;
     
     /// Converts pixel coordinates to world coordinates (TWIPS)
     virtual point pixel_to_world(int x, int y) = 0;
@@ -404,7 +404,7 @@
        // here, so we cast it ourselves to get rid of the warning
        // message. Note that in both cases this rounds the float to
        // an integer by dropping the decimal part.
-        return world_to_pixel(rect(static_cast<int>(worldbounds.getMinX()),
+        return world_to_pixel(SWFRect(static_cast<int>(worldbounds.getMinX()),
                                   static_cast<int>(worldbounds.getMinY()),
                                   static_cast<int>(worldbounds.getMaxX()),
                                   static_cast<int>(worldbounds.getMaxY())));
@@ -422,12 +422,12 @@
     /// handler for better performance.
     /// 'bounds' contains TWIPS coordinates.
     ///
-    /// TODO: Take a Range2d<T> rather then a gnash::rect ?
+    /// TODO: Take a Range2d<T> rather then a gnash::SWFRect ?
     ///             Would T==int be good ? TWIPS as integer types ?
     ///
     /// See also gnash::renderer::bounds_in_clipping_area
     ///
-    virtual bool bounds_in_clipping_area(const rect& bounds) {
+    virtual bool bounds_in_clipping_area(const SWFRect& bounds) {
         return bounds_in_clipping_area(bounds.getRange());
     }
     

=== modified file 'backend/Renderer_agg.cpp'
--- a/backend/Renderer_agg.cpp  2009-07-13 07:07:59 +0000
+++ b/backend/Renderer_agg.cpp  2009-10-01 13:19:43 +0000
@@ -349,7 +349,7 @@
         const agg::gray8 black(0);
                 
         // region can't be world as it should be intersected with 
-        // the visible rect
+        // the visible SWFRect
         assert(!region.isWorld());
 
         unsigned int left = region.getMinX();
@@ -607,7 +607,7 @@
     }
 
     void drawVideoFrame(GnashImage* frame, const SWFMatrix* source_mat, 
-        const rect* bounds, bool smooth)
+        const SWFRect* bounds, bool smooth)
     {
     
         // NOTE: Assuming that the source image is RGB 8:8:8
@@ -909,7 +909,7 @@
   /// rendering of characters outside a particular clipping range.
   /// "_clipbounds_selected" is used by draw_shape() and draw_outline() and
   /// *must* be initialized prior to using those function.
-  void select_clipbounds(const rect& objectBounds, const SWFMatrix& source_mat)
+  void select_clipbounds(const SWFRect& objectBounds, const SWFMatrix& 
source_mat)
   {
     
     SWFMatrix mat = stage_matrix;
@@ -924,7 +924,7 @@
       return;
     }   
 
-    rect bounds;    
+    SWFRect bounds;    
     bounds.set_null();
     bounds.expand_to_transformed_rect(mat, objectBounds);
     
@@ -967,7 +967,7 @@
             const SWFMatrix& worldMat)
     {
         // check if the character needs to be rendered at all
-        rect cur_bounds;
+        SWFRect cur_bounds;
 
         cur_bounds.expand_to_transformed_rect(worldMat, shape.getBounds());
                 
@@ -1881,7 +1881,7 @@
     float world_x, float world_y)
   {
     // negative pixels seems ok here... we don't 
-    // clip to valid range, use world_to_pixel(rect&)
+    // clip to valid range, use world_to_pixel(SWFRect&)
     // and Intersect() against valid range instead.
     point p(world_x, world_y);
     stage_matrix.transform(p);
@@ -1889,7 +1889,7 @@
     y = (int)p.y;
   }
 
-  geometry::Range2d<int> world_to_pixel(const rect& wb)
+  geometry::Range2d<int> world_to_pixel(const SWFRect& wb)
   {
       using namespace gnash::geometry;
 
@@ -1931,7 +1931,7 @@
     set_invalidated_regions(ranges);
   }
   
-  virtual void set_invalidated_region(const rect& bounds) {
+  virtual void set_invalidated_region(const SWFRect& bounds) {
   
     // NOTE: Both single and multi ranges are supported by AGG renderer.
     

=== modified file 'backend/Renderer_cairo.cpp'
--- a/backend/Renderer_cairo.cpp        2009-07-17 18:42:28 +0000
+++ b/backend/Renderer_cairo.cpp        2009-10-01 13:19:43 +0000
@@ -447,7 +447,7 @@
 
 void
 Renderer_cairo::drawVideoFrame(GnashImage* baseframe, const SWFMatrix* m,
-                               const rect* bounds, bool /*smooth*/)
+                               const SWFRect* bounds, bool /*smooth*/)
 {
 
     if (baseframe->type() == GNASH_IMAGE_RGBA)
@@ -519,7 +519,7 @@
 
   
 geometry::Range2d<int>
-Renderer_cairo::world_to_pixel(const rect& worldbounds)
+Renderer_cairo::world_to_pixel(const SWFRect& worldbounds)
 {
     double xmin = worldbounds.get_x_min(),
            ymin = worldbounds.get_y_min(),

=== modified file 'backend/Renderer_cairo.h'
--- a/backend/Renderer_cairo.h  2009-07-17 18:42:28 +0000
+++ b/backend/Renderer_cairo.h  2009-10-01 13:19:43 +0000
@@ -39,9 +39,9 @@
     BitmapInfo* createBitmapInfo(std::auto_ptr<GnashImage> im);
 
     void drawVideoFrame(GnashImage* baseframe, const SWFMatrix* m,
-                                const rect* bounds, bool smooth);
+                                const SWFRect* bounds, bool smooth);
 
-    geometry::Range2d<int> world_to_pixel(const rect& worldbounds);
+    geometry::Range2d<int> world_to_pixel(const SWFRect& worldbounds);
     point pixel_to_world(int x, int y);
 
     void set_color(const rgba& c);

=== modified file 'backend/Renderer_ogl.cpp'
--- a/backend/Renderer_ogl.cpp  2009-10-02 21:43:58 +0000
+++ b/backend/Renderer_ogl.cpp  2009-10-06 07:45:26 +0000
@@ -677,7 +677,7 @@
   // concatenated this means we'll add up with several display lists for normal
   // drawing operations.
   virtual void drawVideoFrame(GnashImage* frame, const SWFMatrix* m,
-          const rect* bounds, bool /*smooth*/)
+          const SWFRect* bounds, bool /*smooth*/)
   {
     GLint index;
 
@@ -708,7 +708,7 @@
     _render_indices.push_back(index);
   }
   
-  virtual void reallyDrawVideoFrame(GnashImage* frame, const SWFMatrix* m, 
const rect* bounds)
+  virtual void reallyDrawVideoFrame(GnashImage* frame, const SWFMatrix* m, 
const SWFRect* bounds)
   {
   
     if (frame->type() == GNASH_IMAGE_RGBA)
@@ -762,7 +762,7 @@
 
   // FIXME
   geometry::Range2d<int>
-  world_to_pixel(const rect& worldbounds)
+  world_to_pixel(const SWFRect& worldbounds)
   {
     // TODO: verify this is correct
     geometry::Range2d<int> ret(worldbounds.getRange());

=== modified file 'gui/dump.h'
--- a/gui/dump.h        2009-07-13 09:15:53 +0000
+++ b/gui/dump.h        2009-10-01 13:19:43 +0000
@@ -54,7 +54,7 @@
     void setTimeout(unsigned int timeout);
     bool setupEvents() { return true; }
     void setFullscreen() { return; }
-    void setInvalidatedRegion(const rect& /*bounds*/) { return; }
+    void setInvalidatedRegion(const SWFRect& /*bounds*/) { return; }
     void setInvalidatedRegions(const InvalidatedRanges& /*ranges*/) { return; }
     void setCursor(gnash_cursor_type /*newcursor*/) { return; }
     void setRenderHandlerSize(int width, int height);

=== modified file 'gui/fltk_glue_cairo.cpp'
--- a/gui/fltk_glue_cairo.cpp   2009-08-30 00:45:24 +0000
+++ b/gui/fltk_glue_cairo.cpp   2009-10-01 13:19:43 +0000
@@ -127,7 +127,7 @@
 }
 
 void
-FltkCairoGlue::invalidateRegion(const rect& bounds)
+FltkCairoGlue::invalidateRegion(const SWFRect& bounds)
 {
     return;
 }

=== modified file 'gui/fltk_glue_cairo.h'
--- a/gui/fltk_glue_cairo.h     2009-07-10 15:44:55 +0000
+++ b/gui/fltk_glue_cairo.h     2009-10-01 13:19:43 +0000
@@ -57,7 +57,7 @@
       Renderer* createRenderHandler();
       void initBuffer(int width, int height);
       void resize(int width, int height);
-      void invalidateRegion(const rect& bounds);
+      void invalidateRegion(const SWFRect& bounds);
     private:
       int _width;
       int _height;

=== modified file 'gui/gtk.cpp'
--- a/gui/gtk.cpp       2009-07-24 17:06:03 +0000
+++ b/gui/gtk.cpp       2009-10-01 13:20:16 +0000
@@ -2060,8 +2060,6 @@
     GtkWidget *menu = gtk_menu_new ();
     gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
 
-    Quality curQuality = getQuality();
-
     // TODO: use to also show current quality state
 
     // Low

=== modified file 'gui/gui.cpp'
--- a/gui/gui.cpp       2009-07-13 09:15:53 +0000
+++ b/gui/gui.cpp       2009-10-01 13:19:43 +0000
@@ -1009,7 +1009,7 @@
 }
 
 void
-Gui::setInvalidatedRegion(const rect& /*bounds*/)
+Gui::setInvalidatedRegion(const SWFRect& /*bounds*/)
 {
 }
 
@@ -1019,10 +1019,10 @@
        // fallback to single regions
        geometry::Range2d<float> full = ranges.getFullArea();
        
-       rect bounds;
+       SWFRect bounds;
        
        if (full.isFinite())
-               bounds = rect(full.getMinX(), full.getMinY(), full.getMaxX(), 
full.getMaxY());
+               bounds = SWFRect(full.getMinX(), full.getMinY(), 
full.getMaxX(), full.getMaxY());
        else
        if (full.isWorld())
                bounds.set_world();

=== modified file 'gui/gui.h'
--- a/gui/gui.h 2009-09-21 02:56:49 +0000
+++ b/gui/gui.h 2009-10-01 13:19:43 +0000
@@ -22,7 +22,7 @@
 #include "gnashconfig.h"
 #endif
 
-#include "rect.h"  // for composition
+#include "SWFRect.h"  // for composition
 #include "snappingrange.h"  // for InvalidatedRanges
 #include "GnashKey.h" // for gnash::key::code type
 #include "Renderer.h" // for gnash::key::code type
@@ -150,7 +150,7 @@
     // does not need to be implemented (optional feature),
     // but still needs to be available.
     //
-    // Why "rect" (floats)? Because the gui does not really
+    // Why "SWFRect" (floats)? Because the gui does not really
     // know about the scale the renderer currently uses... 
     //
     // <strk> but it does not about the "semantic" of the TWIPS
@@ -158,7 +158,7 @@
     //        The question really is: why floats for TWIPS ?
     //        (guess this goes deep in the core/server libs)
     //
-    virtual void setInvalidatedRegion(const rect& bounds);
+    virtual void setInvalidatedRegion(const SWFRect& bounds);
     virtual void setInvalidatedRegions(const InvalidatedRanges& ranges);
     
     // Called right before rendering anything (after setInvalidatedRegion).

=== modified file 'gui/riscos.cpp'
--- a/gui/riscos.cpp    2009-08-30 00:45:24 +0000
+++ b/gui/riscos.cpp    2009-10-01 13:19:43 +0000
@@ -191,7 +191,7 @@
 }
 
 void
-RiscosGui::setInvalidatedRegion(const rect& bounds)
+RiscosGui::setInvalidatedRegion(const SWFRect& bounds)
 {
     // Note: Bounds coordinates are in TWIPS
 
@@ -269,13 +269,13 @@
           return false;
         }
         while (more) {
-//          rect bounds(block.redraw.clip.x0 / 2, block.redraw.clip.y0 / 2,
+//          SWFRect bounds(block.redraw.clip.x0 / 2, block.redraw.clip.y0 / 2,
 //                      block.redraw.clip.x1 / 2, block.redraw.clip.y1 / 2);
-//          log_debug("Clip rect: (%d, %d)(%d, %d)\n",
+//          log_debug("Clip SWFRect: (%d, %d)(%d, %d)\n",
 //                  block.redraw.clip.x0 / 2, block.redraw.clip.y0 / 2,
 //                  block.redraw.clip.x1 / 2, block.redraw.clip.y1 / 2);
           // TODO: Make this use the clipping rectangle (convert to TWIPS)
-          rect bounds(-1e10f, -1e10f, 1e10f, 1e10f);
+          SWFRect bounds(-1e10f, -1e10f, 1e10f, 1e10f);
 #ifdef RENDERER_AGG
           setInvalidatedRegion(bounds);
 #endif

=== modified file 'gui/riscossup.h'
--- a/gui/riscossup.h   2009-07-13 09:15:53 +0000
+++ b/gui/riscossup.h   2009-10-01 13:19:43 +0000
@@ -51,7 +51,7 @@
     virtual void renderBuffer();
     virtual void setInterval(unsigned int interval);
     virtual void setTimeout(unsigned int timeout);
-    virtual void setInvalidatedRegion(const rect& bounds);
+    virtual void setInvalidatedRegion(const SWFRect& bounds);
 
 
  private:

=== modified file 'libcore/Bitmap.cpp'
--- a/libcore/Bitmap.cpp        2009-09-29 12:06:24 +0000
+++ b/libcore/Bitmap.cpp        2009-10-01 13:19:43 +0000
@@ -21,7 +21,7 @@
 #include "GnashImage.h"
 #include "fill_style.h"
 #include "DynamicShape.h"
-#include "rect.h"
+#include "SWFRect.h"
 #include "Renderer.h"
 #include "VM.h"
 #include "movie_root.h"
@@ -37,7 +37,7 @@
     _width(_bitmapData->getWidth()),
     _height(_bitmapData->getHeight())
 {
-    _shape.setBounds(rect(0, 0, pixelsToTwips(_width), 
pixelsToTwips(_height)));
+    _shape.setBounds(SWFRect(0, 0, pixelsToTwips(_width), 
pixelsToTwips(_height)));
 }
 
 Bitmap::Bitmap(const BitmapMovieDefinition* const def, DisplayObject* parent,
@@ -95,13 +95,13 @@
 
     ranges.add(m_old_invalidated_ranges);
 
-    rect bounds;
+    SWFRect bounds;
     bounds.expand_to_transformed_rect(getWorldMatrix(), getBounds()); 
     ranges.add(bounds.getRange());
 
 }
 
-rect
+SWFRect
 Bitmap::getBounds() const
 {
     return _shape.getBounds();

=== modified file 'libcore/Bitmap.h'
--- a/libcore/Bitmap.h  2009-09-29 11:09:52 +0000
+++ b/libcore/Bitmap.h  2009-10-01 13:19:43 +0000
@@ -63,7 +63,7 @@
 
     virtual void display(Renderer& renderer);
 
-    virtual rect getBounds() const;
+    virtual SWFRect getBounds() const;
 
     virtual bool pointInShape(boost::int32_t x, boost::int32_t y) const;
 

=== modified file 'libcore/Button.cpp'
--- a/libcore/Button.cpp        2009-09-30 15:20:47 +0000
+++ b/libcore/Button.cpp        2009-10-01 13:19:43 +0000
@@ -747,10 +747,10 @@
     );
 }
 
-rect
+SWFRect
 Button::getBounds() const
 {
-    rect allBounds;
+    SWFRect allBounds;
 
     typedef std::vector<const DisplayObject*> Chars;
     Chars actChars;
@@ -759,7 +759,7 @@
     {
         const DisplayObject* ch = *i;
         // Child bounds need be transformed in our coordinate space
-        rect lclBounds = ch->getBounds();
+        SWFRect lclBounds = ch->getBounds();
         SWFMatrix m = ch->getMatrix();
         allBounds.expand_to_transformed_rect(m, lclBounds);
     }

=== modified file 'libcore/Button.h'
--- a/libcore/Button.h  2009-08-27 05:46:44 +0000
+++ b/libcore/Button.h  2009-10-01 13:19:43 +0000
@@ -115,7 +115,7 @@
 
        void add_invalidated_bounds(InvalidatedRanges& ranges, bool force);
        
-       virtual rect getBounds() const;
+       virtual SWFRect getBounds() const;
        
        // See dox in DisplayObject.h
        bool pointInShape(boost::int32_t x, boost::int32_t y) const;

=== modified file 'libcore/DisplayObject.cpp'
--- a/libcore/DisplayObject.cpp 2009-10-01 09:08:33 +0000
+++ b/libcore/DisplayObject.cpp 2009-10-01 13:19:43 +0000
@@ -256,7 +256,7 @@
     ranges.add(m_old_invalidated_ranges);
     if (visible() && (m_invalidated||force))
     {
-        rect bounds;        
+        SWFRect bounds;        
         bounds.expand_to_transformed_rect(getWorldMatrix(), getBounds());
         ranges.add(bounds.getRange());                        
     }        
@@ -372,7 +372,7 @@
 void
 DisplayObject::setWidth(double newwidth)
 {
-       const rect& bounds = getBounds();
+       const SWFRect& bounds = getBounds();
        const double oldwidth = bounds.width();
        assert(oldwidth >= 0); 
 
@@ -388,7 +388,7 @@
 as_value
 getHeight(DisplayObject& o)
 {
-       rect bounds = o.getBounds();
+       SWFRect bounds = o.getBounds();
     const SWFMatrix m = o.getMatrix();
     m.transform(bounds);
     return twipsToPixels(bounds.height());      
@@ -410,7 +410,7 @@
 void
 DisplayObject::setHeight(double newheight)
 {
-       const rect& bounds = getBounds();
+       const SWFRect& bounds = getBounds();
 
        const double oldheight = bounds.height();
        assert(oldheight >= 0); 
@@ -614,6 +614,8 @@
 
     // Update the matrix from the cached x scale to avoid accumulating
     // errors.
+    // TODO: also update y scale? The x scale update is needed to keep
+    // TextField correct; no tests for y scale.
     m.set_x_scale(std::abs(scaleX() / 100.0));
        setMatrix(m); // we update the cache ourselves
 
@@ -862,7 +864,7 @@
 bool 
 DisplayObject::boundsInClippingArea(Renderer& renderer) const 
 {
-  rect mybounds = getBounds();
+  SWFRect mybounds = getBounds();
   getWorldMatrix().transform(mybounds);
   
   return renderer.bounds_in_clipping_area(mybounds.getRange());  
@@ -934,7 +936,12 @@
 
     const Getters& getters = displayObjectGetters();
 
-    Getters::const_iterator it = getters.find(key);
+    // The magic properties are case insensitive in all versions!
+    string_table& st = getStringTable(obj);
+    const std::string& propname = st.value(key);
+    const string_table::key noCaseKey = 
st.find(boost::to_lower_copy(propname));
+
+    Getters::const_iterator it = getters.find(noCaseKey);
     if (it == getters.end()) return false;
 
     DisplayObject& o = static_cast<DisplayObject&>(obj);
@@ -951,7 +958,12 @@
 
     const Setters& setters = displayObjectSetters();
 
-    Setters::const_iterator it = setters.find(key);
+    // The magic properties are case insensitive in all versions!
+    string_table& st = getStringTable(obj);
+    const std::string& propname = st.value(key);
+    const string_table::key noCaseKey = 
st.find(boost::to_lower_copy(propname));
+
+    Setters::const_iterator it = setters.find(noCaseKey);
     if (it == setters.end()) return false;
 
     DisplayObject& o = static_cast<DisplayObject&>(obj);
@@ -1358,7 +1370,7 @@
 as_value
 getWidth(DisplayObject& o)
 {
-       rect bounds = o.getBounds();
+       SWFRect bounds = o.getBounds();
     const SWFMatrix& m = o.getMatrix();
     m.transform(bounds);
     return twipsToPixels(bounds.width());
@@ -1377,6 +1389,19 @@
     o.setWidth(newwidth);
 }
 
+as_value
+getFocusRect(DisplayObject& /*o*/)
+{
+    LOG_ONCE(log_unimpl("_focusrect"));
+    return as_value(true);
+}
+
+void
+setFocusRect(DisplayObject& /*o*/, const as_value& /*val*/)
+{
+    LOG_ONCE(log_unimpl("_focusrect setting"));
+}
+
 const Getters
 displayObjectGetters()
 {
@@ -1395,12 +1420,14 @@
         (NSV::PROP_uNAME, getNameProperty)
         (NSV::PROP_uVISIBLE, getVisible)
         (NSV::PROP_uSOUNDBUFTIME, getSoundBufTime)
+        (NSV::PROP_uFOCUSRECT, getFocusRect)
         (NSV::PROP_uPARENT, getParent)
         (NSV::PROP_uTARGET, getTarget)
         (NSV::PROP_uXMOUSE, getMouseX)
         (NSV::PROP_uYMOUSE, getMouseY);
     return getters;
 }
+
 const Setters
 displayObjectSetters()
 {
@@ -1420,6 +1447,7 @@
         (NSV::PROP_uNAME, setName)
         (NSV::PROP_uVISIBLE, setVisible)
         (NSV::PROP_uSOUNDBUFTIME, setSoundBufTime)
+        (NSV::PROP_uFOCUSRECT, setFocusRect)
         (NSV::PROP_uPARENT, n)
         (NSV::PROP_uURL, n)
         (NSV::PROP_uTARGET, n)

=== modified file 'libcore/DisplayObject.h'
--- a/libcore/DisplayObject.h   2009-10-01 09:08:33 +0000
+++ b/libcore/DisplayObject.h   2009-10-01 13:19:43 +0000
@@ -26,12 +26,11 @@
 #include "smart_ptr.h" // GNASH_USE_GC
 #include "event_id.h" // for inlines
 #include "as_object.h" // for inheritance
-#include "rect.h" // for composition (invalidated bounds)
+#include "SWFRect.h" // for composition (invalidated bounds)
 #include "SWFMatrix.h" // for composition
 #include "cxform.h" // for composition
 #include "log.h"
 #include "snappingrange.h"
-#include "Range2d.h"
 #ifdef USE_SWFTREE
 # include "tree.hh"
 #endif
@@ -441,7 +440,7 @@
         return 0;
     }
 
-       virtual rect getBounds() const = 0;
+       virtual SWFRect getBounds() const = 0;
 
     /// Return true if the given point falls in this DisplayObject's bounds
     //
@@ -451,7 +450,7 @@
     ///                 This ignores _root's transform. 
     bool pointInBounds(boost::int32_t x, boost::int32_t y) const
     {
-        rect bounds = getBounds();
+        SWFRect bounds = getBounds();
         SWFMatrix wm = getWorldMatrix(false);
         wm.transform(bounds);
         return bounds.point_test(x, y);

=== modified file 'libcore/DynamicShape.cpp'
--- a/libcore/DynamicShape.cpp  2009-07-13 07:07:26 +0000
+++ b/libcore/DynamicShape.cpp  2009-10-01 13:19:43 +0000
@@ -217,7 +217,7 @@
        _currpath->drawLineTo(x, y);
 
        // Update bounds 
-    rect bounds = _shape.getBounds();
+    SWFRect bounds = _shape.getBounds();
 
        unsigned thickness = _currline ? 
         _shape.lineStyles().back().getThickness() : 0;
@@ -248,7 +248,7 @@
 
        _currpath->drawCurveTo(cx, cy, ax, ay);
 
-    rect bounds = _shape.getBounds();
+    SWFRect bounds = _shape.getBounds();
 
        unsigned thickness = _currline ? 
         _shape.lineStyles().back().getThickness() : 0;

=== modified file 'libcore/DynamicShape.h'
--- a/libcore/DynamicShape.h    2009-07-11 11:25:42 +0000
+++ b/libcore/DynamicShape.h    2009-10-01 13:19:43 +0000
@@ -75,11 +75,11 @@
        /// Close an existing filled path, if any.
        void endFill();
 
-    const rect& getBounds() const {
+    const SWFRect& getBounds() const {
         return _shape.getBounds();
     }
 
-    void setBounds(const rect& bounds) {
+    void setBounds(const SWFRect& bounds) {
         _shape.setBounds(bounds);
     }
 

=== modified file 'libcore/FreetypeGlyphsProvider.cpp'
--- a/libcore/FreetypeGlyphsProvider.cpp        2009-09-21 02:56:49 +0000
+++ b/libcore/FreetypeGlyphsProvider.cpp        2009-10-01 13:19:43 +0000
@@ -203,7 +203,7 @@
        }
     
     void expandBounds(int x, int y) {
-        rect bounds = _shape.getBounds();
+        SWFRect bounds = _shape.getBounds();
         if (_currPath->size() == 1) _currPath->expandBounds(bounds, 0, 6);
         else {
             bounds.expand_to_circle(x, y, 0);
@@ -212,7 +212,7 @@
     }
 
     void expandBounds(int ax, int ay, int cx, int cy) {
-        rect bounds = _shape.getBounds();
+        SWFRect bounds = _shape.getBounds();
         if (_currPath->size() == 1) _currPath->expandBounds(bounds, 0, 6);
         else {
             bounds.expand_to_circle(ax, ay, 0);
@@ -495,7 +495,7 @@
 
        FT_Outline_Decompose(outline, &walk, &walker);
 #ifdef DEBUG_OUTLINE_DECOMPOSITION 
-       rect bound; sh->compute_bound(&bound, VM::get().getSWFVersion());
+       SWFRect bound; sh->compute_bound(&bound, VM::get().getSWFVersion());
        log_debug("Decomposed glyph for DisplayObject '%c' has bounds %s",
                        code, bound.toString());
 #endif

=== modified file 'libcore/FreetypeGlyphsProvider.h'
--- a/libcore/FreetypeGlyphsProvider.h  2009-04-07 18:14:07 +0000
+++ b/libcore/FreetypeGlyphsProvider.h  2009-10-01 13:19:43 +0000
@@ -19,7 +19,7 @@
 #ifndef GNASH_FREETYPE_H
 #define GNASH_FREETYPE_H
 
-#include "rect.h"
+#include "SWFRect.h"
 #include "smart_ptr.h" // for intrusive_ptr
 
 #include <string>

=== modified file 'libcore/Geometry.h'
--- a/libcore/Geometry.h        2009-10-03 21:16:21 +0000
+++ b/libcore/Geometry.h        2009-10-06 07:45:26 +0000
@@ -29,7 +29,7 @@
 
 // Forward declarations
 namespace gnash {
-    class rect; 
+    class SWFRect; 
 }
 
 namespace gnash { 
@@ -272,7 +272,7 @@
         assert(empty());
     }
 
-    /// Expand given rect to include bounds of this path
+    /// Expand given SWFRect to include bounds of this path
     //
     /// @param r
     ///    The rectangle to expand with our own bounds
@@ -286,7 +286,7 @@
     ///    SWF version to use.
     ///
     void
-    expandBounds(rect& r, unsigned int thickness, int swfVersion) const
+    expandBounds(SWFRect& r, unsigned int thickness, int swfVersion) const
     {
         const Path&    p = *this;
         size_t nedges = m_edges.size();

=== modified file 'libcore/InteractiveObject.h'
--- a/libcore/InteractiveObject.h       2009-07-10 15:44:55 +0000
+++ b/libcore/InteractiveObject.h       2009-10-01 13:19:43 +0000
@@ -79,7 +79,7 @@
     /// Container DisplayObjects (sprite and buttons) return the composite
     /// bounds of all their children, appropriately transformed with
     /// their local SWFMatrix.
-    virtual rect getBounds() const = 0;
+    virtual SWFRect getBounds() const = 0;
 
     /// \brief
     /// Return the topmost entity covering the given point

=== modified file 'libcore/Makefile.am'
--- a/libcore/Makefile.am       2009-09-29 08:44:54 +0000
+++ b/libcore/Makefile.am       2009-10-01 13:19:43 +0000
@@ -87,7 +87,7 @@
        SWFMovie.cpp \
        movie_root.cpp \
        namedStrings.cpp \
-       rect.cpp \
+       SWFRect.cpp \
        MovieClip.cpp \
        swf/SWF.cpp \
        swf/TagLoadersTable.cpp \
@@ -234,7 +234,7 @@
        MouseButtonState.h \
        drag_state.h \
        InteractiveObject.h \
-       rect.h \
+       SWFRect.h \
        GnashKey.h \
        Movie.h \
        RunResources.h \

=== modified file 'libcore/MorphShape.cpp'
--- a/libcore/MorphShape.cpp    2009-07-11 11:25:42 +0000
+++ b/libcore/MorphShape.cpp    2009-10-01 13:19:43 +0000
@@ -74,11 +74,11 @@
     return get_ratio() / 65535.0;
 }
 
-rect
+SWFRect
 MorphShape::getBounds() const
 {
     // TODO: optimize this more.
-    rect bounds = _shape.getBounds();
+    SWFRect bounds = _shape.getBounds();
     bounds.expand_to_rect(_def->shape2().getBounds());
     return bounds;
 }

=== modified file 'libcore/MorphShape.h'
--- a/libcore/MorphShape.h      2009-07-10 15:44:55 +0000
+++ b/libcore/MorphShape.h      2009-10-01 13:19:43 +0000
@@ -55,7 +55,7 @@
 
        virtual void display(Renderer& renderer);
 
-    virtual rect getBounds() const;
+    virtual SWFRect getBounds() const;
     
     virtual bool pointInShape(boost::int32_t  x, boost::int32_t  y) const;
  

=== modified file 'libcore/MovieClip.cpp'
--- a/libcore/MovieClip.cpp     2009-09-30 15:20:47 +0000
+++ b/libcore/MovieClip.cpp     2009-10-01 13:19:43 +0000
@@ -362,18 +362,18 @@
 class BoundsFinder
 {
 public:
-    BoundsFinder(rect& b) : _bounds(b) {}
+    BoundsFinder(SWFRect& b) : _bounds(b) {}
 
     void operator() (DisplayObject* ch) {
         // don't include bounds of unloaded DisplayObjects
         if ( ch->unloaded() ) return;
-        rect chb = ch->getBounds();
+        SWFRect chb = ch->getBounds();
         SWFMatrix m = ch->getMatrix();
         _bounds.expand_to_transformed_rect(m, chb);
     }
 
 private:
-    rect& _bounds;
+    SWFRect& _bounds;
 };
 
 /// A DisplayList visitor used to extract script DisplayObjects
@@ -708,7 +708,7 @@
 {
     
     // Set textfield bounds
-    rect bounds(0, 0, pixelsToTwips(width), pixelsToTwips(height));
+    SWFRect bounds(0, 0, pixelsToTwips(width), pixelsToTwips(height));
 
     // Create an instance
     boost::intrusive_ptr<DisplayObject> txt_char = new TextField(this, bounds);
@@ -1392,7 +1392,7 @@
 
 std::auto_ptr<GnashImage>
 MovieClip::drawToBitmap(const SWFMatrix& /* mat */, const cxform& /* cx */,
-            DisplayObject::BlendMode /* bm */, const rect& /* clipRect */,
+            DisplayObject::BlendMode /* bm */, const SWFRect& /* clipRect */,
             bool /* smooth */)
 {
     return std::auto_ptr<GnashImage>();
@@ -1968,7 +1968,7 @@
     _displayList.add_invalidated_bounds(ranges, force||m_invalidated);
 
     /// Add drawable.
-    rect bounds;
+    SWFRect bounds;
     bounds.expand_to_transformed_rect(getWorldMatrix(), _drawable.getBounds());
     ranges.add(bounds.getRange());
 
@@ -2430,13 +2430,13 @@
 
 }
 
-rect
+SWFRect
 MovieClip::getBounds() const
 {
-    rect bounds;
+    SWFRect bounds;
     BoundsFinder f(bounds);
     const_cast<DisplayList&>(_displayList).visitAll(f);
-    rect drawableBounds = _drawable.getBounds();
+    SWFRect drawableBounds = _drawable.getBounds();
     bounds.expand_to_rect(drawableBounds);
     
     return bounds;

=== modified file 'libcore/MovieClip.h'
--- a/libcore/MovieClip.h       2009-09-29 11:09:52 +0000
+++ b/libcore/MovieClip.h       2009-10-01 13:19:43 +0000
@@ -137,7 +137,7 @@
     virtual MovieClip* getAsRoot();
 
     /// Get the composite bounds of all component drawing elements
-    virtual rect getBounds() const;
+    virtual SWFRect getBounds() const;
 
     // See dox in DisplayObject.h
     virtual bool pointInShape(boost::int32_t x, boost::int32_t y) const;
@@ -187,9 +187,9 @@
         return isDynamic() ? 0 : _def->get_bytes_loaded();
     }
 
-    const rect& get_frame_size() const
+    const SWFRect& get_frame_size() const
     {
-        static const rect r;
+        static const SWFRect r;
         return _def ? _def->get_frame_size() : r;
     }
 
@@ -657,7 +657,7 @@
             const SWFMatrix& mat = SWFMatrix(), 
             const cxform& cx = cxform(),
             DisplayObject::BlendMode bm = DisplayObject::BLENDMODE_NORMAL,
-            const rect& clipRect = rect(),
+            const SWFRect& clipRect = SWFRect(),
             bool smooth = false);
 
     /// @name Drawing API

=== modified file 'libcore/SWFMatrix.cpp'
--- a/libcore/SWFMatrix.cpp     2009-10-03 21:16:21 +0000
+++ b/libcore/SWFMatrix.cpp     2009-10-06 07:45:26 +0000
@@ -276,7 +276,7 @@
 }
 
 void 
-SWFMatrix::transform(rect& r) const
+SWFMatrix::transform(SWFRect& r) const
 {
     if ( r.is_null() ) return;
 

=== modified file 'libcore/SWFMatrix.h'
--- a/libcore/SWFMatrix.h       2009-04-08 11:48:21 +0000
+++ b/libcore/SWFMatrix.h       2009-10-01 13:19:43 +0000
@@ -26,7 +26,7 @@
 
 #include "dsodefs.h" // for DSOEXPORT
 #include "Range2d.h" // for transforming Range2d<float>
-#include "rect.h"    // for rect 
+#include "SWFRect.h"    // for SWFRect 
 #include "Point2d.h" // for Point2d
 
 #include <iostream> 
@@ -161,7 +161,7 @@
     ///
     void    transform(geometry::Range2d<float>& r) const;
 
-    void    transform(rect& r) const;
+    void    transform(SWFRect& r) const;
     
     /// Invert this SWFMatrix and return the result.
     SWFMatrix& invert();

=== renamed file 'libcore/rect.cpp' => 'libcore/SWFRect.cpp'
--- a/libcore/rect.cpp  2009-10-01 09:16:13 +0000
+++ b/libcore/SWFRect.cpp       2009-10-01 13:19:43 +0000
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-#include "rect.h"
+#include "SWFRect.h"
 #include "log.h"
 #include "SWFStream.h"
 #include "SWFMatrix.h"
@@ -25,10 +25,10 @@
 
 namespace gnash {
 
-const boost::int32_t rect::rectNull;
-const boost::int32_t rect::rectMax;
+const boost::int32_t SWFRect::rectNull;
+const boost::int32_t SWFRect::rectMax;
 
-void rect::read(SWFStream& in)
+void SWFRect::read(SWFStream& in)
 {
     in.align();
     in.ensureBits(5);
@@ -40,7 +40,7 @@
     _yMin = in.read_sint(nbits);
     _yMax = in.read_sint(nbits);
 
-    // Check if this rect is valid.
+    // Check if this SWFRect is valid.
     if (_xMax < _xMin || _yMax < _yMin)
     {
         // We set invalid rectangles to NULL, but we might instead
@@ -56,7 +56,7 @@
 
 // Set ourself to bound a rectangle that has been transformed by m.  
 void
-rect::enclose_transformed_rect(const SWFMatrix& m, const rect& r)
+SWFRect::enclose_transformed_rect(const SWFMatrix& m, const SWFRect& r)
 {   
     boost::int32_t  x1 = r.get_x_min();
     boost::int32_t  y1 = r.get_y_min();
@@ -80,8 +80,8 @@
 }
 
 void
-rect::expand_to_rect(const rect& r) 
-// Expand ourself to enclose the given rect.
+SWFRect::expand_to_rect(const SWFRect& r) 
+// Expand ourself to enclose the given SWFRect.
 {    
     if( r.is_null() ) {
         return;
@@ -98,8 +98,8 @@
 }   
 
 void
-rect::expand_to_transformed_rect(const SWFMatrix& m, const rect& r)
-// Expand ourself to a transformed rect.
+SWFRect::expand_to_transformed_rect(const SWFMatrix& m, const SWFRect& r)
+// Expand ourself to a transformed SWFRect.
 {   
     if ( r.is_null() )
     {
@@ -131,7 +131,7 @@
     expand_to(p3.x, p3.y);
 }
 
-void    rect::set_lerp(const rect& a, const rect& b, float t)
+void    SWFRect::set_lerp(const SWFRect& a, const SWFRect& b, float t)
 // Set this to the lerp of a and b.
 {
     assert( !a.is_null() );
@@ -144,7 +144,7 @@
 }
 
 void
-rect::clamp(point& p) const
+SWFRect::clamp(point& p) const
 {
     assert( !is_null() );
     p.x = gnash::clamp<boost::int32_t>(p.x, _xMin, _xMax);
@@ -152,7 +152,7 @@
 }
 
 std::string
-rect::toString() const
+SWFRect::toString() const
 {
     std::stringstream ss;
     ss << *this;

=== renamed file 'libcore/rect.h' => 'libcore/SWFRect.h'
--- a/libcore/rect.h    2009-10-01 09:16:13 +0000
+++ b/libcore/SWFRect.h 2009-10-01 13:19:43 +0000
@@ -38,7 +38,7 @@
 /// \brief
 /// Rectangle class, see swf defined rectangle record.
 ///
-class rect
+class SWFRect
 {
 
 public:
@@ -65,10 +65,10 @@
     static const boost::int32_t rectMax = 0x7fffffff;
     
     /// Ouput operator
-    friend std::ostream& operator<< (std::ostream& os, const rect& rect);
+    friend std::ostream& operator<< (std::ostream& os, const SWFRect& SWFRect);
 
     /// Construct a NULL rectangle
-    rect()
+    SWFRect()
         :
        _xMin(rectNull),
        _yMin(rectNull),
@@ -77,7 +77,7 @@
     {}
 
     /// Construct a rectangle with given coordinates
-    rect(int xmin, int ymin, int xmax, int ymax)
+    SWFRect(int xmin, int ymin, int xmax, int ymax)
         :
         _xMin(xmin),
         _yMin(ymin),
@@ -154,7 +154,7 @@
         return _yMax;
     }
     
-    /// Return true if the given point is inside this rect.
+    /// Return true if the given point is inside this SWFRect.
     bool point_test(boost::int32_t x, boost::int32_t y) const
     {
         if (is_null()) return false;
@@ -195,7 +195,7 @@
     /// Set ourself to bound a rectangle that has been transformed by m.  
     /// This is an axial bound of an oriented (and/or
     /// sheared, scaled, etc) box.
-    void enclose_transformed_rect(const SWFMatrix& m, const rect& r);
+    void enclose_transformed_rect(const SWFMatrix& m, const SWFRect& r);
     
     /// Expand this rectangle to enclose the given circle.
     void expand_to_circle(boost::int32_t x, boost::int32_t y, boost::int32_t 
radius)
@@ -216,14 +216,14 @@
         }
     }
       
-    /// Same as enclose_transformed_rect but expanding the current rect instead
+    /// Same as enclose_transformed_rect but expanding the current SWFRect 
instead
     /// of replacing it.
-    DSOEXPORT void expand_to_transformed_rect(const SWFMatrix& m, const rect& 
r);
-    
-    /// Makes union of the given and the current rect
-    DSOEXPORT void expand_to_rect(const rect& r);
-    
-    void set_lerp(const rect& a, const rect& b, float t);
+    DSOEXPORT void expand_to_transformed_rect(const SWFMatrix& m, const 
SWFRect& r);
+    
+    /// Makes union of the given and the current SWFRect
+    DSOEXPORT void expand_to_rect(const SWFRect& r);
+    
+    void set_lerp(const SWFRect& a, const SWFRect& b, float t);
 
     /// \brief
     /// Make sure that the given point falls in this rectangle, 
@@ -236,7 +236,7 @@
     {
         if (is_null())
         {
-           // Range2d has a differnt idea about what is a null rect.
+           // Range2d has a differnt idea about what is a null SWFRect.
            return geometry::Range2d<float>(geometry::nullRange); //null range
         }
         else if( is_world() ) 
@@ -273,7 +273,7 @@
 
 
 inline std::ostream&
-operator<< (std::ostream& os, const rect& r)
+operator<< (std::ostream& os, const SWFRect& r)
 {
     if( !r.is_null() ) {
         os << "RECT(" 

=== modified file 'libcore/Shape.h'
--- a/libcore/Shape.h   2009-07-10 15:44:55 +0000
+++ b/libcore/Shape.h   2009-10-01 13:19:43 +0000
@@ -57,7 +57,7 @@
 
        virtual void display(Renderer& renderer);
 
-    virtual rect getBounds() const {
+    virtual SWFRect getBounds() const {
         return _def ? _def->bounds() : _shape->getBounds();
     }
     

=== modified file 'libcore/StaticText.h'
--- a/libcore/StaticText.h      2009-07-10 15:44:55 +0000
+++ b/libcore/StaticText.h      2009-10-01 13:19:43 +0000
@@ -86,7 +86,7 @@
 
     void setSelectionColor(boost::uint32_t color);
 
-    virtual rect getBounds() const {
+    virtual SWFRect getBounds() const {
         return _def->bounds();
     }
 

=== modified file 'libcore/TextField.cpp'
--- a/libcore/TextField.cpp     2009-10-03 21:16:21 +0000
+++ b/libcore/TextField.cpp     2009-10-06 07:45:26 +0000
@@ -196,7 +196,7 @@
 
 }
 
-TextField::TextField(DisplayObject* parent, const rect& bounds)
+TextField::TextField(DisplayObject* parent, const SWFRect& bounds)
     :
     // the id trick is to fool assertions in DisplayObject ctor
     InteractiveObject(parent, parent ? 0 : -1),
@@ -451,7 +451,7 @@
 
     const SWFMatrix& wm = getWorldMatrix();
 
-    rect bounds = getBounds();
+    SWFRect bounds = getBounds();
     bounds.expand_to_rect(m_text_bounding_box); 
     wm.transform(bounds);
     ranges.add(bounds.getRange());            
@@ -2763,7 +2763,7 @@
 void
 TextField::setWidth(double newwidth)
 {
-       const rect& bounds = getBounds();
+       const SWFRect& bounds = getBounds();
     _bounds.set_to_rect(bounds.get_x_min(),
             bounds.get_y_min(),
             bounds.get_x_min() + newwidth,
@@ -2773,7 +2773,7 @@
 void
 TextField::setHeight(double newheight)
 {
-       const rect& bounds = getBounds();
+       const SWFRect& bounds = getBounds();
     _bounds.set_to_rect(bounds.get_x_min(),
             bounds.get_y_min(),
             bounds.get_x_max(),
@@ -3618,7 +3618,7 @@
         obj = new as_object(proto);
     }
     else {
-        rect nullRect;
+        SWFRect nullRect;
         obj = new TextField(0, nullRect);
     }
 

=== modified file 'libcore/TextField.h'
--- a/libcore/TextField.h       2009-09-30 15:20:47 +0000
+++ b/libcore/TextField.h       2009-10-01 13:19:43 +0000
@@ -21,7 +21,7 @@
 #include "InteractiveObject.h" // for inheritance
 #include "styles.h" // for line_style
 #include "Range2d.h"
-#include "rect.h" // for inlines
+#include "SWFRect.h" // for inlines
 #include "Font.h" // for visibility of font add_ref/drop_ref
 
 #include <vector>
@@ -114,8 +114,8 @@
     //
     /// Notably, the default textHeight is 12pt (240 twips).
        /// @param parent A pointer to the DisplayObject parent of this 
TextField
-       /// @param bounds A rect specifying the bounds of this TextField
-    TextField(DisplayObject* parent, const rect& bounds);
+       /// @param bounds A SWFRect specifying the bounds of this TextField
+    TextField(DisplayObject* parent, const SWFRect& bounds);
 
        ~TextField();
 
@@ -204,8 +204,8 @@
 
        void add_invalidated_bounds(InvalidatedRanges& ranges, bool force);
 
-       /// \brief Get bounding rect of this TextField
-       virtual rect getBounds() const
+       /// \brief Get bounding SWFRect of this TextField
+       virtual SWFRect getBounds() const
        {
                return _bounds;
        }
@@ -597,7 +597,7 @@
 
        void setTextFormat(TextFormat_as& tf);
 
-       const rect& getTextBoundingBox() const
+       const SWFRect& getTextBoundingBox() const
        {
                return m_text_bounding_box;
        }
@@ -754,7 +754,7 @@
        bool _restrictDefined;
 
        /// bounds of dynamic text, as laid out
-       rect m_text_bounding_box;
+       SWFRect m_text_bounding_box;
 
        typedef std::vector<SWF::TextRecord> TextRecords;
        TextRecords _textRecords;
@@ -858,7 +858,7 @@
        /// extended to fit text or hide text overflowing it.
        /// See the setAutoSize() method to change that.
        ///
-       rect _bounds;
+       SWFRect _bounds;
 
     /// Represents the selected part of the text. The second element must
     /// never be less than the first.

=== modified file 'libcore/Video.cpp'
--- a/libcore/Video.cpp 2009-09-30 15:20:47 +0000
+++ b/libcore/Video.cpp 2009-10-01 13:19:43 +0000
@@ -24,7 +24,6 @@
 #include "fn_call.h"
 #include "as_value.h"
 #include "flash/net/NetStream_as.h"
-#include "Range2d.h"
 #include "builtin_function.h" // for getter/setter properties
 #include "NativeFunction.h" 
 #include "movie_root.h"
@@ -147,7 +146,7 @@
        assert(m_def);
 
        SWFMatrix m = getWorldMatrix();
-       const rect& bounds = m_def->bounds();
+       const SWFRect& bounds = m_def->bounds();
 
        GnashImage* img = getVideoFrame();
        if (img)
@@ -288,7 +287,7 @@
        // case I think add_invalidated_bouns would never be invoked on us...
        assert ( m_def );
 
-       rect bounds;    
+       SWFRect bounds; 
        bounds.expand_to_transformed_rect(getWorldMatrix(), m_def->bounds());
        
        ranges.add(bounds.getRange());            
@@ -323,14 +322,14 @@
     vm.registerNative(video_clear, 667, 2);
 }
 
-rect
+SWFRect
 Video::getBounds() const
 {
        if (_embeddedStream) return m_def->bounds();
 
        // TODO: return the bounds of the dynamically
        //       loaded video if not embedded ?
-       return rect();
+       return SWFRect();
 }
 
 #ifdef GNASH_USE_GC

=== modified file 'libcore/Video.h'
--- a/libcore/Video.h   2009-08-26 12:15:53 +0000
+++ b/libcore/Video.h   2009-10-01 13:19:43 +0000
@@ -59,7 +59,7 @@
                return pointInBounds(x, y);
        }
 
-       virtual rect getBounds() const;
+       virtual SWFRect getBounds() const;
 
        /// We use the call to ::advance to properly set invalidated status
        virtual void advance();

=== modified file 'libcore/asobj/flash/display/MovieClip_as.cpp'
--- a/libcore/asobj/flash/display/MovieClip_as.cpp      2009-10-01 08:50:41 
+0000
+++ b/libcore/asobj/flash/display/MovieClip_as.cpp      2009-10-01 13:19:43 
+0000
@@ -107,7 +107,6 @@
     as_value movieclip_totalFrames(const fn_call& fn);
     as_value movieclip_framesLoaded(const fn_call& fn);
     as_value movieclip_dropTarget(const fn_call& fn);
-    as_value movieclip_focusRect(const fn_call& fn);
 
     // =============================================
     // AS3 methods
@@ -254,9 +253,6 @@
     gettersetter = movieclip_dropTarget;
     o.init_property(NSV::PROP_uDROPTARGET, gettersetter, gettersetter);
 
-    gettersetter = movieclip_focusRect;
-    o.init_property(NSV::PROP_uFOCUSRECT, gettersetter, gettersetter);
-
 }
 
 as_object*
@@ -1130,11 +1126,11 @@
                 return as_value();
             }
 
-            rect thisbounds = movieclip->getBounds();
+            SWFRect thisbounds = movieclip->getBounds();
             SWFMatrix thismat = movieclip->getWorldMatrix();
             thismat.transform(thisbounds);
 
-            rect tgtbounds = target->getBounds();
+            SWFRect tgtbounds = target->getBounds();
             SWFMatrix tgtmat = target->getWorldMatrix();
             tgtmat.transform(tgtbounds);
 
@@ -1401,7 +1397,7 @@
     boost::intrusive_ptr<DisplayObject> movieclip =
         ensureType<DisplayObject>(fn.this_ptr);
 
-    rect bounds = movieclip->getBounds();
+    SWFRect bounds = movieclip->getBounds();
 
     if ( fn.nargs > 0 )
     {
@@ -2376,7 +2372,7 @@
                 }
             );
 
-            rect bounds(pixelsToTwips(x0), pixelsToTwips(y0),
+            SWFRect bounds(pixelsToTwips(x0), pixelsToTwips(y0),
                     pixelsToTwips(x1), pixelsToTwips(y1));
             st.setBounds(bounds);
         }
@@ -2517,27 +2513,6 @@
     return ptr->getDropTarget();
 }
 
-// TODO: move this to DisplayObject class, _focusrect seems a generic property
-as_value
-movieclip_focusRect(const fn_call& fn)
-{
-    boost::intrusive_ptr<MovieClip> ptr = ensureType<MovieClip>(fn.this_ptr);
-    UNUSED(ptr);
-
-    if ( fn.nargs == 0 ) // getter
-    {
-        // Is a yellow rectangle visible around a focused movie clip (?)
-        // We don't support focuserct settings
-        return as_value(false);
-    }
-    else // setter
-    {
-        LOG_ONCE( log_unimpl("MovieClip._focusrect setting") );
-    }
-    return as_value();
-}
-
-
 as_value
 movieclip_transform(const fn_call& fn)
 {

=== modified file 'libcore/drag_state.h'
--- a/libcore/drag_state.h      2009-04-03 09:48:13 +0000
+++ b/libcore/drag_state.h      2009-10-01 13:19:43 +0000
@@ -20,7 +20,7 @@
 #ifndef GNASH_DRAG_STATE_H
 #define GNASH_DRAG_STATE_H
 
-#include "rect.h" // for composition
+#include "SWFRect.h" // for composition
 #include "smart_ptr.h" // we keep DisplayObject being dragged by intrusive_ptr
 
 namespace gnash
@@ -36,10 +36,9 @@
 
        bool _hasbounds;
 
-       /// Boundaries to constraint the drag into.
+       /// Boundaries to constrain the drag into.
        /// Coordinates in TWIPS.
-       /// TODO: use Range2d<float> directly ?
-       rect _bounds;
+       SWFRect _bounds;
 
        boost::intrusive_ptr<DisplayObject> _displayObject;
 
@@ -86,9 +85,9 @@
        ///
        /// Note that if hasBounds() is false
        /// the returned rectangle is the NULL
-       /// rectangle - see rect::is_null().
+       /// rectangle - see SWFRect::is_null().
        ///
-       const rect& getBounds() const { return _bounds; }
+       const SWFRect& getBounds() const { return _bounds; }
 
        /// \brief
        /// Set the boundaries to constraint
@@ -97,7 +96,7 @@
        /// Coordinates of the rectangle are
        /// expected in TWIPS.
        ///
-       void setBounds(const rect& bounds) {
+       void setBounds(const SWFRect& bounds) {
                _bounds = bounds;
                _hasbounds = true;
        }

=== modified file 'libcore/movie_root.cpp'
--- a/libcore/movie_root.cpp    2009-09-14 10:24:53 +0000
+++ b/libcore/movie_root.cpp    2009-10-01 13:19:43 +0000
@@ -958,10 +958,10 @@
 
        if ( m_drag_state.hasBounds() )
        {
-               rect bounds;
+               SWFRect bounds;
                // bounds are in local coordinate space
                bounds.enclose_transformed_rect(parent_world_mat, 
m_drag_state.getBounds());
-               // Clamp mouse coords within a defined rect.
+               // Clamp mouse coords within a defined SWFRect.
                bounds.clamp(world_mouse);
        }
 
@@ -1104,7 +1104,7 @@
        clearInvalidated();
 
        // TODO: should we consider the union of all levels bounds ?
-       const rect& frame_size = _rootMovie->get_frame_size();
+       const SWFRect& frame_size = _rootMovie->get_frame_size();
        if ( frame_size.is_null() )
        {
                // TODO: check what we should do if other levels
@@ -1133,7 +1133,7 @@
                if (movie->visible() == false) continue;
 
                // null frame size ? don't display !
-               const rect& sub_frame_size = movie->get_frame_size();
+               const SWFRect& sub_frame_size = movie->get_frame_size();
 
                if ( sub_frame_size.is_null() )
                {

=== modified file 'libcore/movie_root.h'
--- a/libcore/movie_root.h      2009-09-24 16:32:22 +0000
+++ b/libcore/movie_root.h      2009-10-01 13:19:43 +0000
@@ -1019,7 +1019,6 @@
     /// Process all actions in the queue
     void processActionQueue();
 
-    // TODO: use Range2d<int> ?
     int m_viewport_x0, m_viewport_y0;
 
     /// Width and height of viewport, in pixels

=== modified file 'libcore/parser/BitmapMovieDefinition.h'
--- a/libcore/parser/BitmapMovieDefinition.h    2009-07-13 07:07:26 +0000
+++ b/libcore/parser/BitmapMovieDefinition.h    2009-10-01 13:19:43 +0000
@@ -20,7 +20,7 @@
 
 #include "smart_ptr.h" // GNASH_USE_GC
 #include "movie_definition.h" // for inheritance
-#include "rect.h" // for composition
+#include "SWFRect.h" // for composition
 #include "BitmapInfo.h" // for destructor visibility by intrusive_ptr
 #include "DynamicShape.h" // for destructor visibility by intrusive_ptr
 #include "GnashImage.h"
@@ -82,7 +82,7 @@
                return _framerate;
        }
 
-       virtual const rect& get_frame_size() const {
+       virtual const SWFRect& get_frame_size() const {
                return _framesize;
        }
 
@@ -138,7 +138,7 @@
 private:
 
        int _version;
-       rect _framesize;
+       SWFRect _framesize;
        size_t _framecount;
        float _framerate;
        std::string _url;

=== modified file 'libcore/parser/SWFMovieDefinition.cpp'
--- a/libcore/parser/SWFMovieDefinition.cpp     2009-07-13 09:04:26 +0000
+++ b/libcore/parser/SWFMovieDefinition.cpp     2009-10-01 13:19:43 +0000
@@ -330,7 +330,7 @@
        _str.reset(new SWFStream(_in.get()));
 
        m_frame_size.read(*_str);
-       // If the rect is malformed, rect::read would already 
+       // If the SWFRect is malformed, SWFRect::read would already 
        // print an error. We check again here just to give 
        // the error are better context.
        if ( m_frame_size.is_null() )

=== modified file 'libcore/parser/SWFMovieDefinition.h'
--- a/libcore/parser/SWFMovieDefinition.h       2009-07-13 09:04:26 +0000
+++ b/libcore/parser/SWFMovieDefinition.h       2009-10-01 13:19:43 +0000
@@ -32,7 +32,7 @@
 #include "movie_definition.h" // for inheritance
 #include "DefinitionTag.h" // for boost::intrusive_ptr visibility of dtor
 #include "StringPredicates.h" 
-#include "rect.h"
+#include "SWFRect.h"
 #include "GnashNumeric.h"
 
 #include <map> // for CharacterDictionary
@@ -188,7 +188,7 @@
        // ...
        size_t get_frame_count() const { return m_frame_count; }
        float   get_frame_rate() const { return m_frame_rate; }
-       const rect& get_frame_size() const { return m_frame_size; }
+       const SWFRect& get_frame_size() const { return m_frame_size; }
 
        float get_width_pixels() const
        {
@@ -458,7 +458,7 @@
        typedef std::vector<boost::intrusive_ptr<movie_definition> > ImportVect;
        ImportVect m_import_source_movies;
 
-       rect    m_frame_size;
+       SWFRect m_frame_size;
        float   m_frame_rate;
        size_t  m_frame_count;
        int     m_version;

=== modified file 'libcore/parser/movie_definition.h'
--- a/libcore/parser/movie_definition.h 2009-06-05 10:25:43 +0000
+++ b/libcore/parser/movie_definition.h 2009-10-01 13:19:43 +0000
@@ -107,7 +107,7 @@
        virtual float   get_frame_rate() const = 0;
 
        /// Return size of frame, in TWIPS 
-       virtual const rect& get_frame_size() const = 0;
+       virtual const SWFRect& get_frame_size() const = 0;
 
        virtual size_t get_bytes_loaded() const = 0;
 

=== modified file 'libcore/parser/sprite_definition.h'
--- a/libcore/parser/sprite_definition.h        2009-07-13 09:04:26 +0000
+++ b/libcore/parser/sprite_definition.h        2009-10-01 13:19:43 +0000
@@ -26,7 +26,7 @@
 #include "smart_ptr.h" // GNASH_USE_GC
 #include "movie_definition.h" // for inheritance
 #include "log.h"
-#include "rect.h"
+#include "SWFRect.h"
 #include "StringPredicates.h" // StringNoCaseLessThan
 
 // Forward declarations
@@ -122,10 +122,10 @@
                return m_movie_def.get_frame_rate();
        }
 
-       const rect& get_frame_size() const
+       const SWFRect& get_frame_size() const
        {
                abort();
-               static const rect unused;
+               static const SWFRect unused;
                return unused;
        }
 

=== modified file 'libcore/swf/DefineEditTextTag.h'
--- a/libcore/swf/DefineEditTextTag.h   2009-07-13 18:32:52 +0000
+++ b/libcore/swf/DefineEditTextTag.h   2009-10-01 13:19:43 +0000
@@ -22,7 +22,7 @@
 #include "gnashconfig.h"
 #endif
 
-#include "rect.h"
+#include "SWFRect.h"
 #include "DefinitionTag.h"
 #include "SWF.h" // for TagType definition
 #include "RGBA.h"
@@ -65,7 +65,7 @@
        static void loader(SWFStream& in, TagType tag, movie_definition& m,
             const RunResources& r);
 
-    const rect& bounds() const { return _rect; }
+    const SWFRect& bounds() const { return _rect; }
 
     DisplayObject* createDisplayObject(DisplayObject* parent, int id) const;
 
@@ -204,7 +204,7 @@
     /// Read a tag from the SWFStream.
     void read(SWFStream& in, movie_definition& m);
 
-       rect _rect;
+       SWFRect _rect;
 
        std::string _variableName;
 

=== modified file 'libcore/swf/DefineFontTag.cpp'
--- a/libcore/swf/DefineFontTag.cpp     2009-10-03 21:16:21 +0000
+++ b/libcore/swf/DefineFontTag.cpp     2009-10-06 07:45:26 +0000
@@ -321,7 +321,7 @@
 
         // Bounds table.
         {
-            rect dummy_rect;
+            SWFRect dummy_rect;
             // TODO: shouldn't we log_unimpl here ??
             for (size_t i = 0; i < nGlyphs; i++) dummy_rect.read(in);
         }

=== modified file 'libcore/swf/DefineMorphShapeTag.cpp'
--- a/libcore/swf/DefineMorphShapeTag.cpp       2009-07-13 08:06:09 +0000
+++ b/libcore/swf/DefineMorphShapeTag.cpp       2009-10-01 13:19:43 +0000
@@ -76,13 +76,13 @@
         || tag == DEFINEMORPHSHAPE2
         || tag == DEFINEMORPHSHAPE2_);
 
-    rect bounds1, bounds2;
+    SWFRect bounds1, bounds2;
     bounds1.read(in);
     bounds2.read(in);
 
     if (tag == DEFINEMORPHSHAPE2 || tag == DEFINEMORPHSHAPE2_) {
         // TODO: Use these values.
-        rect innerBound1, innerBound2;
+        SWFRect innerBound1, innerBound2;
         innerBound1.read(in);
         innerBound2.read(in);
 

=== modified file 'libcore/swf/DefineMorphShapeTag.h'
--- a/libcore/swf/DefineMorphShapeTag.h 2009-07-13 08:06:09 +0000
+++ b/libcore/swf/DefineMorphShapeTag.h 2009-10-01 13:19:43 +0000
@@ -91,7 +91,7 @@
     ShapeRecord _shape1;
     ShapeRecord _shape2;
     
-    rect _bounds;
+    SWFRect _bounds;
 
 };
 

=== modified file 'libcore/swf/DefineScalingGridTag.cpp'
--- a/libcore/swf/DefineScalingGridTag.cpp      2009-08-10 06:55:00 +0000
+++ b/libcore/swf/DefineScalingGridTag.cpp      2009-10-01 13:19:43 +0000
@@ -38,7 +38,7 @@
             log_parse("DefineScalingGridTag: id = %d", id);
     );
 
-    rect inner;
+    SWFRect inner;
     inner.read(in);
 
     log_unimpl("DefineScalingGridTag");

=== modified file 'libcore/swf/DefineShapeTag.h'
--- a/libcore/swf/DefineShapeTag.h      2009-07-13 08:06:09 +0000
+++ b/libcore/swf/DefineShapeTag.h      2009-10-01 13:19:43 +0000
@@ -46,7 +46,7 @@
         const;
        
     /// Get cached bounds of this shape.
-    const rect& bounds() const { return _shape.getBounds(); }
+    const SWFRect& bounds() const { return _shape.getBounds(); }
 
     virtual bool pointTestLocal(boost::int32_t x, boost::int32_t y, 
             const SWFMatrix& wm) const;

=== modified file 'libcore/swf/DefineTextTag.h'
--- a/libcore/swf/DefineTextTag.h       2009-07-13 08:06:09 +0000
+++ b/libcore/swf/DefineTextTag.h       2009-10-01 13:19:43 +0000
@@ -20,7 +20,7 @@
 
 #include "DefinitionTag.h" // for inheritance
 #include "styles.h" 
-#include "rect.h" // for composition
+#include "SWFRect.h" // for composition
 #include "SWF.h"
 #include "movie_definition.h"
 #include "SWFMatrix.h"
@@ -52,7 +52,7 @@
        /// Draw the string.
        void display(Renderer& renderer, const StaticText& inst) const;
        
-       const rect& bounds() const {
+       const SWFRect& bounds() const {
         // TODO: There is a _matrix field in the definition(!) that's
         // currently ignored. Don't know if it needs to be transformed... 
         return _rect; 
@@ -83,7 +83,7 @@
         read(in, m, tag);
     }
 
-       rect _rect;
+       SWFRect _rect;
 
     SWFMatrix _matrix;
 

=== modified file 'libcore/swf/DefineVideoStreamTag.h'
--- a/libcore/swf/DefineVideoStreamTag.h        2009-07-13 08:06:09 +0000
+++ b/libcore/swf/DefineVideoStreamTag.h        2009-10-01 13:19:43 +0000
@@ -26,7 +26,7 @@
 
 #include "DefinitionTag.h"
 #include "SWF.h"
-#include "rect.h" // for composition
+#include "SWFRect.h" // for composition
 #include "MediaParser.h" // for videoFrameType and videoCodecType enums
 
 #include <boost/shared_array.hpp>
@@ -107,7 +107,7 @@
             movie_definition& m);
 
        /// Return local video bounds in twips
-       const rect&     bounds() const
+       const SWFRect&  bounds() const
        {
                return m_bound;
        }
@@ -189,7 +189,7 @@
        media::videoCodecType m_codec_id;
 
        /// Bounds of the video, as read from the DEFINEVIDEOSTREAM tag.
-       rect m_bound;
+       SWFRect m_bound;
 
     // Mutable for locking in const member functions.
        mutable boost::mutex _video_mutex;

=== modified file 'libcore/swf/DefinitionTag.h'
--- a/libcore/swf/DefinitionTag.h       2009-04-15 09:08:37 +0000
+++ b/libcore/swf/DefinitionTag.h       2009-10-01 13:19:43 +0000
@@ -29,7 +29,7 @@
 namespace gnash {
        class DisplayObject;
        class SWFMatrix;
-       class rect;
+       class SWFRect;
     namespace SWF {
         class TextRecord;
     }

=== modified file 'libcore/swf/ShapeRecord.cpp'
--- a/libcore/swf/ShapeRecord.cpp       2009-07-13 08:06:09 +0000
+++ b/libcore/swf/ShapeRecord.cpp       2009-10-01 13:19:43 +0000
@@ -35,7 +35,7 @@
         SWF::TagType tag, movie_definition& md, const RunResources& r);
     void readLineStyles(ShapeRecord::LineStyles& styles, SWFStream& in,
         SWF::TagType tag, movie_definition& md, const RunResources& r);
-    void computeBounds(rect& bounds, const ShapeRecord::Paths& paths,
+    void computeBounds(SWFRect& bounds, const ShapeRecord::Paths& paths,
         const ShapeRecord::LineStyles& lineStyles, int swfVersion);
 }
 
@@ -229,13 +229,13 @@
     
         IF_VERBOSE_PARSE(
             std::string b = _bounds.toString();
-            log_parse(_("  bound rect: %s"), b);
+            log_parse(_("  bound SWFRect: %s"), b);
         );
     
         // TODO: Store and use these. Unfinished.
         if (tag == SWF::DEFINESHAPE4 || tag == SWF::DEFINESHAPE4_)
         {
-            rect tbound;
+            SWFRect tbound;
             tbound.read(in);
             in.ensureBytes(1);
             static_cast<void>(in.read_u8());
@@ -614,7 +614,7 @@
 #ifdef GNASH_DEBUG_SHAPE_BOUNDS
     else
     {
-        rect computedBounds;
+        SWFRect computedBounds;
         computeBounds(computedBounds, _paths, _lineStyles, m->get_version());
         if ( computedBounds != m_bounds )
         {
@@ -689,7 +689,7 @@
 
 // Find the bounds of this shape, and store them in the given rectangle.
 void
-computeBounds(rect& bounds, const ShapeRecord::Paths& paths,
+computeBounds(SWFRect& bounds, const ShapeRecord::Paths& paths,
         const ShapeRecord::LineStyles& lineStyles, int swfVersion)
 {
     bounds.set_null();

=== modified file 'libcore/swf/ShapeRecord.h'
--- a/libcore/swf/ShapeRecord.h 2009-07-13 08:06:09 +0000
+++ b/libcore/swf/ShapeRecord.h 2009-10-01 13:19:43 +0000
@@ -21,7 +21,7 @@
 #include "Geometry.h"
 #include "fill_style.h"
 #include "styles.h"
-#include "rect.h"
+#include "SWFRect.h"
 
 #include <vector>
 
@@ -94,7 +94,7 @@
         return _paths;
     }
 
-    const rect& getBounds() const {
+    const SWFRect& getBounds() const {
         return _bounds;
     }
 
@@ -132,7 +132,7 @@
         _lineStyles.push_back(ls);
     }
 
-    void setBounds(const rect& bounds) {
+    void setBounds(const SWFRect& bounds) {
         _bounds = bounds;
     }
 
@@ -151,7 +151,7 @@
     FillStyles _fillStyles;
     LineStyles _lineStyles;
     Paths _paths;
-    rect _bounds;
+    SWFRect _bounds;
 
 };
 

=== modified file 'libcore/swf/VideoFrameTag.h'
--- a/libcore/swf/VideoFrameTag.h       2009-07-13 08:06:09 +0000
+++ b/libcore/swf/VideoFrameTag.h       2009-10-01 13:19:43 +0000
@@ -27,7 +27,7 @@
 #include "DefinitionTag.h"
 #include "movie_definition.h"
 #include "SWF.h"
-#include "rect.h" // for composition
+#include "SWFRect.h" // for composition
 #include "ControlTag.h"
 #include "VideoDecoder.h"
 

=== modified file 'libcore/vm/ASHandlers.cpp'
--- a/libcore/vm/ASHandlers.cpp 2009-10-02 08:18:58 +0000
+++ b/libcore/vm/ASHandlers.cpp 2009-10-06 07:45:26 +0000
@@ -1329,7 +1329,7 @@
             std::swap(x1, x0);
         }
 
-        rect bounds(x0, y0, x1, y1);
+        SWFRect bounds(x0, y0, x1, y1);
         st.setBounds(bounds);
 
         env.drop(4);

=== modified file 'testsuite/DummyCharacter.h'
--- a/testsuite/DummyCharacter.h        2009-07-10 16:03:50 +0000
+++ b/testsuite/DummyCharacter.h        2009-10-01 13:19:43 +0000
@@ -19,7 +19,7 @@
 #define GNASH_DUMMYCHARACTER_H
 
 #include "InteractiveObject.h" // for inheritance
-#include "rect.h" // for composition
+#include "SWFRect.h" // for composition
 #include "Movie.h" // for createMovie
 #include "snappingrange.h" // for InvalidatedRanges typedef (don't like it)
 
@@ -53,7 +53,7 @@
 
     virtual void display(Renderer& /*renderer*/) {}
 
-    virtual rect getBounds() const { return rect(); }
+    virtual SWFRect getBounds() const { return SWFRect(); }
 
     virtual bool mouseEnabled() const { return true; }
 

=== modified file 'testsuite/DummyMovieDefinition.h'
--- a/testsuite/DummyMovieDefinition.h  2009-07-13 08:06:09 +0000
+++ b/testsuite/DummyMovieDefinition.h  2009-10-01 13:19:43 +0000
@@ -19,7 +19,7 @@
 #define GNASH_DUMMYMOVIEDEFINITION_H
 
 #include "SWFMovieDefinition.h" // for inheritance
-#include "rect.h" // for composition
+#include "SWFRect.h" // for composition
 #include "SWFMovie.h" // for createMovie
 
 #include <string>
@@ -42,7 +42,7 @@
 class DummyMovieDefinition : public SWFMovieDefinition
 {
        int _version;
-       rect _framesize;
+       SWFRect _framesize;
        size_t _framecount;
        std::vector<PlayList> _playlist;
        float _framerate;
@@ -118,7 +118,7 @@
                return _framerate;
        }
 
-       virtual const rect& get_frame_size() const {
+       virtual const SWFRect& get_frame_size() const {
                return _framesize;
        }
 

=== modified file 'testsuite/actionscript.all/MovieClip.as'
--- a/testsuite/actionscript.all/MovieClip.as   2009-09-30 15:20:47 +0000
+++ b/testsuite/actionscript.all/MovieClip.as   2009-10-04 08:14:18 +0000
@@ -112,19 +112,19 @@
 endOfTest = function() 
 {
 #if OUTPUT_VERSION <= 5
-       check_totals(335); // SWF5
+       check_totals(346); // SWF5
 #endif
 
 #if OUTPUT_VERSION == 6
-       check_totals(900); // SWF6
+       check_totals(911); // SWF6
 #endif
 
 #if OUTPUT_VERSION == 7
-       check_totals(917); // SWF7
+       check_totals(928); // SWF7
 #endif
 
 #if OUTPUT_VERSION >= 8
-       check_totals(1007); // SWF8+
+       check_totals(1018); // SWF8+
 #endif
 
        play();
@@ -359,6 +359,7 @@
 }
 
 check(mc._focusrect != undefined);
+check_equals(mc._focusrect, true);
 check(mc._framesloaded != undefined);
 check(mc._height != undefined);
 check(mc._highquality != undefined);
@@ -457,7 +458,7 @@
 check(!mc.hasOwnProperty("_target"));
 check(!mc.hasOwnProperty("_url"));
 check(!mc.hasOwnProperty("_soundbuftime"));
-xcheck(!mc.hasOwnProperty("_focusrect"));
+check(!mc.hasOwnProperty("_focusrect"));
 xcheck(!mc.hasOwnProperty("_framesloaded"));
 check(!mc.hasOwnProperty("_lockroot"));
 check(!mc.hasOwnProperty("_highquality"));
@@ -2194,6 +2195,10 @@
 _root.focusEnabled = "hello";
 check_equals(_root.focusEnabled, "hello");
 
+
+// Note: Flash Player 10 seems to handle this differently: setting the
+// blendMode to 2 gets 'multiply' not 'layer'.
+
 #if OUTPUT_VERSION > 7
 check_equals(_root.blendMode, "normal");
 check_equals(typeof(_root.blendMode), "string");
@@ -2352,5 +2357,21 @@
 check_equals(o.meth("post"), 2);
 check_equals(o.meth(), 0);
 
+// Case sensitivity
+
+// Note: we have changed the _x gettersetter for _level0. This means that
+// _x and _X are not the same.
+
+check_equals(_level1._x, _level1._X);
+check_equals(_level1._y, _level1._Y);
+check_equals(_level1._width, _level1._wIDth);
+check_equals(_level1._height, _level1._HEIGHT);
+check_equals(_level1._xmouse, _level1._XmousE);
+check_equals(_level1._ymouse, _level1._yMouse);
+check_equals(_level1._soundbuftime, _level1._soundBufTIME);
+check_equals(_level1._focusrect, _level1._FOCUSRECT);
+check_equals(_level1._quality, _level1._QUALITY);
+check_equals(_level1._highquality, _level1._highQUALITY);
+
 
 //endOfTest();

=== modified file 'testsuite/actionscript.all/TextField.as'
--- a/testsuite/actionscript.all/TextField.as   2009-10-01 08:49:33 +0000
+++ b/testsuite/actionscript.all/TextField.as   2009-10-01 10:02:31 +0000
@@ -197,8 +197,8 @@
 // Check TextField._alpha
 
 check_equals(typeof(tf._alpha), 'number');
-check( ! tf.hasOwnProperty('_alpha') ); // why ??
-check( ! tf.__proto__.hasOwnProperty('_alpha') ); // why ??
+check( ! tf.hasOwnProperty('_alpha') ); 
+check( ! tf.__proto__.hasOwnProperty('_alpha') ); 
 
 // Check TextField.autoSize
 
@@ -579,6 +579,21 @@
 check( ! tf.__proto__.hasOwnProperty('_soundbuftime') ); 
 xcheck_equals(tf._soundbuftime, 5); // the default is 5, it seems
 
+// These seem to be only MovieClip properties.
+
+check_equals(typeof(tf._currentframe), 'undefined');
+check_equals(typeof(tf._totalframes), 'undefined');
+check_equals(typeof(tf._framesloaded), 'undefined');
+
+// Check TextField._focusrect
+check(tf._focusrect !== 'null');
+check(tf._focusRect !== 'null');
+xcheck_equals(typeof(tf._focusrect), 'null');
+xcheck_equals(typeof(tf._focusRect), 'null');
+check(! tf.hasOwnProperty('_focusrect') ); 
+check(! tf.__proto__.hasOwnProperty('_focusrect') ); 
+
+
 // Check TextField.tabEnabled
 
 check_equals(typeof(tf.tabEnabled), 'undefined');
@@ -809,6 +824,7 @@
 //-------------------------------------------------------------------------
 
 check_equals(typeof(tf._x), 'number');
+check_equals(typeof(tf._X), 'number');
 check( ! tf.hasOwnProperty('_x') );
 check( ! tf.__proto__.hasOwnProperty('_x') );
 check_equals(tf._x, 10); // as set by createTextField
@@ -1101,11 +1117,11 @@
 //------------------------------------------------------------
 
 #if OUTPUT_VERSION == 6
-     check_totals(482);
+     check_totals(492);
 #elif OUTPUT_VERSION == 7
- check_totals(485);
+ check_totals(495);
 #elif OUTPUT_VERSION == 8
- check_totals(486);
+ check_totals(496);
 #endif
 
 #endif

=== modified file 'testsuite/libcore.all/ClassSizes.cpp'
--- a/testsuite/libcore.all/ClassSizes.cpp      2009-04-14 17:49:58 +0000
+++ b/testsuite/libcore.all/ClassSizes.cpp      2009-10-01 13:19:43 +0000
@@ -72,7 +72,7 @@
 (int) (float) (long) (double) \
 (Property*) (auto_ptr<Property>) (scoped_ptr<Property>) \
 (shared_ptr<Property>) (intrusive_ptr<as_object>) (GcResource) \
-(rgba) (SWFMatrix) (rect) (line_style) (fill_style) (cxform) \
+(rgba) (SWFMatrix) (SWFRect) (line_style) (fill_style) (cxform) \
 (as_value) \
 (DynamicShape)(ShapeRecord)(TextRecord) \
 (Property) (PropertyList) \


reply via email to

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