⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 251636 in webkit


Ignore:
Timestamp:
Oct 26, 2019, 8:15:20 AM (7 years ago)
Author:
Antti Koivisto
Message:

Move StyleResolver::applyProperty to PropertyCascade
https://bugs.webkit.org/show_bug.cgi?id=203458

Reviewed by Zalan Bujtas.

Move the more of the property applying code out of StyleResolver.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::applyPropertyToCurrentStyle):
(WebCore::isValidVisitedLinkProperty): Deleted.
(WebCore::StyleResolver::applyProperty): Deleted.
(WebCore::StyleResolver::resolvedVariableValue const): Deleted.

  • css/StyleResolver.h:
  • style/PropertyCascade.cpp:

(WebCore::Style::isValidVisitedLinkProperty):
(WebCore::Style::PropertyCascade::applyCustomProperty):
(WebCore::Style::PropertyCascade::propertyCascadeForRollback):
(WebCore::Style::PropertyCascade::applyProperty):
(WebCore::Style::PropertyCascade::resolveValue):
(WebCore::Style::PropertyCascade::resolvedVariableValue):

  • style/PropertyCascade.h:

(WebCore::Style::PropertyCascade::property const):
(WebCore::Style::PropertyCascade::property): Deleted.
(WebCore::Style::PropertyCascade::hasAppliedProperty const): Deleted.

Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r251633 r251636  
     12019-10-26  Antti Koivisto  <antti@apple.com>
     2
     3        Move StyleResolver::applyProperty to PropertyCascade
     4        https://bugs.webkit.org/show_bug.cgi?id=203458
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        Move the more of the property applying code out of StyleResolver.
     9
     10        * css/StyleResolver.cpp:
     11        (WebCore::StyleResolver::applyPropertyToCurrentStyle):
     12        (WebCore::isValidVisitedLinkProperty): Deleted.
     13        (WebCore::StyleResolver::applyProperty): Deleted.
     14        (WebCore::StyleResolver::resolvedVariableValue const): Deleted.
     15        * css/StyleResolver.h:
     16        * style/PropertyCascade.cpp:
     17        (WebCore::Style::isValidVisitedLinkProperty):
     18        (WebCore::Style::PropertyCascade::applyCustomProperty):
     19        (WebCore::Style::PropertyCascade::propertyCascadeForRollback):
     20        (WebCore::Style::PropertyCascade::applyProperty):
     21        (WebCore::Style::PropertyCascade::resolveValue):
     22        (WebCore::Style::PropertyCascade::resolvedVariableValue):
     23        * style/PropertyCascade.h:
     24        (WebCore::Style::PropertyCascade::property const):
     25        (WebCore::Style::PropertyCascade::property): Deleted.
     26        (WebCore::Style::PropertyCascade::hasAppliedProperty const): Deleted.
     27
    1282019-10-26  Zalan Bujtas  <zalan@apple.com>
    229
  • trunk/Source/WebCore/css/StyleResolver.cpp

    r251632 r251636  
    4343#include "CSSKeyframeRule.h"
    4444#include "CSSKeyframesRule.h"
    45 #include "CSSPaintImageValue.h"
    4645#include "CSSParser.h"
    4746#include "CSSPrimitiveValueMappings.h"
     
    9493#include "ShadowRoot.h"
    9594#include "SharedStringHash.h"
    96 #include "StyleBuilder.h"
    9795#include "StyleColor.h"
    9896#include "StyleCachedImage.h"
     
    14541452void StyleResolver::applyPropertyToCurrentStyle(CSSPropertyID id, CSSValue* value)
    14551453{
     1454    if (!value)
     1455        return;
    14561456    MatchResult matchResult;
    14571457    Style::PropertyCascade cascade(*this, matchResult, { }, { }, { });
    14581458    if (value)
    1459         applyProperty(id, value, cascade);
    1460 }
    1461 
    1462 inline bool isValidVisitedLinkProperty(CSSPropertyID id)
    1463 {
    1464     switch (id) {
    1465     case CSSPropertyBackgroundColor:
    1466     case CSSPropertyBorderLeftColor:
    1467     case CSSPropertyBorderRightColor:
    1468     case CSSPropertyBorderTopColor:
    1469     case CSSPropertyBorderBottomColor:
    1470     case CSSPropertyCaretColor:
    1471     case CSSPropertyColor:
    1472     case CSSPropertyOutlineColor:
    1473     case CSSPropertyColumnRuleColor:
    1474     case CSSPropertyTextDecorationColor:
    1475     case CSSPropertyWebkitTextEmphasisColor:
    1476     case CSSPropertyWebkitTextFillColor:
    1477     case CSSPropertyWebkitTextStrokeColor:
    1478     case CSSPropertyFill:
    1479     case CSSPropertyStroke:
    1480     case CSSPropertyStrokeColor:
    1481         return true;
    1482     default:
    1483         break;
    1484     }
    1485 
    1486     return false;
     1459        cascade.applyProperty(id, *value);
    14871460}
    14881461
     
    15041477{
    15051478    return is<SVGElement>(m_state.element()) && !(is<SVGSVGElement>(*m_state.element()) && m_state.element()->parentNode());
    1506 }
    1507 
    1508 void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value, Style::PropertyCascade& cascade, SelectorChecker::LinkMatchMask linkMatchMask)
    1509 {
    1510     ASSERT_WITH_MESSAGE(!isShorthandCSSProperty(id), "Shorthand property id = %d wasn't expanded at parsing time", id);
    1511 
    1512     State& state = m_state;
    1513 
    1514     RefPtr<CSSValue> valueToApply = value;
    1515     if (value->hasVariableReferences()) {
    1516         valueToApply = resolvedVariableValue(id, *value, cascade);
    1517         // If the cascade has already applied this id, then we detected a cycle, and this value should be unset.
    1518         if (!valueToApply || cascade.hasAppliedProperty(id)) {
    1519             if (CSSProperty::isInheritedProperty(id))
    1520                 valueToApply = CSSValuePool::singleton().createInheritedValue();
    1521             else
    1522                 valueToApply = CSSValuePool::singleton().createExplicitInitialValue();
    1523         }
    1524     }
    1525 
    1526     if (CSSProperty::isDirectionAwareProperty(id)) {
    1527         CSSPropertyID newId = CSSProperty::resolveDirectionAwareProperty(id, state.style()->direction(), state.style()->writingMode());
    1528         ASSERT(newId != id);
    1529         return applyProperty(newId, valueToApply.get(), cascade, linkMatchMask);
    1530     }
    1531 
    1532     CSSValue* valueToCheckForInheritInitial = valueToApply.get();
    1533     CSSCustomPropertyValue* customPropertyValue = nullptr;
    1534     CSSValueID customPropertyValueID = CSSValueInvalid;
    1535 
    1536     CSSRegisteredCustomProperty* customPropertyRegistered = nullptr;
    1537 
    1538     if (id == CSSPropertyCustom) {
    1539         customPropertyValue = &downcast<CSSCustomPropertyValue>(*valueToApply);
    1540         ASSERT(customPropertyValue->isResolved());
    1541         if (WTF::holds_alternative<CSSValueID>(customPropertyValue->value()))
    1542             customPropertyValueID = WTF::get<CSSValueID>(customPropertyValue->value());
    1543         auto& name = customPropertyValue->name();
    1544         customPropertyRegistered = document().getCSSRegisteredCustomPropertySet().get(name);
    1545     }
    1546 
    1547     bool isInherit = state.parentStyle() ? valueToCheckForInheritInitial->isInheritedValue() || customPropertyValueID == CSSValueInherit : false;
    1548     bool isInitial = valueToCheckForInheritInitial->isInitialValue() || customPropertyValueID == CSSValueInitial || (!state.parentStyle() && (valueToCheckForInheritInitial->isInheritedValue() || customPropertyValueID == CSSValueInherit));
    1549 
    1550     bool isUnset = valueToCheckForInheritInitial->isUnsetValue() || customPropertyValueID == CSSValueUnset;
    1551     bool isRevert = valueToCheckForInheritInitial->isRevertValue() || customPropertyValueID == CSSValueRevert;
    1552 
    1553     if (isRevert) {
    1554         if (state.cascadeLevel() == Style::CascadeLevel::UserAgent)
    1555             isUnset = true;
    1556         else {
    1557             auto* rollback = cascade.propertyCascadeForRollback(state.cascadeLevel());
    1558             ASSERT(rollback);
    1559 
    1560             // With the cascade built, we need to obtain the property and apply it. If the property is
    1561             // not present, then we behave like "unset." Otherwise we apply the property instead of
    1562             // our own.
    1563             if (customPropertyValue) {
    1564                 if (customPropertyRegistered && customPropertyRegistered->inherits && rollback->hasCustomProperty(customPropertyValue->name())) {
    1565                     auto property = rollback->customProperty(customPropertyValue->name());
    1566                     if (property.cssValue[linkMatchMask])
    1567                         applyProperty(property.id, property.cssValue[linkMatchMask], cascade, linkMatchMask);
    1568                     return;
    1569                 }
    1570             } else if (rollback->hasProperty(id)) {
    1571                 auto& property = rollback->property(id);
    1572                 if (property.cssValue[linkMatchMask])
    1573                     applyProperty(property.id, property.cssValue[linkMatchMask], cascade, linkMatchMask);
    1574                 return;
    1575             }
    1576 
    1577             isUnset = true;
    1578         }
    1579     }
    1580 
    1581     if (isUnset) {
    1582         if (CSSProperty::isInheritedProperty(id))
    1583             isInherit = true;
    1584         else
    1585             isInitial = true;
    1586     }
    1587 
    1588     ASSERT(!isInherit || !isInitial); // isInherit -> !isInitial && isInitial -> !isInherit
    1589 
    1590     if (!state.applyPropertyToRegularStyle() && (!state.applyPropertyToVisitedLinkStyle() || !isValidVisitedLinkProperty(id))) {
    1591         // Limit the properties that can be applied to only the ones honored by :visited.
    1592         return;
    1593     }
    1594 
    1595     if (isInherit && !CSSProperty::isInheritedProperty(id))
    1596         state.style()->setHasExplicitlyInheritedProperties();
    1597 
    1598 #if ENABLE(CSS_PAINTING_API)
    1599     if (is<CSSPaintImageValue>(*valueToApply)) {
    1600         auto& name = downcast<CSSPaintImageValue>(*valueToApply).name();
    1601         if (auto* paintWorklet = document().paintWorkletGlobalScopeForName(name)) {
    1602             auto locker = holdLock(paintWorklet->paintDefinitionLock());
    1603             if (auto* registration = paintWorklet->paintDefinitionMap().get(name)) {
    1604                 for (auto& property : registration->inputProperties)
    1605                     state.style()->addCustomPaintWatchProperty(property);
    1606             }
    1607         }
    1608     }
    1609 #endif
    1610 
    1611     // Use the generated StyleBuilder.
    1612     StyleBuilder::applyProperty(id, *this, *valueToApply, isInitial, isInherit, customPropertyRegistered);
    1613 }
    1614 
    1615 RefPtr<CSSValue> StyleResolver::resolvedVariableValue(CSSPropertyID propID, const CSSValue& value, Style::PropertyCascade& cascade) const
    1616 {
    1617     CSSParser parser(document());
    1618     return parser.parseValueWithVariableReferences(propID, value, cascade);
    16191479}
    16201480
  • trunk/Source/WebCore/css/StyleResolver.h

    r251611 r251636  
    328328    void setTextOrientation(TextOrientation textOrientation) { m_state.setTextOrientation(textOrientation); }
    329329
    330     RefPtr<CSSValue> resolvedVariableValue(CSSPropertyID, const CSSValue&, Style::PropertyCascade&) const;
    331 
    332330    bool adjustRenderStyleForTextAutosizing(RenderStyle&, const Element&);
    333 
    334     void applyProperty(CSSPropertyID, CSSValue*, Style::PropertyCascade&, SelectorChecker::LinkMatchMask = SelectorChecker::MatchDefault);
    335331
    336332private:
  • trunk/Source/WebCore/style/PropertyCascade.cpp

    r251632 r251636  
    2727#include "PropertyCascade.h"
    2828
     29#include "CSSPaintImageValue.h"
     30#include "CSSValuePool.h"
     31#include "PaintWorkletGlobalScope.h"
     32#include "StyleBuilder.h"
     33#include "StylePropertyShorthand.h"
    2934#include "StyleResolver.h"
    3035
     
    9196        break;
    9297    }
     98    return false;
     99}
     100
     101static inline bool isValidVisitedLinkProperty(CSSPropertyID id)
     102{
     103    switch (id) {
     104    case CSSPropertyBackgroundColor:
     105    case CSSPropertyBorderLeftColor:
     106    case CSSPropertyBorderRightColor:
     107    case CSSPropertyBorderTopColor:
     108    case CSSPropertyBorderBottomColor:
     109    case CSSPropertyCaretColor:
     110    case CSSPropertyColor:
     111    case CSSPropertyOutlineColor:
     112    case CSSPropertyColumnRuleColor:
     113    case CSSPropertyTextDecorationColor:
     114    case CSSPropertyWebkitTextEmphasisColor:
     115    case CSSPropertyWebkitTextFillColor:
     116    case CSSPropertyWebkitTextStrokeColor:
     117    case CSSPropertyFill:
     118    case CSSPropertyStroke:
     119    case CSSPropertyStrokeColor:
     120        return true;
     121    default:
     122        break;
     123    }
     124
    93125    return false;
    94126}
     
    405437
    406438        if (WTF::holds_alternative<Ref<CSSVariableReferenceValue>>(valueToApply->value())) {
    407             RefPtr<CSSValue> parsedValue = m_styleResolver.resolvedVariableValue(CSSPropertyCustom, valueToApply.get(), *this);
     439            RefPtr<CSSValue> parsedValue = resolvedVariableValue(CSSPropertyCustom, valueToApply.get());
    408440
    409441            if (m_applyState.appliedCustomProperties.contains(name))
     
    431463                m_styleResolver.state().setApplyPropertyToVisitedLinkStyle(true);
    432464            }
    433             m_styleResolver.applyProperty(CSSPropertyCustom, valueToApply.ptr(), *this, index);
     465            applyProperty(CSSPropertyCustom, valueToApply.get(), index);
    434466        }
    435467    }
     
    448480        if (inCycle && WTF::holds_alternative<Ref<CSSVariableReferenceValue>>(valueToApply->value())) {
    449481            // Resolve this value so that we reset its dependencies.
    450             m_styleResolver.resolvedVariableValue(CSSPropertyCustom, valueToApply.get(), *this);
    451         }
    452     }
    453 }
    454 
    455 PropertyCascade* PropertyCascade::propertyCascadeForRollback(CascadeLevel cascadeLevel)
     482            resolvedVariableValue(CSSPropertyCustom, valueToApply.get());
     483        }
     484    }
     485}
     486
     487const PropertyCascade* PropertyCascade::propertyCascadeForRollback(CascadeLevel cascadeLevel)
    456488{
    457489    switch (cascadeLevel) {
     
    459491        if (!m_authorRollbackCascade) {
    460492            auto cascadeLevels = OptionSet<CascadeLevel> { CascadeLevel::UserAgent, CascadeLevel::User };
    461             m_authorRollbackCascade = makeUnique<PropertyCascade>(m_styleResolver, m_matchResult, cascadeLevels, m_direction, m_writingMode, m_includedProperties);
     493            m_authorRollbackCascade = makeUnique<const PropertyCascade>(m_styleResolver, m_matchResult, cascadeLevels, m_direction, m_writingMode, m_includedProperties);
    462494        }
    463495        return m_authorRollbackCascade.get();
     
    466498        if (!m_userRollbackCascade) {
    467499            auto cascadeLevels = OptionSet<CascadeLevel> { CascadeLevel::UserAgent };
    468             m_userRollbackCascade = makeUnique<PropertyCascade>(m_styleResolver, m_matchResult, cascadeLevels, m_direction, m_writingMode, m_includedProperties);
     500            m_userRollbackCascade = makeUnique<const PropertyCascade>(m_styleResolver, m_matchResult, cascadeLevels, m_direction, m_writingMode, m_includedProperties);
    469501        }
    470502        return m_userRollbackCascade.get();
    471503
    472504    case CascadeLevel::UserAgent:
    473         break;
     505        return nullptr;
    474506    }
    475507    ASSERT_NOT_REACHED();
     
    486518        state.setApplyPropertyToRegularStyle(true);
    487519        state.setApplyPropertyToVisitedLinkStyle(false);
    488         m_styleResolver.applyProperty(property.id, property.cssValue[SelectorChecker::MatchDefault], *this, SelectorChecker::MatchDefault);
     520        applyProperty(property.id, *property.cssValue[SelectorChecker::MatchDefault], SelectorChecker::MatchDefault);
    489521    }
    490522
     
    495527        state.setApplyPropertyToRegularStyle(true);
    496528        state.setApplyPropertyToVisitedLinkStyle(false);
    497         m_styleResolver.applyProperty(property.id, property.cssValue[SelectorChecker::MatchLink], *this, SelectorChecker::MatchLink);
     529        applyProperty(property.id, *property.cssValue[SelectorChecker::MatchLink], SelectorChecker::MatchLink);
    498530    }
    499531
     
    501533        state.setApplyPropertyToRegularStyle(false);
    502534        state.setApplyPropertyToVisitedLinkStyle(true);
    503         m_styleResolver.applyProperty(property.id, property.cssValue[SelectorChecker::MatchVisited], *this, SelectorChecker::MatchVisited);
     535        applyProperty(property.id, *property.cssValue[SelectorChecker::MatchVisited], SelectorChecker::MatchVisited);
    504536    }
    505537
     
    508540}
    509541
    510 }
    511 }
     542void PropertyCascade::applyProperty(CSSPropertyID id, CSSValue& value, SelectorChecker::LinkMatchMask linkMatchMask)
     543{
     544    ASSERT_WITH_MESSAGE(!isShorthandCSSProperty(id), "Shorthand property id = %d wasn't expanded at parsing time", id);
     545
     546    auto valueToApply = resolveValue(id, value);
     547
     548    if (CSSProperty::isDirectionAwareProperty(id)) {
     549        CSSPropertyID newId = CSSProperty::resolveDirectionAwareProperty(id, m_direction, m_writingMode);
     550        ASSERT(newId != id);
     551        return applyProperty(newId, valueToApply.get(), linkMatchMask);
     552    }
     553
     554    CSSCustomPropertyValue* customPropertyValue = nullptr;
     555    CSSValueID customPropertyValueID = CSSValueInvalid;
     556    CSSRegisteredCustomProperty* customPropertyRegistered = nullptr;
     557
     558    if (id == CSSPropertyCustom) {
     559        customPropertyValue = downcast<CSSCustomPropertyValue>(valueToApply.ptr());
     560        ASSERT(customPropertyValue->isResolved());
     561        if (WTF::holds_alternative<CSSValueID>(customPropertyValue->value()))
     562            customPropertyValueID = WTF::get<CSSValueID>(customPropertyValue->value());
     563        auto& name = customPropertyValue->name();
     564        customPropertyRegistered = m_styleResolver.document().getCSSRegisteredCustomPropertySet().get(name);
     565    }
     566
     567    auto& state = m_styleResolver.state();
     568    bool isInherit = state.parentStyle() ? valueToApply->isInheritedValue() || customPropertyValueID == CSSValueInherit : false;
     569    bool isInitial = valueToApply->isInitialValue() || customPropertyValueID == CSSValueInitial || (!state.parentStyle() && (valueToApply->isInheritedValue() || customPropertyValueID == CSSValueInherit));
     570
     571    bool isUnset = valueToApply->isUnsetValue() || customPropertyValueID == CSSValueUnset;
     572    bool isRevert = valueToApply->isRevertValue() || customPropertyValueID == CSSValueRevert;
     573
     574    if (isRevert) {
     575        if (auto* rollback = propertyCascadeForRollback(state.cascadeLevel())) {
     576            // With the rollback cascade built, we need to obtain the property and apply it. If the property is
     577            // not present, then we behave like "unset." Otherwise we apply the property instead of
     578            // our own.
     579            if (customPropertyValue) {
     580                if (customPropertyRegistered && customPropertyRegistered->inherits && rollback->hasCustomProperty(customPropertyValue->name())) {
     581                    auto property = rollback->customProperty(customPropertyValue->name());
     582                    if (property.cssValue[linkMatchMask])
     583                        applyProperty(property.id, *property.cssValue[linkMatchMask], linkMatchMask);
     584                    return;
     585                }
     586            } else if (rollback->hasProperty(id)) {
     587                auto& property = rollback->property(id);
     588                if (property.cssValue[linkMatchMask])
     589                    applyProperty(property.id, *property.cssValue[linkMatchMask], linkMatchMask);
     590                return;
     591            }
     592        }
     593
     594        isUnset = true;
     595    }
     596
     597    if (isUnset) {
     598        if (CSSProperty::isInheritedProperty(id))
     599            isInherit = true;
     600        else
     601            isInitial = true;
     602    }
     603
     604    ASSERT(!isInherit || !isInitial); // isInherit -> !isInitial && isInitial -> !isInherit
     605
     606    if (!state.applyPropertyToRegularStyle() && (!state.applyPropertyToVisitedLinkStyle() || !isValidVisitedLinkProperty(id))) {
     607        // Limit the properties that can be applied to only the ones honored by :visited.
     608        return;
     609    }
     610
     611    if (isInherit && !CSSProperty::isInheritedProperty(id))
     612        state.style()->setHasExplicitlyInheritedProperties();
     613
     614#if ENABLE(CSS_PAINTING_API)
     615    if (is<CSSPaintImageValue>(valueToApply)) {
     616        auto& name = downcast<CSSPaintImageValue>(valueToApply.get()).name();
     617        if (auto* paintWorklet = m_styleResolver.document().paintWorkletGlobalScopeForName(name)) {
     618            auto locker = holdLock(paintWorklet->paintDefinitionLock());
     619            if (auto* registration = paintWorklet->paintDefinitionMap().get(name)) {
     620                for (auto& property : registration->inputProperties)
     621                    state.style()->addCustomPaintWatchProperty(property);
     622            }
     623        }
     624    }
     625#endif
     626
     627    // Use the generated StyleBuilder.
     628    StyleBuilder::applyProperty(id, m_styleResolver, valueToApply.get(), isInitial, isInherit, customPropertyRegistered);
     629}
     630
     631Ref<CSSValue> PropertyCascade::resolveValue(CSSPropertyID propertyID, CSSValue& value)
     632{
     633    if (!value.hasVariableReferences())
     634        return value;
     635   
     636    auto variableValue = resolvedVariableValue(propertyID, value);
     637    // If the cascade has already applied this id, then we detected a cycle, and this value should be unset.
     638    if (!variableValue || m_applyState.appliedProperties.get(propertyID)) {
     639        if (CSSProperty::isInheritedProperty(propertyID))
     640            return CSSValuePool::singleton().createInheritedValue();
     641        return CSSValuePool::singleton().createExplicitInitialValue();
     642    }
     643
     644    return *variableValue;
     645}
     646
     647RefPtr<CSSValue> PropertyCascade::resolvedVariableValue(CSSPropertyID propID, const CSSValue& value)
     648{
     649    CSSParser parser(m_styleResolver.document());
     650    return parser.parseValueWithVariableReferences(propID, value, *this);
     651}
     652
     653}
     654}
  • trunk/Source/WebCore/style/PropertyCascade.h

    r251632 r251636  
    6161
    6262    bool hasProperty(CSSPropertyID) const;
    63     Property& property(CSSPropertyID);
     63    const Property& property(CSSPropertyID) const;
    6464
    6565    bool hasCustomProperty(const String&) const;
    6666    Property customProperty(const String&) const;
    67 
    68     bool hasAppliedProperty(CSSPropertyID) const;
    6967
    7068    void applyProperties(int firstProperty, int lastProperty);
     
    7472    void applyCustomProperty(const String& name);
    7573
    76     PropertyCascade* propertyCascadeForRollback(CascadeLevel);
     74    void applyProperty(CSSPropertyID, CSSValue&, SelectorChecker::LinkMatchMask = SelectorChecker::MatchDefault);
    7775
    7876private:
     
    8583    static void setPropertyInternal(Property&, CSSPropertyID, CSSValue&, unsigned linkMatchType, CascadeLevel, ScopeOrdinal);
    8684
     85    const PropertyCascade* propertyCascadeForRollback(CascadeLevel);
     86
    8787    enum CustomPropertyCycleTracking { Enabled = 0, Disabled };
    8888    template<CustomPropertyCycleTracking trackCycles>
     
    9090    void applyProperty(const Property&);
    9191
     92    Ref<CSSValue> resolveValue(CSSPropertyID, CSSValue&);
     93    RefPtr<CSSValue> resolvedVariableValue(CSSPropertyID, const CSSValue&);
     94
    9295    StyleResolver& m_styleResolver;
     96
    9397    const MatchResult& m_matchResult;
    94     IncludedProperties m_includedProperties;
    95 
    96     TextDirection m_direction;
    97     WritingMode m_writingMode;
     98    const IncludedProperties m_includedProperties;
     99    const TextDirection m_direction;
     100    const WritingMode m_writingMode;
    98101
    99102    Property m_properties[numCSSProperties + 2];
     
    114117    ApplyState m_applyState;
    115118
    116     std::unique_ptr<PropertyCascade> m_authorRollbackCascade;
    117     std::unique_ptr<PropertyCascade> m_userRollbackCascade;
     119    std::unique_ptr<const PropertyCascade> m_authorRollbackCascade;
     120    std::unique_ptr<const PropertyCascade> m_userRollbackCascade;
    118121};
    119122
     
    124127}
    125128
    126 inline PropertyCascade::Property& PropertyCascade::property(CSSPropertyID id)
     129inline const PropertyCascade::Property& PropertyCascade::property(CSSPropertyID id) const
    127130{
    128131    return m_properties[id];
     
    139142}
    140143
    141 inline bool PropertyCascade::hasAppliedProperty(CSSPropertyID propertyID) const
    142 {
    143     return m_applyState.appliedProperties.get(propertyID);
    144 }
    145 
    146144}
    147145}
Note: See TracChangeset for help on using the changeset viewer.