| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 bool isInitial = value->isInitialValue() || (!state.parentNode() && value->i
sInheritedValue()); | 114 bool isInitial = value->isInitialValue() || (!state.parentNode() && value->i
sInheritedValue()); |
| 115 | 115 |
| 116 ASSERT(!isInherit || !isInitial); // isInherit -> !isInitial && isInitial ->
!isInherit | 116 ASSERT(!isInherit || !isInitial); // isInherit -> !isInitial && isInitial ->
!isInherit |
| 117 ASSERT(!isInherit || (state.parentNode() && state.parentStyle())); // isInhe
rit -> (state.parentNode() && state.parentStyle()) | 117 ASSERT(!isInherit || (state.parentNode() && state.parentStyle())); // isInhe
rit -> (state.parentNode() && state.parentStyle()) |
| 118 | 118 |
| 119 if (!state.applyPropertyToRegularStyle() && (!state.applyPropertyToVisitedLi
nkStyle() || !isValidVisitedLinkProperty(id))) { | 119 if (!state.applyPropertyToRegularStyle() && (!state.applyPropertyToVisitedLi
nkStyle() || !isValidVisitedLinkProperty(id))) { |
| 120 // Limit the properties that can be applied to only the ones honored by
:visited. | 120 // Limit the properties that can be applied to only the ones honored by
:visited. |
| 121 return; | 121 return; |
| 122 } | 122 } |
| 123 | 123 |
| 124 if (isInherit && !state.parentStyle()->hasExplicitlyInheritedProperties() &&
!CSSPropertyMetadata::isInheritedProperty(id)) | 124 if (isInherit && !state.parentStyle()->hasExplicitlyInheritedProperties() &&
!CSSPropertyMetadata::isInheritedProperty(id)) { |
| 125 state.parentStyle()->setHasExplicitlyInheritedProperties(); | 125 state.parentStyle()->setHasExplicitlyInheritedProperties(); |
| 126 } else if (value->isUnsetValue()) { |
| 127 ASSERT(!isInherit && !isInitial); |
| 128 if (CSSPropertyMetadata::isInheritedProperty(id)) |
| 129 isInherit = true; |
| 130 else |
| 131 isInitial = true; |
| 132 } |
| 126 | 133 |
| 127 StyleBuilder::applyProperty(id, state, value, isInitial, isInherit); | 134 StyleBuilder::applyProperty(id, state, value, isInitial, isInherit); |
| 128 } | 135 } |
| 129 | 136 |
| 130 void StyleBuilderFunctions::applyInitialCSSPropertyColor(StyleResolverState& sta
te) | 137 void StyleBuilderFunctions::applyInitialCSSPropertyColor(StyleResolverState& sta
te) |
| 131 { | 138 { |
| 132 Color color = RenderStyle::initialColor(); | 139 Color color = RenderStyle::initialColor(); |
| 133 if (state.applyPropertyToRegularStyle()) | 140 if (state.applyPropertyToRegularStyle()) |
| 134 state.style()->setColor(color); | 141 state.style()->setColor(color); |
| 135 if (state.applyPropertyToVisitedLinkStyle()) | 142 if (state.applyPropertyToVisitedLinkStyle()) |
| (...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 return; | 977 return; |
| 971 case CSSValueSuper: | 978 case CSSValueSuper: |
| 972 svgStyle.setBaselineShift(BS_SUPER); | 979 svgStyle.setBaselineShift(BS_SUPER); |
| 973 return; | 980 return; |
| 974 default: | 981 default: |
| 975 ASSERT_NOT_REACHED(); | 982 ASSERT_NOT_REACHED(); |
| 976 } | 983 } |
| 977 } | 984 } |
| 978 | 985 |
| 979 } // namespace blink | 986 } // namespace blink |
| OLD | NEW |