Summary: | Chromium drop-down box: selected items don't paint correctly when scrolled | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jay Campan <jcampan> | ||||||||
Component: | Platform | Assignee: | Jay Campan <jcampan> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | fishd | ||||||||
Priority: | P2 | ||||||||||
Version: | 420+ | ||||||||||
Hardware: | PC | ||||||||||
OS: | Windows Vista | ||||||||||
Attachments: |
|
Description
Jay Campan
2009-02-20 12:16:18 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.
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? Created attachment 27966 [details]
Updated patch that invalidates in the parent coordinates.
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! Created attachment 27967 [details]
Updated patch, evil tabs removed in ChangeLog
Landed as http://trac.webkit.org/changeset/41212 |