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

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: Created 4 years, 5 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 927 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 list->append(*CSSPrimitiveValue::createIdentifier(CSSValueNone)); 938 list->append(*CSSPrimitiveValue::createIdentifier(CSSValueNone));
939 } else if (touchAction == TouchActionManipulation) { 939 } else if (touchAction == TouchActionManipulation) {
940 list->append(*CSSPrimitiveValue::createIdentifier(CSSValueManipulation)) ; 940 list->append(*CSSPrimitiveValue::createIdentifier(CSSValueManipulation)) ;
941 } else { 941 } else {
942 if ((touchAction & TouchActionPanX) == TouchActionPanX) 942 if ((touchAction & TouchActionPanX) == TouchActionPanX)
943 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanX)); 943 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanX));
944 else if (touchAction & TouchActionPanLeft) 944 else if (touchAction & TouchActionPanLeft)
945 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanLeft)); 945 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanLeft));
946 else if (touchAction & TouchActionPanRight) 946 else if (touchAction & TouchActionPanRight)
947 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanRight)) ; 947 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanRight)) ;
948
949 if ((touchAction & TouchActionPanY) == TouchActionPanY) 948 if ((touchAction & TouchActionPanY) == TouchActionPanY)
950 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanY)); 949 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanY));
951 else if (touchAction & TouchActionPanUp) 950 else if (touchAction & TouchActionPanUp)
952 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanUp)); 951 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanUp));
953 else if (touchAction & TouchActionPanDown) 952 else if (touchAction & TouchActionPanDown)
954 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanDown)); 953 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanDown));
954
955 if ((touchAction & TouchActionPinchZoom) == TouchActionPinchZoom)
956 list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePinchZoom) );
955 } 957 }
958
956 ASSERT(list->length()); 959 ASSERT(list->length());
957 return list; 960 return list;
958 } 961 }
959 962
960 static CSSValue* valueForWillChange(const Vector<CSSPropertyID>& willChangePrope rties, bool willChangeContents, bool willChangeScrollPosition) 963 static CSSValue* valueForWillChange(const Vector<CSSPropertyID>& willChangePrope rties, bool willChangeContents, bool willChangeScrollPosition)
961 { 964 {
962 CSSValueList* list = CSSValueList::createCommaSeparated(); 965 CSSValueList* list = CSSValueList::createCommaSeparated();
963 if (willChangeContents) 966 if (willChangeContents)
964 list->append(*CSSPrimitiveValue::createIdentifier(CSSValueContents)); 967 list->append(*CSSPrimitiveValue::createIdentifier(CSSValueContents));
965 if (willChangeScrollPosition) 968 if (willChangeScrollPosition)
(...skipping 2037 matching lines...) Expand 10 before | Expand all | Expand 10 after
3003 case CSSPropertyAll: 3006 case CSSPropertyAll:
3004 return nullptr; 3007 return nullptr;
3005 default: 3008 default:
3006 break; 3009 break;
3007 } 3010 }
3008 ASSERT_NOT_REACHED(); 3011 ASSERT_NOT_REACHED();
3009 return nullptr; 3012 return nullptr;
3010 } 3013 }
3011 3014
3012 } // namespace blink 3015 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698