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

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

Issue 2775143002: Implement frames() timing function (Closed)
Patch Set: Created 3 years, 8 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 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All
6 * rights reserved. 6 * 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. 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 const CSSCubicBezierTimingFunctionValue& cubicTimingFunction = 451 const CSSCubicBezierTimingFunctionValue& cubicTimingFunction =
452 toCSSCubicBezierTimingFunctionValue(value); 452 toCSSCubicBezierTimingFunctionValue(value);
453 return CubicBezierTimingFunction::create( 453 return CubicBezierTimingFunction::create(
454 cubicTimingFunction.x1(), cubicTimingFunction.y1(), 454 cubicTimingFunction.x1(), cubicTimingFunction.y1(),
455 cubicTimingFunction.x2(), cubicTimingFunction.y2()); 455 cubicTimingFunction.x2(), cubicTimingFunction.y2());
456 } 456 }
457 457
458 if (value.isInitialValue()) 458 if (value.isInitialValue())
459 return CSSTimingData::initialTimingFunction(); 459 return CSSTimingData::initialTimingFunction();
460 460
461 if (value.isFramesTimingFunctionValue()) {
462 const CSSFramesTimingFunctionValue& framesTimingFunction =
463 toCSSFramesTimingFunctionValue(value);
464 return FramesTimingFunction::create(framesTimingFunction.numberOfFrames());
465 }
466
461 const CSSStepsTimingFunctionValue& stepsTimingFunction = 467 const CSSStepsTimingFunctionValue& stepsTimingFunction =
462 toCSSStepsTimingFunctionValue(value); 468 toCSSStepsTimingFunctionValue(value);
463 if (stepsTimingFunction.getStepPosition() == 469 if (stepsTimingFunction.getStepPosition() ==
464 StepsTimingFunction::StepPosition::MIDDLE && 470 StepsTimingFunction::StepPosition::MIDDLE &&
465 !allowStepMiddle) 471 !allowStepMiddle)
466 return CSSTimingData::initialTimingFunction(); 472 return CSSTimingData::initialTimingFunction();
467 return StepsTimingFunction::create(stepsTimingFunction.numberOfSteps(), 473 return StepsTimingFunction::create(stepsTimingFunction.numberOfSteps(),
468 stepsTimingFunction.getStepPosition()); 474 stepsTimingFunction.getStepPosition());
469 } 475 }
470 476
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 verticalRule = SpaceImageRule; 648 verticalRule = SpaceImageRule;
643 break; 649 break;
644 default: // CSSValueRepeat 650 default: // CSSValueRepeat
645 verticalRule = RepeatImageRule; 651 verticalRule = RepeatImageRule;
646 break; 652 break;
647 } 653 }
648 image.setVerticalRule(verticalRule); 654 image.setVerticalRule(verticalRule);
649 } 655 }
650 656
651 } // namespace blink 657 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698