Bug 50453 - [Qt] QtWebKit does not seem to follow -webkit-slider-thumb
Summary: [Qt] QtWebKit does not seem to follow -webkit-slider-thumb
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Minor
Assignee: Benjamin Poulain
URL:
Keywords: Qt, QtTriaged
Depends on: 66732
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-03 04:47 PST by Benjamin Poulain
Modified: 2011-08-24 03:51 PDT (History)
3 users (show)

See Also:


Attachments
Patch (4.54 KB, patch)
2011-08-18 18:30 PDT, Tatiana Meshkova
no flags Details | Formatted Diff | Diff
Patch (6.70 KB, patch)
2011-08-23 13:55 PDT, Tatiana Meshkova
no flags Details | Formatted Diff | Diff
Patch (7.14 KB, patch)
2011-08-23 16:31 PDT, Tatiana Meshkova
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2010-12-03 04:47:07 PST
WebKit selectors include "-webkit-slider-thumb". This does not seem to do anything on QtWebKit.
Comment 1 Tatiana Meshkova 2011-08-18 18:30:08 PDT
Created attachment 104433 [details]
Patch
Comment 2 Benjamin Poulain 2011-08-19 02:43:59 PDT
Comment on attachment 104433 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=104433&action=review

> Source/WebCore/ChangeLog:8
> +        Get rid of upcasting, that prevents related crashes.
> +        Allow to display SliderTrack and SliderThumb without <input type=range>.

The changelog should explain the changes, it is not just a quick summary of what you have done.
When the patch is trivial it is ok to have a simple changelog, but in general you need a good explanation.

What is the crash you are fixing? Why haven't you included a layout test for it?
Comment 3 Tatiana Meshkova 2011-08-22 18:13:02 PDT
(In reply to comment #2)

I've filed RenderThemeQt::adjustSliderThumbSize changes separately, bug 66732 

> What is the crash you are fixing? Why haven't you included a layout test for it?

The test case is:
<html><body><p style="-webkit-appearance: slider-vertical; height: 15px"></p></body></html>

Making layout test
Comment 4 Benjamin Poulain 2011-08-23 04:28:41 PDT
Comment on attachment 104433 [details]
Patch

> Making layout test

-> Clearing review flag in the meantime.
Comment 5 Tatiana Meshkova 2011-08-23 13:55:52 PDT
Created attachment 104909 [details]
Patch
Comment 6 Kenneth Rohde Christiansen 2011-08-23 14:23:10 PDT
Comment on attachment 104909 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=104909&action=review

> LayoutTests/ChangeLog:7
> +        Reviewed by NOBODY (OOPS!).
> +

A short desccription would be nice

> Source/WebCore/ChangeLog:11
> +        Get rid of upcasting. Allow to display SliderTrack and SliderThumb
> +        without <input type=range>.
> +
> +        Reviewed by NOBODY (OOPS!).
> +

I think it is more common to have the Reviewed by right after the bugzilla links.

> Source/WebCore/platform/qt/RenderThemeQt.cpp:-922
> -    RenderSlider* renderSlider = toRenderSlider(o);
> -    HTMLInputElement* input = renderSlider->node()->toInputElement();
> -    IntRect thumbRect = sliderThumbElementOf(input)->getRect();
> -

You seem to remove a lot of code without the ChangeLog telling why that was possible

> Source/WebCore/platform/qt/RenderThemeQt.cpp:953
> +        option.orientation = Qt::Vertical;

So it is initialized to Horizontal by default? Maybe add a comment or just add the else clause
Comment 7 Tatiana Meshkova 2011-08-23 16:22:57 PDT
(In reply to comment #6)

> > Source/WebCore/platform/qt/RenderThemeQt.cpp:953
> > +        option.orientation = Qt::Vertical;
> 
> So it is initialized to Horizontal by default? Maybe add a comment or just add the else clause

yep, http://doc.qt.nokia.com/qstyleoptionslider.html#orientation-var
Same code already used in RenderThemeQt twice with no comments. I don't think it's necessary to comment it now.

I'll fix the rest.
Comment 8 Tatiana Meshkova 2011-08-23 16:31:39 PDT
Created attachment 104927 [details]
Patch
Comment 9 WebKit Review Bot 2011-08-24 03:51:36 PDT
Comment on attachment 104927 [details]
Patch

Clearing flags on attachment: 104927

Committed r93702: <http://trac.webkit.org/changeset/93702>
Comment 10 WebKit Review Bot 2011-08-24 03:51:40 PDT
All reviewed patches have been landed.  Closing bug.