Bug 63740 - [Windows] Drawing Artifacts When Scrolling
Summary: [Windows] Drawing Artifacts When Scrolling
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-30 11:30 PDT by Brent Fulgham
Modified: 2011-06-30 13:00 PDT (History)
0 users

See Also:


Attachments
Example redraw problem (67.14 KB, image/png)
2011-06-30 11:39 PDT, Brent Fulgham
no flags Details
ZIP containing the HTML/CSS/JavaScript code to demonstrate the problem. (8.63 KB, application/x-zip-compressed)
2011-06-30 11:45 PDT, Brent Fulgham
no flags Details
ZIP containing the HTML/CSS/JavaScript code to demonstrate the problem. (8.63 KB, application/x-zip-compressed)
2011-06-30 11:51 PDT, Brent Fulgham
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2011-06-30 11:30:53 PDT
The attached test case triggers what seems to be a drawing bug where the web page is scrolled.

The attached HTML/CSS/JavaScript files implement a system where a particular DOM node is displayed with a semi-opaque overlay rectangle showing the region selected.  The region can cover more area than a single row, as the contents are hierarchical, so selecting the containing element causes child elements to be highlighted as a group.

When you move off of a node, the region is un-highlighted, and the new region is displayed with highlighting activated.  If you mouse over a blank area of the page, all highlighting is turned off.

Under current Safari (and nightlies), if you scroll partially down the page, then move your mouse up and down over the page I observe the following:

1. Some 'highlighted' regions are not turned off when moving off of the node.
2. Partial bits of previously highlighted regions are retained (i.e., part of a border, or most of a highlighted block with some small areas redrawn with the background color.

This looks like it might be a repainting problem, where regions are not being properly identified as 'dirty' when moving the mouse around.
Comment 1 Brent Fulgham 2011-06-30 11:39:29 PDT
Created attachment 99343 [details]
Example redraw problem

User is hovering over 'Mass Recovery (%)', but the old selection ('Rh Conformation Plot y-intercept') is mostly still visible, with only the region under the text above the cell being redrawn.
Comment 2 Brent Fulgham 2011-06-30 11:44:59 PDT
The problem does not seem to happen (or is at least very hard to reproduce) when interacting with the region at the top of the page (i.e., without scrolling).

If you shrink the browser window, such that the bottom scrollbar is always active, the problem also seems to go away.  There might be some issue of scrollbar size not being properly accounted for in the display logic.
Comment 3 Brent Fulgham 2011-06-30 11:45:32 PDT
Created attachment 99347 [details]
ZIP containing the HTML/CSS/JavaScript code to demonstrate the problem.
Comment 4 Brent Fulgham 2011-06-30 11:51:04 PDT
Created attachment 99350 [details]
ZIP containing the HTML/CSS/JavaScript code to demonstrate the problem.

Updated ZIP without security settings.
Comment 5 Brent Fulgham 2011-06-30 11:52:28 PDT
This example does not seem to trigger a problem under the current shipping version of Safari on Mac OS X (10.6.8)
Comment 6 Brent Fulgham 2011-06-30 13:00:24 PDT
Part of the problem seems to be the modification of the rect size (see the JavaScript routine 'adjustSelector', where the right-hand boundary of the rect is increased by the size of a button image (not used in the example).

It seems that when this is performed on a heading (which span the full width of the page), it forces the element width to extend beyond the page boundaries set during the initial layout.

This causes the scrollbar to pop-in on the bottom of the page.  At that point, the layout logic seems to get confused and the repaint problems start happening.

A workaround for now is to not increase the right-hand size of the rect, which prevents the last-minute scroll bar addition.  When I make that change, I no longer get drawing artifacts.