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

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

Issue 878303002: Remove more scrolling code from Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/css/resolver/CSSToStyleMap.cpp ('k') | sky/engine/core/dom/Document.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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 state.style()->setTextEmphasisMark(TextEmphasisMarkAuto); 713 state.style()->setTextEmphasisMark(TextEmphasisMarkAuto);
714 } else { 714 } else {
715 state.style()->setTextEmphasisFill(TextEmphasisFillFilled); 715 state.style()->setTextEmphasisFill(TextEmphasisFillFilled);
716 state.style()->setTextEmphasisMark(*primitiveValue); 716 state.style()->setTextEmphasisMark(*primitiveValue);
717 } 717 }
718 } 718 }
719 719
720 void StyleBuilderFunctions::applyInitialCSSPropertyWillChange(StyleResolverState & state) 720 void StyleBuilderFunctions::applyInitialCSSPropertyWillChange(StyleResolverState & state)
721 { 721 {
722 state.style()->setWillChangeContents(false); 722 state.style()->setWillChangeContents(false);
723 state.style()->setWillChangeScrollPosition(false);
724 state.style()->setWillChangeProperties(Vector<CSSPropertyID>()); 723 state.style()->setWillChangeProperties(Vector<CSSPropertyID>());
725 state.style()->setSubtreeWillChangeContents(state.parentStyle()->subtreeWill ChangeContents()); 724 state.style()->setSubtreeWillChangeContents(state.parentStyle()->subtreeWill ChangeContents());
726 } 725 }
727 726
728 void StyleBuilderFunctions::applyInheritCSSPropertyWillChange(StyleResolverState & state) 727 void StyleBuilderFunctions::applyInheritCSSPropertyWillChange(StyleResolverState & state)
729 { 728 {
730 state.style()->setWillChangeContents(state.parentStyle()->willChangeContents ()); 729 state.style()->setWillChangeContents(state.parentStyle()->willChangeContents ());
731 state.style()->setWillChangeScrollPosition(state.parentStyle()->willChangeSc rollPosition());
732 state.style()->setWillChangeProperties(state.parentStyle()->willChangeProper ties()); 730 state.style()->setWillChangeProperties(state.parentStyle()->willChangeProper ties());
733 state.style()->setSubtreeWillChangeContents(state.parentStyle()->subtreeWill ChangeContents()); 731 state.style()->setSubtreeWillChangeContents(state.parentStyle()->subtreeWill ChangeContents());
734 } 732 }
735 733
736 void StyleBuilderFunctions::applyValueCSSPropertyWillChange(StyleResolverState& state, CSSValue* value) 734 void StyleBuilderFunctions::applyValueCSSPropertyWillChange(StyleResolverState& state, CSSValue* value)
737 { 735 {
738 ASSERT(value->isValueList()); 736 ASSERT(value->isValueList());
739 bool willChangeContents = false; 737 bool willChangeContents = false;
740 bool willChangeScrollPosition = false;
741 Vector<CSSPropertyID> willChangeProperties; 738 Vector<CSSPropertyID> willChangeProperties;
742 739
743 for (CSSValueListIterator i(value); i.hasMore(); i.advance()) { 740 for (CSSValueListIterator i(value); i.hasMore(); i.advance()) {
744 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(i.value()); 741 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(i.value());
745 if (CSSPropertyID propertyID = primitiveValue->getPropertyID()) 742 if (CSSPropertyID propertyID = primitiveValue->getPropertyID())
746 willChangeProperties.append(propertyID); 743 willChangeProperties.append(propertyID);
747 else if (primitiveValue->getValueID() == CSSValueContents) 744 else if (primitiveValue->getValueID() == CSSValueContents)
748 willChangeContents = true; 745 willChangeContents = true;
749 else if (primitiveValue->getValueID() == CSSValueScrollPosition)
750 willChangeScrollPosition = true;
751 else 746 else
752 ASSERT_NOT_REACHED(); 747 ASSERT_NOT_REACHED();
753 } 748 }
754 state.style()->setWillChangeContents(willChangeContents); 749 state.style()->setWillChangeContents(willChangeContents);
755 state.style()->setWillChangeScrollPosition(willChangeScrollPosition);
756 state.style()->setWillChangeProperties(willChangeProperties); 750 state.style()->setWillChangeProperties(willChangeProperties);
757 state.style()->setSubtreeWillChangeContents(willChangeContents || state.pare ntStyle()->subtreeWillChangeContents()); 751 state.style()->setSubtreeWillChangeContents(willChangeContents || state.pare ntStyle()->subtreeWillChangeContents());
758 } 752 }
759 753
760 void StyleBuilderFunctions::applyInitialCSSPropertyFont(StyleResolverState&) 754 void StyleBuilderFunctions::applyInitialCSSPropertyFont(StyleResolverState&)
761 { 755 {
762 ASSERT_NOT_REACHED(); 756 ASSERT_NOT_REACHED();
763 } 757 }
764 758
765 void StyleBuilderFunctions::applyInheritCSSPropertyFont(StyleResolverState&) 759 void StyleBuilderFunctions::applyInheritCSSPropertyFont(StyleResolverState&)
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 state.style()->setPerspective(perspectiveValue); 826 state.style()->setPerspective(perspectiveValue);
833 } 827 }
834 828
835 void StyleBuilderFunctions::applyValueCSSPropertyWebkitTextOrientation(StyleReso lverState& state, CSSValue* value) 829 void StyleBuilderFunctions::applyValueCSSPropertyWebkitTextOrientation(StyleReso lverState& state, CSSValue* value)
836 { 830 {
837 if (value->isPrimitiveValue()) 831 if (value->isPrimitiveValue())
838 state.setTextOrientation(*toCSSPrimitiveValue(value)); 832 state.setTextOrientation(*toCSSPrimitiveValue(value));
839 } 833 }
840 834
841 } // namespace blink 835 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/resolver/CSSToStyleMap.cpp ('k') | sky/engine/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698