Bug 170055 - Retrieving offsets of statically positioned elements not possible
Summary: Retrieving offsets of statically positioned elements not possible
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: 4.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-29 21:46 UTC by Ed Phillips
Modified: 2008-09-25 01:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
A logging version of the testcase (1.78 KB, text/html)
2008-08-29 22:53 UTC, Maksim Orlovich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Phillips 2008-08-29 21:46:05 UTC
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.
Comment 1 Maksim Orlovich 2008-08-29 22:12:32 UTC
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.
Comment 2 Maksim Orlovich 2008-08-29 22:41:02 UTC
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. 


Comment 3 Maksim Orlovich 2008-08-29 22:53:32 UTC
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()..
Comment 4 Germain Garand 2008-09-25 01:54:17 UTC
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