diff options
author | Steve Block <steveblock@google.com> | 2009-12-15 10:12:09 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2009-12-17 17:41:10 +0000 |
commit | 643ca7872b450ea4efacab6188849e5aac2ba161 (patch) | |
tree | 6982576c228bcd1a7efe98afed544d840751094c /WebCore/css/CSSStyleSelector.cpp | |
parent | d026980fde6eb3b01c1fe49441174e89cd1be298 (diff) | |
download | external_webkit-643ca7872b450ea4efacab6188849e5aac2ba161.zip external_webkit-643ca7872b450ea4efacab6188849e5aac2ba161.tar.gz external_webkit-643ca7872b450ea4efacab6188849e5aac2ba161.tar.bz2 |
Merge webkit.org at r51976 : Initial merge by git.
Change-Id: Ib0e7e2f0fb4bee5a186610272edf3186f0986b43
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: |