Commit 4d7ce9a5 authored by weinig's avatar weinig
Browse files

LayoutTests:

        Reviewed by Darin.

        - update tests and results for http://bugs.webkit.org/show_bug.cgi?id=13803
          to account for the new JSHTMLMarquee that is being autogenerated and
          can now produce a constructor.

        * fast/dom/Window/element-constructors-on-window-expected.txt:
        * fast/dom/Window/element-constructors-on-window.html:
        * fast/dom/Window/window-properties-expected.txt:

WebCore:

        Reviewed by Darin.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=13803
        Autogenerate the JS bindings for the HTMLMarqueeElement.

        * DerivedSources.make:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSHTMLElementWrapperFactory.cpp:
        * bindings/js/kjs_css.cpp:
        (KJS::DOMCSSRule::getOwnPropertySlot): Fix possible null pointer issue.
        (KJS::DOMCSSRule::put): Fix possible null pointer issue.
        * bindings/js/kjs_html.cpp:
        (KJS::):
        (KJS::JSHTMLElement::classInfo):
        (KJS::JSHTMLElement::accessors):
        (KJS::JSHTMLElement::getOwnPropertySlot): Fix null pointer issue.
        (KJS::HTMLElementFunction::callAsFunction):
        (KJS::JSHTMLElement::put):
        * bindings/js/kjs_html.h:
        (KJS::JSHTMLElement::):
        * html/HTMLMarqueeElement.cpp:
        (WebCore::HTMLMarqueeElement::start):
        (WebCore::HTMLMarqueeElement::stop):
        * html/HTMLMarqueeElement.h: Add start() and stop() functions.
        * html/HTMLMarqueeElement.idl: Added.
        * page/DOMWindow.idl: Add marquee constructor.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent dd237c40
2007-05-21 Sam Weinig <sam@webkit.org>
Reviewed by Darin.
- update tests and results for http://bugs.webkit.org/show_bug.cgi?id=13803
to account for the new JSHTMLMarquee that is being autogenerated and
can now produce a constructor.
* fast/dom/Window/element-constructors-on-window-expected.txt:
* fast/dom/Window/element-constructors-on-window.html:
* fast/dom/Window/window-properties-expected.txt:
2007-05-21 Sam Weinig <sam@webkit.org>
 
Reviewed by Adam.
......@@ -114,4 +114,6 @@ HTMLDelElement: undefined
HTMLEmbedElement: undefined
HTMLMarqueeElement: [object HTMLMarqueeElementConstructor]
......@@ -70,6 +70,7 @@ test("HTMLCanvasElement");
test("HTMLInsElement");
test("HTMLDelElement");
test("HTMLEmbedElement");
test("HTMLMarqueeElement");
</script>
</body>
......
......@@ -556,6 +556,8 @@ window.HTMLLinkElement [object HTMLLinkElementConstructor]
window.HTMLLinkElement.prototype [printed above as window.Element.prototype]
window.HTMLMapElement [object HTMLMapElementConstructor]
window.HTMLMapElement.prototype [printed above as window.Element.prototype]
window.HTMLMarqueeElement [object HTMLMarqueeElementConstructor]
window.HTMLMarqueeElement.prototype [printed above as window.Element.prototype]
window.HTMLMenuElement [object HTMLMenuElementConstructor]
window.HTMLMenuElement.prototype [printed above as window.Element.prototype]
window.HTMLMetaElement [object HTMLMetaElementConstructor]
......
2007-05-21 Sam Weinig <sam@webkit.org>
Reviewed by Darin.
Patch for http://bugs.webkit.org/show_bug.cgi?id=13803
Autogenerate the JS bindings for the HTMLMarqueeElement.
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSHTMLElementWrapperFactory.cpp:
* bindings/js/kjs_css.cpp:
(KJS::DOMCSSRule::getOwnPropertySlot): Fix possible null pointer issue.
(KJS::DOMCSSRule::put): Fix possible null pointer issue.
* bindings/js/kjs_html.cpp:
(KJS::):
(KJS::JSHTMLElement::classInfo):
(KJS::JSHTMLElement::accessors):
(KJS::JSHTMLElement::getOwnPropertySlot): Fix null pointer issue.
(KJS::HTMLElementFunction::callAsFunction):
(KJS::JSHTMLElement::put):
* bindings/js/kjs_html.h:
(KJS::JSHTMLElement::):
* html/HTMLMarqueeElement.cpp:
(WebCore::HTMLMarqueeElement::start):
(WebCore::HTMLMarqueeElement::stop):
* html/HTMLMarqueeElement.h: Add start() and stop() functions.
* html/HTMLMarqueeElement.idl: Added.
* page/DOMWindow.idl: Add marquee constructor.
2007-05-21 Adele Peterson <adele@apple.com>
 
Fix by Darin, reviewed by me.
......@@ -354,6 +354,7 @@ all : \
JSHTMLLegendElement.h \
JSHTMLLinkElement.h \
JSHTMLMapElement.h \
JSHTMLMarqueeElement.h \
JSHTMLMenuElement.h \
JSHTMLMetaElement.h \
JSHTMLModElement.h \
......
......@@ -2764,6 +2764,9 @@
BC4918C70BFEA050009D6316 /* JSHTMLFrameElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BC4918C10BFEA050009D6316 /* JSHTMLFrameElement.h */; };
BC4918C80BFEA050009D6316 /* JSHTMLIFrameElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC4918C20BFEA050009D6316 /* JSHTMLIFrameElement.cpp */; };
BC4918C90BFEA050009D6316 /* JSHTMLIFrameElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BC4918C30BFEA050009D6316 /* JSHTMLIFrameElement.h */; };
BC491B4F0C023E2D009D6316 /* HTMLMarqueeElement.idl in Resources */ = {isa = PBXBuildFile; fileRef = BC491B4E0C023E2D009D6316 /* HTMLMarqueeElement.idl */; };
BC491B780C023EFD009D6316 /* JSHTMLMarqueeElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC491B760C023EFD009D6316 /* JSHTMLMarqueeElement.cpp */; };
BC491B790C023EFD009D6316 /* JSHTMLMarqueeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BC491B770C023EFD009D6316 /* JSHTMLMarqueeElement.h */; };
BC588AF00BFA6CF900EE679E /* HTMLParserErrorCodes.h in Headers */ = {isa = PBXBuildFile; fileRef = BC588AEF0BFA6CF900EE679E /* HTMLParserErrorCodes.h */; };
BC588B4B0BFA723C00EE679E /* HTMLParserErrorCodes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC588B4A0BFA723C00EE679E /* HTMLParserErrorCodes.cpp */; };
BC6D6DD209AF906600F59759 /* Font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC6D6DD009AF906600F59759 /* Font.cpp */; };
......@@ -5990,6 +5993,9 @@
BC4918C10BFEA050009D6316 /* JSHTMLFrameElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLFrameElement.h; sourceTree = "<group>"; };
BC4918C20BFEA050009D6316 /* JSHTMLIFrameElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLIFrameElement.cpp; sourceTree = "<group>"; };
BC4918C30BFEA050009D6316 /* JSHTMLIFrameElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLIFrameElement.h; sourceTree = "<group>"; };
BC491B4E0C023E2D009D6316 /* HTMLMarqueeElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLMarqueeElement.idl; sourceTree = "<group>"; };
BC491B760C023EFD009D6316 /* JSHTMLMarqueeElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLMarqueeElement.cpp; sourceTree = "<group>"; };
BC491B770C023EFD009D6316 /* JSHTMLMarqueeElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLMarqueeElement.h; sourceTree = "<group>"; };
BC588AEF0BFA6CF900EE679E /* HTMLParserErrorCodes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTMLParserErrorCodes.h; sourceTree = "<group>"; };
BC588B4A0BFA723C00EE679E /* HTMLParserErrorCodes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLParserErrorCodes.cpp; sourceTree = "<group>"; };
BC5EC1760A507E3E006007F5 /* view-source.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "view-source.css"; sourceTree = "<group>"; };
......@@ -6338,10 +6344,8 @@
14DFB33F0A7DF7630018F769 /* Derived Sources */ = {
isa = PBXGroup;
children = (
BC4918C00BFEA050009D6316 /* JSHTMLFrameElement.cpp */,
BC4918C10BFEA050009D6316 /* JSHTMLFrameElement.h */,
BC4918C20BFEA050009D6316 /* JSHTMLIFrameElement.cpp */,
BC4918C30BFEA050009D6316 /* JSHTMLIFrameElement.h */,
BC491B760C023EFD009D6316 /* JSHTMLMarqueeElement.cpp */,
BC491B770C023EFD009D6316 /* JSHTMLMarqueeElement.h */,
65DF31D809D1C122000BE325 /* JSAttr.cpp */,
65DF31D909D1C123000BE325 /* JSAttr.h */,
65DF323309D1DE65000BE325 /* JSCanvasGradient.cpp */,
......@@ -6426,6 +6430,8 @@
1AE2AA150A1CDAB300B42B25 /* JSHTMLFontElement.h */,
A8D064F90A23C0CC005E7203 /* JSHTMLFormElement.cpp */,
A8D064FA0A23C0CC005E7203 /* JSHTMLFormElement.h */,
BC4918C00BFEA050009D6316 /* JSHTMLFrameElement.cpp */,
BC4918C10BFEA050009D6316 /* JSHTMLFrameElement.h */,
A80E7B0A0A19D606007FB8C5 /* JSHTMLHeadElement.cpp */,
A80E7B0B0A19D606007FB8C5 /* JSHTMLHeadElement.h */,
1AE2AA1A0A1CDAB400B42B25 /* JSHTMLHeadingElement.cpp */,
......@@ -6434,6 +6440,8 @@
1AE2AA1D0A1CDAB400B42B25 /* JSHTMLHRElement.h */,
1A85B18D0A1B18A200D8C87C /* JSHTMLHtmlElement.cpp */,
1A85B18E0A1B18A200D8C87C /* JSHTMLHtmlElement.h */,
BC4918C20BFEA050009D6316 /* JSHTMLIFrameElement.cpp */,
BC4918C30BFEA050009D6316 /* JSHTMLIFrameElement.h */,
1AE2AA930A1CDD2D00B42B25 /* JSHTMLImageElement.cpp */,
1AE2AA940A1CDD2D00B42B25 /* JSHTMLImageElement.h */,
A80E7E8E0A1A83E3007FB8C5 /* JSHTMLInputElement.cpp */,
......@@ -8232,6 +8240,7 @@
1AE2AAF70A1CE58600B42B25 /* HTMLMapElement.idl */,
A8EA7C9E0A192B9C00A8EF5F /* HTMLMarqueeElement.cpp */,
A8EA7C9D0A192B9C00A8EF5F /* HTMLMarqueeElement.h */,
BC491B4E0C023E2D009D6316 /* HTMLMarqueeElement.idl */,
A8EA79EC0A1916DF00A8EF5F /* HTMLMenuElement.cpp */,
A8EA79E80A1916DF00A8EF5F /* HTMLMenuElement.h */,
1AE2AE430A1D269E00B42B25 /* HTMLMenuElement.idl */,
......@@ -11337,6 +11346,7 @@
BC06EE050BFD71AA00856E9D /* JSHTMLTableElement.h in Headers */,
BC4918C70BFEA050009D6316 /* JSHTMLFrameElement.h in Headers */,
BC4918C90BFEA050009D6316 /* JSHTMLIFrameElement.h in Headers */,
BC491B790C023EFD009D6316 /* JSHTMLMarqueeElement.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -11447,6 +11457,7 @@
933A142F0B7D188600A53FFD /* TextEvent.idl in Resources */,
464EA2730B8A350B00A8E6E3 /* crossHairCursor.png in Resources */,
464EA2740B8A350B00A8E6E3 /* notAllowedCursor.png in Resources */,
BC491B4F0C023E2D009D6316 /* HTMLMarqueeElement.idl in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -12721,6 +12732,7 @@
BC06EE040BFD71AA00856E9D /* JSHTMLTableElement.cpp in Sources */,
BC4918C60BFEA050009D6316 /* JSHTMLFrameElement.cpp in Sources */,
BC4918C80BFEA050009D6316 /* JSHTMLIFrameElement.cpp in Sources */,
BC491B780C023EFD009D6316 /* JSHTMLMarqueeElement.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/*
* Copyright (C) 2006, 2007 Apple Inc.
* Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -49,6 +49,7 @@
#include "HTMLLegendElement.h"
#include "HTMLLinkElement.h"
#include "HTMLMapElement.h"
#include "HTMLMarqueeElement.h"
#include "HTMLMenuElement.h"
#include "HTMLMetaElement.h"
#include "HTMLModElement.h"
......@@ -104,6 +105,7 @@
#include "JSHTMLLegendElement.h"
#include "JSHTMLLinkElement.h"
#include "JSHTMLMapElement.h"
#include "JSHTMLMarqueeElement.h"
#include "JSHTMLMenuElement.h"
#include "JSHTMLMetaElement.h"
#include "JSHTMLModElement.h"
......@@ -175,6 +177,7 @@ typedef DOMNode* (*CreateHTMLElementWrapperFunction)(ExecState*, PassRefPtr<HTML
macro(map, Map) \
macro(menu, Menu) \
macro(meta, Meta) \
macro(marquee, Marquee) \
macro(ol, OList) \
macro(optgroup, OptGroup) \
macro(option, Option) \
......
......@@ -728,17 +728,20 @@ const ClassInfo* DOMCSSRule::classInfo() const
bool DOMCSSRule::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
// first try the properties specific to this rule type
const HashEntry* entry = Lookup::findEntry(DOMCSSRule::classInfo()->propHashTable, propertyName);
if (entry) {
// FIXME: for now we single out the media rule functions.
// This is a temporary hack since we should try to generate
// them. See http://bugs.webkit.org/show_bug.cgi?id=11898
if (entry->attr & Function)
return getStaticPropertySlot<DOMCSSRuleFunc, DOMCSSRule, DOMObject>(exec, &DOMCSSMediaRuleTable, this, propertyName, slot);
slot.setStaticEntry(this, entry, staticValueGetter<DOMCSSRule>);
return true;
const HashTable* table = DOMCSSRule::classInfo()->propHashTable;
if (table) {
const HashEntry* entry = Lookup::findEntry(table, propertyName);
if (entry) {
// FIXME: for now we single out the media rule functions.
// This is a temporary hack since we should try to generate
// them. See http://bugs.webkit.org/show_bug.cgi?id=11898
if (entry->attr & Function)
return getStaticPropertySlot<DOMCSSRuleFunc, DOMCSSRule, DOMObject>(exec, &DOMCSSMediaRuleTable, this, propertyName, slot);
slot.setStaticEntry(this, entry, staticValueGetter<DOMCSSRule>);
return true;
}
}
// now the stuff that applies to all rules
return getStaticPropertySlot<DOMCSSRuleFunc, DOMCSSRule, DOMObject>(exec, &DOMCSSRuleTable, this, propertyName, slot);
}
......@@ -799,19 +802,21 @@ JSValue* DOMCSSRule::getValueProperty(ExecState* exec, int token) const
void DOMCSSRule::put(ExecState* exec, const Identifier &propertyName, JSValue* value, int attr)
{
const HashTable* table = DOMCSSRule::classInfo()->propHashTable; // get the right hashtable
const HashEntry* entry = Lookup::findEntry(table, propertyName);
if (entry) {
if (entry->attr & Function) // function: put as override property
{
JSObject::put(exec, propertyName, value, attr);
return;
}
else if ((entry->attr & ReadOnly) == 0) // let lookupPut print the warning if not
{
putValueProperty(exec, entry->value, value, attr);
return;
if (table) {
const HashEntry* entry = Lookup::findEntry(table, propertyName);
if (entry) {
if (entry->attr & Function) {
// function: put as override property
JSObject::put(exec, propertyName, value, attr);
return;
} else if ((entry->attr & ReadOnly) == 0) {
// let lookupPut print the warning if not
putValueProperty(exec, entry->value, value, attr);
return;
}
}
}
lookupPut<DOMCSSRule, DOMObject>(exec, propertyName, value, attr, &DOMCSSRuleTable, this);
}
......
......@@ -414,7 +414,6 @@ const ClassInfo JSHTMLElement::info = { "HTMLElement", &JSElement::info, &HTMLEl
const ClassInfo JSHTMLElement::embed_info = { "HTMLEmbedElement", &JSHTMLElement::info, &HTMLEmbedElementTable, 0 };
const ClassInfo JSHTMLElement::frameSet_info = { "HTMLFrameSetElement", &JSHTMLElement::info, &HTMLFrameSetElementTable, 0 };
const ClassInfo JSHTMLElement::marquee_info = { "HTMLMarqueeElement", &JSHTMLElement::info, &HTMLMarqueeElementTable, 0 };
const ClassInfo JSHTMLElement::object_info = { "HTMLObjectElement", &JSHTMLElement::info, &HTMLObjectElementTable, 0 };
const ClassInfo* JSHTMLElement::classInfo() const
......@@ -423,7 +422,6 @@ const ClassInfo* JSHTMLElement::classInfo() const
if (classInfoMap.isEmpty()) {
classInfoMap.set(embedTag.localName().impl(), &embed_info);
classInfoMap.set(framesetTag.localName().impl(), &frameSet_info);
classInfoMap.set(marqueeTag.localName().impl(), &marquee_info);
classInfoMap.set(objectTag.localName().impl(), &object_info);
}
......@@ -437,7 +435,6 @@ const ClassInfo* JSHTMLElement::classInfo() const
const JSHTMLElement::Accessors JSHTMLElement::object_accessors = { &JSHTMLElement::objectGetter, &JSHTMLElement::objectSetter };
const JSHTMLElement::Accessors JSHTMLElement::embed_accessors = { &JSHTMLElement::embedGetter, &JSHTMLElement::embedSetter };
const JSHTMLElement::Accessors JSHTMLElement::frameSet_accessors = { &JSHTMLElement::frameSetGetter, &JSHTMLElement::frameSetSetter };
const JSHTMLElement::Accessors JSHTMLElement::marquee_accessors = { &JSHTMLElement::marqueeGetter, &JSHTMLElement::marqueeSetter };
const JSHTMLElement::Accessors* JSHTMLElement::accessors() const
{
......@@ -445,7 +442,6 @@ const JSHTMLElement::Accessors* JSHTMLElement::accessors() const
if (accessorMap.isEmpty()) {
accessorMap.add(embedTag.localName().impl(), &embed_accessors);
accessorMap.add(framesetTag.localName().impl(), &frameSet_accessors);
accessorMap.add(marqueeTag.localName().impl(), &marquee_accessors);
accessorMap.add(objectTag.localName().impl(), &object_accessors);
}
......@@ -509,10 +505,6 @@ const JSHTMLElement::Accessors* JSHTMLElement::accessors() const
cols KJS::JSHTMLElement::FrameSetCols DontDelete
rows KJS::JSHTMLElement::FrameSetRows DontDelete
@end
@begin HTMLMarqueeElementTable 2
start KJS::JSHTMLElement::MarqueeStart DontDelete|Function 0
stop KJS::JSHTMLElement::MarqueeStop DontDelete|Function 0
@end
*/
KJS_IMPLEMENT_PROTOTYPE_FUNCTION(JSHTMLElementPrototypeFunction)
......@@ -587,13 +579,15 @@ bool JSHTMLElement::getOwnPropertySlot(ExecState* exec, const Identifier& proper
}
const HashTable* table = classInfo()->propHashTable; // get the right hashtable
const HashEntry* entry = Lookup::findEntry(table, propertyName);
if (entry) {
if (entry->attr & Function)
slot.setStaticEntry(this, entry, staticFunctionGetter<HTMLElementFunction>);
else
slot.setStaticEntry(this, entry, staticValueGetter<JSHTMLElement>);
return true;
if (table) {
const HashEntry* entry = Lookup::findEntry(table, propertyName);
if (entry) {
if (entry->attr & Function)
slot.setStaticEntry(this, entry, staticFunctionGetter<HTMLElementFunction>);
else
slot.setStaticEntry(this, entry, staticValueGetter<JSHTMLElement>);
return true;
}
}
// Base JSHTMLElement stuff or parent class forward, as usual
......@@ -677,12 +671,6 @@ JSValue *JSHTMLElement::frameSetGetter(ExecState* exec, int token) const
return jsUndefined();
}
JSValue *JSHTMLElement::marqueeGetter(ExecState* exec, int token) const
{
// FIXME: Find out what WinIE exposes as properties and implement this.
return jsUndefined();
}
JSValue *JSHTMLElement::getValueProperty(ExecState* exec, int token) const
{
// Check our set of generic properties first.
......@@ -786,22 +774,8 @@ JSValue *HTMLElementFunction::callAsFunction(ExecState* exec, JSObject* thisObj,
DOMExceptionTranslator exception(exec);
HTMLElement &element = *static_cast<HTMLElement*>(static_cast<JSHTMLElement*>(thisObj)->impl());
if (element.hasLocalName(marqueeTag)) {
if (id == JSHTMLElement::MarqueeStart && element.renderer() &&
element.renderer()->hasLayer() &&
element.renderer()->layer()->marquee()) {
element.renderer()->layer()->marquee()->start();
return jsUndefined();
}
if (id == JSHTMLElement::MarqueeStop && element.renderer() &&
element.renderer()->hasLayer() &&
element.renderer()->layer()->marquee()) {
element.renderer()->layer()->marquee()->stop();
return jsUndefined();
}
}
#if ENABLE(SVG)
else if (element.hasLocalName(objectTag)) {
if (element.hasLocalName(objectTag)) {
HTMLObjectElement& object = static_cast<HTMLObjectElement&>(element);
if (id == JSHTMLElement::ObjectGetSVGDocument)
return checkNodeSecurity(exec, object.getSVGDocument(exception)) ? toJS(exec, object.getSVGDocument(exception)) : jsUndefined();
......@@ -828,14 +802,16 @@ void JSHTMLElement::put(ExecState* exec, const Identifier &propertyName, JSValue
}
const HashTable* table = classInfo()->propHashTable; // get the right hashtable
const HashEntry* entry = Lookup::findEntry(table, propertyName);
if (entry) {
if (entry->attr & Function) { // function: put as override property
JSObject::put(exec, propertyName, value, attr);
return;
} else if (!(entry->attr & ReadOnly)) { // let lookupPut print the warning if read-only
putValueProperty(exec, entry->value, value, attr);
return;
if (table) {
const HashEntry* entry = Lookup::findEntry(table, propertyName);
if (entry) {
if (entry->attr & Function) { // function: put as override property
JSObject::put(exec, propertyName, value, attr);
return;
} else if (!(entry->attr & ReadOnly)) { // let lookupPut print the warning if read-only
putValueProperty(exec, entry->value, value, attr);
return;
}
}
}
......@@ -890,11 +866,6 @@ void JSHTMLElement::frameSetSetter(ExecState* exec, int token, JSValue* value)
}
}
void JSHTMLElement::marqueeSetter(ExecState* exec, int token, JSValue* value)
{
// FIXME: Find out what WinIE supports and implement it.
}
void JSHTMLElement::putValueProperty(ExecState* exec, int token, JSValue *value, int)
{
DOMExceptionTranslator exception(exec);
......
......@@ -76,14 +76,14 @@ namespace KJS {
virtual const ClassInfo* classInfo() const;
static const ClassInfo info;
static const ClassInfo object_info, embed_info, frameSet_info, marquee_info;
static const ClassInfo object_info, embed_info, frameSet_info;
// FIXME: Might make sense to combine this with ClassInfo some day.
typedef JSValue* (JSHTMLElement::*GetterFunction)(ExecState*, int token) const;
typedef void (JSHTMLElement::*SetterFunction)(ExecState*, int token, JSValue*);
struct Accessors { GetterFunction m_getter; SetterFunction m_setter; };
const Accessors* accessors() const;
static const Accessors object_accessors, embed_accessors, frameSet_accessors, marquee_accessors;
static const Accessors object_accessors, embed_accessors, frameSet_accessors;
JSValue* objectGetter(ExecState* exec, int token) const;
void objectSetter(ExecState*, int token, JSValue*);
......@@ -91,8 +91,6 @@ namespace KJS {
void embedSetter(ExecState*, int token, JSValue*);
JSValue* frameSetGetter(ExecState* exec, int token) const;
void frameSetSetter(ExecState*, int token, JSValue*);
JSValue* marqueeGetter(ExecState* exec, int token) const;
void marqueeSetter(ExecState*, int token, JSValue*);
enum {
ObjectHspace, ObjectHeight, ObjectAlign,
......@@ -101,7 +99,6 @@ namespace KJS {
ObjectName, ObjectStandby, ObjectTabIndex, ObjectUseMap, ObjectWidth, ObjectContentDocument, ObjectGetSVGDocument,
EmbedAlign, EmbedHeight, EmbedName, EmbedSrc, EmbedType, EmbedWidth, EmbedGetSVGDocument,
FrameSetCols, FrameSetRows,
MarqueeStart, MarqueeStop,
GetContext,
ElementInnerHTML, ElementId, ElementDir, ElementLang,
ElementClassName, ElementInnerText, ElementDocument, ElementChildren, ElementContentEditable,
......
......@@ -3,7 +3,7 @@
*
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* Copyright (C) 2003 Apple Computer, Inc.
* Copyright (C) 2003, 2007 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -27,6 +27,7 @@
#include "CSSPropertyNames.h"
#include "CSSValueKeywords.h"
#include "HTMLNames.h"
#include "RenderLayer.h"
namespace WebCore {
......@@ -106,4 +107,16 @@ void HTMLMarqueeElement::parseMappedAttribute(MappedAttribute *attr)
HTMLElement::parseMappedAttribute(attr);
}
void HTMLMarqueeElement::start()
{
if (renderer() && renderer()->hasLayer() && renderer()->layer()->marquee())
renderer()->layer()->marquee()->start();
}
void HTMLMarqueeElement::stop()
{
if (renderer() && renderer()->hasLayer() && renderer()->layer()->marquee())
renderer()->layer()->marquee()->stop();
}
} // namespace WebCore
......@@ -3,6 +3,7 @@
*
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* Copyright (C) 2007 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -39,6 +40,11 @@ public:
virtual void parseMappedAttribute(MappedAttribute*);
int minimumDelay() const { return m_minimumDelay; }
// DOM Functions
void start();
void stop();
private:
int m_minimumDelay;
......
/*
* Copyright (C) 2007 Apple Inc. All rights reserved
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
module html {
interface [LegacyParent=KJS::JSHTMLElement, GenerateConstructor] HTMLMarqueeElement : HTMLElement {
void start();
void stop();
// FIXME: Find out what WinIE exposes as attributes.
};
}
......@@ -134,6 +134,7 @@ module window {
attribute HTMLTitleElementConstructor HTMLTitleElement;
attribute HTMLUListElementConstructor HTMLUListElement;
attribute HTMLCanvasElementConstructor HTMLCanvasElement;
attribute HTMLMarqueeElementConstructor HTMLMarqueeElement;
attribute HTMLDocumentConstructor HTMLDocument;
attribute MutationEventConstructor MutationEvent;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment