diff options
Diffstat (limited to 'WebCore/css/CSSStyleSelector.cpp')
| -rw-r--r-- | WebCore/css/CSSStyleSelector.cpp | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/WebCore/css/CSSStyleSelector.cpp b/WebCore/css/CSSStyleSelector.cpp index 3276964..b3f5d72 100644 --- a/WebCore/css/CSSStyleSelector.cpp +++ b/WebCore/css/CSSStyleSelector.cpp @@ -28,14 +28,11 @@ #include "CSSBorderImageValue.h" #include "CSSCursorImageValue.h" -#include "CSSFontFace.h" #include "CSSFontFaceRule.h" -#include "CSSFontFaceSource.h" #include "CSSImportRule.h" #include "CSSMediaRule.h" #include "CSSParser.h" #include "CSSPrimitiveValueMappings.h" -#include "CSSProperty.h" #include "CSSPropertyNames.h" #include "CSSReflectValue.h" #include "CSSRuleList.h" @@ -61,6 +58,7 @@ #include "HTMLInputElement.h" #include "HTMLNames.h" #include "HTMLTextAreaElement.h" +#include "KeyframeList.h" #include "LinkHash.h" #include "MappedAttribute.h" #include "MatrixTransformOperation.h" @@ -350,7 +348,7 @@ if (id == propID) { \ return; \ } -class CSSRuleSet { +class CSSRuleSet : public Noncopyable { public: CSSRuleSet(); ~CSSRuleSet(); @@ -662,7 +660,7 @@ void CSSStyleSelector::matchRules(CSSRuleSet* rules, int& firstRuleIndex, int& l matchRulesForList(rules->getIDRules(m_element->getIDAttribute().impl()), firstRuleIndex, lastRuleIndex); if (m_element->hasClass()) { ASSERT(m_styledElement); - const ClassNames& classNames = m_styledElement->classNames(); + const SpaceSplitString& classNames = m_styledElement->classNames(); size_t size = classNames.size(); for (size_t i = 0; i < size; ++i) matchRulesForList(rules->getClassRules(classNames[i].impl()), firstRuleIndex, lastRuleIndex); @@ -2556,6 +2554,9 @@ bool CSSStyleSelector::SelectorChecker::checkOneSelector(CSSSelector* sel, Eleme case CSSSelector::PseudoMediaControlsReturnToRealtimeButton: dynamicPseudo = MEDIA_CONTROLS_RETURN_TO_REALTIME_BUTTON; return true; + case CSSSelector::PseudoMediaControlsToggleClosedCaptions: + dynamicPseudo = MEDIA_CONTROLS_TOGGLE_CLOSED_CAPTIONS_BUTTON; + return true; case CSSSelector::PseudoMediaControlsStatusDisplay: dynamicPseudo = MEDIA_CONTROLS_STATUS_DISPLAY; return true; @@ -5000,13 +5001,15 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) case CSSPropertyWebkitMarginBottomCollapse: HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(marginBottomCollapse, MarginBottomCollapse) return; - - // Apple-specific changes. Do not merge these properties into KHTML. case CSSPropertyWebkitLineClamp: { HANDLE_INHERIT_AND_INITIAL(lineClamp, LineClamp) if (!primitiveValue) return; - m_style->setLineClamp(primitiveValue->getIntValue(CSSPrimitiveValue::CSS_PERCENTAGE)); + int type = primitiveValue->primitiveType(); + if (type == CSSPrimitiveValue::CSS_NUMBER) + m_style->setLineClamp(LineClampValue(primitiveValue->getIntValue(CSSPrimitiveValue::CSS_NUMBER), LineClampLineCount)); + else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) + m_style->setLineClamp(LineClampValue(primitiveValue->getIntValue(CSSPrimitiveValue::CSS_PERCENTAGE), LineClampPercentage)); return; } case CSSPropertyWebkitHighlight: { @@ -5267,6 +5270,17 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) m_style->setPointerEvents(*primitiveValue); return; } + case CSSPropertyWebkitColorCorrection: + if (isInherit) + m_style->setColorSpace(m_parentStyle->colorSpace()); + else if (isInitial) + m_style->setColorSpace(DeviceColorSpace); + else { + if (!primitiveValue) + return; + m_style->setColorSpace(*primitiveValue); + } + return; case CSSPropertyInvalid: return; case CSSPropertyFontStretch: |
