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

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

Issue 1373433002: Split out CSSPrimitiveValue's PropertyID into CSSCustomIdentValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_string
Patch Set: Rebase Created 5 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 if (toCSSPrimitiveValue(value).getValueID() == CSSValuePaused) 359 if (toCSSPrimitiveValue(value).getValueID() == CSSValuePaused)
360 return AnimPlayStatePaused; 360 return AnimPlayStatePaused;
361 ASSERT(toCSSPrimitiveValue(value).getValueID() == CSSValueRunning); 361 ASSERT(toCSSPrimitiveValue(value).getValueID() == CSSValueRunning);
362 return AnimPlayStatePlaying; 362 return AnimPlayStatePlaying;
363 } 363 }
364 364
365 CSSTransitionData::TransitionProperty CSSToStyleMap::mapAnimationProperty(const CSSValue& value) 365 CSSTransitionData::TransitionProperty CSSToStyleMap::mapAnimationProperty(const CSSValue& value)
366 { 366 {
367 if (value.isInitialValue()) 367 if (value.isInitialValue())
368 return CSSTransitionData::initialProperty(); 368 return CSSTransitionData::initialProperty();
369 if (value.isCustomIdentValue()) 369 if (value.isCustomIdentValue()) {
370 return CSSTransitionData::TransitionProperty(toCSSCustomIdentValue(value ).value()); 370 const CSSCustomIdentValue& customIdentValue = toCSSCustomIdentValue(valu e);
371 const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(value); 371 if (customIdentValue.isKnownPropertyID())
372 if (primitiveValue.getValueID() == CSSValueNone) 372 return CSSTransitionData::TransitionProperty(customIdentValue.valueA sPropertyID());
373 return CSSTransitionData::TransitionProperty(CSSTransitionData::Transiti onNone); 373 return CSSTransitionData::TransitionProperty(customIdentValue.value());
374 return CSSTransitionData::TransitionProperty(primitiveValue.getPropertyID()) ; 374 }
375 ASSERT(toCSSPrimitiveValue(value).getValueID() == CSSValueNone);
376 return CSSTransitionData::TransitionProperty(CSSTransitionData::TransitionNo ne);
375 } 377 }
376 378
377 PassRefPtr<TimingFunction> CSSToStyleMap::mapAnimationTimingFunction(const CSSVa lue& value, bool allowStepMiddle) 379 PassRefPtr<TimingFunction> CSSToStyleMap::mapAnimationTimingFunction(const CSSVa lue& value, bool allowStepMiddle)
378 { 380 {
379 // FIXME: We should probably only call into this function with a valid 381 // FIXME: We should probably only call into this function with a valid
380 // single timing function value which isn't initial or inherit. We can 382 // single timing function value which isn't initial or inherit. We can
381 // currently get into here with initial since the parser expands unset 383 // currently get into here with initial since the parser expands unset
382 // properties in shorthands to initial. 384 // properties in shorthands to initial.
383 385
384 if (value.isPrimitiveValue()) { 386 if (value.isPrimitiveValue()) {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 verticalRule = SpaceImageRule; 581 verticalRule = SpaceImageRule;
580 break; 582 break;
581 default: // CSSValueRepeat 583 default: // CSSValueRepeat
582 verticalRule = RepeatImageRule; 584 verticalRule = RepeatImageRule;
583 break; 585 break;
584 } 586 }
585 image.setVerticalRule(verticalRule); 587 image.setVerticalRule(verticalRule);
586 } 588 }
587 589
588 }; 590 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698