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

Side by Side Diff: Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 87973002: add pan-x and pan-y support to CSS touch-action parsing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated review comments and merge to trunk Created 7 years 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 | « Source/core/css/CSSValueKeywords.in ('k') | Source/core/rendering/style/RenderStyleConstants.h » ('j') | 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 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 return; 557 return;
558 558
559 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 559 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
560 560
561 if (primitiveValue->getValueID()) 561 if (primitiveValue->getValueID())
562 return state.style()->setVerticalAlign(*primitiveValue); 562 return state.style()->setVerticalAlign(*primitiveValue);
563 563
564 state.style()->setVerticalAlignLength(primitiveValue->convertToLength<FixedC onversion | PercentConversion>(state.cssToLengthConversionData())); 564 state.style()->setVerticalAlignLength(primitiveValue->convertToLength<FixedC onversion | PercentConversion>(state.cssToLengthConversionData()));
565 } 565 }
566 566
567 void StyleBuilderFunctions::applyValueCSSPropertyTouchAction(StyleResolverState& state, CSSValue* value)
568 {
569 TouchAction action = RenderStyle::initialTouchAction();
570 for (CSSValueListIterator i(value); i.hasMore(); i.advance())
571 action |= *toCSSPrimitiveValue(i.value());
572
573 state.style()->setTouchAction(action);
574 }
575
567 static void resetEffectiveZoom(StyleResolverState& state) 576 static void resetEffectiveZoom(StyleResolverState& state)
568 { 577 {
569 // Reset the zoom in effect. This allows the setZoom method to accurately co mpute a new zoom in effect. 578 // Reset the zoom in effect. This allows the setZoom method to accurately co mpute a new zoom in effect.
570 state.setEffectiveZoom(state.parentStyle() ? state.parentStyle()->effectiveZ oom() : RenderStyle::initialZoom()); 579 state.setEffectiveZoom(state.parentStyle() ? state.parentStyle()->effectiveZ oom() : RenderStyle::initialZoom());
571 } 580 }
572 581
573 void StyleBuilderFunctions::applyInitialCSSPropertyZoom(StyleResolverState& stat e) 582 void StyleBuilderFunctions::applyInitialCSSPropertyZoom(StyleResolverState& stat e)
574 { 583 {
575 resetEffectiveZoom(state); 584 resetEffectiveZoom(state);
576 state.setZoom(RenderStyle::initialZoom()); 585 state.setZoom(RenderStyle::initialZoom());
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after
2170 break; 2179 break;
2171 } 2180 }
2172 case CSSPropertyEnableBackground: 2181 case CSSPropertyEnableBackground:
2173 // Silently ignoring this property for now 2182 // Silently ignoring this property for now
2174 // http://bugs.webkit.org/show_bug.cgi?id=6022 2183 // http://bugs.webkit.org/show_bug.cgi?id=6022
2175 break; 2184 break;
2176 } 2185 }
2177 } 2186 }
2178 2187
2179 } // namespace WebCore 2188 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/CSSValueKeywords.in ('k') | Source/core/rendering/style/RenderStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698