From 1b914638db989aaa98631a1c1e02c7b2d44805d8 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 11 May 2012 09:43:24 +0200 Subject: Imported WebKit commit 9a52e27980f47e8b0d8f8b7cc0fd7b5741bceb92 (http://svn.webkit.org/repository/webkit/trunk@116736) New snapshot to include QDeclarative* -> QQml* build fixes --- Source/WebCore/css/CSSStyleRule.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'Source/WebCore/css/CSSStyleRule.cpp') diff --git a/Source/WebCore/css/CSSStyleRule.cpp b/Source/WebCore/css/CSSStyleRule.cpp index 7357fcf22..5a780264a 100644 --- a/Source/WebCore/css/CSSStyleRule.cpp +++ b/Source/WebCore/css/CSSStyleRule.cpp @@ -91,18 +91,14 @@ String CSSStyleRule::selectorText() const void CSSStyleRule::setSelectorText(const String& selectorText) { - Document* doc = 0; - if (CSSStyleSheet* styleSheet = parentStyleSheet()) - doc = styleSheet->ownerDocument(); - if (!doc) - return; - CSSParser p(parserContext()); CSSSelectorList selectorList; p.parseSelector(selectorText, selectorList); if (!selectorList.first()) return; + CSSStyleSheet::RuleMutationScope mutationScope(this); + String oldSelectorText = this->selectorText(); m_styleRule->wrapperAdoptSelectorList(selectorList); @@ -110,8 +106,6 @@ void CSSStyleRule::setSelectorText(const String& selectorText) ASSERT(selectorTextCache().contains(this)); selectorTextCache().set(this, generateSelectorText()); } - - doc->styleResolverChanged(DeferRecalcStyle); } String CSSStyleRule::cssText() const @@ -125,4 +119,11 @@ String CSSStyleRule::cssText() const return result; } +void CSSStyleRule::reattach(StyleRule* rule) +{ + m_styleRule = rule; + if (m_propertiesCSSOMWrapper) + m_propertiesCSSOMWrapper->reattach(m_styleRule->properties()); +} + } // namespace WebCore -- cgit v1.2.1