OLD | NEW |
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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 } | 664 } |
665 | 665 |
666 void StyleBuilderFunctions::applyValueCSSPropertyWillChange(StyleResolverState&
state, CSSValue* value) | 666 void StyleBuilderFunctions::applyValueCSSPropertyWillChange(StyleResolverState&
state, CSSValue* value) |
667 { | 667 { |
668 ASSERT(value->isValueList()); | 668 ASSERT(value->isValueList()); |
669 bool willChangeContents = false; | 669 bool willChangeContents = false; |
670 bool willChangeScrollPosition = false; | 670 bool willChangeScrollPosition = false; |
671 Vector<CSSPropertyID> willChangeProperties; | 671 Vector<CSSPropertyID> willChangeProperties; |
672 | 672 |
673 for (auto& willChangeValue : toCSSValueList(*value)) { | 673 for (auto& willChangeValue : toCSSValueList(*value)) { |
674 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(willChangeValue.
get()); | 674 if (willChangeValue->isCustomIdentValue()) |
675 if (primitiveValue->isPropertyID()) | 675 willChangeProperties.append(toCSSCustomIdentValue(*willChangeValue).
valueAsPropertyID()); |
676 willChangeProperties.append(primitiveValue->getPropertyID()); | 676 else if (toCSSPrimitiveValue(*willChangeValue).getValueID() == CSSValueC
ontents) |
677 else if (primitiveValue->getValueID() == CSSValueContents) | |
678 willChangeContents = true; | 677 willChangeContents = true; |
679 else if (primitiveValue->getValueID() == CSSValueScrollPosition) | 678 else if (toCSSPrimitiveValue(*willChangeValue).getValueID() == CSSValueS
crollPosition) |
680 willChangeScrollPosition = true; | 679 willChangeScrollPosition = true; |
681 else | 680 else |
682 ASSERT_NOT_REACHED(); | 681 ASSERT_NOT_REACHED(); |
683 } | 682 } |
684 state.style()->setWillChangeContents(willChangeContents); | 683 state.style()->setWillChangeContents(willChangeContents); |
685 state.style()->setWillChangeScrollPosition(willChangeScrollPosition); | 684 state.style()->setWillChangeScrollPosition(willChangeScrollPosition); |
686 state.style()->setWillChangeProperties(willChangeProperties); | 685 state.style()->setWillChangeProperties(willChangeProperties); |
687 state.style()->setSubtreeWillChangeContents(willChangeContents || state.pare
ntStyle()->subtreeWillChangeContents()); | 686 state.style()->setSubtreeWillChangeContents(willChangeContents || state.pare
ntStyle()->subtreeWillChangeContents()); |
688 } | 687 } |
689 | 688 |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 return; | 840 return; |
842 case CSSValueSuper: | 841 case CSSValueSuper: |
843 svgStyle.setBaselineShift(BS_SUPER); | 842 svgStyle.setBaselineShift(BS_SUPER); |
844 return; | 843 return; |
845 default: | 844 default: |
846 ASSERT_NOT_REACHED(); | 845 ASSERT_NOT_REACHED(); |
847 } | 846 } |
848 } | 847 } |
849 | 848 |
850 } // namespace blink | 849 } // namespace blink |
OLD | NEW |