[Webkit-unassigned] [Bug 25889] [GTK] scrollbar policy for main frame is not implementable
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 9 08:31:54 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=25889
------- Comment #17 from zecke at selfish.org 2009-06-09 08:31 PDT -------
(From update of attachment 31076)
>
> +#if PLATFORM(GTK)
> + virtual void scrollbarsPolicyDidChange(Frame*) const { };
> +#endif
You will have to bite the bullet and add it to EmptyClients, Qt, Win, Mac,
Wx... all of *Client.h should be pure virtual to get the analogy of an
interface. I was recently reinforcing this.
> void ScrollView::scrollbarModes(ScrollbarMode& horizontalMode, ScrollbarMode& verticalMode) const
> {
> diff --git a/WebCore/platform/ScrollView.h b/WebCore/platform/ScrollView.h
> index 4d5bed1..179b916 100644
> --- a/WebCore/platform/ScrollView.h
> +++ b/WebCore/platform/ScrollView.h
> @@ -40,6 +40,9 @@
> #endif
>
> #if PLATFORM(GTK)
> +namespace WebCore {
> +class Frame;
> +}
> GtkAdjustment* m_verticalAdjustment;
> void setScrollOffset(const IntSize& offset) { m_scrollOffset = offset; }
> + virtual Frame* frame() const = 0;
> #endif
we can't do this, it is a layering violation and hyatt will deep fry us. more
on this later.
> +
> + // For frames that do have adjustments attached, we want to report
> + // policy changes, so that they may be applied to the widget to
> + // which the WebView has been added, for instance.
> + Page* page = frame() ? frame()->page() : 0;
> + if (page)
> + page->chrome()->client()->scrollbarsPolicyDidChange(frame());
> +}
> +
You can look at the "scrollRectIntoView". It is used by the mac to send
information into the ChromeClient. I think we can adopt a strategy like that.
What you can do either in the method above, or preferable in the ChromeClient
implementation itself, is ask the ScrollView if it is a FrameView (isFrameView)
and then cast it to a FrameView.
> + g_object_class_install_property(objectClass, PROP_HORIZONTAL_SCROLLBAR_POLICY,
> + g_param_spec_enum("horizontal-scrollbar-policy",
> + "Horizontal Scrollbar Policy",
> + "Determines the current policy for the horizontal scrollbar of the frame.",
> + GTK_TYPE_POLICY_TYPE,
> + GTK_POLICY_AUTOMATIC,
> + WEBKIT_PARAM_READABLE));
> +
> + /**
> + * WebKitWebFrame:vertical-scrollbar-policy:
> + *
> + * Determines the current policy for the vertical scrollbar of
> + * the frame. For the main frame, you should follow this policy on
> + * the widget that surrounds the #WebKitWebView to make some
> + * content behave as expected.
> + *
> + * Since: 1.1.9
> + */
> + g_object_class_install_property(objectClass, PROP_VERTICAL_SCROLLBAR_POLICY,
> + g_param_spec_enum("vertical-scrollbar-policy",
> + "Vertical Scrollbar Policy",
> + "Determines the current policy for the vertical scrollbar of the frame.",
> + GTK_TYPE_POLICY_TYPE,
> + GTK_POLICY_AUTOMATIC,
> + WEBKIT_PARAM_READABLE));
>
i18n in the attributes? :)
looks fine otherwise, sorry that we need another iteration.
--
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