[Webkit-unassigned] [Bug 24358] [GTK] Scrollbars not clipped correctly
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Mar 6 14:20:24 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=24358
xan.lopez at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
------- Comment #8 from xan.lopez at gmail.com 2009-03-06 14:20 PDT -------
Ok, remember what I said in the last patch about our scrollbars always being
renderlayout because the other ones are native? Not true. Turns out there are
scrollview scrollbars that are not native apparently. This happens in gmail for
example. Seems I either didn't follow the code correctly or there's some bug
somewhere, not sure. Anyway something like this fixes a new bug in gmail, where
the scrollbars disappear when you scroll:
diff --git a/WebCore/platform/gtk/ScrollbarGtk.cpp
b/WebCore/platform/gtk/ScrollbarGtk.cpp
index be4c1c4..0bd2dda 100644
--- a/WebCore/platform/gtk/ScrollbarGtk.cpp
+++ b/WebCore/platform/gtk/ScrollbarGtk.cpp
@@ -72,7 +72,12 @@ void ScrollbarGtk::frameRectsChanged()
// Translate our coordinates, we are a RenderLayout scrollbar because our
// ScrollView scrollbars are native.
- IntPoint loc = parent()->contentsToWindow(frameRect().location());
+ IntPoint loc;
+
+ if (parent()->isScrollViewScrollbar(this))
+ loc = parent()->convertToContainingWindow(frameRect().location());
+ else
+ loc = parent()->contentsToWindow(frameRect().location());
// Don't allow the allocation size to be negative
IntSize sz = frameRect().size();
@@ -141,7 +146,13 @@ void ScrollbarGtk::paint(GraphicsContext* context, const
IntRect& rect)
event->expose = *context->gdkExposeEvent();
event->expose.area = static_cast<GdkRectangle>(rect);
- IntPoint loc = parent()->contentsToWindow(rect.location());
+ IntPoint loc;
+
+ if (parent()->isScrollViewScrollbar(this))
+ loc = parent()->convertToContainingWindow(rect.location());
+ else
+ loc = parent()->contentsToWindow(rect.location());
+
event->expose.area.x = loc.x();
event->expose.area.y = loc.y();
I'll try to go through this again tomorrow though. Thoughts about it welcome.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list