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 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1074 t |= t2; | 1074 t |= t2; |
1075 } | 1075 } |
1076 state.style()->setTextUnderlinePosition(static_cast<TextUnderlinePosition>(t )); | 1076 state.style()->setTextUnderlinePosition(static_cast<TextUnderlinePosition>(t )); |
1077 } | 1077 } |
1078 | 1078 |
1079 void StyleBuilderFunctions::applyInitialCSSPropertyWillChange(StyleResolverState & state) | 1079 void StyleBuilderFunctions::applyInitialCSSPropertyWillChange(StyleResolverState & state) |
1080 { | 1080 { |
1081 state.style()->setWillChangeContents(false); | 1081 state.style()->setWillChangeContents(false); |
1082 state.style()->setWillChangeScrollPosition(false); | 1082 state.style()->setWillChangeScrollPosition(false); |
1083 state.style()->setWillChangeProperties(Vector<CSSPropertyID>()); | 1083 state.style()->setWillChangeProperties(Vector<CSSPropertyID>()); |
1084 state.style()->setSubtreeWillChangeContents(state.parentStyle()->subtreeWill ChangeContents()); | |
esprehn
2014/05/23 01:05:58
I don't think this is correct, we don't go through
ajuma
2014/05/23 14:38:31
For the normal case, RenderStyle::inheritFrom alre
| |
1084 } | 1085 } |
1085 | 1086 |
1086 void StyleBuilderFunctions::applyInheritCSSPropertyWillChange(StyleResolverState & state) | 1087 void StyleBuilderFunctions::applyInheritCSSPropertyWillChange(StyleResolverState & state) |
1087 { | 1088 { |
1088 state.style()->setWillChangeContents(state.parentStyle()->willChangeContents ()); | 1089 state.style()->setWillChangeContents(state.parentStyle()->willChangeContents ()); |
1089 state.style()->setWillChangeScrollPosition(state.parentStyle()->willChangeSc rollPosition()); | 1090 state.style()->setWillChangeScrollPosition(state.parentStyle()->willChangeSc rollPosition()); |
1090 state.style()->setWillChangeProperties(state.parentStyle()->willChangeProper ties()); | 1091 state.style()->setWillChangeProperties(state.parentStyle()->willChangeProper ties()); |
1092 state.style()->setSubtreeWillChangeContents(state.parentStyle()->subtreeWill ChangeContents()); | |
1091 } | 1093 } |
1092 | 1094 |
1093 void StyleBuilderFunctions::applyValueCSSPropertyWillChange(StyleResolverState& state, CSSValue* value) | 1095 void StyleBuilderFunctions::applyValueCSSPropertyWillChange(StyleResolverState& state, CSSValue* value) |
1094 { | 1096 { |
1095 ASSERT(value->isValueList()); | 1097 ASSERT(value->isValueList()); |
1096 bool willChangeContents = false; | 1098 bool willChangeContents = false; |
1097 bool willChangeScrollPosition = false; | 1099 bool willChangeScrollPosition = false; |
1098 Vector<CSSPropertyID> willChangeProperties; | 1100 Vector<CSSPropertyID> willChangeProperties; |
1099 | 1101 |
1100 for (CSSValueListIterator i(value); i.hasMore(); i.advance()) { | 1102 for (CSSValueListIterator i(value); i.hasMore(); i.advance()) { |
1101 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(i.value()); | 1103 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(i.value()); |
1102 if (CSSPropertyID propertyID = primitiveValue->getPropertyID()) | 1104 if (CSSPropertyID propertyID = primitiveValue->getPropertyID()) |
1103 willChangeProperties.append(propertyID); | 1105 willChangeProperties.append(propertyID); |
1104 else if (primitiveValue->getValueID() == CSSValueContents) | 1106 else if (primitiveValue->getValueID() == CSSValueContents) |
1105 willChangeContents = true; | 1107 willChangeContents = true; |
1106 else if (primitiveValue->getValueID() == CSSValueScrollPosition) | 1108 else if (primitiveValue->getValueID() == CSSValueScrollPosition) |
1107 willChangeScrollPosition = true; | 1109 willChangeScrollPosition = true; |
1108 else | 1110 else |
1109 ASSERT_NOT_REACHED(); | 1111 ASSERT_NOT_REACHED(); |
1110 } | 1112 } |
1111 state.style()->setWillChangeContents(willChangeContents); | 1113 state.style()->setWillChangeContents(willChangeContents); |
1112 state.style()->setWillChangeScrollPosition(willChangeScrollPosition); | 1114 state.style()->setWillChangeScrollPosition(willChangeScrollPosition); |
1113 state.style()->setWillChangeProperties(willChangeProperties); | 1115 state.style()->setWillChangeProperties(willChangeProperties); |
1116 state.style()->setSubtreeWillChangeContents(willChangeContents || state.pare ntStyle()->subtreeWillChangeContents()); | |
1114 } | 1117 } |
1115 | 1118 |
1116 void StyleBuilderFunctions::applyInitialCSSPropertyContent(StyleResolverState& s tate) | 1119 void StyleBuilderFunctions::applyInitialCSSPropertyContent(StyleResolverState& s tate) |
1117 { | 1120 { |
1118 state.style()->clearContent(); | 1121 state.style()->clearContent(); |
1119 } | 1122 } |
1120 | 1123 |
1121 void StyleBuilderFunctions::applyInheritCSSPropertyContent(StyleResolverState&) | 1124 void StyleBuilderFunctions::applyInheritCSSPropertyContent(StyleResolverState&) |
1122 { | 1125 { |
1123 // FIXME: In CSS3, it will be possible to inherit content. In CSS2 it is not . This | 1126 // FIXME: In CSS3, it will be possible to inherit content. In CSS2 it is not . This |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1374 default: | 1377 default: |
1375 break; | 1378 break; |
1376 } | 1379 } |
1377 } else { | 1380 } else { |
1378 svgStyle->setBaselineShift(BS_LENGTH); | 1381 svgStyle->setBaselineShift(BS_LENGTH); |
1379 svgStyle->setBaselineShiftValue(SVGLength::fromCSSPrimitiveValue(primiti veValue)); | 1382 svgStyle->setBaselineShiftValue(SVGLength::fromCSSPrimitiveValue(primiti veValue)); |
1380 } | 1383 } |
1381 } | 1384 } |
1382 | 1385 |
1383 } // namespace WebCore | 1386 } // namespace WebCore |
OLD | NEW |