[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/khtml/ecma
From: Allan Sandfeld Jensen <kde () carewolf ! com>
Date: 2004-11-06 13:31:01
Message-ID: 20041106133101.9A92D16CFC () office ! kde ! org
[Download RAW message or body]
CVS commit by carewolf:
Improve hidding feature.
There are still ways to defeat hiding by comparing with strings or numbers though.
M +9 -0 kjs_html.cpp 1.278
M +2 -1 kjs_html.h 1.82
--- kdelibs/khtml/ecma/kjs_html.cpp #1.277:1.278
@@ -1089,4 +1089,5 @@ const ClassInfo* KJS::HTMLElement::class
visibility KJS::HTMLElement::LayerVisibility DontDelete
bgColor KJS::HTMLElement::LayerBgColor DontDelete
+ document KJS::HTMLElement::LayerDocument DontDelete|ReadOnly
clip KJS::HTMLElement::LayerClip DontDelete|ReadOnly
layers KJS::HTMLElement::LayerLayers DontDelete|ReadOnly
@@ -1843,4 +1844,5 @@ Value KJS::HTMLElement::getValueProperty
case LayerBgColor: return getString(layerElement.bgColor());
/*case LayerClip: return getLayerClip(exec, layerElement); */
+ case LayerDocument: return Undefined();
case LayerLayers: return getHTMLCollection(exec,layerElement.layers());
}
@@ -3056,4 +3058,11 @@ bool KJS::HTMLCollection::toBoolean(Exec
}
+Type KJS::HTMLCollection::type() const {
+ if (hidden) // what, me? No, I do not exist..
+ return UndefinedType;
+ else
+ return ObjectImp::type();
+}
+
// We have to implement hasProperty since we don't use a hashtable for 'selectedIndex' and 'length'
// ## this breaks "for (..in..)" though.
--- kdelibs/khtml/ecma/kjs_html.h #1.81:1.82
@@ -147,5 +147,5 @@ namespace KJS {
IFrameMarginHeight, IFrameMarginWidth, IFrameScrolling, IFrameWidth, IFrameContentDocument,
MarqueeStart, MarqueeStop,
- LayerTop, LayerLeft, LayerVisibility, LayerBgColor, LayerClip, LayerLayers,
+ LayerTop, LayerLeft, LayerVisibility, LayerBgColor, LayerClip, LayerDocument, LayerLayers,
ElementInnerHTML, ElementTitle, ElementId, ElementDir, ElementLang,
ElementClassName, ElementInnerText, ElementDocument, ElementChildren, ElementAll };
@@ -172,4 +172,5 @@ namespace KJS {
virtual bool implementsCall() const { return true; }
virtual bool toBoolean(ExecState *) const;
+ virtual Type type() const;
virtual bool hasProperty(ExecState *exec, const Identifier &p) const;
enum { Item, NamedItem, Tags };
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic