webengine/osswebengine/DerivedSources/WebCore/JSSVGPathSegCurvetoQuadraticAbs.cpp
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2     This file is part of the WebKit open source project.
       
     3     This file has been generated by generate-bindings.pl. DO NOT MODIFY!
       
     4 
       
     5     This library is free software; you can redistribute it and/or
       
     6     modify it under the terms of the GNU Library General Public
       
     7     License as published by the Free Software Foundation; either
       
     8     version 2 of the License, or (at your option) any later version.
       
     9 
       
    10     This library is distributed in the hope that it will be useful,
       
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    13     Library General Public License for more details.
       
    14 
       
    15     You should have received a copy of the GNU Library General Public License
       
    16     along with this library; see the file COPYING.LIB.  If not, write to
       
    17     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
       
    18     Boston, MA 02110-1301, USA.
       
    19 */
       
    20 
       
    21 #include "config.h"
       
    22 
       
    23 
       
    24 #if ENABLE(SVG)
       
    25 
       
    26 #include "Document.h"
       
    27 #include "Frame.h"
       
    28 #include "SVGDocumentExtensions.h"
       
    29 #include "SVGElement.h"
       
    30 #include "SVGAnimatedTemplate.h"
       
    31 #include "JSSVGPathSegCurvetoQuadraticAbs.h"
       
    32 
       
    33 #include <wtf/GetPtr.h>
       
    34 
       
    35 #include "SVGPathSegCurvetoQuadratic.h"
       
    36 
       
    37 using namespace KJS;
       
    38 
       
    39 namespace WebCore {
       
    40 
       
    41 /* Hash table */
       
    42 
       
    43 static const HashEntry JSSVGPathSegCurvetoQuadraticAbsTableEntries[] =
       
    44 {
       
    45     { "y", JSSVGPathSegCurvetoQuadraticAbs::YAttrNum, DontDelete, 0, 0 },
       
    46     { "x", JSSVGPathSegCurvetoQuadraticAbs::XAttrNum, DontDelete, 0, 0 },
       
    47     { "x1", JSSVGPathSegCurvetoQuadraticAbs::X1AttrNum, DontDelete, 0, 0 },
       
    48     { "y1", JSSVGPathSegCurvetoQuadraticAbs::Y1AttrNum, DontDelete, 0, 0 }
       
    49 };
       
    50 
       
    51 static const HashTable JSSVGPathSegCurvetoQuadraticAbsTable = 
       
    52 {
       
    53     2, 4, JSSVGPathSegCurvetoQuadraticAbsTableEntries, 4
       
    54 };
       
    55 
       
    56 /* Hash table for prototype */
       
    57 
       
    58 static const HashEntry JSSVGPathSegCurvetoQuadraticAbsPrototypeTableEntries[] =
       
    59 {
       
    60     { 0, 0, 0, 0, 0 }
       
    61 };
       
    62 
       
    63 static const HashTable JSSVGPathSegCurvetoQuadraticAbsPrototypeTable = 
       
    64 {
       
    65     2, 1, JSSVGPathSegCurvetoQuadraticAbsPrototypeTableEntries, 1
       
    66 };
       
    67 
       
    68 const ClassInfo JSSVGPathSegCurvetoQuadraticAbsPrototype::info = { "SVGPathSegCurvetoQuadraticAbsPrototype", 0, &JSSVGPathSegCurvetoQuadraticAbsPrototypeTable, 0 };
       
    69 
       
    70 JSObject* JSSVGPathSegCurvetoQuadraticAbsPrototype::self(ExecState* exec)
       
    71 {
       
    72     return KJS::cacheGlobalObject<JSSVGPathSegCurvetoQuadraticAbsPrototype>(exec, "[[JSSVGPathSegCurvetoQuadraticAbs.prototype]]");
       
    73 }
       
    74 
       
    75 const ClassInfo JSSVGPathSegCurvetoQuadraticAbs::info = { "SVGPathSegCurvetoQuadraticAbs", &JSSVGPathSeg::info, &JSSVGPathSegCurvetoQuadraticAbsTable, 0 };
       
    76 
       
    77 JSSVGPathSegCurvetoQuadraticAbs::JSSVGPathSegCurvetoQuadraticAbs(ExecState* exec, SVGPathSegCurvetoQuadraticAbs* impl)
       
    78     : JSSVGPathSeg(exec, impl)
       
    79 {
       
    80     setPrototype(JSSVGPathSegCurvetoQuadraticAbsPrototype::self(exec));
       
    81 }
       
    82 
       
    83 bool JSSVGPathSegCurvetoQuadraticAbs::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
    84 {
       
    85     return getStaticValueSlot<JSSVGPathSegCurvetoQuadraticAbs, JSSVGPathSeg>(exec, &JSSVGPathSegCurvetoQuadraticAbsTable, this, propertyName, slot);
       
    86 }
       
    87 
       
    88 JSValue* JSSVGPathSegCurvetoQuadraticAbs::getValueProperty(ExecState* exec, int token) const
       
    89 {
       
    90     switch (token) {
       
    91     case XAttrNum: {
       
    92         SVGPathSegCurvetoQuadraticAbs* imp = static_cast<SVGPathSegCurvetoQuadraticAbs*>(impl());
       
    93 
       
    94         return jsNumber(imp->x());
       
    95     }
       
    96     case YAttrNum: {
       
    97         SVGPathSegCurvetoQuadraticAbs* imp = static_cast<SVGPathSegCurvetoQuadraticAbs*>(impl());
       
    98 
       
    99         return jsNumber(imp->y());
       
   100     }
       
   101     case X1AttrNum: {
       
   102         SVGPathSegCurvetoQuadraticAbs* imp = static_cast<SVGPathSegCurvetoQuadraticAbs*>(impl());
       
   103 
       
   104         return jsNumber(imp->x1());
       
   105     }
       
   106     case Y1AttrNum: {
       
   107         SVGPathSegCurvetoQuadraticAbs* imp = static_cast<SVGPathSegCurvetoQuadraticAbs*>(impl());
       
   108 
       
   109         return jsNumber(imp->y1());
       
   110     }
       
   111     }
       
   112     return 0;
       
   113 }
       
   114 
       
   115 void JSSVGPathSegCurvetoQuadraticAbs::put(ExecState* exec, const Identifier& propertyName, JSValue* value, int attr)
       
   116 {
       
   117     lookupPut<JSSVGPathSegCurvetoQuadraticAbs, JSSVGPathSeg>(exec, propertyName, value, attr, &JSSVGPathSegCurvetoQuadraticAbsTable, this);
       
   118 }
       
   119 
       
   120 void JSSVGPathSegCurvetoQuadraticAbs::putValueProperty(ExecState* exec, int token, JSValue* value, int /*attr*/)
       
   121 {
       
   122     switch (token) {
       
   123     case XAttrNum: {
       
   124         SVGPathSegCurvetoQuadraticAbs* imp = static_cast<SVGPathSegCurvetoQuadraticAbs*>(impl());
       
   125 
       
   126         imp->setX(value->toFloat(exec));
       
   127         break;
       
   128     }
       
   129     case YAttrNum: {
       
   130         SVGPathSegCurvetoQuadraticAbs* imp = static_cast<SVGPathSegCurvetoQuadraticAbs*>(impl());
       
   131 
       
   132         imp->setY(value->toFloat(exec));
       
   133         break;
       
   134     }
       
   135     case X1AttrNum: {
       
   136         SVGPathSegCurvetoQuadraticAbs* imp = static_cast<SVGPathSegCurvetoQuadraticAbs*>(impl());
       
   137 
       
   138         imp->setX1(value->toFloat(exec));
       
   139         break;
       
   140     }
       
   141     case Y1AttrNum: {
       
   142         SVGPathSegCurvetoQuadraticAbs* imp = static_cast<SVGPathSegCurvetoQuadraticAbs*>(impl());
       
   143 
       
   144         imp->setY1(value->toFloat(exec));
       
   145         break;
       
   146     }
       
   147     }
       
   148     SVGPathSegCurvetoQuadraticAbs* imp = static_cast<SVGPathSegCurvetoQuadraticAbs*>(impl());
       
   149 
       
   150     ASSERT(exec && exec->dynamicInterpreter());
       
   151     Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
       
   152     if (!activeFrame)
       
   153         return;
       
   154 
       
   155     SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
       
   156     if (extensions && extensions->hasGenericContext<SVGPathSeg>(imp)) {
       
   157         const SVGElement* context = extensions->genericContext<SVGPathSeg>(imp);
       
   158         ASSERT(context);
       
   159 
       
   160         context->notifyAttributeChange();
       
   161     }
       
   162 
       
   163 }
       
   164 
       
   165 
       
   166 }
       
   167 
       
   168 #endif // ENABLE(SVG)