+2006-10-18 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Beth.
+
+ Updated some results now that some global JS objects repeatably report their
+ statically declared properties.
+
+ * fast/js/window-properties-expected.txt:
+ * fast/js/window-properties.html:
+
2006-10-18 Adam Roben <aroben@apple.com>
Reviewed by Maciej.
window.document.location : object (Location)
window.document.location.toString : function
window.document.location.assign : function
+window.document.location.host : string
+window.document.location.pathname : string
+window.document.location.port : string
+window.document.location.href : string
+window.document.location.search : string
+window.document.location.reload : function
+window.document.location.hash : string
+window.document.location.hostname : string
+window.document.location.protocol : string
+window.document.location.replace : function
window.document.cookie : string
window.document.plugins : function
window.document.forms : function
window.document.defaultView.offscreenBuffering : boolean
window.document.defaultView.moveBy : function
window.document.defaultView.personalbar : object (BarInfo)
+window.document.defaultView.personalbar.visible : boolean
window.document.defaultView.DOMException : object (DOMExceptionConstructor)
window.document.defaultView.scrollX : number
window.document.defaultView.Image : object (Object)
window.document.defaultView.parent : object (DOMWindow)
window.document.defaultView.parent *** children skipped, already printed above under 'window.document.defaultView'
window.document.defaultView.menubar : object (BarInfo)
+window.document.defaultView.menubar.visible : boolean
window.document.defaultView.Option : object (Object)
window.document.defaultView.onchange : null
window.document.defaultView.innerWidth : number
window.document.defaultView.frames.location *** children skipped, already printed above under 'window.document.location'
window.document.defaultView.frames.length : number
window.document.defaultView.locationbar : object (BarInfo)
+window.document.defaultView.locationbar.visible : boolean
window.document.defaultView.toolbar : object (BarInfo)
+window.document.defaultView.toolbar.visible : boolean
window.document.defaultView.length : number
window.document.defaultView.onbeforeunload : null
window.document.defaultView.outerHeight : number
window.document.defaultView.history : object (History)
window.document.defaultView.history.back : function
window.document.defaultView.history.forward : function
+window.document.defaultView.history.length : number
+window.document.defaultView.history.go : function
window.document.defaultView.prompt : function
window.document.defaultView.top : object (DOMWindow)
window.document.defaultView.top *** children skipped, already printed above under 'window.document.defaultView'
window.document.defaultView.onfocus : null
window.document.defaultView.onmousedown : null
window.document.defaultView.statusbar : object (BarInfo)
+window.document.defaultView.statusbar.visible : boolean
window.document.defaultView.screenLeft : number
window.document.defaultView.location : object (Location)
window.document.defaultView.location *** children skipped, already printed above under 'window.document.location'
window.document.defaultView.onerror : null
window.document.defaultView.onmousemove : null
window.document.defaultView.scrollbars : object (BarInfo)
+window.document.defaultView.scrollbars.visible : boolean
window.document.defaultView.onclick : null
window.document.defaultView.event : undefined
window.document.defaultView.confirm : function
function shouldSkipChildren(fullPropertyName, propertyValue) {
if (propertyValue == logDiv
- || fullPropertyName == 'window.document.body.lastChild')
+ || fullPropertyName == 'window.document.body.lastChild'
+ || fullPropertyName == 'window.history.length')
return true;
}
+2006-10-18 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Beth.
+
+ Fixed http://bugs.webkit.org/show_bug.cgi?id=11222
+
+ Some global JS objects lacked references to their property hashtables,
+ so for-in enumeration didn't work. I added the references, and then removed
+ a few bogus properties from the tables. The bogus ones got in there through
+ bit rot.
+
+ We should come up with some solution to these hand-written bindings bugs.
+ Maybe we could use a script to autogenerate them or something.
+
+ * bindings/js/kjs_window.cpp:
+ (KJS::):
+ (KJS::History::getValueProperty):
+
2006-10-18 Adam Roben <aroben@apple.com>
Reviewed by Brady.
////////////////////// Location Object ////////////////////////
-const ClassInfo Location::info = { "Location", 0, 0, 0 };
+const ClassInfo Location::info = { "Location", 0, &LocationTable, 0 };
/*
@begin LocationTable 12
assign Location::Assign DontDelete|Function 1
port Location::Port DontDelete
protocol Location::Protocol DontDelete
search Location::Search DontDelete
- [[==]] Location::EqualEqual DontDelete|ReadOnly
toString Location::ToString DontDelete|Function 0
replace Location::Replace DontDelete|Function 1
reload Location::Reload DontDelete|Function 0
////////////////////// Selection Object ////////////////////////
-const ClassInfo Selection::info = { "Selection", 0, 0, 0 };
+const ClassInfo Selection::info = { "Selection", 0, &SelectionTable, 0 };
/*
@begin SelectionTable 19
anchorNode Selection::AnchorNode DontDelete|ReadOnly
extentOffset Selection::ExtentOffset DontDelete|ReadOnly
isCollapsed Selection::IsCollapsed DontDelete|ReadOnly
type Selection::_Type DontDelete|ReadOnly
- [[==]] Selection::EqualEqual DontDelete|ReadOnly
toString Selection::ToString DontDelete|Function 0
collapse Selection::Collapse DontDelete|Function 2
collapseToEnd Selection::CollapseToEnd DontDelete|Function 0
////////////////////// BarInfo Object ////////////////////////
-const ClassInfo BarInfo::info = { "BarInfo", 0, 0, 0 };
+const ClassInfo BarInfo::info = { "BarInfo", 0, &BarInfoTable, 0 };
/*
@begin BarInfoTable 1
visible BarInfo::Visible DontDelete|ReadOnly
////////////////////// History Object ////////////////////////
-const ClassInfo History::info = { "History", 0, 0, 0 };
+const ClassInfo History::info = { "History", 0, &HistoryTable, 0 };
/*
@begin HistoryTable 4
length History::Length DontDelete|ReadOnly
JSValue *History::getValueProperty(ExecState *, int token) const
{
- switch (token) {
- case Length:
- {
+ ASSERT(token == Length);
BrowserExtension *ext = m_frame->browserExtension();
if (!ext)
return jsNumber(0);
return jsNumber(ext->getHistoryLength());
- }
- default:
- return jsUndefined();
- }
}
UString History::toString(ExecState *exec) const
virtual void put(ExecState *exec, const Identifier &propertyName, JSValue *value, int attr = None);
virtual JSValue *toPrimitive(ExecState *exec, JSType preferred) const;
virtual UString toString(ExecState*) const;
- enum { Hash, Href, Hostname, Host, Pathname, Port, Protocol, Search, EqualEqual,
+ enum { Hash, Href, Hostname, Host, Pathname, Port, Protocol, Search,
Replace, Reload, ToString, Assign };
WebCore::Frame* frame() const { return m_frame; }
virtual const ClassInfo* classInfo() const { return &info; }
virtual JSValue *toPrimitive(ExecState *exec, JSType preferred) const;
virtual UString toString(ExecState*) const;
enum { AnchorNode, AnchorOffset, FocusNode, FocusOffset, BaseNode, BaseOffset, ExtentNode, ExtentOffset,
- IsCollapsed, _Type, EqualEqual, Collapse, CollapseToEnd, CollapseToStart, Empty, ToString,
+ IsCollapsed, _Type, Collapse, CollapseToEnd, CollapseToStart, Empty, ToString,
SetBaseAndExtent, SetPosition, Modify, GetRangeAt };
WebCore::Frame* frame() const { return m_frame; }
virtual const ClassInfo* classInfo() const { return &info; }