[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

ouch ouch at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:42:26 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 27b19e4e1c44d9f3d0b5b614e7fb3772b0e785a2
Author: ouch <ouch at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu May 27 18:28:36 2004 +0000

    	Added support for fillRect, strokeRect, and setAlpha.
    
            reviewed by richard.
    
            * khtml/ecma/kjs_html.cpp:
            (KJS::Context2DFunction::tryCall):
            * khtml/ecma/kjs_html.h:
            (KJS::Context2D::):
            * khtml/ecma/kjs_html.lut.h:
            (KJS::):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6710 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 4da7f55..38f7dbe 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,14 @@
+2004-05-27  John Louch  <set EMAIL_ADDRESS environment variable>
+
+        Reviewed by NOBODY (OOPS!).
+
+        * khtml/ecma/kjs_html.cpp:
+        (KJS::Context2DFunction::tryCall):
+        * khtml/ecma/kjs_html.h:
+        (KJS::Context2D::):
+        * khtml/ecma/kjs_html.lut.h:
+        (KJS::):
+
 2004-05-27  Trey Matteson  <trey at apple.com>
 
  	First cut at DHTML dragging, destination side.  Dragging text, files
diff --git a/WebCore/khtml/ecma/kjs_html.cpp b/WebCore/khtml/ecma/kjs_html.cpp
index efccecc..dacf3e8 100644
--- a/WebCore/khtml/ecma/kjs_html.cpp
+++ b/WebCore/khtml/ecma/kjs_html.cpp
@@ -3587,6 +3587,39 @@ Value KJS::Context2DFunction::tryCall(ExecState *exec, Object &thisObj, const Li
             renderer->setNeedsImageUpdate();
             break;
         }
+        case Context2D::FillRect: {
+            if (args.size() != 4) {
+                Object err = Error::create(exec,SyntaxError);
+                exec->setException(err);
+                return err;
+            }
+            float x = (float)args[0].toNumber(exec);
+            float y = (float)args[1].toNumber(exec);
+            float w = (float)args[2].toNumber(exec);
+            float h = (float)args[3].toNumber(exec);
+            CGContextFillRect (drawingContext, CGRectMake(x,y,w,h));
+            renderer->setNeedsImageUpdate();
+            break;
+        }
+        case Context2D::StrokeRect: {
+            int size = args.size();
+            if (size < 4) {
+                Object err = Error::create(exec,SyntaxError);
+                exec->setException(err);
+                return err;
+            }
+            float x = (float)args[0].toNumber(exec);
+            float y = (float)args[1].toNumber(exec);
+            float w = (float)args[2].toNumber(exec);
+            float h = (float)args[3].toNumber(exec);
+            
+            if (size > 4)
+                CGContextStrokeRectWithWidth (drawingContext, CGRectMake(x,y,w,h), (float)args[4].toNumber(exec));
+            else
+                CGContextStrokeRect (drawingContext, CGRectMake(x,y,w,h));
+            renderer->setNeedsImageUpdate();
+            break;
+        }
         case Context2D::SetShadow: {
             if (args.size() != 3) {
                 Object err = Error::create(exec,SyntaxError);
@@ -3601,7 +3634,6 @@ Value KJS::Context2DFunction::tryCall(ExecState *exec, Object &thisObj, const Li
             CGContextSetShadow (drawingContext, offset, blur);
             break;
         }
-        
         case Context2D::SetShadowWithColor: {
             if (args.size() < 4) {
                 Object err = Error::create(exec,SyntaxError);
@@ -3672,6 +3704,16 @@ Value KJS::Context2DFunction::tryCall(ExecState *exec, Object &thisObj, const Li
             renderer->setNeedsImageUpdate();
             break;
         }
+        case Context2D::SetAlpha: {
+            if (args.size() != 1) {
+                Object err = Error::create(exec,SyntaxError);
+                exec->setException(err);
+                return err;
+            }
+            float a =  (float)args[0].toNumber(exec);
+            CGContextSetAlpha (drawingContext, a);
+            break;
+        }
     }
 
     return Undefined();
@@ -3680,7 +3722,7 @@ Value KJS::Context2DFunction::tryCall(ExecState *exec, Object &thisObj, const Li
 const ClassInfo KJS::Context2D::info = { "Context2D", 0, &Context2DTable, 0 };
 
 /* Source for Context2DTable. Use "make hashtables" to regenerate.
- at begin Context2DTable 23
+ at begin Context2DTable 28
   save                     Context2D::Save                        DontDelete|Function 0
   restore                  Context2D::Restore                     DontDelete|Function 0
   scale                    Context2D::Scale                       DontDelete|Function 2
@@ -3701,11 +3743,14 @@ const ClassInfo KJS::Context2D::info = { "Context2D", 0, &Context2DTable, 0 };
   addQuadraticCurveToPoint Context2D::AddQuadraticCurveToPoint    DontDelete|Function 4
   addBezierCurveToPoint    Context2D::AddBezierCurveToPoint       DontDelete|Function 6
   clearRect                Context2D::ClearRect                   DontDelete|Function 4
+  fillRect                 Context2D::FillRect                    DontDelete|Function 4
+  strokeRect               Context2D::StrokeRect                  DontDelete|Function 4
   drawImage                Context2D::DrawImage                   DontDelete|Function 6
   drawImageFromRect        Context2D::DrawImageFromRect           DontDelete|Function 10
   setShadow                Context2D::SetShadow                   DontDelete|Function 3
   setShadowWithColor       Context2D::SetShadowWithColor          DontDelete|Function 4
   clearShadow              Context2D::ClearShadow                 DontDelete|Function 0
+  setAlpha                 Context2D::SetAlpha                    DontDelete|Function 1
 @end
 */
 
diff --git a/WebCore/khtml/ecma/kjs_html.h b/WebCore/khtml/ecma/kjs_html.h
index 177421e..f1ed3be 100644
--- a/WebCore/khtml/ecma/kjs_html.h
+++ b/WebCore/khtml/ecma/kjs_html.h
@@ -258,9 +258,10 @@ namespace KJS {
         SetStrokeColor, SetFillColor, SetLineWidth, SetLineCap, SetLineJoin, SetMiterLimit, 
         FillPath, StrokePath, 
         MoveToPoint, AddLineToPoint, AddQuadraticCurveToPoint, AddBezierCurveToPoint,
-        ClearRect,
+        ClearRect, FillRect, StrokeRect,
         DrawImage, DrawImageFromRect,
-        SetShadow, SetShadowWithColor, ClearShadow };
+        SetShadow, SetShadowWithColor, ClearShadow,
+        SetAlpha};
 
     DOM::HTMLElementImpl *_element;
   };
diff --git a/WebCore/khtml/ecma/kjs_html.lut.h b/WebCore/khtml/ecma/kjs_html.lut.h
index 7f63173..c7f00c5 100644
--- a/WebCore/khtml/ecma/kjs_html.lut.h
+++ b/WebCore/khtml/ecma/kjs_html.lut.h
@@ -1038,42 +1038,45 @@ namespace KJS {
 
 const struct HashEntry Context2DTableEntries[] = {
    { 0, 0, 0, 0, 0 },
-   { "addBezierCurveToPoint", Context2D::AddBezierCurveToPoint, DontDelete|Function, 6, 0 },
-   { 0, 0, 0, 0, 0 },
-   { "setStrokeColor", Context2D::SetStrokeColor, DontDelete|Function, 1, &Context2DTableEntries[28] },
    { 0, 0, 0, 0, 0 },
+   { "setFillColor", Context2D::SetFillColor, DontDelete|Function, 1, 0 },
    { 0, 0, 0, 0, 0 },
-   { "moveToPoint", Context2D::MoveToPoint, DontDelete|Function, 2, &Context2DTableEntries[33] },
+   { "setLineWidth", Context2D::SetLineWidth, DontDelete|Function, 1, &Context2DTableEntries[30] },
    { 0, 0, 0, 0, 0 },
-   { "translate", Context2D::Translate, DontDelete|Function, 1, 0 },
+   { "addLineToPoint", Context2D::AddLineToPoint, DontDelete|Function, 2, &Context2DTableEntries[37] },
+   { "closePath", Context2D::ClosePath, DontDelete|Function, 0, &Context2DTableEntries[34] },
+   { "fillPath", Context2D::FillPath, DontDelete|Function, 0, &Context2DTableEntries[31] },
+   { "fillRect", Context2D::FillRect, DontDelete|Function, 4, 0 },
    { 0, 0, 0, 0, 0 },
+   { "save", Context2D::Save, DontDelete|Function, 0, &Context2DTableEntries[29] },
+   { "setMiterLimit", Context2D::SetMiterLimit, DontDelete|Function, 1, &Context2DTableEntries[32] },
+   { "clearShadow", Context2D::ClearShadow, DontDelete|Function, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "rotate", Context2D::Rotate, DontDelete|Function, 2, &Context2DTableEntries[24] },
    { 0, 0, 0, 0, 0 },
-   { "restore", Context2D::Restore, DontDelete|Function, 0, &Context2DTableEntries[31] },
-   { "scale", Context2D::Scale, DontDelete|Function, 2, 0 },
-   { "setFillColor", Context2D::SetFillColor, DontDelete|Function, 1, &Context2DTableEntries[27] },
+   { "restore", Context2D::Restore, DontDelete|Function, 0, &Context2DTableEntries[28] },
    { "drawImage", Context2D::DrawImage, DontDelete|Function, 6, 0 },
-   { "save", Context2D::Save, DontDelete|Function, 0, &Context2DTableEntries[23] },
+   { "beginPath", Context2D::BeginPath, DontDelete|Function, 0, 0 },
+   { "setStrokeColor", Context2D::SetStrokeColor, DontDelete|Function, 1, 0 },
+   { "setLineCap", Context2D::SetLineCap, DontDelete|Function, 1, 0 },
+   { "addQuadraticCurveToPoint", Context2D::AddQuadraticCurveToPoint, DontDelete|Function, 4, &Context2DTableEntries[33] },
+   { "translate", Context2D::Translate, DontDelete|Function, 1, &Context2DTableEntries[35] },
    { 0, 0, 0, 0, 0 },
-   { "addQuadraticCurveToPoint", Context2D::AddQuadraticCurveToPoint, DontDelete|Function, 4, 0 },
-   { "setLineJoin", Context2D::SetLineJoin, DontDelete|Function, 1, &Context2DTableEntries[30] },
    { 0, 0, 0, 0, 0 },
-   { "setMiterLimit", Context2D::SetMiterLimit, DontDelete|Function, 1, 0 },
-   { "beginPath", Context2D::BeginPath, DontDelete|Function, 0, &Context2DTableEntries[25] },
-   { "closePath", Context2D::ClosePath, DontDelete|Function, 0, &Context2DTableEntries[26] },
-   { "setLineWidth", Context2D::SetLineWidth, DontDelete|Function, 1, 0 },
-   { "setLineCap", Context2D::SetLineCap, DontDelete|Function, 1, 0 },
-   { "fillPath", Context2D::FillPath, DontDelete|Function, 0, 0 },
-   { "strokePath", Context2D::StrokePath, DontDelete|Function, 0, &Context2DTableEntries[29] },
-   { "addLineToPoint", Context2D::AddLineToPoint, DontDelete|Function, 2, &Context2DTableEntries[32] },
-   { "clearRect", Context2D::ClearRect, DontDelete|Function, 4, 0 },
+   { "strokePath", Context2D::StrokePath, DontDelete|Function, 0, 0 },
+   { "strokeRect", Context2D::StrokeRect, DontDelete|Function, 4, 0 },
+   { 0, 0, 0, 0, 0 },
+   { "scale", Context2D::Scale, DontDelete|Function, 2, 0 },
+   { "rotate", Context2D::Rotate, DontDelete|Function, 2, 0 },
+   { "setLineJoin", Context2D::SetLineJoin, DontDelete|Function, 1, 0 },
+   { "moveToPoint", Context2D::MoveToPoint, DontDelete|Function, 2, 0 },
+   { "addBezierCurveToPoint", Context2D::AddBezierCurveToPoint, DontDelete|Function, 6, 0 },
+   { "clearRect", Context2D::ClearRect, DontDelete|Function, 4, &Context2DTableEntries[36] },
    { "drawImageFromRect", Context2D::DrawImageFromRect, DontDelete|Function, 10, 0 },
    { "setShadow", Context2D::SetShadow, DontDelete|Function, 3, 0 },
-   { "setShadowWithColor", Context2D::SetShadowWithColor, DontDelete|Function, 4, &Context2DTableEntries[34] },
-   { "clearShadow", Context2D::ClearShadow, DontDelete|Function, 0, 0 }
+   { "setShadowWithColor", Context2D::SetShadowWithColor, DontDelete|Function, 4, 0 },
+   { "setAlpha", Context2D::SetAlpha, DontDelete|Function, 1, 0 }
 };
 
-const struct HashTable Context2DTable = { 2, 35, Context2DTableEntries, 23 };
+const struct HashTable Context2DTable = { 2, 38, Context2DTableEntries, 28 };
 
 } // namespace

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list