diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
commit | 2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch) | |
tree | 988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Source/WebKit/qt/Api/qwebelement.cpp | |
parent | dd91e772430dc294e3bf478c119ef8d43c0a3358 (diff) | |
download | qtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz |
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Source/WebKit/qt/Api/qwebelement.cpp')
-rw-r--r-- | Source/WebKit/qt/Api/qwebelement.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/WebKit/qt/Api/qwebelement.cpp b/Source/WebKit/qt/Api/qwebelement.cpp index 3fc64c96f..fb9be7892 100644 --- a/Source/WebKit/qt/Api/qwebelement.cpp +++ b/Source/WebKit/qt/Api/qwebelement.cpp @@ -26,7 +26,6 @@ #include "CSSRule.h" #include "CSSRuleList.h" #include "CSSStyleRule.h" -#include "CSSStyleSelector.h" #include "Document.h" #include "DocumentFragment.h" #include "FrameView.h" @@ -51,6 +50,7 @@ #include "RenderImage.h" #include "ScriptState.h" #include "StaticNodeList.h" +#include "StyleResolver.h" #include "qwebframe.h" #include "qwebframe_p.h" #if USE(JSC) @@ -552,7 +552,7 @@ QRect QWebElement::geometry() const { if (!m_element) return QRect(); - return m_element->getRect(); + return m_element->getPixelSnappedRect(); } /*! @@ -839,7 +839,7 @@ QString QWebElement::styleProperty(const QString &name, StyleResolveStrategy str if (!m_element || !m_element->isStyledElement()) return QString(); - int propID = cssPropertyID(name); + CSSPropertyID propID = cssPropertyID(name); if (!propID) return QString(); @@ -862,7 +862,7 @@ QString QWebElement::styleProperty(const QString &name, StyleResolveStrategy str // declarations, as well as embedded and inline style declarations. Document* doc = m_element->document(); - if (RefPtr<CSSRuleList> rules = doc->styleSelector()->styleRulesForElement(m_element, /*authorOnly*/ true)) { + if (RefPtr<CSSRuleList> rules = doc->styleResolver()->styleRulesForElement(m_element, /*authorOnly*/ true)) { for (int i = rules->length(); i > 0; --i) { CSSStyleRule* rule = static_cast<CSSStyleRule*>(rules->item(i - 1)); @@ -881,8 +881,6 @@ QString QWebElement::styleProperty(const QString &name, StyleResolveStrategy str if (!m_element || !m_element->isStyledElement()) return QString(); - int propID = cssPropertyID(name); - RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::create(m_element, true); if (!propID || !style) return QString(); @@ -908,7 +906,7 @@ void QWebElement::setStyleProperty(const QString &name, const QString &value) if (!m_element || !m_element->isStyledElement()) return; - int propID = cssPropertyID(name); + CSSPropertyID propID = cssPropertyID(name); static_cast<StyledElement*>(m_element)->setInlineStyleProperty(propID, value); } @@ -1495,7 +1493,7 @@ void QWebElement::render(QPainter* painter, const QRect& clip) view->updateLayoutAndStyleIfNeededRecursive(); - IntRect rect = e->getRect(); + IntRect rect = e->getPixelSnappedRect(); if (rect.size().isEmpty()) return; |