Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.



Canonical link: https://commits.webkit.org/18058@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@21633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Sam Weinig committed May 22, 2007
1 parent 76bc206 commit 766dd0e
Show file tree
Hide file tree
Showing 15 changed files with 165 additions and 81 deletions.
12 changes: 12 additions & 0 deletions LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
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.
Expand Down
Expand Up @@ -114,4 +114,6 @@ HTMLDelElement: undefined

HTMLEmbedElement: undefined

HTMLMarqueeElement: [object HTMLMarqueeElementConstructor]


Expand Up @@ -70,6 +70,7 @@
test("HTMLInsElement");
test("HTMLDelElement");
test("HTMLEmbedElement");
test("HTMLMarqueeElement");

</script>
</body>
Expand Down
2 changes: 2 additions & 0 deletions LayoutTests/fast/dom/Window/window-properties-expected.txt
Expand Up @@ -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]
Expand Down
29 changes: 29 additions & 0 deletions WebCore/ChangeLog
@@ -1,3 +1,32 @@
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.
Expand Down
1 change: 1 addition & 0 deletions WebCore/DerivedSources.make
Expand Up @@ -354,6 +354,7 @@ all : \
JSHTMLLegendElement.h \
JSHTMLLinkElement.h \
JSHTMLMapElement.h \
JSHTMLMarqueeElement.h \
JSHTMLMenuElement.h \
JSHTMLMetaElement.h \
JSHTMLModElement.h \
Expand Down
20 changes: 16 additions & 4 deletions WebCore/WebCore.xcodeproj/project.pbxproj
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -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>"; };
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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 */,
Expand All @@ -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 */,
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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;
};
Expand Down Expand Up @@ -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;
};
Expand Down Expand Up @@ -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;
};
Expand Down
5 changes: 4 additions & 1 deletion WebCore/bindings/js/JSHTMLElementWrapperFactory.cpp
@@ -1,5 +1,5 @@
/*
* 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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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) \
Expand Down
47 changes: 26 additions & 21 deletions WebCore/bindings/js/kjs_css.cpp
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}

Expand Down
69 changes: 20 additions & 49 deletions WebCore/bindings/js/kjs_html.cpp
Expand Up @@ -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
Expand All @@ -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);
}

Expand All @@ -437,15 +435,13 @@ 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
{
static HashMap<AtomicStringImpl*, const Accessors*> accessorMap;
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);
}

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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();
Expand All @@ -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;
}
}
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 766dd0e

Please sign in to comment.