<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US"> <head> <title>khtml: kjs_css.cpp Source File (khtml)</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline DE v2.0" l gen true for "http://www.kde.org" r (nz 1 vz 1 lz 1 oz 1 cb 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.kde.org" r (n 0 s 0 v 0 l 0))' /> <meta name="trademark" content="KDE e.V." /> <meta name="description" content="K Desktop Environment Homepage, KDE.org" /> <meta name="MSSmartTagsPreventParsing" content="true" /> <meta name="robots" content="all" /> <link rel="shortcut icon" href="../../favicon.ico" /> <link rel="stylesheet" media="screen" type="text/css" title="APIDOX" href="doxygen.css" /> </head> <body> <div id="nav_header_top" align="right"> <a href="#content" class="doNotDisplay" accesskey="2">Skip to main content ::</a> <a href="../.."><img id="nav_header_logo" alt="Home" align="left" src="../../kde_gear_64.png" border="0" /></a> <span class="doNotDisplay">::</span> <div id="nav_header_title" align="left">KDE API Reference</div> </div> <div id="nav_header_bottom" align="right"> <span class="doNotDisplay">:: <a href="#navigation" accesskey="5">Skip to Link Menu</a><br/></span> <div id="nav_header_bottom_right" style="text-align: left;"> / <a href="../..">API Reference</a> / <a href=".">khtml</a> </div> </div> <table id="main" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" class="menuheader" height="0"></td> <td id="contentcolumn" valign="top" rowspan="2" > <div id="content" style="padding-top: 0px;"><div style="width:100%; margin: 0px; padding: 0px;"> <a name="content"></a> <!-- Generated by Doxygen 1.4.7 --> <h1>kjs_css.cpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- c-basic-offset: 2 -*-</span> <a name="l00002"></a>00002 <span class="comment">/*</span> <a name="l00003"></a>00003 <span class="comment"> * This file is part of the KDE libraries</span> <a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2000 Harri Porten (porten@kde.org)</span> <a name="l00005"></a>00005 <span class="comment"> * Copyright (C) 2001 Peter Kelly (pmk@post.com)</span> <a name="l00006"></a>00006 <span class="comment"> * Copyright (C) 2003 Apple Computer, Inc.</span> <a name="l00007"></a>00007 <span class="comment"> *</span> <a name="l00008"></a>00008 <span class="comment"> * This library is free software; you can redistribute it and/or</span> <a name="l00009"></a>00009 <span class="comment"> * modify it under the terms of the GNU Library General Public</span> <a name="l00010"></a>00010 <span class="comment"> * License as published by the Free Software Foundation; either</span> <a name="l00011"></a>00011 <span class="comment"> * version 2 of the License, or (at your option) any later version.</span> <a name="l00012"></a>00012 <span class="comment"> *</span> <a name="l00013"></a>00013 <span class="comment"> * This library is distributed in the hope that it will be useful,</span> <a name="l00014"></a>00014 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00015"></a>00015 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> <a name="l00016"></a>00016 <span class="comment"> * Library General Public License for more details.</span> <a name="l00017"></a>00017 <span class="comment"> *</span> <a name="l00018"></a>00018 <span class="comment"> * You should have received a copy of the GNU Library General Public</span> <a name="l00019"></a>00019 <span class="comment"> * License along with this library; if not, write to the Free Software</span> <a name="l00020"></a>00020 <span class="comment"> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA</span> <a name="l00021"></a>00021 <span class="comment"> */</span> <a name="l00022"></a>00022 <a name="l00023"></a>00023 <span class="preprocessor">#include "kjs_css.h"</span> <a name="l00024"></a>00024 <span class="preprocessor">#include "kjs_css.lut.h"</span> <a name="l00025"></a>00025 <a name="l00026"></a>00026 <span class="preprocessor">#include <dom/html_head.h></span> <span class="comment">// for HTMLStyleElement</span> <a name="l00027"></a>00027 <a name="l00028"></a>00028 <span class="preprocessor">#include <css/css_base.h></span> <a name="l00029"></a>00029 <span class="preprocessor">#include "kjs_dom.h"</span> <a name="l00030"></a>00030 <a name="l00031"></a>00031 <span class="keyword">using namespace </span>KJS; <a name="l00032"></a>00032 <span class="preprocessor">#include <kdebug.h></span> <a name="l00033"></a>00033 <a name="l00034"></a>00034 <span class="keyword">static</span> <a class="codeRef" doxygen="qt.tag:" href="qstring.html">QString</a> cssPropertyName( <span class="keyword">const</span> Identifier &p, <span class="keywordtype">bool</span>& hadPixelPrefix ) <a name="l00035"></a>00035 { <a name="l00036"></a>00036 <a class="codeRef" doxygen="qt.tag:" href="qstring.html">QString</a> prop = p.qstring(); <a name="l00037"></a>00037 <span class="keywordtype">int</span> i = prop.<a class="codeRef" doxygen="qt.tag:" href="qstring.html#length">length</a>(); <a name="l00038"></a>00038 <span class="keywordflow">while</span> ( --i ) { <a name="l00039"></a>00039 <span class="keywordtype">char</span> c = prop[i].<a class="codeRef" doxygen="qt.tag:" href="qstring.html#latin1">latin1</a>(); <a name="l00040"></a>00040 <span class="keywordflow">if</span> ( c >= <span class="charliteral">'A'</span> && c <= <span class="charliteral">'Z'</span> ) <a name="l00041"></a>00041 prop.<a class="codeRef" doxygen="qt.tag:" href="qstring.html#insert">insert</a>( i, <span class="charliteral">'-'</span> ); <a name="l00042"></a>00042 } <a name="l00043"></a>00043 <a name="l00044"></a>00044 prop = prop.<a class="codeRef" doxygen="qt.tag:" href="qstring.html#lower">lower</a>(); <a name="l00045"></a>00045 hadPixelPrefix = <span class="keyword">false</span>; <a name="l00046"></a>00046 <a name="l00047"></a>00047 <span class="keywordflow">if</span> (prop.<a class="codeRef" doxygen="qt.tag:" href="qstring.html#startsWith">startsWith</a>(<span class="stringliteral">"css-"</span>)) { <a name="l00048"></a>00048 prop = prop.<a class="codeRef" doxygen="qt.tag:" href="qstring.html#mid">mid</a>(4); <a name="l00049"></a>00049 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (prop.<a class="codeRef" doxygen="qt.tag:" href="qstring.html#startsWith">startsWith</a>(<span class="stringliteral">"pixel-"</span>)) { <a name="l00050"></a>00050 prop = prop.<a class="codeRef" doxygen="qt.tag:" href="qstring.html#mid">mid</a>(6); <a name="l00051"></a>00051 hadPixelPrefix = <span class="keyword">true</span>; <a name="l00052"></a>00052 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (prop.<a class="codeRef" doxygen="qt.tag:" href="qstring.html#startsWith">startsWith</a>(<span class="stringliteral">"pos-"</span>)) { <a name="l00053"></a>00053 prop = prop.<a class="codeRef" doxygen="qt.tag:" href="qstring.html#mid">mid</a>(4); <a name="l00054"></a>00054 hadPixelPrefix = <span class="keyword">true</span>; <a name="l00055"></a>00055 } <a name="l00056"></a>00056 <a name="l00057"></a>00057 <span class="keywordflow">return</span> prop; <a name="l00058"></a>00058 } <a name="l00059"></a>00059 <a name="l00060"></a>00060 <span class="comment">/*</span> <a name="l00061"></a>00061 <span class="comment">@begin DOMCSSStyleDeclarationProtoTable 7</span> <a name="l00062"></a>00062 <span class="comment"> getPropertyValue DOMCSSStyleDeclaration::GetPropertyValue DontDelete|Function 1</span> <a name="l00063"></a>00063 <span class="comment"> getPropertyCSSValue DOMCSSStyleDeclaration::GetPropertyCSSValue DontDelete|Function 1</span> <a name="l00064"></a>00064 <span class="comment"> removeProperty DOMCSSStyleDeclaration::RemoveProperty DontDelete|Function 1</span> <a name="l00065"></a>00065 <span class="comment"> getPropertyPriority DOMCSSStyleDeclaration::GetPropertyPriority DontDelete|Function 1</span> <a name="l00066"></a>00066 <span class="comment"> setProperty DOMCSSStyleDeclaration::SetProperty DontDelete|Function 3</span> <a name="l00067"></a>00067 <span class="comment"> item DOMCSSStyleDeclaration::Item DontDelete|Function 1</span> <a name="l00068"></a>00068 <span class="comment"># IE names for it (#36063)</span> <a name="l00069"></a>00069 <span class="comment"> getAttribute DOMCSSStyleDeclaration::GetPropertyValue DontDelete|Function 1</span> <a name="l00070"></a>00070 <span class="comment"> removeAttribute DOMCSSStyleDeclaration::RemoveProperty DontDelete|Function 1</span> <a name="l00071"></a>00071 <span class="comment"> setAttribute DOMCSSStyleDeclaration::SetProperty DontDelete|Function 3</span> <a name="l00072"></a>00072 <span class="comment">@end</span> <a name="l00073"></a>00073 <span class="comment">@begin DOMCSSStyleDeclarationTable 3</span> <a name="l00074"></a>00074 <span class="comment"> cssText DOMCSSStyleDeclaration::CssText DontDelete</span> <a name="l00075"></a>00075 <span class="comment"> length DOMCSSStyleDeclaration::Length DontDelete|ReadOnly</span> <a name="l00076"></a>00076 <span class="comment"> parentRule DOMCSSStyleDeclaration::ParentRule DontDelete|ReadOnly</span> <a name="l00077"></a>00077 <span class="comment">@end</span> <a name="l00078"></a>00078 <span class="comment">*/</span> <a name="l00079"></a>00079 DEFINE_PROTOTYPE(<span class="stringliteral">"DOMCSSStyleDeclaration"</span>, DOMCSSStyleDeclarationProto) <a name="l00080"></a>00080 IMPLEMENT_PROTOFUNC_DOM(DOMCSSStyleDeclarationProtoFunc) <a name="l00081"></a>00081 IMPLEMENT_PROTOTYPE(DOMCSSStyleDeclarationProto, DOMCSSStyleDeclarationProtoFunc) <a name="l00082"></a>00082 <a name="l00083"></a>00083 IMPLEMENT_PSEUDO_CONSTRUCTOR(CSSStyleDeclarationPseudoCtor, "<a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html">DOMCSSStyleDeclaration</a>",DOMCSSStyleDeclarationProto) <a name="l00084"></a>00084 <a name="l00085"></a>00085 const ClassInfo DOMCSSStyleDeclaration::info = { <span class="stringliteral">"CSSStyleDeclaration"</span>, 0, &<a class="code" href="namespaceKJS.html#3c7b8a915bed7059d30ba65ffc117ba0">DOMCSSStyleDeclarationTable</a>, 0 }; <a name="l00086"></a>00086 <a name="l00087"></a><a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#0abe5bde0619d31c6e48a26c08d20fbf">00087</a> DOMCSSStyleDeclaration::DOMCSSStyleDeclaration(ExecState *exec, <span class="keyword">const</span> <a class="code" href="classDOM_1_1CSSStyleDeclaration.html">DOM::CSSStyleDeclaration</a>& s) <a name="l00088"></a>00088 : <a class="code" href="classKJS_1_1DOMObject.html">DOMObject</a>(DOMCSSStyleDeclarationProto::self(exec)), styleDecl(s) <a name="l00089"></a>00089 { } <a name="l00090"></a>00090 <a name="l00091"></a><a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#b8b65f38c28f0762d0ae528ac7d09fdb">00091</a> <a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#b8b65f38c28f0762d0ae528ac7d09fdb">DOMCSSStyleDeclaration::~DOMCSSStyleDeclaration</a>() <a name="l00092"></a>00092 { <a name="l00093"></a>00093 <a class="code" href="classKJS_1_1ScriptInterpreter.html#119bb67f3e96835ceebba110292ea63e">ScriptInterpreter::forgetDOMObject</a>(<a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#00be762f63277a24d90a74d6cfef17bb">styleDecl</a>.<a class="code" href="classDOM_1_1CSSStyleDeclaration.html#629f1cc183aa2ce86993af4e658127d7">handle</a>()); <a name="l00094"></a>00094 } <a name="l00095"></a>00095 <a name="l00096"></a><a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#c01c2a961910af5ceca7349121e786d0">00096</a> <span class="keywordtype">bool</span> <a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#c01c2a961910af5ceca7349121e786d0">DOMCSSStyleDeclaration::hasProperty</a>(ExecState *exec, <span class="keyword">const</span> Identifier &p)<span class="keyword"> const</span> <a name="l00097"></a>00097 <span class="keyword"></span>{ <a name="l00098"></a>00098 <span class="keywordtype">bool</span> hadPixelPrefix; <a name="l00099"></a>00099 <a class="codeRef" doxygen="qt.tag:" href="qstring.html">QString</a> cssprop = cssPropertyName(p, hadPixelPrefix); <a name="l00100"></a>00100 <span class="keywordflow">if</span> (<a class="code" href="namespaceDOM.html#fea6a36b29e466789fa1ffb2ba05560e">DOM::getPropertyID</a>(cssprop.<a class="codeRef" doxygen="qt.tag:" href="qstring.html#latin1">latin1</a>(), cssprop.<a class="codeRef" doxygen="qt.tag:" href="qstring.html#length">length</a>())) <a name="l00101"></a>00101 <span class="keywordflow">return</span> <span class="keyword">true</span>; <a name="l00102"></a>00102 <a name="l00103"></a>00103 <span class="keywordflow">return</span> ObjectImp::hasProperty(exec, p); <a name="l00104"></a>00104 } <a name="l00105"></a>00105 <a name="l00106"></a><a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#e6eff0737119cc147a771b098d693661">00106</a> Value <a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#e6eff0737119cc147a771b098d693661">DOMCSSStyleDeclaration::tryGet</a>(ExecState *exec, <span class="keyword">const</span> Identifier &propertyName)<span class="keyword"> const</span> <a name="l00107"></a>00107 <span class="keyword"></span>{ <a name="l00108"></a>00108 <span class="preprocessor">#ifdef KJS_VERBOSE</span> <a name="l00109"></a>00109 <span class="preprocessor"></span> <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ggfbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(6070) << <span class="stringliteral">"DOMCSSStyleDeclaration::tryGet "</span> << propertyName.qstring() << <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gg313d520ed8f8f6b46eeef22cfb3b082a">endl</a>; <a name="l00110"></a>00110 <span class="preprocessor">#endif</span> <a name="l00111"></a>00111 <span class="preprocessor"></span> <span class="keyword">const</span> HashEntry* entry = Lookup::findEntry(&<a class="code" href="namespaceKJS.html#3c7b8a915bed7059d30ba65ffc117ba0">DOMCSSStyleDeclarationTable</a>, propertyName); <a name="l00112"></a>00112 <span class="keywordflow">if</span> (entry) <a name="l00113"></a>00113 <span class="keywordflow">switch</span> (entry->value) { <a name="l00114"></a>00114 <span class="keywordflow">case</span> CssText: <a name="l00115"></a>00115 <span class="keywordflow">return</span> String(<a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#00be762f63277a24d90a74d6cfef17bb">styleDecl</a>.<a class="code" href="classDOM_1_1CSSStyleDeclaration.html#7e0082cad3d063ec0133b3120676a063">cssText</a>()); <a name="l00116"></a>00116 <span class="keywordflow">case</span> Length: <a name="l00117"></a>00117 <span class="keywordflow">return</span> Number(<a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#00be762f63277a24d90a74d6cfef17bb">styleDecl</a>.<a class="code" href="classDOM_1_1CSSStyleDeclaration.html#cb66f4797a5b9f6526aca4ec7923ed0c">length</a>()); <a name="l00118"></a>00118 <span class="keywordflow">case</span> ParentRule: <a name="l00119"></a>00119 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#8cc35edfd65958e66782c93ef21d92be">getDOMCSSRule</a>(exec,<a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#00be762f63277a24d90a74d6cfef17bb">styleDecl</a>.<a class="code" href="classDOM_1_1CSSStyleDeclaration.html#bab9ff73a361c9f8a901a1db2ffe2fd1">parentRule</a>()); <a name="l00120"></a>00120 <span class="keywordflow">default</span>: <a name="l00121"></a>00121 <span class="keywordflow">break</span>; <a name="l00122"></a>00122 } <a name="l00123"></a>00123 <a name="l00124"></a>00124 <span class="comment">// Look in the prototype (for functions) before assuming it's a name</span> <a name="l00125"></a>00125 Object proto = Object::dynamicCast(prototype()); <a name="l00126"></a>00126 <span class="keywordflow">if</span> (proto.isValid() && proto.hasProperty(exec,propertyName)) <a name="l00127"></a>00127 <span class="keywordflow">return</span> proto.get(exec,propertyName); <a name="l00128"></a>00128 <a name="l00129"></a>00129 <span class="keywordtype">bool</span> ok; <a name="l00130"></a>00130 <span class="keywordtype">long</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> u = propertyName.toULong(&ok); <a name="l00131"></a>00131 <span class="keywordflow">if</span> (ok) <a name="l00132"></a>00132 <span class="keywordflow">return</span> String(<a class="code" href="classDOM_1_1CSSStyleDeclaration.html">DOM::CSSStyleDeclaration</a>(<a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#00be762f63277a24d90a74d6cfef17bb">styleDecl</a>).item(u)); <a name="l00133"></a>00133 <a name="l00134"></a>00134 <span class="comment">// pixelTop returns "CSS Top" as number value in unit pixels</span> <a name="l00135"></a>00135 <span class="comment">// posTop returns "CSS top" as number value in unit pixels _if_ its a</span> <a name="l00136"></a>00136 <span class="comment">// positioned element. if it is not a positioned element, return 0</span> <a name="l00137"></a>00137 <span class="comment">// from MSIE documentation ### IMPLEMENT THAT (Dirk)</span> <a name="l00138"></a>00138 <span class="keywordtype">bool</span> asNumber; <a name="l00139"></a>00139 <a class="codeRef" doxygen="qt.tag:" href="qstring.html">QString</a> p = cssPropertyName(propertyName, asNumber); <a name="l00140"></a>00140 <a name="l00141"></a>00141 <span class="preprocessor">#ifdef KJS_VERBOSE</span> <a name="l00142"></a>00142 <span class="preprocessor"></span> <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ggfbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(6070) << <span class="stringliteral">"DOMCSSStyleDeclaration: converting to css property name: "</span> << p << ( asNumber ? <span class="stringliteral">"px"</span> : <span class="stringliteral">""</span> ) << <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gg313d520ed8f8f6b46eeef22cfb3b082a">endl</a>; <a name="l00143"></a>00143 <span class="preprocessor">#endif</span> <a name="l00144"></a>00144 <span class="preprocessor"></span> <a name="l00145"></a>00145 <span class="keywordflow">if</span> (asNumber) { <a name="l00146"></a>00146 <a class="code" href="classDOM_1_1CSSValue.html">DOM::CSSValue</a> v = styleDecl.getPropertyCSSValue(p); <a name="l00147"></a>00147 <span class="keywordflow">if</span> ( !v.<a class="code" href="classDOM_1_1CSSValue.html#9d1ce660dc2e4197a18d201e7653a1fb">isNull</a>() && v.<a class="code" href="classDOM_1_1CSSValue.html#87ef97a0f9c8c0c885803991f36bd7b1">cssValueType</a>() == DOM::CSSValue::CSS_PRIMITIVE_VALUE) <a name="l00148"></a>00148 <span class="keywordflow">return</span> Number(static_cast<DOM::CSSPrimitiveValue>(v).getFloatValue(DOM::CSSPrimitiveValue::CSS_PX)); <a name="l00149"></a>00149 } <a name="l00150"></a>00150 <a name="l00151"></a>00151 <a class="code" href="classDOM_1_1DOMString.html">DOM::DOMString</a> str = const_cast<DOM::CSSStyleDeclaration &>( styleDecl ).getPropertyValue(p); <a name="l00152"></a>00152 <span class="keywordflow">if</span> (!str.<a class="code" href="classDOM_1_1DOMString.html#c7b9c80be89c372651a76bba5e34a1fa">isNull</a>()) <a name="l00153"></a>00153 <span class="keywordflow">return</span> String(str); <a name="l00154"></a>00154 <a name="l00155"></a>00155 <span class="comment">// see if we know this css property, return empty then</span> <a name="l00156"></a>00156 <span class="keywordflow">if</span> (<a class="code" href="namespaceDOM.html#fea6a36b29e466789fa1ffb2ba05560e">DOM::getPropertyID</a>(p.<a class="codeRef" doxygen="qt.tag:" href="qstring.html#latin1">latin1</a>(), p.<a class="codeRef" doxygen="qt.tag:" href="qstring.html#length">length</a>())) <a name="l00157"></a>00157 <span class="keywordflow">return</span> String(<a class="code" href="classDOM_1_1DOMString.html">DOM::DOMString</a>(<span class="stringliteral">""</span>)); <a name="l00158"></a>00158 <a name="l00159"></a>00159 <span class="keywordflow">return</span> <a class="code" href="classKJS_1_1DOMObject.html#da5fedf6964ef230b0bf7135cf58bdee">DOMObject::tryGet</a>(exec, propertyName); <a name="l00160"></a>00160 } <a name="l00161"></a>00161 <a name="l00162"></a>00162 <a name="l00163"></a><a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#70a8a7fac683fa0f7d9dd9f58db7dfd7">00163</a> <span class="keywordtype">void</span> <a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#70a8a7fac683fa0f7d9dd9f58db7dfd7">DOMCSSStyleDeclaration::tryPut</a>(ExecState *exec, <span class="keyword">const</span> Identifier &propertyName, <span class="keyword">const</span> Value& value, <span class="keywordtype">int</span> attr ) <a name="l00164"></a>00164 { <a name="l00165"></a>00165 <span class="preprocessor">#ifdef KJS_VERBOSE</span> <a name="l00166"></a>00166 <span class="preprocessor"></span> <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ggfbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(6070) << <span class="stringliteral">"DOMCSSStyleDeclaration::tryPut "</span> << propertyName.qstring() << <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gg313d520ed8f8f6b46eeef22cfb3b082a">endl</a>; <a name="l00167"></a>00167 <span class="preprocessor">#endif</span> <a name="l00168"></a>00168 <span class="preprocessor"></span> <span class="keywordflow">if</span> (propertyName == <span class="stringliteral">"cssText"</span>) { <a name="l00169"></a>00169 <a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#00be762f63277a24d90a74d6cfef17bb">styleDecl</a>.<a class="code" href="classDOM_1_1CSSStyleDeclaration.html#ad36594ba740890dd10e9b15cb539bee">setCssText</a>(value.toString(exec).string()); <a name="l00170"></a>00170 } <a name="l00171"></a>00171 <span class="keywordflow">else</span> { <a name="l00172"></a>00172 <span class="keywordtype">bool</span> pxSuffix; <a name="l00173"></a>00173 <a class="codeRef" doxygen="qt.tag:" href="qstring.html">QString</a> prop = cssPropertyName(propertyName, pxSuffix); <a name="l00174"></a>00174 <a class="codeRef" doxygen="qt.tag:" href="qstring.html">QString</a> propvalue = value.toString(exec).qstring(); <a name="l00175"></a>00175 <a name="l00176"></a>00176 <span class="keywordflow">if</span> (pxSuffix) <a name="l00177"></a>00177 propvalue += <span class="stringliteral">"px"</span>; <a name="l00178"></a>00178 <span class="preprocessor">#ifdef KJS_VERBOSE</span> <a name="l00179"></a>00179 <span class="preprocessor"></span> <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ggfbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(6070) << <span class="stringliteral">"DOMCSSStyleDeclaration: prop="</span> << prop << <span class="stringliteral">" propvalue="</span> << propvalue << <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gg313d520ed8f8f6b46eeef22cfb3b082a">endl</a>; <a name="l00180"></a>00180 <span class="preprocessor">#endif</span> <a name="l00181"></a>00181 <span class="preprocessor"></span> <span class="comment">// Look whether the property is known.d In that case add it as a CSS property.</span> <a name="l00182"></a>00182 <span class="keywordflow">if</span> (<a class="code" href="namespaceDOM.html#fea6a36b29e466789fa1ffb2ba05560e">DOM::getPropertyID</a>(prop.<a class="codeRef" doxygen="qt.tag:" href="qstring.html#latin1">latin1</a>(), prop.<a class="codeRef" doxygen="qt.tag:" href="qstring.html#length">length</a>())) { <a name="l00183"></a>00183 <span class="keywordflow">if</span> (propvalue.<a class="codeRef" doxygen="qt.tag:" href="qstring.html#isEmpty">isEmpty</a>()) <a name="l00184"></a>00184 <a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#00be762f63277a24d90a74d6cfef17bb">styleDecl</a>.<a class="code" href="classDOM_1_1CSSStyleDeclaration.html#d74c2aa3ab0a955b6f4a98c91cc891e8">removeProperty</a>(prop); <a name="l00185"></a>00185 <span class="keywordflow">else</span> { <a name="l00186"></a>00186 <span class="keywordtype">int</span> important = propvalue.<a class="codeRef" doxygen="qt.tag:" href="qstring.html#find">find</a>(<span class="stringliteral">"!important"</span>, 0, <span class="keyword">false</span>); <a name="l00187"></a>00187 <span class="keywordflow">if</span> (important == -1) <a name="l00188"></a>00188 <a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#00be762f63277a24d90a74d6cfef17bb">styleDecl</a>.<a class="code" href="classDOM_1_1CSSStyleDeclaration.html#e7c97bd63c3a4e5853ba9afe4f2837b1">setProperty</a>(prop, <a class="code" href="classDOM_1_1DOMString.html">DOM::DOMString</a>(propvalue), <span class="stringliteral">""</span>); <a name="l00189"></a>00189 <span class="keywordflow">else</span> <a name="l00190"></a>00190 <a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#00be762f63277a24d90a74d6cfef17bb">styleDecl</a>.<a class="code" href="classDOM_1_1CSSStyleDeclaration.html#e7c97bd63c3a4e5853ba9afe4f2837b1">setProperty</a>(prop, <a class="code" href="classDOM_1_1DOMString.html">DOM::DOMString</a>(propvalue.left(important - 1)), <span class="stringliteral">"important"</span>); <a name="l00191"></a>00191 } <a name="l00192"></a>00192 } <a name="l00193"></a>00193 <span class="keywordflow">else</span> <a name="l00194"></a>00194 <span class="comment">// otherwise add it as a JS property</span> <a name="l00195"></a>00195 <a class="code" href="classKJS_1_1DOMObject.html#afd01257502e1274d0a8cc777d76d78a">DOMObject::tryPut</a>( exec, propertyName, value, attr ); <a name="l00196"></a>00196 } <a name="l00197"></a>00197 } <a name="l00198"></a>00198 <a name="l00199"></a>00199 Value DOMCSSStyleDeclarationProtoFunc::tryCall(ExecState *exec, Object &thisObj, <span class="keyword">const</span> List &args) <a name="l00200"></a>00200 { <a name="l00201"></a>00201 KJS_CHECK_THIS( <a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html">KJS::DOMCSSStyleDeclaration</a>, thisObj ); <a name="l00202"></a>00202 <a class="code" href="classDOM_1_1CSSStyleDeclaration.html">DOM::CSSStyleDeclaration</a> <a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#00be762f63277a24d90a74d6cfef17bb">styleDecl</a> = static_cast<DOMCSSStyleDeclaration *>(thisObj.imp())-><a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#d37cbc202c765be369b5108b6027cfd8">toStyleDecl</a>(); <a name="l00203"></a>00203 String str = args[0].toString(exec); <a name="l00204"></a>00204 <a class="code" href="classDOM_1_1DOMString.html">DOM::DOMString</a> s = str.value().string(); <a name="l00205"></a>00205 <a name="l00206"></a>00206 <span class="keywordflow">switch</span> (<span class="keywordtype">id</span>) { <a name="l00207"></a>00207 <span class="keywordflow">case</span> DOMCSSStyleDeclaration::GetPropertyValue: <a name="l00208"></a>00208 <span class="keywordflow">return</span> String(<a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#00be762f63277a24d90a74d6cfef17bb">styleDecl</a>.<a class="code" href="classDOM_1_1CSSStyleDeclaration.html#1f16461e35f5e09bcdb4e8e663e9ac2b">getPropertyValue</a>(s)); <a name="l00209"></a>00209 <span class="keywordflow">case</span> DOMCSSStyleDeclaration::GetPropertyCSSValue: <a name="l00210"></a>00210 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#4b8eeb2da30d4c10ad83a9889b271da5">getDOMCSSValue</a>(exec,<a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#00be762f63277a24d90a74d6cfef17bb">styleDecl</a>.<a class="code" href="classDOM_1_1CSSStyleDeclaration.html#53d48a8e44aac39c1694a029eebbf87c">getPropertyCSSValue</a>(s)); <a name="l00211"></a>00211 <span class="keywordflow">case</span> DOMCSSStyleDeclaration::RemoveProperty: <a name="l00212"></a>00212 <span class="keywordflow">return</span> String(<a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#00be762f63277a24d90a74d6cfef17bb">styleDecl</a>.<a class="code" href="classDOM_1_1CSSStyleDeclaration.html#d74c2aa3ab0a955b6f4a98c91cc891e8">removeProperty</a>(s)); <a name="l00213"></a>00213 <span class="keywordflow">case</span> DOMCSSStyleDeclaration::GetPropertyPriority: <a name="l00214"></a>00214 <span class="keywordflow">return</span> String(<a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#00be762f63277a24d90a74d6cfef17bb">styleDecl</a>.<a class="code" href="classDOM_1_1CSSStyleDeclaration.html#9d3ba5dbd4a808880eacc6ba4b6bb261">getPropertyPriority</a>(s)); <a name="l00215"></a>00215 <span class="keywordflow">case</span> DOMCSSStyleDeclaration::SetProperty: <a name="l00216"></a>00216 <a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#00be762f63277a24d90a74d6cfef17bb">styleDecl</a>.<a class="code" href="classDOM_1_1CSSStyleDeclaration.html#e7c97bd63c3a4e5853ba9afe4f2837b1">setProperty</a>(args[0].<a class="code" href="classKJS_1_1DOMObject.html#62c00ea4fde606fc8aeec77bab0d07b0">toString</a>(exec).string(), <a name="l00217"></a>00217 args[1].<a class="code" href="classKJS_1_1DOMObject.html#62c00ea4fde606fc8aeec77bab0d07b0">toString</a>(exec).string(), <a name="l00218"></a>00218 args[2].<a class="code" href="classKJS_1_1DOMObject.html#62c00ea4fde606fc8aeec77bab0d07b0">toString</a>(exec).string()); <a name="l00219"></a>00219 <span class="keywordflow">return</span> Undefined(); <a name="l00220"></a>00220 <span class="keywordflow">case</span> DOMCSSStyleDeclaration::Item: <a name="l00221"></a>00221 <span class="keywordflow">return</span> String(<a class="code" href="classKJS_1_1DOMCSSStyleDeclaration.html#00be762f63277a24d90a74d6cfef17bb">styleDecl</a>.<a class="code" href="classDOM_1_1CSSStyleDeclaration.html#0b82a4a9dc994e7519ff97b147898df1">item</a>(args[0].toInteger(exec))); <a name="l00222"></a>00222 <span class="keywordflow">default</span>: <a name="l00223"></a>00223 <span class="keywordflow">return</span> Undefined(); <a name="l00224"></a>00224 } <a name="l00225"></a>00225 } <a name="l00226"></a>00226 <a name="l00227"></a><a class="code" href="namespaceKJS.html#6b06a29edf02ed31e081f2d5f447e870">00227</a> Value <a class="code" href="namespaceKJS.html#6b06a29edf02ed31e081f2d5f447e870">KJS::getDOMCSSStyleDeclaration</a>(ExecState *exec, <span class="keyword">const</span> <a class="code" href="classDOM_1_1CSSStyleDeclaration.html">DOM::CSSStyleDeclaration</a>& s) <a name="l00228"></a>00228 { <a name="l00229"></a>00229 <span class="keywordflow">return</span> cacheDOMObject<DOM::CSSStyleDeclaration, KJS::DOMCSSStyleDeclaration>(exec, s); <a name="l00230"></a>00230 } <a name="l00231"></a>00231 <a name="l00232"></a>00232 <span class="comment">// -------------------------------------------------------------------------</span> <a name="l00233"></a>00233 <a name="l00234"></a>00234 <span class="keyword">const</span> ClassInfo DOMStyleSheet::info = { <span class="stringliteral">"StyleSheet"</span>, 0, &<a class="code" href="namespaceKJS.html#ffdcaf1ca969b8112e7051fba5ea918c">DOMStyleSheetTable</a>, 0 }; <a name="l00235"></a>00235 <span class="comment">/*</span> <a name="l00236"></a>00236 <span class="comment">@begin DOMStyleSheetTable 7</span> <a name="l00237"></a>00237 <span class="comment"> type DOMStyleSheet::Type DontDelete|ReadOnly</span> <a name="l00238"></a>00238 <span class="comment"> disabled DOMStyleSheet::Disabled DontDelete</span> <a name="l00239"></a>00239 <span class="comment"> ownerNode DOMStyleSheet::OwnerNode DontDelete|ReadOnly</span> <a name="l00240"></a>00240 <span class="comment"> parentStyleSheet DOMStyleSheet::ParentStyleSheet DontDelete|ReadOnly</span> <a name="l00241"></a>00241 <span class="comment"> href DOMStyleSheet::Href DontDelete|ReadOnly</span> <a name="l00242"></a>00242 <span class="comment"> title DOMStyleSheet::Title DontDelete|ReadOnly</span> <a name="l00243"></a>00243 <span class="comment"> media DOMStyleSheet::Media DontDelete|ReadOnly</span> <a name="l00244"></a>00244 <span class="comment">@end</span> <a name="l00245"></a>00245 <span class="comment">*/</span> <a name="l00246"></a>00246 <a name="l00247"></a><a class="code" href="classKJS_1_1DOMStyleSheet.html#3904f5bb8c6208a8762c1b04628a9a6f">00247</a> DOMStyleSheet::DOMStyleSheet(ExecState* exec, <span class="keyword">const</span> <a class="code" href="classDOM_1_1StyleSheet.html">DOM::StyleSheet</a>& ss) <a name="l00248"></a>00248 : <a class="code" href="classKJS_1_1DOMObject.html">DOMObject</a>(exec->interpreter()->builtinObjectPrototype()), styleSheet(ss) <a name="l00249"></a>00249 { <a name="l00250"></a>00250 } <a name="l00251"></a>00251 <a name="l00252"></a><a class="code" href="classKJS_1_1DOMStyleSheet.html#0bc4b6a83cfdd9f8e8ec131eb61f1fe4">00252</a> <a class="code" href="classKJS_1_1DOMStyleSheet.html#0bc4b6a83cfdd9f8e8ec131eb61f1fe4">DOMStyleSheet::~DOMStyleSheet</a>() <a name="l00253"></a>00253 { <a name="l00254"></a>00254 <a class="code" href="classKJS_1_1ScriptInterpreter.html#119bb67f3e96835ceebba110292ea63e">ScriptInterpreter::forgetDOMObject</a>(<a class="code" href="classKJS_1_1DOMStyleSheet.html#de62ac0f70aab933065122e19b6b43c9">styleSheet</a>.<a class="code" href="classDOM_1_1StyleSheet.html#322bd071e2eb21bdff33ef88ddad727f">handle</a>()); <a name="l00255"></a>00255 } <a name="l00256"></a>00256 <a name="l00257"></a><a class="code" href="classKJS_1_1DOMStyleSheet.html#a14a085a1319ce9d573c5ecbaf4c6560">00257</a> Value <a class="code" href="classKJS_1_1DOMStyleSheet.html#a14a085a1319ce9d573c5ecbaf4c6560">DOMStyleSheet::tryGet</a>(ExecState *exec, <span class="keyword">const</span> Identifier &propertyName)<span class="keyword"> const</span> <a name="l00258"></a>00258 <span class="keyword"></span>{ <a name="l00259"></a>00259 <span class="keywordflow">return</span> DOMObjectLookupGetValue<DOMStyleSheet,DOMObject>(exec,propertyName,&<a class="code" href="namespaceKJS.html#ffdcaf1ca969b8112e7051fba5ea918c">DOMStyleSheetTable</a>,<span class="keyword">this</span>); <a name="l00260"></a>00260 } <a name="l00261"></a>00261 <a name="l00262"></a><a class="code" href="classKJS_1_1DOMStyleSheet.html#d3929a1e1182040b83188d62f5f26247">00262</a> Value <a class="code" href="classKJS_1_1DOMStyleSheet.html#d3929a1e1182040b83188d62f5f26247">DOMStyleSheet::getValueProperty</a>(ExecState *exec, <span class="keywordtype">int</span> token)<span class="keyword"> const</span> <a name="l00263"></a>00263 <span class="keyword"></span>{ <a name="l00264"></a>00264 <span class="keywordflow">switch</span> (token) { <a name="l00265"></a>00265 <span class="keywordflow">case</span> Type: <a name="l00266"></a>00266 <span class="keywordflow">return</span> String(<a class="code" href="classKJS_1_1DOMStyleSheet.html#de62ac0f70aab933065122e19b6b43c9">styleSheet</a>.<a class="code" href="classDOM_1_1StyleSheet.html#93a4929a5491ca025f28e127562277ae">type</a>()); <a name="l00267"></a>00267 <span class="keywordflow">case</span> Disabled: <a name="l00268"></a>00268 <span class="keywordflow">return</span> Boolean(<a class="code" href="classKJS_1_1DOMStyleSheet.html#de62ac0f70aab933065122e19b6b43c9">styleSheet</a>.<a class="code" href="classDOM_1_1StyleSheet.html#fba264f75fb0cbbb7d8fa6e3e0e9c886">disabled</a>()); <a name="l00269"></a>00269 <span class="keywordflow">case</span> OwnerNode: <a name="l00270"></a>00270 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#54231f4fbfeb35ec709c9a16c8677691">getDOMNode</a>(exec,<a class="code" href="classKJS_1_1DOMStyleSheet.html#de62ac0f70aab933065122e19b6b43c9">styleSheet</a>.<a class="code" href="classDOM_1_1StyleSheet.html#071b761d22391aa802ef9edbf3b599e0">ownerNode</a>()); <a name="l00271"></a>00271 <span class="keywordflow">case</span> ParentStyleSheet: <a name="l00272"></a>00272 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#7814770d6f31d3b88eb14e5f7507aa8c">getDOMStyleSheet</a>(exec,<a class="code" href="classKJS_1_1DOMStyleSheet.html#de62ac0f70aab933065122e19b6b43c9">styleSheet</a>.<a class="code" href="classDOM_1_1StyleSheet.html#5bc00b40af820ee8a50438df8b4f0e30">parentStyleSheet</a>()); <a name="l00273"></a>00273 <span class="keywordflow">case</span> Href: <a name="l00274"></a>00274 <span class="keywordflow">return</span> String(<a class="code" href="classKJS_1_1DOMStyleSheet.html#de62ac0f70aab933065122e19b6b43c9">styleSheet</a>.<a class="code" href="classDOM_1_1StyleSheet.html#0887432f312bc3fa78b8c96352c19e6b">href</a>()); <a name="l00275"></a>00275 <span class="keywordflow">case</span> Title: <a name="l00276"></a>00276 <span class="keywordflow">return</span> String(<a class="code" href="classKJS_1_1DOMStyleSheet.html#de62ac0f70aab933065122e19b6b43c9">styleSheet</a>.<a class="code" href="classDOM_1_1StyleSheet.html#4237c4d3525d1379d592520cd7c072d3">title</a>()); <a name="l00277"></a>00277 <span class="keywordflow">case</span> Media: <a name="l00278"></a>00278 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#cef1ff558f096b23c01a6de223d8e321">getDOMMediaList</a>(exec, <a class="code" href="classKJS_1_1DOMStyleSheet.html#de62ac0f70aab933065122e19b6b43c9">styleSheet</a>.<a class="code" href="classDOM_1_1StyleSheet.html#194eae8c6237d791004f91b5f5bceee2">media</a>()); <a name="l00279"></a>00279 } <a name="l00280"></a>00280 <span class="keywordflow">return</span> Value(); <a name="l00281"></a>00281 } <a name="l00282"></a>00282 <a name="l00283"></a><a class="code" href="classKJS_1_1DOMStyleSheet.html#c72d96b1ebe48c5357e5f407f84dd460">00283</a> <span class="keywordtype">void</span> <a class="code" href="classKJS_1_1DOMStyleSheet.html#c72d96b1ebe48c5357e5f407f84dd460">DOMStyleSheet::tryPut</a>(ExecState *exec, <span class="keyword">const</span> Identifier &propertyName, <span class="keyword">const</span> Value& value, <span class="keywordtype">int</span> attr) <a name="l00284"></a>00284 { <a name="l00285"></a>00285 <span class="keywordflow">if</span> (propertyName == <span class="stringliteral">"disabled"</span>) { <a name="l00286"></a>00286 <a class="code" href="classKJS_1_1DOMStyleSheet.html#de62ac0f70aab933065122e19b6b43c9">styleSheet</a>.<a class="code" href="classDOM_1_1StyleSheet.html#709bf8d56696a9eadcf0198d34d9e7c5">setDisabled</a>(value.toBoolean(exec)); <a name="l00287"></a>00287 } <a name="l00288"></a>00288 <span class="keywordflow">else</span> <a name="l00289"></a>00289 <a class="code" href="classKJS_1_1DOMObject.html#afd01257502e1274d0a8cc777d76d78a">DOMObject::tryPut</a>(exec, propertyName, value, attr); <a name="l00290"></a>00290 } <a name="l00291"></a>00291 <a name="l00292"></a><a class="code" href="namespaceKJS.html#7814770d6f31d3b88eb14e5f7507aa8c">00292</a> Value <a class="code" href="namespaceKJS.html#7814770d6f31d3b88eb14e5f7507aa8c">KJS::getDOMStyleSheet</a>(ExecState *exec, <span class="keyword">const</span> <a class="code" href="classDOM_1_1StyleSheet.html">DOM::StyleSheet</a>& ss) <a name="l00293"></a>00293 { <a name="l00294"></a>00294 <a class="code" href="classKJS_1_1DOMObject.html">DOMObject</a> *ret; <a name="l00295"></a>00295 <span class="keywordflow">if</span> (ss.<a class="code" href="classDOM_1_1StyleSheet.html#a7ad5a70369ffcaf53dbe199eb866c53">isNull</a>()) <a name="l00296"></a>00296 <span class="keywordflow">return</span> Null(); <a name="l00297"></a>00297 <a class="code" href="classKJS_1_1ScriptInterpreter.html">ScriptInterpreter</a>* interp = static_cast<ScriptInterpreter *>(exec->interpreter()); <a name="l00298"></a>00298 <span class="keywordflow">if</span> ((ret = interp-><a class="code" href="classKJS_1_1ScriptInterpreter.html#c923dbc2cb9ee45538bd61f5a891c6d2">getDOMObject</a>(ss.<a class="code" href="classDOM_1_1StyleSheet.html#322bd071e2eb21bdff33ef88ddad727f">handle</a>()))) <a name="l00299"></a>00299 <span class="keywordflow">return</span> Value(ret); <a name="l00300"></a>00300 <span class="keywordflow">else</span> { <a name="l00301"></a>00301 <span class="keywordflow">if</span> (ss.<a class="code" href="classDOM_1_1StyleSheet.html#0cc35d6170af90bc103206f39a97db97">isCSSStyleSheet</a>()) { <a name="l00302"></a>00302 <a class="code" href="classDOM_1_1CSSStyleSheet.html">DOM::CSSStyleSheet</a> cs; <a name="l00303"></a>00303 cs = ss; <a name="l00304"></a>00304 ret = <span class="keyword">new</span> <a class="code" href="classKJS_1_1DOMCSSStyleSheet.html">DOMCSSStyleSheet</a>(exec,cs); <a name="l00305"></a>00305 } <a name="l00306"></a>00306 <span class="keywordflow">else</span> <a name="l00307"></a>00307 ret = <span class="keyword">new</span> <a class="code" href="classKJS_1_1DOMStyleSheet.html">DOMStyleSheet</a>(exec,ss); <a name="l00308"></a>00308 interp-><a class="code" href="classKJS_1_1ScriptInterpreter.html#ad6106e78ce92a8c366623407189e9f2">putDOMObject</a>(ss.<a class="code" href="classDOM_1_1StyleSheet.html#322bd071e2eb21bdff33ef88ddad727f">handle</a>(),ret); <a name="l00309"></a>00309 <span class="keywordflow">return</span> Value(ret); <a name="l00310"></a>00310 } <a name="l00311"></a>00311 } <a name="l00312"></a>00312 <a name="l00313"></a>00313 <span class="comment">// -------------------------------------------------------------------------</span> <a name="l00314"></a>00314 <a name="l00315"></a>00315 <span class="keyword">const</span> ClassInfo DOMStyleSheetList::info = { <span class="stringliteral">"StyleSheetList"</span>, 0, &<a class="code" href="namespaceKJS.html#1b29c6205fed8b4b3159aa6a9e3eac2e">DOMStyleSheetListTable</a>, 0 }; <a name="l00316"></a>00316 <a name="l00317"></a>00317 <span class="comment">/*</span> <a name="l00318"></a>00318 <span class="comment">@begin DOMStyleSheetListTable 2</span> <a name="l00319"></a>00319 <span class="comment"> length DOMStyleSheetList::Length DontDelete|ReadOnly</span> <a name="l00320"></a>00320 <span class="comment"> item DOMStyleSheetList::Item DontDelete|Function 1</span> <a name="l00321"></a>00321 <span class="comment">@end</span> <a name="l00322"></a>00322 <span class="comment">*/</span> <a name="l00323"></a>00323 IMPLEMENT_PROTOFUNC_DOM(DOMStyleSheetListFunc) <span class="comment">// not really a proto, but doesn't matter</span> <a name="l00324"></a>00324 <a name="l00325"></a>00325 <a class="code" href="classKJS_1_1DOMStyleSheetList.html">DOMStyleSheetList</a>::<a class="code" href="classKJS_1_1DOMStyleSheetList.html">DOMStyleSheetList</a>(ExecState *exec, const DOM::StyleSheetList& ssl, const DOM::Document& doc) <a name="l00326"></a>00326 : <a class="code" href="classKJS_1_1DOMObject.html">DOMObject</a>(exec->interpreter()->builtinObjectPrototype()), styleSheetList(ssl), m_doc(doc) <a name="l00327"></a>00327 { <a name="l00328"></a>00328 } <a name="l00329"></a>00329 <a name="l00330"></a><a class="code" href="classKJS_1_1DOMStyleSheetList.html#4f4315a88ce98a0c40fc8a96c6eafb5e">00330</a> DOMStyleSheetList::~DOMStyleSheetList() <a name="l00331"></a>00331 { <a name="l00332"></a>00332 <a class="code" href="classKJS_1_1ScriptInterpreter.html#119bb67f3e96835ceebba110292ea63e">ScriptInterpreter::forgetDOMObject</a>(styleSheetList.<a class="code" href="classDOM_1_1StyleSheetList.html#d408f04da1af81cbcad28834461d3a16">handle</a>()); <a name="l00333"></a>00333 } <a name="l00334"></a>00334 <a name="l00335"></a><a class="code" href="classKJS_1_1DOMStyleSheetList.html#2e30b1a7356bd613cee854aeec477f36">00335</a> Value <a class="code" href="classKJS_1_1DOMStyleSheetList.html#2e30b1a7356bd613cee854aeec477f36">DOMStyleSheetList::tryGet</a>(ExecState *exec, <span class="keyword">const</span> Identifier &p)<span class="keyword"> const</span> <a name="l00336"></a>00336 <span class="keyword"></span>{ <a name="l00337"></a>00337 <span class="preprocessor">#ifdef KJS_VERBOSE</span> <a name="l00338"></a>00338 <span class="preprocessor"></span> <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ggfbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(6070) << <span class="stringliteral">"DOMStyleSheetList::tryGet "</span> << p.qstring() << <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gg313d520ed8f8f6b46eeef22cfb3b082a">endl</a>; <a name="l00339"></a>00339 <span class="preprocessor">#endif</span> <a name="l00340"></a>00340 <span class="preprocessor"></span> <span class="keywordflow">if</span> (p == lengthPropertyName) <a name="l00341"></a>00341 <span class="keywordflow">return</span> Number(styleSheetList.<a class="code" href="classDOM_1_1StyleSheetList.html#fa6b1fb36939e69654bfabf48e27e8fc">length</a>()); <a name="l00342"></a>00342 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (p == <span class="stringliteral">"item"</span>) <a name="l00343"></a>00343 <span class="keywordflow">return</span> lookupOrCreateFunction<DOMStyleSheetListFunc>(exec,p,<span class="keyword">this</span>,DOMStyleSheetList::Item,1,DontDelete|Function); <a name="l00344"></a>00344 <a name="l00345"></a>00345 <span class="comment">// Retrieve stylesheet by index</span> <a name="l00346"></a>00346 <span class="keywordtype">bool</span> ok; <a name="l00347"></a>00347 <span class="keywordtype">long</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> u = p.toULong(&ok); <a name="l00348"></a>00348 <span class="keywordflow">if</span> (ok) <a name="l00349"></a>00349 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#7814770d6f31d3b88eb14e5f7507aa8c">getDOMStyleSheet</a>(exec, <a class="code" href="classDOM_1_1StyleSheetList.html">DOM::StyleSheetList</a>(styleSheetList).item(u)); <a name="l00350"></a>00350 <a name="l00351"></a>00351 <span class="comment">// IE also supports retrieving a stylesheet by name, using the name/id of the <style> tag</span> <a name="l00352"></a>00352 <span class="comment">// (this is consistent with all the other collections)</span> <a name="l00353"></a>00353 <span class="preprocessor">#if 0</span> <a name="l00354"></a>00354 <span class="preprocessor"></span> <span class="comment">// Bad implementation because DOM::StyleSheet doesn't inherit DOM::Node</span> <a name="l00355"></a>00355 <span class="comment">// so we can't use DOMNamedNodesCollection.....</span> <a name="l00356"></a>00356 <span class="comment">// We could duplicate it for stylesheets though - worth it ?</span> <a name="l00357"></a>00357 <span class="comment">// Other problem of this implementation: it doesn't look for the ID attribute!</span> <a name="l00358"></a>00358 DOM::NameNodeListImpl namedList( m_doc.<a class="code" href="classDOM_1_1Document.html#90edac0d950774985af60bdc2460e303">documentElement</a>().handle(), p.string() ); <a name="l00359"></a>00359 <span class="keywordtype">int</span> len = namedList.length(); <a name="l00360"></a>00360 <span class="keywordflow">if</span> ( len ) { <a name="l00361"></a>00361 <a class="codeRef" doxygen="qt.tag:" href="qvaluelist.html">QValueList<DOM::Node></a> styleSheets; <a name="l00362"></a>00362 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i = 0 ; i < len ; ++i ) { <a name="l00363"></a>00363 <a class="code" href="classDOM_1_1HTMLStyleElement.html">DOM::HTMLStyleElement</a> elem = <a class="code" href="classDOM_1_1Node.html">DOM::Node</a>(namedList.item(i)); <a name="l00364"></a>00364 <span class="keywordflow">if</span> (!elem.isNull()) <a name="l00365"></a>00365 styleSheets.<a class="codeRef" doxygen="qt.tag:" href="qvaluelist.html#append">append</a>(elem.sheet()); <a name="l00366"></a>00366 } <a name="l00367"></a>00367 <span class="keywordflow">if</span> ( styleSheets.<a class="codeRef" doxygen="qt.tag:" href="qvaluelist.html#count">count</a>() == 1 ) <span class="comment">// single result</span> <a name="l00368"></a>00368 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#7814770d6f31d3b88eb14e5f7507aa8c">getDOMStyleSheet</a>(exec, styleSheets[0]); <a name="l00369"></a>00369 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( styleSheets.<a class="codeRef" doxygen="qt.tag:" href="qvaluelist.html#count">count</a>() > 1 ) { <a name="l00370"></a>00370 <span class="keywordflow">return</span> <span class="keyword">new</span> DOMNamedItemsCollection(exec,styleSheets); <a name="l00371"></a>00371 } <a name="l00372"></a>00372 } <a name="l00373"></a>00373 <span class="preprocessor">#endif</span> <a name="l00374"></a>00374 <span class="preprocessor"></span> <span class="comment">// ### Bad implementation because returns a single element (are IDs always unique?)</span> <a name="l00375"></a>00375 <span class="comment">// and doesn't look for name attribute (see implementation above).</span> <a name="l00376"></a>00376 <span class="comment">// But unicity of stylesheet ids is good practice anyway ;)</span> <a name="l00377"></a>00377 <a class="code" href="classDOM_1_1DOMString.html">DOM::DOMString</a> pstr = p.string(); <a name="l00378"></a>00378 <a class="code" href="classDOM_1_1HTMLStyleElement.html">DOM::HTMLStyleElement</a> styleElem = m_doc.<a class="code" href="classDOM_1_1Document.html#4afc928f8001ee3498143d7055184226">getElementById</a>( pstr ); <a name="l00379"></a>00379 <span class="keywordflow">if</span> (!styleElem.<a class="code" href="classDOM_1_1Node.html#fbf817c4885b063f6672c20c6ec5cb2e">isNull</a>()) <a name="l00380"></a>00380 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#7814770d6f31d3b88eb14e5f7507aa8c">getDOMStyleSheet</a>(exec, styleElem.<a class="code" href="classDOM_1_1HTMLStyleElement.html#dd3e43d66a0011dfa6e029be21432581">sheet</a>()); <a name="l00381"></a>00381 <a name="l00382"></a>00382 <span class="keywordflow">return</span> <a class="code" href="classKJS_1_1DOMObject.html#da5fedf6964ef230b0bf7135cf58bdee">DOMObject::tryGet</a>(exec, p); <a name="l00383"></a>00383 } <a name="l00384"></a>00384 <a name="l00385"></a><a class="code" href="classKJS_1_1DOMStyleSheetList.html#7bb217dc30653d3b8413062cb2e93869">00385</a> Value <a class="code" href="classKJS_1_1DOMStyleSheetList.html#7bb217dc30653d3b8413062cb2e93869">KJS::DOMStyleSheetList::call</a>(ExecState *exec, Object &thisObj, <span class="keyword">const</span> List &args) <a name="l00386"></a>00386 { <a name="l00387"></a>00387 <span class="comment">// This code duplication is necessary, DOMStyleSheetList isn't a DOMFunction</span> <a name="l00388"></a>00388 Value val; <a name="l00389"></a>00389 <span class="keywordflow">try</span> { <a name="l00390"></a>00390 val = <a class="code" href="classKJS_1_1DOMStyleSheetList.html#bd561ffa9a9b17bdf0d50ccadf4a8733">tryCall</a>(exec, thisObj, args); <a name="l00391"></a>00391 } <a name="l00392"></a>00392 <span class="comment">// pity there's no way to distinguish between these in JS code</span> <a name="l00393"></a>00393 <span class="keywordflow">catch</span> (...) { <a name="l00394"></a>00394 Object err = Error::create(exec, GeneralError, <span class="stringliteral">"Exception from DOMStyleSheetList"</span>); <a name="l00395"></a>00395 exec->setException(err); <a name="l00396"></a>00396 } <a name="l00397"></a>00397 <span class="keywordflow">return</span> val; <a name="l00398"></a>00398 } <a name="l00399"></a>00399 <a name="l00400"></a><a class="code" href="classKJS_1_1DOMStyleSheetList.html#bd561ffa9a9b17bdf0d50ccadf4a8733">00400</a> Value <a class="code" href="classKJS_1_1DOMStyleSheetList.html#bd561ffa9a9b17bdf0d50ccadf4a8733">DOMStyleSheetList::tryCall</a>(ExecState *exec, Object & <span class="comment">/*thisObj*/</span>, <span class="keyword">const</span> List &args) <a name="l00401"></a>00401 { <a name="l00402"></a>00402 <span class="keywordflow">if</span> (args.size() == 1) { <a name="l00403"></a>00403 <span class="comment">// support for styleSheets(<index>) and styleSheets(<name>)</span> <a name="l00404"></a>00404 <span class="keywordflow">return</span> <a class="code" href="classKJS_1_1DOMStyleSheetList.html#2e30b1a7356bd613cee854aeec477f36">tryGet</a>( exec, Identifier(args[0].<a class="code" href="classKJS_1_1DOMObject.html#62c00ea4fde606fc8aeec77bab0d07b0">toString</a>(exec)) ); <a name="l00405"></a>00405 } <a name="l00406"></a>00406 <span class="keywordflow">return</span> Undefined(); <a name="l00407"></a>00407 } <a name="l00408"></a>00408 <a name="l00409"></a><a class="code" href="namespaceKJS.html#a50d893c49b8409d4cc8dfdda9c00af1">00409</a> Value <a class="code" href="namespaceKJS.html#a50d893c49b8409d4cc8dfdda9c00af1">KJS::getDOMStyleSheetList</a>(ExecState *exec, <span class="keyword">const</span> <a class="code" href="classDOM_1_1StyleSheetList.html">DOM::StyleSheetList</a>& ssl, <span class="keyword">const</span> <a class="code" href="classDOM_1_1Document.html">DOM::Document</a>& doc) <a name="l00410"></a>00410 { <a name="l00411"></a>00411 <span class="comment">// Can't use the cacheDOMObject macro because of the doc argument</span> <a name="l00412"></a>00412 <a class="code" href="classKJS_1_1DOMObject.html">DOMObject</a> *ret; <a name="l00413"></a>00413 <span class="keywordflow">if</span> (ssl.<a class="code" href="classDOM_1_1StyleSheetList.html#3169e11874195f2d64c9da97c9efe1df">isNull</a>()) <a name="l00414"></a>00414 <span class="keywordflow">return</span> Null(); <a name="l00415"></a>00415 <a class="code" href="classKJS_1_1ScriptInterpreter.html">ScriptInterpreter</a>* interp = static_cast<ScriptInterpreter *>(exec->interpreter()); <a name="l00416"></a>00416 <span class="keywordflow">if</span> ((ret = interp-><a class="code" href="classKJS_1_1ScriptInterpreter.html#c923dbc2cb9ee45538bd61f5a891c6d2">getDOMObject</a>(ssl.<a class="code" href="classDOM_1_1StyleSheetList.html#d408f04da1af81cbcad28834461d3a16">handle</a>()))) <a name="l00417"></a>00417 <span class="keywordflow">return</span> Value(ret); <a name="l00418"></a>00418 <span class="keywordflow">else</span> { <a name="l00419"></a>00419 ret = <span class="keyword">new</span> <a class="code" href="classKJS_1_1DOMStyleSheetList.html">DOMStyleSheetList</a>(exec, ssl, doc); <a name="l00420"></a>00420 interp-><a class="code" href="classKJS_1_1ScriptInterpreter.html#ad6106e78ce92a8c366623407189e9f2">putDOMObject</a>(ssl.<a class="code" href="classDOM_1_1StyleSheetList.html#d408f04da1af81cbcad28834461d3a16">handle</a>(),ret); <a name="l00421"></a>00421 <span class="keywordflow">return</span> Value(ret); <a name="l00422"></a>00422 } <a name="l00423"></a>00423 } <a name="l00424"></a>00424 <a name="l00425"></a>00425 Value DOMStyleSheetListFunc::tryCall(ExecState *exec, Object &thisObj, <span class="keyword">const</span> List &args) <a name="l00426"></a>00426 { <a name="l00427"></a>00427 KJS_CHECK_THIS( <a class="code" href="classKJS_1_1DOMStyleSheetList.html">KJS::DOMStyleSheetList</a>, thisObj ); <a name="l00428"></a>00428 <a class="code" href="classDOM_1_1StyleSheetList.html">DOM::StyleSheetList</a> styleSheetList = static_cast<DOMStyleSheetList *>(thisObj.imp())->toStyleSheetList(); <a name="l00429"></a>00429 <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == DOMStyleSheetList::Item) <a name="l00430"></a>00430 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#7814770d6f31d3b88eb14e5f7507aa8c">getDOMStyleSheet</a>(exec, styleSheetList.<a class="code" href="classDOM_1_1StyleSheetList.html#fc04fd9bd186e304011c9299251aca6d">item</a>(args[0].toInteger(exec))); <a name="l00431"></a>00431 <span class="keywordflow">return</span> Undefined(); <a name="l00432"></a>00432 } <a name="l00433"></a>00433 <a name="l00434"></a>00434 <span class="comment">// -------------------------------------------------------------------------</span> <a name="l00435"></a>00435 <a name="l00436"></a>00436 <span class="keyword">const</span> ClassInfo DOMMediaList::info = { <span class="stringliteral">"MediaList"</span>, 0, &<a class="code" href="namespaceKJS.html#da599dfb2ff07a2dabadd1e2121eaae8">DOMMediaListTable</a>, 0 }; <a name="l00437"></a>00437 <a name="l00438"></a>00438 <span class="comment">/*</span> <a name="l00439"></a>00439 <span class="comment">@begin DOMMediaListTable 2</span> <a name="l00440"></a>00440 <span class="comment"> mediaText DOMMediaList::MediaText DontDelete|ReadOnly</span> <a name="l00441"></a>00441 <span class="comment"> length DOMMediaList::Length DontDelete|ReadOnly</span> <a name="l00442"></a>00442 <span class="comment">@end</span> <a name="l00443"></a>00443 <span class="comment">@begin DOMMediaListProtoTable 3</span> <a name="l00444"></a>00444 <span class="comment"> item DOMMediaList::Item DontDelete|Function 1</span> <a name="l00445"></a>00445 <span class="comment"> deleteMedium DOMMediaList::DeleteMedium DontDelete|Function 1</span> <a name="l00446"></a>00446 <span class="comment"> appendMedium DOMMediaList::AppendMedium DontDelete|Function 1</span> <a name="l00447"></a>00447 <span class="comment">@end</span> <a name="l00448"></a>00448 <span class="comment">*/</span> <a name="l00449"></a>00449 DEFINE_PROTOTYPE(<span class="stringliteral">"DOMMediaList"</span>, DOMMediaListProto) <a name="l00450"></a>00450 IMPLEMENT_PROTOFUNC_DOM(DOMMediaListProtoFunc) <a name="l00451"></a>00451 IMPLEMENT_PROTOTYPE(DOMMediaListProto, DOMMediaListProtoFunc) <a name="l00452"></a>00452 <a name="l00453"></a><a class="code" href="classKJS_1_1DOMMediaList.html#7406142cca82f4ddb720853c2b28b2ea">00453</a> <a class="code" href="classKJS_1_1DOMMediaList.html">DOMMediaList</a>::<a class="code" href="classKJS_1_1DOMMediaList.html">DOMMediaList</a>(ExecState *exec, const DOM::MediaList& ml) <a name="l00454"></a>00454 : <a class="code" href="classKJS_1_1DOMObject.html">DOMObject</a>(DOMMediaListProto::self(exec)), mediaList(ml) { } <a name="l00455"></a>00455 <a name="l00456"></a><a class="code" href="classKJS_1_1DOMMediaList.html#4aa36fefa6bd91af2935c68d501813d9">00456</a> DOMMediaList::~DOMMediaList() <a name="l00457"></a>00457 { <a name="l00458"></a>00458 <a class="code" href="classKJS_1_1ScriptInterpreter.html#119bb67f3e96835ceebba110292ea63e">ScriptInterpreter::forgetDOMObject</a>(mediaList.<a class="code" href="classDOM_1_1MediaList.html#59157e54dad64f6416e4eaa6d7e76cef">handle</a>()); <a name="l00459"></a>00459 } <a name="l00460"></a>00460 <a name="l00461"></a><a class="code" href="classKJS_1_1DOMMediaList.html#fa31490989c979020a8d462c2c028bb0">00461</a> Value <a class="code" href="classKJS_1_1DOMMediaList.html#fa31490989c979020a8d462c2c028bb0">DOMMediaList::tryGet</a>(ExecState *exec, <span class="keyword">const</span> Identifier &p)<span class="keyword"> const</span> <a name="l00462"></a>00462 <span class="keyword"></span>{ <a name="l00463"></a>00463 <span class="keywordflow">if</span> (p == <span class="stringliteral">"mediaText"</span>) <a name="l00464"></a>00464 <span class="keywordflow">return</span> String(mediaList.<a class="code" href="classDOM_1_1MediaList.html#ccc8501fd76b10f3e5d7813feeaf3c88">mediaText</a>()); <a name="l00465"></a>00465 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (p == lengthPropertyName) <a name="l00466"></a>00466 <span class="keywordflow">return</span> Number(mediaList.<a class="code" href="classDOM_1_1MediaList.html#830c864b6b9d5def8c62f1b1244e3d42">length</a>()); <a name="l00467"></a>00467 <a name="l00468"></a>00468 <span class="keywordtype">bool</span> ok; <a name="l00469"></a>00469 <span class="keywordtype">long</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> u = p.toULong(&ok); <a name="l00470"></a>00470 <span class="keywordflow">if</span> (ok) <a name="l00471"></a>00471 <span class="keywordflow">return</span> String(mediaList.<a class="code" href="classDOM_1_1MediaList.html#dc19de39d195fadf219dc9d576a11552">item</a>(u)); <a name="l00472"></a>00472 <a name="l00473"></a>00473 <span class="keywordflow">return</span> <a class="code" href="classKJS_1_1DOMObject.html#da5fedf6964ef230b0bf7135cf58bdee">DOMObject::tryGet</a>(exec, p); <a name="l00474"></a>00474 } <a name="l00475"></a>00475 <a name="l00476"></a><a class="code" href="classKJS_1_1DOMMediaList.html#65f0a0733efe7730a26b815db11b43c9">00476</a> <span class="keywordtype">void</span> <a class="code" href="classKJS_1_1DOMMediaList.html#65f0a0733efe7730a26b815db11b43c9">DOMMediaList::tryPut</a>(ExecState *exec, <span class="keyword">const</span> Identifier &propertyName, <span class="keyword">const</span> Value& value, <span class="keywordtype">int</span> attr) <a name="l00477"></a>00477 { <a name="l00478"></a>00478 <span class="keywordflow">if</span> (propertyName == <span class="stringliteral">"mediaText"</span>) <a name="l00479"></a>00479 mediaList.<a class="code" href="classDOM_1_1MediaList.html#263f44ff32c9e1e125bdf0852bdbbdce">setMediaText</a>(value.toString(exec).string()); <a name="l00480"></a>00480 <span class="keywordflow">else</span> <a name="l00481"></a>00481 <a class="code" href="classKJS_1_1DOMObject.html#afd01257502e1274d0a8cc777d76d78a">DOMObject::tryPut</a>(exec, propertyName, value, attr); <a name="l00482"></a>00482 } <a name="l00483"></a>00483 <a name="l00484"></a><a class="code" href="namespaceKJS.html#cef1ff558f096b23c01a6de223d8e321">00484</a> Value <a class="code" href="namespaceKJS.html#cef1ff558f096b23c01a6de223d8e321">KJS::getDOMMediaList</a>(ExecState *exec, <span class="keyword">const</span> <a class="code" href="classDOM_1_1MediaList.html">DOM::MediaList</a>& ml) <a name="l00485"></a>00485 { <a name="l00486"></a>00486 <span class="keywordflow">return</span> cacheDOMObject<DOM::MediaList, KJS::DOMMediaList>(exec, ml); <a name="l00487"></a>00487 } <a name="l00488"></a>00488 <a name="l00489"></a>00489 Value KJS::DOMMediaListProtoFunc::tryCall(ExecState *exec, Object &thisObj, <span class="keyword">const</span> List &args) <a name="l00490"></a>00490 { <a name="l00491"></a>00491 KJS_CHECK_THIS( <a class="code" href="classKJS_1_1DOMMediaList.html">KJS::DOMMediaList</a>, thisObj ); <a name="l00492"></a>00492 <a class="code" href="classDOM_1_1MediaList.html">DOM::MediaList</a> mediaList = static_cast<DOMMediaList *>(thisObj.imp())->toMediaList(); <a name="l00493"></a>00493 <span class="keywordflow">switch</span> (<span class="keywordtype">id</span>) { <a name="l00494"></a>00494 <span class="keywordflow">case</span> DOMMediaList::Item: <a name="l00495"></a>00495 <span class="keywordflow">return</span> String(mediaList.<a class="code" href="classDOM_1_1MediaList.html#dc19de39d195fadf219dc9d576a11552">item</a>(args[0].toInteger(exec))); <a name="l00496"></a>00496 <span class="keywordflow">case</span> DOMMediaList::DeleteMedium: <a name="l00497"></a>00497 mediaList.<a class="code" href="classDOM_1_1MediaList.html#de0bbfddd581314c32e3fddb9f523229">deleteMedium</a>(args[0].toString(exec).string()); <a name="l00498"></a>00498 <span class="keywordflow">return</span> Undefined(); <a name="l00499"></a>00499 <span class="keywordflow">case</span> DOMMediaList::AppendMedium: <a name="l00500"></a>00500 mediaList.<a class="code" href="classDOM_1_1MediaList.html#d20395d91c0b6dfb260488a156284add">appendMedium</a>(args[0].toString(exec).string()); <a name="l00501"></a>00501 <span class="keywordflow">return</span> Undefined(); <a name="l00502"></a>00502 <span class="keywordflow">default</span>: <a name="l00503"></a>00503 <span class="keywordflow">return</span> Undefined(); <a name="l00504"></a>00504 } <a name="l00505"></a>00505 } <a name="l00506"></a>00506 <a name="l00507"></a>00507 <span class="comment">// -------------------------------------------------------------------------</span> <a name="l00508"></a>00508 <a name="l00509"></a>00509 <span class="keyword">const</span> ClassInfo DOMCSSStyleSheet::info = { <span class="stringliteral">"CSSStyleSheet"</span>, 0, &<a class="code" href="namespaceKJS.html#09497672fe5d85028db504008bef7849">DOMCSSStyleSheetTable</a>, 0 }; <a name="l00510"></a>00510 <a name="l00511"></a>00511 <span class="comment">/*</span> <a name="l00512"></a>00512 <span class="comment">@begin DOMCSSStyleSheetTable 2</span> <a name="l00513"></a>00513 <span class="comment"> ownerRule DOMCSSStyleSheet::OwnerRule DontDelete|ReadOnly</span> <a name="l00514"></a>00514 <span class="comment"> cssRules DOMCSSStyleSheet::CssRules DontDelete|ReadOnly</span> <a name="l00515"></a>00515 <span class="comment"># MSIE extension</span> <a name="l00516"></a>00516 <span class="comment"> rules DOMCSSStyleSheet::Rules DontDelete|ReadOnly</span> <a name="l00517"></a>00517 <span class="comment">@end</span> <a name="l00518"></a>00518 <span class="comment">@begin DOMCSSStyleSheetProtoTable 2</span> <a name="l00519"></a>00519 <span class="comment"> insertRule DOMCSSStyleSheet::InsertRule DontDelete|Function 2</span> <a name="l00520"></a>00520 <span class="comment"> deleteRule DOMCSSStyleSheet::DeleteRule DontDelete|Function 1</span> <a name="l00521"></a>00521 <span class="comment"># IE extensions</span> <a name="l00522"></a>00522 <span class="comment"> addRule DOMCSSStyleSheet::AddRule DontDelete|Function 3</span> <a name="l00523"></a>00523 <span class="comment"> removeRule DOMCSSStyleSheet::RemoveRule DontDelete|Function 1</span> <a name="l00524"></a>00524 <span class="comment">@end</span> <a name="l00525"></a>00525 <span class="comment">*/</span> <a name="l00526"></a>00526 DEFINE_PROTOTYPE(<span class="stringliteral">"DOMCSSStyleSheet"</span>,DOMCSSStyleSheetProto) <a name="l00527"></a>00527 IMPLEMENT_PROTOFUNC_DOM(DOMCSSStyleSheetProtoFunc) <a name="l00528"></a>00528 IMPLEMENT_PROTOTYPE(DOMCSSStyleSheetProto,DOMCSSStyleSheetProtoFunc) <span class="comment">// warning, use _WITH_PARENT if DOMStyleSheet gets a proto</span> <a name="l00529"></a>00529 <a name="l00530"></a>00530 <a class="code" href="classKJS_1_1DOMCSSStyleSheet.html">DOMCSSStyleSheet</a>::<a class="code" href="classKJS_1_1DOMCSSStyleSheet.html">DOMCSSStyleSheet</a>(ExecState *exec, const DOM::CSSStyleSheet& ss) <a name="l00531"></a>00531 : <a class="code" href="classKJS_1_1DOMStyleSheet.html">DOMStyleSheet</a>(DOMCSSStyleSheetProto::self(exec),ss) { } <a name="l00532"></a>00532 <a name="l00533"></a><a class="code" href="classKJS_1_1DOMCSSStyleSheet.html#cb133c6f080f0238bab15b03de014ce3">00533</a> DOMCSSStyleSheet::~DOMCSSStyleSheet() <a name="l00534"></a>00534 { <a name="l00535"></a>00535 } <a name="l00536"></a>00536 <a name="l00537"></a><a class="code" href="classKJS_1_1DOMCSSStyleSheet.html#10ae1f6a56dd29a653783567674db596">00537</a> Value <a class="code" href="classKJS_1_1DOMCSSStyleSheet.html#10ae1f6a56dd29a653783567674db596">DOMCSSStyleSheet::tryGet</a>(ExecState *exec, <span class="keyword">const</span> Identifier &p)<span class="keyword"> const</span> <a name="l00538"></a>00538 <span class="keyword"></span>{ <a name="l00539"></a>00539 <a class="code" href="classDOM_1_1CSSStyleSheet.html">DOM::CSSStyleSheet</a> cssStyleSheet = static_cast<DOM::CSSStyleSheet>(<a class="code" href="classKJS_1_1DOMStyleSheet.html#de62ac0f70aab933065122e19b6b43c9">styleSheet</a>); <a name="l00540"></a>00540 <span class="keywordflow">if</span> (p == <span class="stringliteral">"ownerRule"</span>) <a name="l00541"></a>00541 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#8cc35edfd65958e66782c93ef21d92be">getDOMCSSRule</a>(exec,cssStyleSheet.<a class="code" href="classDOM_1_1CSSStyleSheet.html#771cae10416bba9a81518b4d63c02b4d">ownerRule</a>()); <a name="l00542"></a>00542 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (p == <span class="stringliteral">"cssRules"</span> || p == <span class="stringliteral">"rules"</span> <span class="comment">/* MSIE extension */</span>) <a name="l00543"></a>00543 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#5bd57c5ab230f682efd5da06a6261c16">getDOMCSSRuleList</a>(exec,cssStyleSheet.<a class="code" href="classDOM_1_1CSSStyleSheet.html#62f24f286d1c3406da632f816f9b8b10">cssRules</a>()); <a name="l00544"></a>00544 <span class="keywordflow">return</span> <a class="code" href="classKJS_1_1DOMStyleSheet.html#a14a085a1319ce9d573c5ecbaf4c6560">DOMStyleSheet::tryGet</a>(exec,p); <a name="l00545"></a>00545 } <a name="l00546"></a>00546 <a name="l00547"></a>00547 Value DOMCSSStyleSheetProtoFunc::tryCall(ExecState *exec, Object &thisObj, <span class="keyword">const</span> List &args) <a name="l00548"></a>00548 { <a name="l00549"></a>00549 KJS_CHECK_THIS( <a class="code" href="classKJS_1_1DOMCSSStyleSheet.html">KJS::DOMCSSStyleSheet</a>, thisObj ); <a name="l00550"></a>00550 <a class="code" href="classDOM_1_1CSSStyleSheet.html">DOM::CSSStyleSheet</a> <a class="code" href="classKJS_1_1DOMStyleSheet.html#de62ac0f70aab933065122e19b6b43c9">styleSheet</a> = static_cast<DOMCSSStyleSheet *>(thisObj.imp())-><a class="code" href="classKJS_1_1DOMCSSStyleSheet.html#fc086f633bab8ccf8b14818f15189c0d">toCSSStyleSheet</a>(); <a name="l00551"></a>00551 <a name="l00552"></a>00552 <span class="keywordflow">switch</span> (<span class="keywordtype">id</span>) { <a name="l00553"></a>00553 <span class="keywordflow">case</span> DOMCSSStyleSheet::InsertRule: <a name="l00554"></a>00554 <span class="keywordflow">return</span> Number(<a class="code" href="classKJS_1_1DOMStyleSheet.html#de62ac0f70aab933065122e19b6b43c9">styleSheet</a>.insertRule(args[0].toString(exec).string(),(<span class="keywordtype">long</span> <span class="keywordtype">unsigned</span> int)args[1].toInteger(exec))); <a name="l00555"></a>00555 <span class="keywordflow">case</span> DOMCSSStyleSheet::DeleteRule: <a name="l00556"></a>00556 <a class="code" href="classKJS_1_1DOMStyleSheet.html#de62ac0f70aab933065122e19b6b43c9">styleSheet</a>.deleteRule(args[0].toInteger(exec)); <a name="l00557"></a>00557 <span class="keywordflow">return</span> Undefined(); <a name="l00558"></a>00558 <span class="comment">// IE extensions</span> <a name="l00559"></a>00559 <span class="keywordflow">case</span> DOMCSSStyleSheet::AddRule: { <a name="l00560"></a>00560 <span class="comment">//Unpassed/-1 means append. Since insertRule is picky (throws exceptions)</span> <a name="l00561"></a>00561 <span class="comment">//we adjust it to the desired length</span> <a name="l00562"></a>00562 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> index = args[2].toInteger(exec); <a name="l00563"></a>00563 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> length = <a class="code" href="classKJS_1_1DOMStyleSheet.html#de62ac0f70aab933065122e19b6b43c9">styleSheet</a>.cssRules().length(); <a name="l00564"></a>00564 <span class="keywordflow">if</span> (args[2].type() == UndefinedType) index = length; <a name="l00565"></a>00565 <span class="keywordflow">if</span> (index > length) index = length; <a name="l00566"></a>00566 <a class="code" href="classDOM_1_1DOMString.html">DOM::DOMString</a> str = args[0].toString(exec).string() + <span class="stringliteral">" { "</span> + args[1].toString(exec).string() + <span class="stringliteral">" } "</span>; <a name="l00567"></a>00567 <span class="keywordflow">return</span> Number(<a class="code" href="classKJS_1_1DOMStyleSheet.html#de62ac0f70aab933065122e19b6b43c9">styleSheet</a>.insertRule(str,index)); <a name="l00568"></a>00568 } <a name="l00569"></a>00569 <span class="keywordflow">case</span> DOMCSSStyleSheet::RemoveRule: { <a name="l00570"></a>00570 <span class="keywordtype">int</span> index = args.size() > 0 ? args[0].toInteger(exec) : 0 <span class="comment">/*first one*/</span>; <a name="l00571"></a>00571 <a class="code" href="classKJS_1_1DOMStyleSheet.html#de62ac0f70aab933065122e19b6b43c9">styleSheet</a>.deleteRule(index); <a name="l00572"></a>00572 <span class="keywordflow">return</span> Undefined(); <a name="l00573"></a>00573 } <a name="l00574"></a>00574 <span class="keywordflow">default</span>: <a name="l00575"></a>00575 <span class="keywordflow">return</span> Undefined(); <a name="l00576"></a>00576 } <a name="l00577"></a>00577 } <a name="l00578"></a>00578 <a name="l00579"></a>00579 <span class="comment">// -------------------------------------------------------------------------</span> <a name="l00580"></a>00580 <a name="l00581"></a>00581 <span class="keyword">const</span> ClassInfo <a class="code" href="classKJS_1_1DOMCSSRuleList.html#85b18e78ee02411a209df190a014296d">DOMCSSRuleList::info</a> = { <span class="stringliteral">"CSSRuleList"</span>, 0, &<a class="code" href="namespaceKJS.html#5efc56d82a1ac790e2ff72b9a08fb023">DOMCSSRuleListTable</a>, 0 }; <a name="l00582"></a>00582 <span class="comment">/*</span> <a name="l00583"></a>00583 <span class="comment">@begin DOMCSSRuleListTable 3</span> <a name="l00584"></a>00584 <span class="comment"> length DOMCSSRuleList::Length DontDelete|ReadOnly</span> <a name="l00585"></a>00585 <span class="comment"> item DOMCSSRuleList::Item DontDelete|Function 1</span> <a name="l00586"></a>00586 <span class="comment">@end</span> <a name="l00587"></a>00587 <span class="comment">*/</span> <a name="l00588"></a>00588 IMPLEMENT_PROTOFUNC_DOM(DOMCSSRuleListFunc) <span class="comment">// not really a proto, but doesn't matter</span> <a name="l00589"></a>00589 <a name="l00590"></a>00590 <a class="code" href="classKJS_1_1DOMCSSRuleList.html">DOMCSSRuleList</a>::<a class="code" href="classKJS_1_1DOMCSSRuleList.html">DOMCSSRuleList</a>(ExecState* exec, const DOM::CSSRuleList& rl) <a name="l00591"></a>00591 : <a class="code" href="classKJS_1_1DOMObject.html">DOMObject</a>(exec->interpreter()->builtinObjectPrototype()), cssRuleList(rl) <a name="l00592"></a>00592 { <a name="l00593"></a>00593 } <a name="l00594"></a>00594 <a name="l00595"></a><a class="code" href="classKJS_1_1DOMCSSRuleList.html#bb3027133b1a2be2e2f309a0a9006efb">00595</a> <a class="code" href="classKJS_1_1DOMCSSRuleList.html#bb3027133b1a2be2e2f309a0a9006efb">DOMCSSRuleList::~DOMCSSRuleList</a>() <a name="l00596"></a>00596 { <a name="l00597"></a>00597 <a class="code" href="classKJS_1_1ScriptInterpreter.html#119bb67f3e96835ceebba110292ea63e">ScriptInterpreter::forgetDOMObject</a>(<a class="code" href="classKJS_1_1DOMCSSRuleList.html#f6dad919905fdd7d0f47de587bbd1607">cssRuleList</a>.<a class="code" href="classDOM_1_1CSSRuleList.html#b2b9b70e96d28c3bdeb4f1a4e5420c8b">handle</a>()); <a name="l00598"></a>00598 } <a name="l00599"></a>00599 <a name="l00600"></a><a class="code" href="classKJS_1_1DOMCSSRuleList.html#cb772bd056d69d8da91c5e118b30d823">00600</a> Value <a class="code" href="classKJS_1_1DOMCSSRuleList.html#cb772bd056d69d8da91c5e118b30d823">DOMCSSRuleList::tryGet</a>(ExecState *exec, <span class="keyword">const</span> Identifier &p)<span class="keyword"> const</span> <a name="l00601"></a>00601 <span class="keyword"></span>{ <a name="l00602"></a>00602 Value result; <a name="l00603"></a>00603 <span class="keywordflow">if</span> (p == lengthPropertyName) <a name="l00604"></a>00604 <span class="keywordflow">return</span> Number(<a class="code" href="classKJS_1_1DOMCSSRuleList.html#f6dad919905fdd7d0f47de587bbd1607">cssRuleList</a>.<a class="code" href="classDOM_1_1CSSRuleList.html#d6249594196530f3def10ab54a6a9a1a">length</a>()); <a name="l00605"></a>00605 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (p == <span class="stringliteral">"item"</span>) <a name="l00606"></a>00606 <span class="keywordflow">return</span> lookupOrCreateFunction<DOMCSSRuleListFunc>(exec,p,<span class="keyword">this</span>,DOMCSSRuleList::Item,1,DontDelete|Function); <a name="l00607"></a>00607 <a name="l00608"></a>00608 <span class="keywordtype">bool</span> ok; <a name="l00609"></a>00609 <span class="keywordtype">long</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> u = p.toULong(&ok); <a name="l00610"></a>00610 <span class="keywordflow">if</span> (ok) <a name="l00611"></a>00611 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#8cc35edfd65958e66782c93ef21d92be">getDOMCSSRule</a>(exec,<a class="code" href="classDOM_1_1CSSRuleList.html">DOM::CSSRuleList</a>(<a class="code" href="classKJS_1_1DOMCSSRuleList.html#f6dad919905fdd7d0f47de587bbd1607">cssRuleList</a>).item(u)); <a name="l00612"></a>00612 <a name="l00613"></a>00613 <span class="keywordflow">return</span> <a class="code" href="classKJS_1_1DOMObject.html#da5fedf6964ef230b0bf7135cf58bdee">DOMObject::tryGet</a>(exec,p); <a name="l00614"></a>00614 } <a name="l00615"></a>00615 <a name="l00616"></a>00616 Value DOMCSSRuleListFunc::tryCall(ExecState *exec, Object &thisObj, <span class="keyword">const</span> List &args) <a name="l00617"></a>00617 { <a name="l00618"></a>00618 KJS_CHECK_THIS( <a class="code" href="classKJS_1_1DOMCSSRuleList.html">KJS::DOMCSSRuleList</a>, thisObj ); <a name="l00619"></a>00619 <a class="code" href="classDOM_1_1CSSRuleList.html">DOM::CSSRuleList</a> <a class="code" href="classKJS_1_1DOMCSSRuleList.html#f6dad919905fdd7d0f47de587bbd1607">cssRuleList</a> = static_cast<DOMCSSRuleList *>(thisObj.imp())-><a class="code" href="classKJS_1_1DOMCSSRuleList.html#41257e16a861e82a6dceaebce934c24a">toCSSRuleList</a>(); <a name="l00620"></a>00620 <span class="keywordflow">switch</span> (<span class="keywordtype">id</span>) { <a name="l00621"></a>00621 <span class="keywordflow">case</span> DOMCSSRuleList::Item: <a name="l00622"></a>00622 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#8cc35edfd65958e66782c93ef21d92be">getDOMCSSRule</a>(exec,<a class="code" href="classKJS_1_1DOMCSSRuleList.html#f6dad919905fdd7d0f47de587bbd1607">cssRuleList</a>.<a class="code" href="classDOM_1_1CSSRuleList.html#cded0c931d41f64930210b477cd94c43">item</a>(args[0].toInteger(exec))); <a name="l00623"></a>00623 <span class="keywordflow">default</span>: <a name="l00624"></a>00624 <span class="keywordflow">return</span> Undefined(); <a name="l00625"></a>00625 } <a name="l00626"></a>00626 } <a name="l00627"></a>00627 <a name="l00628"></a><a class="code" href="namespaceKJS.html#5bd57c5ab230f682efd5da06a6261c16">00628</a> Value <a class="code" href="namespaceKJS.html#5bd57c5ab230f682efd5da06a6261c16">KJS::getDOMCSSRuleList</a>(ExecState *exec, <span class="keyword">const</span> <a class="code" href="classDOM_1_1CSSRuleList.html">DOM::CSSRuleList</a>& rl) <a name="l00629"></a>00629 { <a name="l00630"></a>00630 <span class="keywordflow">return</span> cacheDOMObject<DOM::CSSRuleList, KJS::DOMCSSRuleList>(exec, rl); <a name="l00631"></a>00631 } <a name="l00632"></a>00632 <a name="l00633"></a>00633 <span class="comment">// -------------------------------------------------------------------------</span> <a name="l00634"></a>00634 <a name="l00635"></a>00635 IMPLEMENT_PROTOFUNC_DOM(DOMCSSRuleFunc) <span class="comment">// Not a proto, but doesn't matter</span> <a name="l00636"></a>00636 <a name="l00637"></a>00637 <a class="code" href="classKJS_1_1DOMCSSRule.html">DOMCSSRule</a>::<a class="code" href="classKJS_1_1DOMCSSRule.html">DOMCSSRule</a>(ExecState* exec, const DOM::CSSRule& r) <a name="l00638"></a>00638 : <a class="code" href="classKJS_1_1DOMObject.html">DOMObject</a>(exec->interpreter()->builtinObjectPrototype()), cssRule(r) <a name="l00639"></a>00639 { <a name="l00640"></a>00640 } <a name="l00641"></a>00641 <a name="l00642"></a><a class="code" href="classKJS_1_1DOMCSSRule.html#a491b7d391e090a2e7ea437ceb8cb5b7">00642</a> DOMCSSRule::~DOMCSSRule() <a name="l00643"></a>00643 { <a name="l00644"></a>00644 <a class="code" href="classKJS_1_1ScriptInterpreter.html#119bb67f3e96835ceebba110292ea63e">ScriptInterpreter::forgetDOMObject</a>(<a class="code" href="classKJS_1_1DOMCSSRule.html#e574031ae4fecb9499e552bd47d666d9">cssRule</a>.<a class="code" href="classDOM_1_1CSSRule.html#54dfd5998a6c77e73023159ef61451b5">handle</a>()); <a name="l00645"></a>00645 } <a name="l00646"></a>00646 <a name="l00647"></a>00647 <span class="keyword">const</span> ClassInfo <a class="code" href="classKJS_1_1DOMCSSRule.html#299a24282b77f2e3b1fa4b8b9680d184">DOMCSSRule::info</a> = { <span class="stringliteral">"CSSRule"</span>, 0, &<a class="code" href="namespaceKJS.html#9886bd594bb680e4261b88453217dbcd">DOMCSSRuleTable</a>, 0 }; <a name="l00648"></a>00648 <span class="keyword">const</span> ClassInfo <a class="code" href="classKJS_1_1DOMCSSRule.html#a5bf18dc46d29e2d4f067b895476e572">DOMCSSRule::style_info</a> = { <span class="stringliteral">"CSSStyleRule"</span>, &DOMCSSRule::info, &<a class="code" href="namespaceKJS.html#9a76fb524e3eedb18af5e9b6a7350ade">DOMCSSStyleRuleTable</a>, 0 }; <a name="l00649"></a>00649 <span class="keyword">const</span> ClassInfo <a class="code" href="classKJS_1_1DOMCSSRule.html#4c165d52c21ec80a338c44dc4080ab60">DOMCSSRule::media_info</a> = { <span class="stringliteral">"CSSMediaRule"</span>, &DOMCSSRule::info, &<a class="code" href="namespaceKJS.html#455559cdd217acbe61f718a808dc7093">DOMCSSMediaRuleTable</a>, 0 }; <a name="l00650"></a>00650 <span class="keyword">const</span> ClassInfo <a class="code" href="classKJS_1_1DOMCSSRule.html#6d2f16ea6a5f3a5e233a85666ce70658">DOMCSSRule::fontface_info</a> = { <span class="stringliteral">"CSSFontFaceRule"</span>, &DOMCSSRule::info, &<a class="code" href="namespaceKJS.html#305661079a48fcceb0cec2d6982bed56">DOMCSSFontFaceRuleTable</a>, 0 }; <a name="l00651"></a>00651 <span class="keyword">const</span> ClassInfo <a class="code" href="classKJS_1_1DOMCSSRule.html#598fcde25a383995865e49386b34b0dd">DOMCSSRule::page_info</a> = { <span class="stringliteral">"CSSPageRule"</span>, &DOMCSSRule::info, &<a class="code" href="namespaceKJS.html#9df8a06636dba092616be3fa35e9392a">DOMCSSPageRuleTable</a>, 0 }; <a name="l00652"></a>00652 <span class="keyword">const</span> ClassInfo <a class="code" href="classKJS_1_1DOMCSSRule.html#fdf78fe0ff93861c453812017a1c2ef8">DOMCSSRule::import_info</a> = { <span class="stringliteral">"CSSImportRule"</span>, &DOMCSSRule::info, &<a class="code" href="namespaceKJS.html#8e1bf4a8fec52fba9eba357a406d459e">DOMCSSImportRuleTable</a>, 0 }; <a name="l00653"></a>00653 <span class="keyword">const</span> ClassInfo <a class="code" href="classKJS_1_1DOMCSSRule.html#35cc767df0b4ad3e0b7776f9cbd681bf">DOMCSSRule::charset_info</a> = { <span class="stringliteral">"CSSCharsetRule"</span>, &DOMCSSRule::info, &<a class="code" href="namespaceKJS.html#af35832a842644074ea8ec1047892262">DOMCSSCharsetRuleTable</a>, 0 }; <a name="l00654"></a>00654 <a name="l00655"></a><a class="code" href="classKJS_1_1DOMCSSRule.html#f4d242543d8d68e0a5c7d4b625f42c26">00655</a> <span class="keyword">const</span> ClassInfo* <a class="code" href="classKJS_1_1DOMCSSRule.html#f4d242543d8d68e0a5c7d4b625f42c26">DOMCSSRule::classInfo</a>()<span class="keyword"> const</span> <a name="l00656"></a>00656 <span class="keyword"></span>{ <a name="l00657"></a>00657 <span class="keywordflow">switch</span> (<a class="code" href="classKJS_1_1DOMCSSRule.html#e574031ae4fecb9499e552bd47d666d9">cssRule</a>.<a class="code" href="classDOM_1_1CSSRule.html#ba1094160a6eb4a7e97803a6882acbe3">type</a>()) { <a name="l00658"></a>00658 <span class="keywordflow">case</span> DOM::CSSRule::STYLE_RULE: <a name="l00659"></a>00659 <span class="keywordflow">return</span> &<a class="code" href="classKJS_1_1DOMCSSRule.html#a5bf18dc46d29e2d4f067b895476e572">style_info</a>; <a name="l00660"></a>00660 <span class="keywordflow">case</span> DOM::CSSRule::MEDIA_RULE: <a name="l00661"></a>00661 <span class="keywordflow">return</span> &<a class="code" href="classKJS_1_1DOMCSSRule.html#4c165d52c21ec80a338c44dc4080ab60">media_info</a>; <a name="l00662"></a>00662 <span class="keywordflow">case</span> DOM::CSSRule::FONT_FACE_RULE: <a name="l00663"></a>00663 <span class="keywordflow">return</span> &<a class="code" href="classKJS_1_1DOMCSSRule.html#6d2f16ea6a5f3a5e233a85666ce70658">fontface_info</a>; <a name="l00664"></a>00664 <span class="keywordflow">case</span> DOM::CSSRule::PAGE_RULE: <a name="l00665"></a>00665 <span class="keywordflow">return</span> &<a class="code" href="classKJS_1_1DOMCSSRule.html#598fcde25a383995865e49386b34b0dd">page_info</a>; <a name="l00666"></a>00666 <span class="keywordflow">case</span> DOM::CSSRule::IMPORT_RULE: <a name="l00667"></a>00667 <span class="keywordflow">return</span> &<a class="code" href="classKJS_1_1DOMCSSRule.html#fdf78fe0ff93861c453812017a1c2ef8">import_info</a>; <a name="l00668"></a>00668 <span class="keywordflow">case</span> DOM::CSSRule::CHARSET_RULE: <a name="l00669"></a>00669 <span class="keywordflow">return</span> &<a class="code" href="classKJS_1_1DOMCSSRule.html#35cc767df0b4ad3e0b7776f9cbd681bf">charset_info</a>; <a name="l00670"></a>00670 <span class="keywordflow">case</span> DOM::CSSRule::UNKNOWN_RULE: <a name="l00671"></a>00671 <span class="keywordflow">default</span>: <a name="l00672"></a>00672 <span class="keywordflow">return</span> &<a class="code" href="classKJS_1_1DOMCSSRule.html#299a24282b77f2e3b1fa4b8b9680d184">info</a>; <a name="l00673"></a>00673 } <a name="l00674"></a>00674 } <a name="l00675"></a>00675 <span class="comment">/*</span> <a name="l00676"></a>00676 <span class="comment">@begin DOMCSSRuleTable 4</span> <a name="l00677"></a>00677 <span class="comment"> type DOMCSSRule::Type DontDelete|ReadOnly</span> <a name="l00678"></a>00678 <span class="comment"> cssText DOMCSSRule::CssText DontDelete|ReadOnly</span> <a name="l00679"></a>00679 <span class="comment"> parentStyleSheet DOMCSSRule::ParentStyleSheet DontDelete|ReadOnly</span> <a name="l00680"></a>00680 <span class="comment"> parentRule DOMCSSRule::ParentRule DontDelete|ReadOnly</span> <a name="l00681"></a>00681 <span class="comment">@end</span> <a name="l00682"></a>00682 <span class="comment">@begin DOMCSSStyleRuleTable 2</span> <a name="l00683"></a>00683 <span class="comment"> selectorText DOMCSSRule::Style_SelectorText DontDelete</span> <a name="l00684"></a>00684 <span class="comment"> style DOMCSSRule::Style_Style DontDelete|ReadOnly</span> <a name="l00685"></a>00685 <span class="comment">@end</span> <a name="l00686"></a>00686 <span class="comment">@begin DOMCSSMediaRuleTable 4</span> <a name="l00687"></a>00687 <span class="comment"> media DOMCSSRule::Media_Media DontDelete|ReadOnly</span> <a name="l00688"></a>00688 <span class="comment"> cssRules DOMCSSRule::Media_CssRules DontDelete|ReadOnly</span> <a name="l00689"></a>00689 <span class="comment"> insertRule DOMCSSRule::Media_InsertRule DontDelete|Function 2</span> <a name="l00690"></a>00690 <span class="comment"> deleteRule DOMCSSRule::Media_DeleteRule DontDelete|Function 1</span> <a name="l00691"></a>00691 <span class="comment">@end</span> <a name="l00692"></a>00692 <span class="comment">@begin DOMCSSFontFaceRuleTable 1</span> <a name="l00693"></a>00693 <span class="comment"> style DOMCSSRule::FontFace_Style DontDelete|ReadOnly</span> <a name="l00694"></a>00694 <span class="comment">@end</span> <a name="l00695"></a>00695 <span class="comment">@begin DOMCSSPageRuleTable 2</span> <a name="l00696"></a>00696 <span class="comment"> selectorText DOMCSSRule::Page_SelectorText DontDelete</span> <a name="l00697"></a>00697 <span class="comment"> style DOMCSSRule::Page_Style DontDelete|ReadOnly</span> <a name="l00698"></a>00698 <span class="comment">@end</span> <a name="l00699"></a>00699 <span class="comment">@begin DOMCSSImportRuleTable 3</span> <a name="l00700"></a>00700 <span class="comment"> href DOMCSSRule::Import_Href DontDelete|ReadOnly</span> <a name="l00701"></a>00701 <span class="comment"> media DOMCSSRule::Import_Media DontDelete|ReadOnly</span> <a name="l00702"></a>00702 <span class="comment"> styleSheet DOMCSSRule::Import_StyleSheet DontDelete|ReadOnly</span> <a name="l00703"></a>00703 <span class="comment">@end</span> <a name="l00704"></a>00704 <span class="comment">@begin DOMCSSCharsetRuleTable 1</span> <a name="l00705"></a>00705 <span class="comment"> encoding DOMCSSRule::Charset_Encoding DontDelete</span> <a name="l00706"></a>00706 <span class="comment">@end</span> <a name="l00707"></a>00707 <span class="comment">*/</span> <a name="l00708"></a><a class="code" href="classKJS_1_1DOMCSSRule.html#48f11818701889ac093df0ef5b46c65c">00708</a> Value <a class="code" href="classKJS_1_1DOMCSSRule.html#48f11818701889ac093df0ef5b46c65c">DOMCSSRule::tryGet</a>(ExecState *exec, <span class="keyword">const</span> Identifier &propertyName)<span class="keyword"> const</span> <a name="l00709"></a>00709 <span class="keyword"></span>{ <a name="l00710"></a>00710 <span class="preprocessor">#ifdef KJS_VERBOSE</span> <a name="l00711"></a>00711 <span class="preprocessor"></span> <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ggfbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(6070) << <span class="stringliteral">"DOMCSSRule::tryGet "</span> << propertyName.qstring() << <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gg313d520ed8f8f6b46eeef22cfb3b082a">endl</a>; <a name="l00712"></a>00712 <span class="preprocessor">#endif</span> <a name="l00713"></a>00713 <span class="preprocessor"></span> <span class="keyword">const</span> HashTable* table = <a class="code" href="classKJS_1_1DOMCSSRule.html#f4d242543d8d68e0a5c7d4b625f42c26">classInfo</a>()->propHashTable; <span class="comment">// get the right hashtable</span> <a name="l00714"></a>00714 <span class="keyword">const</span> HashEntry* entry = Lookup::findEntry(table, propertyName); <a name="l00715"></a>00715 <span class="keywordflow">if</span> (entry) { <a name="l00716"></a>00716 <span class="keywordflow">if</span> (entry->attr & Function) <a name="l00717"></a>00717 <span class="keywordflow">return</span> lookupOrCreateFunction<DOMCSSRuleFunc>(exec, propertyName, <span class="keyword">this</span>, entry->value, entry->params, entry->attr); <a name="l00718"></a>00718 <span class="keywordflow">return</span> <a class="code" href="classKJS_1_1DOMCSSRule.html#014e7dd86aef53ea77444ff1a1231f78">getValueProperty</a>(exec, entry->value); <a name="l00719"></a>00719 } <a name="l00720"></a>00720 <a name="l00721"></a>00721 <span class="comment">// Base CSSRule stuff or parent class forward, as usual</span> <a name="l00722"></a>00722 <span class="keywordflow">return</span> DOMObjectLookupGet<DOMCSSRuleFunc, DOMCSSRule, DOMObject>(exec, propertyName, &<a class="code" href="namespaceKJS.html#9886bd594bb680e4261b88453217dbcd">DOMCSSRuleTable</a>, <span class="keyword">this</span>); <a name="l00723"></a>00723 } <a name="l00724"></a>00724 <a name="l00725"></a><a class="code" href="classKJS_1_1DOMCSSRule.html#014e7dd86aef53ea77444ff1a1231f78">00725</a> Value <a class="code" href="classKJS_1_1DOMCSSRule.html#014e7dd86aef53ea77444ff1a1231f78">DOMCSSRule::getValueProperty</a>(ExecState *exec, <span class="keywordtype">int</span> token)<span class="keyword"> const</span> <a name="l00726"></a>00726 <span class="keyword"></span>{ <a name="l00727"></a>00727 <span class="keywordflow">switch</span> (token) { <a name="l00728"></a>00728 <span class="keywordflow">case</span> Type: <a name="l00729"></a>00729 <span class="keywordflow">return</span> Number(<a class="code" href="classKJS_1_1DOMCSSRule.html#e574031ae4fecb9499e552bd47d666d9">cssRule</a>.<a class="code" href="classDOM_1_1CSSRule.html#ba1094160a6eb4a7e97803a6882acbe3">type</a>()); <a name="l00730"></a>00730 <span class="keywordflow">case</span> CssText: <a name="l00731"></a>00731 <span class="keywordflow">return</span> String(<a class="code" href="classKJS_1_1DOMCSSRule.html#e574031ae4fecb9499e552bd47d666d9">cssRule</a>.<a class="code" href="classDOM_1_1CSSRule.html#9ff20cb3ca858312f4010e17325077a2">cssText</a>()); <a name="l00732"></a>00732 <span class="keywordflow">case</span> ParentStyleSheet: <a name="l00733"></a>00733 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#7814770d6f31d3b88eb14e5f7507aa8c">getDOMStyleSheet</a>(exec,<a class="code" href="classKJS_1_1DOMCSSRule.html#e574031ae4fecb9499e552bd47d666d9">cssRule</a>.<a class="code" href="classDOM_1_1CSSRule.html#ee9413fe69d7eb0fc6a1027b75d96fce">parentStyleSheet</a>()); <a name="l00734"></a>00734 <span class="keywordflow">case</span> ParentRule: <a name="l00735"></a>00735 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#8cc35edfd65958e66782c93ef21d92be">getDOMCSSRule</a>(exec,<a class="code" href="classKJS_1_1DOMCSSRule.html#e574031ae4fecb9499e552bd47d666d9">cssRule</a>.<a class="code" href="classDOM_1_1CSSRule.html#2c22bcffeb1f002a2fa39a86b690ce10">parentRule</a>()); <a name="l00736"></a>00736 <a name="l00737"></a>00737 <span class="comment">// for DOM::CSSRule::STYLE_RULE:</span> <a name="l00738"></a>00738 <span class="keywordflow">case</span> Style_SelectorText: <a name="l00739"></a>00739 <span class="keywordflow">return</span> String(static_cast<DOM::CSSStyleRule>(<a class="code" href="classKJS_1_1DOMCSSRule.html#e574031ae4fecb9499e552bd47d666d9">cssRule</a>).selectorText()); <a name="l00740"></a>00740 <span class="keywordflow">case</span> Style_Style: <a name="l00741"></a>00741 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#6b06a29edf02ed31e081f2d5f447e870">getDOMCSSStyleDeclaration</a>(exec,static_cast<DOM::CSSStyleRule>(cssRule).style()); <a name="l00742"></a>00742 <a name="l00743"></a>00743 <span class="comment">// for DOM::CSSRule::MEDIA_RULE:</span> <a name="l00744"></a>00744 <span class="keywordflow">case</span> Media_Media: <a name="l00745"></a>00745 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#cef1ff558f096b23c01a6de223d8e321">getDOMMediaList</a>(exec,static_cast<DOM::CSSMediaRule>(cssRule).media()); <a name="l00746"></a>00746 <span class="keywordflow">case</span> Media_CssRules: <a name="l00747"></a>00747 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#5bd57c5ab230f682efd5da06a6261c16">getDOMCSSRuleList</a>(exec,static_cast<DOM::CSSMediaRule>(cssRule).cssRules()); <a name="l00748"></a>00748 <a name="l00749"></a>00749 <span class="comment">// for DOM::CSSRule::FONT_FACE_RULE:</span> <a name="l00750"></a>00750 <span class="keywordflow">case</span> FontFace_Style: <a name="l00751"></a>00751 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#6b06a29edf02ed31e081f2d5f447e870">getDOMCSSStyleDeclaration</a>(exec,static_cast<DOM::CSSFontFaceRule>(cssRule).style()); <a name="l00752"></a>00752 <a name="l00753"></a>00753 <span class="comment">// for DOM::CSSRule::PAGE_RULE:</span> <a name="l00754"></a>00754 <span class="keywordflow">case</span> Page_SelectorText: <a name="l00755"></a>00755 <span class="keywordflow">return</span> String(static_cast<DOM::CSSPageRule>(cssRule).selectorText()); <a name="l00756"></a>00756 <span class="keywordflow">case</span> Page_Style: <a name="l00757"></a>00757 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#6b06a29edf02ed31e081f2d5f447e870">getDOMCSSStyleDeclaration</a>(exec,static_cast<DOM::CSSPageRule>(cssRule).style()); <a name="l00758"></a>00758 <a name="l00759"></a>00759 <span class="comment">// for DOM::CSSRule::IMPORT_RULE:</span> <a name="l00760"></a>00760 <span class="keywordflow">case</span> Import_Href: <a name="l00761"></a>00761 <span class="keywordflow">return</span> String(static_cast<DOM::CSSImportRule>(cssRule).href()); <a name="l00762"></a>00762 <span class="keywordflow">case</span> Import_Media: <a name="l00763"></a>00763 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#cef1ff558f096b23c01a6de223d8e321">getDOMMediaList</a>(exec,static_cast<DOM::CSSImportRule>(cssRule).media()); <a name="l00764"></a>00764 <span class="keywordflow">case</span> Import_StyleSheet: <a name="l00765"></a>00765 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#7814770d6f31d3b88eb14e5f7507aa8c">getDOMStyleSheet</a>(exec,static_cast<DOM::CSSImportRule>(cssRule).styleSheet()); <a name="l00766"></a>00766 <a name="l00767"></a>00767 <span class="comment">// for DOM::CSSRule::CHARSET_RULE:</span> <a name="l00768"></a>00768 <span class="keywordflow">case</span> Charset_Encoding: <a name="l00769"></a>00769 <span class="keywordflow">return</span> String(static_cast<DOM::CSSCharsetRule>(cssRule).encoding()); <a name="l00770"></a>00770 <a name="l00771"></a>00771 <span class="keywordflow">default</span>: <a name="l00772"></a>00772 <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ggfbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(6070) << <span class="stringliteral">"WARNING: DOMCSSRule::getValueProperty unhandled token "</span> << token << <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gg313d520ed8f8f6b46eeef22cfb3b082a">endl</a>; <a name="l00773"></a>00773 } <a name="l00774"></a>00774 <span class="keywordflow">return</span> Undefined(); <a name="l00775"></a>00775 } <a name="l00776"></a>00776 <a name="l00777"></a><a class="code" href="classKJS_1_1DOMCSSRule.html#f59925345ca3643ca5a0bd56331beaca">00777</a> <span class="keywordtype">void</span> <a class="code" href="classKJS_1_1DOMCSSRule.html#f59925345ca3643ca5a0bd56331beaca">DOMCSSRule::tryPut</a>(ExecState *exec, <span class="keyword">const</span> Identifier &propertyName, <span class="keyword">const</span> Value& value, <span class="keywordtype">int</span> attr) <a name="l00778"></a>00778 { <a name="l00779"></a>00779 <span class="keyword">const</span> HashTable* table = <a class="code" href="classKJS_1_1DOMCSSRule.html#f4d242543d8d68e0a5c7d4b625f42c26">classInfo</a>()->propHashTable; <span class="comment">// get the right hashtable</span> <a name="l00780"></a>00780 <span class="keyword">const</span> HashEntry* entry = Lookup::findEntry(table, propertyName); <a name="l00781"></a>00781 <span class="keywordflow">if</span> (entry) { <a name="l00782"></a>00782 <span class="keywordflow">if</span> (entry->attr & Function) <span class="comment">// function: put as override property</span> <a name="l00783"></a>00783 { <a name="l00784"></a>00784 ObjectImp::put(exec, propertyName, value, attr); <a name="l00785"></a>00785 <span class="keywordflow">return</span>; <a name="l00786"></a>00786 } <a name="l00787"></a>00787 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((entry->attr & ReadOnly) == 0) <span class="comment">// let DOMObjectLookupPut print the warning if not</span> <a name="l00788"></a>00788 { <a name="l00789"></a>00789 <a class="code" href="classKJS_1_1DOMCSSRule.html#32a7618af85f8d13f13f98125b94c119">putValueProperty</a>(exec, entry->value, value, attr); <a name="l00790"></a>00790 <span class="keywordflow">return</span>; <a name="l00791"></a>00791 } <a name="l00792"></a>00792 } <a name="l00793"></a>00793 DOMObjectLookupPut<DOMCSSRule, DOMObject>(exec, propertyName, value, attr, &<a class="code" href="namespaceKJS.html#9886bd594bb680e4261b88453217dbcd">DOMCSSRuleTable</a>, <span class="keyword">this</span>); <a name="l00794"></a>00794 } <a name="l00795"></a>00795 <a name="l00796"></a><a class="code" href="classKJS_1_1DOMCSSRule.html#32a7618af85f8d13f13f98125b94c119">00796</a> <span class="keywordtype">void</span> <a class="code" href="classKJS_1_1DOMCSSRule.html#32a7618af85f8d13f13f98125b94c119">DOMCSSRule::putValueProperty</a>(ExecState *exec, <span class="keywordtype">int</span> token, <span class="keyword">const</span> Value& value, <span class="keywordtype">int</span>) <a name="l00797"></a>00797 { <a name="l00798"></a>00798 <span class="keywordflow">switch</span> (token) { <a name="l00799"></a>00799 <span class="comment">// for DOM::CSSRule::STYLE_RULE:</span> <a name="l00800"></a>00800 <span class="keywordflow">case</span> Style_SelectorText: <a name="l00801"></a>00801 static_cast<DOM::CSSStyleRule>(<a class="code" href="classKJS_1_1DOMCSSRule.html#e574031ae4fecb9499e552bd47d666d9">cssRule</a>).setSelectorText(value.toString(exec).string()); <a name="l00802"></a>00802 <span class="keywordflow">return</span>; <a name="l00803"></a>00803 <a name="l00804"></a>00804 <span class="comment">// for DOM::CSSRule::PAGE_RULE:</span> <a name="l00805"></a>00805 <span class="keywordflow">case</span> Page_SelectorText: <a name="l00806"></a>00806 static_cast<DOM::CSSPageRule>(<a class="code" href="classKJS_1_1DOMCSSRule.html#e574031ae4fecb9499e552bd47d666d9">cssRule</a>).setSelectorText(value.toString(exec).string()); <a name="l00807"></a>00807 <span class="keywordflow">return</span>; <a name="l00808"></a>00808 <a name="l00809"></a>00809 <span class="comment">// for DOM::CSSRule::CHARSET_RULE:</span> <a name="l00810"></a>00810 <span class="keywordflow">case</span> Charset_Encoding: <a name="l00811"></a>00811 static_cast<DOM::CSSCharsetRule>(<a class="code" href="classKJS_1_1DOMCSSRule.html#e574031ae4fecb9499e552bd47d666d9">cssRule</a>).setEncoding(value.toString(exec).string()); <a name="l00812"></a>00812 <span class="keywordflow">return</span>; <a name="l00813"></a>00813 <a name="l00814"></a>00814 <span class="keywordflow">default</span>: <a name="l00815"></a>00815 <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ggfbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(6070) << <span class="stringliteral">"WARNING: DOMCSSRule::putValueProperty unhandled token "</span> << token << <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gg313d520ed8f8f6b46eeef22cfb3b082a">endl</a>; <a name="l00816"></a>00816 } <a name="l00817"></a>00817 } <a name="l00818"></a>00818 <a name="l00819"></a>00819 Value DOMCSSRuleFunc::tryCall(ExecState *exec, Object &thisObj, <span class="keyword">const</span> List &args) <a name="l00820"></a>00820 { <a name="l00821"></a>00821 KJS_CHECK_THIS( <a class="code" href="classKJS_1_1DOMCSSRule.html">KJS::DOMCSSRule</a>, thisObj ); <a name="l00822"></a>00822 <a class="code" href="classDOM_1_1CSSRule.html">DOM::CSSRule</a> <a class="code" href="classKJS_1_1DOMCSSRule.html#e574031ae4fecb9499e552bd47d666d9">cssRule</a> = static_cast<DOMCSSRule *>(thisObj.imp())-><a class="code" href="classKJS_1_1DOMCSSRule.html#b1f0614ecd69f0482bce5cdd90cef397">toCSSRule</a>(); <a name="l00823"></a>00823 <a name="l00824"></a>00824 <span class="keywordflow">if</span> (<a class="code" href="classKJS_1_1DOMCSSRule.html#e574031ae4fecb9499e552bd47d666d9">cssRule</a>.<a class="code" href="classDOM_1_1CSSRule.html#ba1094160a6eb4a7e97803a6882acbe3">type</a>() == DOM::CSSRule::MEDIA_RULE) { <a name="l00825"></a>00825 <a class="code" href="classDOM_1_1CSSMediaRule.html">DOM::CSSMediaRule</a> rule = static_cast<DOM::CSSMediaRule>(<a class="code" href="classKJS_1_1DOMCSSRule.html#e574031ae4fecb9499e552bd47d666d9">cssRule</a>); <a name="l00826"></a>00826 <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == DOMCSSRule::Media_InsertRule) <a name="l00827"></a>00827 <span class="keywordflow">return</span> Number(rule.insertRule(args[0].toString(exec).string(),args[1].toInteger(exec))); <a name="l00828"></a>00828 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == DOMCSSRule::Media_DeleteRule) <a name="l00829"></a>00829 rule.deleteRule(args[0].toInteger(exec)); <a name="l00830"></a>00830 } <a name="l00831"></a>00831 <a name="l00832"></a>00832 <span class="keywordflow">return</span> Undefined(); <a name="l00833"></a>00833 } <a name="l00834"></a>00834 <a name="l00835"></a><a class="code" href="namespaceKJS.html#8cc35edfd65958e66782c93ef21d92be">00835</a> Value <a class="code" href="namespaceKJS.html#8cc35edfd65958e66782c93ef21d92be">KJS::getDOMCSSRule</a>(ExecState *exec, <span class="keyword">const</span> <a class="code" href="classDOM_1_1CSSRule.html">DOM::CSSRule</a>& r) <a name="l00836"></a>00836 { <a name="l00837"></a>00837 <span class="keywordflow">return</span> cacheDOMObject<DOM::CSSRule, KJS::DOMCSSRule>(exec, r); <a name="l00838"></a>00838 } <a name="l00839"></a>00839 <a name="l00840"></a>00840 <span class="comment">// -------------------------------------------------------------------------</span> <a name="l00841"></a>00841 <a name="l00842"></a>00842 <a name="l00843"></a><a class="code" href="namespaceKJS.html#011ebe66614ff19bf6652191a0769af8">00843</a> <a class="code" href="classDOM_1_1CSSRule.html">DOM::CSSRule</a> <a class="code" href="namespaceKJS.html#011ebe66614ff19bf6652191a0769af8">KJS::toCSSRule</a>(<span class="keyword">const</span> Value& val) <a name="l00844"></a>00844 { <a name="l00845"></a>00845 Object obj = Object::dynamicCast(val); <a name="l00846"></a>00846 <span class="keywordflow">if</span> (!obj.isValid() || !obj.inherits(&DOMCSSRule::info)) <a name="l00847"></a>00847 <span class="keywordflow">return</span> <a class="code" href="classDOM_1_1CSSRule.html">DOM::CSSRule</a>(); <a name="l00848"></a>00848 <a name="l00849"></a>00849 <span class="keyword">const</span> <a class="code" href="classKJS_1_1DOMCSSRule.html">DOMCSSRule</a> *dobj = static_cast<const DOMCSSRule*>(obj.imp()); <a name="l00850"></a>00850 <span class="keywordflow">return</span> dobj-><a class="code" href="classKJS_1_1DOMCSSRule.html#b1f0614ecd69f0482bce5cdd90cef397">toCSSRule</a>(); <a name="l00851"></a>00851 } <a name="l00852"></a>00852 <a name="l00853"></a>00853 <span class="comment">// -------------------------------------------------------------------------</span> <a name="l00854"></a>00854 <a name="l00855"></a>00855 <span class="keyword">const</span> ClassInfo CSSRuleConstructor::info = { <span class="stringliteral">"CSSRuleConstructor"</span>, 0, &<a class="code" href="namespaceKJS.html#0297aee203f3972372a59af7989d5ca0">CSSRuleConstructorTable</a>, 0 }; <a name="l00856"></a>00856 <span class="comment">/*</span> <a name="l00857"></a>00857 <span class="comment">@begin CSSRuleConstructorTable 7</span> <a name="l00858"></a>00858 <span class="comment"> UNKNOWN_RULE CSSRuleConstructor::UNKNOWN_RULE DontDelete|ReadOnly</span> <a name="l00859"></a>00859 <span class="comment"> STYLE_RULE CSSRuleConstructor::STYLE_RULE DontDelete|ReadOnly</span> <a name="l00860"></a>00860 <span class="comment"> CHARSET_RULE CSSRuleConstructor::CHARSET_RULE DontDelete|ReadOnly</span> <a name="l00861"></a>00861 <span class="comment"> IMPORT_RULE CSSRuleConstructor::IMPORT_RULE DontDelete|ReadOnly</span> <a name="l00862"></a>00862 <span class="comment"> MEDIA_RULE CSSRuleConstructor::MEDIA_RULE DontDelete|ReadOnly</span> <a name="l00863"></a>00863 <span class="comment"> FONT_FACE_RULE CSSRuleConstructor::FONT_FACE_RULE DontDelete|ReadOnly</span> <a name="l00864"></a>00864 <span class="comment"> PAGE_RULE CSSRuleConstructor::PAGE_RULE DontDelete|ReadOnly</span> <a name="l00865"></a>00865 <span class="comment">@end</span> <a name="l00866"></a>00866 <span class="comment">*/</span> <a name="l00867"></a>00867 <a name="l00868"></a><a class="code" href="classKJS_1_1CSSRuleConstructor.html#925f33142917fdb68cc24fe5ac48e449">00868</a> CSSRuleConstructor::CSSRuleConstructor(ExecState *exec) <a name="l00869"></a>00869 : <a class="code" href="classKJS_1_1DOMObject.html">DOMObject</a>(exec->interpreter()->builtinObjectPrototype()) <a name="l00870"></a>00870 { <a name="l00871"></a>00871 } <a name="l00872"></a>00872 <a name="l00873"></a><a class="code" href="classKJS_1_1CSSRuleConstructor.html#9520bc053f0ce85d65d6d66389ec6f94">00873</a> Value <a class="code" href="classKJS_1_1CSSRuleConstructor.html#9520bc053f0ce85d65d6d66389ec6f94">CSSRuleConstructor::tryGet</a>(ExecState *exec, <span class="keyword">const</span> Identifier &p)<span class="keyword"> const</span> <a name="l00874"></a>00874 <span class="keyword"></span>{ <a name="l00875"></a>00875 <span class="keywordflow">return</span> DOMObjectLookupGetValue<CSSRuleConstructor,DOMObject>(exec,p,&<a class="code" href="namespaceKJS.html#0297aee203f3972372a59af7989d5ca0">CSSRuleConstructorTable</a>,<span class="keyword">this</span>); <a name="l00876"></a>00876 } <a name="l00877"></a>00877 <a name="l00878"></a><a class="code" href="classKJS_1_1CSSRuleConstructor.html#95c89b3542983ef3a4029b2c30b93f63">00878</a> Value <a class="code" href="classKJS_1_1CSSRuleConstructor.html#95c89b3542983ef3a4029b2c30b93f63">CSSRuleConstructor::getValueProperty</a>(ExecState *, <span class="keywordtype">int</span> token)<span class="keyword"> const</span> <a name="l00879"></a>00879 <span class="keyword"></span>{ <a name="l00880"></a>00880 <span class="keywordflow">switch</span> (token) { <a name="l00881"></a>00881 <span class="keywordflow">case</span> UNKNOWN_RULE: <a name="l00882"></a>00882 <span class="keywordflow">return</span> Number(DOM::CSSRule::UNKNOWN_RULE); <a name="l00883"></a>00883 <span class="keywordflow">case</span> STYLE_RULE: <a name="l00884"></a>00884 <span class="keywordflow">return</span> Number(DOM::CSSRule::STYLE_RULE); <a name="l00885"></a>00885 <span class="keywordflow">case</span> CHARSET_RULE: <a name="l00886"></a>00886 <span class="keywordflow">return</span> Number(DOM::CSSRule::CHARSET_RULE); <a name="l00887"></a>00887 <span class="keywordflow">case</span> IMPORT_RULE: <a name="l00888"></a>00888 <span class="keywordflow">return</span> Number(DOM::CSSRule::IMPORT_RULE); <a name="l00889"></a>00889 <span class="keywordflow">case</span> MEDIA_RULE: <a name="l00890"></a>00890 <span class="keywordflow">return</span> Number(DOM::CSSRule::MEDIA_RULE); <a name="l00891"></a>00891 <span class="keywordflow">case</span> FONT_FACE_RULE: <a name="l00892"></a>00892 <span class="keywordflow">return</span> Number(DOM::CSSRule::FONT_FACE_RULE); <a name="l00893"></a>00893 <span class="keywordflow">case</span> PAGE_RULE: <a name="l00894"></a>00894 <span class="keywordflow">return</span> Number(DOM::CSSRule::PAGE_RULE); <a name="l00895"></a>00895 } <a name="l00896"></a>00896 <span class="keywordflow">return</span> Value(); <a name="l00897"></a>00897 } <a name="l00898"></a>00898 <a name="l00899"></a><a class="code" href="namespaceKJS.html#1865fc8074a46e2f0745dff492718ee5">00899</a> Value <a class="code" href="namespaceKJS.html#1865fc8074a46e2f0745dff492718ee5">KJS::getCSSRuleConstructor</a>(ExecState *exec) <a name="l00900"></a>00900 { <a name="l00901"></a>00901 <span class="keywordflow">return</span> cacheGlobalObject<CSSRuleConstructor>( exec, <span class="stringliteral">"[[cssRule.constructor]]"</span> ); <a name="l00902"></a>00902 } <a name="l00903"></a>00903 <a name="l00904"></a>00904 <span class="comment">// -------------------------------------------------------------------------</span> <a name="l00905"></a>00905 <a name="l00906"></a>00906 <span class="keyword">const</span> ClassInfo DOMCSSValue::info = { <span class="stringliteral">"CSSValue"</span>, 0, &<a class="code" href="namespaceKJS.html#d6d8803102d847dfd20f6613bcf2fa29">DOMCSSValueTable</a>, 0 }; <a name="l00907"></a>00907 <a name="l00908"></a>00908 <span class="comment">/*</span> <a name="l00909"></a>00909 <span class="comment">@begin DOMCSSValueTable 2</span> <a name="l00910"></a>00910 <span class="comment"> cssText DOMCSSValue::CssText DontDelete|ReadOnly</span> <a name="l00911"></a>00911 <span class="comment"> cssValueType DOMCSSValue::CssValueType DontDelete|ReadOnly</span> <a name="l00912"></a>00912 <span class="comment">@end</span> <a name="l00913"></a>00913 <span class="comment">*/</span> <a name="l00914"></a>00914 <a name="l00915"></a><a class="code" href="classKJS_1_1DOMCSSValue.html#0253d3911176d15c11e0c9776de56a51">00915</a> DOMCSSValue::DOMCSSValue(ExecState* exec, <span class="keyword">const</span> <a class="code" href="classDOM_1_1CSSValue.html">DOM::CSSValue</a>& val) <a name="l00916"></a>00916 : <a class="code" href="classKJS_1_1DOMObject.html">DOMObject</a>(exec->interpreter()->builtinObjectPrototype()), cssValue(val) <a name="l00917"></a>00917 { <a name="l00918"></a>00918 } <a name="l00919"></a>00919 <a name="l00920"></a><a class="code" href="classKJS_1_1DOMCSSValue.html#23dee18e73f3ce456175f08aa50c36b4">00920</a> <a class="code" href="classKJS_1_1DOMCSSValue.html#23dee18e73f3ce456175f08aa50c36b4">DOMCSSValue::~DOMCSSValue</a>() <a name="l00921"></a>00921 { <a name="l00922"></a>00922 <a class="code" href="classKJS_1_1ScriptInterpreter.html#119bb67f3e96835ceebba110292ea63e">ScriptInterpreter::forgetDOMObject</a>(<a class="code" href="classKJS_1_1DOMCSSValue.html#2af37d51249345a4b9986a406921bd67">cssValue</a>.<a class="code" href="classDOM_1_1CSSValue.html#ac20a1aa489edc12ce867af1b7e654fe">handle</a>()); <a name="l00923"></a>00923 } <a name="l00924"></a>00924 <a name="l00925"></a><a class="code" href="classKJS_1_1DOMCSSValue.html#a0ca5b8e03401f0986298da7bc92f8f1">00925</a> Value <a class="code" href="classKJS_1_1DOMCSSValue.html#a0ca5b8e03401f0986298da7bc92f8f1">DOMCSSValue::tryGet</a>(ExecState *exec, <span class="keyword">const</span> Identifier &p)<span class="keyword"> const</span> <a name="l00926"></a>00926 <span class="keyword"></span>{ <a name="l00927"></a>00927 <span class="keywordflow">if</span> (p == <span class="stringliteral">"cssText"</span>) <a name="l00928"></a>00928 <span class="keywordflow">return</span> String(<a class="code" href="classKJS_1_1DOMCSSValue.html#2af37d51249345a4b9986a406921bd67">cssValue</a>.<a class="code" href="classDOM_1_1CSSValue.html#6326876df969c3595935e9e993ffdb0a">cssText</a>()); <a name="l00929"></a>00929 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (p == <span class="stringliteral">"cssValueType"</span>) <a name="l00930"></a>00930 <span class="keywordflow">return</span> Number(<a class="code" href="classKJS_1_1DOMCSSValue.html#2af37d51249345a4b9986a406921bd67">cssValue</a>.<a class="code" href="classDOM_1_1CSSValue.html#87ef97a0f9c8c0c885803991f36bd7b1">cssValueType</a>()); <a name="l00931"></a>00931 <span class="keywordflow">return</span> <a class="code" href="classKJS_1_1DOMObject.html#da5fedf6964ef230b0bf7135cf58bdee">DOMObject::tryGet</a>(exec,p); <a name="l00932"></a>00932 } <a name="l00933"></a>00933 <a name="l00934"></a><a class="code" href="classKJS_1_1DOMCSSValue.html#7ce3b3f21e290d0aa72db0b3c35357e2">00934</a> <span class="keywordtype">void</span> <a class="code" href="classKJS_1_1DOMCSSValue.html#7ce3b3f21e290d0aa72db0b3c35357e2">DOMCSSValue::tryPut</a>(ExecState *exec, <span class="keyword">const</span> Identifier &propertyName, <span class="keyword">const</span> Value& value, <span class="keywordtype">int</span> attr) <a name="l00935"></a>00935 { <a name="l00936"></a>00936 <span class="keywordflow">if</span> (propertyName == <span class="stringliteral">"cssText"</span>) <a name="l00937"></a>00937 <a class="code" href="classKJS_1_1DOMCSSValue.html#2af37d51249345a4b9986a406921bd67">cssValue</a>.<a class="code" href="classDOM_1_1CSSValue.html#79883f72b4809bcb60e640205f72b29d">setCssText</a>(value.toString(exec).string()); <a name="l00938"></a>00938 <span class="keywordflow">else</span> <a name="l00939"></a>00939 <a class="code" href="classKJS_1_1DOMObject.html#afd01257502e1274d0a8cc777d76d78a">DOMObject::tryPut</a>(exec, propertyName, value, attr); <a name="l00940"></a>00940 } <a name="l00941"></a>00941 <a name="l00942"></a><a class="code" href="namespaceKJS.html#4b8eeb2da30d4c10ad83a9889b271da5">00942</a> Value <a class="code" href="namespaceKJS.html#4b8eeb2da30d4c10ad83a9889b271da5">KJS::getDOMCSSValue</a>(ExecState *exec, <span class="keyword">const</span> <a class="code" href="classDOM_1_1CSSValue.html">DOM::CSSValue</a>& v) <a name="l00943"></a>00943 { <a name="l00944"></a>00944 <a class="code" href="classKJS_1_1DOMObject.html">DOMObject</a> *ret; <a name="l00945"></a>00945 <span class="keywordflow">if</span> (v.<a class="code" href="classDOM_1_1CSSValue.html#9d1ce660dc2e4197a18d201e7653a1fb">isNull</a>()) <a name="l00946"></a>00946 <span class="keywordflow">return</span> Null(); <a name="l00947"></a>00947 <a class="code" href="classKJS_1_1ScriptInterpreter.html">ScriptInterpreter</a>* interp = static_cast<ScriptInterpreter *>(exec->interpreter()); <a name="l00948"></a>00948 <span class="keywordflow">if</span> ((ret = interp-><a class="code" href="classKJS_1_1ScriptInterpreter.html#c923dbc2cb9ee45538bd61f5a891c6d2">getDOMObject</a>(v.<a class="code" href="classDOM_1_1CSSValue.html#ac20a1aa489edc12ce867af1b7e654fe">handle</a>()))) <a name="l00949"></a>00949 <span class="keywordflow">return</span> Value(ret); <a name="l00950"></a>00950 <span class="keywordflow">else</span> { <a name="l00951"></a>00951 <span class="keywordflow">if</span> (v.<a class="code" href="classDOM_1_1CSSValue.html#81e24e2f508703343cfe30744421cfde">isCSSValueList</a>()) <a name="l00952"></a>00952 ret = <span class="keyword">new</span> <a class="code" href="classKJS_1_1DOMCSSValueList.html">DOMCSSValueList</a>(exec,v); <a name="l00953"></a>00953 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (v.<a class="code" href="classDOM_1_1CSSValue.html#83e01795f3351e0ecf60ff41a57e4ea3">isCSSPrimitiveValue</a>()) <a name="l00954"></a>00954 ret = <span class="keyword">new</span> <a class="code" href="classKJS_1_1DOMCSSPrimitiveValue.html">DOMCSSPrimitiveValue</a>(exec,v); <a name="l00955"></a>00955 <span class="keywordflow">else</span> <a name="l00956"></a>00956 ret = <span class="keyword">new</span> <a class="code" href="classKJS_1_1DOMCSSValue.html">DOMCSSValue</a>(exec,v); <a name="l00957"></a>00957 interp-><a class="code" href="classKJS_1_1ScriptInterpreter.html#ad6106e78ce92a8c366623407189e9f2">putDOMObject</a>(v.<a class="code" href="classDOM_1_1CSSValue.html#ac20a1aa489edc12ce867af1b7e654fe">handle</a>(),ret); <a name="l00958"></a>00958 <span class="keywordflow">return</span> Value(ret); <a name="l00959"></a>00959 } <a name="l00960"></a>00960 } <a name="l00961"></a>00961 <a name="l00962"></a>00962 <span class="comment">// -------------------------------------------------------------------------</span> <a name="l00963"></a>00963 <a name="l00964"></a>00964 <span class="keyword">const</span> ClassInfo CSSValueConstructor::info = { <span class="stringliteral">"CSSValueConstructor"</span>, 0, &<a class="code" href="namespaceKJS.html#dcc703cdd5f3595dffae0913b5e672b6">CSSValueConstructorTable</a>, 0 }; <a name="l00965"></a>00965 <span class="comment">/*</span> <a name="l00966"></a>00966 <span class="comment">@begin CSSValueConstructorTable 5</span> <a name="l00967"></a>00967 <span class="comment"> CSS_INHERIT CSSValueConstructor::CSS_INHERIT DontDelete|ReadOnly</span> <a name="l00968"></a>00968 <span class="comment"> CSS_PRIMITIVE_VALUE CSSValueConstructor::CSS_PRIMITIVE_VALUE DontDelete|ReadOnly</span> <a name="l00969"></a>00969 <span class="comment"> CSS_VALUE_LIST CSSValueConstructor::CSS_VALUE_LIST DontDelete|ReadOnly</span> <a name="l00970"></a>00970 <span class="comment"> CSS_CUSTOM CSSValueConstructor::CSS_CUSTOM DontDelete|ReadOnly</span> <a name="l00971"></a>00971 <span class="comment">@end</span> <a name="l00972"></a>00972 <span class="comment">*/</span> <a name="l00973"></a>00973 <a name="l00974"></a><a class="code" href="classKJS_1_1CSSValueConstructor.html#47c661d45871d398f304113bf0c5ecf9">00974</a> CSSValueConstructor::CSSValueConstructor(ExecState *exec) <a name="l00975"></a>00975 : <a class="code" href="classKJS_1_1DOMObject.html">DOMObject</a>(exec->interpreter()->builtinObjectPrototype()) <a name="l00976"></a>00976 { <a name="l00977"></a>00977 } <a name="l00978"></a>00978 <a name="l00979"></a><a class="code" href="classKJS_1_1CSSValueConstructor.html#0154ff8f153b8cb43480136c0973a194">00979</a> Value <a class="code" href="classKJS_1_1CSSValueConstructor.html#0154ff8f153b8cb43480136c0973a194">CSSValueConstructor::tryGet</a>(ExecState *exec, <span class="keyword">const</span> Identifier &p)<span class="keyword"> const</span> <a name="l00980"></a>00980 <span class="keyword"></span>{ <a name="l00981"></a>00981 <span class="keywordflow">return</span> DOMObjectLookupGetValue<CSSValueConstructor,DOMObject>(exec,p,&<a class="code" href="namespaceKJS.html#dcc703cdd5f3595dffae0913b5e672b6">CSSValueConstructorTable</a>,<span class="keyword">this</span>); <a name="l00982"></a>00982 } <a name="l00983"></a>00983 <a name="l00984"></a><a class="code" href="classKJS_1_1CSSValueConstructor.html#9073b53b2ce9d91bbc1165e56deb3a12">00984</a> Value <a class="code" href="classKJS_1_1CSSValueConstructor.html#9073b53b2ce9d91bbc1165e56deb3a12">CSSValueConstructor::getValueProperty</a>(ExecState *, <span class="keywordtype">int</span> token)<span class="keyword"> const</span> <a name="l00985"></a>00985 <span class="keyword"></span>{ <a name="l00986"></a>00986 <span class="keywordflow">switch</span> (token) { <a name="l00987"></a>00987 <span class="keywordflow">case</span> CSS_INHERIT: <a name="l00988"></a>00988 <span class="keywordflow">return</span> Number(DOM::CSSValue::CSS_INHERIT); <a name="l00989"></a>00989 <span class="keywordflow">case</span> CSS_PRIMITIVE_VALUE: <a name="l00990"></a>00990 <span class="keywordflow">return</span> Number(DOM::CSSValue::CSS_PRIMITIVE_VALUE); <a name="l00991"></a>00991 <span class="keywordflow">case</span> CSS_VALUE_LIST: <a name="l00992"></a>00992 <span class="keywordflow">return</span> Number(DOM::CSSValue::CSS_VALUE_LIST); <a name="l00993"></a>00993 <span class="keywordflow">case</span> CSS_CUSTOM: <a name="l00994"></a>00994 <span class="keywordflow">return</span> Number(DOM::CSSValue::CSS_CUSTOM); <a name="l00995"></a>00995 } <a name="l00996"></a>00996 <span class="keywordflow">return</span> Value(); <a name="l00997"></a>00997 } <a name="l00998"></a>00998 <a name="l00999"></a><a class="code" href="namespaceKJS.html#cc5537c103046e353bd098a06c32343e">00999</a> Value <a class="code" href="namespaceKJS.html#cc5537c103046e353bd098a06c32343e">KJS::getCSSValueConstructor</a>(ExecState *exec) <a name="l01000"></a>01000 { <a name="l01001"></a>01001 <span class="keywordflow">return</span> cacheGlobalObject<CSSValueConstructor>( exec, <span class="stringliteral">"[[cssValue.constructor]]"</span> ); <a name="l01002"></a>01002 } <a name="l01003"></a>01003 <a name="l01004"></a>01004 <span class="comment">// -------------------------------------------------------------------------</span> <a name="l01005"></a>01005 <a name="l01006"></a>01006 <span class="keyword">const</span> ClassInfo DOMCSSPrimitiveValue::info = { <span class="stringliteral">"CSSPrimitiveValue"</span>, 0, &<a class="code" href="namespaceKJS.html#f5d2df26b9f516e4380f443ab45de895">DOMCSSPrimitiveValueTable</a>, 0 }; <a name="l01007"></a>01007 <span class="comment">/*</span> <a name="l01008"></a>01008 <span class="comment">@begin DOMCSSPrimitiveValueTable 1</span> <a name="l01009"></a>01009 <span class="comment"> primitiveType DOMCSSPrimitiveValue::PrimitiveType DontDelete|ReadOnly</span> <a name="l01010"></a>01010 <span class="comment">@end</span> <a name="l01011"></a>01011 <span class="comment">@begin DOMCSSPrimitiveValueProtoTable 3</span> <a name="l01012"></a>01012 <span class="comment"> setFloatValue DOMCSSPrimitiveValue::SetFloatValue DontDelete|Function 2</span> <a name="l01013"></a>01013 <span class="comment"> getFloatValue DOMCSSPrimitiveValue::GetFloatValue DontDelete|Function 1</span> <a name="l01014"></a>01014 <span class="comment"> setStringValue DOMCSSPrimitiveValue::SetStringValue DontDelete|Function 2</span> <a name="l01015"></a>01015 <span class="comment"> getStringValue DOMCSSPrimitiveValue::GetStringValue DontDelete|Function 0</span> <a name="l01016"></a>01016 <span class="comment"> getCounterValue DOMCSSPrimitiveValue::GetCounterValue DontDelete|Function 0</span> <a name="l01017"></a>01017 <span class="comment"> getRectValue DOMCSSPrimitiveValue::GetRectValue DontDelete|Function 0</span> <a name="l01018"></a>01018 <span class="comment"> getRGBColorValue DOMCSSPrimitiveValue::GetRGBColorValue DontDelete|Function 0</span> <a name="l01019"></a>01019 <span class="comment">@end</span> <a name="l01020"></a>01020 <span class="comment">*/</span> <a name="l01021"></a>01021 DEFINE_PROTOTYPE(<span class="stringliteral">"DOMCSSPrimitiveValue"</span>,DOMCSSPrimitiveValueProto) <a name="l01022"></a>01022 IMPLEMENT_PROTOFUNC_DOM(DOMCSSPrimitiveValueProtoFunc) <a name="l01023"></a>01023 IMPLEMENT_PROTOTYPE(DOMCSSPrimitiveValueProto,DOMCSSPrimitiveValueProtoFunc) <a name="l01024"></a>01024 <a name="l01025"></a><a class="code" href="classKJS_1_1DOMCSSPrimitiveValue.html#134853e689701698c3779e13466bdc60">01025</a> <a class="code" href="classKJS_1_1DOMCSSPrimitiveValue.html">DOMCSSPrimitiveValue</a>::<a class="code" href="classKJS_1_1DOMCSSPrimitiveValue.html">DOMCSSPrimitiveValue</a>(ExecState *exec, const DOM::CSSPrimitiveValue& v) <a name="l01026"></a>01026 : <a class="code" href="classKJS_1_1DOMCSSValue.html">DOMCSSValue</a>(DOMCSSPrimitiveValueProto::self(exec), v) { } <a name="l01027"></a>01027 <a name="l01028"></a><a class="code" href="classKJS_1_1DOMCSSPrimitiveValue.html#d03fa01ac35161d9f6ace2a771683fae">01028</a> Value DOMCSSPrimitiveValue::tryGet(ExecState *exec, <span class="keyword">const</span> Identifier &p)<span class="keyword"> const</span> <a name="l01029"></a>01029 <span class="keyword"></span>{ <a name="l01030"></a>01030 <span class="keywordflow">if</span> (p==<span class="stringliteral">"primitiveType"</span>) <a name="l01031"></a>01031 <span class="keywordflow">return</span> Number(static_cast<DOM::CSSPrimitiveValue>(<a class="code" href="classKJS_1_1DOMCSSValue.html#2af37d51249345a4b9986a406921bd67">cssValue</a>).primitiveType()); <a name="l01032"></a>01032 <span class="keywordflow">return</span> <a class="code" href="classKJS_1_1DOMObject.html#da5fedf6964ef230b0bf7135cf58bdee">DOMObject::tryGet</a>(exec,p); <a name="l01033"></a>01033 } <a name="l01034"></a>01034 <a name="l01035"></a>01035 Value DOMCSSPrimitiveValueProtoFunc::tryCall(ExecState *exec, Object &thisObj, <span class="keyword">const</span> List &args) <a name="l01036"></a>01036 { <a name="l01037"></a>01037 KJS_CHECK_THIS( <a class="code" href="classKJS_1_1DOMCSSPrimitiveValue.html">KJS::DOMCSSPrimitiveValue</a>, thisObj ); <a name="l01038"></a>01038 <a class="code" href="classDOM_1_1CSSPrimitiveValue.html">DOM::CSSPrimitiveValue</a> val = static_cast<DOMCSSPrimitiveValue *>(thisObj.imp())-><a class="code" href="classKJS_1_1DOMCSSPrimitiveValue.html#d7b8063a9529fe8e9451f826289b7277">toCSSPrimitiveValue</a>(); <a name="l01039"></a>01039 <span class="keywordflow">switch</span> (<span class="keywordtype">id</span>) { <a name="l01040"></a>01040 <span class="keywordflow">case</span> DOMCSSPrimitiveValue::SetFloatValue: <a name="l01041"></a>01041 val.<a class="code" href="classDOM_1_1CSSPrimitiveValue.html#770931b1336a652a7c21e92a3bf14041">setFloatValue</a>(args[0].toInteger(exec),args[1].toNumber(exec)); <a name="l01042"></a>01042 <span class="keywordflow">return</span> Undefined(); <a name="l01043"></a>01043 <span class="keywordflow">case</span> DOMCSSPrimitiveValue::GetFloatValue: <a name="l01044"></a>01044 <span class="keywordflow">return</span> Number(val.<a class="code" href="classDOM_1_1CSSPrimitiveValue.html#b22847ee35f2f63813f668a69aa05358">getFloatValue</a>(args[0].toInteger(exec))); <a name="l01045"></a>01045 <span class="keywordflow">case</span> DOMCSSPrimitiveValue::SetStringValue: <a name="l01046"></a>01046 val.<a class="code" href="classDOM_1_1CSSPrimitiveValue.html#d9c671f9797cfd694adc65b3d85e7880">setStringValue</a>(args[0].toInteger(exec),args[1].<a class="code" href="classKJS_1_1DOMObject.html#62c00ea4fde606fc8aeec77bab0d07b0">toString</a>(exec).string()); <a name="l01047"></a>01047 <span class="keywordflow">return</span> Undefined(); <a name="l01048"></a>01048 <span class="keywordflow">case</span> DOMCSSPrimitiveValue::GetStringValue: <a name="l01049"></a>01049 <span class="keywordflow">return</span> String(val.<a class="code" href="classDOM_1_1CSSPrimitiveValue.html#def0c94aaa36b21ce813e05ce3a21fcf">getStringValue</a>()); <a name="l01050"></a>01050 <span class="keywordflow">case</span> DOMCSSPrimitiveValue::GetCounterValue: <a name="l01051"></a>01051 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#35fb8c9dcece12496a784d53482a556d">getDOMCounter</a>(exec,val.<a class="code" href="classDOM_1_1CSSPrimitiveValue.html#2bf168816f60cda3536fbc3f7ce2ce9d">getCounterValue</a>()); <a name="l01052"></a>01052 <span class="keywordflow">case</span> DOMCSSPrimitiveValue::GetRectValue: <a name="l01053"></a>01053 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#fdb84bf2f1845af7b1b89c35b4cfd8a5">getDOMRect</a>(exec,val.<a class="code" href="classDOM_1_1CSSPrimitiveValue.html#c81042af020ff6d5d74a3a40bc18679e">getRectValue</a>()); <a name="l01054"></a>01054 <span class="keywordflow">case</span> DOMCSSPrimitiveValue::GetRGBColorValue: <a name="l01055"></a>01055 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#b3b83beb9fe91d495fe620c5a0e8104a">getDOMRGBColor</a>(exec,val.<a class="code" href="classDOM_1_1CSSPrimitiveValue.html#62fbd4c889b101f219f16c51ba9d70f2">getRGBColorValue</a>()); <a name="l01056"></a>01056 <span class="keywordflow">default</span>: <a name="l01057"></a>01057 <span class="keywordflow">return</span> Undefined(); <a name="l01058"></a>01058 } <a name="l01059"></a>01059 } <a name="l01060"></a>01060 <a name="l01061"></a>01061 <span class="comment">// -------------------------------------------------------------------------</span> <a name="l01062"></a>01062 <a name="l01063"></a>01063 <span class="keyword">const</span> ClassInfo <a class="code" href="classKJS_1_1CSSPrimitiveValueConstructor.html#87ffef574347944946588b593b0fb2b9">CSSPrimitiveValueConstructor::info</a> = { <span class="stringliteral">"CSSPrimitiveValueConstructor"</span>, 0, &<a class="code" href="namespaceKJS.html#1f1fb50b43bd6438ad8b85acab609211">CSSPrimitiveValueConstructorTable</a>, 0 }; <a name="l01064"></a>01064 <a name="l01065"></a>01065 <span class="comment">/*</span> <a name="l01066"></a>01066 <span class="comment">@begin CSSPrimitiveValueConstructorTable 27</span> <a name="l01067"></a>01067 <span class="comment"> CSS_UNKNOWN DOM::CSSPrimitiveValue::CSS_UNKNOWN DontDelete|ReadOnly</span> <a name="l01068"></a>01068 <span class="comment"> CSS_NUMBER DOM::CSSPrimitiveValue::CSS_NUMBER DontDelete|ReadOnly</span> <a name="l01069"></a>01069 <span class="comment"> CSS_PERCENTAGE DOM::CSSPrimitiveValue::CSS_PERCENTAGE DontDelete|ReadOnly</span> <a name="l01070"></a>01070 <span class="comment"> CSS_EMS DOM::CSSPrimitiveValue::CSS_EMS DontDelete|ReadOnly</span> <a name="l01071"></a>01071 <span class="comment"> CSS_EXS DOM::CSSPrimitiveValue::CSS_EXS DontDelete|ReadOnly</span> <a name="l01072"></a>01072 <span class="comment"> CSS_PX DOM::CSSPrimitiveValue::CSS_PX DontDelete|ReadOnly</span> <a name="l01073"></a>01073 <span class="comment"> CSS_CM DOM::CSSPrimitiveValue::CSS_CM DontDelete|ReadOnly</span> <a name="l01074"></a>01074 <span class="comment"> CSS_MM DOM::CSSPrimitiveValue::CSS_MM DontDelete|ReadOnly</span> <a name="l01075"></a>01075 <span class="comment"> CSS_IN DOM::CSSPrimitiveValue::CSS_IN DontDelete|ReadOnly</span> <a name="l01076"></a>01076 <span class="comment"> CSS_PT DOM::CSSPrimitiveValue::CSS_PT DontDelete|ReadOnly</span> <a name="l01077"></a>01077 <span class="comment"> CSS_PC DOM::CSSPrimitiveValue::CSS_PC DontDelete|ReadOnly</span> <a name="l01078"></a>01078 <span class="comment"> CSS_DEG DOM::CSSPrimitiveValue::CSS_DEG DontDelete|ReadOnly</span> <a name="l01079"></a>01079 <span class="comment"> CSS_RAD DOM::CSSPrimitiveValue::CSS_RAD DontDelete|ReadOnly</span> <a name="l01080"></a>01080 <span class="comment"> CSS_GRAD DOM::CSSPrimitiveValue::CSS_GRAD DontDelete|ReadOnly</span> <a name="l01081"></a>01081 <span class="comment"> CSS_MS DOM::CSSPrimitiveValue::CSS_MS DontDelete|ReadOnly</span> <a name="l01082"></a>01082 <span class="comment"> CSS_S DOM::CSSPrimitiveValue::CSS_S DontDelete|ReadOnly</span> <a name="l01083"></a>01083 <span class="comment"> CSS_HZ DOM::CSSPrimitiveValue::CSS_HZ DontDelete|ReadOnly</span> <a name="l01084"></a>01084 <span class="comment"> CSS_KHZ DOM::CSSPrimitiveValue::CSS_KHZ DontDelete|ReadOnly</span> <a name="l01085"></a>01085 <span class="comment"> CSS_DIMENSION DOM::CSSPrimitiveValue::CSS_DIMENSION DontDelete|ReadOnly</span> <a name="l01086"></a>01086 <span class="comment"> CSS_STRING DOM::CSSPrimitiveValue::CSS_STRING DontDelete|ReadOnly</span> <a name="l01087"></a>01087 <span class="comment"> CSS_URI DOM::CSSPrimitiveValue::CSS_URI DontDelete|ReadOnly</span> <a name="l01088"></a>01088 <span class="comment"> CSS_IDENT DOM::CSSPrimitiveValue::CSS_IDENT DontDelete|ReadOnly</span> <a name="l01089"></a>01089 <span class="comment"> CSS_ATTR DOM::CSSPrimitiveValue::CSS_ATTR DontDelete|ReadOnly</span> <a name="l01090"></a>01090 <span class="comment"> CSS_COUNTER DOM::CSSPrimitiveValue::CSS_COUNTER DontDelete|ReadOnly</span> <a name="l01091"></a>01091 <span class="comment"> CSS_RECT DOM::CSSPrimitiveValue::CSS_RECT DontDelete|ReadOnly</span> <a name="l01092"></a>01092 <span class="comment"> CSS_RGBCOLOR DOM::CSSPrimitiveValue::CSS_RGBCOLOR DontDelete|ReadOnly</span> <a name="l01093"></a>01093 <span class="comment">@end</span> <a name="l01094"></a>01094 <span class="comment">*/</span> <a name="l01095"></a>01095 <a name="l01096"></a><a class="code" href="classKJS_1_1CSSPrimitiveValueConstructor.html#2c3f31f064401429f0bff87475406bf5">01096</a> Value <a class="code" href="classKJS_1_1CSSPrimitiveValueConstructor.html#2c3f31f064401429f0bff87475406bf5">CSSPrimitiveValueConstructor::tryGet</a>(ExecState *exec, <span class="keyword">const</span> Identifier &p)<span class="keyword"> const</span> <a name="l01097"></a>01097 <span class="keyword"></span>{ <a name="l01098"></a>01098 <span class="keywordflow">return</span> DOMObjectLookupGetValue<CSSPrimitiveValueConstructor,CSSValueConstructor>(exec,p,&<a class="code" href="namespaceKJS.html#1f1fb50b43bd6438ad8b85acab609211">CSSPrimitiveValueConstructorTable</a>,<span class="keyword">this</span>); <a name="l01099"></a>01099 } <a name="l01100"></a>01100 <a name="l01101"></a><a class="code" href="classKJS_1_1CSSPrimitiveValueConstructor.html#39eaeb6b34589479865e8ef4028c3bab">01101</a> Value <a class="code" href="classKJS_1_1CSSPrimitiveValueConstructor.html#39eaeb6b34589479865e8ef4028c3bab">CSSPrimitiveValueConstructor::getValueProperty</a>(ExecState *, <span class="keywordtype">int</span> token)<span class="keyword"> const</span> <a name="l01102"></a>01102 <span class="keyword"></span>{ <a name="l01103"></a>01103 <span class="comment">// We use the token as the value to return directly</span> <a name="l01104"></a>01104 <span class="keywordflow">return</span> Number(token); <a name="l01105"></a>01105 } <a name="l01106"></a>01106 <a name="l01107"></a><a class="code" href="namespaceKJS.html#24d707f1928ce269a66e8982ff1aaea2">01107</a> Value <a class="code" href="namespaceKJS.html#24d707f1928ce269a66e8982ff1aaea2">KJS::getCSSPrimitiveValueConstructor</a>(ExecState *exec) <a name="l01108"></a>01108 { <a name="l01109"></a>01109 <span class="keywordflow">return</span> cacheGlobalObject<CSSPrimitiveValueConstructor>( exec, <span class="stringliteral">"[[cssPrimitiveValue.constructor]]"</span> ); <a name="l01110"></a>01110 } <a name="l01111"></a>01111 <a name="l01112"></a>01112 <span class="comment">// -------------------------------------------------------------------------</span> <a name="l01113"></a>01113 <a name="l01114"></a>01114 <span class="keyword">const</span> ClassInfo DOMCSSValueList::info = { <span class="stringliteral">"CSSValueList"</span>, 0, &<a class="code" href="namespaceKJS.html#ff4511a4c6c507195561845c7418e01e">DOMCSSValueListTable</a>, 0 }; <a name="l01115"></a>01115 <a name="l01116"></a>01116 <span class="comment">/*</span> <a name="l01117"></a>01117 <span class="comment">@begin DOMCSSValueListTable 3</span> <a name="l01118"></a>01118 <span class="comment"> length DOMCSSValueList::Length DontDelete|ReadOnly</span> <a name="l01119"></a>01119 <span class="comment"> item DOMCSSValueList::Item DontDelete|Function 1</span> <a name="l01120"></a>01120 <span class="comment">@end</span> <a name="l01121"></a>01121 <span class="comment">*/</span> <a name="l01122"></a>01122 IMPLEMENT_PROTOFUNC_DOM(DOMCSSValueListFunc) <span class="comment">// not really a proto, but doesn't matter</span> <a name="l01123"></a>01123 <a name="l01124"></a>01124 <a class="code" href="classKJS_1_1DOMCSSValueList.html">DOMCSSValueList</a>::<a class="code" href="classKJS_1_1DOMCSSValueList.html">DOMCSSValueList</a>(ExecState *exec, const DOM::CSSValueList& v) <a name="l01125"></a>01125 : <a class="code" href="classKJS_1_1DOMCSSValue.html">DOMCSSValue</a>(exec, v) { } <a name="l01126"></a>01126 <a name="l01127"></a><a class="code" href="classKJS_1_1DOMCSSValueList.html#119926111030efcc761257d7c14a9827">01127</a> Value DOMCSSValueList::tryGet(ExecState *exec, <span class="keyword">const</span> Identifier &p)<span class="keyword"> const</span> <a name="l01128"></a>01128 <span class="keyword"></span>{ <a name="l01129"></a>01129 Value result; <a name="l01130"></a>01130 <a class="code" href="classDOM_1_1CSSValueList.html">DOM::CSSValueList</a> valueList = static_cast<DOM::CSSValueList>(<a class="code" href="classKJS_1_1DOMCSSValue.html#2af37d51249345a4b9986a406921bd67">cssValue</a>); <a name="l01131"></a>01131 <a name="l01132"></a>01132 <span class="keywordflow">if</span> (p == lengthPropertyName) <a name="l01133"></a>01133 <span class="keywordflow">return</span> Number(valueList.<a class="code" href="classDOM_1_1CSSValueList.html#87642555efee080ac508944c24f89652">length</a>()); <a name="l01134"></a>01134 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (p == <span class="stringliteral">"item"</span>) <a name="l01135"></a>01135 <span class="keywordflow">return</span> lookupOrCreateFunction<DOMCSSValueListFunc>(exec,p,<span class="keyword">this</span>,DOMCSSValueList::Item,1,DontDelete|Function); <a name="l01136"></a>01136 <a name="l01137"></a>01137 <span class="keywordtype">bool</span> ok; <a name="l01138"></a>01138 <span class="keywordtype">long</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> u = p.toULong(&ok); <a name="l01139"></a>01139 <span class="keywordflow">if</span> (ok) <a name="l01140"></a>01140 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#4b8eeb2da30d4c10ad83a9889b271da5">getDOMCSSValue</a>(exec,valueList.<a class="code" href="classDOM_1_1CSSValueList.html#a60d7d4ab5805fdbf50c58ad323f55bc">item</a>(u)); <a name="l01141"></a>01141 <a name="l01142"></a>01142 <span class="keywordflow">return</span> <a class="code" href="classKJS_1_1DOMCSSValue.html#a0ca5b8e03401f0986298da7bc92f8f1">DOMCSSValue::tryGet</a>(exec,p); <a name="l01143"></a>01143 } <a name="l01144"></a>01144 <a name="l01145"></a>01145 Value DOMCSSValueListFunc::tryCall(ExecState *exec, Object &thisObj, <span class="keyword">const</span> List &args) <a name="l01146"></a>01146 { <a name="l01147"></a>01147 KJS_CHECK_THIS( <a class="code" href="classKJS_1_1DOMCSSValueList.html">KJS::DOMCSSValueList</a>, thisObj ); <a name="l01148"></a>01148 <a class="code" href="classDOM_1_1CSSValueList.html">DOM::CSSValueList</a> valueList = static_cast<DOMCSSValueList *>(thisObj.imp())-><a class="code" href="classKJS_1_1DOMCSSValueList.html#b4e5bd8304fddbccf7990a5a36b9235f">toValueList</a>(); <a name="l01149"></a>01149 <span class="keywordflow">switch</span> (<span class="keywordtype">id</span>) { <a name="l01150"></a>01150 <span class="keywordflow">case</span> DOMCSSValueList::Item: <a name="l01151"></a>01151 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#4b8eeb2da30d4c10ad83a9889b271da5">getDOMCSSValue</a>(exec,valueList.<a class="code" href="classDOM_1_1CSSValueList.html#a60d7d4ab5805fdbf50c58ad323f55bc">item</a>(args[0].toInteger(exec))); <a name="l01152"></a>01152 <span class="keywordflow">default</span>: <a name="l01153"></a>01153 <span class="keywordflow">return</span> Undefined(); <a name="l01154"></a>01154 } <a name="l01155"></a>01155 } <a name="l01156"></a>01156 <a name="l01157"></a>01157 <span class="comment">// -------------------------------------------------------------------------</span> <a name="l01158"></a>01158 <a name="l01159"></a>01159 <span class="keyword">const</span> ClassInfo <a class="code" href="classKJS_1_1DOMRGBColor.html#2d638f5c8d98292c585573e6f4380600">DOMRGBColor::info</a> = { <span class="stringliteral">"RGBColor"</span>, 0, &<a class="code" href="namespaceKJS.html#2a18e8ee16bf3e183f23ef1adc9f527d">DOMRGBColorTable</a>, 0 }; <a name="l01160"></a>01160 <a name="l01161"></a>01161 <span class="comment">/*</span> <a name="l01162"></a>01162 <span class="comment">@begin DOMRGBColorTable 3</span> <a name="l01163"></a>01163 <span class="comment"> red DOMRGBColor::Red DontDelete|ReadOnly</span> <a name="l01164"></a>01164 <span class="comment"> green DOMRGBColor::Green DontDelete|ReadOnly</span> <a name="l01165"></a>01165 <span class="comment"> blue DOMRGBColor::Blue DontDelete|ReadOnly</span> <a name="l01166"></a>01166 <span class="comment">@end</span> <a name="l01167"></a>01167 <span class="comment">*/</span> <a name="l01168"></a>01168 <a name="l01169"></a><a class="code" href="classKJS_1_1DOMRGBColor.html#867ce8ddcb72900b234ead8eeff69c1d">01169</a> <a class="code" href="classKJS_1_1DOMRGBColor.html#867ce8ddcb72900b234ead8eeff69c1d">DOMRGBColor::DOMRGBColor</a>(ExecState* exec, <span class="keyword">const</span> <a class="code" href="classDOM_1_1RGBColor.html">DOM::RGBColor</a>& c) <a name="l01170"></a>01170 : <a class="code" href="classKJS_1_1DOMObject.html">DOMObject</a>(exec->interpreter()->builtinObjectPrototype()), rgbColor(c) <a name="l01171"></a>01171 { <a name="l01172"></a>01172 } <a name="l01173"></a>01173 <a name="l01174"></a><a class="code" href="classKJS_1_1DOMRGBColor.html#f4af9b5c3bfefe2794268acb7e1370f8">01174</a> <a class="code" href="classKJS_1_1DOMRGBColor.html#f4af9b5c3bfefe2794268acb7e1370f8">DOMRGBColor::~DOMRGBColor</a>() <a name="l01175"></a>01175 { <a name="l01176"></a>01176 <span class="comment">//rgbColors.remove(rgbColor.handle());</span> <a name="l01177"></a>01177 } <a name="l01178"></a>01178 <a name="l01179"></a><a class="code" href="classKJS_1_1DOMRGBColor.html#f00567793be1d9d251466519c4f07dd7">01179</a> Value <a class="code" href="classKJS_1_1DOMRGBColor.html#f00567793be1d9d251466519c4f07dd7">DOMRGBColor::tryGet</a>(ExecState *exec, <span class="keyword">const</span> Identifier &p)<span class="keyword"> const</span> <a name="l01180"></a>01180 <span class="keyword"></span>{ <a name="l01181"></a>01181 <span class="keywordflow">return</span> DOMObjectLookupGetValue<DOMRGBColor,DOMObject>(exec, p, <a name="l01182"></a>01182 &<a class="code" href="namespaceKJS.html#2a18e8ee16bf3e183f23ef1adc9f527d">DOMRGBColorTable</a>, <a name="l01183"></a>01183 <span class="keyword">this</span>); <a name="l01184"></a>01184 } <a name="l01185"></a>01185 <a name="l01186"></a><a class="code" href="classKJS_1_1DOMRGBColor.html#f33830a7f7403b00c0de2c25113a6854">01186</a> Value <a class="code" href="classKJS_1_1DOMRGBColor.html#f33830a7f7403b00c0de2c25113a6854">DOMRGBColor::getValueProperty</a>(ExecState *exec, <span class="keywordtype">int</span> token)<span class="keyword"> const</span> <a name="l01187"></a>01187 <span class="keyword"></span>{ <a name="l01188"></a>01188 <span class="keywordflow">switch</span> (token) { <a name="l01189"></a>01189 <span class="keywordflow">case</span> Red: <a name="l01190"></a>01190 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#4b8eeb2da30d4c10ad83a9889b271da5">getDOMCSSValue</a>(exec, <a class="code" href="classKJS_1_1DOMRGBColor.html#cca4d91f309cff161b10b7d09edb976a">rgbColor</a>.<a class="code" href="classDOM_1_1RGBColor.html#cd5c81ba99787810909c1ed78bcf5484">red</a>()); <a name="l01191"></a>01191 <span class="keywordflow">case</span> Green: <a name="l01192"></a>01192 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#4b8eeb2da30d4c10ad83a9889b271da5">getDOMCSSValue</a>(exec, <a class="code" href="classKJS_1_1DOMRGBColor.html#cca4d91f309cff161b10b7d09edb976a">rgbColor</a>.<a class="code" href="classDOM_1_1RGBColor.html#31f3634947a28fec25a608260f24e08c">green</a>()); <a name="l01193"></a>01193 <span class="keywordflow">case</span> Blue: <a name="l01194"></a>01194 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#4b8eeb2da30d4c10ad83a9889b271da5">getDOMCSSValue</a>(exec, <a class="code" href="classKJS_1_1DOMRGBColor.html#cca4d91f309cff161b10b7d09edb976a">rgbColor</a>.<a class="code" href="classDOM_1_1RGBColor.html#b185bca1a43d49262dac072433a321c6">blue</a>()); <a name="l01195"></a>01195 <span class="keywordflow">default</span>: <a name="l01196"></a>01196 <span class="keywordflow">return</span> Value(); <a name="l01197"></a>01197 } <a name="l01198"></a>01198 } <a name="l01199"></a>01199 <a name="l01200"></a><a class="code" href="namespaceKJS.html#b3b83beb9fe91d495fe620c5a0e8104a">01200</a> Value <a class="code" href="namespaceKJS.html#b3b83beb9fe91d495fe620c5a0e8104a">KJS::getDOMRGBColor</a>(ExecState *exec, <span class="keyword">const</span> <a class="code" href="classDOM_1_1RGBColor.html">DOM::RGBColor</a>& c) <a name="l01201"></a>01201 { <a name="l01202"></a>01202 <span class="comment">// ### implement equals for RGBColor since they're not refcounted objects</span> <a name="l01203"></a>01203 <span class="keywordflow">return</span> Value(<span class="keyword">new</span> <a class="code" href="classKJS_1_1DOMRGBColor.html">DOMRGBColor</a>(exec, c)); <a name="l01204"></a>01204 } <a name="l01205"></a>01205 <a name="l01206"></a>01206 <span class="comment">// -------------------------------------------------------------------------</span> <a name="l01207"></a>01207 <a name="l01208"></a>01208 <span class="keyword">const</span> ClassInfo DOMRect::info = { <span class="stringliteral">"Rect"</span>, 0, &<a class="code" href="namespaceKJS.html#454e9c853e6487ea36fd440a4d73b8d7">DOMRectTable</a>, 0 }; <a name="l01209"></a>01209 <span class="comment">/*</span> <a name="l01210"></a>01210 <span class="comment">@begin DOMRectTable 4</span> <a name="l01211"></a>01211 <span class="comment"> top DOMRect::Top DontDelete|ReadOnly</span> <a name="l01212"></a>01212 <span class="comment"> right DOMRect::Right DontDelete|ReadOnly</span> <a name="l01213"></a>01213 <span class="comment"> bottom DOMRect::Bottom DontDelete|ReadOnly</span> <a name="l01214"></a>01214 <span class="comment"> left DOMRect::Left DontDelete|ReadOnly</span> <a name="l01215"></a>01215 <span class="comment">@end</span> <a name="l01216"></a>01216 <span class="comment">*/</span> <a name="l01217"></a>01217 <a name="l01218"></a><a class="code" href="classKJS_1_1DOMRect.html#eda60dee96ed2212608178fb9cebd1b6">01218</a> DOMRect::DOMRect(ExecState *exec, <span class="keyword">const</span> <a class="code" href="classDOM_1_1Rect.html">DOM::Rect</a>& r) <a name="l01219"></a>01219 : <a class="code" href="classKJS_1_1DOMObject.html">DOMObject</a>(exec->interpreter()->builtinObjectPrototype()), rect(r) <a name="l01220"></a>01220 { <a name="l01221"></a>01221 } <a name="l01222"></a>01222 <a name="l01223"></a><a class="code" href="classKJS_1_1DOMRect.html#6263f1ca4e1225a837fd5a47335c5d79">01223</a> <a class="code" href="classKJS_1_1DOMRect.html#6263f1ca4e1225a837fd5a47335c5d79">DOMRect::~DOMRect</a>() <a name="l01224"></a>01224 { <a name="l01225"></a>01225 <a class="code" href="classKJS_1_1ScriptInterpreter.html#119bb67f3e96835ceebba110292ea63e">ScriptInterpreter::forgetDOMObject</a>(<a class="code" href="classKJS_1_1DOMRect.html#0b216c34cf67194177ea0e8a64ac75c4">rect</a>.<a class="code" href="classDOM_1_1Rect.html#759830abdd285fe7dee2e111b2bd7fb3">handle</a>()); <a name="l01226"></a>01226 } <a name="l01227"></a>01227 <a name="l01228"></a><a class="code" href="classKJS_1_1DOMRect.html#3a1442c44c9c449bb7bf588f4f6209fa">01228</a> Value <a class="code" href="classKJS_1_1DOMRect.html#3a1442c44c9c449bb7bf588f4f6209fa">DOMRect::tryGet</a>(ExecState *exec, <span class="keyword">const</span> Identifier &p)<span class="keyword"> const</span> <a name="l01229"></a>01229 <span class="keyword"></span>{ <a name="l01230"></a>01230 <span class="keywordflow">return</span> DOMObjectLookupGetValue<DOMRect,DOMObject>(exec, p, <a name="l01231"></a>01231 &<a class="code" href="namespaceKJS.html#454e9c853e6487ea36fd440a4d73b8d7">DOMRectTable</a>, <span class="keyword">this</span>); <a name="l01232"></a>01232 } <a name="l01233"></a>01233 <a name="l01234"></a><a class="code" href="classKJS_1_1DOMRect.html#3761807bb1223ad53fb0d9455016a0fa">01234</a> Value <a class="code" href="classKJS_1_1DOMRect.html#3761807bb1223ad53fb0d9455016a0fa">DOMRect::getValueProperty</a>(ExecState *exec, <span class="keywordtype">int</span> token)<span class="keyword"> const</span> <a name="l01235"></a>01235 <span class="keyword"></span>{ <a name="l01236"></a>01236 <span class="keywordflow">switch</span> (token) { <a name="l01237"></a>01237 <span class="keywordflow">case</span> Top: <a name="l01238"></a>01238 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#4b8eeb2da30d4c10ad83a9889b271da5">getDOMCSSValue</a>(exec, <a class="code" href="classKJS_1_1DOMRect.html#0b216c34cf67194177ea0e8a64ac75c4">rect</a>.<a class="code" href="classDOM_1_1Rect.html#23044e5806890732c28bf1d9dede9d33">top</a>()); <a name="l01239"></a>01239 <span class="keywordflow">case</span> Right: <a name="l01240"></a>01240 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#4b8eeb2da30d4c10ad83a9889b271da5">getDOMCSSValue</a>(exec, <a class="code" href="classKJS_1_1DOMRect.html#0b216c34cf67194177ea0e8a64ac75c4">rect</a>.<a class="code" href="classDOM_1_1Rect.html#544eb374de0196df1a1329b6d8d68c75">right</a>()); <a name="l01241"></a>01241 <span class="keywordflow">case</span> Bottom: <a name="l01242"></a>01242 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#4b8eeb2da30d4c10ad83a9889b271da5">getDOMCSSValue</a>(exec, <a class="code" href="classKJS_1_1DOMRect.html#0b216c34cf67194177ea0e8a64ac75c4">rect</a>.<a class="code" href="classDOM_1_1Rect.html#35aec92ebd87583b22cce7d9733de8d9">bottom</a>()); <a name="l01243"></a>01243 <span class="keywordflow">case</span> Left: <a name="l01244"></a>01244 <span class="keywordflow">return</span> <a class="code" href="namespaceKJS.html#4b8eeb2da30d4c10ad83a9889b271da5">getDOMCSSValue</a>(exec, <a class="code" href="classKJS_1_1DOMRect.html#0b216c34cf67194177ea0e8a64ac75c4">rect</a>.<a class="code" href="classDOM_1_1Rect.html#012c2943b4c33f819e5da89484154262">left</a>()); <a name="l01245"></a>01245 <span class="keywordflow">default</span>: <a name="l01246"></a>01246 <span class="keywordflow">return</span> Value(); <a name="l01247"></a>01247 } <a name="l01248"></a>01248 } <a name="l01249"></a>01249 <a name="l01250"></a><a class="code" href="namespaceKJS.html#fdb84bf2f1845af7b1b89c35b4cfd8a5">01250</a> Value <a class="code" href="namespaceKJS.html#fdb84bf2f1845af7b1b89c35b4cfd8a5">KJS::getDOMRect</a>(ExecState *exec, <span class="keyword">const</span> <a class="code" href="classDOM_1_1Rect.html">DOM::Rect</a>& r) <a name="l01251"></a>01251 { <a name="l01252"></a>01252 <span class="keywordflow">return</span> cacheDOMObject<DOM::Rect, KJS::DOMRect>(exec, r); <a name="l01253"></a>01253 } <a name="l01254"></a>01254 <a name="l01255"></a>01255 <span class="comment">// -------------------------------------------------------------------------</span> <a name="l01256"></a>01256 <a name="l01257"></a>01257 <span class="keyword">const</span> ClassInfo DOMCounter::info = { <span class="stringliteral">"Counter"</span>, 0, &<a class="code" href="namespaceKJS.html#14c340bb2cf2244b0b77a20905fab40c">DOMCounterTable</a>, 0 }; <a name="l01258"></a>01258 <span class="comment">/*</span> <a name="l01259"></a>01259 <span class="comment">@begin DOMCounterTable 3</span> <a name="l01260"></a>01260 <span class="comment"> identifier DOMCounter::identifier DontDelete|ReadOnly</span> <a name="l01261"></a>01261 <span class="comment"> listStyle DOMCounter::listStyle DontDelete|ReadOnly</span> <a name="l01262"></a>01262 <span class="comment"> separator DOMCounter::separator DontDelete|ReadOnly</span> <a name="l01263"></a>01263 <span class="comment">@end</span> <a name="l01264"></a>01264 <span class="comment">*/</span> <a name="l01265"></a><a class="code" href="classKJS_1_1DOMCounter.html#6835a783b3a693680dde9a436e4bef5c">01265</a> DOMCounter::DOMCounter(ExecState *exec, <span class="keyword">const</span> <a class="code" href="classDOM_1_1Counter.html">DOM::Counter</a>& c) <a name="l01266"></a>01266 : <a class="code" href="classKJS_1_1DOMObject.html">DOMObject</a>(exec->interpreter()->builtinObjectPrototype()), counter(c) <a name="l01267"></a>01267 { <a name="l01268"></a>01268 } <a name="l01269"></a>01269 <a name="l01270"></a><a class="code" href="classKJS_1_1DOMCounter.html#345f3fa1112c5b42b2108ba6ef0ed1f1">01270</a> <a class="code" href="classKJS_1_1DOMCounter.html#345f3fa1112c5b42b2108ba6ef0ed1f1">DOMCounter::~DOMCounter</a>() <a name="l01271"></a>01271 { <a name="l01272"></a>01272 <a class="code" href="classKJS_1_1ScriptInterpreter.html#119bb67f3e96835ceebba110292ea63e">ScriptInterpreter::forgetDOMObject</a>(<a class="code" href="classKJS_1_1DOMCounter.html#2609ebc46d694e6aebab052e2d46cf71">counter</a>.<a class="code" href="classDOM_1_1Counter.html#d2649969904c5df62708598a10305f13">handle</a>()); <a name="l01273"></a>01273 } <a name="l01274"></a>01274 <a name="l01275"></a><a class="code" href="classKJS_1_1DOMCounter.html#cc46a69a615d610e7e367e9c1dbac3fb">01275</a> Value <a class="code" href="classKJS_1_1DOMCounter.html#cc46a69a615d610e7e367e9c1dbac3fb">DOMCounter::tryGet</a>(ExecState *exec, <span class="keyword">const</span> Identifier &p)<span class="keyword"> const</span> <a name="l01276"></a>01276 <span class="keyword"></span>{ <a name="l01277"></a>01277 <span class="keywordflow">return</span> DOMObjectLookupGetValue<DOMCounter,DOMObject>(exec, p, <a name="l01278"></a>01278 &<a class="code" href="namespaceKJS.html#14c340bb2cf2244b0b77a20905fab40c">DOMCounterTable</a>, <span class="keyword">this</span>); <a name="l01279"></a>01279 } <a name="l01280"></a>01280 <a name="l01281"></a><a class="code" href="classKJS_1_1DOMCounter.html#d977e9056983e0d878cd0215135bf4dc">01281</a> Value <a class="code" href="classKJS_1_1DOMCounter.html#d977e9056983e0d878cd0215135bf4dc">DOMCounter::getValueProperty</a>(ExecState *, <span class="keywordtype">int</span> token)<span class="keyword"> const</span> <a name="l01282"></a>01282 <span class="keyword"></span>{ <a name="l01283"></a>01283 <span class="keywordflow">switch</span> (token) { <a name="l01284"></a>01284 <span class="keywordflow">case</span> identifier: <a name="l01285"></a>01285 <span class="keywordflow">return</span> String(<a class="code" href="classKJS_1_1DOMCounter.html#2609ebc46d694e6aebab052e2d46cf71">counter</a>.<a class="code" href="classDOM_1_1Counter.html#a4c2abc6cb0635d6919cfc8765fab94e">identifier</a>()); <a name="l01286"></a>01286 <span class="keywordflow">case</span> listStyle: <a name="l01287"></a>01287 <span class="keywordflow">return</span> String(<a class="code" href="classKJS_1_1DOMCounter.html#2609ebc46d694e6aebab052e2d46cf71">counter</a>.<a class="code" href="classDOM_1_1Counter.html#8610207b8c890f62973e60850bb8899c">listStyle</a>()); <a name="l01288"></a>01288 <span class="keywordflow">case</span> separator: <a name="l01289"></a>01289 <span class="keywordflow">return</span> String(<a class="code" href="classKJS_1_1DOMCounter.html#2609ebc46d694e6aebab052e2d46cf71">counter</a>.<a class="code" href="classDOM_1_1Counter.html#c2797b376392dbae8aa9e3abad8c901d">separator</a>()); <a name="l01290"></a>01290 <span class="keywordflow">default</span>: <a name="l01291"></a>01291 <span class="keywordflow">return</span> Value(); <a name="l01292"></a>01292 } <a name="l01293"></a>01293 } <a name="l01294"></a>01294 <a name="l01295"></a><a class="code" href="namespaceKJS.html#35fb8c9dcece12496a784d53482a556d">01295</a> Value <a class="code" href="namespaceKJS.html#35fb8c9dcece12496a784d53482a556d">KJS::getDOMCounter</a>(ExecState *exec, <span class="keyword">const</span> <a class="code" href="classDOM_1_1Counter.html">DOM::Counter</a>& c) <a name="l01296"></a>01296 { <a name="l01297"></a>01297 <span class="keywordflow">return</span> cacheDOMObject<DOM::Counter, KJS::DOMCounter>(exec, c); <a name="l01298"></a>01298 } </pre></div> </div></div> </td> </tr> <tr> <td valign="top" id="leftmenu" width="25%"> <a name="navigation"></a> <div class="menu_box"><h2>khtml</h2> <div class="nav_list"> <ul><li><a href="index.html">Main Page</a></li><li><a href="namespaces.html">Namespace List</a></li><li><a href="hierarchy.html">Class Hierarchy</a></li><li><a href="classes.html">Alphabetical List</a></li><li><a href="annotated.html">Class List</a></li><li><a href="files.html">File List</a></li><li><a href="namespacemembers.html">Namespace Members</a></li><li><a href="functions.html">Class Members</a></li><li><a href="pages.html">Related Pages</a></li></ul> <!-- <h2>Class Picker</h2> <div style="text-align: center;"> <form name="guideform"> <select name="guidelinks" style="width:100%;" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value"> <option value="annotated.html">-- Choose --</option> <option value="classAppletParameterDialog.html">appletparameterdialog</option>, <option value="classDOM_1_1AbstractView.html">dom::abstractview</option>, <option value="classDOM_1_1Attr.html">dom::attr</option>, <option value="classDOM_1_1CDATASection.html">dom::cdatasection</option>, <option value="classDOM_1_1CharacterData.html">dom::characterdata</option>, <option value="classDOM_1_1Comment.html">dom::comment</option>, <option value="classDOM_1_1Counter.html">dom::counter</option>, <option value="classDOM_1_1CounterActImpl.html">dom::counteractimpl</option>, <option value="classDOM_1_1CounterImpl.html">dom::counterimpl</option>, <option value="classDOM_1_1CSS2Azimuth.html">dom::css2azimuth</option>, <option value="classDOM_1_1CSS2AzimuthImpl.html">dom::css2azimuthimpl</option>, <option value="classDOM_1_1CSS2BackgroundPosition.html">dom::css2backgroundposition</option>, <option value="classDOM_1_1CSS2BackgroundPositionImpl.html">dom::css2backgroundpositionimpl</option>, <option value="classDOM_1_1CSS2BorderSpacing.html">dom::css2borderspacing</option>, <option value="classDOM_1_1CSS2BorderSpacingImpl.html">dom::css2borderspacingimpl</option>, <option value="classDOM_1_1CSS2CounterIncrement.html">dom::css2counterincrement</option>, <option value="classDOM_1_1CSS2CounterIncrementImpl.html">dom::css2counterincrementimpl</option>, <option value="classDOM_1_1CSS2CounterReset.html">dom::css2counterreset</option>, <option value="classDOM_1_1CSS2CounterResetImpl.html">dom::css2counterresetimpl</option>, <option value="classDOM_1_1CSS2Cursor.html">dom::css2cursor</option>, <option value="classDOM_1_1CSS2CursorImpl.html">dom::css2cursorimpl</option>, <option value="classDOM_1_1CSS2FontFaceSrc.html">dom::css2fontfacesrc</option>, <option value="classDOM_1_1CSS2FontFaceSrcImpl.html">dom::css2fontfacesrcimpl</option>, <option value="classDOM_1_1CSS2FontFaceWidths.html">dom::css2fontfacewidths</option>, <option value="classDOM_1_1CSS2FontFaceWidthsImpl.html">dom::css2fontfacewidthsimpl</option>, <option value="classDOM_1_1CSS2PageSize.html">dom::css2pagesize</option>, <option value="classDOM_1_1CSS2PageSizeImpl.html">dom::css2pagesizeimpl</option>, <option value="classDOM_1_1CSS2PlayDuring.html">dom::css2playduring</option>, <option value="classDOM_1_1CSS2PlayDuringImpl.html">dom::css2playduringimpl</option>, <option value="classDOM_1_1CSS2Properties.html">dom::css2properties</option>, <option value="classDOM_1_1CSS2PropertiesImpl.html">dom::css2propertiesimpl</option>, <option value="classDOM_1_1CSS2TextShadow.html">dom::css2textshadow</option>, <option value="classDOM_1_1CSS2TextShadowImpl.html">dom::css2textshadowimpl</option>, <option value="classDOM_1_1CSSCharsetRule.html">dom::csscharsetrule</option>, <option value="classDOM_1_1CSSCharsetRuleImpl.html">dom::csscharsetruleimpl</option>, <option value="classDOM_1_1CSSException.html">dom::cssexception</option>, <option value="classDOM_1_1CSSFontFaceRule.html">dom::cssfontfacerule</option>, <option value="classDOM_1_1CSSFontFaceRuleImpl.html">dom::cssfontfaceruleimpl</option>, <option value="classDOM_1_1CSSImageValueImpl.html">dom::cssimagevalueimpl</option>, <option value="classDOM_1_1CSSImportRule.html">dom::cssimportrule</option>, <option value="classDOM_1_1CSSImportRuleImpl.html">dom::cssimportruleimpl</option>, <option value="classDOM_1_1CSSInheritedValueImpl.html">dom::cssinheritedvalueimpl</option>, <option value="classDOM_1_1CSSInitialValueImpl.html">dom::cssinitialvalueimpl</option>, <option value="classDOM_1_1CSSMediaRule.html">dom::cssmediarule</option>, <option value="classDOM_1_1CSSMediaRuleImpl.html">dom::cssmediaruleimpl</option>, <option value="classDOM_1_1CSSPageRule.html">dom::csspagerule</option>, <option value="classDOM_1_1CSSPageRuleImpl.html">dom::csspageruleimpl</option>, <option value="classDOM_1_1CSSParser.html">dom::cssparser</option>, <option value="classDOM_1_1CSSPrimitiveValue.html">dom::cssprimitivevalue</option>, <option value="classDOM_1_1CSSPrimitiveValueImpl.html">dom::cssprimitivevalueimpl</option>, <option value="classDOM_1_1CSSProperty.html">dom::cssproperty</option>, <option value="classDOM_1_1CSSQuirkPrimitiveValueImpl.html">dom::cssquirkprimitivevalueimpl</option>, <option value="classDOM_1_1CSSRule.html">dom::cssrule</option>, <option value="classDOM_1_1CSSRuleImpl.html">dom::cssruleimpl</option>, <option value="classDOM_1_1CSSRuleList.html">dom::cssrulelist</option>, <option value="classDOM_1_1CSSRuleListImpl.html">dom::cssrulelistimpl</option>, <option value="classDOM_1_1CSSSelector.html">dom::cssselector</option>, <option value="classDOM_1_1CSSStyleDeclaration.html">dom::cssstyledeclaration</option>, <option value="classDOM_1_1CSSStyleDeclarationImpl.html">dom::cssstyledeclarationimpl</option>, <option value="classDOM_1_1CSSStyleRule.html">dom::cssstylerule</option>, <option value="classDOM_1_1CSSStyleRuleImpl.html">dom::cssstyleruleimpl</option>, <option value="classDOM_1_1CSSStyleSheet.html">dom::cssstylesheet</option>, <option value="classDOM_1_1CSSStyleSheetImpl.html">dom::cssstylesheetimpl</option>, <option value="classDOM_1_1CSSUnknownRule.html">dom::cssunknownrule</option>, <option value="classDOM_1_1CSSUnknownRuleImpl.html">dom::cssunknownruleimpl</option>, <option value="classDOM_1_1CSSValue.html">dom::cssvalue</option>, <option value="classDOM_1_1CSSValueImpl.html">dom::cssvalueimpl</option>, <option value="classDOM_1_1CSSValueList.html">dom::cssvaluelist</option>, <option value="classDOM_1_1CSSValueListImpl.html">dom::cssvaluelistimpl</option>, <option value="classDOM_1_1CustomNodeFilter.html">dom::customnodefilter</option>, <option value="classDOM_1_1Document.html">dom::document</option>, <option value="classDOM_1_1DocumentFragment.html">dom::documentfragment</option>, <option value="classDOM_1_1DocumentStyle.html">dom::documentstyle</option>, <option value="classDOM_1_1DocumentType.html">dom::documenttype</option>, <option value="classDOM_1_1DOMException.html">dom::domexception</option>, <option value="classDOM_1_1DOMImplementation.html">dom::domimplementation</option>, <option value="classDOM_1_1DomShared.html">dom::domshared</option>, <option value="classDOM_1_1DOMString.html">dom::domstring</option>, <option value="classDOM_1_1Element.html">dom::element</option>, <option value="classDOM_1_1Entity.html">dom::entity</option>, <option value="classDOM_1_1EntityReference.html">dom::entityreference</option>, <option value="classDOM_1_1Event.html">dom::event</option>, <option value="classDOM_1_1EventException.html">dom::eventexception</option>, <option value="classDOM_1_1EventListener.html">dom::eventlistener</option>, <option value="classDOM_1_1FontFamilyValueImpl.html">dom::fontfamilyvalueimpl</option>, <option value="classDOM_1_1FontValueImpl.html">dom::fontvalueimpl</option>, <option value="classDOM_1_1HTMLAnchorElement.html">dom::htmlanchorelement</option>, <option value="classDOM_1_1HTMLAppletElement.html">dom::htmlappletelement</option>, <option value="classDOM_1_1HTMLAreaElement.html">dom::htmlareaelement</option>, <option value="classDOM_1_1HTMLBaseElement.html">dom::htmlbaseelement</option>, <option value="classDOM_1_1HTMLBaseFontElement.html">dom::htmlbasefontelement</option>, <option value="classDOM_1_1HTMLBlockquoteElement.html">dom::htmlblockquoteelement</option>, <option value="classDOM_1_1HTMLBodyElement.html">dom::htmlbodyelement</option>, <option value="classDOM_1_1HTMLBRElement.html">dom::htmlbrelement</option>, <option value="classDOM_1_1HTMLButtonElement.html">dom::htmlbuttonelement</option>, <option value="classDOM_1_1HTMLCollection.html">dom::htmlcollection</option>, <option value="classDOM_1_1HTMLDirectoryElement.html">dom::htmldirectoryelement</option>, <option value="classDOM_1_1HTMLDivElement.html">dom::htmldivelement</option>, <option value="classDOM_1_1HTMLDListElement.html">dom::htmldlistelement</option>, <option value="classDOM_1_1HTMLDocument.html">dom::htmldocument</option>, <option value="classDOM_1_1HTMLElement.html">dom::htmlelement</option>, <option value="classDOM_1_1HTMLFieldSetElement.html">dom::htmlfieldsetelement</option>, <option value="classDOM_1_1HTMLFontElement.html">dom::htmlfontelement</option>, <option value="classDOM_1_1HTMLFormCollection.html">dom::htmlformcollection</option>, <option value="classDOM_1_1HTMLFormElement.html">dom::htmlformelement</option>, <option value="classDOM_1_1HTMLFrameElement.html">dom::htmlframeelement</option>, <option value="classDOM_1_1HTMLFrameSetElement.html">dom::htmlframesetelement</option>, <option value="classDOM_1_1HTMLHeadElement.html">dom::htmlheadelement</option>, <option value="classDOM_1_1HTMLHeadingElement.html">dom::htmlheadingelement</option>, <option value="classDOM_1_1HTMLHRElement.html">dom::htmlhrelement</option>, <option value="classDOM_1_1HTMLHtmlElement.html">dom::htmlhtmlelement</option>, <option value="classDOM_1_1HTMLIFrameElement.html">dom::htmliframeelement</option>, <option value="classDOM_1_1HTMLImageElement.html">dom::htmlimageelement</option>, <option value="classDOM_1_1HTMLInputElement.html">dom::htmlinputelement</option>, <option value="classDOM_1_1HTMLIsIndexElement.html">dom::htmlisindexelement</option>, <option value="classDOM_1_1HTMLLabelElement.html">dom::htmllabelelement</option>, <option value="classDOM_1_1HTMLLayerElement.html">dom::htmllayerelement</option>, <option value="classDOM_1_1HTMLLegendElement.html">dom::htmllegendelement</option>, <option value="classDOM_1_1HTMLLIElement.html">dom::htmllielement</option>, <option value="classDOM_1_1HTMLLinkElement.html">dom::htmllinkelement</option>, <option value="classDOM_1_1HTMLMapElement.html">dom::htmlmapelement</option>, <option value="classDOM_1_1HTMLMappedNameCollection.html">dom::htmlmappednamecollection</option>, <option value="classDOM_1_1HTMLMenuElement.html">dom::htmlmenuelement</option>, <option value="classDOM_1_1HTMLMetaElement.html">dom::htmlmetaelement</option>, <option value="classDOM_1_1HTMLModElement.html">dom::htmlmodelement</option>, <option value="classDOM_1_1HTMLObjectElement.html">dom::htmlobjectelement</option>, <option value="classDOM_1_1HTMLOListElement.html">dom::htmlolistelement</option>, <option value="classDOM_1_1HTMLOptGroupElement.html">dom::htmloptgroupelement</option>, <option value="classDOM_1_1HTMLOptionElement.html">dom::htmloptionelement</option>, <option value="classDOM_1_1HTMLParagraphElement.html">dom::htmlparagraphelement</option>, <option value="classDOM_1_1HTMLParamElement.html">dom::htmlparamelement</option>, <option value="classDOM_1_1HTMLPreElement.html">dom::htmlpreelement</option>, <option value="classDOM_1_1HTMLQuoteElement.html">dom::htmlquoteelement</option>, <option value="classDOM_1_1HTMLScriptElement.html">dom::htmlscriptelement</option>, <option value="classDOM_1_1HTMLSelectElement.html">dom::htmlselectelement</option>, <option value="classDOM_1_1HTMLStyleElement.html">dom::htmlstyleelement</option>, <option value="classDOM_1_1HTMLTableCaptionElement.html">dom::htmltablecaptionelement</option>, <option value="classDOM_1_1HTMLTableCellElement.html">dom::htmltablecellelement</option>, <option value="classDOM_1_1HTMLTableColElement.html">dom::htmltablecolelement</option>, <option value="classDOM_1_1HTMLTableElement.html">dom::htmltableelement</option>, <option value="classDOM_1_1HTMLTableRowElement.html">dom::htmltablerowelement</option>, <option value="classDOM_1_1HTMLTableSectionElement.html">dom::htmltablesectionelement</option>, <option value="classDOM_1_1HTMLTextAreaElement.html">dom::htmltextareaelement</option>, <option value="classDOM_1_1HTMLTitleElement.html">dom::htmltitleelement</option>, <option value="classDOM_1_1HTMLUListElement.html">dom::htmlulistelement</option>, <option value="classDOM_1_1LinkStyle.html">dom::linkstyle</option>, <option value="classDOM_1_1MediaList.html">dom::medialist</option>, <option value="classDOM_1_1MediaListImpl.html">dom::medialistimpl</option>, <option value="classDOM_1_1MouseEvent.html">dom::mouseevent</option>, <option value="classDOM_1_1MutationEvent.html">dom::mutationevent</option>, <option value="classDOM_1_1NamedNodeMap.html">dom::namednodemap</option>, <option value="classDOM_1_1Node.html">dom::node</option>, <option value="classDOM_1_1NodeFilter.html">dom::nodefilter</option>, <option value="classDOM_1_1NodeIterator.html">dom::nodeiterator</option>, <option value="classDOM_1_1NodeList.html">dom::nodelist</option>, <option value="classDOM_1_1Notation.html">dom::notation</option>, <option value="classDOM_1_1PairImpl.html">dom::pairimpl</option>, <option value="classDOM_1_1ProcessingInstruction.html">dom::processinginstruction</option>, <option value="classDOM_1_1QuotesValueImpl.html">dom::quotesvalueimpl</option>, <option value="classDOM_1_1Range.html">dom::range</option>, <option value="classDOM_1_1RangeException.html">dom::rangeexception</option>, <option value="classDOM_1_1Rect.html">dom::rect</option>, <option value="classDOM_1_1RectImpl.html">dom::rectimpl</option>, <option value="classDOM_1_1RGBColor.html">dom::rgbcolor</option>, <option value="classDOM_1_1ShadowValueImpl.html">dom::shadowvalueimpl</option>, <option value="classDOM_1_1StyleBaseImpl.html">dom::stylebaseimpl</option>, <option value="classDOM_1_1StyleListImpl.html">dom::stylelistimpl</option>, <option value="classDOM_1_1StyleSheet.html">dom::stylesheet</option>, <option value="classDOM_1_1StyleSheetImpl.html">dom::stylesheetimpl</option>, <option value="classDOM_1_1StyleSheetList.html">dom::stylesheetlist</option>, <option value="classDOM_1_1StyleSheetListImpl.html">dom::stylesheetlistimpl</option>, <option value="classDOM_1_1Text.html">dom::text</option>, <option value="classDOM_1_1TextEvent.html">dom::textevent</option>, <option value="classDOM_1_1TreeWalker.html">dom::treewalker</option>, <option value="classDOM_1_1UIEvent.html">dom::uievent</option>, <option value="classDOM_1_1ValueList.html">dom::valuelist</option>, <option value="classDOMTreeView.html">domtreeview</option>, <option value="classKHTMLFactory.html">khtmlfactory</option>, <option value="classKHTMLImage.html">khtmlimage</option>, <option value="classKHTMLImageBrowserExtension.html">khtmlimagebrowserextension</option>, <option value="classKHTMLImageFactory.html">khtmlimagefactory</option>, <option value="classKHTMLInfoDlg.html">khtmlinfodlg</option>, <option value="classKHTMLPageCache.html">khtmlpagecache</option>, <option value="classKHTMLPageCacheDelivery.html">khtmlpagecachedelivery</option>, <option value="classKHTMLPart.html">khtmlpart</option>, <option value="classKHTMLPartBrowserExtension.html">khtmlpartbrowserextension</option>, <option value="classKHTMLPartBrowserHostExtension.html">khtmlpartbrowserhostextension</option>, <option value="classKHTMLPartIface.html">khtmlpartiface</option>, <option value="classKHTMLPopupGUIClient.html">khtmlpopupguiclient</option>, <option value="classKHTMLPrintSettings.html">khtmlprintsettings</option>, <option value="classKHTMLRun.html">khtmlrun</option>, <option value="classKHTMLSettings.html">khtmlsettings</option>, <option value="classKHTMLView.html">khtmlview</option>, <option value="classKHTMLZoomFactorAction.html">khtmlzoomfactoraction</option>, <option value="classKJavaApplet.html">kjavaapplet</option>, <option value="classKJavaAppletContext.html">kjavaappletcontext</option>, <option value="classKJavaAppletServer.html">kjavaappletserver</option>, <option value="classKJavaAppletViewer.html">kjavaappletviewer</option>, <option value="classKJavaAppletViewerBrowserExtension.html">kjavaappletviewerbrowserextension</option>, <option value="classKJavaAppletViewerFactory.html">kjavaappletviewerfactory</option>, <option value="classKJavaAppletViewerLiveConnectExtension.html">kjavaappletviewerliveconnectextension</option>, <option value="classKJavaAppletWidget.html">kjavaappletwidget</option>, <option value="classKJavaDownloader.html">kjavadownloader</option>, <option value="classKJavaKIOJob.html">kjavakiojob</option>, <option value="classKJavaProcess.html">kjavaprocess</option>, <option value="classKJavaUploader.html">kjavauploader</option>, <option value="classKJS_1_1CSSPrimitiveValueConstructor.html">kjs::cssprimitivevalueconstructor</option>, <option value="classKJS_1_1CSSRuleConstructor.html">kjs::cssruleconstructor</option>, <option value="classKJS_1_1CSSValueConstructor.html">kjs::cssvalueconstructor</option>, <option value="classKJS_1_1DateTimeMS.html">kjs::datetimems</option>, <option value="classKJS_1_1DOMAbstractView.html">kjs::domabstractview</option>, <option value="classKJS_1_1DOMAttr.html">kjs::domattr</option>, <option value="classKJS_1_1DOMCharacterData.html">kjs::domcharacterdata</option>, <option value="classKJS_1_1DOMCounter.html">kjs::domcounter</option>, <option value="classKJS_1_1DOMCSSPrimitiveValue.html">kjs::domcssprimitivevalue</option>, <option value="classKJS_1_1DOMCSSRule.html">kjs::domcssrule</option>, <option value="classKJS_1_1DOMCSSRuleList.html">kjs::domcssrulelist</option>, <option value="classKJS_1_1DOMCSSStyleDeclaration.html">kjs::domcssstyledeclaration</option>, <option value="classKJS_1_1DOMCSSStyleSheet.html">kjs::domcssstylesheet</option>, <option value="classKJS_1_1DOMCSSValue.html">kjs::domcssvalue</option>, <option value="classKJS_1_1DOMCSSValueList.html">kjs::domcssvaluelist</option>, <option value="classKJS_1_1DOMDocument.html">kjs::domdocument</option>, <option value="classKJS_1_1DOMDocumentType.html">kjs::domdocumenttype</option>, <option value="classKJS_1_1DOMDOMImplementation.html">kjs::domdomimplementation</option>, <option value="classKJS_1_1DOMElement.html">kjs::domelement</option>, <option value="classKJS_1_1DOMEntity.html">kjs::domentity</option>, <option value="classKJS_1_1DOMEvent.html">kjs::domevent</option>, <option value="classKJS_1_1DOMExceptionConstructor.html">kjs::domexceptionconstructor</option>, <option value="classKJS_1_1DOMFunction.html">kjs::domfunction</option>, <option value="classKJS_1_1DOMKeyboardEvent.html">kjs::domkeyboardevent</option>, <option value="classKJS_1_1DOMKeyEventBase.html">kjs::domkeyeventbase</option>, <option value="classKJS_1_1DOMMediaList.html">kjs::dommedialist</option>, <option value="classKJS_1_1DOMMouseEvent.html">kjs::dommouseevent</option>, <option value="classKJS_1_1DOMMutationEvent.html">kjs::dommutationevent</option>, <option value="classKJS_1_1DOMNamedNodeMap.html">kjs::domnamednodemap</option>, <option value="classKJS_1_1DOMNamedNodesCollection.html">kjs::domnamednodescollection</option>, <option value="classKJS_1_1DOMNode.html">kjs::domnode</option>, <option value="classKJS_1_1DOMNodeFilter.html">kjs::domnodefilter</option>, <option value="classKJS_1_1DOMNodeIterator.html">kjs::domnodeiterator</option>, <option value="classKJS_1_1DOMNodeList.html">kjs::domnodelist</option>, <option value="classKJS_1_1DOMNotation.html">kjs::domnotation</option>, <option value="classKJS_1_1DOMObject.html">kjs::domobject</option>, <option value="classKJS_1_1DOMParser.html">kjs::domparser</option>, <option value="classKJS_1_1DOMParserConstructorImp.html">kjs::domparserconstructorimp</option>, <option value="classKJS_1_1DOMProcessingInstruction.html">kjs::domprocessinginstruction</option>, <option value="classKJS_1_1DOMRange.html">kjs::domrange</option>, <option value="classKJS_1_1DOMRect.html">kjs::domrect</option>, <option value="classKJS_1_1DOMRGBColor.html">kjs::domrgbcolor</option>, <option value="classKJS_1_1DOMStyleSheet.html">kjs::domstylesheet</option>, <option value="classKJS_1_1DOMStyleSheetList.html">kjs::domstylesheetlist</option>, <option value="classKJS_1_1DOMText.html">kjs::domtext</option>, <option value="classKJS_1_1DOMTextEvent.html">kjs::domtextevent</option>, <option value="classKJS_1_1DOMTreeWalker.html">kjs::domtreewalker</option>, <option value="classKJS_1_1DOMUIEvent.html">kjs::domuievent</option>, <option value="classKJS_1_1EvalMultiLineEdit.html">kjs::evalmultilineedit</option>, <option value="classKJS_1_1EventExceptionConstructor.html">kjs::eventexceptionconstructor</option>, <option value="classKJS_1_1HTMLCollection.html">kjs::htmlcollection</option>, <option value="classKJS_1_1HTMLDocument.html">kjs::htmldocument</option>, <option value="classKJS_1_1HTMLElement.html">kjs::htmlelement</option>, <option value="classKJS_1_1HTMLElementFunction.html">kjs::htmlelementfunction</option>, <option value="classKJS_1_1HTMLSelectCollection.html">kjs::htmlselectcollection</option>, <option value="classKJS_1_1ImageConstructorImp.html">kjs::imageconstructorimp</option>, <option value="classKJS_1_1JSEventListener.html">kjs::jseventlistener</option>, <option value="classKJS_1_1JSLazyEventListener.html">kjs::jslazyeventlistener</option>, <option value="classKJS_1_1JSNodeFilter.html">kjs::jsnodefilter</option>, <option value="classKJS_1_1KeyboardEventConstructor.html">kjs::keyboardeventconstructor</option>, <option value="classKJS_1_1KJSDebugWin.html">kjs::kjsdebugwin</option>, <option value="classKJS_1_1KJSErrorDialog.html">kjs::kjserrordialog</option>, <option value="classKJS_1_1Location.html">kjs::location</option>, <option value="classKJS_1_1MozillaSidebarExtension.html">kjs::mozillasidebarextension</option>, <option value="classKJS_1_1MutationEventConstructor.html">kjs::mutationeventconstructor</option>, <option value="classKJS_1_1Navigator.html">kjs::navigator</option>, <option value="classKJS_1_1NodeFilterConstructor.html">kjs::nodefilterconstructor</option>, <option value="classKJS_1_1OptionConstructorImp.html">kjs::optionconstructorimp</option>, <option value="classKJS_1_1RangeConstructor.html">kjs::rangeconstructor</option>, <option value="classKJS_1_1ScheduledAction.html">kjs::scheduledaction</option>, <option value="classKJS_1_1Screen.html">kjs::screen</option>, <option value="classKJS_1_1ScriptInterpreter.html">kjs::scriptinterpreter</option>, <option value="classKJS_1_1SourceDisplay.html">kjs::sourcedisplay</option>, <option value="classKJS_1_1SourceFile.html">kjs::sourcefile</option>, <option value="classKJS_1_1SourceFragment.html">kjs::sourcefragment</option>, <option value="classKJS_1_1Window.html">kjs::window</option>, <option value="classKJS_1_1WindowQObject.html">kjs::windowqobject</option>, <option value="classKJS_1_1XMLHttpRequest.html">kjs::xmlhttprequest</option>, <option value="classKJS_1_1XMLHttpRequestConstructorImp.html">kjs::xmlhttprequestconstructorimp</option>, <option value="classKJS_1_1XMLHttpRequestQObject.html">kjs::xmlhttprequestqobject</option>, <option value="classKJS_1_1XMLSerializer.html">kjs::xmlserializer</option>, <option value="classKJS_1_1XMLSerializerConstructorImp.html">kjs::xmlserializerconstructorimp</option>, <option value="classKJSCPUGuard.html">kjscpuguard</option>, <option value="classKJSErrorDlg.html">kjserrordlg</option>, <option value="classKJSProxy.html">kjsproxy</option>, <option value="classKMultiPart.html">kmultipart</option>, <option value="classKQEventUtil.html">kqeventutil</option>, <option value="classKXEventUtil.html">kxeventutil</option>, <option value="classPermissionDialog.html">permissiondialog</option>, </select> </form> </div> --> </div></div> <div class="menu_box"><h2>API Dox</h2> <div class="nav_list"> <ul> <li><a href="../../arts/html/index.html">arts</a></li><li><a href="../../dcop/html/index.html">dcop</a></li><li><a href="../../dnssd/html/index.html">dnssd</a></li><li><a href="../../interfaces/html/index.html">interfaces</a></li><li> <a href="../../interfaces/kimproxy/interface/html/index.html">interface</a></li><li> <a href="../../interfaces/kimproxy/library/html/index.html">library</a></li><li> <a href="../../interfaces/kspeech/html/index.html">kspeech</a></li><li> <a href="../../interfaces/ktexteditor/html/index.html">ktexteditor</a></li><li><a href="../../kabc/html/index.html">kabc</a></li><li><a href="../../kate/html/index.html">kate</a></li><li><a href="../../kcmshell/html/index.html">kcmshell</a></li><li><a href="../../kdecore/html/index.html">kdecore</a></li><li><a href="../../kded/html/index.html">kded</a></li><li><a href="../../kdefx/html/index.html">kdefx</a></li><li><a href="../../kdeprint/html/index.html">kdeprint</a></li><li><a href="../../kdesu/html/index.html">kdesu</a></li><li><a href="../../kdeui/html/index.html">kdeui</a></li><li><a href="../../kdoctools/html/index.html">kdoctools</a></li><li><a href="../../khtml/html/index.html">khtml</a></li><li><a href="../../kimgio/html/index.html">kimgio</a></li><li><a href="../../kinit/html/index.html">kinit</a></li><li><a href="../../kio/html/index.html">kio</a></li><li> <a href="../../kio/bookmarks/html/index.html">bookmarks</a></li><li> <a href="../../kio/httpfilter/html/index.html">httpfilter</a></li><li> <a href="../../kio/kfile/html/index.html">kfile</a></li><li> <a href="../../kio/kio/html/index.html">kio</a></li><li> <a href="../../kio/kioexec/html/index.html">kioexec</a></li><li> <a href="../../kio/kpasswdserver/html/index.html">kpasswdserver</a></li><li> <a href="../../kio/kssl/html/index.html">kssl</a></li><li><a href="../../kioslave/html/index.html">kioslave</a></li><li> <a href="../../kioslave/http/html/index.html">http</a></li><li><a href="../../kjs/html/index.html">kjs</a></li><li><a href="../../kmdi/html/index.html">kmdi</a></li><li> <a href="../../kmdi/kmdi/html/index.html">kmdi</a></li><li><a href="../../knewstuff/html/index.html">knewstuff</a></li><li><a href="../../kparts/html/index.html">kparts</a></li><li><a href="../../kresources/html/index.html">kresources</a></li><li><a href="../../kspell2/html/index.html">kspell2</a></li><li><a href="../../kunittest/html/index.html">kunittest</a></li><li><a href="../../kutils/html/index.html">kutils</a></li><li><a href="../../kwallet/html/index.html">kwallet</a></li><li><a href="../../libkmid/html/index.html">libkmid</a></li><li><a href="../../libkscreensaver/html/index.html">libkscreensaver</a></li> </ul></div></div> </td> </tr> </table> <span class="doNotDisplay"> <a href="http://www.kde.org/" accesskey="8">KDE Home</a> | <a href="http://accessibility.kde.org/" accesskey="9">KDE Accessibility Home</a> | <a href="http://www.kde.org/media/accesskeys.php" accesskey="0">Description of Access Keys</a> </span> <div style="height: 8px"></div> <div id="footer"> <div id="footer_left"> Maintained by <a href="mailto:groot@kde.org">Adriaan de Groot</a> and <a href="mailto:wintert@kde.org">Allen Winter</a>. <br/> KDE and K Desktop Environment are trademarks of <a href="http://www.kde.org/areas/kde-ev/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> | <a href="http://www.kde.org/contact/impressum.php">Legal</a> </div> <div id="footer_right"><img src="/media/images/footer_right.png" style="margin: 0px" alt="" /></div> </div> <!-- WARNING: DO NOT SEND MAIL TO THE FOLLOWING EMAIL ADDRESS! YOU WILL BE BLOCKED INSTANTLY AND PERMANENTLY! <a href="mailto:aaaatrap-425acc3b5374943f@kde.org">Block me</a> WARNING END --> </body> </html>