Version: (using KDE 4.0.5) OS: Linux Installed from: SuSE RPMs It is not possible to obtain valid left and top offsets for HTML elements that are statically positioned, using JavaScript. The following is an example of this: http://visualmenu.com/internal/bug-reports/kde/positioning/ In this example, the red square is dynamically created and placed directly below the blue square. In Konqueror Version 4.0.4, running in openSUSE Linux, the red square is not positioned correctly. To see the expected behavior, view the example using Firefox, Safari, or Opera.
Hi, and thanks a lot for the bug report. One question, though: any chance you modified it after initially uploading it, since it looks different now then when I first opened it.
We behave differently from what's expected here in strict mode... Some analysis: http://websvn.kde.org/trunk/KDE/kdelibs/khtml/rendering/render_object.cpp?view=diff&r1=401452&r2=401453 vs. https://bugs.webkit.org/show_bug.cgi?id=11109 (and http://trac.webkit.org/changeset/19149) ... I need to test whether we match IE in strict mode anyway, there are too many conditionals for me to keep track of.
Created attachment 27135 [details] A logging version of the testcase This just lists all the elements and relevant offsetLeft/Top to make it easier to figure things out. P.S. any rendering folks reading -- I would appreciate some help to implement getClientRects()..
SVN commit 864534 by ggarand: fix offsetTop/Left/Parent properties to be more in conformance with draft CSSOM View module specification. http://www.w3.org/TR/cssom-view/#offset-attributes brings better compatibility as a bonus. BUG: 170091, 170055