Bug 61459 - [Qt] Changes on QWebView's style don't affect scrollbars in the page
Summary: [Qt] Changes on QWebView's style don't affect scrollbars in the page
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2011-05-25 12:24 PDT by Rafael Brandao
Modified: 2014-02-03 03:17 PST (History)
4 users (show)

See Also:


Attachments
No difference between the rendering of both QWebViews. (16.03 KB, application/zip)
2011-05-25 12:24 PDT, Rafael Brandao
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Brandao 2011-05-25 12:24:00 PDT
Created attachment 94834 [details]
No difference between the rendering of both QWebViews.

If you use QWebView::setStyle, you won't see any change to the scrollbars that are going to be rendered on the page. It always uses QApplication::style instead. The attachment provides a very short example showing no difference between plastique style and windows style inside the page. This bug was detected later here https://bugs.webkit.org/show_bug.cgi?id=26045, but I couldn't find it filed as a bug report. As it was discussed there, this might be a regression.
Comment 1 Rafael Brandao 2011-06-01 07:09:18 PDT
After checking the code for a few days, I've realized it would be too much effort to change this behavior. The implementation is currently a mess, it will be difficult to change everything in small patches, so I will postpone this and come back at some point later (hopefully).

For who might be interested, the issue is around ScrollbarTheme::nativeTheme, which returns a static pointer to a class that mostly have static methods, and doesn't keep track of what page/frame the scrollbar is inserted, neither scrollbars themselves keep track of it, and also not all of these methods receives a scrollbar as parameter, so we can't just put a page/frame reference inside scrollbar, for example (and this was one of my ideas).

There's currently an implementation of what would be a custom scrollbar. To create it you must use RenderScrollbar::createScrollbar, but I couldn't make it work properly - I tried to force it to be used, but the resulting scrollbars geometry were bogus.
Comment 2 Jocelyn Turcotte 2014-02-03 03:17:51 PST
=== Bulk closing of Qt bugs ===

If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.

If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.