diff options
Diffstat (limited to 'Source/WebKit/qt/Api')
-rw-r--r-- | Source/WebKit/qt/Api/qgraphicswebview.cpp | 1 | ||||
-rw-r--r-- | Source/WebKit/qt/Api/qwebelement.cpp | 13 | ||||
-rw-r--r-- | Source/WebKit/qt/Api/qwebframe.cpp | 10 |
3 files changed, 13 insertions, 11 deletions
diff --git a/Source/WebKit/qt/Api/qgraphicswebview.cpp b/Source/WebKit/qt/Api/qgraphicswebview.cpp index 7811ab170..c1eb5293a 100644 --- a/Source/WebKit/qt/Api/qgraphicswebview.cpp +++ b/Source/WebKit/qt/Api/qgraphicswebview.cpp @@ -40,7 +40,6 @@ #include <qgraphicsview.h> #include <qscrollbar.h> #include <qstyleoption.h> -#include <qinputcontext.h> #include <QtCore/qmetaobject.h> #include <QtCore/qsharedpointer.h> #include <QtCore/qtimer.h> diff --git a/Source/WebKit/qt/Api/qwebelement.cpp b/Source/WebKit/qt/Api/qwebelement.cpp index 771ad56fb..178c70e5b 100644 --- a/Source/WebKit/qt/Api/qwebelement.cpp +++ b/Source/WebKit/qt/Api/qwebelement.cpp @@ -22,7 +22,6 @@ #include "qwebelement_p.h" #include "CSSComputedStyleDeclaration.h" -#include "CSSMutableStyleDeclaration.h" #include "CSSParser.h" #include "CSSRule.h" #include "CSSRuleList.h" @@ -33,6 +32,7 @@ #include "FrameView.h" #include "GraphicsContext.h" #include "HTMLElement.h" +#include "StylePropertySet.h" #if USE(JSC) #include "Completion.h" #include "JSGlobalObject.h" @@ -503,12 +503,11 @@ QStringList QWebElement::attributeNames(const QString& namespaceUri) const return QStringList(); QStringList attributeNameList; - const NamedNodeMap* const attrs = m_element->updatedAttributes(); - if (attrs) { + if (m_element->hasAttributes()) { const String namespaceUriString(namespaceUri); // convert QString -> String once - const unsigned attrsCount = attrs->length(); + const unsigned attrsCount = m_element->attributeCount(); for (unsigned i = 0; i < attrsCount; ++i) { - const Attribute* const attribute = attrs->attributeItem(i); + const Attribute* const attribute = m_element->attributeItem(i); if (namespaceUriString == attribute->namespaceURI()) attributeNameList.append(attribute->localName()); } @@ -844,7 +843,7 @@ QString QWebElement::styleProperty(const QString &name, StyleResolveStrategy str if (!propID) return QString(); - CSSMutableStyleDeclaration* style = static_cast<StyledElement*>(m_element)->ensureInlineStyleDecl(); + StylePropertySet* style = static_cast<StyledElement*>(m_element)->ensureInlineStyleDecl(); if (strategy == InlineStyle) return style->getPropertyValue(propID); @@ -909,7 +908,7 @@ void QWebElement::setStyleProperty(const QString &name, const QString &value) return; int propID = cssPropertyID(name); - CSSMutableStyleDeclaration* style = static_cast<StyledElement*>(m_element)->ensureInlineStyleDecl(); + StylePropertySet* style = static_cast<StyledElement*>(m_element)->ensureInlineStyleDecl(); if (!propID || !style) return; diff --git a/Source/WebKit/qt/Api/qwebframe.cpp b/Source/WebKit/qt/Api/qwebframe.cpp index c8e8dad5e..39b9d20d4 100644 --- a/Source/WebKit/qt/Api/qwebframe.cpp +++ b/Source/WebKit/qt/Api/qwebframe.cpp @@ -69,6 +69,7 @@ #include "PlatformWheelEvent.h" #include "PrintContext.h" #if USE(JSC) +#include "PropertyDescriptor.h" #include "PutPropertySlot.h" #endif #include "RenderLayer.h" @@ -336,7 +337,6 @@ void QWebFramePrivate::renderCompositedLayers(GraphicsContext* context, const In textureMapper->setGraphicsContext(context); textureMapper->setImageInterpolationQuality(context->imageInterpolationQuality()); textureMapper->setTextDrawingMode(context->textDrawingMode()); - textureMapper->setViewportSize(frame->view()->frameRect().size()); QPainter* painter = context->platformContext(); const QTransform transform = painter->worldTransform(); const TransformationMatrix matrix( @@ -518,8 +518,12 @@ void QWebFramePrivate::addQtSenderToGlobalObject() JSObjectRef function = JSObjectMakeFunctionWithCallback(context, propertyName.get(), qtSenderCallback); // JSC public API doesn't support setting a Getter for a property of a given object, https://bugs.webkit.org/show_bug.cgi?id=61374. - window->methodTable()->defineGetter(window, exec, propertyName.get()->identifier(&exec->globalData()), ::toJS(function), - JSC::ReadOnly | JSC::DontEnum | JSC::DontDelete); + JSC::PropertyDescriptor descriptor; + descriptor.setGetter(::toJS(function)); + descriptor.setSetter(JSC::jsUndefined()); + descriptor.setEnumerable(false); + descriptor.setConfigurable(false); + window->methodTable()->defineOwnProperty(window, exec, propertyName.get()->identifier(&exec->globalData()), descriptor, false); } #endif |