Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTheme.cpp

Issue 2266423003: Revert of Remove the blocking touch handlers for the input[type=range] and add touch-action instead (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTheme.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * This file is part of the theme implementation for form controls in WebCore. 2 * This file is part of the theme implementation for form controls in WebCore.
3 * 3 *
4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc. 4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 break; 203 break;
204 } 204 }
205 } 205 }
206 206
207 // Call the appropriate style adjustment method based off the appearance val ue. 207 // Call the appropriate style adjustment method based off the appearance val ue.
208 switch (style.appearance()) { 208 switch (style.appearance()) {
209 case MenulistPart: 209 case MenulistPart:
210 return adjustMenuListStyle(style, e); 210 return adjustMenuListStyle(style, e);
211 case MenulistButtonPart: 211 case MenulistButtonPart:
212 return adjustMenuListButtonStyle(style, e); 212 return adjustMenuListButtonStyle(style, e);
213 case SliderHorizontalPart:
214 case SliderVerticalPart:
215 case MediaFullScreenVolumeSliderPart:
216 case MediaSliderPart:
217 case MediaVolumeSliderPart:
218 return adjustSliderContainerStyle(style, e);
219 case SliderThumbHorizontalPart: 213 case SliderThumbHorizontalPart:
220 case SliderThumbVerticalPart: 214 case SliderThumbVerticalPart:
221 return adjustSliderThumbStyle(style); 215 return adjustSliderThumbStyle(style);
222 case SearchFieldPart: 216 case SearchFieldPart:
223 return adjustSearchFieldStyle(style); 217 return adjustSearchFieldStyle(style);
224 case SearchFieldCancelButtonPart: 218 case SearchFieldCancelButtonPart:
225 return adjustSearchFieldCancelButtonStyle(style); 219 return adjustSearchFieldCancelButtonStyle(style);
226 default: 220 default:
227 break; 221 break;
228 } 222 }
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 620
627 bool LayoutTheme::shouldHaveSpinButton(HTMLInputElement* inputElement) const 621 bool LayoutTheme::shouldHaveSpinButton(HTMLInputElement* inputElement) const
628 { 622 {
629 return inputElement->isSteppable() && inputElement->type() != InputTypeNames ::range; 623 return inputElement->isSteppable() && inputElement->type() != InputTypeNames ::range;
630 } 624 }
631 625
632 void LayoutTheme::adjustMenuListButtonStyle(ComputedStyle&, Element*) const 626 void LayoutTheme::adjustMenuListButtonStyle(ComputedStyle&, Element*) const
633 { 627 {
634 } 628 }
635 629
636 void LayoutTheme::adjustSliderContainerStyle(ComputedStyle& style, Element* e) c onst
637 {
638 if (e && (e->shadowPseudoId() == "-webkit-media-slider-container" || e->shad owPseudoId() == "-webkit-slider-container")) {
639 if (style.appearance() == SliderVerticalPart) {
640 style.setTouchAction(TouchActionPanX);
641 style.setAppearance(NoControlPart);
642 } else {
643 style.setTouchAction(TouchActionPanY);
644 style.setAppearance(NoControlPart);
645 }
646 }
647 }
648
649 void LayoutTheme::adjustSliderThumbStyle(ComputedStyle& style) const 630 void LayoutTheme::adjustSliderThumbStyle(ComputedStyle& style) const
650 { 631 {
651 adjustSliderThumbSize(style); 632 adjustSliderThumbSize(style);
652 } 633 }
653 634
654 void LayoutTheme::adjustSliderThumbSize(ComputedStyle&) const 635 void LayoutTheme::adjustSliderThumbSize(ComputedStyle&) const
655 { 636 {
656 } 637 }
657 638
658 void LayoutTheme::adjustSearchFieldStyle(ComputedStyle&) const 639 void LayoutTheme::adjustSearchFieldStyle(ComputedStyle&) const
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 914
934 // padding - not honored by WinIE, needs to be removed. 915 // padding - not honored by WinIE, needs to be removed.
935 style.resetPadding(); 916 style.resetPadding();
936 917
937 // border - honored by WinIE, but looks terrible (just paints in the control box and turns off the Windows XP theme) 918 // border - honored by WinIE, but looks terrible (just paints in the control box and turns off the Windows XP theme)
938 // for now, we will not honor it. 919 // for now, we will not honor it.
939 style.resetBorder(); 920 style.resetBorder();
940 } 921 }
941 922
942 } // namespace blink 923 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTheme.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698