Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutTheme.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutTheme.cpp b/third_party/WebKit/Source/core/layout/LayoutTheme.cpp |
| index 6d830002df66fcebd3c01e77bd2c49bf04eef9ba..5884865229f137cbc7f3d60396cf9a44cbae5d65 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutTheme.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutTheme.cpp |
| @@ -210,6 +210,14 @@ void LayoutTheme::adjustStyle(ComputedStyle& style, Element* e) |
| return adjustMenuListStyle(style, e); |
| case MenulistButtonPart: |
| return adjustMenuListButtonStyle(style, e); |
| + case SliderVerticalPart: |
| + case SliderHorizontalPart: |
| + case MediaFullScreenVolumeSliderPart: |
| + case MediaSliderPart: |
| + case MediaVolumeSliderPart: |
| + if (e->tagName() != "INPUT" || e->getAttribute("type") != "range") |
| + return; |
|
majidvp
2016/08/09 18:30:09
Better to move this inside adjustSliderStyle.
Also
|
| + return adjustSliderStyle(style); |
| case SliderThumbHorizontalPart: |
| case SliderThumbVerticalPart: |
| return adjustSliderThumbStyle(style); |
| @@ -627,6 +635,19 @@ void LayoutTheme::adjustMenuListButtonStyle(ComputedStyle&, Element*) const |
| { |
| } |
| +void LayoutTheme::adjustSliderStyle(ComputedStyle& style) const |
| +{ |
| + if (style.getTouchAction() != TouchActionAuto) { |
|
majidvp
2016/08/09 18:30:09
why do you need this?
Is this to prevent overridi
|
| + return; |
| + } |
| + if (style.appearance() == SliderVerticalPart) { |
| + style.setTouchAction(TouchActionPanX); |
| + } else { |
| + style.setTouchAction(TouchActionPanY); |
| + } |
| + return; |
|
majidvp
2016/08/09 18:30:09
This return is unnecessary.
|
| +} |
| + |
| void LayoutTheme::adjustSliderThumbStyle(ComputedStyle& style) const |
| { |
| adjustSliderThumbSize(style); |