From kde-commits Sun Oct 19 22:37:05 2008 From: Germain Garand Date: Sun, 19 Oct 2008 22:37:05 +0000 To: kde-commits Subject: branches/KDE/4.1/kdelibs/khtml Message-Id: <1224455825.020572.6848.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=122445583907604 SVN commit 873679 by ggarand: automatically merged revision 873660: Partly fix the scroll event dispatching, so that window.onscroll works. There are still some aspects of the dispatching that don't work as they should though. (fix /.'s floating comment box) M +6 -2 khtmlview.cpp --- branches/KDE/4.1/kdelibs/khtml/khtmlview.cpp #873678:873679 @@ -3916,8 +3916,12 @@ scheduleRepaint(0, 0, 0, 0); } - if (m_part->xmlDocImpl() && m_part->xmlDocImpl()->documentElement()) - m_part->xmlDocImpl()->documentElement()->dispatchHTMLEvent(EventImpl::SCROLL_EVENT, false, false); + if (m_part->xmlDocImpl() && m_part->xmlDocImpl()->documentElement()) { + // ### FIXME: there is something wrong with this event. + // With a capturing listener on document and window, window's should fire first, then document's. + // Also, this doesn't work:
+ m_part->xmlDocImpl()->documentElement()->dispatchWindowEvent(EventImpl::SCROLL_EVENT, false, false); + } if (QApplication::isRightToLeft()) dx = -dx;