--nextPart7630975.3fNNYRG9hZ
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
On Monday 04 October 2004 16:41, David Faure wrote:
> With Rainder Endres' help, I managed to track down the reason gmail won't
> load. The onload event listener for frames and iframes is registered on t=
he
> wrong body: the main body instead of the frame's body. Which means only o=
ne
> gets executed, and the JS code waits for ever.
>
> Testcase [gmail uses iframes, but it's the same with frames] :
>
> =3D=3D> blank.html <=3D=3D
> Hello world
>
> =3D=3D> frameset.html <=3D=3D
>
>
>
>
> The problem is HTMLFrameElementImpl::parseAttribute (for ATTR_ONLOAD).
> The code says:
> static_cast( getDocument() )->body()->
> setHTMLEventListener(EventImpl::LOAD_EVENT,
> =20
> getDocument()->createHTMLEventListener(attr->value().string(),"onload"));
> And this obviously finds the main element, since getDocument() for
> the frame element finds the main document.
>
> Did this ever work in KHTML? I thought it did, but looking at the code, I
> fail to see how. Since the attributes are parsed before the frame is
> "attached", so there is no KHTMLPart for the frame yet... i.e. no way to
> find the right document (or body) from that code. So do we need to store
> the value of the load and unload listeners until attach? We would then ne=
ed
> to have some code somewhere that sets the listener on the frame's body wh=
en
> creating it..... I'm working now on a patch that attempts to do that.
See also the last (reverted) patch to html_baseimpl.cpp Same issue.
http://bugs.kde.org/show_bug.cgi?id=3D72440 has the full discussion.
Cheers,
Waldo
=2D-=20
bastian@kde.org | Wanted: Talented KDE developer | bastian@suse.com
http://www.suse.de/de/company/suse/jobs/suse_pbu/developer_kde.html
--nextPart7630975.3fNNYRG9hZ
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQBBYWUXN4pvrENfboIRAghHAKCDSQtwiyltYoyStLtlbtlSwu5PCACeMoby
6fEiVmxoBNap7VacGU4Ve4o=
=pD+F
-----END PGP SIGNATURE-----
--nextPart7630975.3fNNYRG9hZ--