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

Side by Side Diff: sky/engine/core/css/resolver/StyleBuilderCustom.cpp

Issue 1229273004: Remove Animations and Transitions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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) 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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 520
521 if (primitiveValue->getValueID() == CSSValueFilled || primitiveValue->getVal ueID() == CSSValueOpen) { 521 if (primitiveValue->getValueID() == CSSValueFilled || primitiveValue->getVal ueID() == CSSValueOpen) {
522 state.style()->setTextEmphasisFill(*primitiveValue); 522 state.style()->setTextEmphasisFill(*primitiveValue);
523 state.style()->setTextEmphasisMark(TextEmphasisMarkAuto); 523 state.style()->setTextEmphasisMark(TextEmphasisMarkAuto);
524 } else { 524 } else {
525 state.style()->setTextEmphasisFill(TextEmphasisFillFilled); 525 state.style()->setTextEmphasisFill(TextEmphasisFillFilled);
526 state.style()->setTextEmphasisMark(*primitiveValue); 526 state.style()->setTextEmphasisMark(*primitiveValue);
527 } 527 }
528 } 528 }
529 529
530 void StyleBuilderFunctions::applyInitialCSSPropertyWillChange(StyleResolverState & state)
531 {
532 state.style()->setWillChangeContents(false);
533 state.style()->setWillChangeProperties(Vector<CSSPropertyID>());
534 state.style()->setSubtreeWillChangeContents(state.parentStyle()->subtreeWill ChangeContents());
535 }
536
537 void StyleBuilderFunctions::applyInheritCSSPropertyWillChange(StyleResolverState & state)
538 {
539 state.style()->setWillChangeContents(state.parentStyle()->willChangeContents ());
540 state.style()->setWillChangeProperties(state.parentStyle()->willChangeProper ties());
541 state.style()->setSubtreeWillChangeContents(state.parentStyle()->subtreeWill ChangeContents());
542 }
543
544 void StyleBuilderFunctions::applyValueCSSPropertyWillChange(StyleResolverState& state, CSSValue* value)
545 {
546 ASSERT(value->isValueList());
547 bool willChangeContents = false;
548 Vector<CSSPropertyID> willChangeProperties;
549
550 for (CSSValueListIterator i(value); i.hasMore(); i.advance()) {
551 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(i.value());
552 if (CSSPropertyID propertyID = primitiveValue->getPropertyID())
553 willChangeProperties.append(propertyID);
554 else if (primitiveValue->getValueID() == CSSValueContents)
555 willChangeContents = true;
556 else
557 ASSERT_NOT_REACHED();
558 }
559 state.style()->setWillChangeContents(willChangeContents);
560 state.style()->setWillChangeProperties(willChangeProperties);
561 state.style()->setSubtreeWillChangeContents(willChangeContents || state.pare ntStyle()->subtreeWillChangeContents());
562 }
563
564 void StyleBuilderFunctions::applyInitialCSSPropertyFont(StyleResolverState&) 530 void StyleBuilderFunctions::applyInitialCSSPropertyFont(StyleResolverState&)
565 { 531 {
566 ASSERT_NOT_REACHED(); 532 ASSERT_NOT_REACHED();
567 } 533 }
568 534
569 void StyleBuilderFunctions::applyInheritCSSPropertyFont(StyleResolverState&) 535 void StyleBuilderFunctions::applyInheritCSSPropertyFont(StyleResolverState&)
570 { 536 {
571 ASSERT_NOT_REACHED(); 537 ASSERT_NOT_REACHED();
572 } 538 }
573 539
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 state.style()->setPerspective(perspectiveValue); 602 state.style()->setPerspective(perspectiveValue);
637 } 603 }
638 604
639 void StyleBuilderFunctions::applyValueCSSPropertyWebkitTextOrientation(StyleReso lverState& state, CSSValue* value) 605 void StyleBuilderFunctions::applyValueCSSPropertyWebkitTextOrientation(StyleReso lverState& state, CSSValue* value)
640 { 606 {
641 if (value->isPrimitiveValue()) 607 if (value->isPrimitiveValue())
642 state.setTextOrientation(*toCSSPrimitiveValue(value)); 608 state.setTextOrientation(*toCSSPrimitiveValue(value));
643 } 609 }
644 610
645 } // namespace blink 611 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/resolver/StyleAdjuster.cpp ('k') | sky/engine/core/css/resolver/StyleResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698