summaryrefslogtreecommitdiff
path: root/Source/WebKit/qt/Api/qwebelement.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-02-03 09:55:33 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2012-02-03 09:55:33 +0100
commitcd44dc59cdfc39534aef4d417e9f3c412e3be139 (patch)
tree8d89889ba95ed6ec9322e733846cc9cce9d7dff1 /Source/WebKit/qt/Api/qwebelement.cpp
parentd11f84f5b5cdc0d92a08af01b13472fdd5f9acb9 (diff)
downloadqtwebkit-cd44dc59cdfc39534aef4d417e9f3c412e3be139.tar.gz
Imported WebKit commit fce473cb4d55aa9fe9d0b0322a2fffecb731b961 (http://svn.webkit.org/repository/webkit/trunk@106560)
Diffstat (limited to 'Source/WebKit/qt/Api/qwebelement.cpp')
-rw-r--r--Source/WebKit/qt/Api/qwebelement.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/WebKit/qt/Api/qwebelement.cpp b/Source/WebKit/qt/Api/qwebelement.cpp
index 07716efba..771ad56fb 100644
--- a/Source/WebKit/qt/Api/qwebelement.cpp
+++ b/Source/WebKit/qt/Api/qwebelement.cpp
@@ -503,7 +503,7 @@ QStringList QWebElement::attributeNames(const QString& namespaceUri) const
return QStringList();
QStringList attributeNameList;
- const NamedNodeMap* const attrs = m_element->attributes(/* read only = */ true);
+ const NamedNodeMap* const attrs = m_element->updatedAttributes();
if (attrs) {
const String namespaceUriString(namespaceUri); // convert QString -> String once
const unsigned attrsCount = attrs->length();
@@ -844,13 +844,13 @@ QString QWebElement::styleProperty(const QString &name, StyleResolveStrategy str
if (!propID)
return QString();
- CSSStyleDeclaration* style = static_cast<StyledElement*>(m_element)->style();
+ CSSMutableStyleDeclaration* style = static_cast<StyledElement*>(m_element)->ensureInlineStyleDecl();
if (strategy == InlineStyle)
return style->getPropertyValue(propID);
if (strategy == CascadedStyle) {
- if (style->getPropertyPriority(propID))
+ if (style->propertyIsImportant(propID))
return style->getPropertyValue(propID);
// We are going to resolve the style property by walking through the
@@ -866,11 +866,11 @@ QString QWebElement::styleProperty(const QString &name, StyleResolveStrategy str
for (int i = rules->length(); i > 0; --i) {
CSSStyleRule* rule = static_cast<CSSStyleRule*>(rules->item(i - 1));
- if (rule->style()->getPropertyPriority(propID))
- return rule->style()->getPropertyValue(propID);
+ if (rule->declaration()->propertyIsImportant(propID))
+ return rule->declaration()->getPropertyValue(propID);
if (style->getPropertyValue(propID).isEmpty())
- style = rule->style();
+ style = rule->declaration();
}
}
@@ -909,12 +909,11 @@ void QWebElement::setStyleProperty(const QString &name, const QString &value)
return;
int propID = cssPropertyID(name);
- CSSStyleDeclaration* style = static_cast<StyledElement*>(m_element)->style();
+ CSSMutableStyleDeclaration* style = static_cast<StyledElement*>(m_element)->ensureInlineStyleDecl();
if (!propID || !style)
return;
- ExceptionCode exception = 0;
- style->setProperty(name, value,emptyString(), exception);
+ style->setProperty(propID, value);
}
/*!