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

Side by Side Diff: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp

Issue 2126323002: Add support for touch-action: pinch-zoom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add exception for mac Created 4 years, 2 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) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
7 * Copyright (C) 2015 Google Inc. All rights reserved. 7 * Copyright (C) 2015 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public 10 * modify it under the terms of the GNU Lesser General Public
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 list->append(*CSSPrimitiveValue::createIdentifier(CSSValueNone)); 959 list->append(*CSSPrimitiveValue::createIdentifier(CSSValueNone));
960 } else if (touchAction == TouchActionManipulation) { 960 } else if (touchAction == TouchActionManipulation) {
961 list->append(*CSSPrimitiveValue::createIdentifier(CSSValueManipulation)) ; 961 list->append(*CSSPrimitiveValue::createIdentifier(CSSValueManipulation)) ;
962 } else { 962 } else {
963 if ((touchAction & TouchActionPanX) == TouchActionPanX) 963 if ((touchAction & TouchActionPanX) == TouchActionPanX)
964 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanX)); 964 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanX));
965 else if (touchAction & TouchActionPanLeft) 965 else if (touchAction & TouchActionPanLeft)
966 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanLeft)); 966 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanLeft));
967 else if (touchAction & TouchActionPanRight) 967 else if (touchAction & TouchActionPanRight)
968 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanRight)) ; 968 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanRight)) ;
969
970 if ((touchAction & TouchActionPanY) == TouchActionPanY) 969 if ((touchAction & TouchActionPanY) == TouchActionPanY)
971 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanY)); 970 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanY));
972 else if (touchAction & TouchActionPanUp) 971 else if (touchAction & TouchActionPanUp)
973 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanUp)); 972 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanUp));
974 else if (touchAction & TouchActionPanDown) 973 else if (touchAction & TouchActionPanDown)
975 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanDown)); 974 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanDown));
975
976 if ((touchAction & TouchActionPinchZoom) == TouchActionPinchZoom)
977 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePinchZoom) );
976 } 978 }
979
977 ASSERT(list->length()); 980 ASSERT(list->length());
978 return list; 981 return list;
979 } 982 }
980 983
981 static CSSValue* valueForWillChange(const Vector<CSSPropertyID>& willChangePrope rties, bool willChangeContents, bool willChangeScrollPosition) 984 static CSSValue* valueForWillChange(const Vector<CSSPropertyID>& willChangePrope rties, bool willChangeContents, bool willChangeScrollPosition)
982 { 985 {
983 CSSValueList* list = CSSValueList::createCommaSeparated(); 986 CSSValueList* list = CSSValueList::createCommaSeparated();
984 if (willChangeContents) 987 if (willChangeContents)
985 list->append(*CSSPrimitiveValue::createIdentifier(CSSValueContents)); 988 list->append(*CSSPrimitiveValue::createIdentifier(CSSValueContents));
986 if (willChangeScrollPosition) 989 if (willChangeScrollPosition)
(...skipping 2047 matching lines...) Expand 10 before | Expand all | Expand 10 after
3034 case CSSPropertyAll: 3037 case CSSPropertyAll:
3035 return nullptr; 3038 return nullptr;
3036 default: 3039 default:
3037 break; 3040 break;
3038 } 3041 }
3039 ASSERT_NOT_REACHED(); 3042 ASSERT_NOT_REACHED();
3040 return nullptr; 3043 return nullptr;
3041 } 3044 }
3042 3045
3043 } // namespace blink 3046 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698