Bug 31054 - position: relative; top: N px; miscalculates rect and therefor dirty rects when updated, though painting is in correct place
Summary: position: relative; top: N px; miscalculates rect and therefor dirty rects wh...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://www.mijnalbum.nl/?m=nettv
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-03 05:04 PST by Onne Gorter
Modified: 2022-12-30 15:17 PST (History)
1 user (show)

See Also:


Attachments
misrendering (7.71 KB, image/png)
2009-11-03 05:05 PST, Onne Gorter
no flags Details
rect position is incorrect from web inspector (50.54 KB, image/png)
2009-11-03 05:06 PST, Onne Gorter
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Onne Gorter 2009-11-03 05:04:16 PST
Javascript updated content suffers because old rendering is not updated. Any new (longer) rendering is showing correctly, see below for minimal test case, and the attached screenshots of this testcase.

---- test.html:
<html>
    <body>
        <span id=span1 style="position: relative; top: 30px;">hello</span>
    </body>

    <script>
setTimeout(function() {
    document.getElementById("span1").innerHTML="BRRRRRRRRRRRRRRRRR";
}, 500);
    </script>
</html>
Comment 1 Onne Gorter 2009-11-03 05:05:35 PST
Created attachment 42369 [details]
misrendering
Comment 2 Onne Gorter 2009-11-03 05:06:22 PST
Created attachment 42370 [details]
rect position is incorrect from web inspector
Comment 3 Ahmad Saleem 2022-12-30 15:17:04 PST
I am not able to reproduce this in Safari 16.2 using following JSFiddle (based of Comment 0):

JSFiddle - https://jsfiddle.net/rb8yLtpg/show

It does not show empty rect position in Inspector and also rendering issue is also not present and it matches other browsers (Chrome Canary 111 and Firefox Nightly 110).

I am marking this as "RESOLVED CONFIGURATION CHANGED" but if it is still reproducing, please reopen with updated test case. Thanks!