From kde-devel Sat Jan 06 23:34:44 2001 From: Alessandro Praduroux Date: Sat, 06 Jan 2001 23:34:44 +0000 To: kde-devel Subject: small bug in khtml/ecma (maybe) X-MARC-Message: https://marc.info/?l=kde-devel&m=97882460816600 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--------------Boundary-00=_WHLRIU9FS40RN4QXI3TK" --------------Boundary-00=_WHLRIU9FS40RN4QXI3TK Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Hi all, I use an online home banking service that is based on javascript and frames. javascript is used to open different files in frames depending on the user choiche on a combobox, using the following code top.body.location.href = "/HTML/Info.asp?Area=" + area + "&Rapporto="; top.head.dll.location.href = "/HTML/rapporti.asp?Area=" + area; where body and head are two frames. in kjs_window.cpp, function Window::get, the dom tree is searched for an element with value = 'body' or 'head', the element is found and retured. but the interpreter here needs a frame element, not a dom node. Code to retrieve the frame is just below the dom tree search, but never reached. I see two solution here: 1- reorganize the code to look first for a frame and then for a dom node, 2- check if the found node is a frame and ignore the node I did the former and it seems to work here, but since I do not know well the khtml code, I submit a patch here for review. bye -- Pradu ----------------------------------------- Alessandro Praduroux pradu@thekompany.com http://www.thekompany.com --------------Boundary-00=_WHLRIU9FS40RN4QXI3TK Content-Type: text/x-c++; charset="iso-8859-1"; name="ecma.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="ecma.patch" SW5kZXg6IGtqc193aW5kb3cuY3BwCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9ob21lL2tkZS9rZGVs aWJzL2todG1sL2VjbWEva2pzX3dpbmRvdy5jcHAsdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEuNzAK ZGlmZiAtdSAtMyAtcCAtcjEuNzAga2pzX3dpbmRvdy5jcHAKLS0tIGtqc193aW5kb3cuY3BwCTIw MDAvMTIvMjcgMTY6MDU6MzEJMS43MAorKysga2pzX3dpbmRvdy5jcHAJMjAwMS8wMS8wNiAyMzo0 MDoxMApAQCAtMjE3LDYgKzIxNywxMCBAQCBLSlNPIFdpbmRvdzo6Z2V0KGNvbnN0IFVTdHJpbmcg JnApIGNvbnN0CiAgIGlmICh2LmlzRGVmaW5lZCgpKQogICAgICAgcmV0dXJuIHY7CiAKKyAgS0hU TUxQYXJ0ICprcCA9IHBhcnQtPmZpbmRGcmFtZSggcC5xc3RyaW5nKCkgKTsKKyAgaWYgKGtwKQor ICAgIHJldHVybiBLSlNPKG5ld1dpbmRvdyhrcCkpOworCiAgIC8vIGFsbG93IHNob3J0Y3V0cyBs aWtlICdJbWFnZTEnIGluc3RlYWQgb2YgZG9jdW1lbnQuaW1hZ2VzLkltYWdlMQogICBpZiAocGFy dC0+ZG9jdW1lbnQoKS5pc0hUTUxEb2N1bWVudCgpKSB7IC8vIG1pZ2h0IGJlIFhNTAogICAgIERP TTo6SFRNTENvbGxlY3Rpb24gY29sbCA9IHBhcnQtPmh0bWxEb2N1bWVudCgpLmFsbCgpOwpAQCAt MjI1LDEwICsyMjksNiBAQCBLSlNPIFdpbmRvdzo6Z2V0KGNvbnN0IFVTdHJpbmcgJnApIGNvbnN0 CiAgICAgICAgIHJldHVybiBnZXRET01Ob2RlKGVsZW1lbnQpOwogICAgIH0KICAgfQotCi0gIEtI VE1MUGFydCAqa3AgPSBwYXJ0LT5maW5kRnJhbWUoIHAucXN0cmluZygpICk7Ci0gIGlmIChrcCkK LSAgICByZXR1cm4gS0pTTyhuZXdXaW5kb3coa3ApKTsKIAogICByZXR1cm4gVW5kZWZpbmVkKCk7 CiB9Cg== --------------Boundary-00=_WHLRIU9FS40RN4QXI3TK-- >> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<