[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.0/kdelibs/khtml/ecma
From: Harri Porten <porten () kde ! org>
Date: 2008-03-22 18:42:09
Message-ID: 1206211329.716233.20699.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 788863 by porten:
Disabling an IE-specific feature: access to custom attributes via JS properties.
M +4 -0 kjs_dom.cpp
M +2 -0 kjs_dom.h
--- branches/KDE/4.0/kdelibs/khtml/ecma/kjs_dom.cpp #788862:788863
@@ -1190,16 +1190,19 @@
if (proto->isObject() && static_cast<JSObject *>(proto)->getOwnPropertySlot(exec, \
propertyName, slot)) return true;
+#if 0 // IE-only feature
// Give access to attributes
ElementImpl &element = *static_cast<ElementImpl *>(impl());
if (element.hasAttribute(propertyName.domString())) {
slot.setCustom(this, attributeGetter);
return true;
}
+#endif
return false;
}
+#if 0
JSValue *DOMElement::attributeGetter(ExecState*, JSObject*, const Identifier& \
propertyName, const PropertySlot& slot) {
DOMElement *thisObj = static_cast<DOMElement *>(slot.slotBase());
@@ -1208,6 +1211,7 @@
DOM::DOMString attr = element->getAttribute(propertyName.domString());
return getStringOrNull(attr);
}
+#endif
JSValue* DOMElementProtoFunc::callAsFunction(ExecState *exec, JSObject *thisObj, \
const List &args) {
--- branches/KDE/4.0/kdelibs/khtml/ecma/kjs_dom.h #788862:788863
@@ -169,7 +169,9 @@
SetAttributeNodeNS, GetElementsByTagNameNS, HasAttribute, HasAttributeNS,
GetElementsByClassName };
private:
+#if 0
static JSValue *attributeGetter(ExecState *exec, JSObject*, const Identifier&, \
const PropertySlot& slot); +#endif
};
DOM::AttrImpl *toAttr (JSValue *); // returns 0 if passed-in value is not a \
DOMAtt object
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic