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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: Update the test Created 3 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Alexey Proskuryakov <ap@nypop.com>. 2 * Copyright (C) 2007 Alexey Proskuryakov <ap@nypop.com>.
3 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
5 * (http://www.torchmobile.com/) 5 * (http://www.torchmobile.com/)
6 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> 6 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com>
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
(...skipping 2667 matching lines...) Expand 10 before | Expand all | Expand 10 after
2678 case CSSValueSmooth: 2678 case CSSValueSmooth:
2679 return kScrollBehaviorSmooth; 2679 return kScrollBehaviorSmooth;
2680 default: 2680 default:
2681 break; 2681 break;
2682 } 2682 }
2683 NOTREACHED(); 2683 NOTREACHED();
2684 return kScrollBehaviorAuto; 2684 return kScrollBehaviorAuto;
2685 } 2685 }
2686 2686
2687 template <> 2687 template <>
2688 inline CSSIdentifierValue::CSSIdentifierValue(
2689 EScrollBoundaryBehavior boundary_behavior)
2690 : CSSValue(kIdentifierClass) {
2691 switch (boundary_behavior) {
2692 case EScrollBoundaryBehavior::kAuto:
2693 value_id_ = CSSValueAuto;
2694 break;
2695 case EScrollBoundaryBehavior::kContain:
2696 value_id_ = CSSValueContain;
2697 break;
2698 case EScrollBoundaryBehavior::kNone:
2699 value_id_ = CSSValueNone;
2700 break;
2701 }
2702 }
2703
2704 template <>
2705 inline EScrollBoundaryBehavior CSSIdentifierValue::ConvertTo() const {
2706 switch (GetValueID()) {
2707 case CSSValueAuto:
2708 return EScrollBoundaryBehavior::kAuto;
2709 case CSSValueContain:
2710 return EScrollBoundaryBehavior::kContain;
2711 case CSSValueNone:
2712 return EScrollBoundaryBehavior::kNone;
2713 default:
2714 break;
2715 }
2716 NOTREACHED();
2717 return EScrollBoundaryBehavior::kAuto;
2718 }
2719
2720 template <>
2688 inline CSSIdentifierValue::CSSIdentifierValue(ScrollSnapType snap_type) 2721 inline CSSIdentifierValue::CSSIdentifierValue(ScrollSnapType snap_type)
2689 : CSSValue(kIdentifierClass) { 2722 : CSSValue(kIdentifierClass) {
2690 switch (snap_type) { 2723 switch (snap_type) {
2691 case kScrollSnapTypeNone: 2724 case kScrollSnapTypeNone:
2692 value_id_ = CSSValueNone; 2725 value_id_ = CSSValueNone;
2693 break; 2726 break;
2694 case kScrollSnapTypeMandatory: 2727 case kScrollSnapTypeMandatory:
2695 value_id_ = CSSValueMandatory; 2728 value_id_ = CSSValueMandatory;
2696 break; 2729 break;
2697 case kScrollSnapTypeProximity: 2730 case kScrollSnapTypeProximity:
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
2764 default: 2797 default:
2765 break; 2798 break;
2766 } 2799 }
2767 NOTREACHED(); 2800 NOTREACHED();
2768 return kContainsNone; 2801 return kContainsNone;
2769 } 2802 }
2770 2803
2771 } // namespace blink 2804 } // namespace blink
2772 2805
2773 #endif 2806 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698