| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
| 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
| 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 #include "core/css/StylePropertySet.h" | 71 #include "core/css/StylePropertySet.h" |
| 72 #include "core/css/StylePropertyShorthand.h" | 72 #include "core/css/StylePropertyShorthand.h" |
| 73 #include "core/css/StyleRule.h" | 73 #include "core/css/StyleRule.h" |
| 74 #include "core/css/StyleRuleImport.h" | 74 #include "core/css/StyleRuleImport.h" |
| 75 #include "core/css/StyleSheetContents.h" | 75 #include "core/css/StyleSheetContents.h" |
| 76 #include "core/css/StyleSheetList.h" | 76 #include "core/css/StyleSheetList.h" |
| 77 #include "core/css/WebKitCSSKeyframeRule.h" | 77 #include "core/css/WebKitCSSKeyframeRule.h" |
| 78 #include "core/css/WebKitCSSKeyframesRule.h" | 78 #include "core/css/WebKitCSSKeyframesRule.h" |
| 79 #include "core/css/WebKitCSSRegionRule.h" | 79 #include "core/css/WebKitCSSRegionRule.h" |
| 80 #include "core/css/resolver/FilterOperationResolver.h" | 80 #include "core/css/resolver/FilterOperationResolver.h" |
| 81 #include "core/css/resolver/StyleBuilder.h" |
| 81 #include "core/css/resolver/TransformBuilder.h" | 82 #include "core/css/resolver/TransformBuilder.h" |
| 82 #include "core/css/resolver/ViewportStyleResolver.h" | 83 #include "core/css/resolver/ViewportStyleResolver.h" |
| 83 #include "core/dom/Attribute.h" | 84 #include "core/dom/Attribute.h" |
| 84 #include "core/dom/ContextFeatures.h" | 85 #include "core/dom/ContextFeatures.h" |
| 85 #include "core/dom/DocumentStyleSheetCollection.h" | 86 #include "core/dom/DocumentStyleSheetCollection.h" |
| 86 #include "core/dom/NodeRenderStyle.h" | 87 #include "core/dom/NodeRenderStyle.h" |
| 87 #include "core/dom/NodeRenderingContext.h" | 88 #include "core/dom/NodeRenderingContext.h" |
| 88 #include "core/dom/Text.h" | 89 #include "core/dom/Text.h" |
| 89 #include "core/dom/VisitedLinkState.h" | 90 #include "core/dom/VisitedLinkState.h" |
| 90 #include "core/dom/WebCoreMemoryInstrumentation.h" | 91 #include "core/dom/WebCoreMemoryInstrumentation.h" |
| (...skipping 2335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2426 | 2427 |
| 2427 if (id == CSSPropertyVariable) { | 2428 if (id == CSSPropertyVariable) { |
| 2428 ASSERT_WITH_SECURITY_IMPLICATION(value->isVariableValue()); | 2429 ASSERT_WITH_SECURITY_IMPLICATION(value->isVariableValue()); |
| 2429 CSSVariableValue* variable = static_cast<CSSVariableValue*>(value); | 2430 CSSVariableValue* variable = static_cast<CSSVariableValue*>(value); |
| 2430 ASSERT(!variable->name().isEmpty()); | 2431 ASSERT(!variable->name().isEmpty()); |
| 2431 ASSERT(!variable->value().isEmpty()); | 2432 ASSERT(!variable->value().isEmpty()); |
| 2432 state.style()->setVariable(variable->name(), variable->value()); | 2433 state.style()->setVariable(variable->name(), variable->value()); |
| 2433 return; | 2434 return; |
| 2434 } | 2435 } |
| 2435 | 2436 |
| 2437 // Use the new StyleBuilder. Eventually we'll move away everything after thi
s call. |
| 2438 if (StyleBuilder::applyProperty(id, this, value, isInitial, isInherit)) |
| 2439 return; |
| 2440 |
| 2436 // Check lookup table for implementations and use when available. | 2441 // Check lookup table for implementations and use when available. |
| 2437 const PropertyHandler& handler = m_styleBuilder.propertyHandler(id); | 2442 const PropertyHandler& handler = m_styleBuilder.propertyHandler(id); |
| 2438 if (handler.isValid()) { | 2443 if (handler.isValid()) { |
| 2439 if (isInherit) | 2444 if (isInherit) |
| 2440 handler.applyInheritValue(id, this); | 2445 handler.applyInheritValue(id, this); |
| 2441 else if (isInitial) | 2446 else if (isInitial) |
| 2442 handler.applyInitialValue(id, this); | 2447 handler.applyInitialValue(id, this); |
| 2443 else | 2448 else |
| 2444 handler.applyValue(id, this, value); | 2449 handler.applyValue(id, this, value); |
| 2445 return; | 2450 return; |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3027 state.style()->setGridAfter(afterPosition); | 3032 state.style()->setGridAfter(afterPosition); |
| 3028 return; | 3033 return; |
| 3029 } | 3034 } |
| 3030 | 3035 |
| 3031 // These properties are aliased and DeprecatedStyleBuilder already applied t
he property on the prefixed version. | 3036 // These properties are aliased and DeprecatedStyleBuilder already applied t
he property on the prefixed version. |
| 3032 case CSSPropertyTransitionDelay: | 3037 case CSSPropertyTransitionDelay: |
| 3033 case CSSPropertyTransitionDuration: | 3038 case CSSPropertyTransitionDuration: |
| 3034 case CSSPropertyTransitionProperty: | 3039 case CSSPropertyTransitionProperty: |
| 3035 case CSSPropertyTransitionTimingFunction: | 3040 case CSSPropertyTransitionTimingFunction: |
| 3036 return; | 3041 return; |
| 3037 // These properties are implemented in the DeprecatedStyleBuilder lookup tab
le. | 3042 // These properties are implemented in the DeprecatedStyleBuilder lookup tab
le or in the new StyleBuilder. |
| 3038 case CSSPropertyBackgroundAttachment: | 3043 case CSSPropertyBackgroundAttachment: |
| 3039 case CSSPropertyBackgroundBlendMode: | 3044 case CSSPropertyBackgroundBlendMode: |
| 3040 case CSSPropertyBackgroundClip: | 3045 case CSSPropertyBackgroundClip: |
| 3041 case CSSPropertyBackgroundColor: | 3046 case CSSPropertyBackgroundColor: |
| 3042 case CSSPropertyBackgroundImage: | 3047 case CSSPropertyBackgroundImage: |
| 3043 case CSSPropertyBackgroundOrigin: | 3048 case CSSPropertyBackgroundOrigin: |
| 3044 case CSSPropertyBackgroundPositionX: | 3049 case CSSPropertyBackgroundPositionX: |
| 3045 case CSSPropertyBackgroundPositionY: | 3050 case CSSPropertyBackgroundPositionY: |
| 3046 case CSSPropertyBackgroundRepeatX: | 3051 case CSSPropertyBackgroundRepeatX: |
| 3047 case CSSPropertyBackgroundRepeatY: | 3052 case CSSPropertyBackgroundRepeatY: |
| (...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3834 info.addMember(m_state, "state"); | 3839 info.addMember(m_state, "state"); |
| 3835 | 3840 |
| 3836 // FIXME: move this to a place where it would be called only once? | 3841 // FIXME: move this to a place where it would be called only once? |
| 3837 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle"); | 3842 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle"); |
| 3838 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl
e"); | 3843 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl
e"); |
| 3839 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle, "defaultPrintStyle"
); | 3844 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle, "defaultPrintStyle"
); |
| 3840 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo
urceStyle"); | 3845 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo
urceStyle"); |
| 3841 } | 3846 } |
| 3842 | 3847 |
| 3843 } // namespace WebCore | 3848 } // namespace WebCore |
| OLD | NEW |