SVN commit 793941 by porten: pmk moved the title property up (or down?) to the XML Document. Move the JavaScript property there, too. M +8 -0 kjs_dom.cpp M +1 -1 kjs_dom.h M +0 -6 kjs_html.cpp M +1 -1 kjs_html.h --- branches/KDE/4.0/kdelibs/khtml/ecma/kjs_dom.cpp #793940:793941 @@ -915,6 +915,7 @@ readyState DOMDocument::ReadyState DontDelete|ReadOnly defaultView DOMDocument::DefaultView DontDelete|ReadOnly async DOMDocument::Async DontDelete + title DOMDocument::Title DontDelete @end */ @@ -985,6 +986,8 @@ } case Async: return jsBoolean(doc.async()); + case Title: + return jsString(doc.title()); default: kDebug(6070) << "WARNING: DOMDocument::getValueProperty unhandled token " << token; return jsNull(); @@ -1011,6 +1014,11 @@ doc.setAsync(value->toBoolean(exec)); break; } + case Title: { + DOM::DOMString val = value->toString(exec).domString(); + if (doc.title() != val) doc.setTitle(val); + break; + } } } --- branches/KDE/4.0/kdelibs/khtml/ecma/kjs_dom.h #793940:793941 @@ -130,7 +130,7 @@ CreateRange, CreateNodeIterator, CreateTreeWalker, DefaultView, CreateEvent, StyleSheets, GetOverrideStyle, Abort, Load, LoadXML, PreferredStylesheetSet, SelectedStylesheetSet, ReadyState, Async, - GetElementsByClassName }; + GetElementsByClassName, Title }; DOM::DocumentImpl* impl() { return static_cast(m_impl.get()); } }; --- branches/KDE/4.0/kdelibs/khtml/ecma/kjs_html.cpp #793940:793941 @@ -159,7 +159,6 @@ { "HTMLDocument", &DOMDocument::info, &HTMLDocumentTable, 0 }; /* Source for HTMLDocumentTable. @begin HTMLDocumentTable 31 - title HTMLDocument::Title DontDelete referrer HTMLDocument::Referrer DontDelete|ReadOnly domain HTMLDocument::Domain DontDelete URL HTMLDocument::URL DontDelete|ReadOnly @@ -348,8 +347,6 @@ DOM::HTMLElementImpl* body = doc.body(); switch (token) { - case Title: - return jsString(doc.title()); case Referrer: return jsString(doc.referrer()); case Domain: @@ -440,9 +437,6 @@ DOMExceptionTranslator exception(exec); switch (token) { - case Title: - if (doc.title() != val) doc.setTitle(val); - return; case Body: { DOM::NodeImpl* body = toNode(value); if (body->isHTMLElement()) --- branches/KDE/4.0/kdelibs/khtml/ecma/kjs_html.h #793940:793941 @@ -45,7 +45,7 @@ virtual const ClassInfo* classInfo() const { return &info; } static const ClassInfo info; - enum { Title, Referrer, Domain, URL, Body, Location, Cookie, + enum { Referrer, Domain, URL, Body, Location, Cookie, Images, Applets, Links, Forms, Layers, Anchors, Scripts, All, Clear, Open, Close, Write, WriteLn, GetElementsByName, GetSelection, CaptureEvents, ReleaseEvents, BgColor, FgColor, AlinkColor, LinkColor, VlinkColor, LastModified,