summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/CSSPageRule.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/CSSPageRule.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/CSSPageRule.cpp')
-rw-r--r--Source/WebCore/css/CSSPageRule.cpp23
1 files changed, 12 insertions, 11 deletions
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