Bug 207694 - [WPE] Add support for rendering sliders for range elements
Summary: [WPE] Add support for rendering sliders for range elements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WPE WebKit (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-13 06:50 PST by Carlos Garcia Campos
Modified: 2020-02-20 02:03 PST (History)
2 users (show)

See Also:


Attachments
Patch (7.72 KB, patch)
2020-02-13 06:52 PST, Carlos Garcia Campos
aperez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2020-02-13 06:50:38 PST
.
Comment 1 Carlos Garcia Campos 2020-02-13 06:52:26 PST
Created attachment 390637 [details]
Patch
Comment 2 Adrian Perez 2020-02-20 00:04:23 PST
Comment on attachment 390637 [details]
Patch

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

> Source/WebCore/platform/wpe/RenderThemeWPE.cpp:368
> +    if (part != SliderThumbHorizontalPart && part != SliderThumbVerticalPart)

Wouldn't it be enought here to use an assertion instead of a conditional
statement? e.g.

  ASSERT(part == SliderThumbHorizontalPart || part == SliderThumbVerticalPart)
Comment 3 Carlos Garcia Campos 2020-02-20 02:02:10 PST
Comment on attachment 390637 [details]
Patch

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

>> Source/WebCore/platform/wpe/RenderThemeWPE.cpp:368
>> +    if (part != SliderThumbHorizontalPart && part != SliderThumbVerticalPart)
> 
> Wouldn't it be enought here to use an assertion instead of a conditional
> statement? e.g.
> 
>   ASSERT(part == SliderThumbHorizontalPart || part == SliderThumbVerticalPart)

No, this can be called for other slider thumbs, like the media controls that we render differently. By not setting a size here for them we ensure RenderThemeWPE::paintSliderThumb() is not called fro them, that's why the assert is correct there.
Comment 4 Carlos Garcia Campos 2020-02-20 02:03:28 PST
Committed r257048: <https://trac.webkit.org/changeset/257048>