Version: (using KDE KDE 3.1.2) Installed from: Compiled From Sources Compiler: gcc 2.95.3 OS: FreeBSD The site http://www.stshenouda.com/coptlang/coptalfa.htm has a very large imagemap. It probably extends below the bottom of the browser window. After scrolling the imagemap, say so you can see the letter "pi" in the first column, 5th row (i use my wheelmouse for this, if that makes any difference), and pointing to the "pi", the status bar in konqui gives coordinates 56,431. However, when I _click_ on the "pi", the Y coordinate is mangled, and the coordinates passed to the image map handler are 56,191. This is reproducible on another machine with 3.1.2 from FreeBSD ports, too.
I've got this problem as well. The Y coordinate being returned to the server is the coordinate that the mouse would be over if the page hadn't been scrolled BUT you had clicked on the image. e.g. On my page which is a 5x5 tile of image I can get a negative Y coordinate because the tile that I click on would be below the bottom of the screen if the page hadn't been scrolled.
*** Bug 60567 has been marked as a duplicate of this bug. ***
*** Bug 47404 has been marked as a duplicate of this bug. ***
*** Bug 60905 has been marked as a duplicate of this bug. ***
*** Bug 55531 has been marked as a duplicate of this bug. ***
Same problem here, link shown in status line is ok.
*** Bug 64410 has been marked as a duplicate of this bug. ***
Not FreeBSD specific. Still present in CVS HEAD from dec. 28th. As Olaf points out, the link shown in the status line is correct, but when you click the link the coordinates get mangled.
*** Bug 73126 has been marked as a duplicate of this bug. ***
Also happens with horizontal scrolling: (1) Load http://selfhtml.teamone.de/html/grafiken/anzeige/img_usemap.htm (2) Move the mouse over "Bamberg". The mouse pointer should become a hand. (3) Make the window as narrow as possible (4) Scroll the window to the right, so that "Bamberg" is visible again. (5) Move the mouse over "Bamberg". The mouse pointer does not become a hand and the link is not working any more.
Subject: kdelibs/khtml CVS commit by mueller: * html/html_inlineimpl.cpp (defaultEventHandler): use content, not viewport coordinates for server side image maps (#59701). * rendering/bidi.cpp (computeVerticalPositionsForLine): update overflowWidth, otherwise a lot of things go wrong (#59701). CCMAIL: 59701-done@bugs.kde.org M +6 -0 ChangeLog 1.190 M +10 -3 html/html_inlineimpl.cpp 1.131 M +4 -1 rendering/bidi.cpp 1.179 --- kdelibs/khtml/ChangeLog #1.189:1.190 @@ -1,4 +1,10 @@ 2004-01-26 Dirk Mueller <mueller@kde.org> + * html/html_inlineimpl.cpp (defaultEventHandler): use content, not + viewport coordinates for server side image maps (#59701). + + * rendering/bidi.cpp (computeVerticalPositionsForLine): update + overflowWidth, otherwise a lot of things go wrong (#59701). + * misc/loader.cpp (data): correctly emit notifyFinished(), otherwise our state machine goes out of sync. --- kdelibs/khtml/html/html_inlineimpl.cpp #1.130:1.131 @@ -99,8 +99,15 @@ void HTMLAnchorElementImpl::defaultEvent if(r && e) { - int absx, absy; + KHTMLView* v = getDocument()->view(); + int x = e->clientX(); + int y = e->clientY(); + int absx = 0; + int absy = 0; + if ( v ) { + x += v->contentsX(); + y += v->contentsY(); + } r->absolutePosition(absx, absy); - int x(e->clientX() - absx), y(e->clientY() - absy); - url += QString("?%1,%2").arg( x ).arg( y ); + url += QString("?%1,%2").arg( x - absx ).arg( y - absy ); } else { --- kdelibs/khtml/rendering/bidi.cpp #1.178:1.179 @@ -1138,4 +1138,7 @@ void RenderBlock::computeVerticalPositio else x += r->box->width() + spaceAdd; + if ( x > m_overflowWidth ) + m_overflowWidth = x; + r = sruns->next(); }
Could it be, that this bug is appearing again with Konqueror 3.2.0? I was not able to reproduce it with RC1, but with the final 3.2 it's there again.
This bug is still in KDE 3.2.2. An image form submit (<submit type="image" name="bla">) sends the wrong coordinates when the html page is scrolled.
This bug is still present in KDE 3.2.3 (SuSE RPMs on i386).
I can confirm that this bug is still present in the Fedora Core 2 KDE 3.2.3 RPMS as well.
I can not confirm this bug with KDE 3.2.3, which I have compiled by myself on RedHat 9. While I was able to reproduce this with earlier versions, I cannot reproduce it since 3.2.1/ (see my posting above on how to reproduce it).
Cannot reproduce it either with KDE 3.2.3 nor KDE CVS >= 2004-07-20.
Testing original link with recent CVS (3.3b2) shows it works; Bamberg link (horizontal scrolling) also works.
Just checked with KDE 3.3 release from SuSE 9.0 rpms. Still broken x and y coordinates. Try this test case: http://eisfuchs.info/eisfuchs/imagetest.html Resize konqueror and scroll a little to the right and down, then pick a spot on the map and click on it. After reload you will see the coordinates and the spot you clicked on, but it's in the wrong position.
Regression in 3.3 Final? I can reproduce this with the following test: http://eisfuchs.info/eisfuchs/imagetest.html Make the window only so bit that the map only shows down to Frankfurt Scroll to the bottom Click on Stuttgart Notice the green dot is off by the distance of the scroll, and is showing up near Bielefeld instead. Make the window big enough to see the whole map, click on Stuttgart again, and the green dot is correctly placed right where you clicked. Equally reproducible on this map with horizontal scroll.
Seems really to have regressed.
The testcase in comment #20 is not using the patched code, but rather a form. Seems something else needs to be patched, but it not a regression.
CVS commit by carewolf: Fix "image" INPUT forms to also use content rather than viewport position BUG:59701 M +29 -25 ChangeLog 1.393 M +5 -0 html/html_formimpl.cpp 1.424
This bug is still in KDE 3.4rc1. Was the fix too late for the rc? Thanks for looking into this bug, it's a really nasty one, it seems :)
CVS commit by carewolf: Backport of fix for #59701 CCBUG: 59701 M +5 -0 html_formimpl.cpp 1.421.2.1 --- kdelibs/khtml/html/html_formimpl.cpp #1.421:1.421.2.1 @@ -1605,4 +1605,9 @@ void HTMLInputElementImpl::defaultEventH xPos = me->clientX()-offsetX; yPos = me->clientY()-offsetY; + KHTMLView* v = getDocument()->view(); + if ( v ) { + xPos += v->contentsX(); + yPos += v->contentsY(); + } } }
*** Bug 85901 has been marked as a duplicate of this bug. ***
Seems to be fixed in KDE 3.4.0-28 - SuSE 9.3 RPMs! Thank you, guys! Great work!