webengine/osswebengine/DerivedSources/WebCore/JSSVGPathSegLinetoHorizontalRel.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 "JSSVGPathSegLinetoHorizontalRel.h"
       
    32 
       
    33 #include <wtf/GetPtr.h>
       
    34 
       
    35 #include "SVGPathSegLinetoHorizontal.h"
       
    36 
       
    37 using namespace KJS;
       
    38 
       
    39 namespace WebCore {
       
    40 
       
    41 /* Hash table */
       
    42 
       
    43 static const HashEntry JSSVGPathSegLinetoHorizontalRelTableEntries[] =
       
    44 {
       
    45     { "x", JSSVGPathSegLinetoHorizontalRel::XAttrNum, DontDelete, 0, 0 }
       
    46 };
       
    47 
       
    48 static const HashTable JSSVGPathSegLinetoHorizontalRelTable = 
       
    49 {
       
    50     2, 1, JSSVGPathSegLinetoHorizontalRelTableEntries, 1
       
    51 };
       
    52 
       
    53 /* Hash table for prototype */
       
    54 
       
    55 static const HashEntry JSSVGPathSegLinetoHorizontalRelPrototypeTableEntries[] =
       
    56 {
       
    57     { 0, 0, 0, 0, 0 }
       
    58 };
       
    59 
       
    60 static const HashTable JSSVGPathSegLinetoHorizontalRelPrototypeTable = 
       
    61 {
       
    62     2, 1, JSSVGPathSegLinetoHorizontalRelPrototypeTableEntries, 1
       
    63 };
       
    64 
       
    65 const ClassInfo JSSVGPathSegLinetoHorizontalRelPrototype::info = { "SVGPathSegLinetoHorizontalRelPrototype", 0, &JSSVGPathSegLinetoHorizontalRelPrototypeTable, 0 };
       
    66 
       
    67 JSObject* JSSVGPathSegLinetoHorizontalRelPrototype::self(ExecState* exec)
       
    68 {
       
    69     return KJS::cacheGlobalObject<JSSVGPathSegLinetoHorizontalRelPrototype>(exec, "[[JSSVGPathSegLinetoHorizontalRel.prototype]]");
       
    70 }
       
    71 
       
    72 const ClassInfo JSSVGPathSegLinetoHorizontalRel::info = { "SVGPathSegLinetoHorizontalRel", &JSSVGPathSeg::info, &JSSVGPathSegLinetoHorizontalRelTable, 0 };
       
    73 
       
    74 JSSVGPathSegLinetoHorizontalRel::JSSVGPathSegLinetoHorizontalRel(ExecState* exec, SVGPathSegLinetoHorizontalRel* impl)
       
    75     : JSSVGPathSeg(exec, impl)
       
    76 {
       
    77     setPrototype(JSSVGPathSegLinetoHorizontalRelPrototype::self(exec));
       
    78 }
       
    79 
       
    80 bool JSSVGPathSegLinetoHorizontalRel::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
    81 {
       
    82     return getStaticValueSlot<JSSVGPathSegLinetoHorizontalRel, JSSVGPathSeg>(exec, &JSSVGPathSegLinetoHorizontalRelTable, this, propertyName, slot);
       
    83 }
       
    84 
       
    85 JSValue* JSSVGPathSegLinetoHorizontalRel::getValueProperty(ExecState* exec, int token) const
       
    86 {
       
    87     switch (token) {
       
    88     case XAttrNum: {
       
    89         SVGPathSegLinetoHorizontalRel* imp = static_cast<SVGPathSegLinetoHorizontalRel*>(impl());
       
    90 
       
    91         return jsNumber(imp->x());
       
    92     }
       
    93     }
       
    94     return 0;
       
    95 }
       
    96 
       
    97 void JSSVGPathSegLinetoHorizontalRel::put(ExecState* exec, const Identifier& propertyName, JSValue* value, int attr)
       
    98 {
       
    99     lookupPut<JSSVGPathSegLinetoHorizontalRel, JSSVGPathSeg>(exec, propertyName, value, attr, &JSSVGPathSegLinetoHorizontalRelTable, this);
       
   100 }
       
   101 
       
   102 void JSSVGPathSegLinetoHorizontalRel::putValueProperty(ExecState* exec, int token, JSValue* value, int /*attr*/)
       
   103 {
       
   104     switch (token) {
       
   105     case XAttrNum: {
       
   106         SVGPathSegLinetoHorizontalRel* imp = static_cast<SVGPathSegLinetoHorizontalRel*>(impl());
       
   107 
       
   108         imp->setX(value->toFloat(exec));
       
   109         break;
       
   110     }
       
   111     }
       
   112     SVGPathSegLinetoHorizontalRel* imp = static_cast<SVGPathSegLinetoHorizontalRel*>(impl());
       
   113 
       
   114     ASSERT(exec && exec->dynamicInterpreter());
       
   115     Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
       
   116     if (!activeFrame)
       
   117         return;
       
   118 
       
   119     SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
       
   120     if (extensions && extensions->hasGenericContext<SVGPathSeg>(imp)) {
       
   121         const SVGElement* context = extensions->genericContext<SVGPathSeg>(imp);
       
   122         ASSERT(context);
       
   123 
       
   124         context->notifyAttributeChange();
       
   125     }
       
   126 
       
   127 }
       
   128 
       
   129 
       
   130 }
       
   131 
       
   132 #endif // ENABLE(SVG)