Bug 15037

Summary: Float content duplicated when using CSS 'clip' via javascript
Product: WebKit Reporter: Rob Dockins <robdockins>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Normal    
Priority: P2    
Version: 419.x   
Hardware: Mac (Intel)   
OS: OS X 10.4   
URL: http://www.cs.princeton.edu/~rdockins/safari-bug.html
Attachments:
Description Flags
Bug demo page none

Description Rob Dockins 2007-08-21 08:37:52 PDT
I discovered this bug when testing a site I was developing in Safari.  The above page is a minimal demonstration of the bug.  Basically, I have a side column with a floated div positioned next to a div with a lot of text.  The user can toggle between seeing the full text and seeing only the first few lines.  This is accomplished by setting the CSS 'clip' property on the long div via javascript.  However, when the paragraph is expanded to full length, part of the left-floated content is then duplicated further down the page.  The duplicated content will disappear if the window is resized.  Also, the occurance of the bug appears to be affected by some subtle aspect of layout, because its occurance is dependent on where the paragraphs are laid out on the page.

This problem does not occur on IE6, IE7, or Firefox.  Konqueror seems to have a different (but perhaps related) problem with the dynamic use of 'clip'.
Comment 1 Rob Dockins 2007-08-21 08:40:49 PDT
Created attachment 16053 [details]
Bug demo page

Source HTML of the bug demo
Comment 2 David Kilzer (:ddkilzer) 2007-08-21 09:33:25 PDT
This issue appears to be fixed in ToT WebKit.

Rob, please try testing with the Safari 3 Public Beta (<http://apple.com/safari/>) or pick up a WebKit nightly build (<http://nightly.webkit.org/>).

Thanks for taking the time to create a reduced test case and posting a bug!

Comment 3 Rob Dockins 2007-08-21 11:26:36 PDT
I can confirm that the bug is not present in the Safari public beta 3.0.3 (522.12.1) on my machine.

That's great news.  A fix in the pipeline means I don't have to worry about recoding the site :-)