Ignore:
Timestamp:
Mar 8, 2010, 12:52:58 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.2 sources.

Location:
trunk
Files:
28 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/3rdparty/webkit/JavaScriptCore/ChangeLog

    r561 r651  
    1010        (OpaqueJSClass::OpaqueJSClass):
    1111        (OpaqueJSClassContextData::OpaqueJSClassContextData):
    12 
    13 2010-01-07  Norbert Leser  <norbert.leser@nokia.com>
    14 
    15         Reviewed by NOBODY (OOPS!).
    16 
    17         Added time-based optimization and increased optimization level to O3,
    18         conditionally for COMPILER(RVCT),
    19         for increasing performance of JavaScript execution.
    20         (Default settings are Ospace and O2)
    21 
    22         * runtime/Structure.h:
    2312
    24132009-11-19  Thiago Macieira <thiago.macieira@nokia.com>
  • trunk/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h

    r561 r651  
    4646#endif
    4747
    48 #if COMPILER(RVCT)
    49 #pragma arm
    50 #pragma Otime
    51 #pragma O3
    52 #endif
    53 
    5448namespace JSC {
    5549
  • trunk/src/3rdparty/webkit/VERSION

    r561 r651  
    99and has the sha1 checksum
    1010
    11         8f6992f4e8f027818429d428393b08068eca9ffa
     11        69dd29fbeb12d076741dce70ac6bc155101ccd6f
  • trunk/src/3rdparty/webkit/WebCore/ChangeLog

    r561 r651  
     12010-02-01  Andreas Kling  <andreas.kling@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Use the fallback style on Maemo 5
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=34376
     8
     9        * platform/qt/RenderThemeQt.cpp:
     10        (WebCore::RenderThemeQt::RenderThemeQt):
     11        (WebCore::RenderThemeQt::fallbackStyle):
     12        (WebCore::RenderThemeQt::qStyle):
     13        (WebCore::RenderThemeQt::setPaletteFromPageClientIfExists):
     14        * platform/qt/RenderThemeQt.h:
     15
     162010-01-29  Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
     17
     18        Reviewed by Simon Hausmann.
     19
     20        [Qt] Speed up the WebCore::String -> QString conversion
     21
     22        Use QString(const QChar *, int len) constructor instead of QString::fromUtf16 to
     23        avoid BOM checks and byteswapping.
     24
     25        * bridge/qt/qt_class.cpp:
     26        (JSC::Bindings::QtClass::fieldNamed):
     27        * bridge/qt/qt_runtime.cpp:
     28        (JSC::Bindings::convertValueToQVariant):
     29
     302010-01-14  Andreas Kling  <andreas.kling@nokia.com>
     31
     32        Reviewed by Kenneth Rohde Christiansen.
     33
     34        [Qt] Enable scrolling optimization for pages with embedded widgets
     35
     36        https://bugs.webkit.org/show_bug.cgi?id=33373
     37
     38        Added a basic manual test for scrolling of embedded QWidgets.
     39
     40        * manual-tests/qt/qtplugin-scrolling.html: Added.
     41        * platform/ScrollView.cpp:
     42        (WebCore::ScrollView::scrollContents):
     43        (WebCore::ScrollView::setParent):
     44        * platform/ScrollView.h:
     45        * platform/qt/ScrollViewQt.cpp:
     46        (WebCore::ScrollView::platformInit):
     47        (WebCore::ScrollView::platformAddChild):
     48        (WebCore::ScrollView::platformRemoveChild):
     49        * plugins/qt/PluginViewQt.cpp:
     50        (WebCore::PluginView::updatePluginWidget):
     51        (WebCore::PluginView::invalidateRect):
     52
     532010-01-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     54
     55        Reviewed by Simon Hausmann.
     56
     57        [Qt] Turn off websocket support by default for Qt 4.6.x
     58        https://bugs.webkit.org/show_bug.cgi?id=34284
     59
     60        * WebCore.pro:
     61
     622010-01-26  Holger Hans Peter Freyther  <zecke@selfish.org>
     63
     64        Reviewed by Simon Hausmann.
     65
     66        [Qt] JavaScript prompt is currently broken.
     67        https://bugs.webkit.org/show_bug.cgi?id=30914
     68
     69        Remove the manual test case in favor of an automated
     70        test case in WebKit/qt/tests/qwebpage.
     71
     72        * manual-tests/qt/java-script-prompt.html: Removed.
     73
     742010-01-25  Janne Koskinen  <janne.p.koskinen@digia.com>
     75
     76        Reviewed by Simon Hausmann.
     77
     78        [Qt] Phone backup support for QtWebkit for Symbian devices.
     79        https://bugs.webkit.org/show_bug.cgi?id=34077
     80
     81        * WebCore.pro:
     82
     832010-01-21  Thiago Macieira  <thiago.macieira@nokia.com>
     84
     85        Reviewed by Simon Hausmann.
     86
     87        [Qt] Fix incorrect dependency to QtXmlPatterns in generated include/QtWebKit/QtWebKit header
     88
     89        The generated file includes QtXmlPatterns/QtXmlPatterns, which is neither used/required by
     90        the public QtWebKit API nor will it be available if Qt is configured with -no-xmlpatterns.
     91
     92        * WebCore.pro: Trick syncqt to believe that xmlpatterns is not a dependency, so that it's not
     93        included in the generated file. It'll still be used and linked to with this trick.
     94
     952010-01-17  Srinidhi Shreedhara  <srinidhi.shreedhara@nokia.com>
     96
     97        Reviewed by Simon Hausmann.
     98
     99        [Qt] [Symbian] SetWindow call in npapi plugin does not happen when the cooridnates are negative
     100        https://bugs.webkit.org/show_bug.cgi?id=33573
     101
     102        * plugins/symbian/PluginViewSymbian.cpp:
     103        (WebCore::PluginView::setNPWindowIfNeeded): Remove tests for negative
     104        coordinates for early return.
     105
     1062010-01-14  Norbert Leser  <norbert.leser@nokia.com>
     107
     108        Reviewed by Laszlo Gombos.
     109
     110        Platform Symbian specific:
     111        Added time-based optimization (-Otime) and increased optimization level to -O3,
     112        conditionally for RVCT compiler (for ARM), for increasing performance
     113        (primarily affecting JavaScript execution).
     114        Default settings are -Ospace and -O2.
     115
     116        No new tests needed because no new funtionality is introduced,
     117        only potential regression on existing tests needs to be evaluated.
     118
     119        * WebCore.pro:
     120
     1212010-01-13  Girish Ramakrishnan  <girish@forwardbias.in>
     122
     123        Reviewed by Simon Hausmann.
     124
     125        [Qt/Win] Flash in QGraphicsWebView does not process hover correctly.
     126       
     127        https://bugs.webkit.org/show_bug.cgi?id=33591
     128       
     129        Mouse hover does not work as expected with the flash in some sites.
     130        - http://www.bbc.co.uk/ Hover over the map
     131        - http://www.barbie.com/ Hover over the menu items (Games, Videos)
     132        The problem appears to be that Flash queries NPNVnetscapeWindow on every
     133        mouse hover. I do not how flash uses this value but returning 0 when flash
     134        is in windowless mode solves the problem (When using QGraphicsWebView we
     135        inject wmode opaque, thereby putting the plugin in windowless mode).
     136
     137        * plugins/win/PluginViewWin.cpp:
     138        (windowHandleForPageClient):
     139
    11402010-01-13  Miikka Heikkinen <miikka.heikkinen@digia.com>
    2141
  • trunk/src/3rdparty/webkit/WebCore/WebCore.pro

    r637 r651  
    77    TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 // Min 128kB, Max 32MB
    88    TARGET.CAPABILITY = All -Tcb
     9    TARGET.UID3 = 0x200267C2
    910
    1011    webkitlibs.sources = QtWebKit.dll
     
    1920    webkitlibs.pkg_prerules = vendorinfo
    2021
    21     DEPLOYMENT += webkitlibs
    22 
    23     TARGET.UID3 = 0x200267C2
     22    webkitbackup.sources = ../WebKit/qt/symbian/backup_registration.xml
     23    webkitbackup.path = /private/10202D56/import/packages/$$replace(TARGET.UID3, 0x,)
     24
     25    DEPLOYMENT += webkitlibs webkitbackup
     26
    2427    # RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target.
    2528    # Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000.
    26     MMP_RULES += "LINKEROPTION  armcc --rw-base 0xE00000"
     29    QMAKE_LFLAGS.ARMCC += --rw-base 0xE00000
    2730}
    2831
     
    183186
    184187# Web Socket support.
    185 !contains(DEFINES, ENABLE_WEB_SOCKETS=.): DEFINES += ENABLE_WEB_SOCKETS=1
     188!contains(DEFINES, ENABLE_WEB_SOCKETS=.): DEFINES += ENABLE_WEB_SOCKETS=0
    186189
    187190# XSLT support with QtXmlPatterns
     
    27802783    FEATURE_DEFINES_JAVASCRIPT += ENABLE_XSLT=1
    27812784
    2782     QT += xmlpatterns
     2785    tobe|!tobe: QT += xmlpatterns
    27832786
    27842787    SOURCES += \
     
    34153418symbian {
    34163419    shared {
    3417         contains(MMP_RULES, defBlock) {
    3418             MMP_RULES -= defBlock
    3419 
    3420             MMP_RULES += "$${LITERAL_HASH}ifdef WINSCW" \
    3421                     "DEFFILE ../WebKit/qt/symbian/bwins/$${TARGET}.def" \
    3422                     "$${LITERAL_HASH}elif defined EABI" \
    3423                     "DEFFILE ../WebKit/qt/symbian/eabi/$${TARGET}.def" \
    3424                     "$${LITERAL_HASH}endif"
     3420        contains(CONFIG, def_files) {
     3421            defFilePath=../WebKit/qt/symbian
    34253422        }
    34263423    }
  • trunk/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp

    r561 r651  
    128128    QObject* obj = qtinst->getObject();
    129129    UString ustring = identifier.ustring();
    130     QString objName(QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()));
     130    QString objName((const QChar*)ustring.rep()->data(), ustring.size());
    131131    QByteArray ba = objName.toAscii();
    132132
  • trunk/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp

    r561 r651  
    306306            } else {
    307307                UString ustring = value.toString(exec);
    308                 ret = QVariant(QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()));
     308                ret = QVariant(QString((const QChar*)ustring.rep()->data(), ustring.size()));
    309309                if (type == String)
    310310                    dist = 0;
     
    330330                        if (objdist >= 0) {
    331331                            UString ustring = (*it).ustring();
    332                             QString id = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
     332                            QString id = QString((const QChar*)ustring.rep()->data(), ustring.size());
    333333                            result.insert(id, v);
    334334                        }
     
    405405                    JSValue val = rtarray->getConcreteArray()->valueAt(exec, i);
    406406                    UString ustring = val.toString(exec);
    407                     QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
     407                    QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
    408408
    409409                    result.append(qstring);
     
    419419                    JSValue val = array->get(exec, i);
    420420                    UString ustring = val.toString(exec);
    421                     QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
     421                    QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
    422422
    423423                    result.append(qstring);
     
    428428                // Make a single length array
    429429                UString ustring = value.toString(exec);
    430                 QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
     430                QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
    431431                QStringList result;
    432432                result.append(qstring);
     
    444444            } else {
    445445                UString ustring = value.toString(exec);
    446                 ret = QVariant(QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()).toLatin1());
     446                ret = QVariant(QString((const QChar*)ustring.rep()->data(), ustring.size()).toLatin1());
    447447                if (type == String)
    448448                    dist = 5;
     
    486486            } else if (type == String) {
    487487                UString ustring = value.toString(exec);
    488                 QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
     488                QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
    489489
    490490                if (hint == QMetaType::QDateTime) {
     
    535535                // Attempt to convert.. a bit risky
    536536                UString ustring = value.toString(exec);
    537                 QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
     537                QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
    538538
    539539                // this is of the form '/xxxxxx/i'
     
    555555            } else if (type == String) {
    556556                UString ustring = value.toString(exec);
    557                 QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
     557                QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
    558558
    559559                QRegExp re(qstring);
  • trunk/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp

    r561 r651  
    217217#include "JSWebKitPoint.h"
    218218#include "JSWebKitTransitionEvent.h"
    219 #include "JSWebSocket.h"
    220219#include "JSWheelEvent.h"
    221220#include "JSWorker.h"
     
    248247/* Hash table */
    249248
    250 static const HashTableValue JSDOMWindowTableValues[297] =
     249static const HashTableValue JSDOMWindowTableValues[296] =
    251250{
    252251    { "screen", DontDelete|ReadOnly, (intptr_t)jsDOMWindowScreen, (intptr_t)0 },
     
    541540    { "Worker", DontDelete, (intptr_t)jsDOMWindowWorkerConstructor, (intptr_t)setJSDOMWindowWorkerConstructor },
    542541    { "SharedWorker", DontDelete, (intptr_t)jsDOMWindowSharedWorkerConstructor, (intptr_t)setJSDOMWindowSharedWorkerConstructor },
    543     { "WebSocket", DontDelete, (intptr_t)jsDOMWindowWebSocketConstructor, (intptr_t)setJSDOMWindowWebSocketConstructor },
    544542    { "Plugin", DontDelete, (intptr_t)jsDOMWindowPluginConstructor, (intptr_t)setJSDOMWindowPluginConstructor },
    545543    { "PluginArray", DontDelete, (intptr_t)jsDOMWindowPluginArrayConstructor, (intptr_t)setJSDOMWindowPluginArrayConstructor },
     
    589587    { 65535, JSDOMWindowTableValues, 0 };
    590588#else
    591     { 1068, 1023, JSDOMWindowTableValues, 0 };
     589    { 1067, 1023, JSDOMWindowTableValues, 0 };
    592590#endif
    593591
     
    32763274}
    32773275
    3278 JSValue jsDOMWindowWebSocketConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
    3279 {
    3280     JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase()));
    3281     if (!castedThis->allowsAccessFrom(exec))
    3282         return jsUndefined();
    3283     return castedThis->webSocket(exec);
    3284 }
    3285 
    32863276JSValue jsDOMWindowPluginConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
    32873277{
     
    56775667    // Shadowing a built-in constructor
    56785668    static_cast<JSDOMWindow*>(thisObject)->putDirect(Identifier(exec, "SharedWorker"), value);
    5679 }
    5680 
    5681 void setJSDOMWindowWebSocketConstructor(ExecState* exec, JSObject* thisObject, JSValue value)
    5682 {
    5683     if (!static_cast<JSDOMWindow*>(thisObject)->allowsAccessFrom(exec))
    5684         return;
    5685     // Shadowing a built-in constructor
    5686     static_cast<JSDOMWindow*>(thisObject)->putDirect(Identifier(exec, "WebSocket"), value);
    56875669}
    56885670
  • trunk/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h

    r561 r651  
    8383    JSC::JSValue worker(JSC::ExecState*) const;
    8484    JSC::JSValue sharedWorker(JSC::ExecState*) const;
    85     JSC::JSValue webSocket(JSC::ExecState*) const;
    8685    JSC::JSValue audio(JSC::ExecState*) const;
    8786
     
    680679JSC::JSValue jsDOMWindowSharedWorkerConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
    681680void setJSDOMWindowSharedWorkerConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
    682 JSC::JSValue jsDOMWindowWebSocketConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
    683 void setJSDOMWindowWebSocketConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
    684681JSC::JSValue jsDOMWindowPluginConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
    685682void setJSDOMWindowPluginConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
  • trunk/src/3rdparty/webkit/WebCore/platform/PopupMenu.h

    r561 r651  
    4545    class QWebPopup;
    4646}
     47QT_BEGIN_NAMESPACE
     48class QGraphicsProxyWidget;
     49QT_END_NAMESPACE
    4750#elif PLATFORM(GTK)
    4851typedef struct _GtkMenu GtkMenu;
     
    148151    void populate(const IntRect&);
    149152    QWebPopup* m_popup;
     153    QGraphicsProxyWidget* m_proxy;
    150154#elif PLATFORM(WIN)
    151155    // ScrollBarClient
  • trunk/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp

    r561 r651  
    508508    }
    509509
    510     if (canBlitOnScroll() && !rootPreventsBlitting()) { // The main frame can just blit the WebView window
     510    if (canBlitOnScroll()) { // The main frame can just blit the WebView window
    511511       // FIXME: Find a way to blit subframes without blitting overlapping content
    512512       hostWindow()->scroll(-scrollDelta, scrollViewRect, clipRect);
     
    597597    if (m_scrollbarsAvoidingResizer && parent())
    598598        parent()->adjustScrollbarsAvoidingResizerCount(-m_scrollbarsAvoidingResizer);
    599 
    600 #if PLATFORM(QT)
    601     if (m_widgetsPreventingBlitting && parent())
    602         parent()->adjustWidgetsPreventingBlittingCount(-m_widgetsPreventingBlitting);
    603 
    604     if (m_widgetsPreventingBlitting && parentView)
    605         parentView->adjustWidgetsPreventingBlittingCount(m_widgetsPreventingBlitting);
    606 #endif
    607599
    608600    Widget::setParent(parentView);
  • trunk/src/3rdparty/webkit/WebCore/platform/ScrollView.h

    r561 r651  
    306306#endif
    307307
    308 #if PLATFORM(QT)
    309 public:
    310     void adjustWidgetsPreventingBlittingCount(int delta);
    311 private:
    312     bool rootPreventsBlitting() const { return root()->m_widgetsPreventingBlitting > 0; }
    313     unsigned m_widgetsPreventingBlitting;
    314 #else
    315     bool rootPreventsBlitting() const { return false; }
    316 #endif
    317 
    318308#if PLATFORM(GTK)
    319309public:
  • trunk/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp

    r561 r651  
    22 * This file is part of the popup menu implementation for <select> elements in WebCore.
    33 *
     4 * Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
    45 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
    56 * Copyright (C) 2006 Apple Computer, Inc.
     
    3637#include <QAction>
    3738#include <QDebug>
     39#include <QGraphicsProxyWidget>
     40#include <QGraphicsScene>
     41#include <QGraphicsView>
     42#include <QGraphicsWebView>
    3843#include <QListWidget>
    3944#include <QListWidgetItem>
     
    4752PopupMenu::PopupMenu(PopupMenuClient* client)
    4853    : m_popupClient(client)
     54    , m_proxy(0)
    4955{
    5056    m_popup = new QWebPopup(client);
     
    5359PopupMenu::~PopupMenu()
    5460{
    55     delete m_popup;
     61    // If we create a proxy, then the deletion of the proxy and the
     62    // combo will be done by the proxy's parent (QGraphicsWebView)
     63    if (!m_proxy)
     64        delete m_popup;
    5665}
    5766
     
    93102    rect.setHeight(m_popup->sizeHint().height());
    94103
    95     m_popup->setParent(client->ownerWidget());
    96     m_popup->setGeometry(rect);
     104    if (QGraphicsView* view = qobject_cast<QGraphicsView*>(client->ownerWidget())) {
     105        if (!m_proxy) {
     106            m_proxy = new QGraphicsProxyWidget(qobject_cast<QGraphicsWebView*>(client->pluginParent()));
     107            m_proxy->setWidget(m_popup);
     108        } else
     109            m_proxy->setVisible(true);
     110        m_proxy->setGeometry(rect);
     111    } else {
     112        m_popup->setParent(client->ownerWidget());
     113        m_popup->setGeometry(rect);
     114    }
     115
    97116    m_popup->setCurrentIndex(index);
    98117    m_popup->exec();
  • trunk/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp

    r637 r651  
    2727#include <QInputContext>
    2828#include <QMouseEvent>
     29#include <QGraphicsProxyWidget>
    2930
    3031namespace WebCore {
     
    3637    Q_ASSERT(m_client);
    3738
     39#if !defined(Q_WS_S60) && !defined(Q_WS_MAEMO_5)
    3840    setFont(m_client->menuStyle().font().font());
     41#endif
    3942    connect(this, SIGNAL(activated(int)),
    4043            SLOT(activeChanged(int)), Qt::QueuedConnection);
     
    4447void QWebPopup::exec()
    4548{
     49    // QCursor::pos() is not a great idea for a touch screen, but we don't need the coordinates
     50    // as comboboxes with Qt on Maemo 5 come up in their full width on the screen.
     51    // On the other platforms it's okay to use QCursor::pos().
     52#if defined(Q_WS_MAEMO_5)
     53    showPopup();
     54#else
    4655    QMouseEvent event(QEvent::MouseButtonPress, QCursor::pos(), Qt::LeftButton,
    4756                      Qt::LeftButton, Qt::NoModifier);
    4857    QCoreApplication::sendEvent(this, &event);
     58#endif
    4959}
    5060
     
    7080
    7181    QComboBox::hidePopup();
     82   
     83    if (QGraphicsProxyWidget* proxy = graphicsProxyWidget())
     84        proxy->setVisible(false);
     85
    7286    if (!m_popupVisible)
    7387        return;
  • trunk/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp

    r561 r651  
    126126    : RenderTheme()
    127127    , m_page(page)
    128     , m_fallbackStyle(0)
    129128{
    130129    QPushButton button;
     
    136135    m_buttonFontPixelSize = fontInfo.pixelSize();
    137136#endif
     137
     138    m_fallbackStyle = QStyleFactory::create(QLatin1String("windows"));
    138139}
    139140
     
    144145
    145146// for some widget painting, we need to fallback to Windows style
    146 QStyle* RenderThemeQt::fallbackStyle()
    147 {
    148     if (!m_fallbackStyle)
    149         m_fallbackStyle = QStyleFactory::create(QLatin1String("windows"));
    150 
    151     if (!m_fallbackStyle)
    152         m_fallbackStyle = QApplication::style();
    153 
    154     return m_fallbackStyle;
     147QStyle* RenderThemeQt::fallbackStyle() const
     148{
     149    return (m_fallbackStyle) ? m_fallbackStyle : QApplication::style();
    155150}
    156151
    157152QStyle* RenderThemeQt::qStyle() const
    158153{
     154#ifdef Q_WS_MAEMO_5
     155    return fallbackStyle();
     156#endif
     157
    159158    if (m_page) {
    160159        ChromeClientQt* client = static_cast<ChromeClientQt*>(m_page->chrome()->client());
     
    759758        option.state |= (isChecked(o) ? QStyle::State_On : QStyle::State_Off);
    760759
     760#ifdef Q_WS_MAEMO_5
     761    static QPalette lightGrayPalette(Qt::lightGray);
     762    option.palette = lightGrayPalette;
     763#else
    761764    // If the owner widget has a custom palette, use it
    762765    Page* page = o->document()->page();
     
    767770            option.palette = pageClient->palette();
    768771    }
     772#endif
    769773
    770774    return result;
  • trunk/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h

    r561 r651  
    139139
    140140    QStyle* qStyle() const;
    141     QStyle* fallbackStyle();
     141    QStyle* fallbackStyle() const;
    142142
    143143    Page* m_page;
  • trunk/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp

    r561 r651  
    3737void ScrollView::platformInit()
    3838{
    39     m_widgetsPreventingBlitting = 0;
    4039}
    4140
     
    4443}
    4544
    46 // Windowed plugins are using native windows and are thus preventing
    47 // us from doing any kind of scrolling optimization.
    48 
    49 void ScrollView::adjustWidgetsPreventingBlittingCount(int delta)
    50 {
    51     m_widgetsPreventingBlitting += delta;
    52     if (parent())
    53         parent()->adjustWidgetsPreventingBlittingCount(delta);
    54 }
    55 
    5645void ScrollView::platformAddChild(Widget*)
    5746{
    58     adjustWidgetsPreventingBlittingCount(1);
    5947}
    6048
     
    6250{
    6351    child->hide();
    64     adjustWidgetsPreventingBlittingCount(-1);
    6552}
    6653
  • trunk/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp

    r561 r651  
    127127    if (!m_windowRect.intersects(frameView->frameRect()))
    128128        setNPWindowIfNeeded();
     129
     130    // Make sure we get repainted afterwards. This is necessary for downward
     131    // scrolling to move the plugin widget properly.
     132    invalidate();
    129133}
    130134
     
    658662{
    659663    if (m_isWindowed) {
    660         platformWidget()->update(rect);
     664        if (platformWidget())
     665            platformWidget()->update(rect);
    661666        return;
    662667    }
  • trunk/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp

    r561 r651  
    281281    m_npWindow.width = m_windowRect.width();
    282282    m_npWindow.height = m_windowRect.height();
    283     if (m_npWindow.x < 0 || m_npWindow.y < 0 || m_npWindow.width <= 0 || m_npWindow.height <= 0)
    284         return;
    285283   
    286284    PluginView::setCurrentPluginView(this);
  • trunk/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp

    r561 r651  
    8787    if (!client)
    8888        return 0;
    89     return client->ownerWidget()->winId();
     89    if (QWidget* pluginParent = qobject_cast<QWidget*>(client->pluginParent()))
     90        return pluginParent->winId();
     91    return 0;
    9092#else
    9193    return client;
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp

    r561 r651  
    13701370    fromPage = qMax(1, fromPage);
    13711371    toPage = qMin(printContext.pageCount(), toPage);
     1372    if (toPage < fromPage) {
     1373        // if the user entered a page range outside the actual number
     1374        // of printable pages, just return
     1375        return;
     1376    }
    13721377
    13731378    if (printer->pageOrder() == QPrinter::LastPageFirst) {
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp

    r561 r651  
    17091709    if (loader)
    17101710        loader->detachFromParent();
    1711     if (d->inspector)
    1712         d->inspector->setPage(0);
     1711    if (d->inspector) {
     1712        // Since we have to delete an internal inspector,
     1713        // call setInspector(0) directly to prevent potential crashes
     1714        if (d->inspectorIsInternalOnly)
     1715            d->setInspector(0);
     1716        else
     1717            d->inspector->setPage(0);
     1718    }
    17131719    delete d;
    17141720}
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp

    r561 r651  
    5757    view->setPage(0);
    5858}
     59
     60#ifdef Q_WS_MAEMO_5
     61#include "qabstractkineticscroller.h"
     62
     63class QWebViewKineticScroller : public QAbstractKineticScroller {
     64public:
     65    QWebViewKineticScroller() : QAbstractKineticScroller() {}
     66    // remember the frame where the button was pressed
     67    bool eventFilter(QObject* o, QEvent* ev)
     68    {
     69        switch (ev->type()) {
     70        case QEvent::MouseButtonPress: {
     71            QWebFrame* hitFrame = scrollingFrameAt(static_cast<QMouseEvent*>(ev)->pos());
     72            if (hitFrame)
     73                m_frame = hitFrame;
     74            break;
     75        }
     76        default:
     77            break;
     78        }
     79        return QAbstractKineticScroller::eventFilter(o, ev);
     80    }
     81
     82protected:
     83    QWebFrame* currentFrame() const
     84    {
     85        if (!m_frame.isNull())
     86            return m_frame.data();
     87
     88        QWebView* view = static_cast<QWebView*>(widget());
     89        QWebFrame* frame = view->page()->mainFrame();
     90        return frame;
     91    }
     92
     93    // Returns the innermost frame at the given position that can scroll.
     94    QWebFrame* scrollingFrameAt(const QPoint& pos) const
     95    {
     96        QWebView* view = static_cast<QWebView*>(widget());
     97        QWebFrame* mainFrame = view->page()->mainFrame();
     98        QWebFrame* hitFrame = mainFrame->hitTestContent(pos).frame();
     99        QSize range = hitFrame->contentsSize() - hitFrame->geometry().size();
     100
     101        while (hitFrame && range.width() <= 1 && range.height() <= 1)
     102            hitFrame = hitFrame->parentFrame();
     103
     104        return hitFrame;
     105    }
     106
     107    void attachToWidget()
     108    {
     109        QWebView* view = static_cast<QWebView*>(widget());
     110        QWebFrame* mainFrame = view->page()->mainFrame();
     111        m_oldHorizontalScrollBarPolicy = mainFrame->scrollBarPolicy(Qt::Horizontal);
     112        m_oldVerticalScrollBarPolicy = mainFrame->scrollBarPolicy(Qt::Vertical);
     113        mainFrame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
     114        mainFrame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
     115        view->installEventFilter(this);
     116    }
     117
     118    void removeFromWidget()
     119    {
     120        QWebView* view = static_cast<QWebView*>(widget());
     121        view->removeEventFilter(this);
     122        QWebFrame* mainFrame = view->page()->mainFrame();
     123        mainFrame->setScrollBarPolicy(Qt::Vertical, m_oldVerticalScrollBarPolicy);
     124        mainFrame->setScrollBarPolicy(Qt::Horizontal, m_oldHorizontalScrollBarPolicy);
     125    }
     126
     127    QRect positionRange() const
     128    {
     129        QRect r;
     130        QWebFrame* frame = currentFrame();
     131        r.setSize(frame->contentsSize() - frame->geometry().size());
     132        return r;
     133    }
     134
     135    QPoint position() const
     136    {
     137        QWebFrame* frame = currentFrame();
     138        return frame->scrollPosition();
     139    }
     140
     141    QSize viewportSize() const
     142    {
     143        return static_cast<QWebView*>(widget())->page()->viewportSize();
     144    }
     145
     146    void setPosition(const QPoint& point, const QPoint& /* overShootDelta */)
     147    {
     148        QWebFrame* frame = currentFrame();
     149        frame->setScrollPosition(point);
     150    }
     151
     152    QPointer<QWebFrame> m_frame;
     153    Qt::ScrollBarPolicy m_oldVerticalScrollBarPolicy;
     154    Qt::ScrollBarPolicy m_oldHorizontalScrollBarPolicy;
     155};
     156
     157#endif // Q_WS_MAEMO_5
     158
    59159
    60160/*!
     
    154254#endif
    155255
     256#if defined(Q_WS_MAEMO_5)
     257    QAbstractKineticScroller* scroller = new QWebViewKineticScroller();
     258    scroller->setWidget(this);
     259#endif
    156260    setAcceptDrops(true);
    157261
  • trunk/src/3rdparty/webkit/WebKit/qt/ChangeLog

    r561 r651  
     12010-01-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        Do not set the combobox font on Maemo5 and S60; use the
     6        default instead.
     7
     8        * WebCoreSupport/QtFallbackWebPopup.cpp:
     9        (WebCore::QtFallbackWebPopup::populate):
     10
     112010-01-28  Andreas Kling  <andreas.kling@nokia.com>
     12
     13        Reviewed by Kenneth Rohde Christiansen.
     14
     15        [Qt] Support kinetic scrolling on Maemo 5
     16
     17        https://bugs.webkit.org/show_bug.cgi?id=34267
     18
     19        Patch by Ralf Engels <ralf.engels@nokia.com> and
     20        Robert Griebl <rgriebl@trolltech.com>
     21
     22        * Api/qwebview.cpp:
     23        (QWebViewKineticScroller::QWebViewKineticScroller):
     24        (QWebViewKineticScroller::eventFilter):
     25        (QWebViewKineticScroller::currentFrame):
     26        (QWebViewKineticScroller::scrollingFrameAt):
     27        (QWebViewKineticScroller::attachToWidget):
     28        (QWebViewKineticScroller::removeFromWidget):
     29        (QWebViewKineticScroller::positionRange):
     30        (QWebViewKineticScroller::position):
     31        (QWebViewKineticScroller::viewportSize):
     32        (QWebViewKineticScroller::setPosition):
     33        (QWebView::QWebView):
     34
     352010-01-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     36
     37        Reviewed by Simon Hausmann
     38
     39        Disable auto-uppercase and predictive text on Maemo5, just like the
     40        build-in MicroB Browser.
     41
     42        * WebCoreSupport/EditorClientQt.cpp:
     43        (WebCore::EditorClientQt::setInputMethodState):
     44
     452010-01-28  Trond KjernÃ¥sen <trond@trolltech.com>
     46
     47        Reviewed by Simon Hausmann.
     48
     49        [Qt] Fix for endless print loop when printing web pages
     50
     51        * Api/qwebframe.cpp:
     52        (QWebFrame::print):
     53
     542010-01-26  Simon Hausmann  <simon.hausmann@nokia.com>
     55
     56        Reviewed by Kenneth Rohde Christiansen.
     57
     58        [Qt] Show comboboxes on Maemo 5
     59        https://bugs.webkit.org/show_bug.cgi?id=34088
     60
     61        Don't try to show the combobox by simulating a mouse event from QCursor::pos() to
     62        get the combobox position right. The position on Maemo 5 is independent from the mouse
     63        and there's no QCursor::pos().
     64
     65        * WebCoreSupport/QtFallbackWebPopup.cpp:
     66        (WebCore::QtFallbackWebPopup::show):
     67
     682010-01-26  Holger Hans Peter Freyther  <zecke@selfish.org>
     69
     70        Reviewed by Simon Hausmann.
     71
     72        [Qt] JavaScript prompt is currently broken
     73        https://bugs.webkit.org/show_bug.cgi?id=30914
     74
     75        In r52152 a patch was landed to convert a null QString
     76        to an empty WebCore::String in case the prompt was accepted
     77        but the default implementation returned the null QString.
     78
     79        The patch tried to avoid assign to result twice and
     80        was not checking the QString if it is null but the default
     81        value. This lead to always returning an empty string on
     82        successful prompts. Fix it by checking the variable 'x'
     83        for isNull.
     84
     85        The manual test case used didn't cover the case of non
     86        empty input, replace it with an automatic test case that
     87        should cover all cases.
     88
     89        * WebCoreSupport/ChromeClientQt.cpp:
     90        (WebCore::ChromeClientQt::runJavaScriptPrompt): Fix the bug.
     91        * tests/qwebpage/tst_qwebpage.cpp: Add automatic test case
     92        (JSPromptPage::JSPromptPage):
     93        (JSPromptPage::javaScriptPrompt):
     94        (tst_QWebPage::testJSPrompt):
     95
     962010-01-25  Janne Koskinen  <janne.p.koskinen@digia.com>
     97
     98        Reviewed by Simon Hausmann.
     99
     100        [Qt] Phone backup support for QtWebkit for Symbian devices.
     101        https://bugs.webkit.org/show_bug.cgi?id=34077
     102
     103        * symbian/backup_registration.xml: Added.
     104
     1052009-11-19  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     106
     107        Reviewed by Kenneth Rohde Christiansen.
     108
     109        [Qt] Fix QWebInspector destruction problem.
     110        https://bugs.webkit.org/show_bug.cgi?id=31664
     111
     112        * Api/qwebpage.cpp:
     113        (QWebPage::~QWebPage):
     114
    11152010-01-14  Simon Hausmann  <simon.hausmann@nokia.com>
    2116
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp

    r561 r651  
    282282    // Fix up a quirk in the QInputDialog class. If no input happened the string should be empty
    283283    // but it is null. See https://bugs.webkit.org/show_bug.cgi?id=30914.
    284     if (rc && result.isNull())
     284    if (rc && x.isNull())
    285285        result = String("");
    286286    else
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp

    r561 r651  
    616616        }
    617617        webPageClient->setInputMethodHint(Qt::ImhHiddenText, isPasswordField);
    618 #endif
     618#ifdef Q_WS_MAEMO_5
     619        // Maemo 5 MicroB Browser disables auto-uppercase and predictive text, thus, so do we.
     620        webPageClient->setInputMethodHint(Qt::ImhNoAutoUppercase, true);
     621        webPageClient->setInputMethodHint(Qt::ImhNoPredictiveText, true);
     622#endif // Q_WS_MAEMO_5
     623#endif // QT_VERSION check
    619624        webPageClient->setInputMethodEnabled(active);
    620625    }
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp

    r561 r651  
    22    Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
    33    Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
     4    Copyright (C) 2010 Holger Hans Peter Freyther
    45
    56    This library is free software; you can redistribute it and/or
     
    155156
    156157    void originatingObjectInNetworkRequests();
     158    void testJSPrompt();
    157159
    158160private:
     
    17821784}
    17831785
     1786/**
     1787 * Test fixups for https://bugs.webkit.org/show_bug.cgi?id=30914
     1788 *
     1789 * From JS we test the following conditions.
     1790 *
     1791 *   OK     + QString() => SUCCESS, empty string (but not null)
     1792 *   OK     + "text"    => SUCCESS, "text"
     1793 *   CANCEL + QString() => CANCEL, null string
     1794 *   CANCEL + "text"    => CANCEL, null string
     1795 */
     1796class JSPromptPage : public QWebPage {
     1797    Q_OBJECT
     1798public:
     1799    JSPromptPage()
     1800    {}
     1801
     1802    bool javaScriptPrompt(QWebFrame* frame, const QString& msg, const QString& defaultValue, QString* result)
     1803    {
     1804        if (msg == QLatin1String("test1")) {
     1805            *result = QString();
     1806            return true;
     1807        } else if (msg == QLatin1String("test2")) {
     1808            *result = QLatin1String("text");
     1809            return true;
     1810        } else if (msg == QLatin1String("test3")) {
     1811            *result = QString();
     1812            return false;
     1813        } else if (msg == QLatin1String("test4")) {
     1814            *result = QLatin1String("text");
     1815            return false;
     1816        }
     1817
     1818        qFatal("Unknown msg.");
     1819        return QWebPage::javaScriptPrompt(frame, msg, defaultValue, result);
     1820    }
     1821};
     1822
     1823void tst_QWebPage::testJSPrompt()
     1824{
     1825    JSPromptPage page;
     1826    bool res;
     1827
     1828    // OK + QString()
     1829    res = page.mainFrame()->evaluateJavaScript(
     1830            "var retval = prompt('test1');"
     1831            "retval=='' && retval.length == 0;").toBool();
     1832    QVERIFY(res);
     1833
     1834    // OK + "text"
     1835    res = page.mainFrame()->evaluateJavaScript(
     1836            "var retval = prompt('test2');"
     1837            "retval=='text' && retval.length == 4;").toBool();
     1838    QVERIFY(res);
     1839
     1840    // Cancel + QString()
     1841    res = page.mainFrame()->evaluateJavaScript(
     1842            "var retval = prompt('test3');"
     1843            "retval===null;").toBool();
     1844    QVERIFY(res);
     1845
     1846    // Cancel + "text"
     1847    res = page.mainFrame()->evaluateJavaScript(
     1848            "var retval = prompt('test4');"
     1849            "retval===null;").toBool();
     1850    QVERIFY(res);
     1851}
     1852
    17841853QTEST_MAIN(tst_QWebPage)
    17851854#include "tst_qwebpage.moc"
Note: See TracChangeset for help on using the changeset viewer.