webengine/osswebengine/DerivedSources/WebCore/JSHTMLQuoteElement.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 #include "JSHTMLQuoteElement.h"
       
    24 
       
    25 #include <wtf/GetPtr.h>
       
    26 
       
    27 #include "HTMLQuoteElement.h"
       
    28 #include "PlatformString.h"
       
    29 
       
    30 using namespace KJS;
       
    31 
       
    32 namespace WebCore {
       
    33 
       
    34 /* Hash table */
       
    35 
       
    36 static const HashEntry JSHTMLQuoteElementTableEntries[] =
       
    37 {
       
    38     { 0, 0, 0, 0, 0 },
       
    39     { "cite", JSHTMLQuoteElement::CiteAttrNum, DontDelete, 0, &JSHTMLQuoteElementTableEntries[2] },
       
    40     { "constructor", JSHTMLQuoteElement::ConstructorAttrNum, DontDelete|DontEnum|ReadOnly, 0, 0 }
       
    41 };
       
    42 
       
    43 static const HashTable JSHTMLQuoteElementTable = 
       
    44 {
       
    45     2, 3, JSHTMLQuoteElementTableEntries, 2
       
    46 };
       
    47 
       
    48 /* Hash table for constructor */
       
    49 
       
    50 static const HashEntry JSHTMLQuoteElementConstructorTableEntries[] =
       
    51 {
       
    52     { 0, 0, 0, 0, 0 }
       
    53 };
       
    54 
       
    55 static const HashTable JSHTMLQuoteElementConstructorTable = 
       
    56 {
       
    57     2, 1, JSHTMLQuoteElementConstructorTableEntries, 1
       
    58 };
       
    59 
       
    60 class JSHTMLQuoteElementConstructor : public DOMObject {
       
    61 public:
       
    62     JSHTMLQuoteElementConstructor(ExecState* exec)
       
    63     {
       
    64         setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype());
       
    65         putDirect(exec->propertyNames().prototype, JSHTMLQuoteElementPrototype::self(exec), None);
       
    66     }
       
    67     virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
       
    68     JSValue* getValueProperty(ExecState*, int token) const;
       
    69     virtual const ClassInfo* classInfo() const { return &info; }
       
    70     static const ClassInfo info;
       
    71 
       
    72     virtual bool implementsHasInstance() const { return true; }
       
    73 };
       
    74 
       
    75 const ClassInfo JSHTMLQuoteElementConstructor::info = { "HTMLQuoteElementConstructor", 0, &JSHTMLQuoteElementConstructorTable, 0 };
       
    76 
       
    77 bool JSHTMLQuoteElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
    78 {
       
    79     return getStaticValueSlot<JSHTMLQuoteElementConstructor, DOMObject>(exec, &JSHTMLQuoteElementConstructorTable, this, propertyName, slot);
       
    80 }
       
    81 
       
    82 JSValue* JSHTMLQuoteElementConstructor::getValueProperty(ExecState*, int token) const
       
    83 {
       
    84     // The token is the numeric value of its associated constant
       
    85     return jsNumber(token);
       
    86 }
       
    87 
       
    88 /* Hash table for prototype */
       
    89 
       
    90 static const HashEntry JSHTMLQuoteElementPrototypeTableEntries[] =
       
    91 {
       
    92     { 0, 0, 0, 0, 0 }
       
    93 };
       
    94 
       
    95 static const HashTable JSHTMLQuoteElementPrototypeTable = 
       
    96 {
       
    97     2, 1, JSHTMLQuoteElementPrototypeTableEntries, 1
       
    98 };
       
    99 
       
   100 const ClassInfo JSHTMLQuoteElementPrototype::info = { "HTMLQuoteElementPrototype", 0, &JSHTMLQuoteElementPrototypeTable, 0 };
       
   101 
       
   102 JSObject* JSHTMLQuoteElementPrototype::self(ExecState* exec)
       
   103 {
       
   104     return KJS::cacheGlobalObject<JSHTMLQuoteElementPrototype>(exec, "[[JSHTMLQuoteElement.prototype]]");
       
   105 }
       
   106 
       
   107 const ClassInfo JSHTMLQuoteElement::info = { "HTMLQuoteElement", &JSHTMLElement::info, &JSHTMLQuoteElementTable, 0 };
       
   108 
       
   109 JSHTMLQuoteElement::JSHTMLQuoteElement(ExecState* exec, HTMLQuoteElement* impl)
       
   110     : JSHTMLElement(exec, impl)
       
   111 {
       
   112     setPrototype(JSHTMLQuoteElementPrototype::self(exec));
       
   113 }
       
   114 
       
   115 bool JSHTMLQuoteElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   116 {
       
   117     return getStaticValueSlot<JSHTMLQuoteElement, JSHTMLElement>(exec, &JSHTMLQuoteElementTable, this, propertyName, slot);
       
   118 }
       
   119 
       
   120 JSValue* JSHTMLQuoteElement::getValueProperty(ExecState* exec, int token) const
       
   121 {
       
   122     switch (token) {
       
   123     case CiteAttrNum: {
       
   124         HTMLQuoteElement* imp = static_cast<HTMLQuoteElement*>(impl());
       
   125 
       
   126         return jsString(imp->cite());
       
   127     }
       
   128     case ConstructorAttrNum:
       
   129         return getConstructor(exec);
       
   130     }
       
   131     return 0;
       
   132 }
       
   133 
       
   134 void JSHTMLQuoteElement::put(ExecState* exec, const Identifier& propertyName, JSValue* value, int attr)
       
   135 {
       
   136     lookupPut<JSHTMLQuoteElement, JSHTMLElement>(exec, propertyName, value, attr, &JSHTMLQuoteElementTable, this);
       
   137 }
       
   138 
       
   139 void JSHTMLQuoteElement::putValueProperty(ExecState* exec, int token, JSValue* value, int /*attr*/)
       
   140 {
       
   141     switch (token) {
       
   142     case CiteAttrNum: {
       
   143         HTMLQuoteElement* imp = static_cast<HTMLQuoteElement*>(impl());
       
   144 
       
   145         imp->setCite(valueToStringWithNullCheck(exec, value));
       
   146         break;
       
   147     }
       
   148     }
       
   149 }
       
   150 
       
   151 JSValue* JSHTMLQuoteElement::getConstructor(ExecState* exec)
       
   152 {
       
   153     return KJS::cacheGlobalObject<JSHTMLQuoteElementConstructor>(exec, "[[HTMLQuoteElement.constructor]]");
       
   154 }
       
   155 
       
   156 }