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 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1222 { | 1222 { |
1223 std::pair<CSSPropertyID, String> expression(id, value->serializeResolvingVar
iables(*state.style()->variables())); | 1223 std::pair<CSSPropertyID, String> expression(id, value->serializeResolvingVar
iables(*state.style()->variables())); |
1224 | 1224 |
1225 if (knownExpressions.contains(expression)) | 1225 if (knownExpressions.contains(expression)) |
1226 return; // cycle detected. | 1226 return; // cycle detected. |
1227 | 1227 |
1228 knownExpressions.append(expression); | 1228 knownExpressions.append(expression); |
1229 | 1229 |
1230 // FIXME: It would be faster not to re-parse from strings, but for now CSS p
roperty validation lives inside the parser so we do it there. | 1230 // FIXME: It would be faster not to re-parse from strings, but for now CSS p
roperty validation lives inside the parser so we do it there. |
1231 RefPtr<MutableStylePropertySet> resultSet = MutableStylePropertySet::create(
); | 1231 RefPtr<MutableStylePropertySet> resultSet = MutableStylePropertySet::create(
); |
1232 if (!CSSParser::parseValue(resultSet.get(), id, expression.second, false, &s
tate.document())) | 1232 if (!CSSParser::parseValue(resultSet.get(), id, expression.second, false, st
ate.document())) |
1233 return; // expression failed to parse. | 1233 return; // expression failed to parse. |
1234 | 1234 |
1235 for (unsigned i = 0; i < resultSet->propertyCount(); i++) { | 1235 for (unsigned i = 0; i < resultSet->propertyCount(); i++) { |
1236 StylePropertySet::PropertyReference property = resultSet->propertyAt(i); | 1236 StylePropertySet::PropertyReference property = resultSet->propertyAt(i); |
1237 if (property.id() != CSSPropertyVariable && hasVariableReference(propert
y.value())) { | 1237 if (property.id() != CSSPropertyVariable && hasVariableReference(propert
y.value())) { |
1238 resolveVariables(state, property.id(), property.value(), knownExpres
sions); | 1238 resolveVariables(state, property.id(), property.value(), knownExpres
sions); |
1239 } else { | 1239 } else { |
1240 StyleBuilder::applyProperty(property.id(), state, property.value()); | 1240 StyleBuilder::applyProperty(property.id(), state, property.value()); |
1241 // All properties become dependent on their parent style when they u
se variables. | 1241 // All properties become dependent on their parent style when they u
se variables. |
1242 state.style()->setHasExplicitlyInheritedProperties(); | 1242 state.style()->setHasExplicitlyInheritedProperties(); |
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2380 break; | 2380 break; |
2381 } | 2381 } |
2382 case CSSPropertyEnableBackground: | 2382 case CSSPropertyEnableBackground: |
2383 // Silently ignoring this property for now | 2383 // Silently ignoring this property for now |
2384 // http://bugs.webkit.org/show_bug.cgi?id=6022 | 2384 // http://bugs.webkit.org/show_bug.cgi?id=6022 |
2385 break; | 2385 break; |
2386 } | 2386 } |
2387 } | 2387 } |
2388 | 2388 |
2389 } // namespace WebCore | 2389 } // namespace WebCore |
OLD | NEW |