summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/CSSStyleRule.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-11 09:43:24 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-11 09:43:24 +0200
commit1b914638db989aaa98631a1c1e02c7b2d44805d8 (patch)
tree87f4fd2c7b38db320079a5de8877890d2ca3c485 /Source/WebCore/css/CSSStyleRule.cpp
parent2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (diff)
downloadqtwebkit-1b914638db989aaa98631a1c1e02c7b2d44805d8.tar.gz
Imported WebKit commit 9a52e27980f47e8b0d8f8b7cc0fd7b5741bceb92 (http://svn.webkit.org/repository/webkit/trunk@116736)
New snapshot to include QDeclarative* -> QQml* build fixes
Diffstat (limited to 'Source/WebCore/css/CSSStyleRule.cpp')
-rw-r--r--Source/WebCore/css/CSSStyleRule.cpp17
1 files changed, 9 insertions, 8 deletions
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