<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>170055</bug_id>
          
          <creation_ts>2008-08-29 21:46:05 +0000</creation_ts>
          <short_desc>Retrieving offsets of statically positioned elements not possible</short_desc>
          <delta_ts>2008-09-25 01:54:17 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>konqueror</product>
          <component>general</component>
          <version>4.0</version>
          <rep_platform>openSUSE</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ed Phillips">mymymy</reporter>
          <assigned_to name="Konqueror Bugs">konqueror-bugs-null</assigned_to>
          <cc>germain</cc>
    
    <cc>maksim</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>642133</commentid>
    <comment_count>0</comment_count>
    <who name="Ed Phillips">mymymy</who>
    <bug_when>2008-08-29 21:46:05 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>642142</commentid>
    <comment_count>1</comment_count>
    <who name="Maksim Orlovich">maksim</who>
    <bug_when>2008-08-29 22:12:32 +0000</bug_when>
    <thetext>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.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>642145</commentid>
    <comment_count>2</comment_count>
    <who name="Maksim Orlovich">maksim</who>
    <bug_when>2008-08-29 22:41:02 +0000</bug_when>
    <thetext>We behave differently from what&apos;s expected here in strict mode...

Some analysis:
http://websvn.kde.org/trunk/KDE/kdelibs/khtml/rendering/render_object.cpp?view=diff&amp;r1=401452&amp;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. 


</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>642152</commentid>
    <comment_count>3</comment_count>
      <attachid>27135</attachid>
    <who name="Maksim Orlovich">maksim</who>
    <bug_when>2008-08-29 22:53:32 +0000</bug_when>
    <thetext>Created attachment 27135
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()..</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>648723</commentid>
    <comment_count>4</comment_count>
    <who name="Germain Garand">germain</who>
    <bug_when>2008-09-25 01:54:17 +0000</bug_when>
    <thetext>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
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>27135</attachid>
            <date>2008-08-29 22:53:32 +0000</date>
            <delta_ts>2008-08-29 22:53:32 +0000</delta_ts>
            <desc>A logging version of the testcase</desc>
            <filename>offset.html</filename>
            <type>text/html</type>
            <size>1826</size>
            <attacher name="Maksim Orlovich">maksim</attacher>
            
              <data encoding="base64">PCEtLTwhRE9DVFlQRSBodG1sIFBVQkxJQyAiLS8vVzNDLy9EVEQgWEhUTUwgMS4wIFRyYW5zaXRp
b25hbC8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9UUi94aHRtbDEvRFREL3hodG1sMS10cmFuc2l0
aW9uYWwuZHRkIj4tLT4KPGh0bWwgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGh0bWwi
Pgo8aGVhZD4KPG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0
bWw7IGNoYXJzZXQ9aXNvLTg4NTktMSIgLz4KPHRpdGxlPkR5bmFtaWMgUG9zaXRpb25pbmcgVGVz
dDwvdGl0bGU+Cgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoKLypib2R5IHsgCiAgYm9yZGVyOiAx
cHggc29saWQgcmVkOwogIG1hcmdpbjogMHB4Owp9Ki8KCiNhLAojYgp7Cgl3aWR0aDogMTAwcHg7
CgloZWlnaHQ6IDEwMHB4OwkKfQoKI2EKewogICBiYWNrZ3JvdW5kOiBibHVlOwp9CgojYgp7CiAg
IGJhY2tncm91bmQ6IHJlZDsKCXBvc2l0aW9uOmFic29sdXRlOwoJdG9wOiAwOwoJbGVmdDogMDsK
fQoKPC9zdHlsZT4KCjxzY3JpcHQgdHlwZT0idGV4dC9qYXZhc2NyaXB0Ij4KCiAgb3V0ID0gIiI7
CiAgZnVuY3Rpb24gbG9nKG1zZykgewogICAgICBvdXQgKz0gbXNnICsgIjxicj4iOwovKiAgICAg
IHZhciBjID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoIm91dHB1dCIpOwogICAgICBjLmFwcGVu
ZENoaWxkKGRvY3VtZW50L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