[Webkit-unassigned] [Bug 102323] Add Settings to disable custom scrollbars on main frame

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 15 15:46:52 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=102323





--- Comment #6 from Tien-Ren Chen <trchen at chromium.org>  2012-11-15 15:48:42 PST ---
(In reply to comment #4)
> (From update of attachment 174332 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=174332&action=review
> 
> How do other mobile ports of WebKit solve this problem?

I'm not really sure. As far as I know, iOS Safari doesn't create custom scrollbars on any frames including iframes, but I don't know where does the hack kicks in.

It is debatable whether we should disable custom scrollbar completely or just on frames or just on the main frame. My opinion is that we should divert from standard webkit behavior as little as possible.

> > Source/WebCore/page/FrameView.cpp:512
> > +    if (m_frame && m_frame->page() && m_frame->settings()) {
> 
> The line below this one implies that m_frame can never be 0 here.
> 
> Rather than testing m_frame-page() for 0, we'd usually write this test as:
> 
> if (Settings* settings = m_frame->settings()) {
>    ...
> }

Done

> > Source/WebCore/page/Settings.h:657
> > +        void setMainFrameCustomScrollbarDisabled(bool disabled) { m_mainFrameCustomScrollbarDisabled = disabled; }
> > +        bool mainFrameCustomScrollbarDisabled() const { return m_mainFrameCustomScrollbarDisabled; }
> 
> We generally write settings in terms of "enabled" rather than "disabled".

Let's make it allowCustomScrollbarInMainFrame

> >> Source/WebKit/chromium/src/WebSettingsImpl.cpp:65
> >> +#if OS(ANDROID)
> > 
> > The normal approach is to have a separate patch in the Chromium tree doing this, since we try to avoid having #if OS() in WebKit.
> 
> Yeah, we shouldn't have OS(ANDROID) ifdefs in this code.  The reason to have Settings is so they can be configured by the embedder.

Done

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list