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/CSSPageRule.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'Source/WebCore/css/CSSPageRule.cpp') diff --git a/Source/WebCore/css/CSSPageRule.cpp b/Source/WebCore/css/CSSPageRule.cpp index 88a089954..70bbab7ba 100644 --- a/Source/WebCore/css/CSSPageRule.cpp +++ b/Source/WebCore/css/CSSPageRule.cpp @@ -24,6 +24,7 @@ #include "CSSParser.h" #include "CSSSelector.h" +#include "CSSStyleSheet.h" #include "Document.h" #include "PropertySetCSSStyleDeclaration.h" #include "StylePropertySet.h" @@ -65,24 +66,16 @@ String CSSPageRule::selectorText() const void CSSPageRule::setSelectorText(const String& selectorText) { - Document* doc = 0; - if (CSSStyleSheet* styleSheet = parentStyleSheet()) - doc = styleSheet->ownerDocument(); - if (!doc) - return; - CSSParser parser(parserContext()); CSSSelectorList selectorList; parser.parseSelector(selectorText, selectorList); if (!selectorList.first()) return; - + + CSSStyleSheet::RuleMutationScope mutationScope(this); + String oldSelectorText = this->selectorText(); m_pageRule->wrapperAdoptSelectorList(selectorList); - - if (this->selectorText() == oldSelectorText) - return; - doc->styleResolverChanged(DeferRecalcStyle); } String CSSPageRule::cssText() const @@ -94,4 +87,12 @@ String CSSPageRule::cssText() const return result; } +void CSSPageRule::reattach(StyleRulePage* rule) +{ + ASSERT(rule); + m_pageRule = rule; + if (m_propertiesCSSOMWrapper) + m_propertiesCSSOMWrapper->reattach(m_pageRule->properties()); +} + } // namespace WebCore -- cgit v1.2.1