RESOLVED FIXED 24066
Chromium drop-down box: selected items don't paint correctly when scrolled
https://bugs.webkit.org/show_bug.cgi?id=24066
Summary Chromium drop-down box: selected items don't paint correctly when scrolled
Jay Campan
Reported 2009-02-20 12:16:18 PST
When opening a select input in Chromium and scrolling-down in the popup, the items in the list don't paint properly, several are displayed as selected. Chromium associated bug : http://crbug.com/6743
Attachments
FramelessScrollView::invalidateRect now invalidates in the scrolled view coordinates (2.45 KB, patch)
2009-02-20 12:24 PST, Jay Campan
fishd: review-
Updated patch that invalidates in the parent coordinates. (2.06 KB, patch)
2009-02-25 08:39 PST, Jay Campan
fishd: review+
Updated patch, evil tabs removed in ChangeLog (2.09 KB, patch)
2009-02-25 08:57 PST, Jay Campan
no flags
Jay Campan
Comment 1 2009-02-20 12:24:48 PST
Created attachment 27835 [details] FramelessScrollView::invalidateRect now invalidates in the scrolled view coordinates A previous patch of mine fixing a painting problem with scroll-bars changes FramelessScrollView::invalidateRect to invalidate in the host window coordinates. This caused other painting problems. This patch reverts back that changes and fixes the painting of scroll-bars by ensuring the invalidateScrollBars method invalidates in the scrolled view coordinates.
Darin Fisher (:fishd, Google)
Comment 2 2009-02-24 15:08:51 PST
Comment on attachment 27835 [details] FramelessScrollView::invalidateRect now invalidates in the scrolled view coordinates >+2009-02-20 Jay Campan <jcampan@google.com> >+ >+ Reviewed by NOBODY (OOPS!). >+ nit: please add a bug link here and a description of the code change. >Index: WebCore/platform/chromium/FramelessScrollView.cpp >=================================================================== >--- WebCore/platform/chromium/FramelessScrollView.cpp (revision 41110) >+++ WebCore/platform/chromium/FramelessScrollView.cpp (working copy) >@@ -47,7 +47,7 @@ void FramelessScrollView::invalidateScro > // Add in our offset within the ScrollView. > IntRect dirtyRect = rect; > dirtyRect.move(scrollbar->x(), scrollbar->y()); >- invalidateRect(dirtyRect); >+ invalidateRect(windowToContents(dirtyRect)); I would expect that we need to convert from the coordinates of the Scrollbar to the coordinates of the ScrollView's content area. That is what FrameView::invalidateScrollbarRect does, and it is what the old code did. So, this change seems wrong. > bool FramelessScrollView::isActive() const >@@ -59,7 +59,7 @@ bool FramelessScrollView::isActive() con > void FramelessScrollView::invalidateRect(const IntRect& rect) > { > if (HostWindow* h = hostWindow()) >- h->repaint(rect, true); >+ h->repaint(contentsToWindow(rect), true); Same deal here. I'm surprised to see this differ from FrameView's invalidateRect implementation, but maybe there is something more subtle at play?
Jay Campan
Comment 3 2009-02-25 08:39:58 PST
Created attachment 27966 [details] Updated patch that invalidates in the parent coordinates.
Darin Fisher (:fishd, Google)
Comment 4 2009-02-25 08:50:21 PST
Comment on attachment 27966 [details] Updated patch that invalidates in the parent coordinates. >Index: WebCore/ChangeLog ... >+ Reviewed by NOBODY (OOPS!). >+ >+ https://bugs.webkit.org/show_bug.cgi?id=24066 >+ >+ Items in drop-downs were not painted correctly. >+ Makes sure the PopupListBox invalidates in the coordinates of >+ the window as this is FramelessScrollView::invalidateRect >+ paints to. the ChangeLog has tabs in it. those should be replaced with spaces. otherwise, looks great!
Jay Campan
Comment 5 2009-02-25 08:57:26 PST
Created attachment 27967 [details] Updated patch, evil tabs removed in ChangeLog
Darin Fisher (:fishd, Google)
Comment 6 2009-02-25 08:59:08 PST
Note You need to log in before you can comment on or make changes to this bug.