[wpe-webkit] Smooth Scroll option not working
Mohan Reddy
mohan4technical at gmail.com
Tue Feb 25 01:03:09 PST 2020
Hi Carlos,
Thanks for your reply.
ENABLE_SMOOTH_SCROLLING option is enabled by default only in webkitgtk
not in WPE code, To enable ENABLE_SMOOTH_SCROLLING option in WPE we
need to include following file sources in *Source/WebCore/SourcesWPE.txt *file
to fix compilation issue.
< platform/generic/ScrollAnimatorGeneric.cpp
< platform/ScrollAnimationSmooth.cpp
< platform/ScrollAnimationKinetic.cpp
enable-smooth-scrolling option default value I changed to TRUE but still
smooth scrolling option is not working(In webkitgtk and WPE) So as per
your suggestion we are looking into polyfill to achieve the smooth
scrolling behavior in our app.
Please let me know If any one achieved smooth scrolling behavior with
webkit without using any polifill.
Thanks & Regards,
Mohan.
On Fri, Feb 21, 2020 at 6:53 PM Carlos Alberto Lopez Perez <
clopez at igalia.com> wrote:
> On 20/02/2020 12:41, Mohan Reddy wrote:
> > Hi ,
> >
> > I want to use *scroll-behavior: smooth css * option in my app , For
> this I
> > used wpewebkit-2.27.90 version and enabled *ENABLE_SMOOTH_SCROLLING*
> > option.
> > After enabling ENABLE_SMOOTH_SCROLLING I faced some compilation issues
> and
> > I fixed all the compilation errors but still I am not able to see smooth
> > scrolling effect.
> >
> > Is any one tried smooth scrolling option in latest WPE browser?
> >
> > I also tried on latest webkit gtk version :
> >
> https://stackoverflow.com/questions/60315753/smooth-scroll-option-not-working-in-webkitgtk
> >
>
> As far as i can see, the build option ENABLE_SMOOTH_SCROLLING its
> enabled by default for GTK and WPE since a long time, at least 2017 or
> before. So I don't understand how you can be having compilation problems
> with an option enabled by default so long ago.
>
> On the other hand this feature its guarded by a runtime setting that its
> disabled by default so you have to enable it for your app if you want to
> use it. The property is enable-smooth-scrolling [1].
>
> And finally, I think ENABLE_SMOOTH_SCROLLING its not what you think it
> is. I'm not 100% sure of what ENABLE_SMOOTH_SCROLLING does, but I think
> it just enables smooth scrolling in general, in any web site, but only
> when you scroll with the mouse the scrollbar, so when scrolling manually
> the page looks more "smooth".
>
> In your example, you want to use the CSS property "scroll-behavior",
> which is a very different thing. Support for that in WebKit its still
> experimental. As far as I can see support for that was just introduced
> in [3], and its currently guarded by the runtime setting
> CSSOMViewSmoothScrollingEnabled that its not exposed to the glib API, so
> currently the only way of enabling it its by patching WebKit. I'm also
> unsure if its expected to work as it is marked as experimental.
>
> I may suggest you to use some polyfill or JS to achieve the behaviour
> you expect, like https://github.com/cferdinandi/smooth-scroll
>
> Regards
>
>
> [1]
>
> https://webkitgtk.org/reference/webkit2gtk/stable/WebKitSettings.html#WebKitSettings--enable-smooth-scrolling
> [2] https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior
> [3] https://bugs.webkit.org/show_bug.cgi?id=205009
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-wpe/attachments/20200225/c9bf1c43/attachment.htm>
More information about the webkit-wpe
mailing list