diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-03-12 14:11:15 +0100 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-03-12 14:11:15 +0100 |
| commit | dd91e772430dc294e3bf478c119ef8d43c0a3358 (patch) | |
| tree | 6f33ce4d5872a5691e0291eb45bf6ab373a5f567 /Source/WebKit/qt/Api | |
| parent | ad0d549d4cc13433f77c1ac8f0ab379c83d93f28 (diff) | |
| download | qtwebkit-dd91e772430dc294e3bf478c119ef8d43c0a3358.tar.gz | |
Imported WebKit commit 3db4eb1820ac8fb03065d7ea73a4d9db1e8fea1a (http://svn.webkit.org/repository/webkit/trunk@110422)
This includes build fixes for the latest qtbase/qtdeclarative as well as the final QML2 API.
Diffstat (limited to 'Source/WebKit/qt/Api')
| -rw-r--r-- | Source/WebKit/qt/Api/qwebelement.cpp | 15 | ||||
| -rw-r--r-- | Source/WebKit/qt/Api/qwebframe.cpp | 14 | ||||
| -rw-r--r-- | Source/WebKit/qt/Api/qwebhistory.cpp | 14 | ||||
| -rw-r--r-- | Source/WebKit/qt/Api/qwebinspector.cpp | 16 | ||||
| -rw-r--r-- | Source/WebKit/qt/Api/qwebpage.cpp | 22 | ||||
| -rw-r--r-- | Source/WebKit/qt/Api/qwebpluginfactory.cpp | 20 | ||||
| -rw-r--r-- | Source/WebKit/qt/Api/qwebsettings.cpp | 6 |
7 files changed, 50 insertions, 57 deletions
diff --git a/Source/WebKit/qt/Api/qwebelement.cpp b/Source/WebKit/qt/Api/qwebelement.cpp index 40c69f4bf..3fc64c96f 100644 --- a/Source/WebKit/qt/Api/qwebelement.cpp +++ b/Source/WebKit/qt/Api/qwebelement.cpp @@ -33,6 +33,7 @@ #include "GraphicsContext.h" #include "HTMLElement.h" #include "StylePropertySet.h" +#include "StyleRule.h" #if USE(JSC) #include "Completion.h" #include "JSGlobalObject.h" @@ -843,7 +844,7 @@ QString QWebElement::styleProperty(const QString &name, StyleResolveStrategy str if (!propID) return QString(); - StylePropertySet* style = static_cast<StyledElement*>(m_element)->ensureInlineStyleDecl(); + const StylePropertySet* style = static_cast<StyledElement*>(m_element)->ensureInlineStyle(); if (strategy == InlineStyle) return style->getPropertyValue(propID); @@ -865,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->declaration()->propertyIsImportant(propID)) - return rule->declaration()->getPropertyValue(propID); + if (rule->styleRule()->properties()->propertyIsImportant(propID)) + return rule->styleRule()->properties()->getPropertyValue(propID); if (style->getPropertyValue(propID).isEmpty()) - style = rule->declaration(); + style = rule->styleRule()->properties(); } } @@ -908,11 +909,7 @@ void QWebElement::setStyleProperty(const QString &name, const QString &value) return; int propID = cssPropertyID(name); - StylePropertySet* style = static_cast<StyledElement*>(m_element)->ensureInlineStyleDecl(); - if (!propID || !style) - return; - - style->setProperty(propID, value); + static_cast<StyledElement*>(m_element)->setInlineStyleProperty(propID, value); } /*! diff --git a/Source/WebKit/qt/Api/qwebframe.cpp b/Source/WebKit/qt/Api/qwebframe.cpp index 211f0ef20..dcf23061d 100644 --- a/Source/WebKit/qt/Api/qwebframe.cpp +++ b/Source/WebKit/qt/Api/qwebframe.cpp @@ -783,12 +783,12 @@ QString QWebFrame::title() const Given the above HTML code the metaData() function will return a map with two entries: \table - \header \o Key - \o Value - \row \o "description" - \o "This document is a tutorial about Qt development" - \row \o "keywords" - \o "Qt, WebKit, Programming" + \header \li Key + \li Value + \row \li "description" + \li "This document is a tutorial about Qt development" + \row \li "keywords" + \li "Qt, WebKit, Programming" \endtable This function returns a multi map to support multiple meta tags with the same attribute name. @@ -1750,7 +1750,7 @@ QWebHitTestResultPrivate::QWebHitTestResultPrivate(const WebCore::HitTestResult { if (!hitTest.innerNode()) return; - pos = hitTest.point(); + pos = hitTest.roundedPoint(); WebCore::TextDirection dir; title = hitTest.title(dir); linkText = hitTest.textContent(); diff --git a/Source/WebKit/qt/Api/qwebhistory.cpp b/Source/WebKit/qt/Api/qwebhistory.cpp index 33bad4174..fc5bdd5fc 100644 --- a/Source/WebKit/qt/Api/qwebhistory.cpp +++ b/Source/WebKit/qt/Api/qwebhistory.cpp @@ -53,13 +53,13 @@ enum { the functions used to access them. \table - \header \o Function \o Description - \row \o title() \o The page title. - \row \o url() \o The location of the page. - \row \o originalUrl() \o The URL used to access the page. - \row \o lastVisited() \o The date and time of the user's last visit to the page. - \row \o icon() \o The icon associated with the page that was provided by the server. - \row \o userData() \o The user specific data that was stored with the history item. + \header \li Function \li Description + \row \li title() \li The page title. + \row \li url() \li The location of the page. + \row \li originalUrl() \li The URL used to access the page. + \row \li lastVisited() \li The date and time of the user's last visit to the page. + \row \li icon() \li The icon associated with the page that was provided by the server. + \row \li userData() \li The user specific data that was stored with the history item. \endtable \note QWebHistoryItem objects are value based, but \e{explicitly shared}. Changing diff --git a/Source/WebKit/qt/Api/qwebinspector.cpp b/Source/WebKit/qt/Api/qwebinspector.cpp index 52feb8895..2fbbab249 100644 --- a/Source/WebKit/qt/Api/qwebinspector.cpp +++ b/Source/WebKit/qt/Api/qwebinspector.cpp @@ -50,8 +50,8 @@ \note A QWebInspector will display a blank widget if either: \list - \o page() is null - \o QWebSettings::DeveloperExtrasEnabled is false + \li page() is null + \li QWebSettings::DeveloperExtrasEnabled is false \endlist \section1 Resources @@ -60,8 +60,8 @@ Most of the resources needed by the inspector are owned by the associated QWebPage and are allocated the first time that: \list - \o an element is inspected - \o the QWebInspector is shown. + \li an element is inspected + \li the QWebInspector is shown. \endlist \section1 Inspector configuration persistence @@ -98,12 +98,12 @@ QWebInspector::~QWebInspector() /*! Bind this inspector to the QWebPage to be inspected. - \bold {Notes:} + \b {Notes:} \list - \o There can only be one QWebInspector associated with a QWebPage + \li There can only be one QWebInspector associated with a QWebPage and vice versa. - \o Calling this method with a null \a page will break the current association, if any. - \o If \a page is already associated to another QWebInspector, the association + \li Calling this method with a null \a page will break the current association, if any. + \li If \a page is already associated to another QWebInspector, the association will be replaced and the previous QWebInspector will become unbound \endlist diff --git a/Source/WebKit/qt/Api/qwebpage.cpp b/Source/WebKit/qt/Api/qwebpage.cpp index 898899bf5..4928318d6 100644 --- a/Source/WebKit/qt/Api/qwebpage.cpp +++ b/Source/WebKit/qt/Api/qwebpage.cpp @@ -3290,15 +3290,11 @@ bool QWebPage::swallowContextMenuEvent(QContextMenuEvent *event) { d->page->contextMenuController()->clearContextMenu(); -#if HAVE(QSTYLE) - if (!RenderThemeQt::useMobileTheme()) { - if (QWebFrame* webFrame = frameAt(event->pos())) { - Frame* frame = QWebFramePrivate::core(webFrame); - if (Scrollbar* scrollbar = frame->view()->scrollbarAtPoint(convertMouseEvent(event, 1).position())) - return handleScrollbarContextMenuEvent(scrollbar, event); - } + if (QWebFrame* webFrame = frameAt(event->pos())) { + Frame* frame = QWebFramePrivate::core(webFrame); + if (Scrollbar* scrollbar = frame->view()->scrollbarAtPoint(convertMouseEvent(event, 1).position())) + return handleScrollbarContextMenuEvent(scrollbar, event); } -#endif WebCore::Frame* focusedFrame = d->page->focusController()->focusedOrMainFrame(); focusedFrame->eventHandler()->sendContextMenuEvent(convertMouseEvent(event, 1)); @@ -3744,11 +3740,11 @@ QWebPluginFactory *QWebPage::pluginFactory() const In this string the following values are replaced at run-time: \list - \o %Platform% expands to the windowing system followed by "; " if it is not Windows (e.g. "X11; "). - \o %Security% expands to "N; " if SSL is disabled. - \o %Subplatform% expands to the operating system version (e.g. "Windows NT 6.1" or "Intel Mac OS X 10.5"). - \o %WebKitVersion% is the version of WebKit the application was compiled against. - \o %AppVersion% expands to QCoreApplication::applicationName()/QCoreApplication::applicationVersion() if they're set; otherwise defaulting to Qt and the current Qt version. + \li %Platform% expands to the windowing system followed by "; " if it is not Windows (e.g. "X11; "). + \li %Security% expands to "N; " if SSL is disabled. + \li %Subplatform% expands to the operating system version (e.g. "Windows NT 6.1" or "Intel Mac OS X 10.5"). + \li %WebKitVersion% is the version of WebKit the application was compiled against. + \li %AppVersion% expands to QCoreApplication::applicationName()/QCoreApplication::applicationVersion() if they're set; otherwise defaulting to Qt and the current Qt version. \endlist */ QString QWebPage::userAgentForUrl(const QUrl&) const diff --git a/Source/WebKit/qt/Api/qwebpluginfactory.cpp b/Source/WebKit/qt/Api/qwebpluginfactory.cpp index b9180be94..34ea05265 100644 --- a/Source/WebKit/qt/Api/qwebpluginfactory.cpp +++ b/Source/WebKit/qt/Api/qwebpluginfactory.cpp @@ -181,16 +181,16 @@ void QWebPluginFactory::refreshPlugins() The above object element will result in a call to create() with the following arguments: \table - \header \o Parameter - \o Value - \row \o mimeType - \o "application/x-pdf" - \row \o url - \o "http://qt.nokia.com/document.pdf" - \row \o argumentNames - \o "showTableOfContents" "hideThumbnails" - \row \o argumentVaues - \o "true" "false" + \header \li Parameter + \li Value + \row \li mimeType + \li "application/x-pdf" + \row \li url + \li "http://qt.nokia.com/document.pdf" + \row \li argumentNames + \li "showTableOfContents" "hideThumbnails" + \row \li argumentVaues + \li "true" "false" \endtable \note Ownership of the returned object will be transferred to the caller. diff --git a/Source/WebKit/qt/Api/qwebsettings.cpp b/Source/WebKit/qt/Api/qwebsettings.cpp index 2885f01ee..0f55b0b89 100644 --- a/Source/WebKit/qt/Api/qwebsettings.cpp +++ b/Source/WebKit/qt/Api/qwebsettings.cpp @@ -703,7 +703,7 @@ void QWebSettings::clearIconDatabase() /*! Returns the web site's icon for \a url. - If the web site does not specify an icon \bold OR if the icon is not in the + If the web site does not specify an icon \b OR if the icon is not in the database, a null QIcon is returned. \note The returned icon's size is arbitrary. @@ -850,10 +850,10 @@ int QWebSettings::maximumPagesInCache() dead objects should consume when the cache is under pressure. \a cacheMaxDead is the \e maximum number of bytes that dead objects should - consume when the cache is \bold not under pressure. + consume when the cache is \b not under pressure. \a totalCapacity specifies the \e maximum number of bytes that the cache - should consume \bold overall. + should consume \b overall. The cache is enabled by default. Calling setObjectCacheCapacities(0, 0, 0) will disable the cache. Calling it with one non-zero enables it again. |
