Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
20 deleted
62 edited
61 copied

Legend:

Unmodified
Added
Removed
  • trunk

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

    r561 r846  
     12010-06-18  Alexis Menard  <alexis.menard@nokia.com>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        [qt] Better check for the declarative plugin inclusion.
     6
     7        * WebKit.pro:
     8
     92010-03-22  Kevin Decker  <kdecker@apple.com>
     10
     11        Reviewed by Simon Fraser.
     12
     13        https://bugs.webkit.org/show_bug.cgi?id=36328
     14
     15        * WebKit.xcodeproj/project.pbxproj: Remove WebNullPluginView and nullplugin.tiff from the project.
     16
     172010-03-22  Darin Adler  <darin@apple.com>
     18
     19        * StringsNotToBeLocalized.txt: Updated for recent changes.
     20
     212010-03-22  Kevin Decker  <kdecker@apple.com>
     22
     23        Reviewed by John Sullivan.
     24
     25        https://bugs.webkit.org/show_bug.cgi?id=36328
     26
     27        * English.lproj/Localizable.strings: Added "Missing Plug-in" string.
     28
     292010-03-18  Leandro Pereira  <leandro@profusion.mobi>
     30
     31        Reviewed by Kenneth Rohde Christiansen.
     32
     33        Add EFL port files to efl/ewk.
     34        http://webkit.org/b/35931
     35
     36        * efl/ewk/ewk_settings.cpp: Added.
     37        * efl/ewk/ewk_settings.h: Added.
     38
     392010-03-17  Leandro Pereira  <leandro@profusion.mobi>
     40
     41        Reviewed by Kenneth Rohde Christiansen.
     42
     43        Add default theme files to efl/DefaultTheme.
     44        http://webkit.org/b/36240
     45
     46        * efl/DefaultTheme/widget/radio/img_radio_on.png: Added.
     47        * efl/DefaultTheme/radio/img_radio_off_hover.png: Added.
     48        * efl/DefaultTheme/radio/img_radio_on_hover.png: Added.
     49        * efl/DefaultTheme/radio/img_radio_off.png: Added.
     50        * efl/DefaultTheme/radio/img_radio_off_focus.png: Added.
     51        * efl/DefaultTheme/radio/img_radio_on_focus.png: Added.
     52        * efl/DefaultTheme/combo/combo_normal.png: Added.
     53        * efl/DefaultTheme/combo/combo_focus_button.png: Added.
     54        * efl/DefaultTheme/combo/combo_hover_button.png: Added.
     55        * efl/DefaultTheme/combo/combo_hover.png: Added.
     56        * efl/DefaultTheme/combo/combo_focus.png: Added.
     57        * efl/DefaultTheme/combo/combo_press_button.png: Added.
     58        * efl/DefaultTheme/combo/combo_normal_button.png: Added.
     59        * efl/DefaultTheme/combo/combo_press.png: Added.
     60        * efl/DefaultTheme/combo/icon.png: Added.
     61        * efl/DefaultTheme/file/file_normal.png: Added.
     62        * efl/DefaultTheme/file/file_press.png: Added.
     63        * efl/DefaultTheme/file/file_hover.png: Added.
     64        * efl/DefaultTheme/file/file_focus.png: Added.
     65        * efl/DefaultTheme/search/cancel/cancel_normal_button.png: Added.
     66        * efl/DefaultTheme/search/cancel/cancel_normal_button2.png: Added.
     67        * efl/DefaultTheme/search/decoration/decoration_normal_button.png: Added.
     68        * efl/DefaultTheme/search/field/field_focused.png: Added.
     69        * efl/DefaultTheme/search/field/field_normal.png: Added.
     70        * efl/DefaultTheme/search/field/field_hovered.png: Added.
     71        * efl/DefaultTheme/entry/img_normal.png: Added.
     72        * efl/DefaultTheme/entry/img_hovered.png: Added.
     73        * efl/DefaultTheme/entry/img_focused.png: Added.
     74        * efl/DefaultTheme/check/img_check_off_hover.png: Added.
     75        * efl/DefaultTheme/check/img_check_on.png: Added.
     76        * efl/DefaultTheme/check/img_check_off_focus.png: Added.
     77        * efl/DefaultTheme/check/img_check_on_focus.png: Added.
     78        * efl/DefaultTheme/check/img_check_off.png: Added.
     79        * efl/DefaultTheme/check/img_check_on_hover.png: Added.
     80        * efl/DefaultTheme/scrollbar/scrollbar_knob_h.png: Added.
     81        * efl/DefaultTheme/scrollbar/scrollbar_knob_v.png: Added.
     82        * efl/DefaultTheme/scrollbar/scrollbar_hilight.png: Added.
     83        * efl/DefaultTheme/scrollbar/scrollbar_v.png: Added.
     84        * efl/DefaultTheme/scrollbar/scrollbar_h.png: Added.
     85        * efl/DefaultTheme/button/img_button_normal.png: Added.
     86        * efl/DefaultTheme/button/img_button_focus.png: Added.
     87        * efl/DefaultTheme/button/img_button_hover.png: Added.
     88        * efl/DefaultTheme/button/img_button_press.png: Added.
     89
     902010-03-17  Leandro Pereira  <leandro@profusion.mobi>
     91
     92        Reviewed by Kenneth Rohde Christiansen.
     93
     94        Add EFL example browser to efl/EWebLauncher.
     95        http://webkit.org/b/36176
     96
     97        * efl/EWebLauncher/main.c: Added.
     98
     992010-03-16  Leandro Pereira  <leandro@profusion.mobi>
     100
     101        Reviewed by Kenneth Rohde Christiansen.
     102
     103        Add EFL port files to efl/WebCoreSupport.
     104        http://webkit.org/b/35916
     105
     106        * efl/WebCoreSupport/ContextMenuClientEfl.cpp: Added.
     107        * efl/WebCoreSupport/ContextMenuClientEfl.h: Added.
     108
     1092010-03-16  Yury Semikhatsky  <yurys@chromium.org>
     110
     111        Reviewed by Pavel Feldman.
     112
     113        Introduce InspectorFrontendClient that provides InspectorFrontend with an interface to the embedder. InspectorClient now serves as a delegate for InspectorController and does not contain methods for managing inspector frontend window. That allows to create remote InspectorFrontendHost.
     114
     115        Introduce InspectorFrontendClient that would provide InspectorFrontend with an interface to the embedder
     116        https://bugs.webkit.org/show_bug.cgi?id=35036
     117
     118        * efl/WebCoreSupport/InspectorClientEfl.cpp:
     119        (WebCore::InspectorClientEfl::openInspectorFrontend):
     120        * efl/WebCoreSupport/InspectorClientEfl.h:
     121
     1222010-03-13  Leandro Pereira  <leandro@profusion.mobi>
     123
     124        Reviewed by Kenneth Rohde Christiansen.
     125
     126        Add EFL port files to efl/ewk.
     127        http://webkit.org/b/35925
     128
     129        * efl/ewk/ewk_history.cpp: Added.
     130        * efl/ewk/ewk_history.h: Added.
     131
     1322010-03-13  Leandro Pereira  <leandro@profusion.mobi>
     133
     134        Reviewed by Kenneth Rohde Christiansen.
     135
     136        Add EFL port files to efl/ewk.
     137        http://webkit.org/b/35928
     138
     139        * efl/ewk/ewk_main.cpp: Added.
     140        * efl/ewk/ewk_main.h: Added.
     141
     1422010-03-13  Leandro Pereira  <leandro@profusion.mobi>
     143
     144        Reviewed by Kenneth Rohde Christiansen.
     145
     146        Add EFL port files to efl/ewk.
     147        http://webkit.org/b/35924
     148
     149        * efl/ewk/ewk_frame.cpp: Added.
     150        * efl/ewk/ewk_frame.h: Added.
     151
     1522010-03-13  Leandro Pereira  <leandro@profusion.mobi>
     153
     154        Reviewed by Kenneth Rohde Christiansen.
     155
     156        Add EFL port files to efl/ewk.
     157        http://webkit.org/b/35936
     158
     159        * efl/ewk/ewk_view_single.c: Added.
     160
     1612010-03-13  Leandro Pereira  <leandro@profusion.mobi>
     162
     163        Reviewed by Kenneth Rohde Christiansen.
     164
     165        Add EFL port files to efl/ewk.
     166        http://webkit.org/b/35929
     167
     168        * efl/ewk/ewk_util.cpp: Added.
     169        * efl/ewk/ewk_util.h: Added.
     170
     1712010-03-13  Leandro Pereira  <leandro@profusion.mobi>
     172
     173        Reviewed by Kenneth Rohde Christiansen.
     174
     175        Add EFL port files to efl/ewk.
     176        http://webkit.org/b/35934
     177
     178        * efl/ewk/EWebKit.h: Added.
     179        * efl/ewk/ewk_eapi.h: Added.
     180        * efl/ewk/ewk_logging.h: Added.
     181        * efl/ewk/ewk_private.h: Added.
     182
     1832010-03-11  Leandro Pereira  <leandro@profusion.mobi>
     184
     185        Reviewed by Gustavo Noronha Silva.
     186
     187        Add EFL port files to efl/WebCoreSupport.
     188        http://webkit.org/b/35917
     189
     190        * efl/WebCoreSupport/InspectorClientEfl.h: Added.
     191        * efl/WebCoreSupport/InspectorClientEfl.cpp: Added.
     192
     1932010-03-11  Leandro Pereira  <leandro@profusion.mobi>
     194
     195        Reviewed by Gustavo Noronha Silva.
     196
     197        Add EFL port files to efl/WebCoreSupport.
     198        http://webkit.org/b/35914
     199
     200        * efl/WebCoreSupport/DragClientEfl.h: Added.
     201        * efl/WebCoreSupport/DragClientEfl.cpp: Added.
     202
     2032010-03-11  Simon Fraser  <simon.fraser@apple.com>
     204
     205        Reviewed by Mark Rowe.
     206
     207        Sort the project file.
     208
     209        * WebKit.xcodeproj/project.pbxproj:
     210
     2112010-03-10  Leandro Pereira  <leandro@profusion.mobi>
     212
     213        Reviewed by Holger Freyther.
     214
     215        Add EFL port files to efl/WebCoreSupport.
     216        http://webkit.org/b/35913
     217
     218        * efl/WebCoreSupport/ChromeClientEfl.cpp: Added.
     219        * efl/WebCoreSupport/ChromeClientEfl.h: Added.
     220
     2212010-03-09  John Sullivan  <sullivan@apple.com>
     222
     223        Fixed localized string key collision. update-webkit-localized-strings now
     224        runs without errors.
     225
     226        Reviewed by Adam Roben.
     227
     228        * English.lproj/Localizable.strings:
     229        Regenerated.
     230
     2312010-03-09  John Sullivan  <sullivan@apple.com>
     232
     233        * StringsNotToBeLocalized.txt:
     234        Brought this file up to date. update-webkit-localizable-strings still lists
     235        one key collision, but that's a separate issue.
     236
     2372010-03-04  Mark Rowe  <mrowe@apple.com>
     238
     239        Reviewed by Sam Weinig.
     240
     241        Add a script to verify that WebKit framework headers are internally consistent.
     242
     243        * WebKit.xcodeproj/project.pbxproj: Run the script during the build and fail with
     244        an error should the consistency check fail.
     245
     2462010-02-25  Alexey Proskuryakov  <ap@apple.com>
     247
     248        Reviewed by Geoffrey Garen.
     249
     250        https://bugs.webkit.org/show_bug.cgi?id=35394
     251        <rdar://problem/7685262> Make passing objects between Java and plug-ins work
     252
     253        * WebKit.xcodeproj/project.pbxproj: Added new files.
     254
     2552010-02-04  Mark Rowe  <mrowe@apple.com>
     256
     257        Reviewed by Timothy Hatcher.
     258
     259        Build fix.  Remove a symbol corresponding to an inline function from the linker export
     260        file to prevent a weak external failure.
     261
     262        * WebKit.xcodeproj/project.pbxproj: Accommodate rename of script.
     263
     2642010-02-04  John Sullivan  <sullivan@apple.com>
     265
     266        https://bugs.webkit.org/show_bug.cgi?id=34611
     267        WebLocalizedString() could use an assertion that it is being called on the main thread
     268
     269        Reviewed by Tim Hatcher.
     270
     271        * WebKit.xcodeproj/project.pbxproj:
     272        Updated for renamed file (WebLocalizableStrings.m -> WebLocalizableStrings.mm)
     273
     2742010-01-29  Mark Rowe  <mrowe@apple.com>
     275
     276        Sort Xcode projects.
     277
     278        * WebKit.xcodeproj/project.pbxproj:
     279
     2802010-01-19  Dan Bernstein  <mitz@apple.com>
     281
     282        Redo DumpRenderTree build fix without making WebTypesInternal.h a private header
     283
     284        * WebKit.xcodeproj/project.pbxproj:
     285
     2862010-01-19  Simon Fraser  <simon.fraser@apple.com>
     287
     288        Build fix, no review.
     289
     290        Fix build of DumpRenderTree by making the header WebTypesInternal.h Private
     291        in WebKit.
     292
     293        * WebKit.xcodeproj/project.pbxproj:
     294
     2952010-01-19  Jon Honeycutt  <jhoneycutt@apple.com>
     296
     297        MSAA: The child <option> elements of a non-multiple <select> are not
     298        exposed
     299
     300        https://bugs.webkit.org/show_bug.cgi?id=33773
     301        <rdar://problem/7550556>
     302
     303        Reviewed by Alice Liu.
     304
     305        * English.lproj/Localizable.strings:
     306        Add new localized strings.
     307
     3082010-01-13  Kevin Decker  <kdecker@apple.com>
     309
     310        Reviewed by Mark Rowe.
     311
     312        https://bugs.webkit.org/show_bug.cgi?id=33610
     313        <rdar://problem/7288546> Silverlight full screen performance problem seen on Snow Leopard.
     314
     315         * WebKit.xcodeproj/project.pbxproj: Link the project against OpenGL.
     316
     3172009-12-25  Darin Adler  <darin@apple.com>
     318
     319        * StringsNotToBeLocalized.txt: Updated for recent changes.
     320
     3212009-12-18  Dan Bernstein  <mitz@apple.com>
     322
     323        Updated localizable strings after r52368
     324
     325        * English.lproj/Localizable.strings:
     326
     3272009-12-18  Sam Weinig  <sam@webkit.org>
     328
     329        Reviewed by Dan Bernstein.
     330
     331        Add Mac WebKit side of the client based geolocation provider.
     332
     333        * WebKit.xcodeproj/project.pbxproj:
     334
     3352009-12-16  Mark Rowe  <mrowe@apple.com>
     336
     337        Build fix.  Disable debug variants of WebKit frameworks.
     338
     339        * WebKit.xcodeproj/project.pbxproj:
     340
     3412009-12-16  John Sullivan  <sullivan@apple.com>
     342
     343        Brought this file up to date, sans review.
     344
     345        * StringsNotToBeLocalized.txt:
     346
     3472009-11-30  Mark Rowe  <mrowe@apple.com>
     348
     349        Use the correct path to Info.plist to avoid creating an empty file at the top of the WebKit directory.
     350
     351        * WebKit.xcodeproj/project.pbxproj:
     352
     3532009-11-24  Dmitry Titov  <dimich@chromium.org>
     354
     355        Reviewed by Eric Seidel.
     356
     357        Add ENABLE_SHARED_SCRIPT feature define and flag for build-webkit
     358        https://bugs.webkit.org/show_bug.cgi?id=31444
     359
     360        * chromium/features.gypi:
     361
     3622009-11-24  Mark Rowe  <mrowe@apple.com>
     363
     364        Fix production builds where the source tree may be read-only.
     365
     366        * WebKit.xcodeproj/project.pbxproj:
     367
     3682009-11-20  Dave Hyatt  <hyatt@apple.com>
     369
     370        Reviewed by Oliver Hunt and Jon Honeycutt.
     371
     372        Add support for WebSerializedJSValue to WebKit.  This object wraps the SerializedScriptValue functionality in WebCore
     373        and exposes the ability to do JS value serialization/deserialization to WebKit clients.
     374
     375        * WebKit.xcodeproj/project.pbxproj:
     376
     3772009-11-20  Chris Fleizach  <cfleizach@apple.com>
     378
     379        Reviewed by Beth Dakin.
     380
     381        WAI-ARIA: add support for 'math' role
     382        https://bugs.webkit.org/show_bug.cgi?id=31706
     383
     384        * English.lproj/Localizable.strings:
     385        * StringsNotToBeLocalized.txt:
     386
     3872009-11-19  Eric Carlson  <eric.carlson@apple.com>
     388
     389        Reviewed by Dan Bernstein.
     390
     391        <rdar://problem/7035231>
     392        Support closed caption in <video> element
     393
     394        * English.lproj/Localizable.strings:
     395            Add strings for toggle captions button.
     396
     3972009-11-18  Michelangelo De Simone  <micdesim@gmail.com>
     398
     399        Reviewed by Darin Adler.
     400
     401        Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>.
     402        Support for validationMessage attribute, as per HTML5 specs.
     403
     404        * English.lproj/Localizable.strings: new localizable strings
     405
     4062009-11-18  Sam Weinig  <sam@webkit.org>
     407
     408        Reviewed by Anders Carlsson.
     409
     410        Make the Mac Geolocation API async.
     411
     412        * WebKit.xcodeproj/project.pbxproj: Remove WebGeolocation.
     413
     4142009-11-13  Adam Roben  <aroben@apple.com>
     415
     416        Add WebFrameLoadDelegatePrivat.h to WebKit.xcodeproj
     417
     418        Fixes <http://webkit.org/b/31124> Tell the WebFrameLoadDelegate when
     419        window objects in isolated worlds are cleared
     420
     421        Reviewed by Dave Hyatt.
     422
     423        * WebKit.xcodeproj/project.pbxproj: Added
     424        WebFrameLoadDelegatePrivate.h, which already existed.
     425
     4262009-11-12  Adam Roben  <aroben@apple.com>
     427
     428        Replace worldIDs with world objects
     429
     430        Part of <http://webkit.org/b/31414> Implement new SPI for dealing with
     431        user scripts/stylesheets and isolated worlds
     432
     433        Reviewed by Sam Weinig.
     434
     435        * WebKit.xcodeproj/project.pbxproj: Added WebScriptWorld to the project.
     436
     4372009-11-12  Chris Fleizach  <cfleizach@apple.com>
     438
     439        Reviewed by Darin Adler.
     440
     441        ARIA: add alert type roles
     442        https://bugs.webkit.org/show_bug.cgi?id=31392
     443
     444        * English.lproj/Localizable.strings:
     445        * StringsNotToBeLocalized.txt:
     446
     4472009-11-02  Eric Carlson  <eric.carlson@apple.com>
     448
     449        Reviewed by John Sullivan and Mark Rowe.
     450
     451        <rdar://problem/7356733> Voiceover does not read correct media controller time values
     452       
     453        Fix localized strings for media controller time values.
     454
     455        * English.lproj/Localizable.strings:
     456
     4572009-11-02  Chris Fleizach  <cfleizach@apple.com>
     458
     459        Reviewed by Beth Dakin.
     460
     461        Support ARIA "tab" roles
     462        https://bugs.webkit.org/show_bug.cgi?id=30842
     463
     464        Add a localizable string for tab panel.
     465
     466        * English.lproj/Localizable.strings:
     467        * StringsNotToBeLocalized.txt:
     468
    14692009-10-27  Dan Bernstein  <mitz@apple.com>
    2470
  • trunk/src/3rdparty/webkit/WebKit/mac/Configurations/Version.xcconfig

    r561 r846  
    2222// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2323
    24 MAJOR_VERSION = 532;
    25 MINOR_VERSION = 4;
     24MAJOR_VERSION = 533;
     25MINOR_VERSION = 3;
    2626TINY_VERSION = 0;
    2727FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
     
    3232
    3333// The system version prefix is based on the current system version.
    34 SYSTEM_VERSION_PREFIX = $(SYSTEM_VERSION_PREFIX_$(MAC_OS_X_VERSION_MAJOR));
     34SYSTEM_VERSION_PREFIX = $(SYSTEM_VERSION_PREFIX_$(TARGET_MAC_OS_X_VERSION_MAJOR));
    3535SYSTEM_VERSION_PREFIX_ = 4; // Some Tiger versions of Xcode don't set MAC_OS_X_VERSION_MAJOR.
    3636SYSTEM_VERSION_PREFIX_1040 = 4;
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp

    r769 r846  
    2323
    2424#include "qwebframe.h"
     25#include "qwebframe_p.h"
    2526#include "qwebpage.h"
    2627#include "qwebpage_p.h"
    2728#include "QWebPageClient.h"
    28 #include <QtGui/QGraphicsScene>
    29 #include <QtGui/QGraphicsView>
     29#include "FrameView.h"
     30#include "GraphicsContext.h"
     31#include "IntRect.h"
     32#include "TiledBackingStore.h"
     33#include <QtCore/qmetaobject.h>
     34#include <QtCore/qsharedpointer.h>
     35#include <QtCore/qtimer.h>
    3036#include <QtGui/qapplication.h>
     37#include <QtGui/qgraphicsscene.h>
    3138#include <QtGui/qgraphicssceneevent.h>
     39#include <QtGui/qgraphicsview.h>
     40#include <QtGui/qpixmapcache.h>
     41#include <QtGui/qscrollbar.h>
    3242#include <QtGui/qstyleoption.h>
    3343#include <QtGui/qinputcontext.h>
     
    3545#include <QX11Info>
    3646#endif
     47#include <Settings.h>
     48
     49// the overlay is here for one reason only: to have the scroll-bars and other
     50// extra UI elements appear on top of any QGraphicsItems created by CSS compositing layers
     51class QGraphicsWebViewOverlay : public QGraphicsItem {
     52    public:
     53    QGraphicsWebViewOverlay(QGraphicsWebView* view)
     54            :QGraphicsItem(view)
     55            , q(view)
     56    {
     57        setPos(0, 0);
     58#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     59        setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true);
     60#endif
     61        setCacheMode(QGraphicsItem::DeviceCoordinateCache);
     62    }
     63
     64    QRectF boundingRect() const
     65    {
     66        return q->boundingRect();
     67    }
     68
     69    void paint(QPainter* painter, const QStyleOptionGraphicsItem* options, QWidget*)
     70    {
     71        q->page()->mainFrame()->render(painter, static_cast<QWebFrame::RenderLayer>(QWebFrame::AllLayers&(~QWebFrame::ContentsLayer)), options->exposedRect.toRect());
     72    }
     73
     74    friend class QGraphicsWebView;
     75    QGraphicsWebView* q;
     76};
    3777
    3878class QGraphicsWebViewPrivate : public QWebPageClient {
     
    4181        : q(parent)
    4282        , page(0)
    43     {}
     83        , resizesToContents(false)
     84#if USE(ACCELERATED_COMPOSITING)
     85        , shouldSync(false)
     86#endif
     87    {
     88#if USE(ACCELERATED_COMPOSITING)
     89        // the overlay and stays alive for the lifetime of
     90        // this QGraphicsWebView as the scrollbars are needed when there's no compositing
     91        q->setFlag(QGraphicsItem::ItemUsesExtendedStyleOption);
     92        syncMetaMethod = q->metaObject()->method(q->metaObject()->indexOfMethod("syncLayers()"));
     93#endif
     94    }
    4495
    4596    virtual ~QGraphicsWebViewPrivate();
     97
    4698    virtual void scroll(int dx, int dy, const QRect&);
    4799    virtual void update(const QRect& dirtyRect);
     
    60112    virtual int screenNumber() const;
    61113    virtual QWidget* ownerWidget() const;
     114    virtual QRect geometryRelativeToOwnerWidget() const;
    62115
    63116    virtual QObject* pluginParent() const;
    64117
     118    virtual QStyle* style() const;
     119
     120    virtual bool viewResizesToContentsEnabled() const { return resizesToContents; }
     121
     122#if USE(ACCELERATED_COMPOSITING)
     123    virtual void setRootGraphicsLayer(QGraphicsItem* layer);
     124    virtual void markForSync(bool scheduleSync);
     125    void updateCompositingScrollPosition();
     126
     127    // QGraphicsWebView can render composited layers
     128    virtual bool allowsAcceleratedCompositing() const { return true; }
     129#endif
     130
     131    void updateResizesToContentsForPage();
     132    virtual QRectF graphicsItemVisibleRect() const;
     133#if ENABLE(TILED_BACKING_STORE)
     134    void updateTiledBackingStoreScale();
     135#endif
     136
     137    void createOrDeleteOverlay();
     138
     139    void syncLayers();
     140
     141    void unsetPageIfExists();
     142
    65143    void _q_doLoadFinished(bool success);
     144    void _q_contentsSizeChanged(const QSize&);
     145    void _q_scaleChanged();
    66146
    67147    void _q_updateMicroFocus();
     
    70150    QGraphicsWebView* q;
    71151    QWebPage* page;
     152
     153    bool resizesToContents;
     154
     155    // the overlay gets instantiated when the root layer is attached, and get deleted when it's detached
     156    QSharedPointer<QGraphicsWebViewOverlay> overlay;
     157
     158    // we need to put the root graphics layer behind the overlay (which contains the scrollbar)
     159    enum { RootGraphicsLayerZValue, OverlayZValue };
     160
     161#if USE(ACCELERATED_COMPOSITING)
     162    QWeakPointer<QGraphicsObject> rootGraphicsLayer;
     163    // we need to sync the layers if we get a special call from the WebCore
     164    // compositor telling us to do so. We'll get that call from ChromeClientQt
     165    bool shouldSync;
     166
     167    // we have to flush quite often, so we use a meta-method instead of QTimer::singleShot for putting the event in the queue
     168    QMetaMethod syncMetaMethod;
     169#endif
    72170};
    73171
    74172QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate()
    75173{
     174#if USE(ACCELERATED_COMPOSITING)
     175    if (!rootGraphicsLayer)
     176        return;
     177    // we don't need to delete the root graphics layer. The lifecycle is managed in GraphicsLayerQt.cpp.
     178    rootGraphicsLayer.data()->setParentItem(0);
     179    q->scene()->removeItem(rootGraphicsLayer.data());
     180#endif
     181}
     182
     183void QGraphicsWebViewPrivate::createOrDeleteOverlay()
     184{
     185    bool useOverlay = false;
     186    if (!resizesToContents) {
     187#if USE(ACCELERATED_COMPOSITING)
     188        useOverlay = useOverlay || rootGraphicsLayer;
     189#endif
     190#if ENABLE(TILED_BACKING_STORE)
     191        useOverlay = useOverlay || QWebFramePrivate::core(q->page()->mainFrame())->tiledBackingStore();
     192#endif
     193    }
     194    if (useOverlay == !!overlay)
     195        return;
     196    if (useOverlay) {
     197        overlay = QSharedPointer<QGraphicsWebViewOverlay>(new QGraphicsWebViewOverlay(q));
     198        overlay->setZValue(OverlayZValue);
     199    } else
     200        overlay.clear();
     201}
     202
     203#if USE(ACCELERATED_COMPOSITING)
     204void QGraphicsWebViewPrivate::setRootGraphicsLayer(QGraphicsItem* layer)
     205{
     206    if (rootGraphicsLayer) {
     207        rootGraphicsLayer.data()->setParentItem(0);
     208        q->scene()->removeItem(rootGraphicsLayer.data());
     209        QWebFramePrivate::core(q->page()->mainFrame())->view()->syncCompositingStateRecursive();
     210    }
     211
     212    rootGraphicsLayer = layer ? layer->toGraphicsObject() : 0;
     213
     214    if (layer) {
     215        layer->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);
     216        layer->setParentItem(q);
     217        layer->setZValue(RootGraphicsLayerZValue);
     218        updateCompositingScrollPosition();
     219    }
     220    createOrDeleteOverlay();
     221}
     222
     223void QGraphicsWebViewPrivate::markForSync(bool scheduleSync)
     224{
     225    shouldSync = true;
     226    if (scheduleSync)
     227        syncMetaMethod.invoke(q, Qt::QueuedConnection);
     228}
     229
     230void QGraphicsWebViewPrivate::updateCompositingScrollPosition()
     231{
     232    if (rootGraphicsLayer && q->page() && q->page()->mainFrame()) {
     233        const QPoint scrollPosition = q->page()->mainFrame()->scrollPosition();
     234        rootGraphicsLayer.data()->setPos(-scrollPosition);
     235    }
     236}
     237#endif
     238
     239void QGraphicsWebViewPrivate::syncLayers()
     240{
     241#if USE(ACCELERATED_COMPOSITING)
     242    if (shouldSync) {
     243        QWebFramePrivate::core(q->page()->mainFrame())->view()->syncCompositingStateRecursive();
     244        shouldSync = false;
     245    }
     246#endif
    76247}
    77248
     
    108279{
    109280    q->scroll(qreal(dx), qreal(dy), QRectF(rectToScroll));
     281
     282#if USE(ACCELERATED_COMPOSITING)
     283    updateCompositingScrollPosition();
     284#endif
    110285}
    111286
     
    113288{
    114289    q->update(QRectF(dirtyRect));
     290
     291    createOrDeleteOverlay();
     292    if (overlay)
     293        overlay->update(QRectF(dirtyRect));
     294#if USE(ACCELERATED_COMPOSITING)
     295    updateCompositingScrollPosition();
     296    syncLayers();
     297#endif
    115298}
    116299
     
    161344{
    162345#if defined(Q_WS_X11)
    163     const QList<QGraphicsView*> views = q->scene()->views();
    164 
    165     if (!views.isEmpty())
    166         return views.at(0)->x11Info().screen();
     346    if (QGraphicsScene* scene = q->scene()) {
     347        const QList<QGraphicsView*> views = scene->views();
     348
     349        if (!views.isEmpty())
     350            return views.at(0)->x11Info().screen();
     351    }
    167352#endif
    168353
     
    172357QWidget* QGraphicsWebViewPrivate::ownerWidget() const
    173358{
    174     const QList<QGraphicsView*> views = q->scene()->views();
    175     return views.value(0);
     359    if (QGraphicsScene* scene = q->scene()) {
     360        const QList<QGraphicsView*> views = scene->views();
     361        return views.value(0);
     362    }
     363    return 0;
     364}
     365
     366QRect QGraphicsWebViewPrivate::geometryRelativeToOwnerWidget() const
     367{
     368    if (!q->scene())
     369        return QRect();
     370
     371    QList<QGraphicsView*> views = q->scene()->views();
     372    if (views.isEmpty())
     373        return QRect();
     374
     375    QGraphicsView* view = views.at(0);
     376    return view->mapFromScene(q->boundingRect()).boundingRect();
    176377}
    177378
     
    180381    return q;
    181382}
     383
     384QStyle* QGraphicsWebViewPrivate::style() const
     385{
     386    return q->style();
     387}
     388
     389void QGraphicsWebViewPrivate::updateResizesToContentsForPage()
     390{
     391    ASSERT(page);
     392
     393    if (resizesToContents) {
     394        // resizes to contents mode requires preferred contents size to be set
     395        if (!page->preferredContentsSize().isValid())
     396            page->setPreferredContentsSize(QSize(960, 800));
     397
     398#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     399        QObject::connect(page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)),
     400            q, SLOT(_q_contentsSizeChanged(const QSize&)), Qt::UniqueConnection);
     401#else
     402        QObject::connect(page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)),
     403            q, SLOT(_q_contentsSizeChanged(const QSize&)));
     404#endif
     405    } else {
     406        QObject::disconnect(page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)),
     407                         q, SLOT(_q_contentsSizeChanged(const QSize&)));
     408    }
     409}
     410
     411void QGraphicsWebViewPrivate::_q_contentsSizeChanged(const QSize& size)
     412{
     413    if (!resizesToContents)
     414        return;
     415    q->setGeometry(QRectF(q->geometry().topLeft(), size));
     416}
     417
     418void QGraphicsWebViewPrivate::_q_scaleChanged()
     419{
     420#if ENABLE(TILED_BACKING_STORE)
     421    updateTiledBackingStoreScale();
     422#endif
     423}
     424
     425QRectF QGraphicsWebViewPrivate::graphicsItemVisibleRect() const
     426{
     427    if (!q->scene())
     428        return QRectF();
     429    QList<QGraphicsView*> views = q->scene()->views();
     430    if (views.size() > 1) {
     431#ifndef QT_NO_DEBUG_STREAM
     432        qDebug() << "QGraphicsWebView is in more than one graphics views, unable to compute the visible rect";
     433#endif
     434        return QRectF();
     435    }
     436    if (views.size() < 1)
     437        return QRectF();
     438
     439    int xPosition = views[0]->horizontalScrollBar()->value();
     440    int yPosition = views[0]->verticalScrollBar()->value();
     441    return q->mapRectFromScene(QRectF(QPoint(xPosition, yPosition), views[0]->viewport()->size()));
     442}
     443
     444#if ENABLE(TILED_BACKING_STORE)
     445void QGraphicsWebViewPrivate::updateTiledBackingStoreScale()
     446{
     447    if (!page)
     448        return;
     449    WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(page->mainFrame())->tiledBackingStore();
     450    if (!backingStore)
     451        return;
     452    backingStore->setContentsScale(q->scale());
     453}
     454#endif
    182455
    183456/*!
     
    267540    setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true);
    268541#endif
     542    setAcceptDrops(true);
    269543    setAcceptHoverEvents(true);
     544#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     545    setAcceptTouchEvents(true);
     546#endif
    270547    setFocusPolicy(Qt::StrongFocus);
     548    setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);
     549#if ENABLE(TILED_BACKING_STORE)
     550    QObject::connect(this, SIGNAL(scaleChanged()), this, SLOT(_q_scaleChanged()));
     551#endif
    271552}
    272553
     
    318599void QGraphicsWebView::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget*)
    319600{
    320     page()->mainFrame()->render(painter, option->exposedRect.toRect());
     601#if ENABLE(TILED_BACKING_STORE)
     602    if (WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(page()->mainFrame())->tiledBackingStore()) {
     603        // FIXME: We should set the backing store viewport earlier than in paint
     604        backingStore->adjustVisibleRect();
     605        // QWebFrame::render is a public API, bypass it for tiled rendering so behavior does not need to change.
     606        WebCore::GraphicsContext context(painter);
     607        page()->mainFrame()->d->renderFromTiledBackingStore(&context, option->exposedRect.toAlignedRect());
     608        return;
     609    }
     610#endif
     611#if USE(ACCELERATED_COMPOSITING)
     612    page()->mainFrame()->render(painter, d->overlay ? QWebFrame::ContentsLayer : QWebFrame::AllLayers, option->exposedRect.toAlignedRect());
     613#else
     614    page()->mainFrame()->render(painter, QWebFrame::AllLayers, option->exposedRect.toRect());
     615#endif
    321616}
    322617
     
    326621{
    327622    // Re-implemented in order to allows fixing event-related bugs in patch releases.
     623
     624#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     625    if (d->page && (event->type() == QEvent::TouchBegin
     626                || event->type() == QEvent::TouchEnd
     627                || event->type() == QEvent::TouchUpdate)) {
     628        d->page->event(event);
     629        if (event->isAccepted())
     630            return true;
     631    }
     632#endif
     633
    328634    return QGraphicsWidget::sceneEvent(event);
    329635}
     
    392698        {
    393699#ifndef QT_NO_CURSOR
    394 #if QT_VERSION >= 0x040400
    395700            if (event->type() == QEvent::CursorChange) {
    396701                // An unsetCursor will set the cursor to Qt::ArrowCursor.
     
    406711            }
    407712#endif
    408 #endif
    409713        }
    410714    }
    411715    return QGraphicsWidget::event(event);
     716}
     717
     718void QGraphicsWebViewPrivate::unsetPageIfExists()
     719{
     720    if (!page)
     721        return;
     722
     723    // if the page client is the special client constructed for
     724    // delegating the responsibilities to a QWidget, we need
     725    // to destroy it.
     726
     727    if (page->d->client && page->d->client->isQWidgetClient())
     728        delete page->d->client;
     729
     730    page->d->client = 0;
     731
     732    // if the page was created by us, we own it and need to
     733    // destroy it as well.
     734
     735    if (page->parent() == q)
     736        delete page;
     737    else
     738        page->disconnect(q);
    412739}
    413740
     
    426753        return;
    427754
    428     if (d->page) {
    429         d->page->d->client = 0; // unset the page client
    430         if (d->page->parent() == this)
    431             delete d->page;
    432         else
    433             d->page->disconnect(this);
    434     }
    435 
     755    d->unsetPageIfExists();
    436756    d->page = page;
     757
    437758    if (!d->page)
    438759        return;
     760
    439761    d->page->d->client = d; // set the page client
     762
     763    if (d->overlay)
     764        d->overlay->prepareGeometryChange();
    440765
    441766    QSize size = geometry().size().toSize();
    442767    page->setViewportSize(size);
     768
     769    if (d->resizesToContents)
     770        d->updateResizesToContentsForPage();
    443771
    444772    QWebFrame* mainFrame = d->page->mainFrame();
     
    524852/*!
    525853    \property QGraphicsWebView::zoomFactor
    526     \since 4.5
    527854    \brief the zoom factor for the view
    528855*/
     
    545872void QGraphicsWebView::updateGeometry()
    546873{
     874    if (d->overlay)
     875        d->overlay->prepareGeometryChange();
     876
    547877    QGraphicsWidget::updateGeometry();
    548878
     
    559889{
    560890    QGraphicsWidget::setGeometry(rect);
     891
     892    if (d->overlay)
     893        d->overlay->prepareGeometryChange();
    561894
    562895    if (!d->page)
     
    7301063QAction *QGraphicsWebView::pageAction(QWebPage::WebAction action) const
    7311064{
     1065#ifdef QT_NO_ACTION
     1066    Q_UNUSED(action)
     1067    return 0;
     1068#else
    7321069    return page()->action(action);
     1070#endif
    7331071}
    7341072
     
    7651103        return d->page->findText(subString, options);
    7661104    return false;
     1105}
     1106
     1107/*!
     1108    \property QGraphicsWebView::resizesToContents
     1109    \brief whether the size of the QGraphicsWebView and its viewport changes to match the contents size
     1110    \since 4.7
     1111
     1112    If this property is set, the QGraphicsWebView will automatically change its
     1113    size to match the size of the main frame contents. As a result the top level frame
     1114    will never have scrollbars. It will also make CSS fixed positioning to behave like absolute positioning
     1115    with elements positioned relative to the document instead of the viewport.
     1116
     1117    This property should be used in conjunction with the QWebPage::preferredContentsSize property.
     1118    If not explicitly set, the preferredContentsSize is automatically set to a reasonable value.
     1119
     1120    \sa QWebPage::setPreferredContentsSize()
     1121*/
     1122void QGraphicsWebView::setResizesToContents(bool enabled)
     1123{
     1124    if (d->resizesToContents == enabled)
     1125        return;
     1126    d->resizesToContents = enabled;
     1127    if (d->page)
     1128        d->updateResizesToContentsForPage();
     1129}
     1130
     1131bool QGraphicsWebView::resizesToContents() const
     1132{
     1133    return d->resizesToContents;
     1134}
     1135
     1136/*!
     1137    \property QGraphicsWebView::tiledBackingStoreFrozen
     1138    \brief whether the tiled backing store updates its contents
     1139    \since 4.7
     1140
     1141    If the tiled backing store is enabled using QWebSettings::TiledBackingStoreEnabled attribute, this property
     1142    can be used to disable backing store updates temporarily. This can be useful for example for running
     1143    a smooth animation that changes the scale of the QGraphicsWebView.
     1144 
     1145    When the backing store is unfrozen, its contents will be automatically updated to match the current
     1146    state of the document. If the QGraphicsWebView scale was changed, the backing store is also
     1147    re-rendered using the new scale.
     1148 
     1149    If the tiled backing store is not enabled, this property does nothing.
     1150
     1151    \sa QWebSettings::TiledBackingStoreEnabled
     1152    \sa QGraphicsObject::scale
     1153*/
     1154bool QGraphicsWebView::isTiledBackingStoreFrozen() const
     1155{
     1156#if ENABLE(TILED_BACKING_STORE)
     1157    WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(page()->mainFrame())->tiledBackingStore();
     1158    if (!backingStore)
     1159        return false;
     1160    return backingStore->contentsFrozen();
     1161#else
     1162    return false;
     1163#endif
     1164}
     1165
     1166void QGraphicsWebView::setTiledBackingStoreFrozen(bool frozen)
     1167{
     1168#if ENABLE(TILED_BACKING_STORE)
     1169    WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(page()->mainFrame())->tiledBackingStore();
     1170    if (!backingStore)
     1171        return;
     1172    backingStore->setContentsFrozen(frozen);
     1173#else
     1174    UNUSED_PARAM(frozen);
     1175#endif
    7671176}
    7681177
     
    9041313{
    9051314#ifndef QT_NO_DRAGANDDROP
    906     //if (d->page)
    907     //    d->page->event(ev);
    908     //Just remove this line below when the code above is working
    909     Q_UNUSED(ev);
     1315    if (d->page)
     1316        d->page->event(ev);
    9101317#else
    9111318    Q_UNUSED(ev);
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.h

    r769 r846  
    4646
    4747    Q_PROPERTY(bool modified READ isModified)
     48    Q_PROPERTY(bool resizesToContents READ resizesToContents WRITE setResizesToContents)
     49    Q_PROPERTY(bool tiledBackingStoreFrozen READ isTiledBackingStoreFrozen WRITE setTiledBackingStoreFrozen)
    4850
    4951public:
     
    7981
    8082    bool findText(const QString& subString, QWebPage::FindFlags options = 0);
     83
     84    bool resizesToContents() const;
     85    void setResizesToContents(bool enabled);
     86   
     87    bool isTiledBackingStoreFrozen() const;
     88    void setTiledBackingStoreFrozen(bool frozen);
    8189
    8290    virtual void setGeometry(const QRectF& rect);
     
    137145    Q_PRIVATE_SLOT(d, void _q_updateMicroFocus())
    138146    Q_PRIVATE_SLOT(d, void _q_pageDestroyed())
     147    // we don't want to change the moc based on USE() macro, so this function is here
     148    // but will be empty if ACCLERATED_COMPOSITING is disabled
     149    Q_PRIVATE_SLOT(d, void syncLayers())
     150    Q_PRIVATE_SLOT(d, void _q_contentsSizeChanged(const QSize&))
     151    Q_PRIVATE_SLOT(d, void _q_scaleChanged())
    139152
    140153    QGraphicsWebViewPrivate* const d;
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp

    r561 r846  
    4040    databases.
    4141
    42     To get access to all databases defined by a security origin, use QWebSecurityOrigin::databases().
    43     Each database has an internal name(), as well as a user-friendly name, provided by displayName().
     42    Databases are grouped together in security origins. To get access to all databases defined by
     43    a security origin, use QWebSecurityOrigin::databases(). Each database has an internal name(),
     44    as well as a user-friendly name, provided by displayName(). These names are specified when
     45    creating the database in the JavaScript code.
    4446
    4547    WebKit uses SQLite to create and access the local SQL databases. The location of the database
     
    5052    in bytes is returned by size().
    5153
    52     For more information refer to the \l{http://dev.w3.org/html5/webdatabase/}{HTML 5 Draft Standard}.
     54    For more information refer to the \l{http://dev.w3.org/html5/webdatabase/}{HTML5 Web SQL Database Draft Standard}.
    5355
    5456    \sa QWebSecurityOrigin
     
    8183
    8284/*!
    83     Returns the name of the database as seen by the user.
     85    Returns the name of the database in a format that is suitable for display to the user.
    8486*/
    8587QString QWebDatabase::displayName() const
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp

    r561 r846  
    3939#include "PropertyNameArray.h"
    4040#include "RenderImage.h"
    41 #include "ScriptFunctionCall.h"
    4241#include "StaticNodeList.h"
    4342#include "qt_runtime.h"
     
    8685    \snippet webkitsnippets/webelement/main.cpp Traversing with QWebElement
    8786
     87    Individual elements can be inspected or changed using methods such as attribute()
     88    or setAttribute(). For examle, to capture the user's input in a text field for later
     89    use (auto-completion), a browser could do something like this:
     90
     91    \snippet webkitsnippets/webelement/main.cpp autocomplete1
     92
     93    When the same page is later revisited, the browser can fill in the text field automatically
     94    by modifying the value attribute of the input element:
     95
     96    \snippet webkitsnippets/webelement/main.cpp autocomplete2
     97
     98    Another use case is to emulate a click event on an element. The following
     99    code snippet demonstrates how to call the JavaScript DOM method click() of
     100    a submit button:
     101
     102    \snippet webkitsnippets/webelement/main.cpp Calling a DOM element method
     103
    88104    The underlying content of QWebElement is explicitly shared. Creating a copy
    89105    of a QWebElement does not create a copy of the content. Instead, both
    90106    instances point to the same element.
    91 
    92     The element's attributes can be read using attribute() and modified with
    93     setAttribute().
    94107
    95108    The contents of child elements can be converted to plain text with
     
    866879
    867880    QStringList classes =  attribute(QLatin1String("class")).simplified().split(QLatin1Char(' '), QString::SkipEmptyParts);
    868 #if QT_VERSION >= 0x040500
    869881    classes.removeDuplicates();
    870 #else
    871     int n = classes.size();
    872     int j = 0;
    873     QSet<QString> seen;
    874     seen.reserve(n);
    875     for (int i = 0; i < n; ++i) {
    876         const QString& s = classes.at(i);
    877         if (seen.contains(s))
    878             continue;
    879         seen.insert(s);
    880         if (j != i)
    881             classes[j] = s;
    882         ++j;
    883     }
    884     if (n != j)
    885         classes.erase(classes.begin() + j, classes.end());
    886 #endif
    887882    return classes;
    888883}
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h

    r769 r846  
    3131    class Element;
    3232    class Node;
     33}
     34
     35namespace JSC {
     36namespace Bindings {
     37    class QtWebElementRuntime;
     38}
    3339}
    3440
     
    154160    friend class QWebHitTestResultPrivate;
    155161    friend class QWebPage;
     162    friend class JSC::Bindings::QtWebElementRuntime;
    156163
    157164    QWebElementPrivate* d;
     
    256263};
    257264
     265Q_DECLARE_METATYPE(QWebElement)
     266
    258267#endif // QWEBELEMENT_H
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp

    r769 r846  
    2222#include "qwebframe.h"
    2323
     24#include "Bridge.h"
    2425#include "CallFrame.h"
    2526#include "Document.h"
     
    5758#include "SelectionController.h"
    5859#include "SubstituteData.h"
     60#include "SVGSMILElement.h"
     61#include "TiledBackingStore.h"
    5962#include "htmlediting.h"
    6063#include "markup.h"
     
    6770#include "qwebsecurityorigin.h"
    6871#include "qwebsecurityorigin_p.h"
    69 #include "runtime.h"
    7072#include "runtime_object.h"
    7173#include "runtime_root.h"
     
    7880#include <qprinter.h>
    7981#include <qregion.h>
    80 
    81 #if QT_VERSION < 0x040400
    82 #include "qwebnetworkinterface.h"
    83 #endif
    84 
    85 #if QT_VERSION >= 0x040400
    8682#include <qnetworkrequest.h>
    87 #endif
    8883
    8984using namespace WebCore;
     
    9388extern Q_GUI_EXPORT int qt_defaultDpi();
    9489QT_END_NAMESPACE
     90
     91void QWEBKIT_EXPORT qt_drt_setMediaType(QWebFrame* qframe, const QString& type)
     92{
     93    WebCore::Frame* frame = QWebFramePrivate::core(qframe);
     94    WebCore::FrameView* view = frame->view();
     95    view->setMediaType(type);
     96    frame->document()->updateStyleSelector();
     97    view->forceLayout();
     98}
     99
     100bool QWEBKIT_EXPORT qt_drt_hasDocumentElement(QWebFrame* qframe)
     101{
     102    return QWebFramePrivate::core(qframe)->document()->documentElement();
     103}
    95104
    96105void QWEBKIT_EXPORT qt_drt_setJavaScriptProfilingEnabled(QWebFrame* qframe, bool enabled)
     
    151160}
    152161
     162// Pause a given SVG animation on the target node at a specific time.
     163// This method is only intended to be used for testing the SVG animation system.
     164bool QWEBKIT_EXPORT qt_drt_pauseSVGAnimation(QWebFrame *qframe, const QString &animationId, double time, const QString &elementId)
     165{
     166#if !ENABLE(SVG)
     167    return false;
     168#else
     169    Frame* frame = QWebFramePrivate::core(qframe);
     170    if (!frame)
     171        return false;
     172
     173    Document* doc = frame->document();
     174    Q_ASSERT(doc);
     175
     176    if (!doc->svgExtensions())
     177        return false;
     178
     179    Node* coreNode = doc->getElementById(animationId);
     180    if (!coreNode || !SVGSMILElement::isSMILElement(coreNode))
     181        return false;
     182
     183    return doc->accessSVGExtensions()->sampleAnimationAtTime(elementId, static_cast<SVGSMILElement*>(coreNode), time);
     184#endif
     185}
     186
    153187// Returns the total number of currently running animations (includes both CSS transitions and CSS animations).
    154188int QWEBKIT_EXPORT qt_drt_numberOfActiveAnimations(QWebFrame *qframe)
     
    197231}
    198232
     233int QWEBKIT_EXPORT qt_drt_pageNumberForElementById(QWebFrame* qFrame, const QString& id, float width, float height)
     234{
     235    Frame* frame = QWebFramePrivate::core(qFrame);
     236    if (!frame)
     237        return -1;
     238
     239    Element* element = frame->document()->getElementById(AtomicString(id));
     240    if (!element)
     241        return -1;
     242
     243    return PrintContext::pageNumberForElement(element, FloatSize(width, height));
     244}
     245
     246int QWEBKIT_EXPORT qt_drt_numberOfPages(QWebFrame* qFrame, float width, float height)
     247{
     248    Frame* frame = QWebFramePrivate::core(qFrame);
     249    if (!frame)
     250        return -1;
     251
     252    return PrintContext::numberOfPages(frame, FloatSize(width, height));
     253}
     254
    199255// Suspend active DOM objects in this frame.
    200256void QWEBKIT_EXPORT qt_suspendActiveDOMObjects(QWebFrame* qFrame)
     
    212268        frame->document()->resumeActiveDOMObjects();
    213269}                       
     270
     271void QWEBKIT_EXPORT qt_drt_evaluateScriptInIsolatedWorld(QWebFrame* qFrame, int worldId, const QString& script)
     272{
     273    Frame* frame = QWebFramePrivate::core(qFrame);
     274    if (frame)
     275        JSC::JSValue result = frame->script()->executeScriptInWorld(mainThreadNormalWorld(), script, true).jsValue();
     276}
     277
     278bool QWEBKIT_EXPORT qtwebkit_webframe_scrollOverflow(QWebFrame* qFrame, int dx, int dy, const QPoint& pos)
     279{
     280    WebCore::Frame* frame = QWebFramePrivate::core(qFrame);
     281    if (!frame || !frame->document() || !frame->view() || !frame->eventHandler())
     282        return false;
     283
     284    QPoint contentsPos = frame->view()->windowToContents(pos);
     285    Node* node = frame->document()->elementFromPoint(contentsPos.x(), contentsPos.y());
     286    if (!node)
     287        return false;
     288
     289    RenderObject* renderer = node->renderer();
     290    if (!renderer)
     291        return false;
     292
     293    if (renderer->isListBox())
     294        return false;
     295
     296    RenderLayer* renderLayer = renderer->enclosingLayer();
     297    if (!renderLayer)
     298        return false;
     299
     300    bool scrolledHorizontal = false;
     301    bool scrolledVertical = false;
     302
     303    do {
     304        if (dx > 0)
     305            scrolledHorizontal = renderLayer->scroll(ScrollRight, ScrollByPixel, dx);
     306        else if (dx < 0)
     307            scrolledHorizontal = renderLayer->scroll(ScrollLeft, ScrollByPixel, qAbs(dx));
     308
     309        if (dy > 0)
     310            scrolledVertical = renderLayer->scroll(ScrollDown, ScrollByPixel, dy);
     311        else if (dy < 0)
     312            scrolledVertical = renderLayer->scroll(ScrollUp, ScrollByPixel, qAbs(dy));
     313
     314        if (scrolledHorizontal || scrolledVertical)
     315            return true;
     316
     317        renderLayer = renderLayer->parent();
     318    } while (renderLayer);
     319
     320    return false;
     321}
     322
     323
     324/*!
     325  \internal
     326  Scrolls nested frames starting at this frame, \a dx pixels to the right
     327  and \a dy pixels downward. Both \a dx and \a dy may be negative. First attempts
     328  to scroll elements with CSS overflow at position pos, followed by this frame. If this
     329  frame doesn't scroll, attempts to scroll the parent
     330*/
     331void QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int dx, int dy, const QPoint& pos)
     332{
     333    if (!qFrame)
     334        return;
     335
     336    if (qtwebkit_webframe_scrollOverflow(qFrame, dx, dy, pos))
     337        return;
     338
     339    bool scrollHorizontal = false;
     340    bool scrollVertical = false;
     341
     342    do {
     343        if (dx > 0)  // scroll right
     344            scrollHorizontal = qFrame->scrollBarValue(Qt::Horizontal) < qFrame->scrollBarMaximum(Qt::Horizontal);
     345        else if (dx < 0)  // scroll left
     346            scrollHorizontal = qFrame->scrollBarValue(Qt::Horizontal) > qFrame->scrollBarMinimum(Qt::Horizontal);
     347
     348        if (dy > 0)  // scroll down
     349            scrollVertical = qFrame->scrollBarValue(Qt::Vertical) < qFrame->scrollBarMaximum(Qt::Vertical);
     350        else if (dy < 0) //scroll up
     351            scrollVertical = qFrame->scrollBarValue(Qt::Vertical) > qFrame->scrollBarMinimum(Qt::Vertical);
     352
     353        if (scrollHorizontal || scrollVertical) {
     354            qFrame->scroll(dx, dy);
     355            return;
     356        }
     357
     358        qFrame = qFrame->parentFrame();
     359    } while (qFrame);
     360}
     361
    214362
    215363QWebFrameData::QWebFrameData(WebCore::Page* parentPage, WebCore::Frame* parentFrame,
     
    246394}
    247395
     396void QWebFramePrivate::setPage(QWebPage* newPage)
     397{
     398    if (page == newPage)
     399        return;
     400
     401    // The QWebFrame is created as a child of QWebPage or a parent QWebFrame.
     402    // That adds it to QObject's internal children list and ensures it will be
     403    // deleted when parent QWebPage is deleted. Reparent if needed.
     404    if (q->parent() == qobject_cast<QObject*>(page))
     405        q->setParent(newPage);
     406
     407    page = newPage;
     408    emit q->pageChanged();
     409}
     410
    248411WebCore::Scrollbar* QWebFramePrivate::horizontalScrollBar() const
    249412{
     
    260423}
    261424
    262 void QWebFramePrivate::renderPrivate(QPainter *painter, QWebFrame::RenderLayer layer, const QRegion &clip)
    263 {
     425#if ENABLE(TILED_BACKING_STORE)
     426void QWebFramePrivate::renderFromTiledBackingStore(GraphicsContext* context, const QRegion& clip)
     427{
     428    ASSERT(frame->tiledBackingStore());
     429
    264430    if (!frame->view() || !frame->contentRenderer())
    265431        return;
     
    269435        return;
    270436
    271     GraphicsContext context(painter);
    272     if (context.paintingDisabled() && !context.updatingControlTints())
     437    QPainter* painter = context->platformContext();
     438
     439    WebCore::FrameView* view = frame->view();
     440   
     441    int scrollX = view->scrollX();
     442    int scrollY = view->scrollY();
     443    context->translate(-scrollX, -scrollY);
     444
     445    for (int i = 0; i < vector.size(); ++i) {
     446        const QRect& clipRect = vector.at(i);
     447
     448        painter->save();
     449       
     450        QRect rect = clipRect.translated(scrollX, scrollY);
     451        painter->setClipRect(rect, Qt::IntersectClip);
     452
     453        frame->tiledBackingStore()->paint(context, rect);
     454
     455        painter->restore();
     456    }
     457}
     458#endif
     459
     460void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame::RenderLayer layer, const QRegion& clip)
     461{
     462    if (!frame->view() || !frame->contentRenderer())
    273463        return;
     464
     465    QVector<QRect> vector = clip.rects();
     466    if (vector.isEmpty())
     467        return;
     468
     469    QPainter* painter = context->platformContext();
    274470
    275471    WebCore::FrameView* view = frame->view();
     
    278474    for (int i = 0; i < vector.size(); ++i) {
    279475        const QRect& clipRect = vector.at(i);
     476
    280477        QRect intersectedRect = clipRect.intersected(view->frameRect());
    281478
     
    287484
    288485        if (layer & QWebFrame::ContentsLayer) {
    289             context.save();
     486            context->save();
    290487
    291488            int scrollX = view->scrollX();
     
    293490
    294491            QRect rect = intersectedRect;
    295             context.translate(x, y);
     492            context->translate(x, y);
    296493            rect.translate(-x, -y);
    297             context.translate(-scrollX, -scrollY);
     494            context->translate(-scrollX, -scrollY);
    298495            rect.translate(scrollX, scrollY);
    299             context.clip(view->visibleContentRect());
    300 
    301             view->paintContents(&context, rect);
    302 
    303             context.restore();
     496            context->clip(view->visibleContentRect());
     497
     498            view->paintContents(context, rect);
     499
     500            context->restore();
    304501        }
    305502
     
    307504            && !view->scrollbarsSuppressed()
    308505            && (view->horizontalScrollbar() || view->verticalScrollbar())) {
    309             context.save();
     506            context->save();
    310507
    311508            QRect rect = intersectedRect;
    312             context.translate(x, y);
     509            context->translate(x, y);
    313510            rect.translate(-x, -y);
    314511
    315             view->paintScrollbars(&context, rect);
    316 
    317             context.restore();
     512            view->paintScrollbars(context, rect);
     513
     514            context->restore();
    318515        }
    319516
     517#if ENABLE(PAN_SCROLLING)
    320518        if (layer & QWebFrame::PanIconLayer)
    321             view->paintPanScrollIcon(&context);
     519            view->paintPanScrollIcon(context);
     520#endif
    322521
    323522        painter->restore();
    324523    }
    325524}
    326 
    327 bool QWEBKIT_EXPORT qtwebkit_webframe_scrollOverflow(QWebFrame* qFrame, int dx, int dy, const QPoint& pos)
    328 {
    329     WebCore::Frame* frame = QWebFramePrivate::core(qFrame);
    330     if (!frame || !frame->document() || !frame->view() || !frame->eventHandler())
    331         return false;
    332 
    333     QPoint contentsPos = frame->view()->windowToContents(pos);
    334     Node* node = frame->document()->elementFromPoint(contentsPos.x(), contentsPos.y());
    335     if (!node)
    336         return false;
    337 
    338     RenderObject* renderer = node->renderer();
    339     if (!renderer)
    340         return false;
    341 
    342     if (renderer->isListBox())
    343         return false;
    344 
    345     RenderLayer* renderLayer = renderer->enclosingLayer();
    346     if (!renderLayer)
    347         return false;
    348 
    349     bool scrolledHorizontal = false;
    350     bool scrolledVertical = false;
    351 
    352     do {
    353         if (dx > 0)
    354             scrolledHorizontal = renderLayer->scroll(ScrollRight, ScrollByPixel, dx);
    355         else if (dx < 0)
    356             scrolledHorizontal = renderLayer->scroll(ScrollLeft, ScrollByPixel, qAbs(dx));
    357 
    358         if (dy > 0)
    359             scrolledVertical = renderLayer->scroll(ScrollDown, ScrollByPixel, dy);
    360         else if (dy < 0)
    361             scrolledVertical = renderLayer->scroll(ScrollUp, ScrollByPixel, qAbs(dy));
    362 
    363         if (scrolledHorizontal || scrolledVertical)
    364             return true;
    365 
    366         renderLayer = renderLayer->parent();
    367     } while (renderLayer);
    368 
    369     return false;
    370 }
    371 
    372 
    373 
    374 
    375525
    376526/*!
     
    411561    to be notified when a new frame is created.
    412562
    413     The hitTestContent() function can be used to programmatically examine the
    414     contents of a frame.
     563    There are multiple ways to programmatically examine the contents of a frame.
     564    The hitTestContent() function can be used to find elements by coordinate.
     565    For access to the underlying DOM tree, there is documentElement(),
     566    findAllElements() and findFirstElement().
    415567
    416568    A QWebFrame can be printed onto a QPrinter using the print() function.
     
    564716        d->frame->view()->layout();
    565717
    566     return externalRepresentation(d->frame->contentRenderer());
     718    return externalRepresentation(d->frame);
    567719}
    568720
     
    639791    \property QWebFrame::url
    640792    \brief the url of the frame currently viewed
     793
     794    Setting this property clears the view and loads the URL.
     795
     796    By default, this property contains an empty, invalid URL.
    641797
    642798    \sa urlChanged()
     
    736892void QWebFrame::load(const QUrl &url)
    737893{
    738 #if QT_VERSION < 0x040400
    739     load(QWebNetworkRequest(ensureAbsoluteUrl(url)));
    740 #else
    741894    load(QNetworkRequest(ensureAbsoluteUrl(url)));
    742 #endif
    743 }
    744 
    745 #if QT_VERSION < 0x040400
    746 /*!
    747   Loads a network request, \a req, into this frame.
    748 
    749   \note The view remains the same until enough data has arrived to display the new url.
    750 */
    751 void QWebFrame::load(const QWebNetworkRequest &req)
    752 {
    753     if (d->parentFrame())
    754         d->page->d->insideOpenCall = true;
    755 
    756     QUrl url = ensureAbsoluteUrl(req.url());
    757     QHttpRequestHeader httpHeader = req.httpHeader();
    758     QByteArray postData = req.postData();
    759 
    760     WebCore::ResourceRequest request(url);
    761 
    762     QString method = httpHeader.method();
    763     if (!method.isEmpty())
    764         request.setHTTPMethod(method);
    765 
    766     QList<QPair<QString, QString> > values = httpHeader.values();
    767     for (int i = 0; i < values.size(); ++i) {
    768         const QPair<QString, QString> &val = values.at(i);
    769         request.addHTTPHeaderField(val.first, val.second);
    770     }
    771 
    772     if (!postData.isEmpty())
    773         request.setHTTPBody(WebCore::FormData::create(postData.constData(), postData.size()));
    774 
    775     d->frame->loader()->load(request, false);
    776 
    777     if (d->parentFrame())
    778         d->page->d->insideOpenCall = false;
    779 }
    780 
    781 #else
     895}
    782896
    783897/*!
     
    787901  \a body is optional and is only used for POST operations.
    788902
    789   \note The view remains the same until enough data has arrived to display the new \a url.
     903  \note The view remains the same until enough data has arrived to display the new content.
    790904
    791905  \sa setUrl()
     
    839953        d->page->d->insideOpenCall = false;
    840954}
    841 #endif
    842955
    843956/*!
     
    9511064        d->horizontalScrollBarPolicy = policy;
    9521065        if (d->frame->view()) {
    953             d->frame->view()->setHorizontalScrollbarMode((ScrollbarMode)policy);
     1066            d->frame->view()->setHorizontalScrollbarMode((ScrollbarMode)policy, policy != Qt::ScrollBarAsNeeded /* lock */);
     1067            d->frame->view()->updateCanHaveScrollbars();
    9541068        }
    9551069    } else {
    9561070        d->verticalScrollBarPolicy = policy;
    9571071        if (d->frame->view()) {
    958             d->frame->view()->setVerticalScrollbarMode((ScrollbarMode)policy);
     1072            d->frame->view()->setVerticalScrollbarMode((ScrollbarMode)policy, policy != Qt::ScrollBarAsNeeded /* lock */);
     1073            d->frame->view()->updateCanHaveScrollbars();
    9591074        }
    9601075    }
     
    10581173
    10591174/*!
    1060   \internal
    1061   Scrolls nested frames starting at this frame, \a dx pixels to the right
    1062   and \a dy pixels downward. Both \a dx and \a dy may be negative. First attempts
    1063   to scroll elements with CSS overflow at position pos, followed by this frame. If this
    1064   frame doesn't scroll, attempts to scroll the parent
    1065 */
    1066 void QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int dx, int dy, const QPoint& pos)
    1067 {
    1068     if (!qFrame)
    1069         return;
    1070 
    1071     if (qtwebkit_webframe_scrollOverflow(qFrame, dx, dy, pos))
    1072         return;
    1073 
    1074     bool scrollHorizontal = false;
    1075     bool scrollVertical = false;
    1076 
    1077     do {
    1078         if (dx > 0)  // scroll right
    1079             scrollHorizontal = qFrame->scrollBarValue(Qt::Horizontal) < qFrame->scrollBarMaximum(Qt::Horizontal);
    1080         else if (dx < 0)  // scroll left
    1081             scrollHorizontal = qFrame->scrollBarValue(Qt::Horizontal) > qFrame->scrollBarMinimum(Qt::Horizontal);
    1082 
    1083         if (dy > 0)  // scroll down
    1084             scrollVertical = qFrame->scrollBarValue(Qt::Vertical) < qFrame->scrollBarMaximum(Qt::Vertical);
    1085         else if (dy < 0) //scroll up
    1086             scrollVertical = qFrame->scrollBarValue(Qt::Vertical) > qFrame->scrollBarMinimum(Qt::Vertical);
    1087 
    1088         if (scrollHorizontal || scrollVertical) {
    1089             qFrame->scroll(dx, dy);
    1090             return;
    1091         }
    1092 
    1093         qFrame = qFrame->parentFrame();
    1094     } while (qFrame);
    1095 }
    1096 
    1097 /*!
    10981175  \property QWebFrame::scrollPosition
    10991176  \since 4.5
     
    11191196
    11201197/*!
     1198  \since 4.7
     1199  Scrolls the frame to the given \a anchor name.
     1200*/
     1201void QWebFrame::scrollToAnchor(const QString& anchor)
     1202{
     1203    FrameView *view = d->frame->view();
     1204    if (view)
     1205        view->scrollToAnchor(anchor);
     1206}
     1207
     1208/*!
    11211209  \since 4.6
    11221210  Render the \a layer of the frame using \a painter clipping to \a clip.
     
    11271215void QWebFrame::render(QPainter* painter, RenderLayer layer, const QRegion& clip)
    11281216{
     1217    GraphicsContext context(painter);
     1218    if (context.paintingDisabled() && !context.updatingControlTints())
     1219        return;
     1220
    11291221    if (!clip.isEmpty())
    1130         d->renderPrivate(painter, layer, clip);
     1222        d->renderRelativeCoords(&context, layer, clip);
    11311223    else if (d->frame->view())
    1132         d->renderPrivate(painter, layer, QRegion(d->frame->view()->frameRect()));
     1224        d->renderRelativeCoords(&context, layer, QRegion(d->frame->view()->frameRect()));
    11331225}
    11341226
     
    11361228  Render the frame into \a painter clipping to \a clip.
    11371229*/
    1138 void QWebFrame::render(QPainter *painter, const QRegion &clip)
    1139 {
    1140     d->renderPrivate(painter, AllLayers, clip);
     1230void QWebFrame::render(QPainter* painter, const QRegion& clip)
     1231{
     1232    GraphicsContext context(painter);
     1233    if (context.paintingDisabled() && !context.updatingControlTints())
     1234        return;
     1235
     1236    d->renderRelativeCoords(&context, AllLayers, clip);
    11411237}
    11421238
     
    11441240  Render the frame into \a painter.
    11451241*/
    1146 void QWebFrame::render(QPainter *painter)
     1242void QWebFrame::render(QPainter* painter)
    11471243{
    11481244    if (!d->frame->view())
    11491245        return;
    11501246
    1151     d->renderPrivate(painter, AllLayers, QRegion(d->frame->view()->frameRect()));
     1247    GraphicsContext context(painter);
     1248    if (context.paintingDisabled() && !context.updatingControlTints())
     1249        return;
     1250
     1251    d->renderRelativeCoords(&context, AllLayers, QRegion(d->frame->view()->frameRect()));
    11521252}
    11531253
     
    11701270void QWebFrame::setTextSizeMultiplier(qreal factor)
    11711271{
    1172     d->frame->setZoomFactor(factor, /*isTextOnly*/true);
     1272    d->frame->setZoomFactor(factor, ZoomTextOnly);
    11731273}
    11741274
     
    11891289void QWebFrame::setZoomFactor(qreal factor)
    11901290{
    1191     d->frame->setZoomFactor(factor, d->frame->isZoomFactorTextOnly());
     1291    d->frame->setZoomFactor(factor, d->frame->zoomMode());
    11921292}
    11931293
     
    13361436        return;
    13371437
    1338     const qreal zoomFactorX = printer->logicalDpiX() / qt_defaultDpi();
    1339     const qreal zoomFactorY = printer->logicalDpiY() / qt_defaultDpi();
     1438    const qreal zoomFactorX = (qreal)printer->logicalDpiX() / qt_defaultDpi();
     1439    const qreal zoomFactorY = (qreal)printer->logicalDpiY() / qt_defaultDpi();
    13401440
    13411441    PrintContext printContext(d->frame);
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h

    r561 r846  
    2727#include <QtGui/qicon.h>
    2828#include <QtScript/qscriptengine.h>
    29 #if QT_VERSION >= 0x040400
    3029#include <QtNetwork/qnetworkaccessmanager.h>
    31 #endif
    3230#include "qwebkitglobal.h"
    3331
     
    124122
    125123    void load(const QUrl &url);
    126 #if QT_VERSION < 0x040400
    127     void load(const QWebNetworkRequest &request);
    128 #else
    129124    void load(const QNetworkRequest &request,
    130125              QNetworkAccessManager::Operation operation = QNetworkAccessManager::GetOperation,
    131126              const QByteArray &body = QByteArray());
    132 #endif
    133127    void setHtml(const QString &html, const QUrl &baseUrl = QUrl());
    134128    void setContent(const QByteArray &data, const QString &mimeType = QString(), const QUrl &baseUrl = QUrl());
     
    166160    void setScrollPosition(const QPoint &pos);
    167161
     162    void scrollToAnchor(const QString& anchor);
     163
    168164    enum RenderLayer {
    169165        ContentsLayer = 0x10,
     
    223219    void loadFinished(bool ok);
    224220
     221    void pageChanged();
     222
    225223private:
     224    friend class QGraphicsWebView;
    226225    friend class QWebPage;
    227226    friend class QWebPagePrivate;
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h

    r561 r846  
    2626
    2727#include "EventHandler.h"
     28#include "GraphicsContext.h"
    2829#include "KURL.h"
    2930#include "PlatformString.h"
     
    7374        {}
    7475    void init(QWebFrame* qframe, QWebFrameData* frameData);
     76    void setPage(QWebPage*);
    7577
    7678    inline QWebFrame *parentFrame() { return qobject_cast<QWebFrame*>(q->parent()); }
     
    8284    static QWebFrame* kit(WebCore::Frame*);
    8385
    84     void renderPrivate(QPainter*, QWebFrame::RenderLayer, const QRegion& clip);
    85 
    86     bool scrollOverflow(int dx, int dy);
     86    void renderRelativeCoords(WebCore::GraphicsContext*, QWebFrame::RenderLayer, const QRegion& clip);
     87#if ENABLE(TILED_BACKING_STORE)
     88    void renderFromTiledBackingStore(WebCore::GraphicsContext*, const QRegion& clip);
     89#endif
    8790
    8891    QWebFrame *q;
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.cpp

    r561 r846  
    541541            }
    542542            d->lst->removeItem(nullItem);
     543            // Update the HistoryController.
     544            history.d->lst->page()->mainFrame()->loader()->history()->setCurrentItem(history.d->lst->entries()[currentIndex].get());
    543545            history.goToItem(history.itemAt(currentIndex));
    544546        }
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebhistoryinterface.cpp

    r561 r846  
    4242/*!
    4343  Sets a new default interface, \a defaultInterface, that will be used by all of WebKit
    44   for managing history.
     44  to keep track of visited links.
    4545
    4646  If an interface without a parent has already been set, the old interface will be deleted.
     
    6969
    7070/*!
    71   Returns the default interface that will be used by WebKit. If no
    72   default interface has been set, QtWebkit will not track history.
     71  Returns the default interface that will be used by WebKit. If no default interface has been set,
     72  Webkit will not keep track of visited links and a null pointer will be returned.
     73  \sa setDefaultInterface
    7374*/
    7475QWebHistoryInterface* QWebHistoryInterface::defaultInterface()
     
    8586
    8687  The QWebHistoryInterface is an interface that can be used to
    87   implement link history. It contains two pure virtual methods that
    88   are called by the WebKit engine.  addHistoryEntry() is used to add
    89   pages that have been visited to the interface, while
    90   historyContains() is used to query whether this page has been
    91   visited by the user.
     88  keep track of visited links. It contains two pure virtual methods that
     89  are called by the WebKit engine: addHistoryEntry() is used to add
     90  urls that have been visited to the interface, while
     91  historyContains() is used to query whether the given url has been
     92  visited by the user. By default the QWebHistoryInterface is not set, so WebKit does not keep
     93  track of visited links.
     94
     95  \note The history tracked by QWebHistoryInterface is not specific to an instance of QWebPage
     96  but applies to all pages.
    9297*/
    9398
     
    101106
    102107/*!
    103     Destructor.  If this is currently the default interface it will be unset.
     108    Destroys the interface.  If this is currently the default interface it will be unset.
    104109*/
    105110QWebHistoryInterface::~QWebHistoryInterface()
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp

    r561 r846  
    3232    \class QWebInspector
    3333    \since 4.6
     34    \inmodule QtWebKit
    3435    \brief The QWebInspector class allows the placement and control of a
    3536    QWebPage's inspector.
    36     The inspector allows you to see a page current hierarchy and loading
    37     statistics.
    38 
    39     The QWebPage to be inspected is determined with the setPage() method.
     37    The inspector can display a page's hierarchy, its loading statistics and
     38    the current state of its individual elements. It is mostly used by web
     39    developers.
     40
     41    The QWebPage to be inspected must be specified using the setPage() method.
    4042
    4143    A typical use of QWebInspector follows:
    4244
    4345    \snippet webkitsnippets/qtwebkit_qwebinspector_snippet.cpp 0
     46
     47    A QWebInspector can be made visible either programmatically using
     48    setVisible(), or by the user through the attached QWebPage's context
     49    menu.
    4450
    4551    \note A QWebInspector will display a blank widget if either:
     
    6268
    6369    The inspector allows the user to configure some options through its
    64     interface (e.g. the resource tracking "Always enable" option).
    65     These settings are persisted automatically by QtWebKit using QSettings.
    66 
    67     However since the QSettings object is instantiated using the empty
    68     constructor, QCoreApplication::setOrganizationName() and
    69     QCoreApplication::setApplicationName() must be called within your
    70     application to enable the persistence of these options.
    71 */
    72 
    73 /*!
    74     Constructs an empty QWebInspector with parent \a parent.
     70    user interface (e.g. the resource tracking "Always enable" option).
     71    These settings will be persisted automatically by QtWebKit only if
     72    your application previously called QCoreApplication::setOrganizationName()
     73    and QCoreApplication::setApplicationName().
     74    See QSettings's default constructor documentation for an explanation
     75    of why this is necessary.
     76*/
     77
     78/*!
     79    Constructs an unbound QWebInspector with \a parent as its parent.
    7580*/
    7681QWebInspector::QWebInspector(QWidget* parent)
     
    9095
    9196/*!
    92     Sets the QWebPage to be inspected.
    93 
    94     There can only be one QWebInspector associated with a QWebPage
    95     and vices versa.
    96 
    97     Calling with \a page as null will break the current association, if any.
    98 
    99     If \a page is already associated to another QWebInspector, the association
    100     will be replaced and the previous QWebInspector will have no page
    101     associated.
     97    Bind this inspector to the QWebPage to be inspected.
     98
     99    \bold {Notes:}
     100    \list
     101        \o There can only be one QWebInspector associated with a QWebPage
     102           and vice versa.
     103        \o Calling this method with a null \a page will break the current association, if any.
     104        \o If \a page is already associated to another QWebInspector, the association
     105           will be replaced and the previous QWebInspector will become unbound
     106    \endlist
    102107
    103108    \sa page()
     
    140145bool QWebInspector::event(QEvent* ev)
    141146{
    142     if (ev->type() == QEvent::Close && d->page)
    143         d->page->d->inspectorController()->setWindowVisible(false);
    144 
    145147    return QWidget::event(ev);
    146148}
     
    155157void QWebInspector::showEvent(QShowEvent* event)
    156158{
     159#if ENABLE(INSPECTOR)
    157160    // Allows QWebInspector::show() to init the inspector.
    158161    if (d->page)
    159162        d->page->d->inspectorController()->show();
     163#endif
    160164}
    161165
     
    163167void QWebInspector::hideEvent(QHideEvent* event)
    164168{
     169#if ENABLE(INSPECTOR)
     170    if (d->page)
     171        d->page->d->inspectorController()->close();
     172#endif
     173}
     174
     175/*! \reimp */
     176void QWebInspector::closeEvent(QCloseEvent* event)
     177{
     178#if ENABLE(INSPECTOR)
     179    if (d->page)
     180        d->page->d->inspectorController()->close();
     181#endif
    165182}
    166183
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.h

    r561 r846  
    4444    void showEvent(QShowEvent* event);
    4545    void hideEvent(QHideEvent* event);
     46    void closeEvent(QCloseEvent* event);
    4647
    4748private:
     
    5253    friend class QWebPagePrivate;
    5354    friend class WebCore::InspectorClientQt;
     55    friend class WebCore::InspectorFrontendClientQt;
    5456};
    5557#endif
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h

    r561 r846  
    2323#include <QtCore/qglobal.h>
    2424
     25#define QTWEBKIT_VERSION_STR "2.0.2"
     26// QTWEBKIT_VERSION is (major << 16) + (minor << 8) + patch. Similar to Qt.
     27#define QTWEBKIT_VERSION 0x020002
     28// Use: #if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 0, 0)). Similar to Qt.
     29#define QTWEBKIT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch))
     30
    2531#if defined(QT_MAKEDLL)        /* create a Qt DLL library */
    2632#  if defined(BUILD_WEBKIT)
     
    4147#endif
    4248
    43 #if QT_VERSION < 0x040400
    44     #ifndef QT_BEGIN_NAMESPACE
    45     #define QT_BEGIN_NAMESPACE
    46     #endif
    47 
    48     #ifndef QT_END_NAMESPACE
    49     #define QT_END_NAMESPACE
    50     #endif
    51 #endif
    52 
    53 
    5449#endif // QWEBKITGLOBAL_H
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebkitversion.cpp

    r561 r846  
    2323
    2424/*!
     25    \relates QWebPage
     26    \since 4.6
     27    Returns the version number of WebKit at run-time as a string (for
     28    example, "531.3").
    2529
    26     Returns the version number of WebKit at run-time as a string (for
    27     example, "531.3"). This is the version of WebKit the application
    28     was compiled against.
     30    This version is commonly used in WebKit based browsers as part
     31    of the user agent string. Web servers and JavaScript might use
     32    it to identify the presence of certain WebKit engine features
     33    and behaviour.
    2934
     35    The evolution of this version is bound to the releases of Apple's
     36    Safari browser. For a version specific to the QtWebKit library,
     37    see QTWEBKIT_VERSION
     38
     39    \sa QWebPage::userAgentForUrl()
    3040*/
    3141QString qWebKitVersion()
     
    3545
    3646/*!
    37 
     47    \relates QWebPage
     48    \since 4.6
    3849    Returns the 'major' version number of WebKit at run-time as an integer
    3950    (for example, 531). This is the version of WebKit the application
    4051    was compiled against.
    4152
     53    \sa qWebKitVersion()
    4254*/
    4355int qWebKitMajorVersion()
     
    4759
    4860/*!
    49 
     61    \relates QWebPage
     62    \since 4.6
    5063    Returns the 'minor' version number of WebKit at run-time as an integer
    5164    (for example, 3). This is the version of WebKit the application
    5265    was compiled against.
    5366
     67    \sa qWebKitVersion()
    5468*/
    5569int qWebKitMinorVersion()
     
    5771    return WEBKIT_MINOR_VERSION;
    5872}
     73
     74/*!
     75    \macro QTWEBKIT_VERSION
     76    \relates QWebPage
     77
     78    This macro expands a numeric value of the form 0xMMNNPP (MM =
     79    major, NN = minor, PP = patch) that specifies QtWebKit's version
     80    number. For example, if you compile your application against QtWebKit
     81    2.1.2, the QTWEBKIT_VERSION macro will expand to 0x020102.
     82
     83    You can use QTWEBKIT_VERSION to use the latest QtWebKit API where
     84    available.
     85
     86    \sa QT_VERSION
     87*/
     88
     89/*!
     90    \macro QTWEBKIT_VERSION_STR
     91    \relates QWebPage
     92
     93    This macro expands to a string that specifies QtWebKit's version number
     94    (for example, "2.1.2"). This is the version against which the
     95    application is compiled.
     96
     97    \sa QTWEBKIT_VERSION
     98*/
     99
     100/*!
     101    \macro QTWEBKIT_VERSION_CHECK
     102    \relates QWebPage
     103
     104    Turns the major, minor and patch numbers of a version into an
     105    integer, 0xMMNNPP (MM = major, NN = minor, PP = patch). This can
     106    be compared with another similarly processed version id, for example
     107    in a preprocessor statement:
     108
     109    \code
     110    #if QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 1, 0)
     111    // code to use API new in QtWebKit 2.1.0
     112    #endif
     113    \endcode
     114*/
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp

    r799 r846  
    3333#include "qwebkitversion.h"
    3434
     35#include "Chrome.h"
     36#include "ContextMenuController.h"
    3537#include "Frame.h"
    3638#include "FrameTree.h"
     
    5052#include "SecurityOrigin.h"
    5153#include "Settings.h"
     54#include "TiledBackingStore.h"
    5255#include "Page.h"
    5356#include "Pasteboard.h"
     
    8083#include "PageGroup.h"
    8184#include "QWebPageClient.h"
     85#include "WorkerThread.h"
    8286
    8387#include <QApplication>
     
    103107#include <QSysInfo>
    104108#include <QTextCharFormat>
    105 #if QT_VERSION >= 0x040400
     109#include <QTextDocument>
    106110#include <QNetworkAccessManager>
    107111#include <QNetworkRequest>
    108 #else
    109 #include "qwebnetworkinterface.h"
    110 #endif
    111112#if defined(Q_WS_X11)
    112113#include <QX11Info>
     114#endif
     115
     116#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     117#include <QTouchEvent>
     118#include "PlatformTouchEvent.h"
    113119#endif
    114120
     
    127133}
    128134
     135int QWEBKIT_EXPORT qt_drt_workerThreadCount()
     136{
     137#if ENABLE(WORKERS)
     138    return WebCore::WorkerThread::workerThreadCount();
     139#else
     140    return 0;
     141#endif
     142}
     143
    129144bool QWebPagePrivate::drtRun = false;
    130145void QWEBKIT_EXPORT qt_drt_run(bool b)
     
    133148}
    134149
     150void QWEBKIT_EXPORT qt_drt_setFrameFlatteningEnabled(QWebPage* page, bool enabled)
     151{
     152    QWebPagePrivate::core(page)->settings()->setFrameFlatteningEnabled(enabled);
     153}
     154
    135155void QWEBKIT_EXPORT qt_webpage_setGroupName(QWebPage* page, const QString& groupName)
    136156{
     
    141161{
    142162    return page->handle()->page->groupName();
     163}
     164
     165#if ENABLE(INSPECTOR)
     166void QWEBKIT_EXPORT qt_drt_webinspector_executeScript(QWebPage* page, long callId, const QString& script)
     167{
     168    if (!page->handle()->page->inspectorController())
     169        return;
     170    page->handle()->page->inspectorController()->evaluateForTestInFrontend(callId, script);
     171}
     172
     173void QWEBKIT_EXPORT qt_drt_webinspector_close(QWebPage* page)
     174{
     175    if (!page->handle()->page->inspectorController())
     176        return;
     177    page->handle()->page->inspectorController()->close();
     178}
     179
     180void QWEBKIT_EXPORT qt_drt_webinspector_show(QWebPage* page)
     181{
     182    if (!page->handle()->page->inspectorController())
     183        return;
     184    page->handle()->page->inspectorController()->show();
     185}
     186
     187void QWEBKIT_EXPORT qt_drt_setTimelineProfilingEnabled(QWebPage* page, bool enabled)
     188{
     189    InspectorController* controller = page->handle()->page->inspectorController();
     190    if (!controller)
     191        return;
     192    if (enabled)
     193        controller->startTimelineProfiler();
     194    else
     195        controller->stopTimelineProfiler();
     196}
     197#endif
     198
     199void QWEBKIT_EXPORT qt_drt_enableCaretBrowsing(QWebPage* page, bool value)
     200{
     201    page->handle()->page->settings()->setCaretBrowsingEnabled(value);
    143202}
    144203
     
    151210    }
    152211
     212    virtual bool isQWidgetClient() const { return true; }
     213
    153214    virtual void scroll(int dx, int dy, const QRect&);
    154215    virtual void update(const QRect& dirtyRect);
     
    167228    virtual int screenNumber() const;
    168229    virtual QWidget* ownerWidget() const;
     230    virtual QRect geometryRelativeToOwnerWidget() const;
    169231
    170232    virtual QObject* pluginParent() const;
     233
     234    virtual QStyle* style() const;
     235
     236    virtual bool viewResizesToContentsEnabled() const { return false; }
    171237
    172238    QWidget* view;
     
    222288{
    223289#if defined(Q_WS_X11)
    224     if (view)
    225         return view->x11Info().screen();
    226 #endif
    227 
     290    return view->x11Info().screen();
     291#endif
    228292    return 0;
    229293}
     
    234298}
    235299
     300QRect QWebPageWidgetClient::geometryRelativeToOwnerWidget() const
     301{
     302    return view->geometry();
     303}
     304
    236305QObject* QWebPageWidgetClient::pluginParent() const
    237306{
    238307    return view;
     308}
     309
     310QStyle* QWebPageWidgetClient::style() const
     311{
     312    return view->style();
    239313}
    240314
     
    342416    if (actions & Qt::CopyAction)
    343417        result |= DragOperationCopy;
     418    // DragOperationgeneric represents InternetExplorer's equivalent of Move operation,
     419    // hence it should be considered as "move"
    344420    if (actions & Qt::MoveAction)
    345         result |= DragOperationMove;
     421        result |= (DragOperationMove | DragOperationGeneric);
    346422    if (actions & Qt::LinkAction)
    347423        result |= DragOperationLink;
     
    356432    else if (actions & DragOperationMove)
    357433        result = Qt::MoveAction;
     434    // DragOperationgeneric represents InternetExplorer's equivalent of Move operation,
     435    // hence it should be considered as "move"
     436    else if (actions & DragOperationGeneric)
     437        result = Qt::MoveAction;
    358438    else if (actions & DragOperationLink)
    359439        result = Qt::LinkAction;
     
    367447    , view(0)
    368448#endif
     449    , clickCausedFocus(false)
     450    , viewportSize(QSize(0, 0))
    369451    , inspectorFrontend(0)
    370452    , inspector(0)
    371453    , inspectorIsInternalOnly(false)
    372     , viewportSize(QSize(0, 0))
    373     , clickCausedFocus(false)
    374454{
    375455    WebCore::InitializeLoggingChannelsIfNecessary();
    376456    JSC::initializeThreading();
    377457    WebCore::SecurityOrigin::setLocalLoadPolicy(WebCore::SecurityOrigin::AllowLocalLoadsForLocalAndSubstituteData);
     458#if QT_VERSION < QT_VERSION_CHECK(4, 7, 0)
     459    WebCore::Font::setCodePath(WebCore::Font::Complex);
     460#endif
    378461
    379462    chromeClient = new ChromeClientQt(q);
     
    381464    editorClient = new EditorClientQt(q);
    382465    page = new Page(chromeClient, contextMenuClient, editorClient,
    383                     new DragClientQt(q), new InspectorClientQt(q), 0);
     466                    new DragClientQt(q), new InspectorClientQt(q), 0, 0);
    384467
    385468    settings = new QWebSettings(page->settings());
     
    389472#endif
    390473    mainFrame = 0;
    391 #if QT_VERSION < 0x040400
    392     networkInterface = 0;
    393 #else
    394474    networkManager = 0;
    395 #endif
    396475    pluginFactory = 0;
    397476    insideOpenCall = false;
     
    422501}
    423502
    424 #if QT_VERSION < 0x040400
    425 bool QWebPagePrivate::acceptNavigationRequest(QWebFrame *frame, const QWebNetworkRequest &request, QWebPage::NavigationType type)
     503WebCore::Page* QWebPagePrivate::core(QWebPage* page)
     504{
     505    return page->d->page;
     506}
     507
     508QWebPagePrivate* QWebPagePrivate::priv(QWebPage* page)
     509{
     510    return page->d;
     511}
     512
     513bool QWebPagePrivate::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type)
    426514{
    427515    if (insideOpenCall
     
    430518    return q->acceptNavigationRequest(frame, request, type);
    431519}
    432 #else
    433 bool QWebPagePrivate::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type)
    434 {
    435     if (insideOpenCall
    436         && frame == mainFrame)
    437         return true;
    438     return q->acceptNavigationRequest(frame, request, type);
    439 }
    440 #endif
    441520
    442521void QWebPagePrivate::createMainFrame()
     
    474553        case WebCore::ContextMenuItemTagItalic: return QWebPage::ToggleItalic;
    475554        case WebCore::ContextMenuItemTagUnderline: return QWebPage::ToggleUnderline;
     555#if ENABLE(INSPECTOR)
    476556        case WebCore::ContextMenuItemTagInspectElement: return QWebPage::InspectElement;
     557#endif
    477558        default: break;
    478559    }
     
    484565        const QList<WebCore::ContextMenuItem> *items, QBitArray *visitedWebActions)
    485566{
    486     QMenu* menu = new QMenu(q->view());
     567    if (!client)
     568        return 0;
     569
     570    QMenu* menu = new QMenu(client->ownerWidget());
    487571    for (int i = 0; i < items->count(); ++i) {
    488572        const ContextMenuItem &item = items->at(i);
     
    533617#endif // QT_NO_CONTEXTMENU
    534618
     619#ifndef QT_NO_ACTION
    535620void QWebPagePrivate::_q_webActionTriggered(bool checked)
    536621{
     
    541626    q->triggerAction(action, checked);
    542627}
     628#endif // QT_NO_ACTION
    543629
    544630void QWebPagePrivate::_q_cleanupLeakMessages()
     
    552638void QWebPagePrivate::updateAction(QWebPage::WebAction action)
    553639{
     640#ifdef QT_NO_ACTION
     641    Q_UNUSED(action)
     642#else
    554643    QAction *a = actions[action];
    555644    if (!a || !mainFrame)
     
    611700    if (a->isCheckable())
    612701        a->setChecked(checked);
     702#endif // QT_NO_ACTION
    613703}
    614704
     
    682772        tripleClickTimer.stop();
    683773    else
    684         q->QObject::timerEvent(ev);
     774        q->timerEvent(ev);
    685775}
    686776
     
    9921082        { QKeySequence::DeleteStartOfWord, QWebPage::DeleteStartOfWord },
    9931083        { QKeySequence::DeleteEndOfWord, QWebPage::DeleteEndOfWord },
    994 #if QT_VERSION >= 0x040500
    9951084        { QKeySequence::InsertParagraphSeparator, QWebPage::InsertParagraphSeparator },
    9961085        { QKeySequence::InsertLineSeparator, QWebPage::InsertLineSeparator },
    997 #endif
    9981086        { QKeySequence::SelectAll, QWebPage::SelectAll },
    9991087        { QKeySequence::UnknownKey, QWebPage::NoWebAction }
     
    10201108        handled = true;
    10211109        QFont defaultFont;
    1022         if (q->view())
    1023             defaultFont = q->view()->font();
     1110        if (client)
     1111            defaultFont = client->ownerWidget()->font();
    10241112        QFontMetrics fm(defaultFont);
    10251113        if (!handleScrolling(ev, frame)) {
     
    10801168    // focusInEvent() we can re-activate the frame.
    10811169    FocusController *focusController = page->focusController();
     1170    // Call setFocused first so that window.onblur doesn't get called twice
     1171    focusController->setFocused(false);
    10821172    focusController->setActive(false);
    1083     focusController->setFocused(false);
    10841173}
    10851174
     
    10921181    ev->setDropAction(action);
    10931182    if (action != Qt::IgnoreAction)
    1094         ev->accept();
     1183        ev->acceptProposedAction();
    10951184#endif
    10961185}
     
    11031192    Qt::DropAction action = dragOpToDropAction(page->dragController()->dragEntered(&dragData));
    11041193    ev->setDropAction(action);
    1105     if (action != Qt::IgnoreAction)
    1106         ev->accept();
     1194    // We must accept this event in order to receive the drag move events that are sent
     1195    // while the drag and drop action is in progress.
     1196    ev->acceptProposedAction();
    11071197#endif
    11081198}
     
    11341224    ev->setDropAction(action);
    11351225    if (action != Qt::IgnoreAction)
    1136         ev->accept();
     1226        ev->acceptProposedAction();
    11371227#endif
    11381228}
     
    11441234                      dropActionToDragOp(ev->possibleActions()));
    11451235    Qt::DropAction action = dragOpToDropAction(page->dragController()->dragUpdated(&dragData));
     1236    m_lastDropAction = action;
    11461237    ev->setDropAction(action);
    1147     if (action != Qt::IgnoreAction)
    1148         ev->accept();
     1238    // We must accept this event in order to receive the drag move events that are sent
     1239    // while the drag and drop action is in progress.
     1240    ev->acceptProposedAction();
    11491241#endif
    11501242}
     
    11551247    DragData dragData(ev->mimeData(), ev->pos().toPoint(),
    11561248            QCursor::pos(), dropActionToDragOp(ev->possibleActions()));
    1157     Qt::DropAction action = dragOpToDropAction(page->dragController()->performDrag(&dragData));
    1158     if (action != Qt::IgnoreAction)
    1159         ev->accept();
     1249    if (page->dragController()->performDrag(&dragData))
     1250        ev->acceptProposedAction();
    11601251#endif
    11611252}
     
    11641255{
    11651256#ifndef QT_NO_DRAGANDDROP
     1257    // Overwrite the defaults set by QDragManager::defaultAction()
     1258    ev->setDropAction(m_lastDropAction);
    11661259    DragData dragData(ev->mimeData(), ev->pos(), QCursor::pos(),
    1167                       dropActionToDragOp(ev->possibleActions()));
    1168     Qt::DropAction action = dragOpToDropAction(page->dragController()->performDrag(&dragData));
    1169     if (action != Qt::IgnoreAction)
    1170         ev->accept();
     1260                      dropActionToDragOp(Qt::DropAction(ev->dropAction())));
     1261    if (page->dragController()->performDrag(&dragData))
     1262        ev->acceptProposedAction();
    11711263#endif
    11721264}
     
    12091301    WebCore::Frame *frame = page->focusController()->focusedOrMainFrame();
    12101302    WebCore::Editor *editor = frame->editor();
     1303#if QT_VERSION >= 0x040600
     1304    QInputMethodEvent::Attribute selection(QInputMethodEvent::Selection, 0, 0, QVariant());
     1305#endif
    12111306
    12121307    if (!editor->canEdit()) {
     
    12251320
    12261321    Vector<CompositionUnderline> underlines;
     1322    bool hasSelection = false;
    12271323
    12281324    for (int i = 0; i < ev->attributes().size(); ++i) {
     
    12321328            QTextCharFormat textCharFormat = a.value.value<QTextFormat>().toCharFormat();
    12331329            QColor qcolor = textCharFormat.underlineColor();
    1234             underlines.append(CompositionUnderline(a.start, a.length, Color(makeRGBA(qcolor.red(), qcolor.green(), qcolor.blue(), qcolor.alpha())), false));
     1330            underlines.append(CompositionUnderline(qMin(a.start, (a.start + a.length)), qMax(a.start, (a.start + a.length)), Color(makeRGBA(qcolor.red(), qcolor.green(), qcolor.blue(), qcolor.alpha())), false));
    12351331            break;
    12361332        }
    12371333        case QInputMethodEvent::Cursor: {
    1238             frame->setCaretVisible(a.length); //if length is 0 cursor is invisible
     1334            frame->selection()->setCaretVisible(a.length); //if length is 0 cursor is invisible
    12391335            if (a.length > 0) {
    12401336                RenderObject* caretRenderer = frame->selection()->caretRenderer();
     
    12481344#if QT_VERSION >= 0x040600
    12491345        case QInputMethodEvent::Selection: {
    1250             if (renderTextControl) {
    1251                 renderTextControl->setSelectionStart(qMin(a.start, (a.start + a.length)));
    1252                 renderTextControl->setSelectionEnd(qMax(a.start, (a.start + a.length)));
     1346            selection = a;
     1347            hasSelection = true;
     1348            break;
     1349        }
     1350#endif
     1351        }
     1352    }
     1353
     1354    if (renderTextControl && ev->replacementLength() > 0) {
     1355        renderTextControl->setSelectionStart(qMax(renderTextControl->selectionStart() + ev->replacementStart(), 0));
     1356        renderTextControl->setSelectionEnd(qMin(renderTextControl->selectionStart() + ev->replacementLength(), static_cast<int>(renderTextControl->text().length())));
     1357        // Commit regardless of whether commitString is empty, to get rid of selection.
     1358        editor->confirmComposition(ev->commitString());
     1359    } else if (!ev->commitString().isEmpty()) {
     1360        editor->confirmComposition(ev->commitString());
     1361    }
     1362    // 1. empty preedit with a selection attribute, and start/end of 0 cancels composition
     1363    // 2. empty preedit with a selection attribute, and start/end of non-0 updates selection of current preedit text
     1364    // 3. populated preedit with a selection attribute, and start/end of 0 or non-0 updates selection of supplied preedit text
     1365    // 4. otherwise event is updating supplied pre-edit text
     1366    QString preedit = ev->preeditString();
     1367#if QT_VERSION >= 0x040600
     1368    if (hasSelection) {
     1369        QString text = (renderTextControl) ? QString(renderTextControl->text()) : QString();
     1370        if (preedit.isEmpty() && selection.start + selection.length > 0)
     1371            preedit = text;
     1372        editor->setComposition(preedit, underlines,
     1373                               (selection.length < 0) ? selection.start + selection.length : selection.start,
     1374                               (selection.length < 0) ? selection.start : selection.start + selection.length);
     1375    } else
     1376#endif
     1377        editor->setComposition(preedit, underlines, preedit.length(), 0);
     1378
     1379    ev->accept();
     1380}
     1381
     1382#ifndef QT_NO_PROPERTIES
     1383typedef struct {
     1384    const char* name;
     1385    double deferredRepaintDelay;
     1386    double initialDeferredRepaintDelayDuringLoading;
     1387    double maxDeferredRepaintDelayDuringLoading;
     1388    double deferredRepaintDelayIncrementDuringLoading;
     1389} QRepaintThrottlingPreset;
     1390
     1391void QWebPagePrivate::dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent* event)
     1392{
     1393    if (event->propertyName() == "_q_viewMode") {
     1394        QString mode = q->property("_q_viewMode").toString();
     1395        if (mode != viewMode) {
     1396            viewMode = mode;
     1397            WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame());
     1398            WebCore::FrameView* view = frame->view();
     1399            frame->document()->updateStyleSelector();
     1400            view->forceLayout();
     1401        }
     1402    } else if (event->propertyName() == "_q_HTMLTokenizerChunkSize") {
     1403        int chunkSize = q->property("_q_HTMLTokenizerChunkSize").toInt();
     1404        q->handle()->page->setCustomHTMLTokenizerChunkSize(chunkSize);
     1405    } else if (event->propertyName() == "_q_HTMLTokenizerTimeDelay") {
     1406        double timeDelay = q->property("_q_HTMLTokenizerTimeDelay").toDouble();
     1407        q->handle()->page->setCustomHTMLTokenizerTimeDelay(timeDelay);
     1408    } else if (event->propertyName() == "_q_RepaintThrottlingDeferredRepaintDelay") {
     1409        double p = q->property("_q_RepaintThrottlingDeferredRepaintDelay").toDouble();
     1410        FrameView::setRepaintThrottlingDeferredRepaintDelay(p);
     1411    } else if (event->propertyName() == "_q_RepaintThrottlingnInitialDeferredRepaintDelayDuringLoading") {
     1412        double p = q->property("_q_RepaintThrottlingnInitialDeferredRepaintDelayDuringLoading").toDouble();
     1413        FrameView::setRepaintThrottlingnInitialDeferredRepaintDelayDuringLoading(p);
     1414    } else if (event->propertyName() == "_q_RepaintThrottlingMaxDeferredRepaintDelayDuringLoading") {
     1415        double p = q->property("_q_RepaintThrottlingMaxDeferredRepaintDelayDuringLoading").toDouble();
     1416        FrameView::setRepaintThrottlingMaxDeferredRepaintDelayDuringLoading(p);
     1417    } else if (event->propertyName() == "_q_RepaintThrottlingDeferredRepaintDelayIncrementDuringLoading") {
     1418        double p = q->property("_q_RepaintThrottlingDeferredRepaintDelayIncrementDuringLoading").toDouble();
     1419        FrameView::setRepaintThrottlingDeferredRepaintDelayIncrementDuringLoading(p);
     1420    } else if (event->propertyName() == "_q_RepaintThrottlingPreset") {
     1421        static const QRepaintThrottlingPreset presets[] = {
     1422            {   "NoThrottling",     0,      0,      0,      0 },
     1423            {   "Legacy",       0.025,      0,    2.5,    0.5 },
     1424            {   "Minimal",       0.01,      0,      1,    0.2 },
     1425            {   "Medium",       0.025,      1,      5,    0.5 },
     1426            {   "Heavy",          0.1,      2,     10,      1 }
     1427        };
     1428
     1429        QString p = q->property("_q_RepaintThrottlingPreset").toString();
     1430        for(int i = 0; i < sizeof(presets) / sizeof(presets[0]); i++) {
     1431            if(p == presets[i].name) {
     1432                FrameView::setRepaintThrottlingDeferredRepaintDelay(
     1433                        presets[i].deferredRepaintDelay);
     1434                FrameView::setRepaintThrottlingnInitialDeferredRepaintDelayDuringLoading(
     1435                        presets[i].initialDeferredRepaintDelayDuringLoading);
     1436                FrameView::setRepaintThrottlingMaxDeferredRepaintDelayDuringLoading(
     1437                        presets[i].maxDeferredRepaintDelayDuringLoading);
     1438                FrameView::setRepaintThrottlingDeferredRepaintDelayIncrementDuringLoading(
     1439                        presets[i].deferredRepaintDelayIncrementDuringLoading);
     1440                break;
    12531441            }
    1254             break;
    12551442        }
    1256 #endif
    1257         }
    1258     }
    1259 
    1260     if (!ev->commitString().isEmpty())
    1261         editor->confirmComposition(ev->commitString());
    1262     else if (!ev->preeditString().isEmpty()) {
    1263         QString preedit = ev->preeditString();
    1264         editor->setComposition(preedit, underlines, preedit.length(), 0);
    1265     }
    1266     ev->accept();
    1267 }
     1443    }
     1444#if ENABLE(TILED_BACKING_STORE)
     1445    else if (event->propertyName() == "_q_TiledBackingStoreTileSize") {
     1446        WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame());
     1447        if (!frame->tiledBackingStore())
     1448            return;
     1449        QSize tileSize = q->property("_q_TiledBackingStoreTileSize").toSize();
     1450        frame->tiledBackingStore()->setTileSize(tileSize);
     1451    } else if (event->propertyName() == "_q_TiledBackingStoreTileCreationDelay") {
     1452        WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame());
     1453        if (!frame->tiledBackingStore())
     1454            return;
     1455        int tileCreationDelay = q->property("_q_TiledBackingStoreTileCreationDelay").toInt();
     1456        frame->tiledBackingStore()->setTileCreationDelay(static_cast<double>(tileCreationDelay) / 1000.);
     1457    } else if (event->propertyName() == "_q_TiledBackingStoreKeepAreaMultiplier") {
     1458        WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame());
     1459        if (!frame->tiledBackingStore())
     1460            return;
     1461        FloatSize keepMultiplier;
     1462        FloatSize coverMultiplier;
     1463        frame->tiledBackingStore()->getKeepAndCoverAreaMultipliers(keepMultiplier, coverMultiplier);
     1464        QSizeF qSize = q->property("_q_TiledBackingStoreKeepAreaMultiplier").toSizeF();
     1465        keepMultiplier = FloatSize(qSize.width(), qSize.height());
     1466        frame->tiledBackingStore()->setKeepAndCoverAreaMultipliers(keepMultiplier, coverMultiplier);
     1467    } else if (event->propertyName() == "_q_TiledBackingStoreCoverAreaMultiplier") {
     1468        WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame());
     1469        if (!frame->tiledBackingStore())
     1470            return;
     1471        FloatSize keepMultiplier;
     1472        FloatSize coverMultiplier;
     1473        frame->tiledBackingStore()->getKeepAndCoverAreaMultipliers(keepMultiplier, coverMultiplier);
     1474        QSizeF qSize = q->property("_q_TiledBackingStoreCoverAreaMultiplier").toSizeF();
     1475        coverMultiplier = FloatSize(qSize.width(), qSize.height());
     1476        frame->tiledBackingStore()->setKeepAndCoverAreaMultipliers(keepMultiplier, coverMultiplier);
     1477    }
     1478#endif
     1479}
     1480#endif
    12681481
    12691482void QWebPagePrivate::shortcutOverrideEvent(QKeyEvent* event)
     
    13141527        direction = ScrollDown;
    13151528    } else if (ev == QKeySequence::MoveToPreviousPage
    1316                || (ev->key() == Qt::Key_Space) && (ev->modifiers() & Qt::ShiftModifier)) {
     1529               || ((ev->key() == Qt::Key_Space) && (ev->modifiers() & Qt::ShiftModifier))) {
    13171530        granularity = ScrollByPage;
    13181531        direction = ScrollUp;
    13191532    } else
    13201533#endif // QT_NO_SHORTCUT
    1321     if (ev->key() == Qt::Key_Up && ev->modifiers() & Qt::ControlModifier
     1534    if ((ev->key() == Qt::Key_Up && ev->modifiers() & Qt::ControlModifier)
    13221535               || ev->key() == Qt::Key_Home) {
    13231536        granularity = ScrollByDocument;
    13241537        direction = ScrollUp;
    1325     } else if (ev->key() == Qt::Key_Down && ev->modifiers() & Qt::ControlModifier
     1538    } else if ((ev->key() == Qt::Key_Down && ev->modifiers() & Qt::ControlModifier)
    13261539               || ev->key() == Qt::Key_End) {
    13271540        granularity = ScrollByDocument;
     
    13531566}
    13541567
     1568#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     1569void QWebPagePrivate::touchEvent(QTouchEvent* event)
     1570{
     1571    WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
     1572    if (!frame->view())
     1573        return;
     1574
     1575    bool accepted = frame->eventHandler()->handleTouchEvent(PlatformTouchEvent(event));
     1576    event->setAccepted(accepted);
     1577}
     1578#endif
     1579
    13551580/*!
    13561581  This method is used by the input method to query a set of properties of the page
     
    13811606    switch (property) {
    13821607        case Qt::ImMicroFocus: {
    1383             return QVariant(frame->selection()->absoluteCaretBounds());
     1608            WebCore::FrameView* view = frame->view();
     1609            if (view && view->needsLayout()) {
     1610                // We can't access absoluteCaretBounds() while the view needs to layout.
     1611                return QVariant();
     1612            }
     1613            return QVariant(view->contentsToWindow(frame->selection()->absoluteCaretBounds()));
    13841614        }
    13851615        case Qt::ImFont: {
     
    13961626                    return QVariant(renderTextControl->selectionEnd() - TextIterator::rangeLength(range.get()));
    13971627                }
    1398                 return QVariant(renderTextControl->selectionEnd());
     1628                return QVariant(frame->selection()->extent().offsetInContainerNode());
    13991629            }
    14001630            return QVariant();
     
    14281658                    return QVariant(renderTextControl->selectionStart() - TextIterator::rangeLength(range.get()));
    14291659                }
    1430                 return QVariant(renderTextControl->selectionStart());
     1660                return QVariant(frame->selection()->base().offsetInContainerNode());
    14311661            }
    14321662            return QVariant();
     
    14791709QWebInspector* QWebPagePrivate::getOrCreateInspector()
    14801710{
     1711#if ENABLE(INSPECTOR)
    14811712    if (!inspector) {
    14821713        QWebInspector* insp = new QWebInspector;
     
    14861717        Q_ASSERT(inspector); // Associated through QWebInspector::setPage(q)
    14871718    }
     1719#endif
    14881720    return inspector;
    14891721}
     
    14921724InspectorController* QWebPagePrivate::inspectorController()
    14931725{
     1726#if ENABLE(INSPECTOR)
    14941727    return page->inspectorController();
     1728#else
     1729    return 0;
     1730#endif
    14951731}
    14961732
     
    14991735   \enum QWebPage::FindFlag
    15001736
    1501    This enum describes the options available to QWebPage's findText() function. The options
     1737   This enum describes the options available to the findText() function. The options
    15021738   can be OR-ed together from the following list:
    15031739
     
    15201756    local filesystem or an equivalent - such as the Qt resource system - then linkClicked() is emitted.
    15211757    \value DelegateAllLinks Whenever a link is activated the linkClicked() signal is emitted.
     1758
     1759    \sa QWebPage::linkDelegationPolicy
    15221760*/
    15231761
     
    15341772    \value NavigationTypeFormResubmitted An HTML form was submitted a second time.
    15351773    \value NavigationTypeOther A navigation to another document using a method not listed above.
     1774
     1775    \sa acceptNavigationRequest()
    15361776*/
    15371777
     
    15431783    Actions only have an effect when they are applicable. The availability of
    15441784    actions can be be determined by checking \l{QAction::}{isEnabled()} on the
    1545     action returned by \l{QWebPage::}{action()}.
     1785    action returned by action().
    15461786
    15471787    One method of enabling the text editing, cursor movement, and text selection actions
     
    15601800    \value Forward Navigate forward in the history of navigated links.
    15611801    \value Stop Stop loading the current page.
     1802    \value StopScheduledPageRefresh Stop all pending page refresh/redirect requests.
    15621803    \value Reload Reload the current page.
    15631804    \value ReloadAndBypassCache Reload the current page, but do not use any local cache. (Added in Qt 4.6)
     
    16251866    \enum QWebPage::WebWindowType
    16261867
     1868    This enum describes the types of window that can be created by the createWindow() function.
     1869
    16271870    \value WebBrowserWindow The window is a regular web browser window.
    16281871    \value WebModalDialog The window acts as modal dialog.
     
    16411884
    16421885    QWebPage's API is very similar to QWebView, as you are still provided with
    1643     common functions like action() (known as \l{QWebView::}{pageAction()} in
    1644     QWebView), triggerAction(), findText() and settings(). More QWebView-like
    1645     functions can be found in the main frame of QWebPage, obtained via
    1646     QWebPage::mainFrame(). For example, the load(), setUrl() and setHtml()
    1647     unctions for QWebPage can be accessed using QWebFrame.
     1886    common functions like action() (known as
     1887    \l{QWebView::pageAction()}{pageAction}() in QWebView), triggerAction(),
     1888    findText() and settings(). More QWebView-like functions can be found in the
     1889    main frame of QWebPage, obtained via the mainFrame() function. For example,
     1890    the \l{QWebFrame::load()}{load}(), \l{QWebFrame::setUrl()}{setUrl}() and
     1891    \l{QWebFrame::setHtml()}{setHtml}() functions for QWebPage can be accessed
     1892    using QWebFrame.
    16481893
    16491894    The loadStarted() signal is emitted when the page begins to load.The
    16501895    loadProgress() signal, on the other hand, is emitted whenever an element
    16511896    of the web page completes loading, such as an embedded image, a script,
    1652     etc. Finally, the loadFinished() signal is emitted when the page has
    1653     loaded completely. Its argument, either true or false, indicates whether
    1654     or not the load operation succeeded.
     1897    etc. Finally, the loadFinished() signal is emitted when the page contents
     1898    are loaded completely, independent of script execution or page rendering.
     1899    Its argument, either true or false, indicates whether or not the load
     1900    operation succeeded.
    16551901
    16561902    \section1 Using QWebPage in a Widget-less Environment
     
    16921938    , d(new QWebPagePrivate(this))
    16931939{
    1694     setView(qobject_cast<QWidget *>(parent));
     1940    setView(qobject_cast<QWidget*>(parent));
    16951941
    16961942    connect(this, SIGNAL(loadProgress(int)), this, SLOT(_q_onLoadProgressChanged(int)));
     
    17491995    \since 4.6
    17501996
    1751     Returns the frame at the given point \a pos.
     1997    Returns the frame at the given point \a pos, or 0 if there is no frame at
     1998    that position.
    17521999
    17532000    \sa mainFrame(), currentFrame()
     
    17762023    \sa view()
    17772024*/
    1778 void QWebPage::setView(QWidget *view)
    1779 {
    1780     if (this->view() != view) {
    1781         d->view = view;
    1782         if (!view) {
    1783             delete d->client;
    1784             d->client = 0;
    1785         } else {
    1786             if (!d->client)
    1787                 d->client = new QWebPageWidgetClient(view);
    1788             else
    1789                 static_cast<QWebPageWidgetClient*>(d->client)->view = view;
    1790         }
    1791         setViewportSize(view ? view->size() : QSize(0, 0));
    1792     }
     2025void QWebPage::setView(QWidget* view)
     2026{
     2027    if (this->view() == view)
     2028        return;
     2029
     2030    d->view = view;
     2031    setViewportSize(view ? view->size() : QSize(0, 0));
     2032
     2033    // If we have no client, we install a special client delegating
     2034    // the responsibility to the QWidget. This is the code path
     2035    // handling a.o. the "legacy" QWebView.
     2036    //
     2037    // If such a special delegate already exist, we substitute the view.
     2038
     2039    if (d->client) {
     2040        if (d->client->isQWidgetClient())
     2041            static_cast<QWebPageWidgetClient*>(d->client)->view = view;
     2042        return;
     2043    }
     2044
     2045    if (view)
     2046        d->client = new QWebPageWidgetClient(view);
    17932047}
    17942048
     
    18312085    Q_UNUSED(frame)
    18322086#ifndef QT_NO_MESSAGEBOX
    1833     QMessageBox::information(view(), tr("JavaScript Alert - %1").arg(mainFrame()->url().host()), msg, QMessageBox::Ok);
     2087    QWidget* parent = (d->client) ? d->client->ownerWidget() : 0;
     2088    QMessageBox::information(parent, tr("JavaScript Alert - %1").arg(mainFrame()->url().host()), Qt::escape(msg), QMessageBox::Ok);
    18342089#endif
    18352090}
     
    18472102    return true;
    18482103#else
    1849     return QMessageBox::Yes == QMessageBox::information(view(), tr("JavaScript Confirm - %1").arg(mainFrame()->url().host()), msg, QMessageBox::Yes, QMessageBox::No);
     2104    QWidget* parent = (d->client) ? d->client->ownerWidget() : 0;
     2105    return QMessageBox::Yes == QMessageBox::information(parent, tr("JavaScript Confirm - %1").arg(mainFrame()->url().host()), Qt::escape(msg), QMessageBox::Yes, QMessageBox::No);
    18502106#endif
    18512107}
     
    18592115    user, the implementation should return true and the result string must not be null.
    18602116
    1861     The default implementation uses QInputDialog::getText.
     2117    The default implementation uses QInputDialog::getText().
    18622118*/
    18632119bool QWebPage::javaScriptPrompt(QWebFrame *frame, const QString& msg, const QString& defaultValue, QString* result)
     
    18662122    bool ok = false;
    18672123#ifndef QT_NO_INPUTDIALOG
    1868     QString x = QInputDialog::getText(view(), tr("JavaScript Prompt - %1").arg(mainFrame()->url().host()), msg, QLineEdit::Normal, defaultValue, &ok);
     2124    QWidget* parent = (d->client) ? d->client->ownerWidget() : 0;
     2125    QString x = QInputDialog::getText(parent, tr("JavaScript Prompt - %1").arg(mainFrame()->url().host()), Qt::escape(msg), QLineEdit::Normal, defaultValue, &ok);
    18692126    if (ok && result)
    18702127        *result = x;
     
    18912148    return false;
    18922149#else
    1893     return QMessageBox::Yes == QMessageBox::information(view(), tr("JavaScript Problem - %1").arg(mainFrame()->url().host()), tr("The script on this page appears to have a problem. Do you want to stop the script?"), QMessageBox::Yes, QMessageBox::No);
     2150    QWidget* parent = (d->client) ? d->client->ownerWidget() : 0;
     2151    return QMessageBox::Yes == QMessageBox::information(parent, tr("JavaScript Problem - %1").arg(mainFrame()->url().host()), tr("The script on this page appears to have a problem. Do you want to stop the script?"), QMessageBox::Yes, QMessageBox::No);
    18942152#endif
    18952153}
     
    19042162    the request to QWebView's createWindow() function; otherwise it returns a null pointer.
    19052163
     2164    If \a type is WebModalDialog, the application must call setWindowModality(Qt::ApplicationModal) on the new window.
     2165
    19062166    \sa acceptNavigationRequest()
    19072167*/
    19082168QWebPage *QWebPage::createWindow(WebWindowType type)
    19092169{
    1910     QWebView *webView = qobject_cast<QWebView *>(view());
     2170    QWebView *webView = qobject_cast<QWebView*>(view());
    19112171    if (webView) {
    19122172        QWebView *newView = webView->createWindow(type);
     
    19182178
    19192179/*!
    1920     This function is called whenever WebKit encounters a HTML object element with type "application/x-qt-plugin".
    1921     The \a classid, \a url, \a paramNames and \a paramValues correspond to the HTML object element attributes and
    1922     child elements to configure the embeddable object.
     2180    This function is called whenever WebKit encounters a HTML object element with type "application/x-qt-plugin". It is
     2181    called regardless of the value of QWebSettings::PluginsEnabled. The \a classid, \a url, \a paramNames and \a paramValues
     2182    correspond to the HTML object element attributes and child elements to configure the embeddable object.
    19232183*/
    19242184QObject *QWebPage::createPlugin(const QString &classid, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues)
     
    19442204                frameLoadRequest(url, frame), features))
    19452205            newPage->chrome()->show();
     2206    }
     2207}
     2208
     2209static void collectChildFrames(QWebFrame* frame, QList<QWebFrame*>& list)
     2210{
     2211    list << frame->childFrames();
     2212    QListIterator<QWebFrame*> it(frame->childFrames());
     2213    while (it.hasNext()) {
     2214        collectChildFrames(it.next(), list);
    19462215    }
    19472216}
     
    20342303            break;
    20352304        case InspectElement: {
     2305#if ENABLE(INSPECTOR)
    20362306            if (!d->hitTestResult.isNull()) {
    20372307                d->getOrCreateInspector(); // Make sure the inspector is created
     
    20392309                d->page->inspectorController()->inspect(d->hitTestResult.d->innerNonSharedNode.get());
    20402310            }
     2311#endif
     2312            break;
     2313        }
     2314        case StopScheduledPageRefresh: {
     2315            QWebFrame* topFrame = mainFrame();
     2316            topFrame->d->frame->redirectScheduler()->cancel();
     2317            QList<QWebFrame*> childFrames;
     2318            collectChildFrames(topFrame, childFrames);
     2319            QListIterator<QWebFrame*> it(childFrames);
     2320            while (it.hasNext())
     2321                it.next()->d->frame->redirectScheduler()->cancel();
    20412322            break;
    20422323        }
     
    20672348    By default, for a newly-created Web page, this property contains a size with
    20682349    zero width and height.
     2350
     2351    \sa QWebFrame::render(), preferredContentsSize
    20692352*/
    20702353void QWebPage::setViewportSize(const QSize &size) const
     
    20762359        WebCore::FrameView* view = frame->d->frame->view();
    20772360        view->setFrameRect(QRect(QPoint(0, 0), size));
    2078         view->forceLayout();
    20792361        view->adjustViewSize();
    20802362    }
     
    20962378    \property QWebPage::preferredContentsSize
    20972379    \since 4.6
    2098     \brief the size of the fixed layout
    2099 
    2100     The size affects the layout of the page in the viewport.  If set to a fixed size of
    2101     1024x768 for example then webkit will layout the page as if the viewport were that size
    2102     rather than something different.
     2380    \brief the preferred size of the contents
     2381
     2382    If this property is set to a valid size, it is used to lay out the page.
     2383    If it is not set (the default), the viewport size is used instead.
     2384
     2385    \sa viewportSize
    21032386*/
    21042387void QWebPage::setPreferredContentsSize(const QSize &size) const
     
    21352418    \sa createWindow()
    21362419*/
    2137 #if QT_VERSION >= 0x040400
    21382420bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type)
    2139 #else
    2140 bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QWebNetworkRequest &request, QWebPage::NavigationType type)
    2141 #endif
    21422421{
    21432422    Q_UNUSED(frame)
     
    21752454}
    21762455
     2456#ifndef QT_NO_ACTION
    21772457/*!
    21782458   Returns a QAction for the specified WebAction \a action.
     
    21942474    QString text;
    21952475    QIcon icon;
    2196     QStyle *style = view() ? view()->style() : qApp->style();
     2476    QStyle *style = d->client ? d->client->style() : qApp->style();
    21972477    bool checkable = false;
    21982478
     
    22272507        case Back:
    22282508            text = contextMenuItemTagGoBack();
    2229 #if QT_VERSION >= 0x040400
    22302509            icon = style->standardIcon(QStyle::SP_ArrowBack);
    2231 #endif
    22322510            break;
    22332511        case Forward:
    22342512            text = contextMenuItemTagGoForward();
    2235 #if QT_VERSION >= 0x040400
    22362513            icon = style->standardIcon(QStyle::SP_ArrowForward);
    2237 #endif
    22382514            break;
    22392515        case Stop:
    22402516            text = contextMenuItemTagStop();
    2241 #if QT_VERSION >= 0x040400
    22422517            icon = style->standardIcon(QStyle::SP_BrowserStop);
    2243 #endif
    22442518            break;
    22452519        case Reload:
    22462520            text = contextMenuItemTagReload();
    2247 #if QT_VERSION >= 0x040400
    22482521            icon = style->standardIcon(QStyle::SP_BrowserReload);
    2249 #endif
    22502522            break;
    22512523
     
    24552727    return a;
    24562728}
     2729#endif // QT_NO_ACTION
    24572730
    24582731/*!
    24592732    \property QWebPage::modified
    2460     \brief whether the page contains unsubmitted form data
     2733    \brief whether the page contains unsubmitted form data, or the contents have been changed.
    24612734
    24622735    By default, this property is false.
     2736
     2737    \sa contentsChanged(), contentEditable, undoStack()
    24632738*/
    24642739bool QWebPage::isModified() const
     
    24762751/*!
    24772752    Returns a pointer to the undo stack used for editable content.
     2753
     2754    \sa modified
    24782755*/
    24792756QUndoStack *QWebPage::undoStack() const
     
    25802857        d->leaveEvent(ev);
    25812858        break;
     2859#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     2860    case QEvent::TouchBegin:
     2861    case QEvent::TouchUpdate:
     2862    case QEvent::TouchEnd:
     2863        d->touchEvent(static_cast<QTouchEvent*>(ev));
     2864        break;
     2865#endif
     2866#ifndef QT_NO_PROPERTIES
     2867    case QEvent::DynamicPropertyChange:
     2868        d->dynamicPropertyChangeEvent(static_cast<QDynamicPropertyChangeEvent*>(ev));
     2869        break;
     2870#endif
    25822871    default:
    25832872        return QObject::event(ev);
     
    25882877
    25892878/*!
    2590     Similar to QWidget::focusNextPrevChild it focuses the next focusable web element
     2879    Similar to QWidget::focusNextPrevChild() it focuses the next focusable web element
    25912880    if \a next is true; otherwise the previous element is focused.
    25922881
     
    26152904    cursor. If disabled (the default) only HTML elements in the web page with their
    26162905    \c{contenteditable} attribute set are editable.
     2906
     2907    \sa modified, contentsChanged(), WebAction
    26172908*/
    26182909void QWebPage::setContentEditable(bool editable)
     
    27173008void QWebPage::updatePositionDependentActions(const QPoint &pos)
    27183009{
     3010#ifndef QT_NO_ACTION
    27193011    // First we disable all actions, but keep track of which ones were originally enabled.
    27203012    QBitArray originallyEnabledWebActions(QWebPage::WebActionCount);
     
    27263018        }
    27273019    }
     3020#endif // QT_NO_ACTION
    27283021
    27293022    d->createMainFrame();
     
    27373030    WebCore::ContextMenu menu(result);
    27383031    menu.populate();
     3032   
     3033#if ENABLE(INSPECTOR)
    27393034    if (d->page->inspectorController()->enabled())
    27403035        menu.addInspectElementItem();
     3036#endif
    27413037
    27423038    QBitArray visitedWebActions(QWebPage::WebActionCount);
     
    27493045#endif // QT_NO_CONTEXTMENU
    27503046
     3047#ifndef QT_NO_ACTION
    27513048    // Finally, we restore the original enablement for the actions that were not put into the menu.
    27523049    originallyEnabledWebActions &= ~visitedWebActions; // Mask out visited actions (they're part of the menu)
     
    27573054        }
    27583055    }
     3056#endif // QT_NO_ACTION
    27593057
    27603058    // This whole process ensures that any actions put into to the context menu has the right
     
    27773075    file selection is allowed.
    27783076
    2779     \omitvalue ErrorPageExtension (introduced in Qt 4.6)
     3077    \value ErrorPageExtension Whether the web page can provide an error page when loading fails.
     3078    (introduced in Qt 4.6)
     3079
     3080    \sa ChooseMultipleFilesExtensionOption, ChooseMultipleFilesExtensionReturn, ErrorPageExtensionOption, ErrorPageExtensionReturn
    27803081*/
    27813082
     
    27833084    \enum QWebPage::ErrorDomain
    27843085    \since 4.6
    2785     \internal
    2786 
    2787     \value QtNetwork
    2788     \value Http
    2789     \value WebKit
     3086
     3087    This enum describes the domain of an ErrorPageExtensionOption object (i.e. the layer in which the error occurred).
     3088
     3089    \value QtNetwork The error occurred in the QtNetwork layer; the error code is of type QNetworkReply::NetworkError.
     3090    \value Http The error occurred in the HTTP layer; the error code is a HTTP status code (see QNetworkRequest::HttpStatusCodeAttribute).
     3091    \value WebKit The error is an internal WebKit error.
    27903092*/
    27913093
     
    27973099    \inmodule QtWebKit
    27983100
    2799     \sa QWebPage::extension()
     3101    \sa QWebPage::extension() QWebPage::ExtensionReturn
     3102*/
     3103
     3104
     3105/*!
     3106    \class QWebPage::ExtensionReturn
     3107    \since 4.4
     3108    \brief The ExtensionReturn class provides an output result from a QWebPage's extension.
     3109
     3110    \inmodule QtWebKit
     3111
     3112    \sa QWebPage::extension() QWebPage::ExtensionOption
    28003113*/
    28013114
     
    28083121    \inmodule QtWebKit
    28093122
    2810     The ErrorPageExtensionOption class holds the \a url for which an error occoured as well as
     3123    The ErrorPageExtensionOption class holds the \a url for which an error occurred as well as
    28113124    the associated \a frame.
    28123125
    28133126    The error itself is reported by an error \a domain, the \a error code as well as \a errorString.
    28143127
    2815     \sa QWebPage::ErrorPageExtensionReturn
     3128    \sa QWebPage::extension() QWebPage::ErrorPageExtensionReturn
     3129*/
     3130
     3131/*!
     3132    \variable QWebPage::ErrorPageExtensionOption::url
     3133    \brief the url for which an error occurred
     3134*/
     3135
     3136/*!
     3137    \variable QWebPage::ErrorPageExtensionOption::frame
     3138    \brief the frame associated with the error
     3139*/
     3140
     3141/*!
     3142    \variable QWebPage::ErrorPageExtensionOption::domain
     3143    \brief the domain that reported the error
     3144*/
     3145
     3146/*!
     3147    \variable QWebPage::ErrorPageExtensionOption::error
     3148    \brief the error code. Interpretation of the value depends on the \a domain
     3149    \sa QWebPage::ErrorDomain
     3150*/
     3151
     3152/*!
     3153    \variable QWebPage::ErrorPageExtensionOption::errorString
     3154    \brief a string that describes the error
    28163155*/
    28173156
     
    28343173    \a baseUrl.
    28353174
    2836     \sa QWebPage::ErrorPageExtensionOption, QString::toUtf8()
     3175    \sa QWebPage::extension() QWebPage::ErrorPageExtensionOption, QString::toUtf8()
    28373176*/
    28383177
     
    28413180
    28423181    Constructs a new error page object.
     3182*/
     3183
     3184
     3185/*!
     3186    \variable QWebPage::ErrorPageExtensionReturn::contentType
     3187    \brief the error page's content type
     3188*/
     3189
     3190/*!
     3191    \variable QWebPage::ErrorPageExtensionReturn::encoding
     3192    \brief the error page encoding
     3193*/
     3194
     3195/*!
     3196    \variable QWebPage::ErrorPageExtensionReturn::baseUrl
     3197    \brief the base url
     3198
     3199    External objects such as stylesheets or images referenced in the HTML are located relative to this url.
     3200*/
     3201
     3202/*!
     3203    \variable QWebPage::ErrorPageExtensionReturn::content
     3204    \brief the HTML content of the error page
    28433205*/
    28443206
     
    28543216    and the suggested filenames which might be provided.
    28553217
    2856     \sa QWebPage::chooseFile(), QWebPage::ChooseMultipleFilesExtensionReturn
     3218    \sa QWebPage::extension() QWebPage::chooseFile(), QWebPage::ChooseMultipleFilesExtensionReturn
     3219*/
     3220
     3221/*!
     3222    \variable QWebPage::ChooseMultipleFilesExtensionOption::parentFrame
     3223    \brief The frame in which the request originated
     3224*/
     3225
     3226/*!
     3227    \variable QWebPage::ChooseMultipleFilesExtensionOption::suggestedFileNames
     3228    \brief The suggested filenames
     3229*/
     3230
     3231/*!
     3232    \variable QWebPage::ChooseMultipleFilesExtensionReturn::fileNames
     3233    \brief The selected filenames
    28573234*/
    28583235
     
    28683245    when the extension is invoked.
    28693246
    2870     \sa QWebPage::ChooseMultipleFilesExtensionOption
     3247    \sa QWebPage::extension() QWebPage::ChooseMultipleFilesExtensionOption
    28713248*/
    28723249
     
    28753252    argument is provided as input to the extension; the output results can be stored in \a output.
    28763253
    2877     The behavior of this function is determined by \a extension.
     3254    The behavior of this function is determined by \a extension. The \a option
     3255    and \a output values are typically casted to the corresponding types (for
     3256    example, ChooseMultipleFilesExtensionOption and
     3257    ChooseMultipleFilesExtensionReturn for ChooseMultipleFilesExtension).
    28783258
    28793259    You can call supportsExtension() to check if an extension is supported by the page.
     
    28893269        // FIXME: do not ignore suggestedFiles
    28903270        QStringList suggestedFiles = static_cast<const ChooseMultipleFilesExtensionOption*>(option)->suggestedFileNames;
    2891         QStringList names = QFileDialog::getOpenFileNames(view(), QString::null);
     3271        QWidget* parent = (d->client) ? d->client->ownerWidget() : 0;
     3272        QStringList names = QFileDialog::getOpenFileNames(parent, QString::null);
    28923273        static_cast<ChooseMultipleFilesExtensionReturn*>(output)->fileNames = names;
    28933274        return true;
     
    29403321            return d->page->markAllMatchesForText(subString, caseSensitivity, true, 0);
    29413322    } else {
     3323        if (subString.isEmpty()) {
     3324            d->page->mainFrame()->selection()->clear();
     3325            Frame* frame = d->page->mainFrame()->tree()->firstChild();
     3326            while (frame) {
     3327                frame->selection()->clear();
     3328                frame = frame->tree()->traverseNextWithWrap(false);
     3329            }
     3330        }
    29423331        ::FindDirection direction = ::FindDirectionForward;
    29433332        if (options & FindBackward)
     
    29663355    A suggested filename may be provided in \a suggestedFile. The frame originating the
    29673356    request is provided as \a parentFrame.
     3357
     3358    \sa ChooseMultipleFilesExtension
    29683359*/
    29693360QString QWebPage::chooseFile(QWebFrame *parentFrame, const QString& suggestedFile)
     
    29713362    Q_UNUSED(parentFrame)
    29723363#ifndef QT_NO_FILEDIALOG
    2973     return QFileDialog::getOpenFileName(view(), QString::null, suggestedFile);
     3364    QWidget* parent = (d->client) ? d->client->ownerWidget() : 0;
     3365    return QFileDialog::getOpenFileName(parent, QString::null, suggestedFile);
    29743366#else
    29753367    return QString::null;
    29763368#endif
    29773369}
    2978 
    2979 #if QT_VERSION < 0x040400 && !defined qdoc
    2980 
    2981 void QWebPage::setNetworkInterface(QWebNetworkInterface *interface)
    2982 {
    2983     d->networkInterface = interface;
    2984 }
    2985 
    2986 QWebNetworkInterface *QWebPage::networkInterface() const
    2987 {
    2988     if (d->networkInterface)
    2989         return d->networkInterface;
    2990     else
    2991         return QWebNetworkInterface::defaultInterface();
    2992 }
    2993 
    2994 #ifndef QT_NO_NETWORKPROXY
    2995 void QWebPage::setNetworkProxy(const QNetworkProxy& proxy)
    2996 {
    2997     d->networkProxy = proxy;
    2998 }
    2999 
    3000 QNetworkProxy QWebPage::networkProxy() const
    3001 {
    3002     return d->networkProxy;
    3003 }
    3004 #endif
    3005 
    3006 #else
    30073370
    30083371/*!
     
    30383401    return d->networkManager;
    30393402}
    3040 
    3041 #endif
    30423403
    30433404/*!
     
    30853446    \endlist
    30863447*/
    3087 QString QWebPage::userAgentForUrl(const QUrl& url) const
    3088 {
    3089     Q_UNUSED(url)
    3090     QString ua = QLatin1String("Mozilla/5.0 ("
     3448QString QWebPage::userAgentForUrl(const QUrl&) const
     3449{
     3450    // splitting the string in three and user QStringBuilder is better than using QString::arg()
     3451    static QString firstPart;
     3452    static QString secondPart;
     3453    static QString thirdPart;
     3454
     3455    if (firstPart.isNull() || secondPart.isNull() || thirdPart.isNull()) {
     3456        QString firstPartTemp;
     3457        firstPartTemp.reserve(150);
     3458        firstPartTemp += QString::fromLatin1("Mozilla/5.0 ("
    30913459
    30923460    // Platform
    30933461#ifdef Q_WS_MAC
    3094     "Macintosh"
     3462        "Macintosh"
    30953463#elif defined Q_WS_QWS
    3096     "QtEmbedded"
     3464        "QtEmbedded"
    30973465#elif defined Q_WS_WIN
    3098     "Windows"
     3466        "Windows"
    30993467#elif defined Q_WS_X11
    3100     "X11"
     3468        "X11"
    31013469#elif defined Q_OS_SYMBIAN
    3102     "Symbian"
     3470        "Symbian"
    31033471#elif defined Q_OS_OS2
    3104     "OS/2"
     3472        "OS/2"
    31053473#else
    3106     "Unknown"
    3107 #endif
    3108     // Placeholder for Platform Version
    3109     "%1; "
    3110 
    3111     // Placeholder for security strength (N or U)
    3112     "%2; "
    3113 
    3114     // Subplatform"
     3474        "Unknown"
     3475#endif
     3476    );
     3477
     3478#if defined Q_OS_SYMBIAN
     3479        QSysInfo::SymbianVersion symbianVersion = QSysInfo::symbianVersion();
     3480        switch (symbianVersion) {
     3481        case QSysInfo::SV_9_2:
     3482            firstPartTemp += QString::fromLatin1("OS/9.2");
     3483            break;
     3484        case QSysInfo::SV_9_3:
     3485            firstPartTemp += QString::fromLatin1("OS/9.3");
     3486            break;               
     3487        case QSysInfo::SV_9_4:
     3488            firstPartTemp += QString::fromLatin1("OS/9.4");
     3489            break;
     3490        case QSysInfo::SV_SF_2:
     3491            firstPartTemp += QString::fromLatin1("/2");
     3492            break;
     3493        case QSysInfo::SV_SF_3:
     3494            firstPartTemp += QString::fromLatin1("/3");
     3495            break;
     3496        case QSysInfo::SV_SF_4:
     3497            firstPartTemp += QString::fromLatin1("/4");
     3498        default:
     3499            break;
     3500        }
     3501#endif
     3502
     3503        firstPartTemp += QString::fromLatin1("; ");
     3504
     3505        // SSL support
     3506#if !defined(QT_NO_OPENSSL)
     3507        // we could check QSslSocket::supportsSsl() here, but this makes
     3508        // OpenSSL, certificates etc being loaded in all cases were QWebPage
     3509        // is used. This loading is not needed for non-https.
     3510        firstPartTemp += QString::fromLatin1("U; ");
     3511        // this may lead to a false positive: We indicate SSL since it is
     3512        // compiled in even though supportsSsl() might return false
     3513#else
     3514        firstPartTemp += QString::fromLatin1("N; ");
     3515#endif
     3516
     3517        // Operating system
    31153518#ifdef Q_OS_AIX
    3116     "AIX"
     3519        firstPartTemp += QString::fromLatin1("AIX");
    31173520#elif defined Q_OS_WIN32
    3118     "%3"
     3521
     3522        switch (QSysInfo::WindowsVersion) {
     3523        case QSysInfo::WV_32s:
     3524            firstPartTemp += QString::fromLatin1("Windows 3.1");
     3525            break;
     3526        case QSysInfo::WV_95:
     3527            firstPartTemp += QString::fromLatin1("Windows 95");
     3528            break;
     3529        case QSysInfo::WV_98:
     3530            firstPartTemp += QString::fromLatin1("Windows 98");
     3531            break;
     3532        case QSysInfo::WV_Me:
     3533            firstPartTemp += QString::fromLatin1("Windows 98; Win 9x 4.90");
     3534            break;
     3535        case QSysInfo::WV_NT:
     3536            firstPartTemp += QString::fromLatin1("WinNT4.0");
     3537            break;
     3538        case QSysInfo::WV_2000:
     3539            firstPartTemp += QString::fromLatin1("Windows NT 5.0");
     3540            break;
     3541        case QSysInfo::WV_XP:
     3542            firstPartTemp += QString::fromLatin1("Windows NT 5.1");
     3543            break;
     3544        case QSysInfo::WV_2003:
     3545            firstPartTemp += QString::fromLatin1("Windows NT 5.2");
     3546            break;
     3547        case QSysInfo::WV_VISTA:
     3548            firstPartTemp += QString::fromLatin1("Windows NT 6.0");
     3549            break;
     3550         case QSysInfo::WV_WINDOWS7:
     3551            firstPartTemp += QString::fromLatin1("Windows NT 6.1");
     3552            break;
     3553         case QSysInfo::WV_CE:
     3554            firstPartTemp += QString::fromLatin1("Windows CE");
     3555            break;
     3556         case QSysInfo::WV_CENET:
     3557            firstPartTemp += QString::fromLatin1("Windows CE .NET");
     3558            break;
     3559         case QSysInfo::WV_CE_5:
     3560            firstPartTemp += QString::fromLatin1("Windows CE 5.x");
     3561            break;
     3562         case QSysInfo::WV_CE_6:
     3563            firstPartTemp += QString::fromLatin1("Windows CE 6.x");
     3564            break;
     3565        }
     3566
     3567#elifif defined Q_OS_OS2
     3568        switch (QSysInfo::os2Version()) {
     3569        default:
     3570        case QSysInfo::OV_Unknown:
     3571            firstPartTemp += QLatin1String("Unknown"); break;
     3572        case QSysInfo::OV_2_0:
     3573            firstPartTemp += QLatin1String("2.0"); break;
     3574        case QSysInfo::OV_2_1:
     3575            firstPartTemp += QLatin1String("2.1"); break;
     3576        case QSysInfo::OV_2_11:
     3577            firstPartTemp += QLatin1String("2.11"); break;
     3578        case QSysInfo::OV_3_0:
     3579            firstPartTemp += QLatin1String("Warp 3"); break;
     3580        case QSysInfo::OV_4_0:
     3581            firstPartTemp += QLatin1String("Warp 4"); break;
     3582        case QSysInfo::OV_4_5:
     3583            firstPartTemp += QLatin1String("Warp 4.5"); break;
     3584        case QSysInfo::OV_4_52:
     3585            firstPartTemp += QLatin1String("Warp 4.52"); break;
     3586        case QSysInfo::OV_ECS_Unknown:
     3587            firstPartTemp += QLatin1String("eCS"); break;
     3588        case QSysInfo::OV_ECS_1_0:
     3589            firstPartTemp += QLatin1String("eCS 1.0"); break;
     3590        case QSysInfo::OV_ECS_1_1:
     3591            firstPartTemp += QLatin1String("eCS 1.1"); break;
     3592        case QSysInfo::OV_ECS_1_2:
     3593            firstPartTemp += QLatin1String("eCS 1.2"); break;
     3594        case QSysInfo::OV_ECS_2_0:
     3595            firstPartTemp += QLatin1String("eCS 2.0"); break;
     3596        }
     3597
    31193598#elif defined Q_OS_DARWIN
    31203599#ifdef __i386__ || __x86_64__
    3121     "Intel Mac OS X"
     3600        firstPartTemp += QString::fromLatin1("Intel Mac OS X");
    31223601#else
    3123     "PPC Mac OS X"
     3602        firstPartTemp += QString::fromLatin1("PPC Mac OS X");
    31243603#endif
    31253604
    31263605#elif defined Q_OS_BSDI
    3127     "BSD"
     3606        firstPartTemp += QString::fromLatin1("BSD");
    31283607#elif defined Q_OS_BSD4
    3129     "BSD Four"
     3608        firstPartTemp += QString::fromLatin1("BSD Four");
    31303609#elif defined Q_OS_CYGWIN
    3131     "Cygwin"
     3610        firstPartTemp += QString::fromLatin1("Cygwin");
    31323611#elif defined Q_OS_DGUX
    3133     "DG/UX"
     3612        firstPartTemp += QString::fromLatin1("DG/UX");
    31343613#elif defined Q_OS_DYNIX
    3135     "DYNIX/ptx"
     3614        firstPartTemp += QString::fromLatin1("DYNIX/ptx");
    31363615#elif defined Q_OS_FREEBSD
    3137     "FreeBSD"
     3616        firstPartTemp += QString::fromLatin1("FreeBSD");
    31383617#elif defined Q_OS_HPUX
    3139     "HP-UX"
     3618        firstPartTemp += QString::fromLatin1("HP-UX");
    31403619#elif defined Q_OS_HURD
    3141     "GNU Hurd"
     3620        firstPartTemp += QString::fromLatin1("GNU Hurd");
    31423621#elif defined Q_OS_IRIX
    3143     "SGI Irix"
     3622        firstPartTemp += QString::fromLatin1("SGI Irix");
    31443623#elif defined Q_OS_LINUX
    3145     "Linux"
     3624
     3625#if defined(__x86_64__)
     3626        firstPartTemp += QString::fromLatin1("Linux x86_64");
     3627#elif defined(__i386__)
     3628        firstPartTemp += QString::fromLatin1("Linux i686");
     3629#else
     3630        firstPartTemp += QString::fromLatin1("Linux");
     3631#endif
     3632
    31463633#elif defined Q_OS_LYNX
    3147     "LynxOS"
     3634        firstPartTemp += QString::fromLatin1("LynxOS");
    31483635#elif defined Q_OS_NETBSD
    3149     "NetBSD"
     3636        firstPartTemp += QString::fromLatin1("NetBSD");
    31503637#elif defined Q_OS_OS2
    3151     "%3"
     3638        firstPartTemp += QString::fromLatin1("OS/2");
    31523639#elif defined Q_OS_OPENBSD
    3153     "OpenBSD"
     3640        firstPartTemp += QString::fromLatin1("OpenBSD");
    31543641#elif defined Q_OS_OS2EMX
    3155     "OS/2"
     3642        firstPartTemp += QString::fromLatin1("OS/2");
    31563643#elif defined Q_OS_OSF
    3157     "HP Tru64 UNIX"
     3644        firstPartTemp += QString::fromLatin1("HP Tru64 UNIX");
    31583645#elif defined Q_OS_QNX6
    3159     "QNX RTP Six"
     3646        firstPartTemp += QString::fromLatin1("QNX RTP Six");
    31603647#elif defined Q_OS_QNX
    3161     "QNX"
     3648        firstPartTemp += QString::fromLatin1("QNX");
    31623649#elif defined Q_OS_RELIANT
    3163     "Reliant UNIX"
     3650        firstPartTemp += QString::fromLatin1("Reliant UNIX");
    31643651#elif defined Q_OS_SCO
    3165     "SCO OpenServer"
     3652        firstPartTemp += QString::fromLatin1("SCO OpenServer");
    31663653#elif defined Q_OS_SOLARIS
    3167     "Sun Solaris"
     3654        firstPartTemp += QString::fromLatin1("Sun Solaris");
    31683655#elif defined Q_OS_ULTRIX
    3169     "DEC Ultrix"
    3170 #elif defined Q_WS_S60
    3171     ""
     3656        firstPartTemp += QString::fromLatin1("DEC Ultrix");
     3657#elif defined Q_OS_SYMBIAN
     3658        firstPartTemp += QLatin1Char(' ');
     3659        QSysInfo::S60Version s60Version = QSysInfo::s60Version();
     3660        switch (s60Version) {
     3661        case QSysInfo::SV_S60_3_1:
     3662            firstPartTemp += QString::fromLatin1("Series60/3.1");
     3663            break;
     3664        case QSysInfo::SV_S60_3_2:
     3665            firstPartTemp += QString::fromLatin1("Series60/3.2");
     3666            break;
     3667        case QSysInfo::SV_S60_5_0:
     3668            firstPartTemp += QString::fromLatin1("Series60/5.0");
     3669            break;
     3670        default:
     3671            break;
     3672        }
    31723673#elif defined Q_OS_UNIX
    3173     "UNIX BSD/SYSV system"
     3674        firstPartTemp += QString::fromLatin1("UNIX BSD/SYSV system");
    31743675#elif defined Q_OS_UNIXWARE
    3175     "UnixWare Seven, Open UNIX Eight"
     3676        firstPartTemp += QString::fromLatin1("UnixWare Seven, Open UNIX Eight");
    31763677#else
    3177     "Unknown"
    3178 #endif
    3179     // Placeholder for SubPlatform Version
    3180     "%4; ");
    3181 
    3182     // Platform Version
    3183     QString osVer;
    3184 #ifdef Q_OS_SYMBIAN
    3185     QSysInfo::SymbianVersion symbianVersion = QSysInfo::symbianVersion();
    3186     switch (symbianVersion) {
    3187     case QSysInfo::SV_9_2:
    3188         osVer = "OS/9.2";
    3189         break;
    3190     case QSysInfo::SV_9_3:
    3191         osVer = "OS/9.3";
    3192         break;
    3193     case QSysInfo::SV_9_4:
    3194         osVer = "OS/9.4";
    3195         break;
    3196     case QSysInfo::SV_SF_2:
    3197         osVer = "/2";
    3198         break;
    3199     case QSysInfo::SV_SF_3:
    3200         osVer = "/3";
    3201         break;
    3202     case QSysInfo::SV_SF_4:
    3203         osVer = "/4";
    3204         break;
    3205     default:
    3206         osVer = "";
    3207     }
    3208 #endif
    3209     ua = ua.arg(osVer);
    3210 
    3211     QChar securityStrength(QLatin1Char('N'));
    3212 #if !defined(QT_NO_OPENSSL)
    3213     // we could check QSslSocket::supportsSsl() here, but this makes
    3214     // OpenSSL, certificates etc being loaded in all cases were QWebPage
    3215     // is used. This loading is not needed for non-https.
    3216     securityStrength = QLatin1Char('U');
    3217     // this may lead to a false positive: We indicate SSL since it is
    3218     // compiled in even though supportsSsl() might return false
    3219 #endif
    3220     ua = ua.arg(securityStrength);
    3221 
    3222 #if defined Q_OS_WIN32
    3223     QString ver;
    3224     switch (QSysInfo::WindowsVersion) {
    3225         case QSysInfo::WV_32s:
    3226             ver = "Windows 3.1";
    3227             break;
    3228         case QSysInfo::WV_95:
    3229             ver = "Windows 95";
    3230             break;
    3231         case QSysInfo::WV_98:
    3232             ver = "Windows 98";
    3233             break;
    3234         case QSysInfo::WV_Me:
    3235             ver = "Windows 98; Win 9x 4.90";
    3236             break;
    3237         case QSysInfo::WV_NT:
    3238             ver = "WinNT4.0";
    3239             break;
    3240         case QSysInfo::WV_2000:
    3241             ver = "Windows NT 5.0";
    3242             break;
    3243         case QSysInfo::WV_XP:
    3244             ver = "Windows NT 5.1";
    3245             break;
    3246         case QSysInfo::WV_2003:
    3247             ver = "Windows NT 5.2";
    3248             break;
    3249         case QSysInfo::WV_VISTA:
    3250             ver = "Windows NT 6.0";
    3251             break;
    3252 #if QT_VERSION > 0x040500
    3253         case QSysInfo::WV_WINDOWS7:
    3254             ver = "Windows NT 6.1";
    3255             break;
    3256 #endif
    3257         case QSysInfo::WV_CE:
    3258             ver = "Windows CE";
    3259             break;
    3260         case QSysInfo::WV_CENET:
    3261             ver = "Windows CE .NET";
    3262             break;
    3263         case QSysInfo::WV_CE_5:
    3264             ver = "Windows CE 5.x";
    3265             break;
    3266         case QSysInfo::WV_CE_6:
    3267             ver = "Windows CE 6.x";
    3268             break;
    3269     }
    3270     ua = QString(ua).arg(ver);
    3271 #endif
    3272 
    3273 #if defined Q_OS_OS2
    3274     QString ver;
    3275     switch (QSysInfo::os2Version()) {
    3276         default:
    3277         case QSysInfo::OV_Unknown:
    3278             ver = QLatin1String("Unknown"); break;
    3279         case QSysInfo::OV_2_0:
    3280             ver = QLatin1String("2.0"); break;
    3281         case QSysInfo::OV_2_1:
    3282             ver = QLatin1String("2.1"); break;
    3283         case QSysInfo::OV_2_11:
    3284             ver = QLatin1String("2.11"); break;
    3285         case QSysInfo::OV_3_0:
    3286             ver = QLatin1String("Warp 3"); break;
    3287         case QSysInfo::OV_4_0:
    3288             ver = QLatin1String("Warp 4"); break;
    3289         case QSysInfo::OV_4_5:
    3290             ver = QLatin1String("Warp 4.5"); break;
    3291         case QSysInfo::OV_4_52:
    3292             ver = QLatin1String("Warp 4.52"); break;
    3293         case QSysInfo::OV_ECS_Unknown:
    3294             ver = QLatin1String("eCS"); break;
    3295         case QSysInfo::OV_ECS_1_0:
    3296             ver = QLatin1String("eCS 1.0"); break;
    3297         case QSysInfo::OV_ECS_1_1:
    3298             ver = QLatin1String("eCS 1.1"); break;
    3299         case QSysInfo::OV_ECS_1_2:
    3300             ver = QLatin1String("eCS 1.2"); break;
    3301         case QSysInfo::OV_ECS_2_0:
    3302             ver = QLatin1String("eCS 2.0"); break;
    3303     }
    3304     ua = QString(ua).arg(ver);
    3305 #endif
    3306 
    3307     // SubPlatform Version
    3308     QString subPlatformVer;
    3309 #ifdef Q_WS_S60
    3310     QSysInfo::S60Version s60Version = QSysInfo::s60Version();
    3311     switch (s60Version) {
    3312     case QSysInfo::SV_S60_3_1:
    3313         subPlatformVer = "Series60/3.1";
    3314         break;
    3315     case QSysInfo::SV_S60_3_2:
    3316         subPlatformVer = "Series60/3.2";
    3317         break;
    3318     case QSysInfo::SV_S60_5_0:
    3319         subPlatformVer = "Series60/5.0";
    3320         break;
    3321     default:
    3322         subPlatformVer = "";
    3323     }
    3324 #endif
    3325     ua = ua.arg(subPlatformVer);
     3678        firstPartTemp += QString::fromLatin1("Unknown");
     3679#endif
     3680
     3681        // language is the split
     3682        firstPartTemp += QString::fromLatin1("; ");
     3683        firstPartTemp.squeeze();
     3684        firstPart = firstPartTemp;
     3685
     3686        QString secondPartTemp;
     3687        secondPartTemp.reserve(150);
     3688        secondPartTemp += QString::fromLatin1(") ");
     3689
     3690        // webkit/qt version
     3691        secondPartTemp += QString::fromLatin1("AppleWebKit/");
     3692        secondPartTemp += qWebKitVersion();
     3693        secondPartTemp += QString::fromLatin1(" (KHTML, like Gecko) ");
     3694
     3695
     3696        // Application name split the third part
     3697        secondPartTemp.squeeze();
     3698        secondPart = secondPartTemp;
     3699
     3700        QString thirdPartTemp;
     3701        thirdPartTemp.reserve(150);
     3702#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
     3703        thirdPartTemp += QLatin1String(" Mobile Safari/");
     3704#else
     3705        thirdPartTemp += QLatin1String(" Safari/");
     3706#endif
     3707        thirdPartTemp += qWebKitVersion();
     3708        thirdPartTemp.squeeze();
     3709        thirdPart = thirdPartTemp;
     3710        Q_ASSERT(!firstPart.isNull());
     3711        Q_ASSERT(!secondPart.isNull());
     3712        Q_ASSERT(!thirdPart.isNull());
     3713    }
    33263714
    33273715    // Language
    3328     QLocale locale;
    3329     if (view())
    3330         locale = view()->locale();
    3331     QString name = locale.name();
    3332     name.replace(QLatin1Char('_'), QLatin1Char('-'));
    3333     ua.append(name);
    3334     ua.append(QLatin1String(") "));
    3335 
    3336     // webkit/qt version
    3337     ua.append(QString(QLatin1String("AppleWebKit/%1 (KHTML, like Gecko) "))
    3338                       .arg(QString(qWebKitVersion())));
     3716    QString languageName;
     3717    if (d->client && d->client->ownerWidget())
     3718        languageName = d->client->ownerWidget()->locale().name();
     3719    else
     3720        languageName = QLocale().name();
     3721    languageName.replace(QLatin1Char('_'), QLatin1Char('-'));
    33393722
    33403723    // Application name/version
    33413724    QString appName = QCoreApplication::applicationName();
    33423725    if (!appName.isEmpty()) {
    3343         ua.append(appName);
    3344 #if QT_VERSION >= 0x040400
    33453726        QString appVer = QCoreApplication::applicationVersion();
    33463727        if (!appVer.isEmpty())
    3347             ua.append(QLatin1Char('/') + appVer);
    3348 #endif
     3728            appName.append(QLatin1Char('/') + appVer);
    33493729    } else {
    33503730        // Qt version
    3351         ua.append(QLatin1String("Qt/"));
    3352         ua.append(QLatin1String(qVersion()));
    3353     }
    3354 
    3355 #if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
    3356     ua.append(QString(QLatin1String(" Mobile Safari/%1"))
    3357                       .arg(qWebKitVersion()));
    3358 #else
    3359     ua.append(QString(QLatin1String(" Safari/%1"))
    3360                       .arg(qWebKitVersion()));
    3361 #endif
    3362 
    3363     return ua;
     3731        appName = QString::fromLatin1("Qt/") + QString::fromLatin1(qVersion());
     3732    }
     3733
     3734    return firstPart + languageName + secondPart + appName + thirdPart;
    33643735}
    33653736
     
    33873758    Returns the number of bytes that were received from the network to render the current page.
    33883759
    3389     \sa totalBytes()
     3760    \sa totalBytes(), loadProgress()
    33903761*/
    33913762quint64 QWebPage::bytesReceived() const
     
    33973768    \fn void QWebPage::loadStarted()
    33983769
    3399     This signal is emitted when a new load of the page is started.
     3770    This signal is emitted when a page starts loading content.
    34003771
    34013772    \sa loadFinished()
     
    34163787    \fn void QWebPage::loadFinished(bool ok)
    34173788
    3418     This signal is emitted when a load of the page is finished.
     3789    This signal is emitted when the page finishes loading content. This signal
     3790    is independant of script execution or page rendering.
    34193791    \a ok will indicate whether the load was successful or any error occurred.
    34203792
    3421     \sa loadStarted()
     3793    \sa loadStarted(), ErrorPageExtension
    34223794*/
    34233795
     
    34463818
    34473819    This signal is emitted whenever the page creates a new \a frame.
     3820
     3821    \sa currentFrame()
    34483822*/
    34493823
     
    34513825    \fn void QWebPage::selectionChanged()
    34523826
    3453     This signal is emitted whenever the selection changes.
     3827    This signal is emitted whenever the selection changes, either interactively
     3828    or programmatically (e.g. by calling triggerAction() with a selection action).
    34543829
    34553830    \sa selectedText()
     
    34633838    as well as other editable content.
    34643839
    3465     \sa contentEditable, QWebFrame::toHtml(), QWebFrame::toPlainText()
     3840    \sa contentEditable, modified, QWebFrame::toHtml(), QWebFrame::toPlainText()
    34663841*/
    34673842
     
    35133888    \fn void QWebPage::unsupportedContent(QNetworkReply *reply)
    35143889
    3515     This signal is emitted when WebKit cannot handle a link the user navigated to.
     3890    This signal is emitted when WebKit cannot handle a link the user navigated to or a
     3891    web server's response includes a "Content-Disposition" header with the 'attachment'
     3892    directive. If "Content-Disposition" is present in \a reply, the web server is indicating
     3893    that the client should prompt the user to save the content regardless of content-type.
     3894    See RFC 2616 sections 19.5.1 for details about Content-Disposition.
    35163895
    35173896    At signal emission time the meta-data of the QNetworkReply \a reply is available.
     
    35353914
    35363915    This signal is emitted when for example the position of the cursor in an editable form
    3537     element changes. It is used inform input methods about the new on-screen position where
    3538     the user is able to enter text. This signal is usually connected to QWidget's updateMicroFocus()
    3539     slot.
     3916    element changes. It is used to inform input methods about the new on-screen position where
     3917    the user is able to enter text. This signal is usually connected to the
     3918    QWidget::updateMicroFocus() slot.
    35403919*/
    35413920
     
    35783957    This signal is emitted whenever the web site shown in \a frame is asking to store data
    35793958    to the database \a databaseName and the quota allocated to that web site is exceeded.
     3959
     3960    \sa QWebDatabase
    35803961*/
    35813962
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h

    r561 r846  
    5555    class FrameLoaderClientQt;
    5656    class InspectorClientQt;
     57    class InspectorFrontendClientQt;
    5758    class ResourceHandle;
    5859    class HitTestResult;
     
    169170        AlignRight,
    170171
     172        StopScheduledPageRefresh,
     173
    171174        WebActionCount
    172175    };
     
    209212#endif
    210213
    211 #if QT_VERSION < 0x040400 && !defined(qdoc)
    212     void setNetworkInterface(QWebNetworkInterface *interface);
    213     QWebNetworkInterface *networkInterface() const;
    214 
    215     // #### why is this in the page itself?
    216 #ifndef QT_NO_NETWORKPROXY
    217     void setNetworkProxy(const QNetworkProxy& proxy);
    218     QNetworkProxy networkProxy() const;
    219 #endif
    220 
    221 #else
    222214    void setNetworkAccessManager(QNetworkAccessManager *manager);
    223215    QNetworkAccessManager *networkAccessManager() const;
    224 #endif
    225216
    226217    void setPluginFactory(QWebPluginFactory *factory);
     
    232223    QString selectedText() const;
    233224
     225#ifndef QT_NO_ACTION
    234226    QAction *action(WebAction action) const;
     227#endif
    235228    virtual void triggerAction(WebAction action, bool checked = false);
    236229
     
    335328    void menuBarVisibilityChangeRequested(bool visible);
    336329
    337 #if QT_VERSION >= 0x040400
    338330    void unsupportedContent(QNetworkReply *reply);
    339331    void downloadRequested(const QNetworkRequest &request);
    340 #endif
    341332
    342333    void microFocusChanged();
     
    351342    virtual QObject *createPlugin(const QString &classid, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues);
    352343
    353 #if QT_VERSION >= 0x040400
    354344    virtual bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type);
    355 #else
    356     virtual bool acceptNavigationRequest(QWebFrame *frame, const QWebNetworkRequest &request, NavigationType type);
    357 #endif
    358345    virtual QString chooseFile(QWebFrame *originatingFrame, const QString& oldFile);
    359346    virtual void javaScriptAlert(QWebFrame *originatingFrame, const QString& msg);
     
    366353private:
    367354    Q_PRIVATE_SLOT(d, void _q_onLoadProgressChanged(int))
     355#ifndef QT_NO_ACTION
    368356    Q_PRIVATE_SLOT(d, void _q_webActionTriggered(bool checked))
     357#endif
    369358    Q_PRIVATE_SLOT(d, void _q_cleanupLeakMessages())
    370359
     
    374363    friend class QWebPagePrivate;
    375364    friend class QWebView;
     365    friend class QWebViewPrivate;
    376366    friend class QGraphicsWebView;
     367    friend class QGraphicsWebViewPrivate;
    377368    friend class QWebInspector;
    378369    friend class WebCore::ChromeClientQt;
     
    380371    friend class WebCore::FrameLoaderClientQt;
    381372    friend class WebCore::InspectorClientQt;
     373    friend class WebCore::InspectorFrontendClientQt;
    382374    friend class WebCore::ResourceHandle;
    383375    friend class WebCore::QNetworkReplyHandler;
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h

    r561 r846  
    6363    QWebPagePrivate(QWebPage*);
    6464    ~QWebPagePrivate();
     65
     66    static WebCore::Page* core(QWebPage*);
     67    static QWebPagePrivate* priv(QWebPage*);
     68
    6569    void createMainFrame();
    6670#ifndef QT_NO_CONTEXTMENU
     
    109113    void inputMethodEvent(QInputMethodEvent*);
    110114
     115#ifndef QT_NO_PROPERTIES
     116    void dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent*);
     117#endif
     118
    111119    void shortcutOverrideEvent(QKeyEvent*);
    112120    void leaveEvent(QEvent*);
     
    114122    void handleSoftwareInputPanel(Qt::MouseButton);
    115123    bool handleScrolling(QKeyEvent*, WebCore::Frame*);
     124
     125#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     126    void touchEvent(QTouchEvent*);
     127#endif
    116128
    117129    void setInspector(QWebInspector*);
     
    152164    bool clickCausedFocus;
    153165
    154 #if QT_VERSION < 0x040400
    155     bool acceptNavigationRequest(QWebFrame *frame, const QWebNetworkRequest &request, QWebPage::NavigationType type);
    156 
    157     QWebNetworkInterface *networkInterface;
    158 #ifndef QT_NO_NETWORKPROXY
    159     QNetworkProxy networkProxy;
    160 #endif
    161 
    162 #else
    163166    bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type);
    164167    QNetworkAccessManager *networkManager;
    165 #endif
    166168
    167169    bool forwardUnsupportedContent;
     
    187189    QWebInspector* inspector;
    188190    bool inspectorIsInternalOnly; // True if created through the Inspect context menu action
     191    Qt::DropAction m_lastDropAction;
     192
     193    QString viewMode;
    189194
    190195    static bool drtRun;
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp

    r561 r846  
    2424    \class QWebPluginFactory
    2525    \since 4.4
    26     \brief The QWebPluginFactory class creates plugins to be embedded into web
    27     pages.
    28 
    29     \inmodule QtWebKit
    30 
    31     QWebPluginFactory is a factory for creating plugins for QWebPage. A plugin
    32     factory can be installed on a QWebPage using QWebPage::setPluginFactory().
     26    \brief The QWebPluginFactory class is used to embed custom data types in web pages.
     27
     28    \inmodule QtWebKit
     29
     30    The HTML \c{<object>} tag is used to embed arbitrary content into a web page,
     31    for example:
     32
     33    \code
     34    <object type="application/x-pdf" data="http://qt.nokia.com/document.pdf" width="500" height="400"></object>
     35    \endcode
     36
     37    QtWebkit will natively handle the most basic data types like \c{text/html} and
     38    \c{image/jpeg}, but for any advanced or custom data types you will need to
     39    provide a handler yourself.
     40
     41    QWebPluginFactory is a factory for creating plugins for QWebPage, where each
     42    plugin provides support for one or more data types. A plugin factory can be
     43    installed on a QWebPage using QWebPage::setPluginFactory().
    3344
    3445    \note The plugin factory is only used if plugins are enabled through QWebSettings.
    3546
    36     You can provide a QWebPluginFactory by implementing the plugins() and the
    37     create() method. For plugins() it is necessary to describe the plugins the
     47    You provide a QWebPluginFactory by implementing the plugins() and the
     48    create() methods. For plugins() it is necessary to describe the plugins the
    3849    factory can create, including a description and the supported MIME types.
    3950    The MIME types each plugin can handle should match the ones specified in
    40     in the HTML \c{<object>} tag.
     51    in the HTML \c{<object>} tag of your content.
    4152
    4253    The create() method is called if the requested MIME type is supported. The
    4354    implementation has to return a new instance of the plugin requested for the
    4455    given MIME type and the specified URL.
     56
     57    The plugins themselves are subclasses of QObject, but currently only plugins
     58    based on either QWidget or QGraphicsWidget are supported.
     59
    4560*/
    4661
     
    4964    \class QWebPluginFactory::Plugin
    5065    \since 4.4
    51     \brief the QWebPluginFactory::Plugin structure describes the properties of a plugin a QWebPluginFactory can create.
     66    \brief The QWebPluginFactory::Plugin structure describes the properties of a plugin a QWebPluginFactory can create.
    5267
    5368    \inmodule QtWebKit
     
    133148
    134149    \note Currently, this function is only called when JavaScript programs
    135     access the global \c plugins or \c mimetypes objects. 
     150    access the global \c plugins or \c mimetypes objects.
    136151*/
    137152
     
    184199/*!
    185200    \enum QWebPluginFactory::Extension
     201    \internal
    186202
    187203    This enum describes the types of extensions that the plugin factory can support. Before using these extensions, you
     
    193209/*!
    194210    \class QWebPluginFactory::ExtensionOption
     211    \internal
    195212    \since 4.4
    196213    \brief The ExtensionOption class provides an extended input argument to QWebPluginFactory's extension support.
     
    203220/*!
    204221    \class QWebPluginFactory::ExtensionReturn
     222    \internal
    205223    \since 4.4
    206224    \brief The ExtensionOption class provides an extended output argument to QWebPluginFactory's extension support.
     
    214232    This virtual function can be reimplemented in a QWebPluginFactory subclass to provide support for extensions. The \a option
    215233    argument is provided as input to the extension; the output results can be stored in \a output.
     234
     235    \internal
    216236
    217237    The behaviour of this function is determined by \a extension.
     
    234254    This virtual function returns true if the plugin factory supports \a extension; otherwise false is returned.
    235255
     256    \internal
     257
    236258    \sa extension()
    237259*/
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.cpp

    r561 r846  
    4141}
    4242
     43void QWEBKIT_EXPORT qt_drt_setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme)
     44{
     45    SecurityOrigin::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme);
     46}
     47
    4348/*!
    4449    \class QWebSecurityOrigin
     
    5863    \c{http://www.malicious.com/evil.html} from accessing \c{http://www.example.com/}'s resources,
    5964    because they are of a different security origin.
     65
     66    By default local schemes like \c{file://} and \c{qrc://} are concidered to be in the same
     67    security origin, and can access each other's resources. You can add additional local schemes
     68    by using QWebSecurityOrigin::addLocalScheme(), or override the default same-origin behavior
     69    by setting QWebSettings::LocalContentCanAccessFileUrls to \c{false}.
     70
     71    \note Local resources are by default restricted from accessing remote content, which
     72    means your \c{file://} will not be able to access \c{http://domain.com/foo.html}. You
     73    can relax this restriction by setting QWebSettings::LocalContentCanAccessRemoteUrls to
     74    \c{true}.
    6075
    6176    Call QWebFrame::securityOrigin() to get the QWebSecurityOrigin for a frame in a
     
    215230
    216231    Adds the given \a scheme to the list of schemes that are considered equivalent
    217     to the \c file: scheme. They are not subject to cross domain restrictions.
     232    to the \c file: scheme.
     233
     234    Cross domain restrictions depend on the two web settings QWebSettings::LocalContentCanAccessFileUrls
     235    and QWebSettings::LocalContentCanAccessFileUrls. By default all local schemes are concidered to be
     236    in the same security origin, and local schemes can not access remote content.
    218237*/
    219238void QWebSecurityOrigin::addLocalScheme(const QString& scheme)
     
    227246    Removes the given \a scheme from the list of local schemes.
    228247
     248    \note You can not remove the \c{file://} scheme from the list
     249    of local schemes.
     250
    229251    \sa addLocalScheme()
    230252*/
     
    236258/*!
    237259    \since 4.6
    238     Returns a list of all the schemes that were set by the application as local schemes,
     260    Returns a list of all the schemes concidered to be local.
     261
     262    By default this is \c{file://} and \c{qrc://}.
     263
    239264    \sa addLocalScheme(), removeLocalScheme()
    240265*/
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp

    r561 r846  
    2727#include "Cache.h"
    2828#include "CrossOriginPreflightResultCache.h"
     29#include "Database.h"
    2930#include "FontCache.h"
    3031#include "Page.h"
     
    4849#include <QFileInfo>
    4950
    50 #if ENABLE(QT_BEARER)
    5151#include "NetworkStateNotifier.h"
    52 #endif
    5352
    5453void QWEBKIT_EXPORT qt_networkAccessAllowed(bool isAllowed)
     
    9190        hash->insert(QWebSettings::DefaultFrameIconGraphic, QPixmap(QLatin1String(":webkit/resources/urlIcon.png")));
    9291        hash->insert(QWebSettings::TextAreaSizeGripCornerGraphic, QPixmap(QLatin1String(":webkit/resources/textAreaResizeCorner.png")));
     92        hash->insert(QWebSettings::DeleteButtonGraphic, QPixmap(QLatin1String(":webkit/resources/deleteButton.png")));
    9393    }
    9494
     
    152152                                      global->attributes.value(QWebSettings::JavascriptEnabled));
    153153        settings->setJavaScriptEnabled(value);
    154 
     154#if USE(ACCELERATED_COMPOSITING)
     155        value = attributes.value(QWebSettings::AcceleratedCompositingEnabled,
     156                                      global->attributes.value(QWebSettings::AcceleratedCompositingEnabled));
     157
     158        settings->setAcceleratedCompositingEnabled(value);
     159#endif
     160#if ENABLE(3D_CANVAS)
     161        value = attributes.value(QWebSettings::WebGLEnabled,
     162                                 global->attributes.value(QWebSettings::WebGLEnabled));
     163
     164        settings->setWebGLEnabled(value);
     165#endif
     166 
    155167        value = attributes.value(QWebSettings::JavascriptCanOpenWindows,
    156168                                      global->attributes.value(QWebSettings::JavascriptCanOpenWindows));
     
    169181        settings->setPrivateBrowsingEnabled(value);
    170182
     183        value = attributes.value(QWebSettings::SpatialNavigationEnabled,
     184                                      global->attributes.value(QWebSettings::SpatialNavigationEnabled));
     185        settings->setSpatialNavigationEnabled(value);
     186
    171187        value = attributes.value(QWebSettings::JavascriptCanAccessClipboard,
    172188                                      global->attributes.value(QWebSettings::JavascriptCanAccessClipboard));
    173189        settings->setDOMPasteAllowed(value);
     190        settings->setJavaScriptCanAccessClipboard(value);
    174191
    175192        value = attributes.value(QWebSettings::DeveloperExtrasEnabled,
     
    177194        settings->setDeveloperExtrasEnabled(value);
    178195
     196        value = attributes.value(QWebSettings::FrameFlatteningEnabled,
     197                                      global->attributes.value(QWebSettings::FrameFlatteningEnabled));
     198        settings->setFrameFlatteningEnabled(value);
     199
    179200        QUrl location = !userStyleSheetLocation.isEmpty() ? userStyleSheetLocation : global->userStyleSheetLocation;
    180201        settings->setUserStyleSheetLocation(WebCore::KURL(location));
     
    188209        value = attributes.value(QWebSettings::ZoomTextOnly,
    189210                                 global->attributes.value(QWebSettings::ZoomTextOnly));
    190         settings->setZoomsTextOnly(value);
     211        settings->setZoomMode(value ? WebCore::ZoomTextOnly : WebCore::ZoomPage);
    191212
    192213        value = attributes.value(QWebSettings::PrintElementBackgrounds,
     
    194215        settings->setShouldPrintBackgrounds(value);
    195216
     217#if ENABLE(DATABASE)
    196218        value = attributes.value(QWebSettings::OfflineStorageDatabaseEnabled,
    197219                                      global->attributes.value(QWebSettings::OfflineStorageDatabaseEnabled));
    198         settings->setDatabasesEnabled(value);
     220        WebCore::Database::setIsAvailable(value);
     221#endif
    199222
    200223        value = attributes.value(QWebSettings::OfflineWebApplicationCacheEnabled,
     
    204227        value = attributes.value(QWebSettings::LocalStorageEnabled,
    205228                                      global->attributes.value(QWebSettings::LocalStorageEnabled));
    206                                                                                                                                  
    207229        settings->setLocalStorageEnabled(value);
    208230
     
    210232                                      global->attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls));
    211233        settings->setAllowUniversalAccessFromFileURLs(value);
     234
     235        value = attributes.value(QWebSettings::LocalContentCanAccessFileUrls,
     236                                      global->attributes.value(QWebSettings::LocalContentCanAccessFileUrls));
     237        settings->setAllowFileAccessFromFileURLs(value);
     238
     239        value = attributes.value(QWebSettings::XSSAuditingEnabled,
     240                                      global->attributes.value(QWebSettings::XSSAuditingEnabled));
     241        settings->setXSSAuditorEnabled(value);
     242
     243#if ENABLE(TILED_BACKING_STORE)
     244        value = attributes.value(QWebSettings::TiledBackingStoreEnabled,
     245                                      global->attributes.value(QWebSettings::TiledBackingStoreEnabled));
     246        settings->setTiledBackingStoreEnabled(value);
     247#endif
     248
     249        value = attributes.value(QWebSettings::SiteSpecificQuirksEnabled,
     250                                      global->attributes.value(QWebSettings::SiteSpecificQuirksEnabled));
     251        settings->setNeedsSiteSpecificQuirks(value);
     252
    212253        settings->setUsesPageCache(WebCore::pageCache()->capacity());
    213254    } else {
     
    251292    each attribute.
    252293
    253     QWebSettings also configures global properties such as the Web page memory
    254     cache and the Web page icon database, local database storage and offline
     294    QWebSettings also configures global properties such as the web page memory
     295    cache, icon database, local database storage and offline
    255296    applications storage.
    256297
     
    260301    \l{QWebSettings::PluginsEnabled}{PluginsEnabled} attribute. For many applications,
    261302    this attribute is enabled for all pages by setting it on the
    262     \l{globalSettings()}{global settings object}.
     303    \l{globalSettings()}{global settings object}. QtWebKit will always ignore this setting
     304    when processing Qt plugins. The decision to allow a Qt plugin is made by the client
     305    in its reimplementation of QWebPage::createPlugin().
    263306
    264307    \section1 Web Application Support
     
    299342    \value MinimumFontSize The hard minimum font size.
    300343    \value MinimumLogicalFontSize The minimum logical font size that is applied
    301         after zooming with QWebFrame's textSizeMultiplier().
     344        when zooming out with QWebFrame::setTextSizeMultiplier().
    302345    \value DefaultFontSize The default font size for regular text.
    303346    \value DefaultFixedFontSize The default font size for fixed-pitch text.
     
    321364
    322365    \value AutoLoadImages Specifies whether images are automatically loaded in
    323         web pages.
     366        web pages. This is enabled by default.
    324367    \value DnsPrefetchEnabled Specifies whether QtWebkit will try to pre-fetch DNS entries to
    325         speed up browsing. This only works as a global attribute. Only for Qt 4.6 and later.
     368        speed up browsing. This only works as a global attribute. Only for Qt 4.6 and later. This is disabled by default.
    326369    \value JavascriptEnabled Enables or disables the running of JavaScript
    327         programs.
     370        programs. This is enabled by default
    328371    \value JavaEnabled Enables or disables Java applets.
    329372        Currently Java applets are not supported.
    330     \value PluginsEnabled Enables or disables plugins in Web pages.
     373    \value PluginsEnabled Enables or disables plugins in Web pages (e.g. using NPAPI). Qt plugins
     374        with a mimetype such as "application/x-qt-plugin" are not affected by this setting. This is disabled by default.
    331375    \value PrivateBrowsingEnabled Private browsing prevents WebKit from
    332         recording visited pages in the history and storing web page icons.
     376        recording visited pages in the history and storing web page icons. This is disabled by default.
    333377    \value JavascriptCanOpenWindows Specifies whether JavaScript programs
    334         can open new windows.
     378        can open new windows. This is disabled by default.
    335379    \value JavascriptCanAccessClipboard Specifies whether JavaScript programs
    336         can read or write to the clipboard.
     380        can read or write to the clipboard. This is disabled by default.
    337381    \value DeveloperExtrasEnabled Enables extra tools for Web developers.
    338382        Currently this enables the "Inspect" element in the context menu as
    339         well as the use of QWebInspector which controls the WebKit WebInspector
    340         for web site debugging.
     383        well as the use of QWebInspector which controls the web inspector
     384        for web site debugging. This is disabled by default.
     385    \value SpatialNavigationEnabled Enables or disables the Spatial Navigation
     386        feature, which consists in the ability to navigate between focusable
     387        elements in a Web page, such as hyperlinks and form controls, by using
     388        Left, Right, Up and Down arrow keys. For example, if a user presses the
     389        Right key, heuristics determine whether there is an element he might be
     390        trying to reach towards the right and which element he probably wants.
     391        This is disabled by default.
    341392    \value LinksIncludedInFocusChain Specifies whether hyperlinks should be
    342         included in the keyboard focus chain.
    343     \value ZoomTextOnly Specifies whether the zoom factor on a frame applies to
    344         only the text or all content.
     393        included in the keyboard focus chain. This is enabled by default.
     394    \value ZoomTextOnly Specifies whether the zoom factor on a frame applies
     395        only to the text or to all content. This is disabled by default.
    345396    \value PrintElementBackgrounds Specifies whether the background color and images
    346         are also drawn when the page is printed.
     397        are also drawn when the page is printed. This is enabled by default.
    347398    \value OfflineStorageDatabaseEnabled Specifies whether support for the HTML 5
    348         offline storage feature is enabled or not. Disabled by default.
     399        offline storage feature is enabled or not. This is disabled by default.
    349400    \value OfflineWebApplicationCacheEnabled Specifies whether support for the HTML 5
    350         web application cache feature is enabled or not. Disabled by default.
     401        web application cache feature is enabled or not. This is disabled by default.
    351402    \value LocalStorageEnabled Specifies whether support for the HTML 5
    352         local storage feature is enabled or not. Disabled by default.
     403        local storage feature is enabled or not. This is disabled by default.
    353404    \value LocalStorageDatabaseEnabled \e{This enum value is deprecated.} Use
    354405        QWebSettings::LocalStorageEnabled instead.
    355     \value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are allowed to access remote urls.
     406    \value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are
     407        allowed to access remote urls. This is disabled by default. For more information
     408        about security origins and local vs. remote content see QWebSecurityOrigin.
     409    \value LocalContentCanAccessFileUrls Specifies whether locally loaded documents are
     410        allowed to access other local urls. This is enabled by default. For more information
     411        about security origins and local vs. remote content see QWebSecurityOrigin.
     412    \value XSSAuditingEnabled Specifies whether load requests should be monitored for cross-site
     413        scripting attempts. Suspicious scripts will be blocked and reported in the inspector's
     414        JavaScript console. Enabling this feature might have an impact on performance
     415        and it is disabled by default.
     416    \value AcceleratedCompositingEnabled This feature, when used in conjunction with
     417        QGraphicsWebView, accelerates animations of web content. CSS animations of the transform and
     418        opacity properties will be rendered by composing the cached content of the animated elements.
     419        This is enabled by default.
     420    \value TiledBackingStoreEnabled This setting enables the tiled backing store feature
     421        for a QGraphicsWebView. With the tiled backing store enabled, the web page contents in and around
     422        the current visible area is speculatively cached to bitmap tiles. The tiles are automatically kept
     423        in sync with the web page as it changes. Enabling tiling can significantly speed up painting heavy
     424        operations like scrolling. Enabling the feature increases memory consumption. It does not work well
     425        with contents using CSS fixed positioning (see also \l{QGraphicsWebView::}{resizesToContents} property).
     426        \l{QGraphicsWebView::}{tiledBackingStoreFrozen} property allows application to temporarily
     427        freeze the contents of the backing store. This is disabled by default.
     428    \value FrameFlatteningEnabled With this setting each subframe is expanded to its contents.
     429        On touch devices, it is desired to not have any scrollable sub parts of the page
     430        as it results in a confusing user experience, with scrolling sometimes scrolling sub parts
     431        and at other times scrolling the page itself. For this reason iframes and framesets are
     432        barely usable on touch devices. This will flatten all the frames to become one scrollable page.
     433        This is disabled by default.
     434    \value SiteSpecificQuirksEnabled This setting enables WebKit's workaround for broken sites. It is
     435        enabled by default.
    356436*/
    357437
     
    377457    d->attributes.insert(QWebSettings::DnsPrefetchEnabled, false);
    378458    d->attributes.insert(QWebSettings::JavascriptEnabled, true);
     459    d->attributes.insert(QWebSettings::SpatialNavigationEnabled, false);
    379460    d->attributes.insert(QWebSettings::LinksIncludedInFocusChain, true);
    380461    d->attributes.insert(QWebSettings::ZoomTextOnly, false);
     
    384465    d->attributes.insert(QWebSettings::LocalStorageEnabled, false);
    385466    d->attributes.insert(QWebSettings::LocalContentCanAccessRemoteUrls, false);
     467    d->attributes.insert(QWebSettings::LocalContentCanAccessFileUrls, true);
     468    d->attributes.insert(QWebSettings::AcceleratedCompositingEnabled, true);
     469    d->attributes.insert(QWebSettings::TiledBackingStoreEnabled, false);
     470    d->attributes.insert(QWebSettings::FrameFlatteningEnabled, false);
     471    d->attributes.insert(QWebSettings::SiteSpecificQuirksEnabled, true);
    386472    d->offlineStorageDefaultQuota = 5 * 1024 * 1024;
    387473    d->defaultTextEncoding = QLatin1String("iso-8859-1");
     
    452538    with UTF-8 and Base64 encoded data, such as:
    453539
    454     "data:text/css;charset=utf-8;base64,cCB7IGJhY2tncm91bmQtY29sb3I6IHJlZCB9Ow==;"
     540    "data:text/css;charset=utf-8;base64,cCB7IGJhY2tncm91bmQtY29sb3I6IHJlZCB9Ow=="
     541
     542    \note If the base64 data is not valid, the style will not be applied.
    455543
    456544    \sa userStyleSheetUrl()
     
    503591    to store "favicons" associated with web sites.
    504592
    505     \a path must point to an existing directory where the icons are stored.
     593    \a path must point to an existing directory.
    506594
    507595    Setting an empty path disables the icon database.
     596
     597    \sa iconDatabasePath(), clearIconDatabase()
    508598*/
    509599void QWebSettings::setIconDatabasePath(const QString& path)
     
    548638    Returns the web site's icon for \a url.
    549639
    550     If the web site does not specify an icon, or the icon is not in the
     640    If the web site does not specify an icon \bold OR if the icon is not in the
    551641    database, a null QIcon is returned.
    552642
     
    585675    given \a type.
    586676
    587     For example, when an image cannot be loaded the pixmap specified by
     677    For example, when an image cannot be loaded, the pixmap specified by
    588678    \l{QWebSettings::WebGraphic}{MissingImageGraphic} is drawn instead.
    589679
     
    602692    Returns a previously set pixmap used to draw replacement graphics of the
    603693    specified \a type.
    604 
    605     For example, when an image cannot be loaded the pixmap specified by
    606     \l{QWebSettings::WebGraphic}{MissingImageGraphic} is drawn instead.
    607694
    608695    \sa setWebGraphic()
     
    646733
    647734    The Page Cache allows for a nicer user experience when navigating forth or back
    648     to pages in the forward/back history, by pausing and resuming up to \a pages
    649     per page group.
     735    to pages in the forward/back history, by pausing and resuming up to \a pages.
    650736
    651737    For more information about the feature, please refer to:
     
    719805
    720806/*!
    721     Resets the actual font family to the default font family, specified by
    722     \a which.
     807    Resets the actual font family specified by \a which to the one set
     808    in the global QWebSettings instance.
    723809
    724810    This function has no effect on the global QWebSettings instance.
     
    762848    \fn void QWebSettings::resetAttribute(WebAttribute attribute)
    763849
    764     Resets the setting of \a attribute.
     850    Resets the setting of \a attribute to the value specified in the
     851    global QWebSettings instance.
     852
    765853    This function has no effect on the global QWebSettings instance.
    766854
     
    778866    \since 4.5
    779867
    780     Sets the path for HTML5 offline storage to \a path.
    781 
    782     \a path must point to an existing directory where the databases are stored.
     868    Sets \a path as the save location for HTML5 client-side database storage data.
     869
     870    \a path must point to an existing directory.
    783871
    784872    Setting an empty path disables the feature.
     873
     874    Support for client-side databases can enabled by setting the
     875    \l{QWebSettings::OfflineStorageDatabaseEnabled}{OfflineStorageDatabaseEnabled} attribute.
    785876
    786877    \sa offlineStoragePath()
     
    796887    \since 4.5
    797888
    798     Returns the path of the HTML5 offline storage or an empty string if the
     889    Returns the path of the HTML5 client-side database storage or an empty string if the
    799890    feature is disabled.
    800891
     
    833924/*!
    834925    \since 4.6
    835     \relates QWebSettings
    836926
    837927    Sets the path for HTML5 offline web application cache storage to \a path.
    838928
    839929    An application cache acts like an HTTP cache in some sense. For documents
    840     that use the application cache via JavaScript, the loader mechinery will
     930    that use the application cache via JavaScript, the loader engine will
    841931    first ask the application cache for the contents, before hitting the
    842932    network.
     
    845935    http://dev.w3.org/html5/spec/Overview.html#appcache
    846936
    847     \a path must point to an existing directory where the cache is stored.
     937    \a path must point to an existing directory.
    848938
    849939    Setting an empty path disables the feature.
     940
     941    Support for offline web application cache storage can enabled by setting the
     942    \l{QWebSettings::OfflineWebApplicationCacheEnabled}{OfflineWebApplicationCacheEnabled} attribute.
    850943
    851944    \sa offlineWebApplicationCachePath()
     
    860953/*!
    861954    \since 4.6
    862     \relates QWebSettings
    863955
    864956    Returns the path of the HTML5 offline web application cache storage
     
    885977{
    886978#if ENABLE(OFFLINE_WEB_APPLICATIONS)
     979    WebCore::cacheStorage().empty();
     980    WebCore::cacheStorage().vacuumDatabaseFile();
    887981    WebCore::cacheStorage().setMaximumSize(maximumSize);
    888982#endif
     
    905999/*!
    9061000    \since 4.6
    907     \relates QWebSettings
    9081001
    9091002    Sets the path for HTML5 local storage to \a path.
     
    9251018/*!
    9261019    \since 4.6
    927     \relates QWebSettings
    9281020
    9291021    Returns the path for HTML5 local storage.
     
    9381030/*!
    9391031    \since 4.6
    940     \relates QWebSettings
    941 
    942     Enables WebKit persistent data and sets the path to \a path.
    943     If the \a path is empty the path for persistent data is set to the
    944     user-specific data location specified by
    945     \l{QDesktopServices::DataLocation}{DataLocation}.
    946    
     1032
     1033    Enables WebKit data persistence and sets the path to \a path.
     1034    If \a path is empty, the user-specific data location specified by
     1035    \l{QDesktopServices::DataLocation}{DataLocation} will be used instead.
     1036
     1037    This method will simultaneously set and enable the iconDatabasePath(),
     1038    localStoragePath(), offlineStoragePath() and offlineWebApplicationCachePath().
     1039
    9471040    \sa localStoragePath()
    9481041*/
     
    9521045
    9531046    if (path.isEmpty()) {
     1047#ifndef QT_NO_DESKTOPSERVICES
    9541048        storagePath = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
    955 
     1049#endif
    9561050        if (storagePath.isEmpty())
    9571051            storagePath = WebCore::pathByAppendingComponent(QDir::homePath(), QCoreApplication::applicationName());
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h

    r561 r846  
    6464        OfflineWebApplicationCacheEnabled,
    6565        LocalStorageEnabled,
    66 #ifdef QT_DEPRECATED
     66#if defined(QT_DEPRECATED) || defined(qdoc)
    6767        LocalStorageDatabaseEnabled = LocalStorageEnabled,
    6868#endif
    6969        LocalContentCanAccessRemoteUrls,
    70         DnsPrefetchEnabled
     70        DnsPrefetchEnabled,
     71        XSSAuditingEnabled,
     72        AcceleratedCompositingEnabled,
     73        SpatialNavigationEnabled,
     74        LocalContentCanAccessFileUrls,
     75        TiledBackingStoreEnabled,
     76        FrameFlatteningEnabled,
     77        SiteSpecificQuirksEnabled
    7178    };
    7279    enum WebGraphic {
     
    7481        MissingPluginGraphic,
    7582        DefaultFrameIconGraphic,
    76         TextAreaSizeGripCornerGraphic
     83        TextAreaSizeGripCornerGraphic,
     84        DeleteButtonGraphic
    7785    };
    7886    enum FontSize {
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp

    r651 r846  
    2323#include "qwebview.h"
    2424
     25#include "Page.h"
    2526#include "QWebPageClient.h"
     27#include "Settings.h"
    2628#include "qwebframe.h"
    2729#include "qwebpage_p.h"
    28 
    2930#include "qbitmap.h"
    3031#include "qevent.h"
     
    4546
    4647    void _q_pageDestroyed();
     48    void unsetPageIfExists();
    4749
    4850    QWebView *view;
     
    6062#ifdef Q_WS_MAEMO_5
    6163#include "qabstractkineticscroller.h"
    62 
    63 class QWebViewKineticScroller : public QAbstractKineticScroller {
     64#include "qapplication.h"
     65
     66// QCoreApplication::sendSpontaneousEvent() is private, hence this friend wrapper
     67bool qt_sendSpontaneousEvent(QObject* receiver, QEvent* ev)
     68{
     69    return QCoreApplication::sendSpontaneousEvent(receiver, ev);
     70}
     71
     72class QWebViewKineticScroller : public QObject, public QAbstractKineticScroller {
    6473public:
    65     QWebViewKineticScroller() : QAbstractKineticScroller() {}
    66     // remember the frame where the button was pressed
     74    QWebViewKineticScroller()
     75        : QObject()
     76        , QAbstractKineticScroller()
     77        , m_view(0)
     78        , m_ignoreEvents(false)
     79    {
     80    }
     81
     82    void setWidget(QWebView* widget)
     83    {
     84        if (m_view) {
     85            m_view->removeEventFilter(this);
     86            QWebFrame* frame = m_view->page()->mainFrame();
     87            frame->setScrollBarPolicy(Qt::Vertical, m_oldVerticalScrollBarPolicy);
     88            frame->setScrollBarPolicy(Qt::Horizontal, m_oldHorizontalScrollBarPolicy);
     89        }
     90
     91        m_view = widget;
     92        setParent(m_view);
     93        if (m_view) {
     94            QWebFrame* frame = m_view->page()->mainFrame();
     95            m_oldHorizontalScrollBarPolicy = frame->scrollBarPolicy(Qt::Horizontal);
     96            m_oldVerticalScrollBarPolicy = frame->scrollBarPolicy(Qt::Vertical);
     97            frame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
     98            frame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
     99            m_view->installEventFilter(this);
     100        }
     101    }
     102
     103protected:
    67104    bool eventFilter(QObject* o, QEvent* ev)
    68105    {
     106        if (!o || m_view != o || m_ignoreEvents || !m_view->isEnabled())
     107            return QObject::eventFilter(o, ev);
     108
     109        bool res = false;
     110
    69111        switch (ev->type()) {
    70112        case QEvent::MouseButtonPress: {
     113            // remember the frame where the button was pressed
    71114            QWebFrame* hitFrame = scrollingFrameAt(static_cast<QMouseEvent*>(ev)->pos());
    72115            if (hitFrame)
    73116                m_frame = hitFrame;
     117            // fall through
     118        }
     119        case QEvent::MouseMove:
     120        case QEvent::MouseButtonRelease:
     121        case QEvent::MouseButtonDblClick:
     122            res = handleMouseEvent(static_cast<QMouseEvent*>(ev));
    74123            break;
    75         }
    76124        default:
    77125            break;
    78126        }
    79         return QAbstractKineticScroller::eventFilter(o, ev);
    80     }
    81 
    82 protected:
     127        return res ? true : QObject::eventFilter(o, ev);
     128    }
     129
     130    void cancelLeftMouseButtonPress(const QPoint& /* globalPressPos */)
     131    {
     132        QMouseEvent cmem(QEvent::MouseMove, QPoint(-INT_MAX, -INT_MAX), Qt::LeftButton, QApplication::mouseButtons() | Qt::LeftButton, QApplication::keyboardModifiers());
     133        sendEvent(m_view, &cmem);
     134        QMouseEvent cmer(QEvent::MouseButtonRelease, QPoint(-INT_MAX, -INT_MAX), Qt::LeftButton, QApplication::mouseButtons() & ~Qt::LeftButton, QApplication::keyboardModifiers());
     135        sendEvent(m_view, &cmer);
     136    }
     137
    83138    QWebFrame* currentFrame() const
    84139    {
    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;
     140        if (m_frame)
     141            return m_frame;
     142
     143        if (m_view)
     144            return m_view->page()->mainFrame();
     145
     146        return 0;
    91147    }
    92148
     
    94150    QWebFrame* scrollingFrameAt(const QPoint& pos) const
    95151    {
    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
     152        QWebFrame* hitFrame = 0;
     153        if (m_view) {
     154            QWebFrame* frame = m_view->page()->mainFrame();
     155            hitFrame = frame->hitTestContent(pos).frame();
     156            QSize range = hitFrame->contentsSize() - hitFrame->geometry().size();
     157
     158            while (hitFrame && range.width() <= 1 && range.height() <= 1)
     159                hitFrame = hitFrame->parentFrame();
     160
     161            return hitFrame;
     162        }
     163    }
     164
     165    QPoint maximumScrollPosition() const
    136166    {
    137167        QWebFrame* frame = currentFrame();
    138         return frame->scrollPosition();
     168        QSize s = frame ? frame->contentsSize() - frame->geometry().size() : QSize(0, 0);
     169        return QPoint(qMax(0, s.width()), qMax(0, s.height()));
     170    }
     171
     172    QPoint scrollPosition() const
     173    {
     174        QWebFrame* frame = currentFrame();
     175        return frame ? frame->scrollPosition() : QPoint();
    139176    }
    140177
    141178    QSize viewportSize() const
    142179    {
    143         return static_cast<QWebView*>(widget())->page()->viewportSize();
    144     }
    145 
    146     void setPosition(const QPoint& point, const QPoint& /* overShootDelta */)
     180        return m_view ? m_view->page()->viewportSize() : QSize();
     181    }
     182
     183    void setScrollPosition(const QPoint& point, const QPoint& /* overShootDelta */)
    147184    {
    148185        QWebFrame* frame = currentFrame();
    149         frame->setScrollPosition(point);
    150     }
    151 
     186        if (frame)
     187            frame->setScrollPosition(point);
     188    }
     189
     190    void sendEvent(QWidget* w, QEvent* ev)
     191    {
     192        m_ignoreEvents = true;
     193        qt_sendSpontaneousEvent(w, ev);
     194        m_ignoreEvents = false;
     195    }
     196
     197    QWebView* m_view;
     198    bool m_ignoreEvents;
    152199    QPointer<QWebFrame> m_frame;
    153200    Qt::ScrollBarPolicy m_oldVerticalScrollBarPolicy;
     
    254301#endif
    255302
     303#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     304    setAttribute(Qt::WA_AcceptTouchEvents);
     305#endif
    256306#if defined(Q_WS_MAEMO_5)
    257307    QAbstractKineticScroller* scroller = new QWebViewKineticScroller();
    258     scroller->setWidget(this);
     308    static_cast<QWebViewKineticScroller*>(scroller)->setWidget(this);
     309    setProperty("kineticScroller", QVariant::fromValue(scroller));
    259310#endif
    260311    setAcceptDrops(true);
     
    298349}
    299350
     351void QWebViewPrivate::unsetPageIfExists()
     352{
     353    if (!page)
     354        return;
     355
     356    // if the page client is the special client constructed for
     357    // delegating the responsibilities to a QWidget, we need
     358    // to destroy it.
     359
     360    if (page->d->client && page->d->client->isQWidgetClient())
     361        delete page->d->client;
     362
     363    page->d->client = 0;
     364
     365    // if the page was created by us, we own it and need to
     366    // destroy it as well.
     367
     368    if (page->parent() == view)
     369        delete page;
     370    else
     371        page->disconnect(view);
     372}
     373
    300374/*!
    301375    Makes \a page the new web page of the web view.
     
    311385    if (d->page == page)
    312386        return;
    313     if (d->page) {
    314         d->page->d->client = 0; // unset the page client
    315         if (d->page->parent() == this)
    316             delete d->page;
    317         else
    318             d->page->disconnect(this);
    319     }
     387
     388    d->unsetPageIfExists();
    320389    d->page = page;
     390
    321391    if (d->page) {
    322392        d->page->setView(this);
     
    375445*/
    376446
    377 #if QT_VERSION < 0x040400 && !defined(qdoc)
    378 void QWebView::load(const QWebNetworkRequest &request)
    379 #else
    380447void QWebView::load(const QNetworkRequest &request,
    381448                    QNetworkAccessManager::Operation operation,
    382449                    const QByteArray &body)
    383 #endif
    384 {
    385     page()->mainFrame()->load(request
    386 #if QT_VERSION >= 0x040400
    387                               , operation, body
    388 #endif
    389                              );
     450{
     451    page()->mainFrame()->load(request, operation, body);
    390452}
    391453
     
    521583}
    522584
     585#ifndef QT_NO_ACTION
    523586/*!
    524587    Returns a pointer to a QAction that encapsulates the specified web action \a action.
     
    528591    return page()->action(action);
    529592}
     593#endif
    530594
    531595/*!
     
    741805            d->page->event(e);
    742806#ifndef QT_NO_CURSOR
    743 #if QT_VERSION >= 0x040400
    744807        } else if (e->type() == QEvent::CursorChange) {
    745808            // An unsetCursor will set the cursor to Qt::ArrowCursor.
     
    754817                d->page->d->client->resetCursor();
    755818#endif
     819#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     820        } else if (e->type() == QEvent::TouchBegin
     821                   || e->type() == QEvent::TouchEnd
     822                   || e->type() == QEvent::TouchUpdate) {
     823            d->page->event(e);
     824            if (e->isAccepted())
     825                return true;
    756826#endif
    757827        } else if (e->type() == QEvent::Leave)
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebview.h

    r561 r846  
    2828#include <QtGui/qpainter.h>
    2929#include <QtCore/qurl.h>
    30 #if QT_VERSION >= 0x040400
    3130#include <QtNetwork/qnetworkaccessmanager.h>
    32 #endif
    3331
    3432QT_BEGIN_NAMESPACE
     
    6260
    6361    void load(const QUrl& url);
    64 #if QT_VERSION < 0x040400 && !defined(qdoc)
    65     void load(const QWebNetworkRequest& request);
    66 #else
    6762    void load(const QNetworkRequest& request,
    6863              QNetworkAccessManager::Operation operation = QNetworkAccessManager::GetOperation,
    6964              const QByteArray &body = QByteArray());
    70 #endif
    7165    void setHtml(const QString& html, const QUrl& baseUrl = QUrl());
    7266    void setContent(const QByteArray& data, const QString& mimeType = QString(), const QUrl& baseUrl = QUrl());
     
    8276    QString selectedText() const;
    8377
     78#ifndef QT_NO_ACTION
    8479    QAction* pageAction(QWebPage::WebAction action) const;
     80#endif
    8581    void triggerPageAction(QWebPage::WebAction action, bool checked = false);
    8682
  • trunk/src/3rdparty/webkit/WebKit/qt/ChangeLog

    r769 r846  
     12010-09-12  Martin Smith  <martin.smith@nokia.com>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        doc: Changed the title so lists of contents sort better.
     6
     7        * docs/qtwebkit.qdoc:
     8
     92010-09-12  David Boddie  <david.boddie@nokia.com>
     10
     11        Reviewed by Simon Hausmann.
     12
     13        Doc: More work on the QML documentation.
     14
     15        * declarative/qdeclarativewebview.cpp:
     16
     172010-09-12  Martin Jones  <martin.jones@nokia.com>
     18
     19        Reviewed by Simon Hausmann.
     20
     21        [Qml] Ensure WebView gets focus when an editable node is clicked on.
     22
     23        Task-number: QTBUG-13342
     24
     25        * declarative/qdeclarativewebview.cpp:
     26        (GraphicsWebView::mousePressEvent):
     27
     282010-09-12  David Boddie  <david.boddie@nokia.com>
     29
     30        Reviewed by Simon Hausmann.
     31
     32        Doc: qdoc fixes.
     33
     34        * declarative/qdeclarativewebview.cpp:
     35
     362010-09-12  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
     37
     38        Reviewed by Simon Hausmann.
     39
     40        [Qt] let WebKit inject itself into the qt configuration
     41
     42        Task-number: QTBUG-12379
     43
     44        * qt_webkit_version.pri: Use the faster + instead of *
     45        operator to add webkit to the config.
     46
     472010-09-12  Martin Smith  <martin.smith@nokia.com>
     48
     49        Reviewed by Simon Hausmann.
     50
     51        [Qt] Fix group of declarative web view in QML docs.
     52
     53        * declarative/qdeclarativewebview.cpp:
     54
     552010-08-20  Girish Ramakrishnan  <girish@forwardbias.in>
     56
     57        Reviewed by Ariya Hidayat.
     58
     59        [Qt] Allow wmode=transparent in QWebView on Maemo5 after r65775.
     60       
     61        https://bugs.webkit.org/show_bug.cgi?id=44043
     62
     63        * WebCoreSupport/FrameLoaderClientQt.cpp:
     64        (WebCore::FrameLoaderClientQt::createPlugin):
     65
     662010-08-19  Girish Ramakrishnan  <girish@forwardbias.in>
     67
     68        Reviewed by Kenneth Christiansen.
     69
     70        [Qt] Inject wmode=opaque for both QWebView and QGraphicsWebView on Maemo5
     71        as Flash XEmbed support is flaky.
     72
     73        https://bugs.webkit.org/show_bug.cgi?id=44043
     74
     75        * WebCoreSupport/FrameLoaderClientQt.cpp:
     76        (WebCore::FrameLoaderClientQt::createPlugin):
     77
     782010-08-05  David Leong  <david.leong@nokia.com>
     79
     80        Reviewed by Simon Hausmann.
     81
     82        [Qt] Input mode states are not reset after entering a password field
     83        https://bugs.webkit.org/show_bug.cgi?id=43530
     84
     85        Input mode hints are not reset if clicking on password <input> elements then
     86        clicking on <textarea> elements
     87
     88        * WebCoreSupport/EditorClientQt.cpp:
     89        (WebCore::EditorClientQt::setInputMethodState):
     90        * tests/qwebview/resources/input_types.html:
     91        * tests/qwebview/tst_qwebview.cpp:
     92        (tst_QWebView::focusInputTypes):
     93
     94
     952010-07-27  Simon Hausmann  <simon.hausmann@nokia.com>
     96
     97        Reviewed by Tor Arne VestbÞ.
     98
     99        [Qt] Incorrect input method hints
     100        https://bugs.webkit.org/show_bug.cgi?id=43037
     101
     102        Properly set or reset all input method hints when
     103        activating input fields.
     104
     105        * WebCoreSupport/EditorClientQt.cpp:
     106        (WebCore::EditorClientQt::setInputMethodState):
     107        * tests/qwebview/tst_qwebview.cpp:
     108        (tst_QWebView::focusInputTypes): Extended unit test to verify that we
     109        reset hints.
     110
     1112009-10-30  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     112
     113        Reviewed by Kenneth Rohde Christiansen.
     114
     115        [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml()
     116
     117        This ensures that long-running JavaScript (for example due to a modal alert() dialog),
     118        will not trigger a deferred load after only 500ms (the default tokenizer delay) while
     119        still giving a reasonable timeout (10 seconds) to prevent deadlock.
     120
     121        https://bugs.webkit.org/show_bug.cgi?id=29381
     122
     123        * Api/qwebframe.cpp: Document the behaviour
     124        * WebCoreSupport/FrameLoaderClientQt.cpp: set the custom tokenizer delay for substitute loads
     125        * tests/qwebframe/tst_qwebframe.cpp: Add test
     126
     1272010-07-07  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     128
     129        Reviewed by Darin Adler.
     130
     131        Prevent assertion/duplicate loads for non-deferred subtitute-data loads
     132
     133        https://bugs.webkit.org/show_bug.cgi?id=30879
     134
     135        MainResourceLoader uses the member m_initialRequest to store requests for future
     136        deferred loads. When doing the actual load in handleDataLoadNow(), we therefore
     137        have to clear this request so that subsequent entries into the loader will not
     138        start yet another load.
     139
     140        This can happen as a result of a PageGroupLoadDeferrer going out of scope when
     141        returning from Chrome::runJavaScriptAlert(), which calls setDeferredLoading(false),
     142        but only in the case of using both substitute-data and non-deferred main resource
     143        load together. That's why two new DRT functions were added:
     144
     145         * queueLoadHTMLString()
     146         * setDeferMainResourceLoad()
     147
     148        The change adds DRT hooks for Mac, Win and Qt for these two functions. For Mac
     149        and Win the hook uses new SPI in WebDataSource. For Qt a new static member was
     150        added to the FrameLoaderClientQt and accessed though DumpRenderTreeSupportQt.
     151
     152        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
     153        (DumpRenderTreeSupportQt::setDeferMainResourceDataLoad):
     154        * WebCoreSupport/DumpRenderTreeSupportQt.h:
     155        * WebCoreSupport/FrameLoaderClientQt.cpp:
     156        (WebCore::FrameLoaderClientQt::createDocumentLoader):
     157        * WebCoreSupport/FrameLoaderClientQt.h:
     158
     1592010-07-23  David Boddie  <dboddie@trolltech.com>
     160
     161        Reviewed by Simon Hausmann.
     162
     163        Doc: Fixed incorrect QML property type.
     164
     165        * declarative/qdeclarativewebview.cpp:
     166
     1672010-07-23  Simon Hausmann  <simon.hausmann@nokia.com>
     168
     169        [Qt] Build fix for Qt apps
     170
     171        Add webkit to QT_CONFIG. qconfig.pri will read qt_webkit_version.pri and
     172        that's how it will pick up webkit in QT_CONFIG.
     173
     174        * qt_webkit_version.pri:
     175
     1762010-07-09  Kent Hansen  <kent.hansen@nokia.com>
     177
     178        Reviewed by Kenneth Rohde Christiansen.
     179
     180        [Qt] Skip test that never terminates on maemo5
     181
     182        Due to https://bugs.webkit.org/show_bug.cgi?id=38538
     183        the tst_QWebPage::infiniteLoopJS() autotest never terminates.
     184        Skip the test so that the test case may run to completion.
     185
     186        Patch by Dominik Holland <dominik.holland@nokia.com>
     187
     188        * tests/qwebpage/tst_qwebpage.cpp:
     189        (tst_QWebPage::infiniteLoopJS):
     190
     1912010-07-09  Simon Hausmann <simon.hausmann@nokia.com>
     192
     193        Unreviewed trivial Symbian build fix.
     194
     195        [Qt] Fix the Symbian build when compiling without S60
     196
     197        Use Q_OS_SYMBIAN instead of Q_WS_S60 for the user agent
     198        determination.
     199
     200        * Api/qwebpage.cpp:
     201        (QWebPage::userAgentForUrl):
     202
     2032010-07-09  Kristian Amlie  <kristian.amlie@nokia.com>
     204
     205        Reviewed by Simon Hausmann.
     206
     207        [Qt] Fixed Qt symbian/linux-armcc mkspec when configured with -qtlibinfix.
     208
     209        * declarative/declarative.pro: Use QT_LIBINFIX.
     210
     2112010-06-01  Raine Makelainen  <raine.makelainen@nokia.com>
     212
     213        Reviewed by Simon Hausmann.
     214
     215        [Qt]: REGRESSION(r58703): QWebSettings::JavascriptCanAccessClipboard has wrong case in "Javascript" part.
     216        https://bugs.webkit.org/show_bug.cgi?id=39878       
     217
     218        QWebSettings::JavaScriptCanAccessClipboard reverted back to
     219        QWebSettings::JavascriptCanAccessClipboard. QWebSettings::DOMPasteAllowed enum removed.
     220
     221        Value of QWebSettings::JavascriptCanAccessClipboard to setDOMPasteAllowed and
     222        setJavaScriptCanAccessClipboard of WebCore::Settings.
     223
     224        * Api/qwebsettings.cpp:
     225        (QWebSettingsPrivate::apply):
     226        * Api/qwebsettings.h:
     227
     2282010-05-03  Abhishek Arya  <inferno@chromium.org>
     229
     230        Reviewed by Adam Barth.
     231
     232        Add support for controlling clipboard access from javascript.
     233        Clipboard access from javascript is disabled by default.
     234        https://bugs.webkit.org/show_bug.cgi?id=27751
     235
     236        * Api/qwebsettings.cpp:
     237        (QWebSettingsPrivate::apply):
     238        * Api/qwebsettings.h:
     239
     2402010-03-24  Kent Hansen  <kent.hansen@nokia.com>
     241
     242        Reviewed by Simon Hausmann.
     243
     244        [Qt] Rename QWebSettings::XSSAuditorEnabled to XSSAuditingEnabled
     245        https://bugs.webkit.org/show_bug.cgi?id=36522
     246
     247        For consistency with other QWebSettings attributes.
     248
     249        * Api/qwebsettings.cpp:
     250        (QWebSettingsPrivate::apply):
     251        * Api/qwebsettings.h:
     252
     2532010-05-19  Antti Koivisto  <koivisto@iki.fi>
     254
     255        Rubber-stamped by Kenneth Rohde Christiansen.
     256
     257        [Qt] TiledBackingStore updates broken when not using resizesToContents mode
     258        https://bugs.webkit.org/show_bug.cgi?id=39359
     259       
     260        Put the back logic that was lost in refactoring.
     261
     262        * WebCoreSupport/ChromeClientQt.cpp:
     263        (WebCore::ChromeClientQt::visibleRectForTiledBackingStore):
     264        * WebCoreSupport/PageClientQt.cpp:
     265        (WebCore::PageClientQGraphicsWidget::graphicsItemVisibleRect):
     266        * WebCoreSupport/PageClientQt.h:
     267        (WebCore::PageClientQWidget::viewResizesToContentsEnabled):
     268        (WebCore::PageClientQGraphicsWidget::viewResizesToContentsEnabled):
     269
     2702010-07-01  Bea Lam  <bea.lam@nokia.com>
     271
     272        Reviewed by Simon Hausmann.
     273
     274        [Qt] Doc improvements for QDeclarativeWebView
     275
     276        * declarative/qdeclarativewebview.cpp:
     277
     2782010-07-01  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     279
     280        Reviewed by Kenneth Rohde Christiansen.
     281
     282        [Qt] Create QComboBoxes when clicked and destroy on hide.
     283        https://bugs.webkit.org/show_bug.cgi?id=41451
     284
     285        Currently a QComboBox is created for each RenderMenuList and
     286        it gets destroyed either when the RenderMenuList or the
     287        QWebView (its Qt parent) is destroyed. This cause a crash
     288        when the QWebView is destroyed before the render tree (which
     289        is kept in cache).
     290
     291        This patch aim to destroy the QComboBox as soon as its popup
     292        gets hidden, and likewise, create it only when the popup is
     293        requested to be shown.
     294        It also removes the unneeded reference to the QGraphicsProxyWidget,
     295        destroying the QComboBox automatically destroys its bound
     296        proxywidget.
     297
     298        * WebCoreSupport/QtFallbackWebPopup.cpp:
     299        (WebCore::QtFallbackWebPopupCombo::hidePopup):
     300        (WebCore::QtFallbackWebPopup::QtFallbackWebPopup):
     301        (WebCore::QtFallbackWebPopup::~QtFallbackWebPopup):
     302        (WebCore::QtFallbackWebPopup::show):
     303        (WebCore::QtFallbackWebPopup::hide):
     304        (WebCore::QtFallbackWebPopup::destroyPopup):
     305        (WebCore::QtFallbackWebPopup::populate):
     306        * WebCoreSupport/QtFallbackWebPopup.h:
     307
     3082010-06-30  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     309
     310        Reviewed by Kenneth Rohde Christiansen.
     311
     312        [Qt] Make sure we catch closed QComboBox popups.
     313        https://bugs.webkit.org/show_bug.cgi?id=39019
     314
     315        The way it works currently is using the QComboBox::show/hidePopup
     316        virtual method to catch popup requests in the middle. There is
     317        some cases however that the popup widget gets closed without
     318        going through the hidePopup method.
     319
     320        This patch adds an event filter to the popup's view to know when
     321        it gets closed and calls hidePopup to call our handling code.
     322        This may get hidePopup called twice but this shouldn't have any
     323        effect.
     324
     325        * WebCoreSupport/QtFallbackWebPopup.cpp:
     326        (WebCore::QtFallbackWebPopupCombo::QtFallbackWebPopupCombo):
     327        (WebCore::QtFallbackWebPopupCombo::eventFilter):
     328        * WebCoreSupport/QtFallbackWebPopup.h:
     329
     3302010-06-25  Luiz Agostini  <luiz.agostini@openbossa.org>
     331
     332        Reviewed by Kenneth Rohde Christiansen.
     333
     334        [Qt] QtWebKit crashes if <select>'s render changes in its onchange event
     335        https://bugs.webkit.org/show_bug.cgi?id=41164
     336
     337        QtWebKit crashes if <select>'s renderer changes in its onchange event.
     338
     339        * WebCoreSupport/QtFallbackWebPopup.cpp:
     340        (WebCore::QtFallbackWebPopup::~QtFallbackWebPopup):
     341
     3422010-06-28  Andreas Kling  <andreas.kling@nokia.com>
     343
     344        Reviewed by Simon Hausmann.
     345
     346        [Qt] QGraphicsWebView crash when calling setScale() before setUrl()
     347        https://bugs.webkit.org/show_bug.cgi?id=40000
     348
     349        Check 'page' before dereference in _q_scaleChanged()
     350        Autotest included.
     351
     352        * Api/qgraphicswebview.cpp:
     353        (QGraphicsWebViewPrivate::_q_scaleChanged):
     354        * tests/qgraphicswebview/tst_qgraphicswebview.cpp:
     355        (tst_QGraphicsWebView::crashOnSetScaleBeforeSetUrl):
     356
     3572010-06-24  Simon Hausmann  <simon.hausmann@nokia.com>
     358
     359        Unreviewed Symbian build fix.
     360
     361        The QML WebKit integration needs to be part of QtWebKit.sis
     362
     363        * declarative/declarative.pro: Removed non-working deployment.
     364
     3652010-06-23  David Boddie  <dboddie@trolltech.com>
     366
     367        Reviewed by Simon Hausmann.
     368
     369        [Qt] Doc: Fixed documentation errors.
     370
     371        * docs/qtwebkit-bridge.qdoc:
     372
     3732010-06-23  Alessandro Portale  <alessandro.portale@nokia.com>
     374
     375        Reviewed by Simon Hausmann.
     376
     377        [Qt] Provide the Webkit Qml plugin with a UID3 on Symbian
     378
     379        ...otherwise we cannot Symbian sign it.
     380
     381        * declarative/declarative.pro:
     382
     3832010-06-23  Simon Hausmann  <simon.hausmann@nokia.com>
     384
     385        Unreviewed Qt package build fix.
     386
     387        When building without build-webkit, set OUTPUT_DIR if necessary, like
     388        in the other .pro files.
     389
     390        * declarative/declarative.pro:
     391
     3922010-06-22  Tasuku Suzuki  <tasuku.suzuki@nokia.com>
     393
     394        Reviewed by Simon Hausmann.
     395
     396        [Qt] Fix compilation with QT_NO_COMBOBOX.
     397
     398        * WebCoreSupport/ChromeClientQt.cpp:
     399        (WebCore::ChromeClientQt::createSelectPopup):
     400
     4012010-06-11  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     402
     403        Reviewed by nobody, build fix.
     404
     405        [Qt] Second fix attempt for the build break introduced by r61002.
     406
     407        * Api/qwebpage.cpp:
     408        (QWebPagePrivate::QWebPagePrivate):
     409
     4102010-06-11  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     411
     412        Reviewed by nobody, build fix.
     413
     414        [Qt] Fix build break introduced by r61002.
     415
     416        * Api/qwebpage.cpp:
     417        (QWebPagePrivate::QWebPagePrivate):
     418
     4192010-05-31  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     420
     421        Reviewed by Simon Hausmann.
     422
     423        [Qt] Implement the simple text code path.
     424        https://bugs.webkit.org/show_bug.cgi?id=40077
     425
     426        Remove the FONT_FAST_PATH macro and use the Qt's
     427        fast text implementation instead of the one of WebKit.
     428
     429        The Qt::TextBypassShaping flag is used to tell Qt to
     430        only use the glyph advances.
     431
     432        Qt 4.7 is needed to get this flag thus the complex path is always
     433        used if QtWebKit is compiled against an earlier version.
     434
     435        Contrary to the WebKit's implementation, the complex code path
     436        is taken if the text is RightToLeft, justified or is formatted
     437        with non-zero letter or word spacing.
     438
     439        * Api/qwebpage.cpp:
     440        (QWebPagePrivate::QWebPagePrivate):
     441
     4422010-06-21  Simon Hausmann  <simon.hausmann@nokia.com>
     443
     444        Unreviewed build fix.
     445
     446        [Qt] Fix package builds
     447
     448        Don't use rpath unless we're building inside the trunk.
     449
     450        * declarative/declarative.pro:
     451
     4522010-06-19  Mirko Damiani  <mirko@develer.com>
     453
     454        Reviewed by Simon Hausmann.
     455
     456        [Qt] Avoid truncation of zoom factor in QWebFrame's print function.
     457        https://bugs.webkit.org/show_bug.cgi?id=40662
     458
     459        The zoom factor is a qreal number but its value is truncated to an
     460        integer. So a cast to qreal is needed to avoid this issue.
     461
     462        * Api/qwebframe.cpp:
     463        (QWebFrame::print):
     464
     4652010-06-19  No'am Rosenthal  <noam.rosenthal@nokia.com>
     466
     467        Reviewed by Simon Hausmann.
     468
     469        Bridge documentation: some snippets have the wrong indentation
     470        https://bugs.webkit.org/show_bug.cgi?id=40717
     471
     472        Fixed code snippets
     473
     474        * docs/webkitsnippets/qtwebkit_bridge_snippets.cpp:
     475        (wrapInFunction):
     476
     4772010-06-19  Olivier Goffart  <olivier.goffart@nokia.com>
     478
     479        Reviewed by Kenneth Rohde Christiansen.
     480
     481        [Qt] Compilation in QWebPagePrivate::timerEvent with clang
     482        https://bugs.webkit.org/show_bug.cgi?id=40714
     483
     484        QObject::timerEvent is protected and cannot be accessed by QWebPagePrivate
     485        with clang
     486
     487        QWebPagePrivate is a friend of QWebPage and then should have access to
     488        all protected members of parents of QWebPage, including QObject.
     489        But the clang team do not want to conform to this aspect of the specification
     490        because "It is either a drafting error or a horrible mistake."
     491        See http://llvm.org/bugs/show_bug.cgi?id=6840
     492
     493        This change is better because QWebPage does not reimplement the timerEvent
     494        (QWebPagePrivate::timerEvent is called from QWebPage::event)
     495        So customers that would reimplement their own timerEvent
     496        for their own timer now get a chance to catch them.
     497
     498
     499        * Api/qwebpage.cpp:
     500        (QWebPagePrivate::timerEvent):
     501
     5022010-06-18  Alexis Menard  <alexis.menard@nokia.com>
     503
     504        Reviewed by Simon Hausmann.
     505
     506        [Qt] Fix documentation for the declarative module import.
     507
     508        * declarative/qdeclarativewebview.cpp:
     509
     5102010-06-18  Simon Hausmann  <simon.hausmann@nokia.com>
     511
     512        Reviewed by Antti Koivisto.
     513
     514        REGRESSION(r60958) [Qt] qwebpage::inputMethods auto-test fails
     515        https://bugs.webkit.org/show_bug.cgi?id=40830
     516
     517        When activating a regular input method field, always set or unset the ImhHiddenText
     518        input method hint.
     519
     520        * WebCoreSupport/EditorClientQt.cpp:
     521        (WebCore::EditorClientQt::setInputMethodState):
     522
     5232010-06-10  Raine Makelainen  <raine.makelainen@nokia.com>
     524
     525        Reviewed by Kenneth Rohde Christiansen.
     526
     527        Impossible to set input method hints based HTML5 input types
     528        https://bugs.webkit.org/show_bug.cgi?id=40107
     529
     530        EditorClientQt to set input method hints for "number", "tel",
     531        "email", and "url" HTML input elements.
     532
     533        Tests for HTML input elements and input method hints added for
     534        QGraphicsWebView and QWebView.
     535
     536        * WebCoreSupport/EditorClientQt.cpp:
     537        (WebCore::EditorClientQt::setInputMethodState):
     538        * tests/qgraphicswebview/resources/input_types.html: Added.
     539        * tests/qgraphicswebview/tst_qgraphicswebview.cpp:
     540        (GraphicsWebView::GraphicsWebView):
     541        (GraphicsWebView::fireMouseClick):
     542        (tst_QGraphicsWebView::focusInputTypes):
     543        * tests/qgraphicswebview/tst_qgraphicswebview.qrc: Added.
     544        * tests/qwebview/resources/input_types.html: Added.
     545        * tests/qwebview/tst_qwebview.cpp:
     546        (WebView::fireMouseClick):
     547        (tst_QWebView::focusInputTypes):
     548        * tests/qwebview/tst_qwebview.qrc:
     549
     5502010-06-18  Alexis Menard  <alexis.menard@nokia.com>
     551
     552        Reviewed by Simon Hausmann.
     553
     554        Fix documentation issue on the onAlert handler.
     555        Fix compilation issue with QT_NO_ACTION.
     556
     557        * declarative/qdeclarativewebview.cpp:
     558        * declarative/qdeclarativewebview_p.h:
     559
     5602010-06-18  Alexis Menard  <alexis.menard@nokia.com>
     561
     562        Reviewed by Simon Hausmann.
     563
     564        [Qt] Change the target path to QtWebKit.
     565
     566        * declarative/declarative.pro:
     567
     5682010-06-17  Robert Hogan  <robert@webkit.org>
     569
     570        [Qt] Build fix
     571
     572        Unreviewed.
     573
     574        Remove includes in qdeclarativewebview*.* that rely on an installation
     575        of QtWebKit.
     576
     577        * declarative/qdeclarativewebview.cpp:
     578        * declarative/qdeclarativewebview_p.h:
     579
     5802010-06-17  Alexis Menard  <alexis.menard@nokia.com>
     581
     582        Reviewed by Kenneth Rohde Christiansen.
     583
     584        [Qt] Upstream the WebKit QML integration plugin
     585        https://bugs.webkit.org/show_bug.cgi?id=40050
     586
     587        Add to the Qt port the QML WebKit integration plugin.
     588        QDeclarativeWebView is creating the item and expose
     589        properties. The C++ API is not public, only the
     590        properties are.
     591
     592        * declarative/declarative.pro: Added.
     593        * declarative/plugin.cpp: Added.
     594        (WebKitQmlPlugin::registerTypes):
     595        * declarative/qdeclarativewebview.cpp: Added.
     596        (QDeclarativeWebViewPrivate::QDeclarativeWebViewPrivate):
     597        (QDeclarativeWebViewPrivate::):
     598        (QDeclarativeWebViewPrivate::windowObjectsAppend):
     599        (GraphicsWebView::GraphicsWebView):
     600        (GraphicsWebView::mousePressEvent):
     601        (GraphicsWebView::mouseReleaseEvent):
     602        (GraphicsWebView::mouseDoubleClickEvent):
     603        (GraphicsWebView::timerEvent):
     604        (GraphicsWebView::mouseMoveEvent):
     605        (QDeclarativeWebView::QDeclarativeWebView):
     606        (QDeclarativeWebView::~QDeclarativeWebView):
     607        (QDeclarativeWebView::init):
     608        (QDeclarativeWebView::componentComplete):
     609        (QDeclarativeWebView::status):
     610        (QDeclarativeWebView::progress):
     611        (QDeclarativeWebView::doLoadStarted):
     612        (QDeclarativeWebView::doLoadProgress):
     613        (QDeclarativeWebView::pageUrlChanged):
     614        (QDeclarativeWebView::doLoadFinished):
     615        (QDeclarativeWebView::url):
     616        (QDeclarativeWebView::setUrl):
     617        (QDeclarativeWebView::preferredWidth):
     618        (QDeclarativeWebView::setPreferredWidth):
     619        (QDeclarativeWebView::preferredHeight):
     620        (QDeclarativeWebView::setPreferredHeight):
     621        (QDeclarativeWebView::evaluateJavaScript):
     622        (QDeclarativeWebView::updateDeclarativeWebViewSize):
     623        (QDeclarativeWebView::initialLayout):
     624        (QDeclarativeWebView::updateContentsSize):
     625        (QDeclarativeWebView::geometryChanged):
     626        (QDeclarativeWebView::javaScriptWindowObjects):
     627        (QDeclarativeWebView::qmlAttachedProperties):
     628        (QDeclarativeWebViewPrivate::updateWindowObjects):
     629        (QDeclarativeWebView::renderingEnabled):
     630        (QDeclarativeWebView::setRenderingEnabled):
     631        (QDeclarativeWebView::heuristicZoom):
     632        (QDeclarativeWebView::pressGrabTime):
     633        (QDeclarativeWebView::setPressGrabTime):
     634        (QDeclarativeWebView::backAction):
     635        (QDeclarativeWebView::forwardAction):
     636        (QDeclarativeWebView::reloadAction):
     637        (QDeclarativeWebView::stopAction):
     638        (QDeclarativeWebView::title):
     639        (QDeclarativeWebView::icon):
     640        (QDeclarativeWebView::setStatusText):
     641        (QDeclarativeWebView::windowObjectCleared):
     642        (QDeclarativeWebView::statusText):
     643        (QDeclarativeWebView::page):
     644        (QDeclarativeWebView::settingsObject):
     645        (QDeclarativeWebView::setPage):
     646        (QDeclarativeWebView::load):
     647        (QDeclarativeWebView::html):
     648        (QDeclarativeWebView::setHtml):
     649        (QDeclarativeWebView::setContent):
     650        (QDeclarativeWebView::history):
     651        (QDeclarativeWebView::settings):
     652        (QDeclarativeWebView::createWindow):
     653        (QDeclarativeWebView::newWindowComponent):
     654        (QDeclarativeWebView::setNewWindowComponent):
     655        (QDeclarativeWebView::newWindowParent):
     656        (QDeclarativeWebView::setNewWindowParent):
     657        (QDeclarativeWebView::contentsSize):
     658        (QDeclarativeWebView::contentsScale):
     659        (QDeclarativeWebView::setContentsScale):
     660        (QDeclarativeWebView::elementAreaAt):
     661        (QDeclarativeWebPage::QDeclarativeWebPage):
     662        (QDeclarativeWebPage::~QDeclarativeWebPage):
     663        (QDeclarativeWebPage::chooseFile):
     664        (QDeclarativeWebPage::javaScriptAlert):
     665        (QDeclarativeWebPage::javaScriptConfirm):
     666        (QDeclarativeWebPage::javaScriptPrompt):
     667        (QDeclarativeWebPage::viewItem):
     668        (QDeclarativeWebPage::createWindow):
     669        * declarative/qdeclarativewebview_p.h: Added.
     670        (QDeclarativeWebView::):
     671        (QDeclarativeWebView::isComponentCompletePublic):
     672        (QDeclarativeWebViewAttached::QDeclarativeWebViewAttached):
     673        (QDeclarativeWebViewAttached::windowObjectName):
     674        (QDeclarativeWebViewAttached::setWindowObjectName):
     675        (QDeclarativeWebSettings::QDeclarativeWebSettings):
     676        (QDeclarativeWebSettings::standardFontFamily):
     677        (QDeclarativeWebSettings::setStandardFontFamily):
     678        (QDeclarativeWebSettings::fixedFontFamily):
     679        (QDeclarativeWebSettings::setFixedFontFamily):
     680        (QDeclarativeWebSettings::serifFontFamily):
     681        (QDeclarativeWebSettings::setSerifFontFamily):
     682        (QDeclarativeWebSettings::sansSerifFontFamily):
     683        (QDeclarativeWebSettings::setSansSerifFontFamily):
     684        (QDeclarativeWebSettings::cursiveFontFamily):
     685        (QDeclarativeWebSettings::setCursiveFontFamily):
     686        (QDeclarativeWebSettings::fantasyFontFamily):
     687        (QDeclarativeWebSettings::setFantasyFontFamily):
     688        (QDeclarativeWebSettings::minimumFontSize):
     689        (QDeclarativeWebSettings::setMinimumFontSize):
     690        (QDeclarativeWebSettings::minimumLogicalFontSize):
     691        (QDeclarativeWebSettings::setMinimumLogicalFontSize):
     692        (QDeclarativeWebSettings::defaultFontSize):
     693        (QDeclarativeWebSettings::setDefaultFontSize):
     694        (QDeclarativeWebSettings::defaultFixedFontSize):
     695        (QDeclarativeWebSettings::setDefaultFixedFontSize):
     696        (QDeclarativeWebSettings::autoLoadImages):
     697        (QDeclarativeWebSettings::setAutoLoadImages):
     698        (QDeclarativeWebSettings::javascriptEnabled):
     699        (QDeclarativeWebSettings::setJavascriptEnabled):
     700        (QDeclarativeWebSettings::javaEnabled):
     701        (QDeclarativeWebSettings::setJavaEnabled):
     702        (QDeclarativeWebSettings::pluginsEnabled):
     703        (QDeclarativeWebSettings::setPluginsEnabled):
     704        (QDeclarativeWebSettings::privateBrowsingEnabled):
     705        (QDeclarativeWebSettings::setPrivateBrowsingEnabled):
     706        (QDeclarativeWebSettings::javascriptCanOpenWindows):
     707        (QDeclarativeWebSettings::setJavascriptCanOpenWindows):
     708        (QDeclarativeWebSettings::javascriptCanAccessClipboard):
     709        (QDeclarativeWebSettings::setJavascriptCanAccessClipboard):
     710        (QDeclarativeWebSettings::developerExtrasEnabled):
     711        (QDeclarativeWebSettings::setDeveloperExtrasEnabled):
     712        (QDeclarativeWebSettings::linksIncludedInFocusChain):
     713        (QDeclarativeWebSettings::setLinksIncludedInFocusChain):
     714        (QDeclarativeWebSettings::zoomTextOnly):
     715        (QDeclarativeWebSettings::setZoomTextOnly):
     716        (QDeclarativeWebSettings::printElementBackgrounds):
     717        (QDeclarativeWebSettings::setPrintElementBackgrounds):
     718        (QDeclarativeWebSettings::offlineStorageDatabaseEnabled):
     719        (QDeclarativeWebSettings::setOfflineStorageDatabaseEnabled):
     720        (QDeclarativeWebSettings::offlineWebApplicationCacheEnabled):
     721        (QDeclarativeWebSettings::setOfflineWebApplicationCacheEnabled):
     722        (QDeclarativeWebSettings::localStorageDatabaseEnabled):
     723        (QDeclarativeWebSettings::setLocalStorageDatabaseEnabled):
     724        (QDeclarativeWebSettings::localContentCanAccessRemoteUrls):
     725        (QDeclarativeWebSettings::setLocalContentCanAccessRemoteUrls):
     726        * declarative/qmldir: Added.
     727        * docs/qtwebkit.qdocconf:
     728
     7292010-06-17  Mark Brand  <mabrand@mabrand.nl>
     730
     731        Reviewed by Simon Hausmann.
     732
     733        [Qt] use "win32-g++*" scope to match all MinGW makespecs
     734
     735        The scope "win32-g++" comes from the name of the makespec. However, it
     736        is frequently used to check for MinGW. This works fine as long as
     737        win32-g++ is the only makespec for MinGW. Now we need the wildcard
     738        to cover "win32-g++-cross" as well.
     739
     740        * Api/DerivedSources.pro:
     741
     7422010-05-28  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
     743
     744        Reviewed by Simon Hausmann, Antti Koivisto
     745
     746        [Qt] Add internal Qt Api to configure repaint throttling parameters.
     747        https://bugs.webkit.org/show_bug.cgi?id=38401
     748
     749        * Api/qwebpage.cpp:
     750        (QWebPagePrivate::dynamicPropertyChangeEvent):
     751
     7522010-06-12  Dawit Alemayehu  <adawit@kde.org>
     753
     754        Reviewed by Kenneth Rohde Christiansen.
     755
     756        Added an attribute to enable/disable site specific quirks mode in WebKit.
     757        The attribute is enabled by default.
     758
     759        https://bugs.webkit.org/show_bug.cgi?id=40073
     760
     761        * Api/qwebsettings.cpp:
     762        (QWebSettingsPrivate::apply):
     763        (QWebSettings::QWebSettings):
     764        * Api/qwebsettings.h:
     765
     7662010-06-09  Pierre Rossi  <pierre.rossi@nokia.com>
     767
     768        Reviewed by Kenneth Rohde Christiansen.
     769
     770        QWebPage::findText() does not clear selection when passed empty string
     771        https://bugs.webkit.org/show_bug.cgi?id=31779
     772
     773        * Api/qwebpage.cpp:
     774        (QWebPage::findText):
     775        * tests/qwebpage/tst_qwebpage.cpp:
     776        (tst_QWebPage::findText):
     777
     7782010-06-12  No'am Rosenthal  <noam.rosenthal@nokia.com>
     779
     780        Reviewed by Kenneth Rohde Christiansen.
     781
     782        [Qt] Add documentation to the QtWebkit bridge
     783        https://bugs.webkit.org/show_bug.cgi?id=35861
     784
     785        The previous accepted patch was actually a faulty one; It was hard to trace since it's just a documentation
     786        change. The new patch amends that, with the correct snippets and grammar fixes.
     787
     788        * docs/qtwebkit-bridge.qdoc:
     789        * docs/webkitsnippets/qtwebkit_bridge_snippets.cpp:
     790        (wrapInFunction):
     791
     7922010-06-11  Jesus Sanchez-Palencia  <jesus@webkit.org>
     793
     794        Reviewed by Kenneth Rohde Christiansen.
     795
     796        [Qt] Typo error in QWebPluginFactory Documentation
     797        https://bugs.webkit.org/show_bug.cgi?id=40490
     798
     799        * Api/qwebpluginfactory.cpp:
     800
     8012010-06-10  Andy Shaw  <andy.shaw@nokia.com>
     802
     803        Reviewed by Simon Hausmann.
     804
     805        REGRESSION: [Qt] When dragging onto a page that handles the drag in Javascript it will be a move and not a copy by default
     806        https://bugs.webkit.org/show_bug.cgi?id=40401
     807
     808        The correct pattern in Qt for Dnd events is to use acceptProposedAction() instead
     809        of accept().
     810
     811        * Api/qwebpage.cpp:
     812        (QWebPagePrivate::dragEnterEvent):
     813        (QWebPagePrivate::dragMoveEvent):
     814        (QWebPagePrivate::dropEvent):
     815
     8162010-06-02  Tasuku Suzuki  <tasuku.suzuki@nokia.com>
     817
     818        Reviewed by Shinichiro Hamaji.
     819
     820        [Qt] Fix compilation with QT_NO_PROPERTIES
     821        https://bugs.webkit.org/show_bug.cgi?id=38324
     822
     823        * Api/qwebpage.cpp:
     824        (QWebPage::event):
     825        * Api/qwebpage_p.h:
     826        * WebCoreSupport/InspectorClientQt.cpp:
     827        (WebCore::InspectorClientQt::openInspectorFrontend):
     828
     8292010-05-17  Tasuku Suzuki  <tasuku.suzuki@nokia.com>
     830
     831        Reviewed by Kenneth Rohde Christiansen.
     832
     833        [Qt] Fix compilation with QT_NO_COMBOBOX
     834        https://bugs.webkit.org/show_bug.cgi?id=38324
     835
     836        * WebCoreSupport/ChromeClientQt.cpp:
     837        (WebCore::ChromeClientQt::createSelectPopup):
     838        * WebCoreSupport/QtFallbackWebPopup.cpp:
     839        * WebCoreSupport/QtFallbackWebPopup.h:
     840
     8412010-05-02  Tasuku Suzuki  <tasuku.suzuki@nokia.com>
     842
     843        Reviewed by Simon Hausmann.
     844
     845        [Qt] Fix compilation with QT_NO_BEARERMANAGEMENT
     846        https://bugs.webkit.org/show_bug.cgi?id=38324
     847
     848        * Api/qwebsettings.cpp:
     849
     8502010-03-24  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
     851
     852        Reviewed by Laszlo Gombos.
     853
     854        Auto-uppercase and predictive text need to be disabled for S60 (as for maemo)
     855        https://bugs.webkit.org/show_bug.cgi?id=33176
     856
     857        * WebCoreSupport/EditorClientQt.cpp:
     858
     8592010-06-01  Noam Rosenthal  <noam.rosenthal@nokia.com>
     860
     861        Reviewed by Kenneth Rohde Christiansen.
     862
     863        [Qt] Add documentation to the QtWebkit bridge
     864        https://bugs.webkit.org/show_bug.cgi?id=35861
     865
     866        This patch includes comprehensive qdoc documentation for the QtWebkit bridge.
     867
     868        * docs/qtwebkit-bridge.qdoc: Added.
     869        * docs/qtwebkit.qdoc:
     870        * docs/webkitsnippets/doc_src_qtscript.qdoc: Added.
     871        * docs/webkitsnippets/qtwebkit_bridge_snippets.cpp: Added.
     872        (wrapInFunction):
     873
     8742010-06-01  Simon Hausmann  <simon.hausmann@nokia.com>
     875
     876        Reviewed by Laszlo Gombos.
     877
     878        [Qt] Rename versioning .pri file to what Qt's mkspecs/features/qt.pri expects.
     879
     880        * qt_webkit_version.pri: Renamed from WebKit/qt/qtwebkit_version.pri.
     881
     8822010-05-31  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
     883
     884        Reviewed by Simon Hausmann.
     885
     886        [Qt] Escape backslashes in the .pro files
     887
     888        qmake in Qt 4.7 warns about unescaped backspaces and deprecates them.
     889
     890        * Api/DerivedSources.pro:
     891        * docs/docs.pri:
     892
    18932010-05-19  Denis Dzyubenko <denis.dzyubenko@nokia.com>
    2894
     
    8900        * Api/qwebpage.cpp:
    9901        (QWebPage::userAgentForUrl):
     902
     9032010-05-28  Antti Koivisto  <koivisto@iki.fi>
     904
     905        Reviewed by Kenneth Rohde Christiansen.
     906   
     907        Add a missing #if ENABLE(), some null checking.
     908
     909        * Api/qwebpage.cpp:
     910        (QWebPagePrivate::dynamicPropertyChangeEvent):
     911
     9122010-05-28  Antti Koivisto  <koivisto@iki.fi>
     913
     914        Reviewed by Kenneth Rohde Christiansen.
     915
     916        https://bugs.webkit.org/show_bug.cgi?id=39874
     917        [Qt] Make tiled backing store more configurable
     918   
     919        Make tile size, tile creation delay and tiling area dynamically configurable.
     920
     921        * Api/qwebpage.cpp:
     922        (QWebPagePrivate::dynamicPropertyChangeEvent):
     923
     9242010-05-29  Dawit Alemayehu  <adawit@kde.org>
     925
     926        Reviewed by Kenneth Rohde Christiansen.
     927
     928        Added a WebAction to stop all pending page refresh/redirect
     929        requests set through the <meta http-equiv="refresh"...> tag.
     930
     931        https://bugs.webkit.org/show_bug.cgi?id=29899
     932
     933        * Api/qwebpage.cpp:
     934        (QWebPage::triggerAction):
     935        * Api/qwebpage.h:
     936        * tests/qwebpage/tst_qwebpage.cpp:
     937        (tst_QWebPage::testStopScheduledPageRefresh):
     938
     9392010-04-20  Robert Hogan  <robert@webkit.org>
     940
     941        Reviewed by Simon Hausmann.
     942
     943        [Qt] Add more support for textInputController
     944
     945        Add support for selectedRange(), setMarkedText(), insertText(),
     946        and firstRectForCharacterRange().
     947
     948        https://bugs.webkit.org/show_bug.cgi?id=35702
     949
     950        * Api/qwebpage.cpp:
     951        (QWebPagePrivate::inputMethodEvent):
     952        * tests/qwebpage/tst_qwebpage.cpp:
     953        (tst_QWebPage::inputMethods):
     954
     9552010-05-20  Janne Koskinen  <janne.p.koskinen@digia.com>
     956
     957        Reviewed by Kenneth Rohde Christiansen.
     958
     959        [Qt] WINSCW compile fix for qwebframe test
     960        https://bugs.webkit.org/show_bug.cgi?id=38722
     961
     962        WINSCW cannot determine template type up the hierarchy
     963        to common base class.
     964
     965        * tests/qwebframe/tst_qwebframe.cpp:
     966
     9672010-05-23  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     968
     969        Reviewed by Kenneth Rohde Christiansen.
     970
     971        [Qt] Update the Symbian version for the user agent
     972        https://bugs.webkit.org/show_bug.cgi?id=38389
     973
     974        Fixes a regression introduced by r58648. Ensure that the "Symbian" string
     975        is only listed one time in the User Agent string.
     976
     977        In addition make an effort to align the User Agent string to already
     978        released WebKit based products for Symbian.
     979
     980        * Api/qwebpage.cpp:
     981        (QWebPage::userAgentForUrl):
     982
     9832010-05-21  Simon Hausmann  <simon.hausmann@nokia.com>
     984
     985        Symbian build fix.
     986
     987        [Qt] Updated the wins def file with one new export.
     988
     989        The DRT symbols are still missing, but I can't build DRT ;(
     990
     991        * symbian/bwins/QtWebKitu.def:
     992
     9932010-05-12  Simon Hausmann  <simon.hausmann@nokia.com>
     994
     995        Reviewed by Laszlo Gombos.
     996
     997        Add a comment to explain the web inspector dynamic property url hook
     998        and that it's there on purpose :)
     999
     1000        https://bugs.webkit.org/show_bug.cgi?id=35340
     1001
     1002        * WebCoreSupport/InspectorClientQt.cpp:
     1003        (WebCore::InspectorClientQt::openInspectorFrontend):
     1004
     10052010-05-06  Simon Hausmann  <simon.hausmann@nokia.com>
     1006
     1007        Reviewed by Kenneth Rohde Christiansen.
     1008
     1009        [Qt] Replace public inspector url with private property for QtLauncher
     1010        https://bugs.webkit.org/show_bug.cgi?id=35340
     1011
     1012        Replace the public API with a private dynamic property until this feature
     1013        is ready.
     1014
     1015        * Api/qwebsettings.cpp:
     1016        * Api/qwebsettings.h:
     1017        * WebCoreSupport/InspectorClientQt.cpp:
     1018        (WebCore::InspectorClientQt::openInspectorFrontend):
     1019        * symbian/bwins/QtWebKitu.def:
     1020        * symbian/eabi/QtWebKitu.def:
     1021
     10222010-05-20  Luiz Agostini  <luiz.agostini@openbossa.org>
     1023
     1024        Reviewed by Kenneth Rohde Christiansen.
     1025
     1026        [Qt] Skipping popup focus test for maemo
     1027        https://bugs.webkit.org/show_bug.cgi?id=39314
     1028
     1029        Skipping popup focus test for maemo in qwebframe auto test.
     1030
     1031        The test method tst_QWebFrame::popupFocus() was testing popup focus AND input
     1032        field focus. The input field focus has been removed from the method popupFocus()
     1033        and a new test method named inputFieldFocus() has been added. Finally the test
     1034        method popupFocus() has been skipped for maemo.
     1035
     1036        * tests/qwebframe/tst_qwebframe.cpp:
     1037
     10382010-05-20  Rajiv Ramanasankaran  <rajiv.ramanasankaran@nokia.com>
     1039
     1040        Reviewed by Simon Hausmann.
     1041       
     1042        [Qt] QWebPage::inputMethodQuery() returns wrong values for Qt::ImCursorPosition, Qt::ImAnchorPosition
     1043        https://bugs.webkit.org/show_bug.cgi?id=38779
     1044
     1045        The earlier implementation was written with the assumption that in this scenario the
     1046        anchor position always corresponds to the START index and that the current cursor position
     1047        always corresponds to the END index in WebKit.
     1048
     1049        Updated the implementation of QWebPage::inputMethodQuery(Qt::ImCursorPosition) and
     1050        QWebPage::inputMethodQuery(Qt::ImAnchorPosition) for the case where the Editor is not in
     1051        composition mode. In the non-composition mode, the Anchor and the Current cursor positions
     1052        correspond to the Base and Extent position offsets in WebKit.
     1053
     1054        Also added the auto-tests for the RIGHT to LEFT and LEFT to RIGHT selections.
     1055
     1056        * Api/qwebpage.cpp:
     1057        (QWebPage::inputMethodQuery): Now returning correct values for Qt::ImCursorPosition and
     1058        Qt::ImAnchorPosition when the Editor is not in composition mode.
     1059        * tests/qwebpage/tst_qwebpage.cpp:
     1060        (tst_QWebPage::inputMethods): Added auto-tests for RIGHT to LEFT and LEFT to RIGHT selections
    101061
    1110622010-05-12  Joe Ligman  <joseph.ligman@nokia.com>
     
    251076        (qtwebkit_webframe_scrollRecursively):
    261077
     10782010-05-17  Antti Koivisto  <koivisto@iki.fi>
     1079
     1080        Reviewed by Kenneth Rohde Christiansen.
     1081
     1082        https://bugs.webkit.org/show_bug.cgi?id=39218
     1083        [Qt] Tiled backing store tiles sometimes flicker when exiting a zoom animation
     1084       
     1085        Tiles sometimes flicker when exiting a zoom animation. This happens as a result
     1086        of the visible rectangle being momentarily out of sync.
     1087       
     1088        Instead of updating the visible rect by explicitly setting it, pull it through
     1089        the client and recompute in WebKit the level.
     1090
     1091        * Api/qgraphicswebview.cpp:
     1092        (QGraphicsWebView::paint):
     1093        * WebCoreSupport/ChromeClientQt.cpp:
     1094        (WebCore::ChromeClientQt::visibleRectForTiledBackingStore):
     1095        * WebCoreSupport/ChromeClientQt.h:
     1096
     10972010-05-18  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
     1098
     1099        Reviewed by Simon Hausmann.
     1100
     1101        Fix QWebHistory serialization.
     1102
     1103        Regression was caused by bug 33224. The streaming function
     1104        should generate a documentSequenceNumber for all loaded values.
     1105
     1106        [Qt] tst_QWebHistory::serialize_2() fails
     1107        https://bugs.webkit.org/show_bug.cgi?id=37322
     1108
     1109        * Api/qwebhistory.cpp:
     1110        (operator>>):
     1111
     11122010-05-14  Kent Hansen <kent.hansen@nokia.com>, Jocelyn Turcotte <jocelyn.turcotte@nokia.com>, Tor Arne VestbÞ <tor.arne.vestbo@nokia.com>, Henry Haverinen <henry.haverinen@nokia.com>, Jedrzej Nowacki <jedrzej.nowacki@nokia.com>, Andreas Kling <andreas.kling@nokia.com>
     1113
     1114        Reviewed by Simon Hausmann.
     1115
     1116        [Qt] Merge overhaul of the QtWebKit API documentation
     1117
     1118        Numerous improvements in wording, qdoc warning fixes and
     1119        clarifications, done in a team work effort.
     1120
     1121        No functional changes.
     1122
     1123        * Api/qwebdatabase.cpp:
     1124        * Api/qwebelement.cpp:
     1125        * Api/qwebframe.cpp:
     1126        * Api/qwebhistoryinterface.cpp:
     1127        * Api/qwebinspector.cpp:
     1128        * Api/qwebkitversion.cpp:
     1129        * Api/qwebpage.cpp:
     1130        * Api/qwebpluginfactory.cpp:
     1131        * Api/qwebsecurityorigin.cpp:
     1132        * Api/qwebsettings.cpp:
     1133        * Api/qwebsettings.h:
     1134        * docs/qtwebkit.qdoc:
     1135        * docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp:
     1136        (wrapInFunction):
     1137        * docs/webkitsnippets/webelement/main.cpp:
     1138        (findButtonAndClick):
     1139        (autocomplete1):
     1140        (autocomplete2):
     1141        (main):
     1142
     11432010-05-14  Martin Smith  <msmith@trolltech.com>
     1144
     1145        Reviewed by Simon Hausmann.
     1146
     1147        Documentation: Fix overview grouping.
     1148
     1149        * docs/qtwebkit.qdoc:
     1150
     11512010-05-14  Benjamin Poulain  <benjamin.poulain@nokia.com>
     1152
     1153        Reviewed by Laszlo Gombos.
     1154
     1155        [QT] Update the Symbian version for the user agent
     1156        https://bugs.webkit.org/show_bug.cgi?id=38389
     1157
     1158        Update the user agent for Symbian^2 to Symbian^4
     1159
     1160        * Api/qwebpage.cpp:
     1161        (QWebPage::userAgentForUrl):
     1162
     11632010-05-11  Antonio Gomes  <tonikitoo@webkit.org>
     1164
     1165        Reviewed by Kenneth Christiansen.
     1166
     1167        [Qt] emit initialLayoutCompleted signal from FrameLoaderClientQt::dispatchDidFirstVisuallyNonEmptyLayout
     1168        https://bugs.webkit.org/show_bug.cgi?id=38921
     1169
     1170        Emit initialLayoutCompleted signal from FrameLoaderClientQt::dispatchDidFirstVisuallyNonEmptyLayout
     1171        instead of FrameLoaderClientQt::dispatchDidFirstLayout , because the former ensures that a
     1172        visual content layed out on the frame.
     1173
     1174        It matches to QWebFrame::initialLayoutCompleted signal documentation at:
     1175
     1176        "... This is the first time you will see contents displayed on the frame ..."
     1177
     1178        * WebCoreSupport/FrameLoaderClientQt.cpp:
     1179        (WebCore::FrameLoaderClientQt::dispatchDidFirstLayout):
     1180        (WebCore::FrameLoaderClientQt::dispatchDidFirstVisuallyNonEmptyLayout):
     1181
     11822010-05-11  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1183
     1184        Reviewed by Laszlo Gombos.
     1185
     1186        [Qt] REGRESSION(r58497) tst_QGraphicsWebView::crashOnViewlessWebPages() is failing
     1187        https://bugs.webkit.org/show_bug.cgi?id=38655
     1188
     1189        Fix double free by moving the connect till after the resize.
     1190
     1191        The bug is causes by the fact that a resize of an empty page causes a
     1192        layout, thus deleting the qgraphicswebview before setHtml is called,
     1193        which then deletes it again, causing a double free.
     1194
     1195        * tests/qgraphicswebview/tst_qgraphicswebview.cpp:
     1196        (tst_QGraphicsWebView::crashOnViewlessWebPages):
     1197
     11982010-05-11  Diego Gonzalez  <diegohcg@webkit.org>
     1199
     1200        Reviewed by Kenneth Rohde Christiansen.
     1201
     1202        [Qt] tst_QWebPage::inputMethods failing on Maemo5
     1203        https://bugs.webkit.org/show_bug.cgi?id=38685
     1204
     1205        Check if the SIP (Software Input Panel) is triggered, which normally
     1206        happens on mobile platforms, when a user input form receives a mouse click.
     1207
     1208        * tests/qwebpage/tst_qwebpage.cpp:
     1209        (tst_QWebPage::inputMethods):
     1210
     12112010-05-09  Noam Rosenthal  <noam.rosenthal@nokia.com>
     1212
     1213        Reviewed by Kenneth Rohde Christiansen.
     1214
     1215        [Qt] Crash in QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate when animation were used
     1216        https://bugs.webkit.org/show_bug.cgi?id=38574
     1217
     1218        The fix uses a QWeakPointer for rootGraphicsLayer, protecting from a crash in case the layer is deleted before the QGraphicsWebView.
     1219
     1220        * Api/qgraphicswebview.cpp:
     1221        (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate):
     1222        (QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate):
     1223        (QGraphicsWebViewPrivate::setRootGraphicsLayer):
     1224        (QGraphicsWebViewPrivate::updateCompositingScrollPosition):
     1225
     12262010-05-03  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     1227
     1228        Reviewed by Simon Hausmann.
     1229
     1230        [Qt] Expose HTMLTokenizer yielding parameters
     1231        https://bugs.webkit.org/show_bug.cgi?id=37023
     1232
     1233        Enables to set TimeDelay and ChunkSize for
     1234        HTMLTokenizer.
     1235
     1236        * Api/qwebpage.cpp:
     1237        (QWebPagePrivate::dynamicPropertyChangeEvent):
     1238
     12392010-05-04  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     1240
     1241        Reviewed by Kenneth Rohde Christiansen.
     1242
     1243        [Qt] QWebPage viewMode property
     1244        https://bugs.webkit.org/show_bug.cgi?id=38119
     1245
     1246        Rename the property from wrt_viewMode to _q_viewMode.
     1247
     1248        * Api/qwebpage.cpp:
     1249        (QWebPagePrivate::dynamicPropertyChangeEvent):
     1250        * tests/qwebpage/tst_qwebpage.cpp:
     1251        (tst_QWebPage::viewModes):
     1252
     12532010-04-28  Luiz Agostini  <luiz.agostini@openbossa.org>
     1254
     1255        Reviewed by Kenneth Rohde Christiansen.
     1256
     1257        [Qt] QWebPage viewMode property
     1258        https://bugs.webkit.org/show_bug.cgi?id=38119
     1259
     1260        Replacing method qt_wrt_setViewMode by wrt_viewMode property.
     1261
     1262        * Api/qwebpage.cpp:
     1263        (QWebPagePrivate::dynamicPropertyChangeEvent):
     1264        (QWebPage::event):
     1265        * Api/qwebpage_p.h:
     1266        * tests/qwebpage/tst_qwebpage.cpp:
     1267        (tst_QWebPage::wrt_viewModes):
     1268
     12692010-04-09  Tasuku Suzuki  <tasuku.suzuki@nokia.com>
     1270
     1271        Reviewed by Simon Hausmann.
     1272
     1273        [Qt]Fix compile error with QT_NO_IM
     1274        https://bugs.webkit.org/show_bug.cgi?id=36533
     1275
     1276        * WebCoreSupport/QtFallbackWebPopup.cpp:
     1277        (WebCore::QtFallbackWebPopupCombo::hidePopup):
     1278
     12792010-04-02  Tasuku Suzuki  <tasuku.suzuki@nokia.com>
     1280
     1281        Reviewed by Eric Seidel.
     1282
     1283        [Qt]Fix compile error with QT_NO_SETTINGS
     1284        https://bugs.webkit.org/show_bug.cgi?id=36533
     1285
     1286        If QT_NO_SETTINGS is defined, QSettings is not available.
     1287
     1288        * WebCoreSupport/InspectorClientQt.cpp:
     1289        (WebCore::InspectorClientQt::populateSetting):
     1290        (WebCore::InspectorClientQt::storeSetting):
     1291
     12922010-03-25  Tasuku Suzuki  <tasuku.suzuki@nokia.com>
     1293
     1294        Reviewed by Eric Seidel.
     1295
     1296        [Qt]Fix compile error with QT_NO_DESKTOPSERVICES
     1297        https://bugs.webkit.org/show_bug.cgi?id=36533
     1298
     1299        * Api/qwebsettings.cpp:
     1300        (QWebSettings::enablePersistentStorage):
     1301
     13022010-03-25  Tasuku Suzuki  <tasuku.suzuki@nokia.com>
     1303
     1304        Reviewed by Eric Seidel.
     1305
     1306        [Qt]Fix compile error with QT_NO_DEBUG_STREAM
     1307        https://bugs.webkit.org/show_bug.cgi?id=36533
     1308
     1309        * Api/qgraphicswebview.cpp:
     1310        (QGraphicsWebViewPrivate::graphicsItemVisibleRect):
     1311
     13122010-04-29  Janne Koskinen  <janne.p.koskinen@digia.com>
     1313
     1314        Reviewed by Simon Hausmann.
     1315
     1316        [Qt] QtWebKit versioning added
     1317        https://bugs.webkit.org/show_bug.cgi?id=37207
     1318
     1319        QtWebkit releases separated from Qt release cycle.
     1320
     1321        * qtwebkit_version.pri: Added.
     1322
     13232010-05-02  Benjamin Poulain  <benjamin.poulain@nokia.com>
     1324
     1325        Reviewed by Kenneth Rohde Christiansen.
     1326
     1327        [Qt] QWebPage::userAgentForUrl is terrible API
     1328        https://bugs.webkit.org/show_bug.cgi?id=33875
     1329
     1330        Simplify the creation of the user agent string to avoid some
     1331        overhead for each loaded url.
     1332
     1333        The static part of the user agent is cached so it only have
     1334        to be made once.
     1335        This creation has been made in order to simplify the code.
     1336
     1337        The two variable: application name and current language are
     1338        set dynamically when needed.
     1339        The default locale is non longer created if the widget locale
     1340        is used.
     1341
     1342        * Api/qwebpage.cpp:
     1343        (QWebPage::userAgentForUrl):
     1344        * tests/qwebpage/tst_qwebpage.cpp:
     1345        (tst_QWebPage::userAgentApplicationName):
     1346        (tst_QWebPage::userAgentLocaleChange):
     1347
     13482010-05-02  Noam Rosenthal  <noam.rosenthal@nokia.com>
     1349
     1350        Reviewed by Kenneth Rohde Christiansen.
     1351
     1352        [Qt] GraphicsLayer: animation incorrect when scrolling
     1353        https://bugs.webkit.org/show_bug.cgi?id=38371
     1354
     1355        This is a regression introduced with the invalidate-on-scroll code path, that uses QGraphicsWebViewPrivate::update()
     1356        instead of QGraphicsWebViewPrivate::scroll(). The patch makes sure that the scrolling position is correct on
     1357        each content update - this shouldn't have a performance impact - the only overhead is an additional value-test on each update.
     1358
     1359        Tested by http://www.the-art-of-web.com/css/css-animation/
     1360
     1361        * Api/qgraphicswebview.cpp:
     1362        (QGraphicsWebViewPrivate::update):
     1363
     13642010-04-29  Andreas Kling  <andreas.kling@nokia.com>
     1365
     1366        Reviewed by Simon Hausmann.
     1367
     1368        Remove unnecessary call to FrameView::forceLayout() in setViewportSize()
     1369        This prevents a double relayout on resize.
     1370
     1371        https://bugs.webkit.org/show_bug.cgi?id=38179
     1372
     1373        Thanks to Nate Whetsell <nathan.whetsell@gmail.com> for spotting this.
     1374
     1375        * Api/qwebpage.cpp:
     1376        (QWebPage::setViewportSize):
     1377
     13782010-04-29  Simon Hausmann  <simon.hausmann@nokia.com>
     1379
     1380        Reviewed by Tor Arne VestbÞ.
     1381
     1382        [Qt] REGRESSION(r57982): tst_qwebpage::showModalDialog() crashes
     1383        https://bugs.webkit.org/show_bug.cgi?id=38314
     1384
     1385        Make sure that there's always a main frame when returning from createWindow()
     1386        to the caller in WebCore.
     1387
     1388        * WebCoreSupport/ChromeClientQt.cpp:
     1389        (WebCore::ChromeClientQt::createWindow):
     1390
     13912010-04-28  Janne Koskinen  <janne.p.koskinen@digia.com>
     1392
     1393        Reviewed by Simon Hausmann <simon.hausmann@nokia.com>
     1394
     1395        [Qt] WINS DEF file freeze
     1396
     1397        Updated WINSCW def file with added and removed symbols.
     1398
     1399        * symbian/bwins/QtWebKitu.def:
     1400
     14012010-04-22  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     1402
     1403        Reviewed by Kenneth Rohde Christiansen.
     1404
     1405        [Qt] Remove translatable strings from the hybridPixmap test.
     1406        https://bugs.webkit.org/show_bug.cgi?id=37867
     1407
     1408        * tests/hybridPixmap/widget.ui:
     1409
     14102010-04-22  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     1411
     1412        Reviewed by Kenneth Rohde Christiansen.
     1413
     1414        [Qt] Fix autotests .qrc file paths when built in Qt.
     1415
     1416        Compiling auto-tests from qt/tests/auto/qweb* produced
     1417        failing tests since these .pro files include the
     1418        ones in WebKit/qt/tests and the .qrc file was
     1419        not added to RESOURCES
     1420
     1421        * tests/benchmarks/loading/loading.pro:
     1422        * tests/benchmarks/painting/painting.pro:
     1423        * tests/qgraphicswebview/qgraphicswebview.pro:
     1424        * tests/qwebelement/qwebelement.pro:
     1425        * tests/qwebframe/qwebframe.pro:
     1426        * tests/qwebhistory/qwebhistory.pro:
     1427        * tests/qwebhistoryinterface/qwebhistoryinterface.pro:
     1428        * tests/qwebinspector/qwebinspector.pro:
     1429        * tests/qwebpage/qwebpage.pro:
     1430        * tests/qwebplugindatabase/qwebplugindatabase.pro:
     1431        * tests/qwebview/qwebview.pro:
     1432        * tests/tests.pri:
     1433
     14342010-04-26  Bruno Schmidt  <bruno.schmidt@gmail.com>
     1435
     1436        Reviewed by Kenneth Rohde Christiansen.
     1437
     1438        [Qt] Exposing an QVariantMap containing QObjectStar to Javascript
     1439        causes Segmentation Fault
     1440        https://bugs.webkit.org/show_bug.cgi?id=34729
     1441
     1442        If an QVariantMap containing QObjectStar is added to the to QtWebkit
     1443        Javascript, it's use causes Segmentation Fault.
     1444        It happens because, in the case QMetaType::QVariantMap, the "root"
     1445        object that is inside of a PassRefPtr is passed recursively inside a
     1446        loop to recover the content of the map, but the PassRefPtr semantics
     1447        prohibit its use inside a loop, so the "root" object mus be passed
     1448        using the method "PassRefPtr::get" in order to keep the current
     1449        reference.
     1450
     1451        * tests/qwebframe/tst_qwebframe.cpp:
     1452        (MyQObject::MyQObject): new property variantMapProperty
     1453        (MyQObject::variantMapProperty): read variantMapProperty
     1454        (MyQObject::setVariantMapProperty): write variantMapProperty
     1455
    2714562010-04-26  Thiago Macieira  <thiago.macieira@nokia.com>
    281457
     
    351464
    361465        * Api/qwebkitversion.h:
     1466
     14672010-04-21  Yi Shen  <yi.4.shen@nokia.com>
     1468
     1469        Reviewed by Simon Hausmann.
     1470
     1471        [Qt] Check the request empty or not in ChromeClientQt::createWindow()
     1472        https://bugs.webkit.org/show_bug.cgi?id=37821
     1473
     1474        * WebCoreSupport/ChromeClientQt.cpp:
     1475        (WebCore::ChromeClientQt::createWindow):
     1476
     14772010-04-22  John Pavan  <john.pavan@nokia.com>
     1478
     1479        Reviewed by Laszlo Gombos.
     1480
     1481        [Qt] inputMethodQuery returns coordinates in web page coordinates rather than in item coordinates.
     1482        https://bugs.webkit.org/show_bug.cgi?id=37163
     1483
     1484
     1485        QWebPage::inputMethodQuery is modified so that it
     1486        returns coordinates in the widget's coordinate system.
     1487        Tests are added for QGraphicsWebView and QWebView
     1488        to verify that this behavior is correct after the webpage
     1489        has been scrolled.
     1490
     1491        * Api/qwebpage.cpp:
     1492        (QWebPage::inputMethodQuery):
     1493        * tests/qgraphicswebview/tst_qgraphicswebview.cpp:
     1494        (tst_QGraphicsWebView::microFocusCoordinates):
     1495        * tests/qwebview/tst_qwebview.cpp:
     1496        (tst_QWebView::microFocusCoordinates):
     1497
     14982010-04-21  No'am Rosenthal  <noam.rosenthal@nokia.com>
     1499
     1500        Reviewed by Simon Fraser.
     1501
     1502        [Qt] Fix or remove the runtime flag for accelerated compositing.
     1503        https://bugs.webkit.org/show_bug.cgi?id=37313
     1504
     1505        This lets the QWebPageClient "veto" the settings value for accelerated compositing.
     1506        In this case we allow accelerated compositing only on QGraphicsWebView.
     1507
     1508        * Api/qgraphicswebview.cpp:
     1509        (QGraphicsWebViewPrivate::allowsAcceleratedCompositing):
     1510        * WebCoreSupport/ChromeClientQt.cpp:
     1511        (WebCore::ChromeClientQt::allowsAcceleratedCompositing):
     1512        * WebCoreSupport/ChromeClientQt.h:
     1513
     15142010-04-22  Robert Hogan  <robert@webkit.org>
     1515
     1516        Reviewed by Simon Hausmann.
     1517
     1518        [Qt] Fix createPlugin() tests in tst_qwebpage to match behaviour of Qt plugins
     1519             when PluginsEnabled is false.
     1520
     1521        tst_qwebpage should have been updated as part of r56662.
     1522        (See https://bugs.webkit.org/show_bug.cgi?id=32196)
     1523
     1524        Updated documentation of QWebPage::createPlugin and QWebSetting::pluginsEnabled
     1525            to match the new behaviour.
     1526
     1527        * Api/qwebpage.cpp: Update docs.
     1528        * Api/qwebsettings.cpp: Update docs.
     1529        * tests/qwebpage/tst_qwebpage.cpp:
     1530        (createPlugin):
     1531        (tst_QWebPage::createPluginWithPluginsEnabled):
     1532        (tst_QWebPage::createPluginWithPluginsDisabled):
     1533
     15342010-04-09  Antonio Gomes  <tonikitoo@webkit.org>
     1535
     1536        Reviewed by Kenneth Christiansen and Tor Arne VestbÞ.
     1537
     1538        REGRESSION(r56552): Broken scrollbars size
     1539        https://bugs.webkit.org/show_bug.cgi?id=36853
     1540
     1541        The regression was caused by r56552, which introduced a fix to bug
     1542        webkit.org/b/21300. The bug solved an issue with the resize handle on mac,
     1543        but did it in a way that affected all Qt platforms and thus broke the behavior
     1544        on non-mac platforms.
     1545
     1546        This patch makes the mac specific change ifdef'ed and only applied for the mac
     1547        platform.
     1548
     1549        * WebCoreSupport/ChromeClientQt.cpp:
     1550        (WebCore::ChromeClientQt::windowResizerRect):
     1551
     15522010-04-19  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     1553
     1554        Reviewed by Simon Hausmann.
     1555
     1556        [Qt] Fix compilation against namespaced Qt.
     1557
     1558        * WebCoreSupport/ChromeClientQt.h:
     1559        * WebCoreSupport/QtFallbackWebPopup.h:
     1560
     15612010-04-14  Luiz Agostini  <luiz.agostini@openbossa.org>
     1562
     1563        Reviewed by Kenneth Rohde Christiansen.
     1564
     1565        Changing view mode names due to specification changes
     1566        https://bugs.webkit.org/show_bug.cgi?id=37615
     1567
     1568        test: fast/media/media-feature-wgt-view-mode.html
     1569
     1570        specification: http://dev.w3.org/2006/waf/widgets-vmmf/
     1571
     1572        * WebCoreSupport/ChromeClientQt.cpp:
     1573        (WebCore::ChromeClientQt::isWindowed):
     1574        (WebCore::ChromeClientQt::isFullscreen):
     1575        (WebCore::ChromeClientQt::isMaximized):
     1576        (WebCore::ChromeClientQt::isMinimized):
     1577        * WebCoreSupport/ChromeClientQt.h:
     1578
     15792010-04-14  Andreas Kling  <andreas.kling@nokia.com>
     1580
     1581        Reviewed by Kenneth Rohde Christiansen.
     1582
     1583        [Qt] Rendering artifacts on Qt plugins when scrolling the page
     1584        https://bugs.webkit.org/show_bug.cgi?id=37152
     1585
     1586        Because we no longer repaint the entire viewport on scroll,
     1587        we must trigger a repaint of QtPluginWidgets when their geometry changes.
     1588
     1589        * WebCoreSupport/FrameLoaderClientQt.cpp:
     1590
     15912010-04-09  Yi Shen  <yi.4.shen@nokia.com>
     1592
     1593        Reviewed by Kenneth Rohde Christiansen.
     1594
     1595        [Qt] tst_QWebFrame::popupFocus() fails
     1596        https://bugs.webkit.org/show_bug.cgi?id=37320
     1597
     1598        The QWebPopup class has been moved & renamed, so tst_QWebFrame::popupFocus() should use
     1599        the class name "QComboBox", rather than "WebCore::QWebPopup" to find the popup menu.
     1600
     1601        * tests/qwebframe/tst_qwebframe.cpp:
     1602
     16032010-04-15  Bruno Schmidt  <bruno.schmidt@gmail.com>
     1604
     1605        Reviewed by Kenneth Rohde Christiansen.
     1606
     1607        [Qt] Null QObjects properties cause Segmentation Fault
     1608        https://bugs.webkit.org/show_bug.cgi?id=34730
     1609
     1610        QObjects exported to the QWebkit javascript with properties that are
     1611        a null "QObject*" cause Segmentation Fault.
     1612
     1613        If an QObject is added to the javascript context and it contains
     1614        properties of the type QObject* with NULL value, calling the property
     1615        causes Segmentation Fault.
     1616
     1617        Follow the tests for the corrections done over WebCore.
     1618
     1619        * tests/qwebframe/tst_qwebframe.cpp:
     1620        (MyQObject::MyQObject): init the field m_objectStar
     1621        (MyQObject::objectStarProperty): read the Object* prop
     1622        (MyQObject::setObjectStarProperty): write the Object* prop
     1623        (tst_QWebFrame::getSetStaticProperty): new tests for the new prop
     1624
     16252010-04-15  Kent Hansen  <kent.hansen@nokia.com>
     1626
     1627        Reviewed by Kenneth Rohde Christiansen.
     1628
     1629        [Qt] Mark QWebFrame::overloadedSlots autotest as expected failure
     1630
     1631        https://bugs.webkit.org/show_bug.cgi?id=37319
     1632
     1633        * tests/qwebframe/tst_qwebframe.cpp:
     1634
     16352010-04-09  Tasuku Suzuki  <tasuku.suzuki@nokia.com>
     1636
     1637        Reviewed by Simon Hausmann.
     1638
     1639        [Qt] Fix compile error with QT_NO_ACTION
     1640        https://bugs.webkit.org/show_bug.cgi?id=36529
     1641
     1642        Make sure QT_NO_ACTION is not defined to use QAction
     1643
     1644        * Api/qgraphicswebview.cpp:
     1645        (QGraphicsWebView::pageAction):
     1646        * Api/qwebpage.cpp:
     1647        (QWebPagePrivate::updateAction):
     1648        (QWebPage::updatePositionDependentActions):
     1649        * Api/qwebpage.h:
     1650        * Api/qwebview.cpp:
     1651        * Api/qwebview.h:
     1652
     16532010-04-09  Simon Hausmann  <simon.hausmann@nokia.com>
     1654
     1655        Reviewed by Lars Knoll.
     1656
     1657        [Qt] tests/qgraphicswebview fails
     1658        https://bugs.webkit.org/show_bug.cgi?id=37317
     1659
     1660        * Api/qwebpage.cpp:
     1661        (QWebPage::userAgentForUrl): Don't crash if the ownerWidget is null.
     1662
     16632010-04-08  Benjamin Poulain  <benjamin.poulain@nokia.com>
     1664
     1665        Reviewed by Simon Hausmann.
     1666
     1667        [Qt] Warnings when compiling InspectorClientQt.cpp
     1668        https://bugs.webkit.org/show_bug.cgi?id=37266
     1669
     1670        Add a default: for the switch()-case to avoid
     1671        warnings.
     1672
     1673        * WebCoreSupport/InspectorClientQt.cpp:
     1674        (WebCore::variantToSetting):
     1675
     16762010-04-08  Joe Ligman  <joseph.ligman@nokia.com>
     1677
     1678        Reviewed by Simon Hausmann.
     1679
     1680        [Qt] WebKit crashes while input text through input method.
     1681        The formatted text underline painting crashes when painting with invalid indexes.
     1682        https://bugs.webkit.org/show_bug.cgi?id=36870
     1683
     1684        * Api/qwebpage.cpp:
     1685        (QWebPagePrivate::inputMethodEvent):
     1686        * tests/qwebpage/tst_qwebpage.cpp:
     1687        (tst_QWebPage::inputMethodsTextFormat_data):
     1688        (tst_QWebPage::inputMethodsTextFormat):
     1689
     16902010-04-01  Antonio Gomes  <tonikitoo@webkit.org>
     1691
     1692        Reviewed by David Hyatt.
     1693
     1694        [Qt] REGRESSION:(r50665) QWebFrame::setScrollBarPolicy(Qt::Vertical,Qt::ScrollBarAlwaysOff) has no effect.
     1695        https://bugs.webkit.org/show_bug.cgi?id=29431
     1696
     1697        Make use of the new lock parameter of set{Vertical,Horizontal}ScrollbarMode.
     1698
     1699        Always added a qt auto test for set scrollbar policy feature.
     1700
     1701        * Api/qwebframe.cpp:
     1702        (QWebFrame::setScrollBarPolicy):
     1703        * tests/qwebframe/tst_qwebframe.cpp:
     1704        * WebCoreSupport/FrameLoaderClientQt.cpp:
     1705        (FrameLoaderClientQt::transitionToCommittedForNewPage):
    371706
    3817072010-04-08  Joe Ligman  <joseph.ligman@nokia.com>
     
    531722        (qtwebkit_webframe_scrollRecursively):
    541723
    55 2010-03-24  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
    56 
    57         Reviewed by Laszlo Gombos.
    58 
    59         Auto-uppercase and predictive text need to be disabled for S60 (as for maemo)
    60         https://bugs.webkit.org/show_bug.cgi?id=33176
    61 
    62         * WebCoreSupport/EditorClientQt.cpp:
    63 
    64 2010-03-22  Jakub Wieczorek  <jwieczorek@webkit.org>
    65 
    66         Reviewed by Simon Hausmann.
    67 
    68         [Qt] Don't construct a QLineEdit every time when painting a text field
    69         https://bugs.webkit.org/show_bug.cgi?id=36373
    70 
    71         Add a simple benchmark covering this area.
    72 
    73         * tests/benchmarks/painting/tst_painting.cpp:
    74         (tst_Painting::textAreas):
    75 
    76 2010-03-22  Yi Shen  <shenyi2006@gmail.com>
    77 
    78         Reviewed by Simon Hausmann.
    79 
    80         https://bugs.webkit.org/show_bug.cgi?id=35933 
    81         [Qt] [Symbian] Can not backward select (highlight) text using virtual keyboard
    82         Make sure the selection start index is smaller than the selection end index.
    83 
    84         * Api/qwebpage.cpp:
    85         (QWebPagePrivate::inputMethodEvent):
    86         * tests/qwebpage/tst_qwebpage.cpp:
    87         (tst_QWebPage::inputMethods):
     17242010-04-07  Andreas Kling  <andreas.kling@nokia.com>
     1725
     1726        Reviewed by Simon Hausmann.
     1727
     1728        [Qt] When providing a widget for the PDF mime type it will cause a crash
     1729
     1730        m_pluginView may actually be a Widget (for embedded Qt widgets),
     1731        so always check isPluginView() before calling PluginView specific methods.
     1732
     1733        https://bugs.webkit.org/show_bug.cgi?id=29450
     1734
     1735        * WebCoreSupport/FrameLoaderClientQt.cpp:
     1736        (WebCore::FrameLoaderClientQt::finishedLoading):
     1737        (WebCore::FrameLoaderClientQt::setMainDocumentError):
     1738        (WebCore::FrameLoaderClientQt::committedLoad):
     1739
     17402010-04-07  Dawit Alemayehu  <adawit@kde.org>
     1741
     1742        Reviewed by Simon Hausmann.
     1743
     1744        https://bugs.webkit.org/show_bug.cgi?id=36827
     1745
     1746        Updated the WebCore::shouldTreatAsAttachement function call with the
     1747        new more generic replacement WebCore::contentDispositionType.
     1748
     1749        See comments 39-42 in https://bugs.webkit.org/show_bug.cgi?id=36395
     1750
     1751        * WebCoreSupport/FrameLoaderClientQt.cpp:
     1752        (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForMIMEType):
     1753
     17542010-04-02  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     1755
     1756        Reviewed by Kenneth Rohde Christiansen.
     1757
     1758        [Qt] [Symbian] Rebaseline Symbian def file
     1759        https://bugs.webkit.org/show_bug.cgi?id=37038
     1760
     1761        Switch the ordinal numbers for qtwebkit_webframe_scrollRecursively
     1762        and QWebInspector::closeEvent to match QtWebkit 4.6 branch
     1763
     1764        Fix the signature for qt_drt_setFrameFlatteningEnabled
     1765        after r56718.
     1766
     1767        Add new QtWebKit API symbols introduced not listed in the file yet.
     1768
     1769        * symbian/eabi/QtWebKitu.def:
     1770
     17712010-04-06  Diego Gonzalez  <diego.gonzalez@openbossa.org>
     1772
     1773        Reviewed by Simon Hausmann.
     1774
     1775        [Qt] Add mechanism to detect QtWebKit 2.0 via the preprocessor
     1776        https://bugs.webkit.org/show_bug.cgi?id=36538
     1777
     1778        * Api/qwebkitglobal.h:
     1779
     17802010-04-02  Luiz Agostini  <luiz.agostini@openbossa.org>
     1781
     1782        Reviewed by Kenneth Rohde Christiansen.
     1783
     1784        [Qt] Maemo5 theme - customized popup for <select multiple> elements
     1785        https://bugs.webkit.org/show_bug.cgi?id=36368
     1786
     1787        Using QtMaemoWebPopup instead of QtFallbackWebPopup for Maemo.
     1788
     1789        * WebCoreSupport/ChromeClientQt.cpp:
     1790        (WebCore::ChromeClientQt::createSelectPopup):
     1791        * WebCoreSupport/QtFallbackWebPopup.cpp:
     1792        (WebCore::QtFallbackWebPopup::show):
     1793        (WebCore::QtFallbackWebPopup::populate):
     1794
     17952010-04-01  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
     1796
     1797        Reviewed by Kenneth Rohde Christiansen.
     1798
     1799        Add Single and Multiple Selection Popup for Maemo 5.
     1800
     1801        [Qt] Maemo5 theme - popup dialogs
     1802        https://bugs.webkit.org/show_bug.cgi?id=36789
     1803
     1804        * WebCoreSupport/QtMaemoWebPopup.cpp:
     1805        (WebCore::Maemo5Popup::populateList):
     1806        (WebCore::Maemo5Popup::onItemSelected):
     1807        (WebCore::QtMaemoWebPopup::createSingleSelectionPopup):
     1808        (WebCore::QtMaemoWebPopup::createMultipleSelectionPopup):
     1809        (WebCore::Maemo5SingleSelectionPopup::Maemo5SingleSelectionPopup):
     1810        (WebCore::MultipleItemListDelegate::MultipleItemListDelegate):
     1811        (WebCore::MultipleItemListDelegate::paint):
     1812        (WebCore::Maemo5MultipleSelectionPopup::Maemo5MultipleSelectionPopup):
     1813        * WebCoreSupport/QtMaemoWebPopup.h:
     1814
     18152010-03-30  Luiz Agostini  <luiz.agostini@openbossa.org>
     1816
     1817        Reviewed by Kenneth Rohde Christiansen.
     1818
     1819        [Qt] Maemo5 theme - QtMaemoWebPopup class
     1820        https://bugs.webkit.org/show_bug.cgi?id=36790
     1821
     1822        A new QtAbstractWebPopup descendant class to be used for maemo menu lists.
     1823        This is the first step. The next step will be the dialogs implementation that
     1824        will come in bug 36789 and finally to use QtMaemoWebPopup instead of QtFallbackWebPopup
     1825        that will come in bug 36368.
     1826
     1827        * WebCoreSupport/QtMaemoWebPopup.cpp: Added.
     1828        (WebCore::QtMaemoWebPopup::QtMaemoWebPopup):
     1829        (WebCore::QtMaemoWebPopup::~QtMaemoWebPopup):
     1830        (WebCore::QtMaemoWebPopup::createSingleSelectionPopup):
     1831        (WebCore::QtMaemoWebPopup::createMultipleSelectionPopup):
     1832        (WebCore::QtMaemoWebPopup::createPopup):
     1833        (WebCore::QtMaemoWebPopup::show):
     1834        (WebCore::QtMaemoWebPopup::hide):
     1835        (WebCore::QtMaemoWebPopup::popupClosed):
     1836        (WebCore::QtMaemoWebPopup::itemClicked):
     1837        * WebCoreSupport/QtMaemoWebPopup.h: Added.
     1838        (WebCore::Maemo5Popup::Maemo5Popup):
     1839
     18402010-03-31  Antti Koivisto  <koivisto@iki.fi>
     1841
     1842        Reviewed by Kenneth Rohde Christiansen.
     1843
     1844        https://bugs.webkit.org/show_bug.cgi?id=36446
     1845        [Qt] QWebSettings::TiledBackingStoreEnabled attribute lacks documentation and default value
     1846
     1847        * Api/qgraphicswebview.cpp:
     1848        * Api/qwebsettings.cpp:
     1849        (QWebSettings::QWebSettings):
     1850
     18512010-03-26  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1852
     1853        Reviewed by Antti Koivisto.
     1854
     1855        Change due to renaming of frame flattening setting.
     1856
     1857        * Api/qwebpage.cpp:
     1858        (qt_drt_setFrameFlatteningEnabled):
     1859        * Api/qwebsettings.cpp:
     1860        (QWebSettingsPrivate::apply):
     1861        * symbian/eabi/QtWebKitu.def:
     1862
     18632010-03-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1864
     1865        Reviewed by Antti Koivisto.
     1866
     1867        Use 'Mobile Safari' instead of 'Safari' on mobile Qt platforms.
     1868
     1869        * Api/qwebpage.cpp:
     1870        (QWebPage::userAgentForUrl):
     1871
     18722010-03-22  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1873
     1874        Reviewed by Simon Fraser.
     1875
     1876        Add support for Widgets 1.0: View Mode Media Feature
     1877        https://bugs.webkit.org/show_bug.cgi?id=35446
     1878
     1879        Add an internal Qt API for changing the view mode media feature
     1880        (http://www.w3.org/TR/widgets-vmmf/).
     1881
     1882        * Api/qwebpage.cpp:
     1883        (qt_wrt_setViewMode):
     1884        (QWebPagePrivate::priv):
     1885        * Api/qwebpage_p.h:
     1886        * WebCoreSupport/ChromeClientQt.cpp:
     1887        (WebCore::ChromeClientQt::isDocked):
     1888        (WebCore::ChromeClientQt::isFloating):
     1889        (WebCore::ChromeClientQt::isApplication):
     1890        (WebCore::ChromeClientQt::isFullscreen):
     1891        * WebCoreSupport/ChromeClientQt.h:
     1892
     18932010-03-29  Dawit Alemayehu  <adawit@kde.org>
     1894
     1895        Reviewed by Simon Hausmann.
     1896
     1897        [Qt] Added support for handling the HTTP "Content-Disposition" header.
     1898
     1899        https://bugs.webkit.org/show_bug.cgi?id=36395
     1900
     1901        Whenever a server response contains a "Content-Disposition: attachment..." header,
     1902        treat the request as a download and emit the unsupportedContent signal.
     1903
     1904        * Api/qwebpage.cpp:
     1905        * WebCoreSupport/FrameLoaderClientQt.cpp:
     1906        (WebCore::FrameLoaderClientQt::download):
     1907        (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForMIMEType):
     1908
     19092010-03-29  Simon Hausmann  <simon.hausmann@nokia.com>
     1910
     1911        Reviewed by Tor Arne VestbÞ.
     1912
     1913        [Qt] unit tests don't compile inside of Qt
     1914
     1915        https://bugs.webkit.org/show_bug.cgi?id=36756
     1916
     1917        * tests/tests.pri: Don't do the target substitution inside Qt and find the sources
     1918        through VPATH instead of relying on the location of the .pro file exclusively.
    881919
    8919202010-03-25  Yael Aharon  <yael.aharon@nokia.com>
     
    1021933        * Api/qgraphicswebview.h:
    1031934
     19352010-03-26  Olivier Goffart  <ogoffart@trolltech.com>
     1936
     1937        Reviewed by Simon Hausmann.
     1938
     1939        [Qt] Compile with QT_USE_FAST_OPERATOR_PLUS
     1940
     1941        * WebCoreSupport/InspectorClientQt.cpp:
     1942        (WebCore::InspectorClientQt::populateSetting):
     1943        (WebCore::InspectorClientQt::storeSetting):
     1944
     19452010-03-26  David Boddie  <dboddie@trolltech.com>
     1946
     1947        Reviewed by Simon Hausmann.
     1948
     1949        [Qt] Doc: Simplified Commercial Editions for Qt 4.7.
     1950
     1951        * docs/qtwebkit.qdoc:
     1952
     19532010-03-25  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1954
     1955        Reviewed by Eric Seidel.
     1956
     1957        Make QWebPage not depend on view() but use the client->ownerWidget()
     1958        instead. Also, handle the case where there is not page client.
     1959
     1960        * Api/qwebpage.cpp:
     1961        (QWebPagePrivate::createContextMenu):
     1962        (QWebPagePrivate::keyPressEvent):
     1963        (QWebPage::javaScriptAlert):
     1964        (QWebPage::javaScriptConfirm):
     1965        (QWebPage::javaScriptPrompt):
     1966        (QWebPage::shouldInterruptJavaScript):
     1967        (QWebPage::createWindow):
     1968        (QWebPage::action):
     1969        (QWebPage::extension):
     1970        (QWebPage::chooseFile):
     1971        (QWebPage::userAgentForUrl):
     1972
     19732010-03-23  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1974
     1975        Reviewed by Simon Hausmann.
     1976
     1977        Calling setView(0) on a QWebPage being shown by a QGraphicsWebView,
     1978        would uninstall the page client, deleting the QGraphicsWebViewPrivate
     1979        instance. If called with an argument, it would do a wrong static_cast
     1980        and crash.
     1981
     1982        * Api/qwebpage.cpp:
     1983        (QWebPageWidgetClient::QWebPageWidgetClient):
     1984        (QWebPageWidgetClient::isQWidgetClient):
     1985        (QWebPageWidgetClient::screenNumber):
     1986        (QWebPage::QWebPage):
     1987        (QWebPage::setView):
     1988        * Api/qgraphicswebview.cpp:
     1989        (QGraphicsWebViewPrivate::unsetPageIfExists):
     1990        (QGraphicsWebView::setPage):
     1991        * Api/qwebpage.cpp:
     1992        (QWebPageWidgetClient::isQWidgetClient):
     1993        (QWebPageWidgetClient::screenNumber):
     1994        (QWebPage::QWebPage):
     1995        (QWebPage::setView):
     1996        * Api/qwebpage.h:
     1997        * Api/qwebview.cpp:
     1998        (QWebViewPrivate::unsetPageIfExists):
     1999        (QWebView::setPage):
     2000
     20012010-03-25  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     2002
     2003        Reviewed by Simon Hausmann.
     2004
     2005        [Qt] Implement ChromeClient::windowResizerRect()
     2006
     2007        https://bugs.webkit.org/show_bug.cgi?id=21300
     2008
     2009        We assume the resize corner to be in the lower right corner of
     2010        the window and having the width and height of the scrollbars.
     2011
     2012        The helper function geometryRelativeToOwnerWidget() in the page
     2013        client is used to clip the resize rect to the actual size of the
     2014        viewport, not the size of the QGraphicsView.
     2015
     2016        * Api/qgraphicswebview.cpp:
     2017        * Api/qwebpage.cpp:
     2018        * WebCoreSupport/ChromeClientQt.cpp:
     2019
     20202010-03-24  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
     2021
     2022        Reviewed by Kenneth Rohde Christiansen.
     2023
     2024        Add the FrameFlatteningEnabled WebAttribute to QWebSettings.
     2025
     2026        [Qt] Missing QWebSettings for Frame Flattening
     2027        https://bugs.webkit.org/show_bug.cgi?id=36553
     2028
     2029        * Api/qwebsettings.cpp:
     2030        (QWebSettingsPrivate::apply):
     2031        (QWebSettings::QWebSettings):
     2032        * Api/qwebsettings.h:
     2033
     20342010-03-26  Simon Hausmann  <simon.hausmann@nokia.com>
     2035
     2036        Symbian build fix.
     2037
     2038        [Qt] Updated the def file with new exports used by QtLauncher.
     2039
     2040        * symbian/eabi/QtWebKitu.def:
     2041
     20422010-03-24  Kent Tamura  <tkent@chromium.org>
     2043
     2044        Reviewed by Darin Adler.
     2045
     2046        Make Icon::createIconForFiles() optional.
     2047        https://bugs.webkit.org/show_bug.cgi?id=35072
     2048
     2049        - Rename iconForFiles() to chooseIconForFiles().
     2050        - Call Icon::createIconForFiles() from chooseIconForFiles().
     2051
     2052        * WebCoreSupport/ChromeClientQt.cpp:
     2053        (WebCore::ChromeClientQt::chooseIconForFiles):
     2054        * WebCoreSupport/ChromeClientQt.h:
     2055
     20562010-03-23  Luiz Agostini  <luiz.agostini@openbossa.org>
     2057
     2058        Reviewed by Kenneth Rohde Christiansen.
     2059
     2060        QGraphicsWebView crash when calling setView on the QWebPage...
     2061        https://bugs.webkit.org/show_bug.cgi?id=36436
     2062
     2063        Checking for pageClient existance before showing popups.
     2064
     2065        * WebCoreSupport/QtFallbackWebPopup.cpp:
     2066        (WebCore::QtFallbackWebPopup::show):
     2067
     20682010-03-23  Anders Bakken <anders.bakken@nokia.com>, Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
     2069
     2070        Reviewed by Kenneth Rohde Christiansen.
     2071
     2072        Check if q->scene() is available before actually using it
     2073        on QGraphicsWebViewPrivate.
     2074
     2075        QGraphicsWebView crash
     2076        https://bugs.webkit.org/show_bug.cgi?id=32670
     2077
     2078        * Api/qgraphicswebview.cpp:
     2079        (QGraphicsWebViewPrivate::screenNumber):
     2080        (QGraphicsWebViewPrivate::ownerWidget):
     2081
    10420822010-03-23  David Leong  <david.leong@nokia.com>
    1052083
     
    1092087
    1102088        * symbian/eabi/QtWebKitu.def:
     2089
     20902010-03-23  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2091
     2092        Reviewed by Kenneth Rohde Christiansen.
     2093
     2094        [Qt] Remove support for Qt v4.4
     2095        https://bugs.webkit.org/show_bug.cgi?id=36389
     2096
     2097        * Api/qwebelement.cpp:
     2098        (QWebElement::classes):
     2099        * Api/qwebpage.cpp:
     2100        (QWebPagePrivate::editorActionForKeyEvent):
     2101        (QWebPage::userAgentForUrl):
     2102        * WebCoreSupport/EditorClientQt.cpp:
     2103        (WebCore::EditorClientQt::handleKeyboardEvent):
     2104        * tests/tests.pro:
     2105
     21062010-03-22  Kent Hansen  <kent.hansen@nokia.com>
     2107
     2108        Reviewed by Laszlo Gombos.
     2109
     2110        [Qt] Fix qdoc warnings
     2111        https://bugs.webkit.org/show_bug.cgi?id=36447
     2112
     2113        * Api/qgraphicswebview.cpp: Add missing ().
     2114        * Api/qwebframe.cpp: Remove reference to non-existent parameter "url".
     2115        * Api/qwebsettings.cpp:  Document parameter "location".
     2116
     21172010-03-22  Jakub Wieczorek  <jwieczorek@webkit.org>
     2118
     2119        Reviewed by Simon Hausmann.
     2120
     2121        [Qt] Don't construct a QLineEdit every time when painting a text field
     2122        https://bugs.webkit.org/show_bug.cgi?id=36373
     2123
     2124        Add a simple benchmark covering this area.
     2125
     2126        * tests/benchmarks/painting/tst_painting.cpp:
     2127        (tst_Painting::textAreas):
     2128
     21292010-03-22  Yi Shen  <shenyi2006@gmail.com>
     2130
     2131        Reviewed by Simon Hausmann.
     2132
     2133        https://bugs.webkit.org/show_bug.cgi?id=35933 
     2134        [Qt] [Symbian] Can not backward select (highlight) text using virtual keyboard
     2135        Make sure the selection start index is smaller than the selection end index.
     2136
     2137        * Api/qwebpage.cpp:
     2138        (QWebPagePrivate::inputMethodEvent):
     2139        * tests/qwebpage/tst_qwebpage.cpp:
     2140        (tst_QWebPage::inputMethods):
     2141
     21422010-03-21  Kristian Amlie  <kristian.amlie@nokia.com>
     2143
     2144        Reviewed by Simon Hausmann.
     2145
     2146        Fixed updating the VKB display when inputting into QGraphicsWebView.
     2147        https://bugs.webkit.org/show_bug.cgi?id=36292
     2148
     2149        * Api/qgraphicswebview.cpp:
     2150        (QGraphicsWebViewPrivate::_q_updateMicroFocus):
     2151        (QGraphicsWebView::setPage):
     2152        * Api/qgraphicswebview.h:
     2153
     21542010-03-19  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2155
     2156        Unreviewed.
     2157
     2158        Buildfix for Qt v4.5.
     2159
     2160        * Api/qgraphicswebview.cpp:
     2161        (QGraphicsWebViewOverlay::q):
     2162
     21632010-03-18  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2164
     2165        Reviewed by Darin Adler.
     2166
     2167        Make it possible for the Qt DRT to set the media type from
     2168        the LayoutTestController.
     2169
     2170        * Api/qwebframe.cpp:
     2171        (qt_drt_setMediaType):
    1112172
    11221732010-03-18  Joe Ligman  <joseph.ligman@nokia.com>
     
    1282189        * tests/qwebframe/tst_qwebframe.cpp:
    1292190
    130 2009-12-18  Joe Ligman  <joseph.ligman@nokia.com>
     21912010-03-18  Antti Koivisto  <koivisto@iki.fi>
    1312192
    1322193        Reviewed by Kenneth Rohde Christiansen.
    1332194
    134         [Qt] Add new API to QWebFrame to scrollRecursively starting with any css overflow
    135         then checking current frame and then ancestors
    136         https://bugs.webkit.org/show_bug.cgi?id=32668
    137 
    138         * Api/qwebframe.cpp:
    139         (QWebFramePrivate::scrollOverflow):
    140         (QWebFrame::scrollRecursively):
     2195        https://bugs.webkit.org/show_bug.cgi?id=36102
     2196        [Qt] Scaling control API for tiled backing store
     2197       
     2198        The scale is set by passing the QGraphicsWebView scale to the backing store. The
     2199        only new API is the tiledBackingStoreFrozen property which allows disabling
     2200        all updates (for example during zoom animation).
     2201
     2202        * Api/qgraphicswebview.cpp:
     2203        (QGraphicsWebViewPrivate::_q_scaleChanged):
     2204        (QGraphicsWebViewPrivate::updateTiledBackingStoreScale):
     2205        (QGraphicsWebView::QGraphicsWebView):
     2206        (QGraphicsWebView::isTiledBackingStoreFrozen):
     2207        (QGraphicsWebView::setTiledBackingStoreFrozen):
     2208        * Api/qgraphicswebview.h:
     2209        * Api/qwebframe.cpp:
     2210        * Api/qwebframe_p.h:
     2211
     22122010-03-17  Antti Koivisto  <koivisto@iki.fi>
     2213
     2214        Reviewed by Tor Arne VestbÞ.
     2215
     2216        Fix Qt build with tiled backing store disabled.
     2217
     2218        * Api/qwebframe.cpp:
     2219        * Api/qwebframe_p.h:
     2220
     22212010-03-17  Chang Shu  <chang.shu@nokia.com>
     2222
     2223        Reviewed by Laszlo Gombos.
     2224
     2225        https://bugs.webkit.org/show_bug.cgi?id=36139
     2226        [Qt] Clean up cache while setting cache quota. This behavior matches other platforms,
     2227        such as mac and gtk.
     2228
     2229         * Api/qwebsettings.cpp:
     2230        (QWebSettings::setOfflineWebApplicationCacheQuota):
     2231
     22322010-03-17  Csaba Osztrogonác  <ossy@webkit.org>
     2233
     2234        Reviewed by Kenneth Rohde Christiansen.
     2235
     2236        [Qt] Enable accelerated compositing by default
     2237        https://bugs.webkit.org/show_bug.cgi?id=35866
     2238
     2239        * Api/qwebsettings.cpp:
     2240        (QWebSettings::QWebSettings):
     2241
     22422010-03-15  Antti Koivisto  <koivisto@iki.fi>
     2243
     2244        Reviewed by Simon Hausmann.
     2245
     2246        https://bugs.webkit.org/show_bug.cgi?id=36121
     2247        [Qt] Make WebKit scrollbars work with tiling
     2248       
     2249        - Use the scrollbar overlay (implemented for accelerated compositing) when in tiled mode.
     2250        - Make overlay compile unconditionally, enable on demand. This removes bunch of unneeded ifdefs.
     2251        - Update the scroll position to the backing store as needed.
     2252        - Renamed some methods.
     2253
     2254        * Api/qgraphicswebview.cpp:
     2255        (QGraphicsWebViewPrivate::):
     2256        (QGraphicsWebViewPrivate::createOrDeleteOverlay):
     2257        (QGraphicsWebViewPrivate::setRootGraphicsLayer):
     2258        (QGraphicsWebViewPrivate::updateCompositingScrollPosition):
     2259        (QGraphicsWebViewPrivate::scroll):
     2260        (QGraphicsWebViewPrivate::update):
     2261        (QGraphicsWebViewPrivate::graphicsItemVisibleRect):
     2262        (QGraphicsWebView::paint):
     2263        (QGraphicsWebView::setPage):
     2264        (QGraphicsWebView::updateGeometry):
     2265        (QGraphicsWebView::setGeometry):
     2266        * Api/qwebframe.cpp:
     2267        (QWebFramePrivate::renderFromTiledBackingStore):
     2268        * Api/qwebframe_p.h:
     2269
     22702010-03-15  Robert Hogan  <robert@webkit.org>
     2271
     2272        Reviewed by Simon Hausmann.
     2273
     2274        [Qt] Fix crash in QWebView::setPage()
     2275
     2276        tst_qwebpage was crashing on setPage(0)
     2277
     2278        https://bugs.webkit.org/show_bug.cgi?id=36137
     2279
     2280        * Api/qwebview.cpp:
     2281        (QWebView::setPage):
     2282
     22832010-03-16  Yury Semikhatsky <yurys@chromium.org>
     2284
     2285        Reviewed by Pavel Feldman.
     2286
     2287        Introduce InspectorFrontendClient that provides InspectorFrontend with an interface to the embedder. InspectorClient now serves as a delegate for InspectorController and does not contain methods for managing inspector frontend window. That allows to create remote InspectorFrontendHost.
     2288
     2289        Introduce InspectorFrontendClient that would provide InspectorFrontend with an interface to the embedder
     2290        https://bugs.webkit.org/show_bug.cgi?id=35036
     2291
     2292        * Api/qwebinspector.cpp:
     2293        (QWebInspector::hideEvent):
     2294        (QWebInspector::closeEvent):
     2295        * Api/qwebinspector.h:
     2296        * Api/qwebpage.h:
     2297        * WebCoreSupport/InspectorClientQt.cpp:
     2298        (WebCore::InspectorClientQt::openInspectorFrontend):
     2299        (WebCore::InspectorFrontendClientQt::InspectorFrontendClientQt):
     2300        (WebCore::InspectorFrontendClientQt::frontendLoaded):
     2301        (WebCore::InspectorFrontendClientQt::localizedStringsURL):
     2302        (WebCore::InspectorFrontendClientQt::hiddenPanels):
     2303        (WebCore::InspectorFrontendClientQt::bringToFront):
     2304        (WebCore::InspectorFrontendClientQt::closeWindow):
     2305        (WebCore::InspectorFrontendClientQt::attachWindow):
     2306        (WebCore::InspectorFrontendClientQt::detachWindow):
     2307        (WebCore::InspectorFrontendClientQt::setAttachedWindowHeight):
     2308        (WebCore::InspectorFrontendClientQt::inspectedURLChanged):
     2309        (WebCore::InspectorFrontendClientQt::updateWindowTitle):
     2310        * WebCoreSupport/InspectorClientQt.h:
     2311
     23122010-03-15  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2313
     2314        Unreviewed.
     2315
     2316        [Qt] Build fix if TILED_BACKING_STORE is disabled.
     2317
     2318        * Api/qwebframe.cpp:
     2319        (QWebFramePrivate::renderContentsLayerAbsoluteCoords):
     2320
     23212010-03-14  Chang Shu  <chang.shu@nokia.com>
     2322
     2323        Reviewed by Simon Hausmann.
     2324
     2325        [Qt] [Symbian] Use Symbian native dialog providers for combo pupups.
     2326        https://bugs.webkit.org/show_bug.cgi?id=35919
     2327
     2328        * WebCoreSupport/QtFallbackWebPopup.cpp:
     2329        (WebCore::QtFallbackWebPopup::show):
     2330        (WebCore::ResetAndDestroy):
     2331        (WebCore::QtFallbackWebPopup::showS60BrowserDialog):
     2332        * WebCoreSupport/QtFallbackWebPopup.h:
     2333
     23342010-03-14  Antti Koivisto  <koivisto@iki.fi>
     2335
     2336        Reviewed by Simon Hausmann.
     2337
     2338        https://bugs.webkit.org/show_bug.cgi?id=35146
     2339        Support tiled backing store
     2340
     2341        Implements a basic tiled backing store mechanism. Tiles are created and
     2342        deleted on demand. The page content is cached to the tiles. Tile content
     2343        is kept in sync with the document. Since the backing store covers area
     2344        larger than the currently visible viewport, the document can be scrolled
     2345        quickly without having to enter rendering tree painting.
     2346       
     2347        The tile management code is platform independent. This patch has simple QPixmap
     2348        based tile implementation for Qt.
     2349       
     2350        The feature is behind ENABLE_TILED_BACKING_STORE flag.
     2351
     2352        * Api/qgraphicswebview.cpp:
     2353        (QGraphicsWebViewPrivate::visibleRect):
     2354        (QGraphicsWebView::paint):
     2355        * Api/qwebframe.cpp:
     2356        (QWebFramePrivate::renderContentsLayerAbsoluteCoords):
    1412357        * Api/qwebframe.h:
    142         * Api/qwebframe_p.h:
    143         * tests/qwebframe/qwebframe.qrc:
    144         * tests/qwebframe/testiframe.html: Added.
    145         * tests/qwebframe/testiframe2.html: Added.
    146         * tests/qwebframe/tst_qwebframe.cpp:
    147 
    148 2010-03-21  Kristian Amlie  <kristian.amlie@nokia.com>
    149 
    150         Reviewed by Simon Hausmann.
    151 
    152         Fixed updating the VKB display when inputting into QGraphicsWebView.
    153         https://bugs.webkit.org/show_bug.cgi?id=36292
    154 
    155         * Api/qgraphicswebview.cpp:
    156         (QGraphicsWebViewPrivate::_q_updateMicroFocus):
    157         (QGraphicsWebView::setPage):
    158         * Api/qgraphicswebview.h:
     2358        * Api/qwebsettings.cpp:
     2359        (QWebSettingsPrivate::apply):
     2360        * Api/qwebsettings.h:
     2361
     23622010-03-13  Csaba Osztrogonác  <ossy@webkit.org>
     2363
     2364        [Qt] Enable accelerated compositing by default
     2365        https://bugs.webkit.org/show_bug.cgi?id=35866
     2366
     2367        Unreviewed. Roll-out r55955, because it broke 3 tests:
     2368        - animations/fill-mode-transform.html
     2369        - animations/play-state.html
     2370        - animations/simultaneous-start-left.html
     2371
     2372        * Api/qwebsettings.cpp:
     2373        (QWebSettings::QWebSettings):
     2374
     23752010-03-13  Simon Hausmann  <simon.hausmann@nokia.com>
     2376
     2377        Reviewed by Kenneth Rohde Christiansen.
     2378
     2379        [Qt] Enable accelerated compositing by default
     2380        https://bugs.webkit.org/show_bug.cgi?id=35866
     2381
     2382        * Api/qwebsettings.cpp:
     2383        (QWebSettings::QWebSettings):
     2384
     23852010-03-11  Anders Carlsson  <andersca@apple.com>
     2386
     2387        Reviewed by David Hyatt.
     2388
     2389        Remove invalidateContents, it isn't used and it never makes sense to only invalidate the contents.
     2390
     2391        * WebCoreSupport/ChromeClientQt.cpp:
     2392        * WebCoreSupport/ChromeClientQt.h:
     2393
     23942010-03-10  Robert Hogan  <robert@webkit.org>
     2395
     2396        Reviewed by Simon Hausmann.
     2397
     2398        [Qt] Add Support for WebKitEnableCaretBrowsing to Qt DRT
     2399
     2400        Unskip test fast/events/multiline-link-arrow-navigation.html
     2401        Fix typo (superfluous space) in QWebSettings docs.
     2402
     2403        https://bugs.webkit.org/show_bug.cgi?id=35593
     2404
     2405        * Api/qwebpage.cpp:
     2406        (qt_drt_enableCaretBrowsing):
     2407        * Api/qwebsettings.cpp:
     2408        (QWebSettingsPrivate::apply): fix typo in docs
     2409
     24102010-03-02  Adam Treat  <atreat@rim.com>
     2411
     2412        Reviewed by Dave Hyatt.
     2413
     2414        Adapt the qt port to the refactoring of repaint methods.
     2415
     2416        https://bugs.webkit.org/show_bug.cgi?id=34214
     2417
     2418        * WebCoreSupport/ChromeClientQt.cpp:
     2419        (WebCore::ChromeClientQt::invalidateContents):
     2420        (WebCore::ChromeClientQt::invalidateWindow):
     2421        (WebCore::ChromeClientQt::invalidateContentsAndWindow):
     2422        (WebCore::ChromeClientQt::invalidateContentsForSlowScroll):
     2423        * WebCoreSupport/ChromeClientQt.h:
     2424
     24252010-03-08  Eric Uhrhane  <ericu@chromium.org>
     2426
     2427        Reviewed by David Levin.
     2428
     2429        Remove the now-redundant Settings fields for the Database
     2430        https://bugs.webkit.org/show_bug.cgi?id=35763
     2431
     2432        No new tests; this code isn't called.
     2433
     2434        * Api/qwebsettings.cpp:
     2435        (QWebSettingsPrivate::apply): Remove the call into Settings.
     2436
     24372010-03-08  Simon Hausmann  <simon.hausmann@nokia.com>
     2438
     2439        Reviewed by Laszlo Gombos.
     2440
     2441        [Qt] Binary incompatibility between Qt 4.6's WebKit and trunk in QWebSettings
     2442        https://bugs.webkit.org/show_bug.cgi?id=35858
     2443
     2444        Moved the enum value added in r54873 to the end of the enum, to preserve
     2445        binary compatibility. DnsPrefetchEnabled was in the last release and needs
     2446        to remain after LocalContentCanAccessRemoteUrls.
     2447
     2448        * Api/qwebsettings.h:
     2449
     24502010-03-06  Mark Rowe  <mrowe@apple.com>
     2451
     2452        Rubber-stamped by Sam Weinig.
     2453
     2454        Remove unnecessary includes of wtf/Platform.h.  This is already pulled in by the prefix header.
     2455
     2456        * WebCoreSupport/EditCommandQt.cpp:
     2457
     24582010-03-02  Antonio Gomes  <tonikitoo@webkit.org>
     2459
     2460        Reviewed by Simon Hausmann.
     2461        Patch by Antonio Gomes <tonikitoo@webkit.org>
     2462
     2463        [Qt] QWebSettings attribute for toggle Spatial Navigation on/off
     2464        https://bugs.webkit.org/show_bug.cgi?id=33714 (Qt API part)
     2465
     2466        Added 'SpatialNavigationEnabled' attribute to QWebSettings.
     2467
     2468        * Api/qwebsettings.cpp:
     2469        (QWebSettingsPrivate::apply):
     2470        * Api/qwebsettings.h:
    1592471
    16024722010-03-04  Simon Hausmann  <simon.hausmann@nokia.com>
     
    1712483        * Api/qwebelement.h:
    1722484
    173 2010-01-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>
    174 
    175         Reviewed by Simon Hausmann.
    176 
    177         Do not set the combobox font on Maemo5 and S60; use the
    178         default instead.
     24852010-03-04  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     2486
     2487        Reviewed by Tor Arne VestbÞ.
     2488
     2489        [Qt] Make the OUTPUT_DIR variable in qmake projects independent of build-webkit's logic.
     2490
     2491        This also allows shadow builds relying only on qmake to work properly.
     2492
     2493        * tests/benchmarks/loading/loading.pro:
     2494        * tests/benchmarks/painting/painting.pro:
     2495        * tests/hybridPixmap/hybridPixmap.pro:
     2496        * tests/qgraphicswebview/qgraphicswebview.pro:
     2497        * tests/qwebelement/qwebelement.pro:
     2498        * tests/qwebframe/qwebframe.pro:
     2499        * tests/qwebhistory/qwebhistory.pro:
     2500        * tests/qwebhistoryinterface/qwebhistoryinterface.pro:
     2501        * tests/qwebinspector/qwebinspector.pro:
     2502        * tests/qwebpage/qwebpage.pro:
     2503        * tests/qwebplugindatabase/qwebplugindatabase.pro:
     2504
     25052010-03-02  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     2506
     2507        Reviewed by Kenneth Rohde Christiansen.
     2508
     2509        [Qt] Fix generation of forwarding headers
     2510
     2511        The dependencies were a bit wrong, so we ended up not generating
     2512        forwarding headers for qwebkitversion.h and qwebkitglobal.h
     2513
     2514        The forwarding headers are now the only targets depending on the
     2515        real headers. All other targets either depend on the generated
     2516        class headers, or the forwarding headers.
     2517
     2518        * Api/DerivedSources.pro:
     2519
     25202010-03-02  Eric Uhrhane  <ericu@chromium.org>
     2521
     2522        Reviewed by David Levin.
     2523
     2524        Move database enable bit fully out of settings
     2525        This is stage one of a three-stage commit [webkit, then chromium, then
     2526        webkit again].  In this change I'm adding calls to
     2527        Database::setIsAvailable inside Settings::setDatabaseEnabled and
     2528        anywhere else that called it, and switching webkit fully over to using
     2529        that flag [added in a previous checkin].  Phase two will remove
     2530        Chromium's use of Settings for the Database, and phase three will remove
     2531        the Setting for the Database enable entirely, leaving only
     2532        Database::isAvailable/setIsAvailable.
     2533
     2534        No new tests; tested by existing storage tests.
     2535
     2536        https://bugs.webkit.org/show_bug.cgi?id=35310
     2537
     2538        * Api/qwebsettings.cpp:
     2539        (QWebSettingsPrivate::apply):  Add a call to Database::setIsAvailable
     2540
     25412010-03-02  Simon Hausmann  <simon.hausmann@nokia.com>
     2542
     2543        Symbian build fix.
     2544
     2545        [Qt] Updated the def file with one new export, to fix
     2546        QtLauncher linkage.
     2547
     2548        * symbian/eabi/QtWebKitu.def:
     2549
     25502010-03-01  Jakob Petsovits  <jpetsovits@rim.com>
     2551
     2552        Reviewed by Adam Barth.
     2553
     2554        Adapt to the new ZoomMode enum.
     2555        https://bugs.webkit.org/show_bug.cgi?id=35347
     2556
     2557        * Api/qwebframe.cpp:
     2558        (QWebFrame::setTextSizeMultiplier):
     2559        (QWebFrame::setZoomFactor):
     2560        * Api/qwebsettings.cpp:
     2561        (QWebSettingsPrivate::apply):
     2562
     25632010-02-26  Diego Gonzalez  <diego.gonzalez@openbossa.org>
     2564
     2565        Reviewed by Simon Hausmann.
     2566
     2567        Fix documentation of QWebSettings::setUserStyleSheetUrl method
     2568
     2569        The base 64 data in the exemple shows a not valid code.
     2570
     2571        REGRESSION: QWebSettings::setUserStyleSheetUrl is not working with a data URL (Base64)
     2572        https://bugs.webkit.org/show_bug.cgi?id=34802
     2573
     2574        * Api/qwebsettings.cpp:
     2575
     25762010-02-26  Jamey Hicks  <jamey.hicks@nokia.com>
     2577
     2578        Reviewed by Laszlo Gombos.
     2579
     2580        [Qt] added QWebSettings::setInspectorUrl() and QWebSettings::inspectorUrl()
     2581
     2582        Enables the use of alternate Web Inspector frontends by changing
     2583        the location of the frontend.
     2584
     2585        This is required so that the Web Inspector may be run from an
     2586        external process or an external tool such as Eclipse or Aptana may
     2587        be used instead of the in-process Web Inspector UI.
     2588       
     2589        https://bugs.webkit.org/show_bug.cgi?id=35340
     2590
     2591        * Api/qwebsettings.cpp:
     2592        (QWebSettings::QWebSettings):
     2593        (QWebSettings::setInspectorUrl):
     2594        (QWebSettings::inspectorUrl):
     2595        * Api/qwebsettings.h:
     2596        * WebCoreSupport/InspectorClientQt.cpp:
     2597        (WebCore::InspectorClientQt::createPage):
     2598
     25992010-02-25  Jarkko Sakkinen  <jarkko.sakkinen@tieto.com>
     2600
     2601        Reviewed by Kenneth Rohde Christiansen.
     2602
     2603        Qt WebGL support
     2604
     2605        Adds enabling and disabling of WebGL support to QWebSettings.
     2606        https://bugs.webkit.org/show_bug.cgi?id=35153
     2607
     2608        * Api/qwebsettings.cpp:
     2609        (QWebSettingsPrivate::apply):
     2610        (QWebSettings::QWebSettings):
     2611        * Api/qwebsettings.h:
     2612
     26132010-02-19  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
     2614
     2615        Reviewed by Kenneth Rohde Christiansen.
     2616
     2617        [Qt] Remove QGVLauncher
     2618
     2619        https://bugs.webkit.org/show_bug.cgi?id=35292
     2620
     2621        * QGVLauncher/QGVLauncher.pro: Removed.
     2622        * QGVLauncher/main.cpp: Removed.
     2623
     26242010-02-23  Steve Block  <steveblock@google.com>
     2625
     2626        Reviewed by Darin Adler.
     2627
     2628        Adds ChromeClient::cancelGeolocationPermissionRequestForFrame
     2629        https://bugs.webkit.org/show_bug.cgi?id=34962
     2630
     2631        This method is required so that a Geolocation object can cancel an
     2632        asynchronous permission request. This allows the chrome client to cancel
     2633        any UI it is showing for the permission request.
     2634
     2635        * WebCoreSupport/ChromeClientQt.h:
     2636        (WebCore::ChromeClientQt::cancelGeolocationPermissionRequestForFrame):
     2637
     26382010-02-22  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2639
     2640        Unreviewed Symbian build fix.
     2641
     2642        [Qt] Updated the def file with new exports to enable
     2643        building DumpRenderTree.
     2644
     2645        * symbian/eabi/QtWebKitu.def:
     2646
     26472010-02-18  Noam Rosenthal  <noam.rosenthal@nokia.com>
     2648
     2649        Reviewed by Kenneth Rohde Christiansen.
     2650
     2651        [Qt] Minor improvement to hybrid QPixmap
     2652        https://bugs.webkit.org/show_bug.cgi?id=34507
     2653
     2654        * tests/hybridPixmap/test.html: use assignToHTMLImageElement on an
     2655        existing element instead of toHTMLImageElement which creates a new one
     2656
     26572010-02-17  Dmitry Titov  <dimich@chromium.org>
     2658
     2659        Reviewed by David Levin, Darin Fisher, Simon Hausmann.
     2660
     2661        When a live iframe element is moved between pages, it still depends on the old page.
     2662        https://bugs.webkit.org/show_bug.cgi?id=34382
     2663
     2664        * Api/qwebframe_p.h:
     2665        (QWebFramePrivate::setPage): Added.
     2666        * WebCoreSupport/FrameLoaderClientQt.cpp:
     2667        (WebCore::FrameLoaderClientQt::didTransferChildFrameToNewDocument):
     2668        The QWebFrame caches a QWebPage which should be replaced when Frame is re-parented.
     2669        Also, the QWebFrame is a child (in QT terms) of QWebPage - so update that relationship as well.
     2670        Emit a signal that QWebFrame moved to a different QWebPage.
     2671
     2672        * WebCoreSupport/FrameLoaderClientQt.h:
     2673
     26742010-02-17  Kent Tamura  <tkent@chromium.org>
     2675
     2676        Reviewed by Eric Seidel.
     2677
     2678        Introduces new Icon loading interface in order to support
     2679        asynchronous loading.
     2680        https://bugs.webkit.org/show_bug.cgi?id=32054
     2681
     2682        Add an empty implementation of ChromeClient::iconForFiles().
     2683
     2684        * WebCoreSupport/ChromeClientQt.cpp:
     2685        (WebCore::ChromeClientQt::iconForFiles):
     2686        * WebCoreSupport/ChromeClientQt.h:
     2687
     26882010-02-17  Diego Gonzalez  <diego.gonzalez@openbossa.org>
     2689
     2690        Reviewed by Ariya Hidayat.
     2691
     2692        Make possible Qt DRT to get total number of pages to be printed
     2693
     2694        LayoutTests:
     2695            printing/numberOfPages.html
     2696
     2697        [Qt] DRT: Get total number of pages to be printed
     2698        https://bugs.webkit.org/show_bug.cgi?id=34955
     2699
     2700        * Api/qwebframe.cpp:
     2701        (qt_drt_numberOfPages):
     2702        (qt_drt_evaluateScriptInIsolatedWorld):
     2703
     27042010-02-16  Ariya Hidayat  <ariya.hidayat@gmail.com>
     2705
     2706        Reviewed by Simon Hausmann.
     2707
     2708        [Qt] Allow scrolling to an anchor programmatically.
     2709        https://bugs.webkit.org/show_bug.cgi?id=29856
     2710
     2711        * Api/qwebframe.cpp:
     2712        (QWebFrame::scrollToAnchor): New API function.
     2713        * Api/qwebframe.h:
     2714        * tests/qwebframe/tst_qwebframe.cpp: New tests for scrollToAnchor().
     2715
     27162010-02-16  Ariya Hidayat  <ariya.hidayat@gmail.com>
     2717
     2718        Reviewed by Laszlo Gombos.
     2719
     2720        Fix building with Qt < 4.6.
     2721        https://bugs.webkit.org/show_bug.cgi?id=34885
     2722
     2723        * Api/qgraphicswebview.cpp:
     2724        (QGraphicsWebViewPrivate::updateResizesToContentsForPage):
     2725
     27262010-02-16  Simon Hausmann  <simon.hausmann@nokia.com>
     2727
     2728        Unreviewed Symbian build fix.
     2729
     2730        Updated the def file with two new exports used by QtLauncher.
     2731
     2732        * symbian/eabi/QtWebKitu.def:
     2733
     27342010-02-16  Ismail Donmez  <ismail@namtrac.org>
     2735
     2736        Reviewed by Pavel Feldman.
     2737
     2738        Fix compilation with inspector disabled.
     2739        https://bugs.webkit.org/show_bug.cgi?id=32724
     2740
     2741        * Api/qwebpage.cpp:
     2742        (qt_drt_webinspector_executeScript):
     2743        (qt_drt_webinspector_close):
     2744        (qt_drt_webinspector_show):
     2745        (qt_drt_setTimelineProfilingEnabled):
     2746
     27472010-02-16  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     2748
     2749        Reviewed by Simon Hausman.
     2750
     2751        [Qt] Fix include paths for forwarding headers in standalone builds.
     2752
     2753        * Api/DerivedSources.pro: Use relative paths for package builds and added some
     2754        documentation.
     2755
     27562010-02-15  Noam Rosenthal  <noam.rosenthal@nokia.com>
     2757
     2758        Reviewed by Simon Hausmann.
     2759
     2760        [Qt] QtWebkit bridge: enable passing a QWebElement to a signal/slot/property
     2761        Add Q_DECLARE_METATYPE to QWebElement, add relevant tests to
     2762        tst_qwebframe
     2763        https://bugs.webkit.org/show_bug.cgi?id=34901
     2764
     2765        * Api/qwebelement.h: declare metatype
     2766        * tests/qwebframe/tst_qwebframe.cpp:
     2767        (MyQObject::webElementProperty): new test for QWebElement
     2768        (MyQObject::setWebElementProperty): new test for QWebElement
     2769        (MyQObject::myOverloadedSlot): new test for QWebElement
     2770
     27712010-02-15  Robert Hogan  <robert@roberthogan.net>, Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     2772
     2773        Reviewed by Simon Hausmann.
     2774
     2775        [Qt] DRT: Support evaluateInWebInspector(), setTimelineProfilingEnabled().
     2776
     2777        Support LayoutTestController.evaluateInWebInspector(), setTimelineProfilingEnabled() in Qt DRT.
     2778
     2779        https://bugs.webkit.org/show_bug.cgi?id=33096
     2780
     2781        This allows the following tests to pass:
     2782
     2783        inspector/console-format-collections.html
     2784        inspector/styles-iframe.html
     2785        inspector/syntax-highlight-css.html
     2786        inspector/syntax-highlight-javascript.html
     2787        inspector/timeline-enum-stability.html
     2788        inspector/timeline-layout.html
     2789        inspector/timeline-mark-timeline.html
     2790        inspector/timeline-paint.html
     2791        inspector/timeline-parse-html.html
     2792        inspector/timeline-recalculate-styles.html
     2793        inspector/timeline-script-tag-1.html
     2794        inspector/timeline-script-tag-2.html
     2795        inspector/timeline-trivial.html
     2796        inspector/cookie-resource-match.html
     2797        inspector/elements-img-tooltip.html
     2798        inspector/elements-panel-selection-on-refresh.html
     2799        inspector/inspected-objects-not-overriden.html
     2800        inspector/timeline-event-dispatch.html
     2801        inspector/timeline-network-resource.html
     2802        inspector/elements-panel-rewrite-href.html
     2803        inspector/console-dir.html
     2804        inspector/console-dirxml.html
     2805        inspector/console-format.html
     2806        inspector/console-tests.html
     2807        inspector/elements-panel-structure.html
     2808        inspector/evaluate-in-frontend.html
     2809        inspector/console-clear.html
     2810
     2811        * Api/qwebpage.cpp:
     2812        (qt_drt_webinspector_executeScript):
     2813        (qt_drt_webinspector_close):
     2814        (qt_drt_webinspector_show):
     2815        (qt_drt_setTimelineProfilingEnabled):
     2816
     2817        * WebCoreSupport/InspectorClientQt.cpp:
     2818        (InspectorClientQt::createPage)
     2819
     28202010-02-12  Antti Koivisto  <koivisto@iki.fi>
     2821
     2822        Reviewed by Kenneth Rohde Christiansen and Simon Hausmann.
     2823       
     2824        https://bugs.webkit.org/show_bug.cgi?id=34885
     2825        Add a QGraphicsWebView mode that makes it automatically resize itself to the size of the content.
     2826
     2827        This is useful for cases where the client wants to implement page panning and zooming by manipulating
     2828        the graphics item.
     2829       
     2830        Add a option to QGVLauncher to test this mode.
     2831
     2832        * Api/qgraphicswebview.cpp:
     2833        (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate):
     2834        (QGraphicsWebViewPrivate::updateResizesToContentsForPage):
     2835        (QGraphicsWebViewPrivate::_q_contentsSizeChanged):
     2836        (QGraphicsWebView::setPage):
     2837        (QGraphicsWebView::setResizesToContents):
     2838        (QGraphicsWebView::resizesToContents):
     2839        * Api/qgraphicswebview.h:
     2840        * QGVLauncher/main.cpp:
     2841        (WebView::WebView):
     2842        (MainView::MainView):
     2843        (MainView::setMainWidget):
     2844        (MainView::resizeEvent):
     2845        (main):
     2846
     28472010-02-12  Diego Gonzalez  <diego.gonzalez@openbossa.org>
     2848
     2849        Reviewed by Kenneth Rohde Christiansen.
     2850
     2851        Qt DRT now dump the frame loader callbacks when LayoutTestController()
     2852        method is called.
     2853
     2854        LayoutTests:
     2855            http/tests/security/mixedContent/data-url-script-in-iframe.html
     2856            http/tests/security/mixedContent/empty-url-plugin-in-frame.html
     2857            http/tests/security/mixedContent/insecure-css-in-iframe.html
     2858            http/tests/security/mixedContent/insecure-iframe-in-iframe.html
     2859            http/tests/security/mixedContent/insecure-image-in-iframe.html
     2860            http/tests/security/mixedContent/insecure-plugin-in-iframe.html
     2861            http/tests/security/mixedContent/insecure-script-in-iframe.html
     2862            http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe.html
     2863            http/tests/security/mixedContent/redirect-https-to-http-script-in-iframe.html
     2864
     2865        [Qt] Make possible Qt DRT dump frame load callbacks
     2866        https://bugs.webkit.org/show_bug.cgi?id=34702
     2867
     2868        * WebCoreSupport/FrameLoaderClientQt.cpp:
     2869        (WebCore::FrameLoaderClientQt::didDisplayInsecureContent):
     2870        (WebCore::FrameLoaderClientQt::didRunInsecureContent):
     2871
     28722010-02-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     2873
     2874        Reviewed by Tor Arne VestbÞ.
     2875
     2876        [Qt] Make qtlauncher and qgvlauncher use the generated headers
     2877        path to make sure they are correctly generated.
     2878
     2879        * tests/tests.pri:
     2880
     28812010-02-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     2882
     2883        Reviewed by Tor Arne VestbÞ.
     2884
     2885        [Qt] Ensure relative paths in generated .pri files to ensure that
     2886        a source package with pre-generated derived sources can be compiled.
     2887
     2888        - Re-add a separate headers.pri file for WEBKIT_API_HEADERS
     2889        - Rename the generated headers.pri to classheaders.pri to avoid
     2890        confusion with the one generated by synqt since they don't have the
     2891        same content.
     2892        - Remove private headers list variable from classheaders.pri
     2893        - Use $$PWD in classheaders.pri
     2894        - Remove classheaders.pri from the installed files
     2895
     2896        * Api/DerivedSources.pro:
     2897
     28982010-02-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     2899
     2900        Reviewed by Tor Arne VestbÞ.
     2901
     2902        [Qt] Minor fixes on QtWebKit headers generation.
     2903
     2904        - Adds QtWebKit to the generated headers destination path
     2905        - Improve compatibility with MinGW
     2906
     2907        * Api/DerivedSources.pro:
     2908
     29092010-02-09  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     2910
     2911        Reviewed by nobody, build fix.
     2912
     2913        [Qt] Fix standalone build with MinGW.
     2914
     2915        * tests/qwebelement/tst_qwebelement.cpp:
     2916        * tests/tests.pri:
     2917
     29182010-02-10  Diego Gonzalez  <diego.gonzalez@openbossa.org>
     2919
     2920        Reviewed by Kenneth Rohde Christiansen.
     2921
     2922        Implement pageNumberForElementById() method in Qt DRT LayoutTestController,
     2923        to make Qt DRT able to get page number.
     2924
     2925        LayoutTests:
     2926            printing/page-break-always.html
     2927            printing/pageNumerForElementById.html
     2928            printing/css2.1/page-break-before-000.html
     2929            printing/css2.1/page-break-after-000.html
     2930            printing/css2.1/page-break-after-004.html
     2931            printing/css2.1/page-break-before-001.html
     2932            printing/css2.1/page-break-after-001.html
     2933            printing/css2.1/page-break-after-002.html
     2934            printing/css2.1/page-break-before-002.html
     2935            printing/css2.1/page-break-inside-000.html
     2936
     2937        [Qt] Make possible Qt DRT get a page number for element by ID
     2938        https://bugs.webkit.org/show_bug.cgi?id=34777
     2939
     2940        * Api/qwebframe.cpp:
     2941        (qt_drt_pageNumberForElementById):
     2942
     29432010-02-09  Yael Aharon  <yael.aharon@nokia.com>
     2944
     2945        Reviewed by Adam Barth.
     2946
     2947        [Qt] Unit test for window.runModalDialog
     2948        https://bugs.webkit.org/show_bug.cgi?id=34755
     2949
     2950        * tests/qwebpage/tst_qwebpage.cpp:
     2951        (TestModalPage::TestModalPage):
     2952        (TestModalPage::createWindow):
     2953        (tst_QWebPage::showModalDialog):
     2954
     29552010-02-09  Andreas Kling  <andreas.kling@nokia.com>
     2956
     2957        Reviewed by Kenneth Rohde Christiansen.
     2958
     2959        [Qt] Sync with API changes in Maemo 5 kinetic scrolling
     2960
     2961        https://bugs.webkit.org/show_bug.cgi?id=34747
     2962
     2963        This is a forward-port of http://qt.gitorious.org/+qt-developers/qt/x11-maemo/commit/08497561
     2964
     2965        * Api/qwebview.cpp:
     2966        (qt_sendSpontaneousEvent):
     2967        (QWebViewKineticScroller::QWebViewKineticScroller):
     2968        (QWebViewKineticScroller::setWidget):
     2969        (QWebViewKineticScroller::eventFilter):
     2970        (QWebViewKineticScroller::cancelLeftMouseButtonPress):
     2971        (QWebViewKineticScroller::currentFrame):
     2972        (QWebViewKineticScroller::scrollingFrameAt):
     2973        (QWebViewKineticScroller::maximumScrollPosition):
     2974        (QWebViewKineticScroller::scrollPosition):
     2975        (QWebViewKineticScroller::viewportSize):
     2976        (QWebViewKineticScroller::setScrollPosition):
     2977        (QWebViewKineticScroller::sendEvent):
     2978        (QWebView::QWebView):
     2979
     29802010-02-09  Yael Aharon  <yael.aharon@nokia.com>
     2981
     2982        Reviewed by Kenneth Rohde Christiansen.
     2983
     2984        [Qt] Webkit in Qt does not have window.showModalDialog
     2985        https://bugs.webkit.org/show_bug.cgi?id=25585
     2986
     2987        Create a new eventloop when runModal() is called.
     2988        Added comemnt in QWebPage::createWindow that the application is responsible
     2989        for setting the modality of the appropriate window.
     2990
     2991        * Api/qwebpage.cpp:
     2992        * WebCoreSupport/ChromeClientQt.cpp:
     2993        (WebCore::ChromeClientQt::ChromeClientQt):
     2994        (WebCore::ChromeClientQt::~ChromeClientQt):
     2995        (WebCore::ChromeClientQt::canRunModal):
     2996        (WebCore::ChromeClientQt::runModal):
     2997        * WebCoreSupport/ChromeClientQt.h:
     2998
     29992010-01-19  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     3000
     3001        Reviewed by Dave Hyatt.
     3002
     3003        Implement flattening of framesets
     3004        https://bugs.webkit.org/show_bug.cgi?id=32717
     3005
     3006        Privately export the setFrameSetFlatteningEnabled setting for
     3007        use with the Qt DRT.
     3008
     3009        * Api/qwebpage.cpp:
     3010        (qt_drt_setFrameSetFlatteningEnabled):
     3011        (QWebPagePrivate::core):
     3012        * Api/qwebpage_p.h:
     3013
     30142010-02-05  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     3015
     3016        [Qt] Fix build on Windows
     3017
     3018        Reviewed by Kenneth Rohde Christiansen.
     3019
     3020        DerivedSources for our API headers failed on Windows,
     3021        due to Windows not accepting ; as a command separator,
     3022        not needing quotes for echo, and needing < and > escaped.
     3023
     3024        We now detect Windows and set these quote markers and
     3025        escape markers accordingly, as well as use && for separating
     3026        individual commands.
     3027
     3028        * Api/DerivedSources.pro:
     3029
     30302010-02-05  Yury Semikhatsky  <yurys@chromium.org>
     3031
     3032        Reviewed by Pavel Feldman.
     3033
     3034        Remove unused inmport of ScriptFunctionCall.h
     3035
     3036        https://bugs.webkit.org/show_bug.cgi?id=33592
     3037
     3038        * Api/qwebelement.cpp:
     3039
     30402010-02-05  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     3041
     3042        Reviewed by Simon Hausmann.
     3043
     3044        [Qt] Generate convenience headers (QWebView, etc) using qmake
     3045
     3046        In Qt this is done using syncqt, but we use a pro-file instead
     3047        that generates makefile-rules for each of the extra headers.
     3048
     3049        These extra headers are installed alongside the normal headers.
     3050
     3051        * Api/DerivedSources.pro: Added. List of headers + pro file magic
     3052        * Api/headers.pri: Removed, list of headers is now in the above file
     3053
     30542010-02-04  No'am Rosenthal  <noam.rosenthal@nokia.com>
     3055
     3056        Reviewed by Ariya Hidayat.
     3057
     3058        [Qt] Tuning and optimizations to GraphicsLayerQt. Mainly reduced usage
     3059        of QTimer::singleShot, and moved syncLayers() from paint() to update()
     3060        https://bugs.webkit.org/show_bug.cgi?id=34062
     3061
     3062        * Api/qgraphicswebview.cpp:
     3063        (QGraphicsWebViewPrivate::update): Moved the sync operation to update
     3064        (QGraphicsWebView::paint): Moved the sync operation to update
     3065
     30662010-02-03  Andras Becsi  <abecsi@webkit.org>
     3067
     3068        Unreviewed build fix.
     3069
     3070        [Qt] Roll-out r54281 because it broke the build on the Qt Release bot.
     3071
     3072        * Api/qgraphicswebview.cpp:
     3073        (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate):
     3074        (QGraphicsWebViewPrivate::markForSync):
     3075        (QGraphicsWebViewPrivate::update):
     3076        (QGraphicsWebView::paint):
     3077
     30782010-02-02  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     3079
     3080        Reviewed by Ariya Hidayat.
     3081
     3082        Do not use a proxy widget for the QComboBox on Maemo 5, as it
     3083        is not working properly and it is not needed at all, as the
     3084        comboboxes comes up in their full width on the screen and
     3085        do not depend on view.
    1793086
    1803087        * WebCoreSupport/QtFallbackWebPopup.cpp:
    181         (WebCore::QtFallbackWebPopup::populate):
     3088        (WebCore::QtFallbackWebPopup::show):
     3089
     30902010-02-02  Jessie Berlin  <jberlin@webkit.org>
     3091
     3092        Rubber Stamped by Holger Freyther.
     3093
     3094        [Qt] Fix style issue identified in bug:
     3095        https://bugs.webkit.org/show_bug.cgi?id=34329
     3096
     3097        * WebCoreSupport/InspectorClientQt.cpp:
     3098        (WebCore::InspectorClientWebPage::InspectorClientWebPage):
     3099        Fix indentation.
     3100
     31012010-02-01  Jessie Berlin  <jberlin@webkit.org>
     3102
     3103        Reviewed by Holger Freyther.
     3104
     3105        [Qt] Enable inspecting the Web Inspector in QtLauncher
     3106
     3107        https://bugs.webkit.org/show_bug.cgi?id=34329
     3108
     3109        * WebCoreSupport/InspectorClientQt.cpp:
     3110        (WebCore::InspectorClientWebPage::InspectorClientWebPage):
     3111        Allow the DeveloperExtrasEnabled setting to default to true for the page containing the Web Inspector.
     3112
     31132010-02-02  Andreas Kling  <andreas.kling@nokia.com>
     3114
     3115        Reviewed by Kenneth Rohde Christiansen.
     3116
     3117        [Qt] Display HTML tags verbatim in JS alert/confirm/prompt boxes
     3118
     3119        https://bugs.webkit.org/show_bug.cgi?id=34429
     3120
     3121        * Api/qwebpage.cpp:
     3122        (QWebPage::javaScriptAlert):
     3123        (QWebPage::javaScriptConfirm):
     3124        (QWebPage::javaScriptPrompt):
     3125
     31262010-02-02  Noam Rosenthal  <noam.rosenthal@nokia.com>
     3127
     3128        Reviewed by Kenneth Rohde Christiansen.
     3129
     3130        [Qt] Enable a way to measure FPS in QGVLauncher
     3131        run QGVLauncher with --show-fps to see ongoing fps measurements
     3132        This is not meant as accurate FPS, but rather as a way to find
     3133        improvements/regressions
     3134        https://bugs.webkit.org/show_bug.cgi?id=34450
     3135
     3136        * QGVLauncher/main.cpp:
     3137        (MainView::MainView): initialize FPS values
     3138        (MainView::paintEvent): count a painted frame here
     3139        (MainView::printFps): we print the fps with qDebug every 5 seconds.
     3140
     31412010-01-29  Ben Murdoch  <benm@google.com>
     3142
     3143        Reviewed by Dimitri Glazkov.
     3144
     3145        [Android] Android needs functionality in the ChromeClient to be informed when touch events are and are not needed by the webpage.
     3146        https://bugs.webkit.org/show_bug.cgi?id=34215
     3147
     3148        Add needTouchEvents() to the ChromeClient which is called when the page decides it needs or no longer needs to be informed of touch events.
     3149
     3150        * WebCoreSupport/ChromeClientQt.h:
     3151        (WebCore::ChromeClientQt::needTouchEvents): Add an empty implementation.
     3152
     31532010-01-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     3154
     3155        Reviewed by Simon Hausmann
     3156
     3157        Disable auto-uppercase and predictive text on Maemo5, just like the
     3158        build-in MicroB Browser.
     3159
     3160        * WebCoreSupport/EditorClientQt.cpp:
     3161        (WebCore::EditorClientQt::setInputMethodState):
    1823162
    18331632010-01-28  Andreas Kling  <andreas.kling@nokia.com>
     
    2053185        (QWebView::QWebView):
    2063186
    207 2010-01-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
    208 
    209         Reviewed by Simon Hausmann
    210 
    211         Disable auto-uppercase and predictive text on Maemo5, just like the
    212         build-in MicroB Browser.
    213 
    214         * WebCoreSupport/EditorClientQt.cpp:
    215         (WebCore::EditorClientQt::setInputMethodState):
     31872010-01-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     3188
     3189        Reviewed by Simon Hausmann.
     3190
     3191        Do not set the combobox font on Maemo5 and S60; use the
     3192        default instead.
     3193
     3194        * WebCoreSupport/QtFallbackWebPopup.cpp:
     3195        (WebCore::QtFallbackWebPopup::populate):
    2163196
    21731972010-01-28  Trond KjernÃ¥sen <trond@trolltech.com>
     
    2233203        * Api/qwebframe.cpp:
    2243204        (QWebFrame::print):
     3205
     32062010-01-27  Diego Gonzalez  <diego.gonzalez@openbossa.org>
     3207
     3208        Reviewed by Kenneth Rohde Christiansen.
     3209
     3210        [Qt] DRT Provide worker thread ability to track counters
     3211        https://bugs.webkit.org/show_bug.cgi?id=34221
     3212
     3213        Implement workerThreadCount() in LayoutTestController of Qt DRT
     3214
     3215        Tests:
     3216        fast/workers/dedicated-worker-lifecycle.html
     3217        fast/workers/shared-worker-frame-lifecycle.html
     3218        fast/workers/shared-worker-lifecycle.html
     3219        fast/workers/worker-lifecycle.html
     3220
     3221        * Api/qwebpage.cpp:
     3222        (qt_drt_workerThreadCount):
     3223
     32242010-01-27  Simon Hausmann  <simon.hausmann@nokia.com>
     3225
     3226        Reviewed by Laszlo Gombos.
     3227
     3228        [Qt] Update the .def files with exported symbols
     3229
     3230        * symbian/eabi/QtWebKitu.def: Add two mangled missing new symbols for arm eabi.
     3231
     32322010-01-27  Kent Hansen  <kent.hansen@nokia.com>
     3233
     3234        Reviewed by Simon Hausmann.
     3235
     3236        [Qt] Meta-methods can't be introspected using ES5 API
     3237        https://bugs.webkit.org/show_bug.cgi?id=34087
     3238
     3239        Test that Object.getOwnPropertyDescriptor and
     3240        Object.getOwnPropertyNames work with meta-methods.
     3241
     3242        * tests/qwebframe/tst_qwebframe.cpp:
    2253243
    22632442010-01-26  Simon Hausmann  <simon.hausmann@nokia.com>
     
    2373255        * WebCoreSupport/QtFallbackWebPopup.cpp:
    2383256        (WebCore::QtFallbackWebPopup::show):
     3257
     32582010-01-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
     3259
     3260        Reviewed by Simon Hausmann.
     3261
     3262        First steps of the QtScript API.
     3263       
     3264        Two new classes were created; QScriptEngine and QScriptValue.
     3265        The first should encapsulate a javascript context and the second a script
     3266        value.
     3267       
     3268        This API is still in development, so it isn't compiled by default.
     3269        To trigger compilation, pass --qmakearg="CONFIG+=build-qtscript" to
     3270        build-webkit.
     3271
     3272        https://bugs.webkit.org/show_bug.cgi?id=32565
     3273
     3274        * docs/qtwebkit.qdocconf:
    2393275
    24032762010-01-26  Holger Hans Peter Freyther  <zecke@selfish.org>
     
    2663302        (tst_QWebPage::testJSPrompt):
    2673303
     33042010-01-25  Simon Hausmann  <hausmann@webkit.org>
     3305
     3306        Reviewed by Kenneth Rohde Christiansen.
     3307
     3308        [Qt] In RenderThemeQt determine the QStyle from the page client instead of the page's view
     3309        https://bugs.webkit.org/show_bug.cgi?id=34053
     3310
     3311        * Api/qgraphicswebview.cpp:
     3312        (QGraphicsWebViewPrivate::style): Implement QWebPageClient::style() and return the graphics
     3313        widget's style.
     3314        * Api/qwebpage.cpp:
     3315        (QWebPageWidgetClient::style): Implement QWebPageClient::style() and return the widget's style.
     3316
    26833172010-01-25  Janne Koskinen  <janne.p.koskinen@digia.com>
    2693318
     
    2753324        * symbian/backup_registration.xml: Added.
    2763325
    277 2009-11-19  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     33262010-01-23  Girish Ramakrishnan  <girish@forwardbias.in>
    2783327
    2793328        Reviewed by Kenneth Rohde Christiansen.
    2803329
    281         [Qt] Fix QWebInspector destruction problem.
    282         https://bugs.webkit.org/show_bug.cgi?id=31664
    283 
    284         * Api/qwebpage.cpp:
    285         (QWebPage::~QWebPage):
     3330        [Qt] Fix positioning of ComboBox popup in QGraphicsWebView.
     3331       
     3332        Wrap the popup in a QGraphicsProxyWidget, so that the popup
     3333        transforms with the item.
     3334       
     3335        https://bugs.webkit.org/show_bug.cgi?id=33887
     3336
     3337        * WebCoreSupport/QtFallbackWebPopup.cpp:
     3338        (WebCore::QtFallbackWebPopupCombo::hidePopup):
     3339        (WebCore::QtFallbackWebPopup::QtFallbackWebPopup):
     3340        (WebCore::QtFallbackWebPopup::~QtFallbackWebPopup):
     3341        (WebCore::QtFallbackWebPopup::show):
     3342        * WebCoreSupport/QtFallbackWebPopup.h:
     3343
     33442010-01-22  Peter Kasting  <pkasting@google.com>
     3345
     3346        Not reviewed, backout.
     3347
     3348        Back out r52673, which caused several regressions.
     3349        https://bugs.webkit.org/show_bug.cgi?id=32533
     3350
     3351        * WebCoreSupport/QtFallbackWebPopup.cpp:
     3352        (WebCore::QtFallbackWebPopupCombo::hidePopup):
     3353
     33542010-01-22  Girish Ramakrishnan  <girish@forwardbias.in>
     3355
     3356        Reviewed by Simon Hausmann.
     3357
     3358        [Qt] Save the QWebPageClient instead of the ownerWidget in QtAbstractWebPopup
     3359       
     3360        The QWebPageClient is required for the QtFallbackWebPopup. QtFallbackWebPopup will
     3361        need it to create a QGraphicsProxyWidget (in a future commit) for the
     3362        QGraphicsWebView's web popup.
     3363
     3364        * WebCoreSupport/QtFallbackWebPopup.cpp:
     3365        (WebCore::QtFallbackWebPopup::show):
     3366
     33672010-01-22  Girish Ramakrishnan  <girish@forwardbias.in>
     3368
     3369        Reviewed by Kenneth Rohde Christiansen.
     3370
     3371        QState::polished() was renamed to QState::propertiesAssigned() when
     3372        Qt 4.6.0 was released.
     3373
     3374        * QGVLauncher/main.cpp:
     3375        (MainWindow::init):
     3376
     33772010-01-21  Diego Gonzalez  <diego.gonzalez@openbossa.org>
     3378
     3379        Reviewed by Kenneth Rohde Christiansen.
     3380
     3381        [Qt] add setDomainRelaxationForbiddenForURLScheme in Qt DRT
     3382        https://bugs.webkit.org/show_bug.cgi?id=33945
     3383
     3384        * Api/qwebsecurityorigin.cpp:
     3385        (qt_drt_setDomainRelaxationForbiddenForURLScheme):
     3386
     33872010-01-21  No'am Rosenthal  <noam.rosenthal@nokia.com>
     3388
     3389        Reviewed by Antti Koivisto.
     3390
     3391        [Qt] Implement GraphicsLayer for accelerated layer compositing
     3392        https://bugs.webkit.org/show_bug.cgi?id=33514
     3393
     3394        Here we have the QGraphicsWebView support for accelerated compositing
     3395
     3396        * Api/qgraphicswebview.cpp:
     3397        (QGraphicsWebViewOverlay::q): access to container object
     3398        (QGraphicsWebViewOverlay::boundingRect): overlay has same rect as the
     3399        webview
     3400        (QGraphicsWebViewOverlay::paint): paint everything but the contents
     3401        (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate): some vars needed
     3402        for accelerated compositing
     3403        (QGraphicsWebViewPrivate::):
     3404        (QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate):
     3405        (QGraphicsWebViewPrivate::setRootGraphicsLayer): make sure we have a
     3406        scrollbar overlay, and that the new graphics layer is parented by the
     3407        web-view
     3408        (QGraphicsWebViewPrivate::markForSync): flush changes at earliest
     3409        convenience or during the next draw
     3410
     3411        (QGraphicsWebViewPrivate::updateCompositingScrollPosition): sync the
     3412        position of the compositing layer with the scroll position
     3413        (QGraphicsWebViewPrivate::syncLayers): flush changes now
     3414        (QGraphicsWebViewPrivate::scroll): make sure we also move the
     3415        compositing layer
     3416        (QGraphicsWebViewPrivate::update): also update the overlay if needed
     3417        (QGraphicsWebView::QGraphicsWebView): initialize overlay with 0
     3418        (QGraphicsWebView::paint): paint only contents if we have an overlay,
     3419        sync the compositing layers now if needed
     3420        (QGraphicsWebView::setPage): also clean up the compositing
     3421        (QGraphicsWebView::updateGeometry): also update overlay geo
     3422        (QGraphicsWebView::setGeometry): also update overlay geo
     3423        * Api/qgraphicswebview.h: reimp compositing stuff from QWebPageClient
     3424        * Api/qwebsettings.cpp: init new settings flag for compositing as
     3425        false
     3426        (QWebSettingsPrivate::apply): apply new settings flag for compositing
     3427        (QWebSettings::QWebSettings):
     3428        * Api/qwebsettings.h: new settings flag for compositing
     3429        * Api/qwebview.cpp:
     3430        (QWebView::setPage): qwebview doesn't support compositing: always false
     3431        * QGVLauncher/main.cpp:
     3432        (WebView::WebView): some more cmdline arguments + compositing
     3433        (MainWindow::init): some more cmdline arguments
     3434        (main): ditto
     3435        * WebCoreSupport/ChromeClientQt.cpp:
     3436        (WebCore::ChromeClientQt::attachRootGraphicsLayer): reimp for
     3437        accel-compositing
     3438        (WebCore::ChromeClientQt::setNeedsOneShotDrawingSynchronization):
     3439        reimp for accel compositing
     3440        (WebCore::ChromeClientQt::scheduleCompositingLayerSync): reimp for
     3441        accel compositing
     3442        * WebCoreSupport/ChromeClientQt.h: reimps for accel compositing
     3443
     34442010-01-21  Benjamin Poulain  <benjamin.poulain@nokia.com>
     3445
     3446        Reviewed by Simon Hausmann.
     3447
     3448        [Qt] Improve the autotests of QtWebkit
     3449        https://bugs.webkit.org/show_bug.cgi?id=32216
     3450
     3451        Remove qWait() of the test when possible.
     3452
     3453        * tests/qwebpage/tst_qwebpage.cpp:
     3454        (tst_QWebPage::loadFinished):
     3455        (tst_QWebPage::database):
     3456        (tst_QWebPage::testEnablePersistentStorage):
     3457        (tst_QWebPage::errorPageExtension):
     3458        (tst_QWebPage::screenshot):
     3459
     34602010-01-21  Simon Hausmann  <simon.hausmann@nokia.com>
     3461
     3462        Prospective build fix for the Qt build.
     3463
     3464        Fix compilation against Qt without WebKit support by not including QtWebKit/QWebView
     3465        but widget.h instead and instantiating QWebView through a typedef, to ensure we're using
     3466        our locally built WebKit.
     3467
     3468        * tests/hybridPixmap/widget.h:
     3469        * tests/hybridPixmap/widget.ui:
     3470
     34712010-01-21  No'am Rosenthal  <noam.rosenthal@nokia.com>
     3472
     3473        Reviewed by Simon Hausmann.
     3474
     3475        [Qt] Adding QPixmap/QImage support for the Qt hybrid layer
     3476        https://bugs.webkit.org/show_bug.cgi?id=32461
     3477
     3478        * tests/hybridPixmap: Added.
     3479        * tests/hybridPixmap/hybridPixmap.pro: Added.
     3480        * tests/hybridPixmap/resources.qrc: Added.
     3481        * tests/hybridPixmap/test.html: Added.
     3482        * tests/hybridPixmap/tst_hybridPixmap.cpp: Added.
     3483        (tst_hybridPixmap::tst_hybridPixmap): tests most of the use cases for
     3484        hybrid pixmap/image manipulation
     3485        (tst_hybridPixmap::init): QTestLib initialization
     3486        (tst_hybridPixmap::cleanup): QTestLib cleanup
     3487        (tst_hybridPixmap::hybridPixmap): run the html file
     3488        * tests/hybridPixmap/widget.cpp: Added.
     3489        (Widget::Widget):
     3490        (Widget::refreshJS):
     3491        (Widget::start):
     3492        (Widget::completeTest):
     3493        (Widget::setPixmap):
     3494        (Widget::pixmap):
     3495        (Widget::setImage):
     3496        (Widget::image):
     3497        (Widget::~Widget):
     3498        (Widget::changeEvent):
     3499        (Widget::compare):
     3500        (Widget::imageSlot):
     3501        (Widget::pixmapSlot):
     3502        (Widget::randomSlot):
     3503        * tests/hybridPixmap/widget.h: Added.
     3504        * tests/hybridPixmap/widget.ui: Added.
     3505        * tests/tests.pro:
     3506
     35072010-01-21  Luiz Agostini  <luiz.agostini@openbossa.org>
     3508
     3509        Reviewed by Kenneth Rohde Christiansen.
     3510
     3511        [Qt] Custom select popups.
     3512        https://bugs.webkit.org/show_bug.cgi?id=33418
     3513
     3514        Adjusting QtFallbackWebPopupCombo to the changes in WebCore layer.
     3515
     3516        * WebCoreSupport/ChromeClientQt.cpp:
     3517        (WebCore::ChromeClientQt::createSelectPopup):
     3518        * WebCoreSupport/ChromeClientQt.h:
     3519        * WebCoreSupport/QtFallbackWebPopup.cpp:
     3520        (WebCore::QtFallbackWebPopupCombo::QtFallbackWebPopupCombo):
     3521        (WebCore::QtFallbackWebPopupCombo::showPopup):
     3522        (WebCore::QtFallbackWebPopupCombo::hidePopup):
     3523        (WebCore::QtFallbackWebPopup::QtFallbackWebPopup):
     3524        (WebCore::QtFallbackWebPopup::~QtFallbackWebPopup):
     3525        (WebCore::QtFallbackWebPopup::show):
     3526        (WebCore::QtFallbackWebPopup::hide):
     3527        (WebCore::QtFallbackWebPopup::populate):
     3528        * WebCoreSupport/QtFallbackWebPopup.h:
     3529
     35302010-01-19  Steve Block  <steveblock@google.com>
     3531
     3532        Reviewed by Adam Barth.
     3533
     3534        Renames WebCore/bridge/runtime.[cpp|h] to WebCore/bridge/Bridge.[cpp|h]
     3535        https://bugs.webkit.org/show_bug.cgi?id=33801
     3536
     3537        * Api/qwebframe.cpp:
     3538
     35392010-01-14  Brian Weinstein  <bweinstein@apple.com>
     3540
     3541        Reviewed by Adam Roben.
     3542
     3543        Drag and Drop source/destination code needs cleanup.
     3544        <https://bugs.webkit.org/show_bug.cgi?id=33691>.
     3545       
     3546        Update to new way of calling sourceOperation.
     3547
     3548        * WebCoreSupport/DragClientQt.cpp:
     3549        (WebCore::DragClientQt::startDrag):
     3550
     35512010-01-14  Simon Hausmann  <simon.hausmann@nokia.com>
     3552
     3553        Reviewed by Tor Arne VestbÞ.
     3554
     3555        [Qt] Symbian build fixes.
     3556
     3557        * tests/qwebpage/tst_qwebpage.cpp: Include util.h
     3558        * tests/tests.pri: Don't define TESTS_SOURCE_DIR, it doesn't work.
     3559        * tests/util.h: Define TESTS_SOURCE_DIR here, just like it's done in Qt.
    2863560
    28735612010-01-14  Simon Hausmann  <simon.hausmann@nokia.com>
     
    2933567        * symbian/bwins/QtWebKitu.def:
    2943568        * symbian/eabi/QtWebKitu.def:
     3569
     35702010-01-13  Darin Adler  <darin@apple.com>
     3571
     3572        Reviewed by Dan Bernstein.
     3573
     3574        Move more of the selection and caret painting code from Frame to SelectionController.
     3575        https://bugs.webkit.org/show_bug.cgi?id=33619
     3576
     3577        * Api/qwebpage.cpp:
     3578        (QWebPagePrivate::inputMethodEvent): Seems possibly wrong to be directly invoking this
     3579        setCaretVisible here, but I updated it to call it in its new location.
     3580
     35812010-01-11  Simon Hausmann  <simon.hausmann@nokia.com>
     3582
     3583        Reviewed by Holger Freyther.
     3584
     3585        [Qt] Add private API for QWebFrame scrolling, to maintain binary compatibility with Qt 4.6.
     3586
     3587        This is just a temporary addition until we have introduced #ifdefs to allow
     3588        safely removing the private API again.
     3589
     3590        * Api/qwebframe.cpp:
     3591        (qtwebkit_webframe_scrollRecursively):
     3592
     35932010-01-10  Robert Hogan  <robert@roberthogan.net>
     3594
     3595        Reviewed by Adam Barth.
     3596
     3597        [Qt] Add enableXSSAuditor support to QWebSettings and DRT.
     3598
     3599        https://bugs.webkit.org/show_bug.cgi?id=33419
     3600
     3601        * Api/qwebsettings.cpp:
     3602        (QWebSettingsPrivate::apply):
     3603        * Api/qwebsettings.h:
     3604
     36052010-01-09  Daniel Bates  <dbates@webkit.org>
     3606
     3607        No review, rolling out r53044.
     3608        http://trac.webkit.org/changeset/53044
     3609        https://bugs.webkit.org/show_bug.cgi?id=33419
     3610       
     3611        We need to look into this some more because the Qt
     3612        bot is failing the XSSAuditor tests. See bug #33419
     3613        for more details.
     3614
     3615        * Api/qwebsettings.cpp:
     3616        * Api/qwebsettings.h:
     3617
     36182010-01-09  Daniel Bates  <dbates@webkit.org>
     3619
     3620        Reviewed by Adam Barth.
     3621
     3622        https://bugs.webkit.org/show_bug.cgi?id=33419
     3623
     3624        Adds support for the XSSAuditor to the Qt DRT.
     3625
     3626        * Api/qwebsettings.cpp: Updated comment to reflect added key XSSAuditorEnabled.
     3627        * Api/qwebsettings.h: Adds settings key XSSAuditorEnabled.
     3628
     36292010-01-08  Luiz Agostini  <luiz.agostini@openbossa.org>
     3630
     3631        Reviewed by Kenneth Rohde Christiansen.
     3632
     3633        [Qt] Delegation client
     3634        https://bugs.webkit.org/show_bug.cgi?id=32826
     3635
     3636        Added method createPopup to ChromeClientQt used to create popups.
     3637        QtFallbackWebPopup moved from WebCore/platform/qt to
     3638        WebKit/qt/WebCoreSupport.
     3639
     3640        * WebCoreSupport/ChromeClientQt.cpp:
     3641        (WebCore::ChromeClientQt::createPopup):
     3642        * WebCoreSupport/ChromeClientQt.h:
     3643        * WebCoreSupport/QtFallbackWebPopup.cpp: Added.
     3644        (WebCore::QtFallbackWebPopup::QtFallbackWebPopup):
     3645        (WebCore::QtFallbackWebPopup::show):
     3646        (WebCore::QtFallbackWebPopup::populate):
     3647        (WebCore::QtFallbackWebPopup::showPopup):
     3648        (WebCore::QtFallbackWebPopup::hidePopup):
     3649        (WebCore::QtFallbackWebPopup::activeChanged):
     3650        (WebCore::QtFallbackWebPopup::setParent):
     3651        * WebCoreSupport/QtFallbackWebPopup.h: Added.
     3652        (WebCore::QtFallbackWebPopup::hide):
     3653
     36542010-01-07  Yael Aharon  <yael.aharon@nokia.com>
     3655
     3656        Reviewed by Kenneth Rohde Christiansen.
     3657
     3658        [Qt] Allow the application to override online/offline network status
     3659        https://bugs.webkit.org/show_bug.cgi?id=32684
     3660
     3661        Add a setting so that applications can overide the network status.
     3662        Applications that use this setting still need to block network access
     3663        through QNAM.
     3664
     3665        * Api/qwebsettings.cpp:
     3666        (qt_networkAccessAllowed):
     3667
     36682010-01-07  Yongjun Zhang  <yongjun.zhang@nokia.com>, Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     3669
     3670        Reviewed by Simon Hausmann.
     3671
     3672        [Qt] need an API to suspend and resume active Javascript DOM objects.
     3673        https://bugs.webkit.org/show_bug.cgi?id=31673
     3674
     3675        Add suspend and resume DOM objects private API to QWebFrame.
     3676
     3677        * Api/qwebframe.cpp:
     3678        (qt_suspendActiveDOMObjects):
     3679        (qt_resumeActiveDOMObjects):
     3680
     36812010-01-06  Andreas Kling  <andreas.kling@nokia.com>
     3682
     3683        Reviewed by Simon Hausmann.
     3684
     3685        [Qt] Return an invalid Qt::ImMicroFocus if queried while the view needs to layout.
     3686
     3687        https://bugs.webkit.org/show_bug.cgi?id=33204
     3688
     3689        * Api/qwebpage.cpp:
     3690        (QWebPage::inputMethodQuery):
     3691
     36922010-01-05  Yael Aharon  <yael.aharon@nokia.com>
     3693
     3694        Reviewed by Kenneth Rohde Christiansen.
     3695
     3696        Drag & drop layout tests fail even when run manually
     3697        https://bugs.webkit.org/show_bug.cgi?id=33055
     3698
     3699        No new tests. Fix 3 layout tests when run manually.
     3700        fast/events/drag-and-drop.html
     3701        fast/events/drag-and-drop-dataTransfer-types-nocrash.html
     3702        fast/events/drag-and-drop-fire-drag-dragover.html
     3703        Running these tests in DRT will be fixed in 31332.
     3704
     3705        * Api/qwebpage.cpp:
     3706        (dropActionToDragOp):
     3707        (dragOpToDropAction):
     3708        (QWebPagePrivate::dragEnterEvent):
     3709        (QWebPagePrivate::dragMoveEvent):
     3710        (QWebPagePrivate::dropEvent):
     3711        Accept drag events even if they are not over a drop target.
     3712        This is to ensure that drag events will continue to be delivered.
     3713
     3714        * Api/qwebpage_p.h:
     3715        * WebCoreSupport/DragClientQt.cpp:
     3716        (WebCore::dragOperationToDropActions):
     3717        (WebCore::dropActionToDragOperation):
     3718        (WebCore::DragClientQt::startDrag):
     3719        Send dragEnd event.
     3720
     37212010-01-04  Daniel Bates  <dbates@webkit.org>
     3722
     3723        Reviewed by Eric Seidel.
     3724
     3725        https://bugs.webkit.org/show_bug.cgi?id=33097
     3726
     3727        Cleans up the File menu to better conform to the File menu in Safari
     3728        both in terms of options and keyboard shortcuts. Adds a "Quit" menu
     3729        options to close all open windows.
     3730
     3731        * QGVLauncher/main.cpp:
     3732        (MainWindow::buildUI):
     3733
     37342009-12-31  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     3735
     3736        Reviewed by Kenneth Rohde Christiansen.
     3737
     3738        [Qt] Enable all HTML5 persistent features for QGVLauncher
     3739        https://bugs.webkit.org/show_bug.cgi?id=33086
     3740
     3741        * QGVLauncher/main.cpp: Call enablePersistentStorage()
     3742        (main):
     3743
     37442009-12-30  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     3745
     3746        Reviewed by Simon Hausmann.
     3747
     3748        [Qt] It should be possible to disable inspector
     3749        https://bugs.webkit.org/show_bug.cgi?id=32724
     3750
     3751        This change fixes the build break. Some QtWebKit interfaces
     3752        will not be fully functional (most notable QWebInspector) if
     3753        INSPECTOR is disabled.
     3754
     3755        * Api/qwebinspector.cpp:
     3756        (QWebInspector::showEvent):
     3757        (QWebInspector::closeEvent):
     3758        * Api/qwebpage.cpp:
     3759        (webActionForContextMenuAction):
     3760        (QWebPagePrivate::getOrCreateInspector):
     3761        (QWebPagePrivate::inspectorController):
     3762        (QWebPage::triggerAction):
     3763        (QWebPage::updatePositionDependentActions):
     3764        * WebCoreSupport/InspectorClientQt.cpp:
     3765        (WebCore::InspectorClientQt::showWindow):
     3766        (WebCore::InspectorClientQt::closeWindow):
     3767
     37682009-12-30  Janne Koskinen  <janne.p.koskinen@digia.com>
     3769
     3770        Reviewed by Simon Hausmann.
     3771
     3772        Upstream Symbian def files from Qt 4.6.
     3773
     3774        These files define the ABI of QtWebKit on Symbian.
     3775
     3776        * symbian/bwins/QtWebKitu.def: Added.
     3777        * symbian/eabi/QtWebKitu.def: Added.
     3778
     37792009-12-29  Daniel Bates  <dbates@webkit.org>
     3780
     3781        Reviewed by Ariya Hidayat.
     3782
     3783        https://bugs.webkit.org/show_bug.cgi?id=32925
     3784
     3785        Adds an Open File dialog to make it convenient to open a file
     3786        to view in the browser.
     3787
     3788        * QGVLauncher/main.cpp:
     3789        (MainWindow::load): Modified to call loadURL.
     3790        (MainWindow::openFile): Added.
     3791        (MainWindow::loadURL): Added.
     3792        (MainWindow::buildUI): Added menu item Open File.
     3793
     37942009-12-29  Robert Hogan  <robert@roberthogan.net>
     3795
     3796        Reviewed by Eric Seidel.
     3797
     3798        [Qt] Fix crash on LayoutTests/fast/loader/empty-embed-src-attribute.html
     3799       
     3800        Related to https://bugs.webkit.org/show_bug.cgi?id=23806
     3801       
     3802        If an embedded document is loaded within a page and it has an empty
     3803        URL, use a blank URL for the load request.
     3804       
     3805        https://bugs.webkit.org/show_bug.cgi?id=33017
     3806
     3807        * WebCoreSupport/FrameLoaderClientQt.cpp:
     3808        (WebCore::FrameLoaderClientQt::createFrame):
     3809
     38102009-12-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     3811
     3812        Rubber-stamped by Simon Hausmann and Holger Freyther.
     3813
     3814        [Qt] Remove WebKit/qt/WebKitPart empty directory
     3815
     3816        The content of the directory has been removed by r34888.
     3817
     3818        * WebKitPart: Removed.
     3819
     38202009-12-29  Jakub Wieczorek  <faw217@gmail.com>
     3821
     3822        Reviewed by Eric Seidel.
     3823
     3824        [Qt] DRT: Frame loader callbacks differ from the Mac port
     3825        https://bugs.webkit.org/show_bug.cgi?id=32989
     3826
     3827        Remove messages from the callbacks that should not dump them to match
     3828        the expected results for the http/loading tests.
     3829
     3830        Unskip some http/loading tests which succeed now.
     3831
     3832        * WebCoreSupport/FrameLoaderClientQt.cpp:
     3833        (WebCore::FrameLoaderClientQt::dispatchDidPopStateWithinPage):
     3834        (WebCore::FrameLoaderClientQt::dispatchWillClose):
     3835        (WebCore::FrameLoaderClientQt::dispatchDidReceiveIcon):
     3836        (WebCore::FrameLoaderClientQt::dispatchDidClearWindowObjectInWorld):
     3837
     38382009-12-29  Robert Hogan  <robert@roberthogan.net>
     3839
     3840        Reviewed by Eric Seidel.
     3841
     3842        [Qt] fix fast/dom/Window/window-onFocus.html
     3843       
     3844        Add support for layouttestcontroller.windowIsKey to Qt DRT and fix issue where
     3845        window.onblur was getting dispatched twice from QtWebKit.
     3846       
     3847        https://bugs.webkit.org/show_bug.cgi?id=32990
     3848
     3849        * Api/qwebpage.cpp:
     3850        (QWebPagePrivate::focusOutEvent):
     3851
     38522009-12-24  Girish Ramakrishnan  <girish@forwardbias.in>
     3853
     3854        Reviewed by Gustavo Noronha.
     3855
     3856        Doc : QGraphicsWebView::zoomFactor was introduced in 4.6.
     3857       
     3858        * Api/qgraphicswebview.cpp:
     3859
     38602009-12-22  Simon Hausmann  <simon.hausmann@nokia.com>
     3861
     3862        Rubber-stamped by Holger Freyther.
     3863
     3864        Moved QtLauncher to WebKitTools/
     3865
     3866        * QtLauncher: Removed.
     3867        * QtLauncher/QtLauncher.pro: Removed.
     3868        * QtLauncher/main.cpp: Removed.
     3869
     38702009-12-21  David Boddie  <dboddie@trolltech.com>
     3871
     3872        Reviewed by Simon Hausmann.
     3873
     3874        Doc: Minor fixes to language.
     3875
     3876        * Api/qwebpage.cpp:
     3877
     38782009-12-21  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     3879
     3880        Reviewed by Simon Hausmann.
     3881
     3882        [Qt] Clean up the WebKit layer unit-tests
     3883
     3884            - Use tests.pri for common options
     3885            - Standardize file naming
     3886            - Move all resources to 'resources' subdir
     3887            - Standardize how TESTS_SOURCE_DIR is used
     3888            - Get rid of UID3 for symbian (autogenerated)
     3889            - Don't build app bundles on Mac OS X
     3890
     3891        * tests/benchmarks/loading/loading.pro: Added.
     3892        * tests/benchmarks/loading/tst_loading.pro: Removed.
     3893        * tests/benchmarks/painting/painting.pro: Added.
     3894        * tests/benchmarks/painting/tst_painting.pro: Removed.
     3895        * tests/qgraphicswebview/qgraphicswebview.pro:
     3896        * tests/qwebelement/qwebelement.pro:
     3897        * tests/qwebelement/qwebelement.qrc: Removed.
     3898        * tests/qwebelement/resources/image.png: Renamed from WebKit/qt/tests/qwebelement/image.png.
     3899        * tests/qwebelement/resources/style.css: Renamed from WebKit/qt/tests/qwebelement/style.css.
     3900        * tests/qwebelement/resources/style2.css: Renamed from WebKit/qt/tests/qwebelement/style2.css.
     3901        * tests/qwebelement/tst_qwebelement.qrc: Added.
     3902        * tests/qwebframe/qwebframe.pro:
     3903        * tests/qwebframe/qwebframe.qrc: Removed.
     3904        * tests/qwebframe/resources/image.png: Renamed from WebKit/qt/tests/qwebframe/image.png.
     3905        * tests/qwebframe/resources/style.css: Renamed from WebKit/qt/tests/qwebframe/style.css.
     3906        * tests/qwebframe/resources/test1.html: Renamed from WebKit/qt/tests/qwebframe/test1.html.
     3907        * tests/qwebframe/resources/test2.html: Renamed from WebKit/qt/tests/qwebframe/test2.html.
     3908        * tests/qwebframe/resources/testiframe.html: Renamed from WebKit/qt/tests/qwebframe/testiframe.html.
     3909        * tests/qwebframe/resources/testiframe2.html: Renamed from WebKit/qt/tests/qwebframe/testiframe2.html.
     3910        * tests/qwebframe/tst_qwebframe.cpp:
     3911        * tests/qwebframe/tst_qwebframe.qrc: Added.
     3912        * tests/qwebhistory/qwebhistory.pro:
     3913        * tests/qwebhistory/resources/page1.html: Renamed from WebKit/qt/tests/qwebhistory/data/page1.html.
     3914        * tests/qwebhistory/resources/page2.html: Renamed from WebKit/qt/tests/qwebhistory/data/page2.html.
     3915        * tests/qwebhistory/resources/page3.html: Renamed from WebKit/qt/tests/qwebhistory/data/page3.html.
     3916        * tests/qwebhistory/resources/page4.html: Renamed from WebKit/qt/tests/qwebhistory/data/page4.html.
     3917        * tests/qwebhistory/resources/page5.html: Renamed from WebKit/qt/tests/qwebhistory/data/page5.html.
     3918        * tests/qwebhistory/resources/page6.html: Renamed from WebKit/qt/tests/qwebhistory/data/page6.html.
     3919        * tests/qwebhistory/tst_qwebhistory.cpp:
     3920        (tst_QWebHistory::):
     3921        * tests/qwebhistory/tst_qwebhistory.qrc:
     3922        * tests/qwebhistoryinterface/qwebhistoryinterface.pro:
     3923        * tests/qwebinspector/qwebinspector.pro:
     3924        * tests/qwebpage/qwebpage.pro:
     3925        * tests/qwebpage/resources/frame_a.html: Renamed from WebKit/qt/tests/qwebpage/frametest/frame_a.html.
     3926        * tests/qwebpage/resources/iframe.html: Renamed from WebKit/qt/tests/qwebpage/frametest/iframe.html.
     3927        * tests/qwebpage/resources/iframe2.html: Renamed from WebKit/qt/tests/qwebpage/frametest/iframe2.html.
     3928        * tests/qwebpage/resources/iframe3.html: Renamed from WebKit/qt/tests/qwebpage/frametest/iframe3.html.
     3929        * tests/qwebpage/resources/index.html: Renamed from WebKit/qt/tests/qwebpage/frametest/index.html.
     3930        * tests/qwebpage/tst_qwebpage.cpp:
     3931        (tst_QWebPage::backActionUpdate):
     3932        (tst_QWebPage::frameAt):
     3933        (tst_QWebPage::errorPageExtensionInFrameset):
     3934        (tst_QWebPage::screenshot):
     3935        * tests/qwebpage/tst_qwebpage.qrc:
     3936        * tests/qwebplugindatabase/qwebplugindatabase.pro:
     3937        * tests/qwebview/qwebview.pro:
     3938        * tests/qwebview/resources/frame_a.html: Renamed from WebKit/qt/tests/qwebview/data/frame_a.html.
     3939        * tests/qwebview/resources/index.html: Renamed from WebKit/qt/tests/qwebview/data/index.html.
     3940        * tests/qwebview/tst_qwebview.cpp:
     3941        (tst_QWebView::reusePage):
     3942        (tst_QWebView::crashTests):
     3943        * tests/qwebview/tst_qwebview.qrc:
     3944        * tests/resources/image2.png: Renamed from WebKit/qt/tests/qwebframe/resources/image2.png.
     3945        * tests/tests.pri: Added.
     3946        * tests/tests.pro:
     3947
     39482009-12-18  Ariya Hidayat  <ariya.hidayat@gmail.com>
     3949
     3950        Build fix, not reviewed.
     3951
     3952        * QtLauncher/main.cpp:
     3953        (MainWindow::setTouchMocking): Leave setTouchMocking as an empty
     3954        function for Qt < 4.6 so that moc still creates a slot for that.
     3955        Otherwise, it would have generated a linker error.
     3956
     39572009-12-18  Adam Roben  <aroben@apple.com>
     3958
     3959        Qt build fix
     3960
     3961        * Api/qwebpage.cpp: Added #include.
     3962
     39632009-12-18  Adam Roben  <aroben@apple.com>
     3964
     3965        Qt build fix
     3966
     3967        * Api/qwebpage.cpp:
     3968        Added #includes.
    2953969
    29639702009-12-18  Joe Ligman  <joseph.ligman@nokia.com>
     
    3123986        * tests/qwebframe/tst_qwebframe.cpp:
    3133987
    314 2010-01-07  Yael Aharon  <yael.aharon@nokia.com>
    315 
    316         Reviewed by Kenneth Rohde Christiansen.
    317 
    318         [Qt] Allow the application to override online/offline network status
    319         https://bugs.webkit.org/show_bug.cgi?id=32684
    320 
    321         Add a setting so that applications can overide the network status.
    322         Applications that use this setting still need to block network access
    323         through QNAM.
    324 
    325         * Api/qwebsettings.cpp:
    326         (qt_networkAccessAllowed):
    327 
    328 2010-01-07  Yongjun Zhang  <yongjun.zhang@nokia.com>, Laszlo Gombos  <laszlo.1.gombos@nokia.com>
    329 
    330         Reviewed by Simon Hausmann.
    331 
    332         [Qt] need an API to suspend and resume active Javascript DOM objects.
    333         https://bugs.webkit.org/show_bug.cgi?id=31673
    334 
    335         Add suspend and resume DOM objects private API to QWebFrame.
    336 
    337         * Api/qwebframe.cpp:
    338         (qt_suspendActiveDOMObjects):
    339         (qt_resumeActiveDOMObjects):
    340 
    341 2009-12-30  Janne Koskinen  <janne.p.koskinen@digia.com>
    342 
    343         Reviewed by Simon Hausmann.
    344 
    345         Upstream Symbian def files from Qt 4.6.
    346 
    347         These files define the ABI of QtWebKit on Symbian.
    348 
    349         * symbian/bwins/QtWebKitu.def: Added.
    350         * symbian/eabi/QtWebKitu.def: Added.
     39882009-12-18  Simon Hausmann  <simon.hausmann@nokia.com>
     3989
     3990        Reviewed by Tor Arne VestbÞ.
     3991
     3992        [Qt] Fix infinite recursion in touch mocking.
     3993
     3994        Don't send the fake touch events to the view, as that'll trigger the
     3995        event filter again.
     3996
     3997        * QtLauncher/main.cpp:
     3998        (MainWindow::sendTouchEvent):
     3999
     40002009-12-17  Benjamin Poulain  <benjamin.poulain@nokia.com>
     4001
     4002        Reviewed by Simon Hausmann.
     4003
     4004        [Qt] Add support for mocking touch events with Q(GV)Launcher
     4005        https://bugs.webkit.org/show_bug.cgi?id=32434
     4006
     4007        The event delivery should go through QCoreApplication::sendEvent()
     4008
     4009        * QtLauncher/main.cpp:
     4010        (MainWindow::sendTouchEvent):
     4011
     40122009-12-17  Kim Grönholm  <kim.gronholm@nomovok.com>
     4013
     4014        Reviewed by Simon Hausmann.
     4015
     4016        [Qt] Add support for touch events in QWebView and QGraphicsWebView
     4017        https://bugs.webkit.org/show_bug.cgi?id=32432
     4018
     4019        * Api/qgraphicswebview.cpp:
     4020        (QGraphicsWebView::QGraphicsWebView):
     4021        (QGraphicsWebView::sceneEvent):
     4022        * Api/qwebview.cpp:
     4023        (QWebView::QWebView):
     4024        (QWebView::event):
     4025
     40262009-12-17  Kim Grönholm  <kim.gronholm@nomovok.com>
     4027
     4028        Reviewed by Simon Hausmann.
     4029
     4030        [Qt] Add support for mocking touch events with QtLauncher
     4031        https://bugs.webkit.org/show_bug.cgi?id=32434
     4032
     4033        * QtLauncher/main.cpp:
     4034        (MainWindow::MainWindow):
     4035        (MainWindow::sendTouchEvent):
     4036        (MainWindow::eventFilter):
     4037        (MainWindow::setTouchMocking):
     4038        (MainWindow::setupUI):
    3514039
    35240402009-12-14  Holger Hans Peter Freyther  <zecke@selfish.org>
     
    3754063        (WebCore::ChromeClientQt::runJavaScriptPrompt): Fixup null QString
    3764064
    377 2009-12-21  David Boddie  <dboddie@trolltech.com>
    378 
    379         Reviewed by Simon Hausmann.
    380 
    381         Doc: Minor fixes to language.
    382 
    383         * Api/qwebpage.cpp:
    384 
    385 2009-12-15  Holger Hans Peter Freyther  <zecke@selfish.org>
    386 
    387         Reviewed by NOBODY (OOPS!).
     40652009-11-24  Holger Hans Peter Freyther  <zecke@selfish.org>
     4066
     4067        Reviewed by Simon Hausmann.
    3884068
    3894069        [Qt] Do not disable the inspector on show and hide
     
    3994079
    4004080        * Api/qwebinspector.cpp:
    401         (QWebInspector::event):
    4024081        (QWebInspector::hideEvent):
     4082        (QWebInspector::closeEvent):
     4083        * Api/qwebinspector.h:
     4084
     40852009-12-14  Benjamin Poulain  <benjamin.poulain@nokia.com>
     4086
     4087        Reviewed by Kenneth Rohde Christiansen.
     4088
     4089        [Qt] Improve the autotests of QtWebkit
     4090        https://bugs.webkit.org/show_bug.cgi?id=32216
     4091
     4092        Refactor tst_qwebelement to remove the qWait()
     4093
     4094        * tests/qwebelement/tst_qwebelement.cpp:
     4095        (tst_QWebElement::style):
     4096
     40972009-12-14  Andreas Kling  <andreas.kling@nokia.com>
     4098
     4099        Reviewed by Simon Hausmann.
     4100
     4101        Fix the QWebPage inputMethods() autotest after r51758
     4102        to compare the Qt::ImFont property's family against an explicitly
     4103        previously configured family.
     4104
     4105        https://bugs.webkit.org/show_bug.cgi?id=32491
     4106
     4107        * tests/qwebpage/tst_qwebpage.cpp:
     4108        (tst_QWebPage::inputMethods):
     4109
     41102009-12-13  Sam Weinig  <sam@webkit.org>
     4111
     4112        Reviewed by Dan Bernstein.
     4113
     4114        Fix for https://bugs.webkit.org/show_bug.cgi?id=32499
     4115        Add client based Geolocation provider
     4116
     4117        Add first cut of a client based Geolocation provider. This is guarded by
     4118        ENABLE(CLIENT_BASED_GEOLOCATION) and is off by default for now. This adds a
     4119        GeolocationControllerClient interface that no-one currently implements,
     4120        but will in a subsequent patch.
     4121
     4122        * Api/qwebpage.cpp:
     4123        (QWebPagePrivate::QWebPagePrivate):
     4124
     41252009-12-13  Benjamin Poulain  <benjamin.poulain@nokia.com>
     4126
     4127        Reviewed by Simon Hausmann.
     4128
     4129        Add a test in Qt for https://bugs.webkit.org/show_bug.cgi?id=29005
     4130        https://bugs.webkit.org/show_bug.cgi?id=29008
     4131
     4132        * tests/qwebframe/tst_qwebframe.cpp:
    4034133
    40441342009-12-13  Simon Hausmann  <hausmann@webkit.org>
     
    4154145        * Api/qwebview.h:
    4164146
     41472009-12-11  Yael Aharon  <yael.aharon@nokia.com>
     4148
     4149        Unreviewed build fix for Qt versions < 4.6.
     4150
     4151        * tests/qwebframe/tst_qwebframe.cpp:
     4152        * tests/qwebview/tst_qwebview.cpp:
     4153        (tst_QWebView::reusePage):
     4154
     41552009-12-11  Girish Ramakrishnan  <girish@forwardbias.in>
     4156
     4157        Reviewed by Tor Arne VestbÞ.
     4158
     4159        [Qt] Updated QWebElement documentation
     4160       
     4161        findAll() returns a QWebElementCollection, not QList<QWebElement>.
     4162
     4163        * docs/webkitsnippets/webelement/main.cpp:
     4164        (findAll):
     4165
     41662009-12-11  Simon Hausmann  <hausmann@webkit.org>, Kim Grönholm  <kim.gronholm@nomovok.com>
     4167
     4168        Reviewed by Antti Koivisto.
     4169
     4170        Forward Qt touch events to the event handler as platform touch events.
     4171
     4172        https://bugs.webkit.org/show_bug.cgi?id=32114
     4173
     4174        * Api/qwebpage.cpp:
     4175        (QWebPagePrivate::touchEvent):
     4176        (QWebPage::event):
     4177        * Api/qwebpage_p.h:
     4178
     41792009-12-07  Benjamin Poulain  <benjamin.poulain@nokia.com>
     4180
     4181        Reviewed by Kenneth Rohde Christiansen.
     4182
     4183        [Qt] Improve the autotests of QtWebkit
     4184        https://bugs.webkit.org/show_bug.cgi?id=32216
     4185
     4186        Remove the calls to qWait() of the autotest of QWebView
     4187
     4188        * tests/qwebview/tst_qwebview.cpp:
     4189        (tst_QWebView::reusePage):
     4190
     41912009-12-07  Benjamin Poulain  <benjamin.poulain@nokia.com>
     4192
     4193        Reviewed by Kenneth Rohde Christiansen.
     4194
     4195        [Qt] Improve the autotests of QtWebkit
     4196        https://bugs.webkit.org/show_bug.cgi?id=32216
     4197
     4198        Refactor tst_qwebframe to remove qWait() and use
     4199        the function waitForSignal() from util.h
     4200
     4201        * tests/qwebframe/tst_qwebframe.cpp:
     4202
     42032009-12-07  Benjamin Poulain  <benjamin.poulain@nokia.com>
     4204
     4205        Reviewed by Kenneth Rohde Christiansen.
     4206
     4207        [Qt] Improve the autotests of QtWebkit
     4208        https://bugs.webkit.org/show_bug.cgi?id=32216
     4209
     4210        Refactor the test of QGraphicsWebView:
     4211        -make waitForSignal() available to all the tests.
     4212        -remove QTest::qWait()
     4213
     4214        * tests/qgraphicswebview/tst_qgraphicswebview.cpp:
     4215        (tst_QGraphicsWebView::crashOnViewlessWebPages):
     4216        * tests/util.h:
     4217        (waitForSignal):
     4218
     42192009-12-07  Girish Ramakrishnan  <girish@forwardbias.in>
     4220
     4221        Reviewed by Simon Hausmann.
     4222
     4223        [Qt] Plugins: Force windowless mode when there is no native window handle
     4224       
     4225        Inject wmode=opaque while instantiating the plugin for the case when the
     4226        webpage is not backed by a native window handle.
     4227       
     4228        https://bugs.webkit.org/show_bug.cgi?id=32059
     4229
     4230        * WebCoreSupport/FrameLoaderClientQt.cpp:
     4231        (WebCore::FrameLoaderClientQt::createPlugin):
     4232
     42332009-12-04  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     4234
     4235        Reviewed by Kenneth Rohde Christiansen.
     4236
     4237        [Qt] Corrects QtLauncher style
     4238
     4239        * QtLauncher/main.cpp:
     4240        (WebPage::acceptNavigationRequest):
     4241        (MainWindow::MainWindow):
     4242        (MainWindow::webPage):
     4243        (MainWindow::webView):
     4244        (MainWindow::changeLocation):
     4245        (MainWindow::loadFinished):
     4246        (MainWindow::showLinkHover):
     4247        (MainWindow::zoomIn):
     4248        (MainWindow::zoomOut):
     4249        (MainWindow::print):
     4250        (MainWindow::setEditable):
     4251        (MainWindow::dumpHtml):
     4252        (MainWindow::selectElements):
     4253        (MainWindow::newWindow):
     4254        (MainWindow::setupUI):
     4255        (WebPage::createWindow):
     4256        (WebPage::createPlugin):
     4257        (main):
     4258
     42592009-12-04  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     4260
     4261        Reviewed by Kenneth Rohde Christiansen.
     4262
     4263        [Qt] QtLauncher: add a menu to show or hide the web inspector.
     4264        https://bugs.webkit.org/show_bug.cgi?id=32149
     4265
     4266        * QtLauncher/main.cpp:
     4267        (WebInspector::WebInspector):
     4268        (WebInspector::showEvent):
     4269        (WebInspector::hideEvent):
     4270        (MainWindow::MainWindow):
     4271        (MainWindow::setupUI):
     4272
     42732009-12-04  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     4274
     4275        Reviewed by Antti Koivisto.
     4276
     4277        Split out the renderPrivate in two methods, one for working on
     4278        relative coordinates (relative to the viewport) and one for
     4279        working on absolute coordinates. The latter is more effecient
     4280        for implementing tiling, as you don't need translate the coords,
     4281        and because it avoid clipping to the viewport.
     4282
     4283        No behaviour changes, so no new tests.
     4284
     4285        * Api/qwebframe.cpp:
     4286        (QWebFramePrivate::renderContentsLayerAbsoluteCoords):
     4287        (QWebFramePrivate::renderRelativeCoords):
     4288        (QWebFrame::render):
     4289        * Api/qwebframe_p.h:
     4290
     42912009-12-04  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     4292
     4293        Reviewed by Simon Hausmann.
     4294
     4295        [Qt] Allow removing 'qrc' as a local security origin scheme
     4296
     4297        * tests/qwebpage/tst_qwebpage.cpp:
     4298
     42992009-12-04  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     4300
     4301        Reviewed by Simon Hausmann.
     4302
     4303        [Qt] Clean up argument parsing in the QtLauncher
     4304
     4305        * QtLauncher/main.cpp:
     4306
     43072009-12-04  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     4308
     4309        Reviewed by Kenneth Rohde Christiansen.
     4310
     4311        [Qt] Prevent the inspector from closing its wrapping widget.
     4312        This is not necessary anymore since we now hide the embedded
     4313        close button.
     4314        https://bugs.webkit.org/show_bug.cgi?id=32149
     4315
     4316        * WebCoreSupport/InspectorClientQt.cpp:
     4317        (WebCore::InspectorClientQt::showWindow):
     4318        (WebCore::InspectorClientQt::closeWindow):
     4319
     43202009-12-03  İsmail Dönmez  <ismail@namtrac.org>
     4321
     4322        Reviewed by Eric Seidel.
     4323
     4324        Fix compilation when SVG is disabled.
     4325
     4326        * Api/qwebframe.cpp:
     4327        (qt_drt_pauseSVGAnimation):
     4328
     43292009-12-03  Brady Eidson  <beidson@apple.com>
     4330
     4331        Reviewed by Sam Weinig.
     4332
     4333        <rdar://problem/7214236> and http://webkit.org/b/32052 - Implement HTML5 state object history API
     4334
     4335        * WebCoreSupport/FrameLoaderClientQt.cpp:
     4336        (WebCore::FrameLoaderClientQt::dispatchDidPushStateWithinPage):
     4337        (WebCore::FrameLoaderClientQt::dispatchDidReplaceStateWithinPage):
     4338        (WebCore::FrameLoaderClientQt::dispatchDidPopStateWithinPage):
     4339        * WebCoreSupport/FrameLoaderClientQt.h:
     4340
     43412009-12-03  Pavel Feldman  <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>
     4342
     4343        Reviewed by Timothy Hatcher.
     4344
     4345        Web Inspector: Simplify the settings support in inspector controller.
     4346
     4347        https://bugs.webkit.org/show_bug.cgi?id=32076
     4348
     4349        * WebCoreSupport/InspectorClientQt.cpp:
     4350        (WebCore::InspectorClientQt::populateSetting):
     4351        (WebCore::InspectorClientQt::storeSetting):
     4352        (WebCore::variantToSetting):
     4353        (WebCore::settingToVariant):
     4354        * WebCoreSupport/InspectorClientQt.h:
     4355
     43562009-12-03  Ben Murdoch  <benm@google.com>
     4357
     4358        Reviewed by Brady Eidson.
     4359
     4360        [Android] The FrameLoaderClient is unaware of BackForwardList changes.
     4361        https://bugs.webkit.org/show_bug.cgi?id=31914
     4362
     4363        * WebCoreSupport/FrameLoaderClientQt.cpp:
     4364        (WebCore::FrameLoaderClientQt::dispatchDidAddBackForwardItem): Add an empty implementation. Method added to FrameLoaderClient by Android (see bug).
     4365        (WebCore::FrameLoaderClientQt::dispatchDidRemoveBackForwardItem): ditto.
     4366        (WebCore::FrameLoaderClientQt::dispatchDidChangeBackForwardIndex): ditto.
     4367        * WebCoreSupport/FrameLoaderClientQt.h:
     4368
     43692009-12-01  Nikolas Zimmermann  <nzimmermann@rim.com>
     4370
     4371        Not reviewed. Try to fix Qt build.
     4372
     4373        * Api/qwebframe.cpp:
     4374        (qt_drt_pauseSVGAnimation):
     4375
     43762009-12-01  Nikolas Zimmermann  <nzimmermann@rim.com>
     4377
     4378        Reviewed by Simon Fraser.
     4379
     4380        Add SVG animation test framework with 'snapshot' functionality
     4381        https://bugs.webkit.org/show_bug.cgi?id=31897
     4382
     4383        Add API used by the new 'sampleSVGAnimationForElementAtTime' DRT method,
     4384        forwarding the call to SVGDocumentExtensions, if SVG is enabled.
     4385
     4386        Implemented just like the existing pauseAnimation* methods for CSS animations.
     4387
     4388        * Api/qwebframe.cpp:
     4389        (qt_drt_pauseSVGAnimation):
     4390
     43912009-12-01  Daniel Bates  <dbates@webkit.org>
     4392
     4393        Reviewed by Kenneth Rohde Christiansen.
     4394
     4395        https://bugs.webkit.org/show_bug.cgi?id=31898
     4396
     4397        Makes QtLauncher default to the http scheme for URLs.
     4398
     4399        * QtLauncher/main.cpp:
     4400        (MainWindow::MainWindow):
     4401        (MainWindow::changeLocation):
     4402        (main):
     4403
    41744042009-11-30  Abhinav Mithal  <abhinav.mithal@nokia.com>
    4184405
     
    4244411        * Api/qwebpage.cpp:
    4254412        (QWebPage::userAgentForUrl):
     4413
     44142009-11-30  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     4415
     4416        Reviewed by Kenneth Rohde Christiansen.
     4417
     4418        [Qt] Fix minor waning in QtWebKit
     4419        https://bugs.webkit.org/show_bug.cgi?id=31963
     4420
     4421        * tests/qwebpage/tst_qwebpage.cpp:
     4422        (ErrorPage::extension): Remove info wariable as it is
     4423        not used.
    4264424
    42744252009-11-28  Simon Hausmann  <simon.hausmann@nokia.com>
     
    4404438        * tests/qwebpage/tst_qwebpage.cpp:
    4414439        (tst_QWebPage::inputMethods):
     4440
     44412009-11-26  Simon Hausmann  <simon.hausmann@nokia.com>
     4442
     4443        Rubber-stamped by Holger Freyther.
     4444
     4445        Removed unused ICO image plugin handler.
     4446
     4447        * Plugins/ICOHandler.cpp: Removed.
     4448        * Plugins/ICOHandler.h: Removed.
     4449        * Plugins/Plugins.pro: Removed.
     4450
     44512009-11-12  Holger Hans Peter Freyther  <zecke@selfish.org>
     4452
     4453        Reviewed by Kenneth Rohde Christiansen.
     4454
     4455        [Qt] Do not show the QWidget when the WebCore::Widget is hidden
     4456        https://bugs.webkit.org/show_bug.cgi?id=31203
     4457
     4458        The clipping code was making a QWidget visible even if the
     4459        WebCore::Widget was hidden. Fix the bug by calling setVisible
     4460        only if the WebCore::Widget Widget::isSelfVisible.
     4461
     4462        * WebCoreSupport/FrameLoaderClientQt.cpp:
     4463        (WebCore::QtPluginWidget::show): Override WebCore::Widget::show to call handleVisibility
     4464        (WebCore::QtPluginWidget::handleVisibility): New method to call setVisible when we are visible
     4465        (FrameLoaderClientQt::createPlugin): Hide the QWidget by default
    4424466
    44344672009-11-23  David Boddie  <dboddie@trolltech.com>
     
    4684492
    4694493        * tests/qwebframe/tst_qwebframe.cpp:
     4494
     44952009-11-19  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     4496
     4497        Reviewed by Kenneth Rohde Christiansen.
     4498
     4499        [Qt] Add instantiation tests for QWebInspector.
     4500
     4501        * tests/qwebinspector/qwebinspector.pro: Added.
     4502        * tests/qwebinspector/tst_qwebinspector.cpp: Added.
     4503        (tst_QWebInspector::attachAndDestroy):
     4504        * tests/tests.pro:
     4505
     45062009-11-19  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     4507
     4508        Reviewed by Kenneth Rohde Christiansen.
     4509
     4510        [Qt] Fix QWebInspector destruction problem.
     4511        https://bugs.webkit.org/show_bug.cgi?id=31664
     4512
     4513        * Api/qwebpage.cpp:
     4514        (QWebPage::~QWebPage):
    4704515
    47145162009-11-19  Olivier Goffart  <ogoffart@trolltech.com>
     
    4884533        (tst_QWebPage::database):
    4894534
     45352009-11-18  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     4536
     4537        Reviewed by Kenneth Rohde Christiansen.
     4538
     4539        [Qt] Remove support for Qt v4.3 or older versions
     4540        https://bugs.webkit.org/show_bug.cgi?id=29469
     4541
     4542        * Api/qcookiejar.cpp: Removed.
     4543        * Api/qcookiejar.h: Removed.
     4544        * Api/qgraphicswebview.cpp:
     4545        (QGraphicsWebView::event):
     4546        * Api/qwebframe.cpp:
     4547        (QWebFrame::load):
     4548        * Api/qwebframe.h:
     4549        * Api/qwebkitglobal.h:
     4550        * Api/qwebnetworkinterface.cpp: Removed.
     4551        * Api/qwebnetworkinterface.h: Removed.
     4552        * Api/qwebnetworkinterface_p.h: Removed.
     4553        * Api/qwebpage.cpp:
     4554        (QWebPagePrivate::QWebPagePrivate):
     4555        (QWebPagePrivate::acceptNavigationRequest):
     4556        (QWebPage::acceptNavigationRequest):
     4557        (QWebPage::action):
     4558        (QWebPage::userAgentForUrl):
     4559        * Api/qwebpage.h:
     4560        * Api/qwebpage_p.h:
     4561        * Api/qwebview.cpp:
     4562        (QWebView::load):
     4563        (QWebView::event):
     4564        * Api/qwebview.h:
     4565        * QtLauncher/main.cpp:
     4566        (MainWindow::print):
     4567        (MainWindow::setupUI):
     4568        (main):
     4569        * WebCoreSupport/FrameLoaderClientQt.cpp:
     4570        (WebCore::FrameLoaderClientQt::download):
     4571        (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNewWindowAction):
     4572        (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction):
     4573        (WebCore::FrameLoaderClientQt::startDownload):
     4574        (WebCore::FrameLoaderClientQt::createPlugin):
     4575
     45762009-11-18  Shu Chang  <Chang.Shu@nokia.com>
     4577
     4578        Reviewed by Eric Seidel.
     4579
     4580        [Qt] Add support for displaying deleteButton.
     4581        https://bugs.webkit.org/show_bug.cgi?id=31560
     4582
     4583        Test: LayoutTests/editing/deleting/5408255.html
     4584
     4585        * Api/qwebsettings.cpp:
     4586        (graphics):
     4587        * Api/qwebsettings.h:
     4588
    49045892009-11-18  Paul Olav Tvete  <paul.tvete@nokia.com>
    4914590
     
    5064605        * docs/qtwebkit.qdoc:
    5074606
    508 2009-11-18  Simon Hausmann  <simon.hausmann@nokia.com>
    509 
    510         Reviewed and suggested by Tor Arne VestbÞ.
    511 
    512         Fix the autotest after commit ecbb2c0dd21bfc197e1f7b53150ec9b1a1d8cb8f
    513         to compare the Qt::ImFont property's family against an explicitly
    514         previously configured family.
     46072009-11-18  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     4608
     4609        Reviewed by Simon Hausmann.
     4610
     4611        [Qt] Add QtLauncher support for opening links in the default browser
     4612
     4613        This can be triggered by either the context menu or by clicking a link
     4614        while holding down the Alt key. Opening a link in a new windows is
     4615        triggered by holding down Shift.
     4616
     4617        * QtLauncher/main.cpp:
     4618
     46192009-11-17  Yael Aharon  <yael.aharon@nokia.com>
     4620
     4621        Reviewed by Kenneth Rohde Christiansen.
     4622
     4623        [Qt] QGLLauncher does not support drag&drop of local files
     4624        https://bugs.webkit.org/show_bug.cgi?id=31057
     4625
     4626        Enable accepting files in QGraphicsWebView.
     4627
     4628        * Api/qgraphicswebview.cpp:
     4629        (QGraphicsWebView::QGraphicsWebView):
     4630        (QGraphicsWebView::dragEnterEvent):
     4631
     46322009-11-17  Antonio Gomes  <tonikitoo@webkit.org>
     4633
     4634        Reviewed by Kenneth Christiansen.
     4635
     4636        [Qt] better test coverage for ErrorPageExtension
     4637        https://bugs.webkit.org/show_bug.cgi?id=31583
     4638
     4639        Improved the coverage of current ErrorPageExtension tests by
     4640        adding autotests involving frameset and iframes.
    5154641
    5164642        * tests/qwebpage/tst_qwebpage.cpp:
    517         (tst_QWebPage::inputMethods):
     4643        (ErrorPage::extension): Make the ErrorPageExtension
     4644        to work for all frames, not only the main frame.
     4645        (tst_QWebPage::errorPageExtension): Stop using
     4646        the 'frameset.html' resouce in this method since
     4647        an autotest specific for frameset's is being added.
     4648        (tst_QWebPage::errorPageExtensionInIFrames): Added.
     4649        (tst_QWebPage::errorPageExtensionInFrameset): Added.
    5184650
    51946512009-11-16  Simon Hausmann  <simon.hausmann@nokia.com>
     
    5404672        (tst_QWebPage::errorPageExtension):
    5414673
    542 2009-11-16  Holger Hans Peter Freyther  <zecke@selfish.org>
    543 
    544         Reviewed by NOBODY (OOPS!).
    545 
    546         [Qt] Do not show the QWidget when the WebCore::Widget is hidden
    547         https://bugs.webkit.org/show_bug.cgi?id=31203
    548 
    549         The clipping code was making a QWidget visible even if the
    550         WebCore::Widget was hidden. Fix the bug by calling setVisible
    551         only if the WebCore::Widget is shown.
     46742009-11-13  Adam Roben  <aroben@apple.com>
     4675
     4676        Update for changes to FrameLoaderClient
     4677
     4678        Fixes <http://webkit.org/b/31124> Tell the WebFrameLoadDelegate when
     4679        window objects in isolated worlds are cleared
     4680
     4681        Reviewed by Dave Hyatt.
    5524682
    5534683        * WebCoreSupport/FrameLoaderClientQt.cpp:
    554         (WebCore::QtPluginWidget::show): Override WebCore::Widget
    555         (WebCore::QtPluginWidget::hide): Override WebCore::Widget
    556         (WebCore::QtPluginWidget::handleVisibility): New method to call setVisible when we are visible
    557         (FrameLoaderClientQt::createPlugin): Hide the QWidget by default
    558 
    559 2009-11-09  Benjamin Poulain  <benjamin.poulain@nokia.com>
    560 
    561         Reviewed by Kenneth Rohde Christiansen.
    562 
    563         https://bugs.webkit.org/show_bug.cgi?id=30628
    564         Add an API to get all the attributes from a QWebElement.
    565 
    566         * Api/qwebelement.cpp:
    567         (QWebElement::attributesName):
    568         * Api/qwebelement.h:
    569         * tests/qwebelement/tst_qwebelement.cpp:
    570         (tst_QWebElement::listAttributes):
     4684        (WebCore::FrameLoaderClientQt::dispatchDidClearWindowObjectInWorld):
     4685        * WebCoreSupport/FrameLoaderClientQt.h:
     4686        Replaced windowObjectCleared with this function. Does nothing if the
     4687        passed-in world is not the mainThreadNormalWorld().
    5714688
    57246892009-11-13  Andras Becsi  <becsi.andras@stud.u-szeged.hu>
     
    5814698        (QWebSettings::setMaximumPagesInCache):
    5824699
     47002009-11-13  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     4701
     4702        Reviewed by Kenneth Rohde Christiansen.
     4703
     4704        [Qt] Fix initial QWebView focus behavior.
     4705
     4706        focusController->setFocused(true) was not always called.
     4707        https://bugs.webkit.org/show_bug.cgi?id=31466
     4708
     4709        * Api/qwebpage.cpp:
     4710        (QWebPagePrivate::focusInEvent):
     4711
    58347122009-11-13  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
    5844713
     
    6014730        * docs/docs.pri:
    6024731
     47322009-11-12  Shinichiro Hamaji  <hamaji@chromium.org>
     4733
     4734        Reviewed by Darin Adler.
     4735
     4736        externalRepresentation should take Frame as the argument
     4737        https://bugs.webkit.org/show_bug.cgi?id=31393
     4738
     4739        No new tests as this is just a refactoring.
     4740
     4741        * Api/qwebframe.cpp:
     4742        (QWebFrame::renderTreeDump):
     4743
    60347442009-11-12  Antonio Gomes  <tonikitoo@webkit.org>
    6044745
     
    6124753
    6134754        * Api/qwebpage.cpp:
    614 
    615 2009-11-11  Antonio Gomes  <tonikitoo@webkit.org>
    616 
    617         Reviewed by Kenneth Christiansen.
    618 
    619         [Qt] Various doc fixes
    620         https://bugs.webkit.org/show_bug.cgi?id=31358
    621 
    622         Fixed wrong documentation: item's dimensions do fit to Web page
    623         content by default.
    624 
    625         Kenneth agreed to land this as a followup patch to the
    626         just landed documentation patch.
    627 
    628         * Api/qgraphicswebview.cpp:
    629 
    630 2009-11-11  David Boddie  <dboddie@trolltech.com>
    631 
    632         Reviewed by Kenneth Christiansen.
    633 
    634         [Qt] Various doc fixes
    635         https://bugs.webkit.org/show_bug.cgi?id=31323
    636 
    637         Fixed and synchronized QWebView related documentation.
    638 
    639         * Api/qgraphicswebview.cpp:
    640         * Api/qwebview.cpp:
    641 
    642 2009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
    643 
    644         Reviewed by Kenneth Rohde Christiansen.
    645 
    646         [Qt] Few classes have virtual functions but non-virtual destructor
    647         https://bugs.webkit.org/show_bug.cgi?id=31269
    648 
    649         * Api/qgraphicswebview.cpp:
    650         (QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate): Add virtual
    651         destructor.
    652 
    653 2009-10-30  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
    654 
    655         Reviewed by NOBODY (OOPS!).
    656 
    657         [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml()
    658 
    659         This ensures that long-running JavaScript (for example due to a modal alert() dialog),
    660         will not trigger a deferred load after only 500ms (the default tokenizer delay) while
    661         still giving a reasonable timeout (10 seconds) to prevent deadlock.
    662 
    663         https://bugs.webkit.org/show_bug.cgi?id=29381
    664 
    665         * Api/qwebframe.cpp: Document the behaviour
    666         * WebCoreSupport/FrameLoaderClientQt.cpp: set the custom tokenizer delay for substitute loads
    667         * tests/qwebframe/tst_qwebframe.cpp: Add test
    668 
    669 2009-11-13  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
    670 
    671         Reviewed by Kenneth Rohde Christiansen.
    672 
    673         [Qt] Fix initial QWebView focus behavior.
    674 
    675         focusController->setFocused(true) was not always called.
    676         https://bugs.webkit.org/show_bug.cgi?id=31466
    677 
    678         * Api/qwebpage.cpp:
    679         (QWebPagePrivate::focusInEvent):
    6804755
    68147562009-11-12  Benjamin Poulain  <benjamin.poulain@nokia.com>
     
    6944769        * Api/qwebsettings.h:
    6954770
     47712009-11-11  Antonio Gomes  <tonikitoo@webkit.org>
     4772
     4773        Reviewed by Kenneth Christiansen.
     4774
     4775        [Qt] Various doc fixes
     4776        https://bugs.webkit.org/show_bug.cgi?id=31358
     4777
     4778        Fixed wrong documentation: item's dimensions do fit to Web page
     4779        content by default.
     4780
     4781        Kenneth agreed to land this as a followup patch to the
     4782        just landed documentation patch.
     4783
     4784        * Api/qgraphicswebview.cpp:
     4785
     47862009-11-11  David Boddie  <dboddie@trolltech.com>
     4787
     4788        Reviewed by Kenneth Christiansen.
     4789
     4790        [Qt] Various doc fixes
     4791        https://bugs.webkit.org/show_bug.cgi?id=31323
     4792
     4793        Fixed and synchronized QWebView related documentation.
     4794
     4795        * Api/qgraphicswebview.cpp:
     4796        * Api/qwebview.cpp:
     4797
     47982009-11-11  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     4799
     4800        Unreviewed buildbot fix.
     4801
     4802        Export a method to the DRT to know if the document has a
     4803        document element.
     4804
     4805        * Api/qwebframe.cpp:
     4806        (qt_drt_hasDocumentElement):
     4807
    69648082009-11-11  Liang QI  <liang.qi@nokia.com>
    697         Update documentation for the Qt API
    698 
    699         * Api/qgraphicswebview.cpp:
    700         * Api/qwebelement.cpp:
    701         * Api/qwebframe.cpp:
    702         * Api/qwebsettings.cpp:
    703         * Api/qwebview.cpp:
    704 
    705 2009-11-13  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
    706 
    707         Reviewed by Simon Hausmann.
    708 
    7094809
    7104810        [Qt] Fix tst_qwebpage and tst_qwebframe compilation on Symbian.
     
    7554855        * Api/qwebview.cpp:
    7564856
    757 2009-11-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
    758 
    759         Unreviewed documentation fixes.
    760 
    761         Added a few improvements from Jocelyn Turcotte to the
    762         createWindow docs.
    763 
    764         * Api/qwebview.cpp:
    765 
    766 2009-11-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
    767 
    768         Unreviewed documentation fix.
    769 
    770         [Qt] Make qwebpage's createWindow not qwebview dependent.
    771         https://bugs.webkit.org/show_bug.cgi?id=30771
    772 
    773         Update documentation to make it clear that a reimplementation
    774         of the createWindow method of the associated QWebPage can
    775         result in the QWebView::createWindow method to never be called.
    776 
    777         * Api/qwebview.cpp:
     48572009-11-11  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     4858
     4859        Reviewed by Kenneth Rohde Christiansen.
     4860
     4861        https://bugs.webkit.org/show_bug.cgi?id=31323
     4862        Fix a few compiler warnings
     4863
     4864        * tests/qwebframe/tst_qwebframe.cpp: Add extra brackets
     4865        to make it explicit where the else case belongs
    7784866
    77948672009-11-11  Simon Hausmann  <simon.hausmann@nokia.com>
     
    7984886        (tst_QWebPage::inputMethods): Modify the test to verify that SIPR
    7994887        events are dispatched when activating focusable content.
     4888
     48892009-11-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     4890
     4891        Unreviewed documentation fixes.
     4892
     4893        Added a few improvements from Jocelyn Turcotte to the
     4894        createWindow docs.
     4895
     4896        * Api/qwebview.cpp:
     4897
     48982009-11-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     4899
     4900        Unreviewed documentation fix.
     4901
     4902        [Qt] Make qwebpage's createWindow not qwebview dependent.
     4903        https://bugs.webkit.org/show_bug.cgi?id=30771
     4904
     4905        Update documentation to make it clear that a reimplementation
     4906        of the createWindow method of the associated QWebPage can
     4907        result in the QWebView::createWindow method to never be called.
     4908
     4909        * Api/qwebview.cpp:
     4910
     49112009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     4912
     4913        Reviewed by Kenneth Rohde Christiansen.
     4914
     4915        [Qt] Few classes have virtual functions but non-virtual destructor
     4916        https://bugs.webkit.org/show_bug.cgi?id=31269
     4917
     4918        * Api/qgraphicswebview.cpp:
     4919        (QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate): Add virtual
     4920        destructor.
     4921
     49222009-11-09  Benjamin Poulain  <benjamin.poulain@nokia.com>
     4923
     4924        Reviewed by Kenneth Rohde Christiansen.
     4925
     4926        https://bugs.webkit.org/show_bug.cgi?id=30628
     4927        Add an API to get all the attributes from a QWebElement.
     4928
     4929        * Api/qwebelement.cpp:
     4930        (QWebElement::attributesName):
     4931        * Api/qwebelement.h:
     4932        * tests/qwebelement/tst_qwebelement.cpp:
     4933        (tst_QWebElement::listAttributes):
     4934
     49352009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     4936
     4937        Reviewed by Kenneth Rohde Christiansen.
     4938
     4939        Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings
     4940        https://bugs.webkit.org/show_bug.cgi?id=31040
     4941
     4942        * Api/qwebpage.cpp:
     4943        (QWebPagePrivate::handleScrolling):
     4944
     49452009-11-09  Mark Mentovai  <mark@chromium.org>
     4946
     4947        Reviewed by Dan Bernstein.
     4948
     4949        Track "can have scrollbar" state within FrameView independently of the
     4950        individual scrollbar states in ScrollView.
     4951
     4952        rdar://problem/7215132, https://bugs.webkit.org/show_bug.cgi?id=29167
     4953        REGRESSION (r48064): mint.com loses scrollbars after coming out of
     4954        edit mode.
     4955
     4956        rdar://problem/7314421, https://bugs.webkit.org/show_bug.cgi?id=30517
     4957        REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store.
     4958
     4959        Test: fast/overflow/scrollbar-restored.html
     4960
     4961        * Api/qwebframe.cpp:
     4962        (QWebFrame::setScrollBarPolicy):
    8004963
    80149642009-11-09  Benjamin Poulain  <benjamin.poulain@nokia.com>
     
    9725135        * Api/qgraphicswebview.h:
    9735136
     51372009-11-05  Shu Chang  <Chang.Shu@nokia.com>
     5138
     5139        Reviewed by Tor Arne VestbÞ.
     5140
     5141        Add support for Shift-PageUp and Shift-PageDown key events.
     5142        https://bugs.webkit.org/show_bug.cgi?id=31166
     5143
     5144        Test: LayoutTests/editing/selection/shrink-selection-after-shift-pagedown.html
     5145
     5146        * WebCoreSupport/EditorClientQt.cpp:
     5147        (WebCore::EditorClientQt::handleKeyboardEvent):
     5148
    97451492009-11-05  Simon Hausmann  <hausmann@webkit.org>
    9755150
     
    11505325        (WebViewCrashTest::loading):
    11515326        (tst_QWebView::crashTests):
     5327
     53282009-11-01  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     5329
     5330        Reviewed by Eric Seidel.
     5331
     5332        Turn on warnings for QtWebKit for gcc
     5333        https://bugs.webkit.org/show_bug.cgi?id=30958
     5334
     5335        * Api/qwebpage.cpp:
     5336        (QWebPagePrivate::QWebPagePrivate): Reorder initialization list
     5337        to fix compiler warnings.
     5338        * WebCoreSupport/FrameLoaderClientQt.cpp:
     5339        (WebCore::FrameLoaderClientQt::FrameLoaderClientQt): Ditto.
     5340
     53412009-10-30  Evan Stade  <estade@chromium.org>
     5342
     5343        Reviewed by David Levin.
     5344
     5345        Notify the chrome when the focused node has changed.
     5346        https://bugs.webkit.org/show_bug.cgi?id=30832
     5347
     5348        Added stub implementation for new ChromeClient function.
     5349
     5350        * WebCoreSupport/ChromeClientQt.cpp:
     5351        (WebCore::ChromeClientQt::focusedNodeChanged):
     5352        * WebCoreSupport/ChromeClientQt.h:
    11525353
    115353542009-10-30  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp

    r651 r846  
    2626 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829#include "config.h"
    2930#include "ChromeClientQt.h"
     
    3637#include "FrameView.h"
    3738#include "HitTestResult.h"
     39#include "Icon.h"
    3840#include "NotImplemented.h"
     41#include "ScrollbarTheme.h"
    3942#include "WindowFeatures.h"
    4043#include "DatabaseTracker.h"
     44#if defined(Q_WS_MAEMO_5)
     45#include "QtMaemoWebPopup.h"
     46#else
     47#include "QtFallbackWebPopup.h"
     48#endif
     49#include "QWebPageClient.h"
    4150#include "SecurityOrigin.h"
    42 #include "QWebPageClient.h"
     51
     52#include <qdebug.h>
     53#include <qeventloop.h>
     54#include <qtextdocument.h>
     55#include <qtooltip.h>
    4356
    4457#include "qwebpage.h"
     
    4962#include "qwebview.h"
    5063
    51 #include <qtooltip.h>
    52 #include <qtextdocument.h>
    53 
    54 namespace WebCore
    55 {
    56 
     64#if USE(ACCELERATED_COMPOSITING)
     65#include "GraphicsLayerQt.h"
     66#endif
     67
     68namespace WebCore {
    5769
    5870ChromeClientQt::ChromeClientQt(QWebPage* webPage)
    5971    : m_webPage(webPage)
     72    , m_eventLoop(0)
    6073{
    6174    toolBarsVisible = statusBarVisible = menuBarVisible = true;
     
    6477ChromeClientQt::~ChromeClientQt()
    6578{
    66 
     79    if (m_eventLoop)
     80        m_eventLoop->exit();
    6781}
    6882
     
    142156
    143157
     158void ChromeClientQt::focusedNodeChanged(WebCore::Node*)
     159{
     160}
     161
     162
    144163Page* ChromeClientQt::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures& features)
    145164{
     
    147166    if (!newPage)
    148167        return 0;
    149     newPage->mainFrame()->load(request.resourceRequest().url());
     168
     169    // A call to QWebPage::mainFrame() implicitly creates the main frame.
     170    // Make sure it exists, as WebCore expects it when returning from this call.
     171    QWebFrame* mainFrame = newPage->mainFrame();
     172
     173    if (!request.isEmpty())
     174        mainFrame->load(request.resourceRequest().url());
    150175    return newPage->d->page;
    151176}
     
    164189bool ChromeClientQt::canRunModal()
    165190{
    166     notImplemented();
    167     return false;
     191    return true;
    168192}
    169193
     
    171195void ChromeClientQt::runModal()
    172196{
    173     notImplemented();
     197    m_eventLoop = new QEventLoop();
     198    QEventLoop* eventLoop = m_eventLoop;
     199    m_eventLoop->exec();
     200    delete eventLoop;
    174201}
    175202
     
    310337IntRect ChromeClientQt::windowResizerRect() const
    311338{
     339#if defined(Q_WS_MAC)
     340    if (!m_webPage)
     341        return IntRect();
     342
     343    QWebPageClient* pageClient = platformPageClient();
     344    if (!pageClient)
     345        return IntRect();
     346
     347    QWidget* ownerWidget = pageClient->ownerWidget();
     348    if (!ownerWidget)
     349        return IntRect();
     350
     351    QWidget* topLevelWidget = ownerWidget->topLevelWidget();
     352    QRect topLevelGeometry(topLevelWidget->geometry());
     353
     354    // There's no API in Qt to query for the size of the resizer, so we assume
     355    // it has the same width and height as the scrollbar thickness.
     356    int scollbarThickness = ScrollbarTheme::nativeTheme()->scrollbarThickness();
     357
     358    // There's no API in Qt to query for the position of the resizer. Sometimes
     359    // it's drawn by the system, and sometimes it's a QSizeGrip. For RTL locales
     360    // it might even be on the lower left side of the window, but in WebKit we
     361    // always draw scrollbars on the right hand side, so we assume this to be the
     362    // location when computing the resize rect to reserve for WebKit.
     363    QPoint resizeCornerTopLeft = ownerWidget->mapFrom(topLevelWidget,
     364            QPoint(topLevelGeometry.width(), topLevelGeometry.height())
     365            - QPoint(scollbarThickness, scollbarThickness));
     366
     367    QRect resizeCornerRect = QRect(resizeCornerTopLeft, QSize(scollbarThickness, scollbarThickness));
     368    return resizeCornerRect.intersected(pageClient->geometryRelativeToOwnerWidget());
     369#else
    312370    return IntRect();
    313 }
    314 
    315 void ChromeClientQt::repaint(const IntRect& windowRect, bool contentChanged, bool, bool)
     371#endif
     372}
     373
     374void ChromeClientQt::invalidateWindow(const IntRect&, bool)
     375{
     376    notImplemented();
     377}
     378
     379void ChromeClientQt::invalidateContentsAndWindow(const IntRect& windowRect, bool immediate)
    316380{
    317381    // No double buffer, so only update the QWidget if content changed.
    318     if (contentChanged) {
    319         if (platformPageClient()) {
    320             QRect rect(windowRect);
    321             rect = rect.intersected(QRect(QPoint(0, 0), m_webPage->viewportSize()));
    322             if (!rect.isEmpty())
    323                 platformPageClient()->update(rect);
    324         }
    325         emit m_webPage->repaintRequested(windowRect);
     382    if (platformPageClient()) {
     383        QRect rect(windowRect);
     384        rect = rect.intersected(QRect(QPoint(0, 0), m_webPage->viewportSize()));
     385        if (!rect.isEmpty())
     386            platformPageClient()->update(rect);
    326387    }
     388    emit m_webPage->repaintRequested(windowRect);
    327389
    328390    // FIXME: There is no "immediate" support for window painting.  This should be done always whenever the flag
    329391    // is set.
     392}
     393
     394void ChromeClientQt::invalidateContentsForSlowScroll(const IntRect& windowRect, bool immediate)
     395{
     396    invalidateContentsAndWindow(windowRect, immediate);
    330397}
    331398
     
    449516}
    450517
     518void ChromeClientQt::chooseIconForFiles(const Vector<String>& filenames, PassRefPtr<FileChooser> chooser)
     519{
     520    chooser->iconLoaded(Icon::createIconForFiles(filenames));
     521}
     522
    451523bool ChromeClientQt::setCursor(PlatformCursorHandle)
    452524{
     
    461533}
    462534
    463 }
     535#if USE(ACCELERATED_COMPOSITING)
     536void ChromeClientQt::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer)
     537{   
     538    if (platformPageClient())
     539        platformPageClient()->setRootGraphicsLayer(graphicsLayer ? graphicsLayer->nativeLayer() : 0);
     540}
     541
     542void ChromeClientQt::setNeedsOneShotDrawingSynchronization()
     543{
     544    // we want the layers to synchronize next time we update the screen anyway
     545    if (platformPageClient())
     546        platformPageClient()->markForSync(false);
     547}
     548
     549void ChromeClientQt::scheduleCompositingLayerSync()
     550{
     551    // we want the layers to synchronize ASAP
     552    if (platformPageClient())
     553        platformPageClient()->markForSync(true);
     554}
     555
     556bool ChromeClientQt::allowsAcceleratedCompositing() const
     557{
     558    return (platformPageClient() && platformPageClient()->allowsAcceleratedCompositing());
     559}
     560
     561#endif
     562   
     563#if ENABLE(TILED_BACKING_STORE)
     564IntRect ChromeClientQt::visibleRectForTiledBackingStore() const
     565{
     566    if (!platformPageClient() || !m_webPage)
     567        return IntRect();
     568
     569    if (!platformPageClient()->viewResizesToContentsEnabled())
     570        return QRect(m_webPage->mainFrame()->scrollPosition(), m_webPage->mainFrame()->geometry().size());
     571
     572    return enclosingIntRect(FloatRect(platformPageClient()->graphicsItemVisibleRect()));
     573}
     574#endif
     575
     576QtAbstractWebPopup* ChromeClientQt::createSelectPopup()
     577{
     578#if defined(Q_WS_MAEMO_5)
     579    return new QtMaemoWebPopup;
     580#elif !defined(QT_NO_COMBOBOX)
     581    return new QtFallbackWebPopup;
     582#else
     583    return 0;
     584#endif
     585}
     586
     587#if ENABLE(WIDGETS_10_SUPPORT)
     588bool ChromeClientQt::isWindowed()
     589{
     590    return m_webPage->d->viewMode == "windowed";
     591}
     592
     593bool ChromeClientQt::isFloating()
     594{
     595    return m_webPage->d->viewMode == "floating";
     596}
     597
     598bool ChromeClientQt::isFullscreen()
     599{
     600    return m_webPage->d->viewMode == "fullscreen";
     601}
     602
     603bool ChromeClientQt::isMaximized()
     604{
     605    return m_webPage->d->viewMode == "maximized";
     606}
     607
     608bool ChromeClientQt::isMinimized()
     609{
     610    return m_webPage->d->viewMode == "minimized";
     611}
     612#endif
     613
     614}
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h

    r561 r846  
    3535#include "PlatformString.h"
    3636
     37QT_BEGIN_NAMESPACE
     38class QEventLoop;
     39QT_END_NAMESPACE
     40
    3741class QWebPage;
    3842
     
    4347    class Page;
    4448    struct FrameLoadRequest;
     49    class QtAbstractWebPopup;
    4550
    4651    class ChromeClientQt : public ChromeClient
     
    6368        virtual bool canTakeFocus(FocusDirection);
    6469        virtual void takeFocus(FocusDirection);
     70
     71        virtual void focusedNodeChanged(Node*);
    6572
    6673        virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&);
     
    102109        virtual IntRect windowResizerRect() const;
    103110
    104         virtual void repaint(const IntRect&, bool contentChanged, bool immediate = false, bool repaintContentOnly = false);
     111        virtual void invalidateWindow(const IntRect&, bool);
     112        virtual void invalidateContentsAndWindow(const IntRect&, bool);
     113        virtual void invalidateContentsForSlowScroll(const IntRect&, bool);
    105114        virtual void scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect);
     115
    106116        virtual IntPoint screenToWindow(const IntPoint&) const;
    107117        virtual IntRect windowToScreen(const IntRect&) const;
     
    121131        virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
    122132#endif
     133
     134#if USE(ACCELERATED_COMPOSITING)
     135        // see ChromeClient.h
     136        // this is a hook for WebCore to tell us what we need to do with the GraphicsLayers
     137        virtual void attachRootGraphicsLayer(Frame*, GraphicsLayer*);
     138        virtual void setNeedsOneShotDrawingSynchronization();
     139        virtual void scheduleCompositingLayerSync();
     140        virtual bool allowsAcceleratedCompositing() const;
     141#endif
     142
     143#if ENABLE(TILED_BACKING_STORE)
     144        virtual IntRect visibleRectForTiledBackingStore() const;
     145#endif
     146
     147#if ENABLE(TOUCH_EVENTS)
     148        virtual void needTouchEvents(bool) { }
     149#endif
     150
    123151        virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
     152        virtual void chooseIconForFiles(const Vector<String>&, PassRefPtr<FileChooser>);
    124153
    125154        virtual void formStateDidChange(const Node*) { }
     
    132161
    133162        virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
     163        virtual void cancelGeolocationPermissionRequestForFrame(Frame*) { }
     164
     165#if ENABLE(WIDGETS_10_SUPPORT)
     166        virtual bool isWindowed();
     167        virtual bool isFloating();
     168        virtual bool isFullscreen();
     169        virtual bool isMaximized();
     170        virtual bool isMinimized();
     171#endif
     172
     173        QtAbstractWebPopup* createSelectPopup();
    134174
    135175        QWebPage* m_webPage;
     
    141181        bool statusBarVisible;
    142182        bool menuBarVisible;
     183        QEventLoop* m_eventLoop;
    143184    };
    144185}
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/DragClientQt.cpp

    r561 r846  
    2828
    2929#include "ClipboardQt.h"
     30#include "Frame.h"
     31#include "PlatformMouseEvent.h"
    3032#include "qwebpage.h"
    3133
     
    3537
    3638namespace WebCore {
     39
     40static inline Qt::DropActions dragOperationsToDropActions(unsigned op)
     41{
     42    Qt::DropActions result = Qt::IgnoreAction;
     43    if (op & DragOperationCopy)
     44        result = Qt::CopyAction;
     45    if (op & DragOperationMove)
     46        result |= Qt::MoveAction;
     47    if (op & DragOperationGeneric)
     48        result |= Qt::MoveAction;
     49    if (op & DragOperationLink)
     50        result |= Qt::LinkAction;
     51    return result;
     52}
     53
     54static inline DragOperation dropActionToDragOperation(Qt::DropActions action)
     55{
     56    DragOperation result = DragOperationNone;
     57    if (action & Qt::CopyAction)
     58        result = DragOperationCopy;
     59    if (action & Qt::LinkAction)
     60        result = DragOperationLink;
     61    if (action & Qt::MoveAction)
     62        result = DragOperationMove;
     63    return result;
     64}
    3765
    3866DragDestinationAction DragClientQt::actionMaskForDrag(DragData*)
     
    5987}
    6088
    61 void DragClientQt::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard* clipboard, Frame*, bool)
     89void DragClientQt::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard* clipboard, Frame* frame, bool)
    6290{
    6391#ifndef QT_NO_DRAGANDDROP
     
    6795    if (view) {
    6896        QDrag *drag = new QDrag(view);
    69         if (clipboardData->hasImage())
     97        if (clipboardData && clipboardData->hasImage())
    7098            drag->setPixmap(qvariant_cast<QPixmap>(clipboardData->imageData()));
     99        DragOperation dragOperationMask = clipboard->sourceOperation();
    71100        drag->setMimeData(clipboardData);
    72         drag->start();
     101        Qt::DropAction actualDropAction = drag->exec(dragOperationsToDropActions(dragOperationMask));
     102
     103        // Send dragEnd event
     104        PlatformMouseEvent me(m_webPage->view()->mapFromGlobal(QCursor::pos()), QCursor::pos(), LeftButton, MouseEventMoved, 0, false, false, false, false, 0);
     105        frame->eventHandler()->dragSourceEndedAt(me, dropActionToDragOperation(actualDropAction));
    73106    }
    74107#endif
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditCommandQt.cpp

    r561 r846  
    1919
    2020#include "config.h"
    21 #include <wtf/Platform.h>
    2221#include "EditCommandQt.h"
    2322
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp

    r769 r846  
    385385#endif // QT_NO_SHORTCUT
    386386        switch (kevent->windowsVirtualKeyCode()) {
    387 #if QT_VERSION < 0x040500
    388             case VK_RETURN:
    389 #ifdef QT_WS_MAC
    390                 if (kevent->shiftKey() || kevent->metaKey())
    391 #else
    392                 if (kevent->shiftKey())
    393 #endif
    394                     frame->editor()->command("InsertLineBreak").execute();
    395                 else
    396                     frame->editor()->command("InsertNewline").execute();
    397                 break;
    398 #endif
    399387            case VK_BACK:
    400388                frame->editor()->deleteWithDirection(SelectionController::BACKWARD,
     
    408396                if (kevent->shiftKey())
    409397                    frame->editor()->command("MoveLeftAndModifySelection").execute();
    410                 else frame->editor()->command("MoveLeft").execute();
     398                else
     399                    frame->editor()->command("MoveLeft").execute();
    411400                break;
    412401            case VK_RIGHT:
    413402                if (kevent->shiftKey())
    414403                    frame->editor()->command("MoveRightAndModifySelection").execute();
    415                 else frame->editor()->command("MoveRight").execute();
     404                else
     405                    frame->editor()->command("MoveRight").execute();
    416406                break;
    417407            case VK_UP:
    418408                if (kevent->shiftKey())
    419409                    frame->editor()->command("MoveUpAndModifySelection").execute();
    420                 else frame->editor()->command("MoveUp").execute();
     410                else
     411                    frame->editor()->command("MoveUp").execute();
    421412                break;
    422413            case VK_DOWN:
    423414                if (kevent->shiftKey())
    424415                    frame->editor()->command("MoveDownAndModifySelection").execute();
    425                 else frame->editor()->command("MoveDown").execute();
     416                else
     417                    frame->editor()->command("MoveDown").execute();
    426418                break;
    427419            case VK_PRIOR:  // PageUp
    428                 frame->editor()->command("MovePageUp").execute();
     420                if (kevent->shiftKey())
     421                    frame->editor()->command("MovePageUpAndModifySelection").execute();
     422                else
     423                    frame->editor()->command("MovePageUp").execute();
    429424                break;
    430425            case VK_NEXT:  // PageDown
    431                 frame->editor()->command("MovePageDown").execute();
     426                if (kevent->shiftKey())
     427                    frame->editor()->command("MovePageDownAndModifySelection").execute();
     428                else
     429                    frame->editor()->command("MovePageDown").execute();
    432430                break;
    433431            case VK_TAB:
     
    602600    if (webPageClient) {
    603601#if QT_VERSION >= 0x040600
    604         bool isPasswordField = false;
    605         if (!active) {
     602        // Make sure to reset input method hint
     603        webPageClient->setInputMethodHint(Qt::ImhDialableCharactersOnly, false);
     604        webPageClient->setInputMethodHint(Qt::ImhDigitsOnly, false);
     605        webPageClient->setInputMethodHint(Qt::ImhEmailCharactersOnly, false);
     606        webPageClient->setInputMethodHint(Qt::ImhUrlCharactersOnly, false);
     607        webPageClient->setInputMethodHint(Qt::ImhHiddenText, false);
     608
     609        HTMLInputElement* inputElement = 0;
     610        Frame* frame = m_page->d->page->focusController()->focusedOrMainFrame();
     611        if (frame && frame->document() && frame->document()->focusedNode())
     612            if (frame->document()->focusedNode()->hasTagName(HTMLNames::inputTag))
     613                inputElement = static_cast<HTMLInputElement*>(frame->document()->focusedNode());
     614
     615        if (inputElement) {
     616            // Set input method hints for "number", "tel", "email", "url" and "password" input elements.
     617            webPageClient->setInputMethodHint(Qt::ImhDialableCharactersOnly, inputElement->isTelephoneField());
     618            webPageClient->setInputMethodHint(Qt::ImhDigitsOnly, inputElement->isNumberField());
     619            webPageClient->setInputMethodHint(Qt::ImhEmailCharactersOnly, inputElement->isEmailField());
     620            webPageClient->setInputMethodHint(Qt::ImhUrlCharactersOnly, inputElement->isUrlField());
    606621            // Setting the Qt::WA_InputMethodEnabled attribute true and Qt::ImhHiddenText flag
    607622            // for password fields. The Qt platform is responsible for determining which widget
    608623            // will receive input method events for password fields.
    609             Frame* frame = m_page->d->page->focusController()->focusedOrMainFrame();
    610             if (frame && frame->document() && frame->document()->focusedNode()) {
    611                 if (frame->document()->focusedNode()->hasTagName(HTMLNames::inputTag)) {
    612                     HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(frame->document()->focusedNode());
    613                     active = isPasswordField = inputElement->isPasswordField();
    614               }
    615             }
     624            bool isPasswordField = inputElement->isPasswordField();
     625            webPageClient->setInputMethodHint(Qt::ImhHiddenText, isPasswordField);
     626            if (isPasswordField)
     627                active = true;
    616628        }
    617         webPageClient->setInputMethodHint(Qt::ImhHiddenText, isPasswordField);
     629
    618630#if defined(Q_WS_MAEMO_5) || defined(Q_OS_SYMBIAN)
    619631        // disables auto-uppercase and predictive text for mobile devices
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp

    r561 r846  
    22 * Copyright (C) 2006 Zack Rusin <zack@kde.org>
    33 * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
    4  * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
     4 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
    55 * Copyright (C) 2008 Collabora Ltd. All rights reserved.
    66 * Coypright (C) 2008 Holger Hans Peter Freyther
     7 * Coypright (C) 2009, 2010 Girish Ramakrishnan <girish@forwardbias.in>
    78 *
    89 * All rights reserved.
     
    5152#include "HTMLFormElement.h"
    5253#include "HTMLPlugInElement.h"
     54#include "HTTPParsers.h"
    5355#include "NotImplemented.h"
    5456#include "QNetworkReplyHandler.h"
    5557#include "ResourceHandleInternal.h"
    5658#include "ResourceHandle.h"
     59#include "ScriptController.h"
     60#include "ScriptString.h"
    5761#include "Settings.h"
    58 #include "ScriptString.h"
    5962#include "QWebPageClient.h"
    6063
     
    7073#include <QCoreApplication>
    7174#include <QDebug>
    72 #if QT_VERSION >= 0x040400
    7375#include <QGraphicsScene>
    7476#include <QGraphicsWidget>
    7577#include <QNetworkRequest>
    7678#include <QNetworkReply>
    77 #else
    78 #include "qwebnetworkinterface_p.h"
    79 #endif
    8079#include "qwebhistory_p.h"
    8180
     
    144143{
    145144
     145bool FrameLoaderClientQt::deferMainResourceDataLoad = true;
     146
    146147FrameLoaderClientQt::FrameLoaderClientQt()
    147148    : m_frame(0)
    148149    , m_webFrame(0)
     150    , m_firstData(false)
    149151    , m_pluginView(0)
    150152    , m_hasSentResponseToPlugin(false)
    151     , m_firstData(false)
    152153    , m_loadError (ResourceError())
    153154{
     
    218219    const QSize preferredLayoutSize = page->preferredContentsSize();
    219220
     221    ScrollbarMode hScrollbar = (ScrollbarMode) m_webFrame->scrollBarPolicy(Qt::Horizontal);
     222    ScrollbarMode vScrollbar = (ScrollbarMode) m_webFrame->scrollBarPolicy(Qt::Vertical);
     223    bool hLock = hScrollbar != ScrollbarAuto;
     224    bool vLock = vScrollbar != ScrollbarAuto;
     225
    220226    m_frame->createView(m_webFrame->page()->viewportSize(),
    221227                        backgroundColor, !backgroundColor.alpha(),
    222228                        preferredLayoutSize.isValid() ? IntSize(preferredLayoutSize) : IntSize(),
    223229                        preferredLayoutSize.isValid(),
    224                         (ScrollbarMode)m_webFrame->scrollBarPolicy(Qt::Horizontal),
    225                         (ScrollbarMode)m_webFrame->scrollBarPolicy(Qt::Vertical));
     230                        hScrollbar, hLock,
     231                        vScrollbar, vLock);
    226232}
    227233
     
    309315}
    310316
     317void FrameLoaderClientQt::dispatchDidPushStateWithinPage()
     318{
     319    if (dumpFrameLoaderCallbacks)
     320        printf("%s - dispatchDidPushStateWithinPage\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
     321       
     322    notImplemented();
     323}
     324
     325void FrameLoaderClientQt::dispatchDidReplaceStateWithinPage()
     326{
     327    if (dumpFrameLoaderCallbacks)
     328        printf("%s - dispatchDidReplaceStateWithinPage\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
     329       
     330    notImplemented();
     331}
     332
     333void FrameLoaderClientQt::dispatchDidPopStateWithinPage()
     334{
     335    if (dumpFrameLoaderCallbacks)
     336        printf("%s - dispatchDidPopStateWithinPage\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
     337       
     338    notImplemented();
     339}
    311340
    312341void FrameLoaderClientQt::dispatchWillClose()
    313342{
    314     if (dumpFrameLoaderCallbacks)
    315         printf("%s - willCloseFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
    316343}
    317344
     
    391418void FrameLoaderClientQt::dispatchDidFirstLayout()
    392419{
     420    notImplemented();
     421}
     422
     423void FrameLoaderClientQt::dispatchDidFirstVisuallyNonEmptyLayout()
     424{
    393425    if (m_webFrame)
    394426        emit m_webFrame->initialLayoutCompleted();
    395 }
    396 
    397 void FrameLoaderClientQt::dispatchDidFirstVisuallyNonEmptyLayout()
    398 {
    399     notImplemented();
    400427}
    401428
     
    499526    }
    500527    else {
    501         m_pluginView->didFinishLoading();
     528        if (m_pluginView->isPluginView())
     529            m_pluginView->didFinishLoading();
    502530        m_pluginView = 0;
    503531        m_hasSentResponseToPlugin = false;
     
    580608void FrameLoaderClientQt::dispatchDidReceiveIcon()
    581609{
    582     if (dumpFrameLoaderCallbacks)
    583         printf("%s - didReceiveIconForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
    584 
    585610    if (m_webFrame) {
    586611        emit m_webFrame->iconChanged();
     
    602627}
    603628
    604 void FrameLoaderClientQt::windowObjectCleared()
    605 {
    606     if (dumpFrameLoaderCallbacks)
    607         printf("%s - didClearWindowObjectForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
     629void FrameLoaderClientQt::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld* world)
     630{
     631    if (world != mainThreadNormalWorld())
     632        return;
    608633
    609634    if (m_webFrame)
     
    644669}
    645670
     671void FrameLoaderClientQt::dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const
     672{
     673}
     674
     675void FrameLoaderClientQt::dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const
     676{
     677}
     678
     679void FrameLoaderClientQt::dispatchDidChangeBackForwardIndex() const
     680{
     681}
     682
    646683void FrameLoaderClientQt::didDisplayInsecureContent()
    647684{
     685    if (dumpFrameLoaderCallbacks)
     686        printf("didDisplayInsecureContent\n");
     687
    648688    notImplemented();
    649689}
     
    651691void FrameLoaderClientQt::didRunInsecureContent(WebCore::SecurityOrigin*)
    652692{
     693    if (dumpFrameLoaderCallbacks)
     694        printf("didRunInsecureContent\n");
     695
    653696    notImplemented();
    654697}
     
    673716        }
    674717    } else {
    675         m_pluginView->didFail(error);
     718        if (m_pluginView->isPluginView())
     719            m_pluginView->didFail(error);
    676720        m_pluginView = 0;
    677721        m_hasSentResponseToPlugin = false;
     
    693737   
    694738    // We re-check here as the plugin can have been created
    695     if (m_pluginView) {
     739    if (m_pluginView && m_pluginView->isPluginView()) {
    696740        if (!m_hasSentResponseToPlugin) {
    697741            m_pluginView->didReceiveResponse(loader->response());
     
    772816{
    773817    RefPtr<DocumentLoader> loader = DocumentLoader::create(request, substituteData);
    774     if (substituteData.isValid()) {
     818    if (!deferMainResourceDataLoad || substituteData.isValid()) {
    775819        loader->setDeferMainResourceDataLoad(false);
    776820        // Use the default timeout interval for JS as the HTML tokenizer delay. This ensures
     
    779823        double delay = JSDOMWindowBase::commonJSGlobalData()->timeoutChecker.timeoutInterval() / 1000.0f;
    780824        m_frame->page()->setCustomHTMLTokenizerTimeDelay(delay);
    781     } else {
     825    } else
    782826        m_frame->page()->setCustomHTMLTokenizerTimeDelay(-1);
    783     }
    784827    return loader.release();
    785828}
     
    787830void FrameLoaderClientQt::download(WebCore::ResourceHandle* handle, const WebCore::ResourceRequest&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&)
    788831{
    789 #if QT_VERSION >= 0x040400
    790832    if (!m_webFrame)
    791833        return;
     
    796838        QWebPage *page = m_webFrame->page();
    797839        if (page->forwardUnsupportedContent())
    798             emit m_webFrame->page()->unsupportedContent(reply);
     840            emit page->unsupportedContent(reply);
    799841        else
    800842            reply->abort();
    801843    }
    802 #endif
    803844}
    804845
     
    944985{
    945986    // we need to call directly here
    946     if (canShowMIMEType(MIMEType))
     987    const ResourceResponse& response = m_frame->loader()->activeDocumentLoader()->response();
     988    if (WebCore::contentDispositionType(response.httpHeaderField("Content-Disposition")) == WebCore::ContentDispositionAttachment)
     989        callPolicyFunction(function, PolicyDownload);
     990    else if (canShowMIMEType(MIMEType))
    947991        callPolicyFunction(function, PolicyUse);
    948992    else
     
    953997{
    954998    Q_ASSERT(m_webFrame);
    955 #if QT_VERSION < 0x040400
    956     QWebNetworkRequest r(request);
    957 #else
    958999    QNetworkRequest r(request.toNetworkRequest(m_webFrame));
    959 #endif
    9601000    QWebPage* page = m_webFrame->page();
    9611001
     
    9781018{
    9791019    Q_ASSERT(m_webFrame);
    980 #if QT_VERSION < 0x040400
    981     QWebNetworkRequest r(request);
    982 #else
    9831020    QNetworkRequest r(request.toNetworkRequest(m_webFrame));
    984 #endif
    9851021    QWebPage*page = m_webFrame->page();
    9861022
     
    10071043void FrameLoaderClientQt::startDownload(const WebCore::ResourceRequest& request)
    10081044{
    1009 #if QT_VERSION >= 0x040400
    10101045    if (!m_webFrame)
    10111046        return;
    10121047
    10131048    emit m_webFrame->page()->downloadRequested(request.toNetworkRequest(m_webFrame));
    1014 #endif
    10151049}
    10161050
     
    10221056
    10231057    QWebFrameData frameData(m_frame->page(), m_frame, ownerElement, name);
    1024     frameData.url = url;
     1058
     1059    if (url.isEmpty())
     1060        frameData.url = blankURL();
     1061    else
     1062        frameData.url = url;
     1063
    10251064    frameData.referrer = referrer;
    10261065    frameData.allowsScrolling = allowsScrolling;
     
    10471086
    10481087    return frameData.frame.release();
     1088}
     1089
     1090void FrameLoaderClientQt::didTransferChildFrameToNewDocument()
     1091{
     1092    ASSERT(m_frame->ownerElement());
     1093
     1094    if (!m_webFrame)
     1095        return;
     1096
     1097    Frame* parentFrame = m_webFrame->d->frame->tree()->parent();
     1098    ASSERT(parentFrame);
     1099
     1100    if (QWebFrame* parent = QWebFramePrivate::kit(parentFrame)) {
     1101        m_webFrame->d->setPage(parent->page());
     1102
     1103        if (m_webFrame->parent() != qobject_cast<QObject*>(parent))
     1104            m_webFrame->setParent(parent);
     1105    }
    10491106}
    10501107
     
    10981155{
    10991156public:
    1100     QtPluginWidget(QWidget* w = 0)
    1101         : Widget(w)
    1102         , m_visible(false)
    1103     {}
    1104 
     1157    QtPluginWidget(QWidget* w = 0): Widget(w) {}
    11051158    ~QtPluginWidget()
    11061159    {
     
    11341187
    11351188        handleVisibility();
    1136     }
    1137 
    1138     virtual void hide()
    1139     {
    1140         m_visible = false;
    1141         Widget::hide();
     1189
     1190        platformWidget()->update();
    11421191    }
    11431192
    11441193    virtual void show()
    11451194    {
    1146         m_visible = true;
    1147         if (!platformWidget())
    1148             return;
    1149 
    1150         handleVisibility();   
     1195        Widget::show();
     1196        handleVisibility();
    11511197    }
    11521198
     
    11541200    void handleVisibility()
    11551201    {
    1156         if (!m_visible)
     1202        if (!isVisible())
    11571203            return;
    11581204
     
    11621208        platformWidget()->setVisible(!mask.isEmpty());
    11631209    }
    1164 
    1165     bool m_visible;
    11661210};
    11671211
     
    12631307    }
    12641308
    1265 #if QT_VERSION >= 0x040400
    12661309        if (!object) {
    12671310            QWebPluginFactory* factory = m_webFrame->page()->pluginFactory();
     
    12691312                object = factory->create(mimeType, qurl, params, values);
    12701313        }
    1271 #endif
    12721314
    12731315        if (object) {
     
    13041346            delete object;
    13051347    } else { // NPAPI Plugins
     1348        Vector<String> params = paramNames;
     1349        Vector<String> values = paramValues;
     1350        if (mimeType == "application/x-shockwave-flash") {
     1351            QWebPageClient* client = m_webFrame->page()->d->client;
     1352            const bool isQWebView = client && qobject_cast<QWidget*>(client->pluginParent());
     1353#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5)
     1354            size_t wmodeIndex = params.find("wmode");
     1355            if (wmodeIndex == -1) {
     1356                // Disable XEmbed mode and force it to opaque mode
     1357                params.append("wmode");
     1358                values.append("opaque");
     1359            } else if (!isQWebView) {
     1360                // Disable transparency if client is not a QWebView
     1361                values[wmodeIndex] = "opaque";
     1362            }
     1363#else
     1364            if (!isQWebView) {
     1365                // inject wmode=opaque when there is no client or the client is not a QWebView
     1366                size_t wmodeIndex = params.find("wmode");
     1367                if (wmodeIndex == -1) {
     1368                    params.append("wmode");
     1369                    values.append("opaque");
     1370                } else
     1371                    values[wmodeIndex] = "opaque";
     1372            }
     1373#endif
     1374        }
     1375
    13061376        RefPtr<PluginView> pluginView = PluginView::create(m_frame, pluginSize, element, url,
    1307             paramNames, paramValues, mimeType, loadManually);
     1377            params, values, mimeType, loadManually);
    13081378        return pluginView;
    13091379    }
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h

    r561 r846  
    104104        virtual void dispatchWillPerformClientRedirect(const KURL&, double interval, double fireDate);
    105105        virtual void dispatchDidChangeLocationWithinPage();
     106        virtual void dispatchDidPushStateWithinPage();
     107        virtual void dispatchDidReplaceStateWithinPage();
     108        virtual void dispatchDidPopStateWithinPage();
    106109        virtual void dispatchWillClose();
    107110        virtual void dispatchDidReceiveIcon();
     
    149152        virtual void updateGlobalHistoryRedirectLinks();
    150153        virtual bool shouldGoToHistoryItem(HistoryItem*) const;
    151 
     154        virtual void dispatchDidAddBackForwardItem(HistoryItem*) const;
     155        virtual void dispatchDidRemoveBackForwardItem(HistoryItem*) const;
     156        virtual void dispatchDidChangeBackForwardIndex() const;
    152157        virtual void didDisplayInsecureContent();
    153158        virtual void didRunInsecureContent(SecurityOrigin*);
     
    190195        virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
    191196                                   const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) ;
     197        virtual void didTransferChildFrameToNewDocument();
    192198        virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool);
    193199        virtual void redirectDataToPlugin(Widget* pluginWidget);
     
    198204        virtual String overrideMediaType() const;
    199205
    200         virtual void windowObjectCleared();
     206        virtual void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*);
    201207        virtual void documentElementAvailable();
    202208        virtual void didPerformFirstNavigation() const;
     
    205211
    206212        QString chooseFile(const QString& oldFile);
     213
     214        static bool deferMainResourceDataLoad;
    207215
    208216    private:
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp

    r561 r846  
    5151static const QLatin1String settingStorageTypeSuffix(".type");
    5252
    53 static InspectorController::Setting variantToSetting(const QVariant& qvariant);
    54 static QVariant settingToVariant(const InspectorController::Setting& icSetting);
     53static String variantToSetting(const QVariant& qvariant);
     54static QVariant settingToVariant(const String& value);
    5555
    5656class InspectorClientWebPage : public QWebPage {
     
    5959public:
    6060    InspectorClientWebPage(QObject* parent = 0)
    61     : QWebPage(parent)
     61        : QWebPage(parent)
    6262    {
    63         settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, false);
    6463    }
    6564
     
    8382}
    8483
    85 Page* InspectorClientQt::createPage()
     84   
     85void InspectorClientQt::openInspectorFrontend(WebCore::InspectorController*)
    8686{
    8787    QWebView* inspectorView = new QWebView;
    8888    InspectorClientWebPage* inspectorPage = new InspectorClientWebPage(inspectorView);
    8989    inspectorView->setPage(inspectorPage);
    90     m_inspectorView.set(inspectorView);
    91 
    92     inspectorPage->mainFrame()->load(QString::fromLatin1("qrc:/webkit/inspector/inspector.html"));
     90
     91    QWebInspector* inspector = m_inspectedWebPage->d->getOrCreateInspector();
     92    // This is a known hook that allows changing the default URL for the
     93    // Web inspector. This is used for SDK purposes. Please keep this hook
     94    // around and don't remove it.
     95    // https://bugs.webkit.org/show_bug.cgi?id=35340
     96    QUrl inspectorUrl;
     97#ifndef QT_NO_PROPERTIES
     98    inspectorUrl = inspector->property("_q_inspectorUrl").toUrl();
     99#endif
     100    if (!inspectorUrl.isValid())
     101        inspectorUrl = QUrl("qrc:/webkit/inspector/inspector.html");
     102    inspectorView->page()->mainFrame()->load(inspectorUrl);
    93103    m_inspectedWebPage->d->inspectorFrontend = inspectorView;
    94     m_inspectedWebPage->d->getOrCreateInspector()->d->setFrontend(inspectorView);
    95 
    96     return m_inspectorView->page()->d->page;
    97 }
    98 
    99 String InspectorClientQt::localizedStringsURL()
    100 {
    101     notImplemented();
    102     return String();
    103 }
    104 
    105 String InspectorClientQt::hiddenPanels()
    106 {
    107     notImplemented();
    108     return String();
    109 }
    110 
    111 void InspectorClientQt::showWindow()
    112 {
    113     updateWindowTitle();
    114 
    115     m_inspectedWebPage->d->inspectorController()->setWindowVisible(true, true);
    116     // We don't allow the inspector to ask for widget visibility itself because showWindow is
    117     // not always called when we want.
    118     // Inspecting an element or calling QWebInspector::show() should already have made the
    119     // widget visible.
    120 }
    121 
    122 void InspectorClientQt::closeWindow()
    123 {
    124     if (m_inspectedWebPage->d->inspector)
    125         m_inspectedWebPage->d->inspector->close();
    126 }
    127 
    128 void InspectorClientQt::attachWindow()
    129 {
    130     notImplemented();
    131 }
    132 
    133 void InspectorClientQt::detachWindow()
    134 {
    135     notImplemented();
    136 }
    137 
    138 void InspectorClientQt::setAttachedWindowHeight(unsigned)
    139 {
    140     notImplemented();
     104    inspector->d->setFrontend(inspectorView);
     105
     106    inspectorView->page()->d->page->inspectorController()->setInspectorFrontendClient(new InspectorFrontendClientQt(m_inspectedWebPage, inspectorView));
    141107}
    142108
     
    151117}
    152118
    153 void InspectorClientQt::inspectedURLChanged(const String& newURL)
    154 {
    155     m_inspectedURL = newURL;
    156     updateWindowTitle();
    157 }
    158 
    159 void InspectorClientQt::inspectorWindowObjectCleared()
    160 {
    161     notImplemented();
    162 }
    163 
    164 void InspectorClientQt::updateWindowTitle()
    165 {
    166     if (m_inspectedWebPage->d->inspector) {
    167         QString caption = QCoreApplication::translate("QWebPage", "Web Inspector - %2").arg(m_inspectedURL);
    168         m_inspectedWebPage->d->inspector->setWindowTitle(caption);
    169     }
    170 }
    171 
    172 void InspectorClientQt::populateSetting(const String& key, InspectorController::Setting& setting)
    173 {
     119void InspectorClientQt::populateSetting(const String& key, String* setting)
     120{
     121#ifdef QT_NO_SETTINGS
     122    Q_UNUSED(key)
     123    Q_UNUSED(setting)
     124    qWarning("QWebInspector: QSettings is not supported by Qt.");
     125#else
    174126    QSettings qsettings;
    175127    if (qsettings.status() == QSettings::AccessError) {
     
    180132    }
    181133
    182     QString settingKey(settingStoragePrefix + key);
     134    QString settingKey(settingStoragePrefix + QString(key));
    183135    QString storedValueType = qsettings.value(settingKey + settingStorageTypeSuffix).toString();
    184136    QVariant storedValue = qsettings.value(settingKey);
    185137    storedValue.convert(QVariant::nameToType(storedValueType.toAscii().data()));
    186     setting = variantToSetting(storedValue);
    187 }
    188 
    189 void InspectorClientQt::storeSetting(const String& key, const InspectorController::Setting& setting)
    190 {
     138    *setting = variantToSetting(storedValue);
     139#endif // QT_NO_SETTINGS
     140}
     141
     142void InspectorClientQt::storeSetting(const String& key, const String& setting)
     143{
     144#ifdef QT_NO_SETTINGS
     145    Q_UNUSED(key)
     146    Q_UNUSED(setting)
     147    qWarning("QWebInspector: QSettings is not supported by Qt.");
     148#else
    191149    QSettings qsettings;
    192150    if (qsettings.status() == QSettings::AccessError) {
     
    197155
    198156    QVariant valueToStore = settingToVariant(setting);
    199     QString settingKey(settingStoragePrefix + key);
     157    QString settingKey(settingStoragePrefix + QString(key));
    200158    qsettings.setValue(settingKey, valueToStore);
    201159    qsettings.setValue(settingKey + settingStorageTypeSuffix, QVariant::typeToName(valueToStore.type()));
    202 }
    203 
    204 void InspectorClientQt::removeSetting(const String&)
    205 {
    206     notImplemented();
    207 }
    208 
    209 static InspectorController::Setting variantToSetting(const QVariant& qvariant)
    210 {
    211     InspectorController::Setting retVal;
     160#endif // QT_NO_SETTINGS
     161}
     162
     163static String variantToSetting(const QVariant& qvariant)
     164{
     165    String retVal;
    212166
    213167    switch (qvariant.type()) {
    214168    case QVariant::Bool:
    215         retVal.set(qvariant.toBool());
     169        retVal = qvariant.toBool() ? "true" : "false";
     170    case QVariant::String:
     171        retVal = qvariant.toString();
     172    default:
    216173        break;
    217     case QVariant::Double:
    218         retVal.set(qvariant.toDouble());
    219         break;
    220     case QVariant::Int:
    221         retVal.set((long)qvariant.toInt());
    222         break;
    223     case QVariant::String:
    224         retVal.set(qvariant.toString());
    225         break;
    226     case QVariant::StringList: {
    227         QStringList qsList = qvariant.toStringList();
    228         int listCount = qsList.count();
    229         Vector<String> vector(listCount);
    230         for (int i = 0; i < listCount; ++i)
    231             vector[i] = qsList[i];
    232         retVal.set(vector);
    233         break;
    234     }
    235174    }
    236175
     
    238177}
    239178
    240 static QVariant settingToVariant(const InspectorController::Setting& icSetting)
     179static QVariant settingToVariant(const String& setting)
    241180{
    242181    QVariant retVal;
    243 
    244     switch (icSetting.type()) {
    245     case InspectorController::Setting::StringType:
    246         retVal.setValue(static_cast<QString>(icSetting.string()));
    247         break;
    248     case InspectorController::Setting::StringVectorType: {
    249         const Vector<String>& vector = icSetting.stringVector();
    250         Vector<String>::const_iterator iter;
    251         QStringList qsList;
    252         for (iter = vector.begin(); iter != vector.end(); ++iter)
    253             qsList << *iter;
    254         retVal.setValue(qsList);
    255         break;
    256     }
    257     case InspectorController::Setting::DoubleType:
    258         retVal.setValue(icSetting.doubleValue());
    259         break;
    260     case InspectorController::Setting::IntegerType:
    261         retVal.setValue((int)icSetting.integerValue());
    262         break;
    263     case InspectorController::Setting::BooleanType:
    264         retVal.setValue(icSetting.booleanValue());
    265         break;
    266     }
    267 
     182    retVal.setValue(static_cast<QString>(setting));
    268183    return retVal;
    269184}
    270185
     186InspectorFrontendClientQt::InspectorFrontendClientQt(QWebPage* inspectedWebPage, PassOwnPtr<QWebView> inspectorView)
     187    : InspectorFrontendClientLocal(inspectedWebPage->d->page->inspectorController(), inspectorView->page()->d->page)
     188    , m_inspectedWebPage(inspectedWebPage)
     189    , m_inspectorView(inspectorView)
     190    , m_destroyingInspectorView(false)
     191{
     192}
     193
     194void InspectorFrontendClientQt::frontendLoaded()
     195{
     196    InspectorFrontendClientLocal::frontendLoaded();
     197    setAttachedWindow(true);
     198}
     199
     200String InspectorFrontendClientQt::localizedStringsURL()
     201{
     202    notImplemented();
     203    return String();
     204}
     205
     206String InspectorFrontendClientQt::hiddenPanels()
     207{
     208    notImplemented();
     209    return String();
     210}
     211
     212void InspectorFrontendClientQt::bringToFront()
     213{
     214    updateWindowTitle();
     215}
     216
     217void InspectorFrontendClientQt::closeWindow()
     218{
     219    if (m_destroyingInspectorView)
     220        return;
     221    m_destroyingInspectorView = true;
     222
     223    // Clear reference from QWebInspector to the frontend view.
     224    m_inspectedWebPage->d->getOrCreateInspector()->d->setFrontend(0);
     225#if ENABLE(INSPECTOR)
     226    m_inspectedWebPage->d->inspectorController()->disconnectFrontend();
     227#endif
     228    // Clear pointer before deleting WebView to avoid recursive calls to its destructor.
     229    delete m_inspectorView.release();
     230}
     231
     232void InspectorFrontendClientQt::attachWindow()
     233{
     234    notImplemented();
     235}
     236
     237void InspectorFrontendClientQt::detachWindow()
     238{
     239    notImplemented();
     240}
     241
     242void InspectorFrontendClientQt::setAttachedWindowHeight(unsigned)
     243{
     244    notImplemented();
     245}
     246
     247void InspectorFrontendClientQt::inspectedURLChanged(const String& newURL)
     248{
     249    m_inspectedURL = newURL;
     250    updateWindowTitle();
     251}
     252
     253void InspectorFrontendClientQt::updateWindowTitle()
     254{
     255    if (m_inspectedWebPage->d->inspector) {
     256        QString caption = QCoreApplication::translate("QWebPage", "Web Inspector - %2").arg(m_inspectedURL);
     257        m_inspectedWebPage->d->inspector->setWindowTitle(caption);
     258    }
     259}
     260
    271261}
    272262
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.h

    r561 r846  
    3232
    3333#include "InspectorClient.h"
     34#include "InspectorFrontendClientLocal.h"
    3435#include "OwnPtr.h"
     36#include "PassOwnPtr.h"
    3537#include <QtCore/QString>
    3638
     
    3941
    4042namespace WebCore {
    41     class Node;
    42     class Page;
    43     class String;
     43class Node;
     44class Page;
     45class String;
    4446
    45     class InspectorClientQt : public InspectorClient {
    46     public:
    47         InspectorClientQt(QWebPage*);
     47class InspectorClientQt : public InspectorClient {
     48public:
     49    InspectorClientQt(QWebPage*);
    4850
    49         virtual void inspectorDestroyed();
     51    virtual void inspectorDestroyed();
    5052
    51         virtual Page* createPage();
     53    virtual void openInspectorFrontend(WebCore::InspectorController*);
    5254
    53         virtual String localizedStringsURL();
     55    virtual void highlight(Node*);
     56    virtual void hideHighlight();
    5457
    55         virtual String hiddenPanels();
     58    virtual void populateSetting(const String& key, String* value);
     59    virtual void storeSetting(const String& key, const String& value);
    5660
    57         virtual void showWindow();
    58         virtual void closeWindow();
     61private:
     62    QWebPage* m_inspectedWebPage;
     63};
    5964
    60         virtual void attachWindow();
    61         virtual void detachWindow();
     65class InspectorFrontendClientQt : public InspectorFrontendClientLocal {
     66public:
     67    InspectorFrontendClientQt(QWebPage* inspectedWebPage, PassOwnPtr<QWebView> inspectorView);
    6268
    63         virtual void setAttachedWindowHeight(unsigned height);
     69    virtual void frontendLoaded();
    6470
    65         virtual void highlight(Node*);
    66         virtual void hideHighlight();
    67         virtual void inspectedURLChanged(const String& newURL);
     71    virtual String localizedStringsURL();
    6872
    69         virtual void populateSetting(const String& key, InspectorController::Setting&);
    70         virtual void storeSetting(const String& key, const InspectorController::Setting&);
    71         virtual void removeSetting(const String& key);
     73    virtual String hiddenPanels();
    7274
    73         virtual void inspectorWindowObjectCleared();
     75    virtual void bringToFront();
     76    virtual void closeWindow();
    7477
    75     private:
    76         void updateWindowTitle();
    77         QWebPage* m_inspectedWebPage;
    78         OwnPtr<QWebView> m_inspectorView;
    79         QString m_inspectedURL;
    80     };
     78    virtual void attachWindow();
     79    virtual void detachWindow();
     80
     81    virtual void setAttachedWindowHeight(unsigned height);
     82
     83    virtual void inspectedURLChanged(const String& newURL);
     84
     85private:
     86    void updateWindowTitle();
     87    QWebPage* m_inspectedWebPage;
     88    OwnPtr<QWebView> m_inspectorView;
     89    QString m_inspectedURL;
     90    bool m_destroyingInspectorView;
     91};
    8192}
    8293
  • trunk/src/3rdparty/webkit/WebKit/qt/docs/docs.pri

    r561 r846  
    44    QDOC = SRCDIR=$$PWD/../../.. OUTPUT_DIR=$$OUTPUT_DIR $$(QTDIR)/bin/qdoc3
    55} else {
    6     QDOC = $$(QTDIR)\bin\qdoc3.exe
     6    QDOC = $$(QTDIR)\\bin\\qdoc3.exe
    77}
    88
  • trunk/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc

    r561 r846  
    11/*!
    22    \module QtWebKit
    3     \title QtWebKit Module
     3    \title WebKit in Qt
    44    \contentspage All Qt Modules
    55    \previouspage QtSvg
    66    \nextpage QtXml
    77    \ingroup modules
     8    \ingroup technology-apis
     9
    810    \brief The QtWebKit module provides a web browser engine as well as
    911    classes to render and interact with web content.
     12
     13    QtWebKit provides a Web browser engine that makes it easy to embed content
     14    from the World Wide Web into your Qt application. At the same time Web
     15    content can be enhanced with native controls.
     16
     17    QtWebKit provides facilities for rendering of HyperText Markup Language
     18    (HTML), Extensible HyperText Markup Language (XHTML) and Scalable Vector
     19    Graphics (SVG) documents, styled using Cascading Style Sheets (CSS) and
     20    scripted with JavaScript.
     21
     22    A bridge between the JavaScript execution environment and the Qt object
     23    model makes it possible for custom QObjects to be scripted. For detailed
     24    documentation see \l{The QtWebkit Bridge}.
     25    Integration with the Qt networking module enables Web pages to be transparently loaded
     26    from Web servers, the local file system or even the Qt resource system.
     27
     28    In addition to providing pure rendering features, HTML documents can be
     29    made fully editable to the user through the use of the \c{contenteditable}
     30    attribute on HTML elements.
     31
     32    QtWebKit is based on the Open Source WebKit engine. More information about
     33    WebKit itself can be found on the \l{WebKit Open Source Project} Web site.
     34
     35    \section1 Including In Your Project
    1036
    1137    To include the definitions of the module's classes, use the
     
    1945    \snippet webkitsnippets/qtwebkit_build_snippet.qdoc 0
    2046
    21     \section1 License Information
    22 
    23     This is a snapshot of the Qt port of WebKit. The exact version information
    24     can be found in the \c{src/3rdparty/webkit/VERSION} file supplied with Qt.
    25 
    26     Qt Commercial Edition licensees that wish to distribute applications that
    27     use the QtWebKit module need to be aware of their obligations under the
    28     GNU Library General Public License (LGPL).
    29 
    30     Developers using the Open Source Edition can choose to redistribute
    31     the module under the appropriate version of the GNU LGPL.
    32 
    33     \legalese
    34     WebKit is licensed under the GNU Library General Public License.
    35     Individual contributor names and copyright dates can be found
    36     inline in the code.
    37 
    38     This library is free software; you can redistribute it and/or
    39     modify it under the terms of the GNU Library General Public
    40     License as published by the Free Software Foundation; either
    41     version 2 of the License, or (at your option) any later version.
    42 
    43     This library is distributed in the hope that it will be useful,
    44     but WITHOUT ANY WARRANTY; without even the implied warranty of
    45     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    46     Library General Public License for more details.
    47 
    48     You should have received a copy of the GNU Library General Public License
    49     along with this library; see the file COPYING.LIB.  If not, write to
    50     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    51     Boston, MA 02110-1301, USA.
    52     \endlegalese
    53 */
    54 
    55 /*!
    56     \page webintegration.html
    57     \title Integrating Web Content with QtWebKit
    58     \since 4.4
    59 
    60     \ingroup frameworks-technologies
    61 
    62     \keyword Browser
    63     \keyword Web Browser
    64 
    65     QtWebKit provides a Web browser engine that makes it easy to embed content
    66     from the World Wide Web into your Qt application. At the same time Web
    67     content can be enhanced with native controls.
    68 
    69     QtWebKit provides facilities for rendering of HyperText Markup Language
    70     (HTML), Extensible HyperText Markup Language (XHTML) and Scalable Vector
    71     Graphics (SVG) documents, styled using Cascading Style Sheets (CSS) and
    72     scripted with JavaScript.
    73 
    74     A bridge between the JavaScript execution environment and the Qt object
    75     model makes it possible for custom QObjects to be scripted. Integration
    76     with the Qt networking module enables Web pages to be transparently loaded
    77     from Web servers, the local file system or even the Qt resource system.
    78 
    79     In addition to providing pure rendering features, HTML documents can be
    80     made fully editable to the user through the use of the \c{contenteditable}
    81     attribute on HTML elements.
    82 
    83     QtWebKit is based on the Open Source WebKit engine. More information about
    84     WebKit itself can be found on the \l{WebKit Open Source Project} Web site.
    85 
    86     The QtWebKit module is part of the \l{Qt Full Framework Edition}, and the
    87     \l{Open Source Versions of Qt}.
     47    \section1 Notes
    8848
    8949    \note Building the QtWebKit module with debugging symbols is problematic
     
    10060    Embedded Linux systems. See the \l{Qt for Embedded Linux Requirements}
    10161    document for more information.
    102 
    103     Topics:
    104 
    105     \tableofcontents
    10662
    10763    \section1 Architecture
     
    197153    \endlist
    198154    \endtable
     155   
     156
     157    \section1 License Information
     158
     159    This is a snapshot of the Qt port of WebKit. The exact version information
     160    can be found in the \c{src/3rdparty/webkit/VERSION} file supplied with Qt.
     161
     162    Qt Commercial Edition licensees that wish to distribute applications that
     163    use the QtWebKit module need to be aware of their obligations under the
     164    GNU Library General Public License (LGPL).
     165
     166    Developers using the Open Source Edition can choose to redistribute
     167    the module under the appropriate version of the GNU LGPL.
     168
     169    \legalese
     170    WebKit is licensed under the GNU Library General Public License.
     171    Individual contributor names and copyright dates can be found
     172    inline in the code.
     173
     174    This library is free software; you can redistribute it and/or
     175    modify it under the terms of the GNU Library General Public
     176    License as published by the Free Software Foundation; either
     177    version 2 of the License, or (at your option) any later version.
     178
     179    This library is distributed in the hope that it will be useful,
     180    but WITHOUT ANY WARRANTY; without even the implied warranty of
     181    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     182    Library General Public License for more details.
     183
     184    You should have received a copy of the GNU Library General Public License
     185    along with this library; see the file COPYING.LIB.  If not, write to
     186    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
     187    Boston, MA 02110-1301, USA.
     188    \endlegalese
    199189*/
     190
  • trunk/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdocconf

    r561 r846  
    44description = "Qt WebKit API Documentation"
    55
    6 headerdirs = $SRCDIR/WebKit/qt/Api
    7 sourcedirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/docs
     6headerdirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/declarative
     7sourcedirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/docs $SRCDIR/JavaScriptCore/qt/api $SRCDIR/WebKit/qt/declarative
    88outputdir = $OUTPUT_DIR/doc/html
    99outputformats = HTML
  • trunk/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp

    r561 r846  
    1010    QWebInspector *inspector = new QWebInspector;
    1111    inspector->setPage(page);
    12 
    13     connect(page, SIGNAL(webInspectorTriggered(QWebElement)), inspector, SLOT(show()));
    1412//! [0]
    1513
  • trunk/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/webelement/main.cpp

    r561 r846  
    3737}
    3838
     39static void findButtonAndClick()
     40{
     41
     42    frame->setHtml("<form name=\"myform\" action=\"submit_form.asp\" method=\"get\">"
     43                   "<input type=\"text\" name=\"myfield\">"
     44                   "<input type=\"submit\" value=\"Submit\">"
     45                   "</form>");
     46
     47//! [Calling a DOM element method]
     48
     49    QWebElement document = frame->documentElement();
     50    /* Assume that the document has the following structure:
     51
     52        <form name="myform" action="submit_form.asp" method="get">
     53            <input type="text" name="myfield">
     54            <input type="submit" value="Submit">
     55        </form>
     56
     57     */
     58
     59    QWebElement button = document.findFirst("input[type=submit]");
     60    button.evaluateJavaScript("click()");
     61
     62//! [Calling a DOM element method]
     63
     64 }
     65
     66static void autocomplete1()
     67{
     68    QWebElement document = frame->documentElement();
     69
     70//! [autocomplete1]
     71    QWebElement firstTextInput = document.findFirst("input[type=text]");
     72    QString storedText = firstTextInput.attribute("value");
     73//! [autocomplete1]
     74
     75}
     76
     77
     78static void autocomplete2()
     79{
     80
     81    QWebElement document = frame->documentElement();
     82    QString storedText = "text";
     83
     84//! [autocomplete2]
     85    QWebElement firstTextInput = document.findFirst("input[type=text]");
     86    textInput.setAttribute("value", storedText);
     87//! [autocomplete2]
     88
     89}
     90
     91
    3992static void findAll()
    4093{
     
    54107
    55108//! [FindAll intro]
    56     QList<QWebElement> allSpans = document.findAll("span");
    57     QList<QWebElement> introSpans = document.findAll("p.intro span");
     109    QWebElementCollection allSpans = document.findAll("span");
     110    QWebElementCollection introSpans = document.findAll("p.intro span");
    58111//! [FindAll intro] //! [FindAll]
    59112}
     
    66119    traverse();
    67120    findAll();
     121    findButtonAndClick();
     122    autocomplete1();
     123    autocomplete2();
    68124    return 0;
    69125}
  • trunk/src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def

    r769 r846  
    625625        ?qt_suspendActiveDOMObjects@@YAXPAVQWebFrame@@@Z @ 624 NONAME ; void qt_suspendActiveDOMObjects(class QWebFrame *)
    626626        ?qtwebkit_webframe_scrollRecursively@@YA_NPAVQWebFrame@@HH@Z @ 625 NONAME ABSENT ; bool qtwebkit_webframe_scrollRecursively(class QWebFrame *, int, int)
    627         ?closeEvent@QWebInspector@@MAEXPAVQCloseEvent@@@Z @ 626 NONAME ABSENT ; void QWebInspector::closeEvent(class QCloseEvent *)
     627        ?closeEvent@QWebInspector@@MAEXPAVQCloseEvent@@@Z @ 626 NONAME ; void QWebInspector::closeEvent(class QCloseEvent *)
    628628        ?inspectorUrl@QWebSettings@@QBE?AVQUrl@@XZ @ 627 NONAME ABSENT ; class QUrl QWebSettings::inspectorUrl(void) const
    629         ?isTiledBackingStoreFrozen@QGraphicsWebView@@QBE_NXZ @ 628 NONAME ABSENT ; bool QGraphicsWebView::isTiledBackingStoreFrozen(void) const
    630         ?pageChanged@QWebFrame@@IAEXXZ @ 629 NONAME ABSENT ; void QWebFrame::pageChanged(void)
    631         ?qt_drt_enableCaretBrowsing@@YAXPAVQWebPage@@_N@Z @ 630 NONAME ABSENT ; void qt_drt_enableCaretBrowsing(class QWebPage *, bool)
    632         ?qt_drt_evaluateScriptInIsolatedWorld@@YAXPAVQWebFrame@@HABVQString@@@Z @ 631 NONAME ABSENT ; void qt_drt_evaluateScriptInIsolatedWorld(class QWebFrame *, int, class QString const &)
    633         ?qt_drt_hasDocumentElement@@YA_NPAVQWebFrame@@@Z @ 632 NONAME ABSENT ; bool qt_drt_hasDocumentElement(class QWebFrame *)
    634         ?qt_drt_numberOfPages@@YAHPAVQWebFrame@@MM@Z @ 633 NONAME ABSENT ; int qt_drt_numberOfPages(class QWebFrame *, float, float)
    635         ?qt_drt_pageNumberForElementById@@YAHPAVQWebFrame@@ABVQString@@MM@Z @ 634 NONAME ABSENT ; int qt_drt_pageNumberForElementById(class QWebFrame *, class QString const &, float, float)
    636         ?qt_drt_pauseSVGAnimation@@YA_NPAVQWebFrame@@ABVQString@@N1@Z @ 635 NONAME ABSENT ; bool qt_drt_pauseSVGAnimation(class QWebFrame *, class QString const &, double, class QString const &)
    637         ?qt_drt_setDomainRelaxationForbiddenForURLScheme@@YAX_NABVQString@@@Z @ 636 NONAME ABSENT ; void qt_drt_setDomainRelaxationForbiddenForURLScheme(bool, class QString const &)
    638         ?qt_drt_setFrameFlatteningEnabled@@YAXPAVQWebPage@@_N@Z @ 637 NONAME ABSENT ; void qt_drt_setFrameFlatteningEnabled(class QWebPage *, bool)
    639         ?qt_drt_setMediaType@@YAXPAVQWebFrame@@ABVQString@@@Z @ 638 NONAME ABSENT ; void qt_drt_setMediaType(class QWebFrame *, class QString const &)
    640         ?qt_drt_setTimelineProfilingEnabled@@YAXPAVQWebPage@@_N@Z @ 639 NONAME ABSENT ; void qt_drt_setTimelineProfilingEnabled(class QWebPage *, bool)
    641         ?qt_drt_webinspector_close@@YAXPAVQWebPage@@@Z @ 640 NONAME ABSENT ; void qt_drt_webinspector_close(class QWebPage *)
    642         ?qt_drt_webinspector_executeScript@@YAXPAVQWebPage@@JABVQString@@@Z @ 641 NONAME ABSENT ; void qt_drt_webinspector_executeScript(class QWebPage *, long, class QString const &)
    643         ?qt_drt_webinspector_show@@YAXPAVQWebPage@@@Z @ 642 NONAME ABSENT ; void qt_drt_webinspector_show(class QWebPage *)
    644         ?qt_drt_workerThreadCount@@YAHXZ @ 643 NONAME ABSENT ; int qt_drt_workerThreadCount(void)
     629        ?isTiledBackingStoreFrozen@QGraphicsWebView@@QBE_NXZ @ 628 NONAME ; bool QGraphicsWebView::isTiledBackingStoreFrozen(void) const
     630        ?pageChanged@QWebFrame@@IAEXXZ @ 629 NONAME ; void QWebFrame::pageChanged(void)
     631        ?qt_drt_enableCaretBrowsing@@YAXPAVQWebPage@@_N@Z @ 630 NONAME ; void qt_drt_enableCaretBrowsing(class QWebPage *, bool)
     632        ?qt_drt_evaluateScriptInIsolatedWorld@@YAXPAVQWebFrame@@HABVQString@@@Z @ 631 NONAME ; void qt_drt_evaluateScriptInIsolatedWorld(class QWebFrame *, int, class QString const &)
     633        ?qt_drt_hasDocumentElement@@YA_NPAVQWebFrame@@@Z @ 632 NONAME ; bool qt_drt_hasDocumentElement(class QWebFrame *)
     634        ?qt_drt_numberOfPages@@YAHPAVQWebFrame@@MM@Z @ 633 NONAME ; int qt_drt_numberOfPages(class QWebFrame *, float, float)
     635        ?qt_drt_pageNumberForElementById@@YAHPAVQWebFrame@@ABVQString@@MM@Z @ 634 NONAME ; int qt_drt_pageNumberForElementById(class QWebFrame *, class QString const &, float, float)
     636        ?qt_drt_pauseSVGAnimation@@YA_NPAVQWebFrame@@ABVQString@@N1@Z @ 635 NONAME ; bool qt_drt_pauseSVGAnimation(class QWebFrame *, class QString const &, double, class QString const &)
     637        ?qt_drt_setDomainRelaxationForbiddenForURLScheme@@YAX_NABVQString@@@Z @ 636 NONAME ; void qt_drt_setDomainRelaxationForbiddenForURLScheme(bool, class QString const &)
     638        ?qt_drt_setFrameFlatteningEnabled@@YAXPAVQWebPage@@_N@Z @ 637 NONAME ; void qt_drt_setFrameFlatteningEnabled(class QWebPage *, bool)
     639        ?qt_drt_setMediaType@@YAXPAVQWebFrame@@ABVQString@@@Z @ 638 NONAME ; void qt_drt_setMediaType(class QWebFrame *, class QString const &)
     640        ?qt_drt_setTimelineProfilingEnabled@@YAXPAVQWebPage@@_N@Z @ 639 NONAME ; void qt_drt_setTimelineProfilingEnabled(class QWebPage *, bool)
     641        ?qt_drt_webinspector_close@@YAXPAVQWebPage@@@Z @ 640 NONAME ; void qt_drt_webinspector_close(class QWebPage *)
     642        ?qt_drt_webinspector_executeScript@@YAXPAVQWebPage@@JABVQString@@@Z @ 641 NONAME ; void qt_drt_webinspector_executeScript(class QWebPage *, long, class QString const &)
     643        ?qt_drt_webinspector_show@@YAXPAVQWebPage@@@Z @ 642 NONAME ; void qt_drt_webinspector_show(class QWebPage *)
     644        ?qt_drt_workerThreadCount@@YAHXZ @ 643 NONAME ; int qt_drt_workerThreadCount(void)
    645645        ?qt_wrt_setViewMode@@YAXPAVQWebPage@@ABVQString@@@Z @ 644 NONAME ABSENT ; void qt_wrt_setViewMode(class QWebPage *, class QString const &)
    646646        ?qtwebkit_webframe_scrollRecursively@@YAXPAVQWebFrame@@HHABVQPoint@@@Z @ 645 NONAME ; void qtwebkit_webframe_scrollRecursively(class QWebFrame *, int, int, class QPoint const &)
    647         ?resizesToContents@QGraphicsWebView@@QBE_NXZ @ 646 NONAME ABSENT ; bool QGraphicsWebView::resizesToContents(void) const
    648         ?scrollToAnchor@QWebFrame@@QAEXABVQString@@@Z @ 647 NONAME ABSENT ; void QWebFrame::scrollToAnchor(class QString const &)
     647        ?resizesToContents@QGraphicsWebView@@QBE_NXZ @ 646 NONAME ; bool QGraphicsWebView::resizesToContents(void) const
     648        ?scrollToAnchor@QWebFrame@@QAEXABVQString@@@Z @ 647 NONAME ; void QWebFrame::scrollToAnchor(class QString const &)
    649649        ?setInspectorUrl@QWebSettings@@QAEXABVQUrl@@@Z @ 648 NONAME ABSENT ; void QWebSettings::setInspectorUrl(class QUrl const &)
    650         ?setResizesToContents@QGraphicsWebView@@QAEX_N@Z @ 649 NONAME ABSENT ; void QGraphicsWebView::setResizesToContents(bool)
    651         ?setTiledBackingStoreFrozen@QGraphicsWebView@@QAEX_N@Z @ 650 NONAME ABSENT ; void QGraphicsWebView::setTiledBackingStoreFrozen(bool)
    652         ?qtwebkit_webframe_scrollOverflow@@YA_NPAVQWebFrame@@HHABVQPoint@@@Z @ 651 NONAME ABSENT ; bool qtwebkit_webframe_scrollOverflow(QWebFrame *, int, int, const QPoint&)
     650        ?setResizesToContents@QGraphicsWebView@@QAEX_N@Z @ 649 NONAME ; void QGraphicsWebView::setResizesToContents(bool)
     651        ?setTiledBackingStoreFrozen@QGraphicsWebView@@QAEX_N@Z @ 650 NONAME ; void QGraphicsWebView::setTiledBackingStoreFrozen(bool)
     652        ?qtwebkit_webframe_scrollOverflow@@YA_NPAVQWebFrame@@HHABVQPoint@@@Z @ 651 NONAME ; bool qtwebkit_webframe_scrollOverflow(QWebFrame *, int, int, const QPoint&)
    653653
  • trunk/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def

    r769 r846  
    697697        _Z35qtwebkit_webframe_scrollRecursivelyP9QWebFrameiiRK6QPoint @ 696 NONAME
    698698        _ZN9QWebFrame17scrollRecursivelyEii @ 697 NONAME ABSENT
    699         _ZN16QGraphicsWebView20setResizesToContentsEb @ 698 NONAME ABSENT
    700         _ZNK16QGraphicsWebView17resizesToContentsEv @ 699 NONAME ABSENT
    701         _Z20qt_drt_numberOfPagesP9QWebFrameff @ 700 NONAME ABSENT
    702         _Z24qt_drt_pauseSVGAnimationP9QWebFrameRK7QStringdS3_ @ 701 NONAME ABSENT
    703         _Z24qt_drt_webinspector_showP8QWebPage @ 702 NONAME ABSENT
    704         _Z24qt_drt_workerThreadCountv @ 703 NONAME ABSENT
    705         _Z25qt_drt_hasDocumentElementP9QWebFrame @ 704 NONAME ABSENT
    706         _Z25qt_drt_webinspector_closeP8QWebPage @ 705 NONAME ABSENT
    707         _Z31qt_drt_pageNumberForElementByIdP9QWebFrameRK7QStringff @ 706 NONAME ABSENT
    708         _Z33qt_drt_webinspector_executeScriptP8QWebPagelRK7QString @ 707 NONAME ABSENT
    709         _Z34qt_drt_setTimelineProfilingEnabledP8QWebPageb @ 708 NONAME ABSENT
    710         _Z32qt_drt_setFrameFlatteningEnabledP8QWebPageb @ 709 NONAME ABSENT
    711         _Z36qt_drt_evaluateScriptInIsolatedWorldP9QWebFrameiRK7QString @ 710 NONAME ABSENT
    712         _Z47qt_drt_setDomainRelaxationForbiddenForURLSchemebRK7QString @ 711 NONAME ABSENT
    713         _ZN9QWebFrame11pageChangedEv @ 712 NONAME ABSENT
    714         _ZN9QWebFrame14scrollToAnchorERK7QString @ 713 NONAME ABSENT
     699        _ZN16QGraphicsWebView20setResizesToContentsEb @ 698 NONAME
     700        _ZNK16QGraphicsWebView17resizesToContentsEv @ 699 NONAME
     701        _Z20qt_drt_numberOfPagesP9QWebFrameff @ 700 NONAME
     702        _Z24qt_drt_pauseSVGAnimationP9QWebFrameRK7QStringdS3_ @ 701 NONAME
     703        _Z24qt_drt_webinspector_showP8QWebPage @ 702 NONAME
     704        _Z24qt_drt_workerThreadCountv @ 703 NONAME
     705        _Z25qt_drt_hasDocumentElementP9QWebFrame @ 704 NONAME
     706        _Z25qt_drt_webinspector_closeP8QWebPage @ 705 NONAME
     707        _Z31qt_drt_pageNumberForElementByIdP9QWebFrameRK7QStringff @ 706 NONAME
     708        _Z33qt_drt_webinspector_executeScriptP8QWebPagelRK7QString @ 707 NONAME
     709        _Z34qt_drt_setTimelineProfilingEnabledP8QWebPageb @ 708 NONAME
     710        _Z32qt_drt_setFrameFlatteningEnabledP8QWebPageb @ 709 NONAME
     711        _Z36qt_drt_evaluateScriptInIsolatedWorldP9QWebFrameiRK7QString @ 710 NONAME
     712        _Z47qt_drt_setDomainRelaxationForbiddenForURLSchemebRK7QString @ 711 NONAME
     713        _ZN9QWebFrame11pageChangedEv @ 712 NONAME
     714        _ZN9QWebFrame14scrollToAnchorERK7QString @ 713 NONAME
    715715        _ZN12QWebSettings15setInspectorUrlERK4QUrl @ 714 NONAME ABSENT
    716         _ZN13QWebInspector10closeEventEP11QCloseEvent @ 715 NONAME ABSENT
    717         _ZN16QGraphicsWebView26setTiledBackingStoreFrozenEb @ 716 NONAME ABSENT
    718         _ZNK16QGraphicsWebView25isTiledBackingStoreFrozenEv @ 717 NONAME ABSENT
     716        _ZN13QWebInspector10closeEventEP11QCloseEvent @ 715 NONAME
     717        _ZN16QGraphicsWebView26setTiledBackingStoreFrozenEb @ 716 NONAME
     718        _ZNK16QGraphicsWebView25isTiledBackingStoreFrozenEv @ 717 NONAME
    719719        _Z18qt_wrt_setViewModeP8QWebPageRK7QString @ 718 NONAME ABSENT
    720         _Z19qt_drt_setMediaTypeP9QWebFrameRK7QString @ 719 NONAME ABSENT
    721         _Z26qt_drt_enableCaretBrowsingP8QWebPageb @ 720 NONAME ABSENT
     720        _Z19qt_drt_setMediaTypeP9QWebFrameRK7QString @ 719 NONAME
     721        _Z26qt_drt_enableCaretBrowsingP8QWebPageb @ 720 NONAME
    722722        _ZNK12QWebSettings12inspectorUrlEv @ 721 NONAME ABSENT
    723723        _ZN23DumpRenderTreeSupportQt19webPageSetGroupNameEP8QWebPageRK7QString @ 722 NONAME ABSENT
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro

    r561 r846  
    1 TEMPLATE = app
    2 TARGET = tst_qgraphicswebview
    3 include(../../../../WebKit.pri)
    4 SOURCES  += tst_qgraphicswebview.cpp
    5 QT += testlib network
    6 QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
    7 
    8 symbian {
    9     TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
    10 }
     1isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
     2include(../tests.pri)
     3exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp

    r561 r846  
    1818*/
    1919
     20#include "../util.h"
    2021#include <QtTest/QtTest>
    21 
     22#include <QGraphicsSceneMouseEvent>
    2223#include <QGraphicsView>
    2324#include <qgraphicswebview.h>
     
    2526#include <qwebframe.h>
    2627
    27 /**
    28  * Starts an event loop that runs until the given signal is received.
    29  * Optionally the event loop
    30  * can return earlier on a timeout.
    31  *
    32  * \return \p true if the requested signal was received
    33  *         \p false on timeout
    34  */
    35 static bool waitForSignal(QObject* obj, const char* signal, int timeout = 10000)
    36 {
    37     QEventLoop loop;
    38     QObject::connect(obj, signal, &loop, SLOT(quit()));
    39     QTimer timer;
    40     QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));
    41     if (timeout > 0) {
    42         QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
    43         timer.setSingleShot(true);
    44         timer.start(timeout);
    45     }
    46     loop.exec();
    47     return timeoutSpy.isEmpty();
    48 }
    49 
    5028class tst_QGraphicsWebView : public QObject
    5129{
     
    5533    void qgraphicswebview();
    5634    void crashOnViewlessWebPages();
     35    void microFocusCoordinates();
     36    void focusInputTypes();
     37    void crashOnSetScaleBeforeSetUrl();
    5738};
    5839
     
    9879};
    9980
     81class GraphicsWebView : public QGraphicsWebView
     82{
     83    Q_OBJECT
     84
     85public:
     86    GraphicsWebView(QGraphicsItem* parent = 0): QGraphicsWebView(parent)
     87    {
     88    }
     89
     90    void fireMouseClick(QPointF point) {
     91        QGraphicsSceneMouseEvent presEv(QEvent::GraphicsSceneMousePress);
     92        presEv.setPos(point);
     93        presEv.setButton(Qt::LeftButton);
     94        presEv.setButtons(Qt::LeftButton);
     95        QGraphicsSceneMouseEvent relEv(QEvent::GraphicsSceneMouseRelease);
     96        relEv.setPos(point);
     97        relEv.setButton(Qt::LeftButton);
     98        relEv.setButtons(Qt::LeftButton);
     99        QGraphicsWebView::sceneEvent(&presEv);
     100        QGraphicsWebView::sceneEvent(&relEv);
     101    }
     102};
     103
    100104void tst_QGraphicsWebView::crashOnViewlessWebPages()
    101105{
     
    107111    webView->setPage(page);
    108112    page->webView = webView;
    109     connect(page->mainFrame(), SIGNAL(initialLayoutCompleted()), page, SLOT(aborting()));
    110 
    111113    scene.addItem(webView);
    112114
     
    114116    view.resize(600, 480);
    115117    webView->resize(view.geometry().size());
    116     QTest::qWait(200);
     118
     119    QCoreApplication::processEvents();
    117120    view.show();
     121
     122    // Resizing the page will resize and layout the empty "about:blank"
     123    // page, so we first connect the signal afterward.
     124    connect(page->mainFrame(), SIGNAL(initialLayoutCompleted()), page, SLOT(aborting()));
    118125
    119126    page->mainFrame()->setHtml(QString("data:text/html,"
     
    123130                                            "</frameset>"));
    124131
    125     QVERIFY(::waitForSignal(page, SIGNAL(loadFinished(bool))));
    126 }
     132    QVERIFY(waitForSignal(page, SIGNAL(loadFinished(bool))));
     133    delete page;
     134}
     135
     136void tst_QGraphicsWebView::crashOnSetScaleBeforeSetUrl()
     137{
     138    QGraphicsWebView* webView = new QGraphicsWebView;
     139    webView->setScale(2.0);
     140    delete webView;
     141}
     142
     143void tst_QGraphicsWebView::microFocusCoordinates()
     144{
     145    QWebPage* page = new QWebPage;
     146    QGraphicsWebView* webView = new QGraphicsWebView;
     147    webView->setPage( page );
     148    QGraphicsView* view = new QGraphicsView;
     149    QGraphicsScene* scene = new QGraphicsScene(view);
     150    view->setScene(scene);
     151    scene->addItem(webView);
     152    view->setGeometry(QRect(0,0,500,500));
     153
     154    page->mainFrame()->setHtml("<html><body>" \
     155        "<input type='text' id='input1' style='font--family: serif' value='' maxlength='20'/><br>" \
     156        "<canvas id='canvas1' width='500' height='500'/>" \
     157        "<input type='password'/><br>" \
     158        "<canvas id='canvas2' width='500' height='500'/>" \
     159        "</body></html>");
     160
     161    page->mainFrame()->setFocus();
     162
     163    QVariant initialMicroFocus = page->inputMethodQuery(Qt::ImMicroFocus);
     164    QVERIFY(initialMicroFocus.isValid());
     165
     166    page->mainFrame()->scroll(0,300);
     167
     168    QVariant currentMicroFocus = page->inputMethodQuery(Qt::ImMicroFocus);
     169    QVERIFY(currentMicroFocus.isValid());
     170
     171    QCOMPARE(initialMicroFocus.toRect().translated(QPoint(0,-300)), currentMicroFocus.toRect());
     172
     173    delete view;
     174}
     175
     176void tst_QGraphicsWebView::focusInputTypes()
     177{
     178    QWebPage* page = new QWebPage;
     179    GraphicsWebView* webView = new GraphicsWebView;
     180    webView->setPage( page );
     181    QGraphicsView* view = new QGraphicsView;
     182    QGraphicsScene* scene = new QGraphicsScene(view);
     183    view->setScene(scene);
     184    scene->addItem(webView);
     185    view->setGeometry(QRect(0,0,500,500));
     186    QCoreApplication::processEvents();
     187    QUrl url("qrc:///resources/input_types.html");
     188    page->mainFrame()->load(url);
     189    page->mainFrame()->setFocus();
     190
     191    QVERIFY(waitForSignal(page, SIGNAL(loadFinished(bool))));
     192
     193    // 'text' type
     194    webView->fireMouseClick(QPointF(20.0, 10.0));
     195#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) || defined(Q_OS_SYMBIAN)
     196    QVERIFY(webView->inputMethodHints() & Qt::ImhNoAutoUppercase);
     197    QVERIFY(webView->inputMethodHints() & Qt::ImhNoPredictiveText);
     198#else
     199    QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
     200#endif
     201
     202    // 'password' field
     203    webView->fireMouseClick(QPointF(20.0, 60.0));
     204    QVERIFY(webView->inputMethodHints() & Qt::ImhHiddenText);
     205
     206    // 'tel' field
     207    webView->fireMouseClick(QPointF(20.0, 110.0));
     208    QVERIFY(webView->inputMethodHints() & Qt::ImhDialableCharactersOnly);
     209
     210    // 'number' field
     211    webView->fireMouseClick(QPointF(20.0, 160.0));
     212    QVERIFY(webView->inputMethodHints() & Qt::ImhDigitsOnly);
     213
     214    // 'email' field
     215    webView->fireMouseClick(QPointF(20.0, 210.0));
     216    QVERIFY(webView->inputMethodHints() & Qt::ImhEmailCharactersOnly);
     217
     218    // 'url' field
     219    webView->fireMouseClick(QPointF(20.0, 260.0));
     220    QVERIFY(webView->inputMethodHints() & Qt::ImhUrlCharactersOnly);
     221
     222    delete webView;
     223    delete view;
     224}
     225
     226
    127227
    128228QTEST_MAIN(tst_QGraphicsWebView)
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/qwebelement.pro

    r561 r846  
    1 TEMPLATE = app
    2 TARGET = tst_qwebelement
    3 include(../../../../WebKit.pri)
    4 SOURCES  += tst_qwebelement.cpp
    5 RESOURCES += qwebelement.qrc
    6 QT += testlib network
    7 QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
    8 
    9 symbian {
    10     TARGET.UID3 = 0xA000E53A
    11     TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
    12 }
     1isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
     2include(../tests.pri)
     3exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp

    r561 r846  
    2020
    2121#include <QtTest/QtTest>
    22 
    2322#include <qwebpage.h>
    2423#include <qwidget.h>
     
    2625#include <qwebframe.h>
    2726#include <qwebelement.h>
     27#include <util.h>
    2828//TESTED_CLASS=
    2929//TESTED_FILES=
    30 
    31 /**
    32  * Starts an event loop that runs until the given signal is received.
    33  Optionally the event loop
    34  * can return earlier on a timeout.
    35  *
    36  * \return \p true if the requested signal was received
    37  *         \p false on timeout
    38  */
    39 static bool waitForSignal(QObject* obj, const char* signal, int timeout = 0)
    40 {
    41     QEventLoop loop;
    42     QObject::connect(obj, signal, &loop, SLOT(quit()));
    43     QTimer timer;
    44     QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));
    45     if (timeout > 0) {
    46         QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
    47         timer.setSingleShot(true);
    48         timer.start(timeout);
    49     }
    50     loop.exec();
    51     return timeoutSpy.isEmpty();
    52 }
    5330
    5431class tst_QWebElement : public QObject
     
    577554
    578555    // in few seconds, the CSS should be completey loaded
    579     QSignalSpy spy(m_page, SIGNAL(loadFinished(bool)));
    580556    m_mainFrame->setHtml(html6);
    581     QTest::qWait(200);
     557    waitForSignal(m_page, SIGNAL(loadFinished(bool)), 200);
    582558
    583559    p = m_mainFrame->documentElement().findAll("p").at(0);
     
    597573    // in few seconds, the style should be completey loaded
    598574    m_mainFrame->setHtml(html7);
    599     QTest::qWait(200);
     575    waitForSignal(m_page, SIGNAL(loadFinished(bool)), 200);
    600576
    601577    p = m_mainFrame->documentElement().findAll("p").at(0);
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro

    r561 r846  
    1 TEMPLATE = app
    2 TARGET = tst_qwebframe
    3 include(../../../../WebKit.pri)
    4 SOURCES  += tst_qwebframe.cpp
    5 RESOURCES += qwebframe.qrc
    6 QT += testlib network
    7 QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
    8 !symbian:DEFINES += SRCDIR=\\\"$$PWD/resources\\\"
    9 
    10 symbian {
    11     TARGET.UID3 = 0xA000E53D
    12     TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
    13 }
     1isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
     2include(../tests.pri)
     3exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp

    r769 r846  
    3939#include "../util.h"
    4040
    41 #if defined(Q_OS_SYMBIAN)
    42 # define SRCDIR ""
    43 #endif
    44 
    45 //TESTED_CLASS=
    46 //TESTED_FILES=
    47 
    48 // Task 160192
    49 /**
    50  * Starts an event loop that runs until the given signal is received.
    51  Optionally the event loop
    52  * can return earlier on a timeout.
    53  *
    54  * \return \p true if the requested signal was received
    55  *         \p false on timeout
    56  */
    57 static bool waitForSignal(QObject* obj, const char* signal, int timeout = 0)
    58 {
    59     QEventLoop loop;
    60     QObject::connect(obj, signal, &loop, SLOT(quit()));
    61     QTimer timer;
    62     QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));
    63     if (timeout > 0) {
    64         QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
    65         timer.setSingleShot(true);
    66         timer.start(timeout);
    67     }
    68     loop.exec();
    69     return timeoutSpy.isEmpty();
    70 }
    71 
    72 /* Mostly a test for the JavaScript related parts of QWebFrame */
    73 
    74 
    7541struct CustomType {
    7642    QString string;
     
    9258    Q_PROPERTY(QVariant variantProperty READ variantProperty WRITE setVariantProperty)
    9359    Q_PROPERTY(QVariantList variantListProperty READ variantListProperty WRITE setVariantListProperty)
     60    Q_PROPERTY(QVariantMap variantMapProperty READ variantMapProperty WRITE setVariantMapProperty)
    9461    Q_PROPERTY(QString stringProperty READ stringProperty WRITE setStringProperty)
    9562    Q_PROPERTY(QStringList stringListProperty READ stringListProperty WRITE setStringListProperty)
     
    10168    Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut)
    10269    Q_PROPERTY(CustomType propWithCustomType READ propWithCustomType WRITE setPropWithCustomType)
     70    Q_PROPERTY(QWebElement webElementProperty READ webElementProperty WRITE setWebElementProperty)
     71    Q_PROPERTY(QObject* objectStarProperty READ objectStarProperty WRITE setObjectStarProperty)
    10372    Q_ENUMS(Policy Strategy)
    10473    Q_FLAGS(Ability)
     
    138107            m_writeOnlyValue(789),
    139108            m_readOnlyValue(987),
    140             m_qtFunctionInvoked(-1) { }
     109            m_objectStar(0),
     110            m_qtFunctionInvoked(-1)
     111    {
     112        m_variantMapValue.insert("a", QVariant(123));
     113        m_variantMapValue.insert("b", QVariant(QLatin1String("foo")));
     114        m_variantMapValue.insert("c", QVariant::fromValue<QObject*>(this));
     115    }
    141116
    142117    ~MyQObject() { }
     
    163138    }
    164139
     140    QVariantMap variantMapProperty() const {
     141        return m_variantMapValue;
     142    }
     143    void setVariantMapProperty(const QVariantMap &value) {
     144        m_variantMapValue = value;
     145    }
     146
    165147    QString stringProperty() const {
    166148        return m_stringValue;
     
    216198    }
    217199
     200    QWebElement webElementProperty() const {
     201        return m_webElement;
     202    }
     203
     204    void setWebElementProperty(const QWebElement& element) {
     205        m_webElement = element;
     206    }
     207
    218208    CustomType propWithCustomType() const {
    219209        return m_customType;
     
    222212        m_customType = c;
    223213    }
     214
     215    QObject* objectStarProperty() const {
     216        return m_objectStar;
     217    }
     218
     219    void setObjectStarProperty(QObject* object) {
     220        m_objectStar = object;
     221    }
     222
    224223
    225224    int qtFunctionInvoked() const {
     
    467466        m_qtFunctionInvoked = 35;
    468467        m_actuals << arg;
     468    }
     469    void myOverloadedSlot(const QWebElement &arg) {
     470        m_qtFunctionInvoked = 36;
     471        m_actuals << QVariant::fromValue<QWebElement>(arg);
    469472    }
    470473
     
    494497    QVariant m_variantValue;
    495498    QVariantList m_variantListValue;
     499    QVariantMap m_variantMapValue;
    496500    QString m_stringValue;
    497501    QStringList m_stringListValue;
     
    502506    int m_readOnlyValue;
    503507    QKeySequence m_shortcut;
     508    QWebElement m_webElement;
    504509    CustomType m_customType;
     510    QObject* m_objectStar;
    505511    int m_qtFunctionInvoked;
    506512    QVariantList m_actuals;
     
    581587    void objectDeleted();
    582588    void typeConversion();
     589    void arrayObjectEnumerable();
    583590    void symmetricUrl();
    584591    void progressSignal();
     
    595602    void ipv6HostEncoding();
    596603    void metaData();
     604#if !defined(Q_WS_MAEMO_5)
     605    // as maemo 5 does not use QComboBoxes to implement the popups
     606    // this test does not make sense for it.
    597607    void popupFocus();
     608#endif
     609    void inputFieldFocus();
    598610    void hitTestContent();
    599611    void jsByteArray();
     
    605617    void render();
    606618    void scrollPosition();
     619    void scrollToAnchor();
     620    void scrollbarsOff();
    607621    void evaluateWillCauseRepaint();
    608622    void qObjectWrapperWithSameIdentity();
     623    void introspectQtMethods_data();
     624    void introspectQtMethods();
    609625
    610626private:
     
    677693    QWebPage* m_page;
    678694    MyQObject* m_myObject;
    679     QWebView* m_popupTestView;
    680     int m_popupTestPaintCount;
     695    QWebView* m_inputFieldsTestView;
     696    int m_inputFieldTestPaintCount;
    681697};
    682698
    683699tst_QWebFrame::tst_QWebFrame()
    684700    : sTrue("true"), sFalse("false"), sUndefined("undefined"), sArray("array"), sFunction("function"), sError("error"),
    685         sString("string"), sObject("object"), sNumber("number"), m_popupTestView(0), m_popupTestPaintCount(0)
     701        sString("string"), sObject("object"), sNumber("number"), m_inputFieldsTestView(0), m_inputFieldTestPaintCount(0)
    686702{
    687703}
     
    693709bool tst_QWebFrame::eventFilter(QObject* watched, QEvent* event)
    694710{
    695     // used on the popupFocus test
    696     if (watched == m_popupTestView) {
     711    // used on the inputFieldFocus test
     712    if (watched == m_inputFieldsTestView) {
    697713        if (event->type() == QEvent::Paint)
    698             m_popupTestPaintCount++;
     714            m_inputFieldTestPaintCount++;
    699715    }
    700716    return QObject::eventFilter(watched, event);
     
    707723    m_myObject = new MyQObject();
    708724    m_page->mainFrame()->addToJavaScriptWindowObject("myObject", m_myObject);
    709     QDir::setCurrent(SRCDIR);
    710725}
    711726
     
    718733void tst_QWebFrame::getSetStaticProperty()
    719734{
     735    m_page->mainFrame()->setHtml("<html><head><body></body></html>");
    720736    QCOMPARE(evalJS("typeof myObject.noSuchProperty"), sUndefined);
    721737
     
    761777    QCOMPARE(evalJS("myObject.variantListProperty[0] === 123"), sTrue);
    762778    QCOMPARE(evalJS("myObject.variantListProperty[1] === 'foo'"), sTrue);
     779
     780    {
     781        QString type;
     782        QVariant ret = evalJSV("myObject.variantMapProperty", type);
     783        QCOMPARE(type, sObject);
     784        QCOMPARE(ret.type(), QVariant::Map);
     785        QVariantMap vm = ret.value<QVariantMap>();
     786        QCOMPARE(vm.size(), 3);
     787        QCOMPARE(vm.value("a").toInt(), 123);
     788        QCOMPARE(vm.value("b").toString(), QLatin1String("foo"));
     789        QCOMPARE(vm.value("c").value<QObject*>(), static_cast<QObject*>(m_myObject));
     790    }
     791    QCOMPARE(evalJS("myObject.variantMapProperty.a === 123"), sTrue);
     792    QCOMPARE(evalJS("myObject.variantMapProperty.b === 'foo'"), sTrue);
     793    QCOMPARE(evalJS("myObject.variantMapProperty.c.variantMapProperty.b === 'foo'"), sTrue);
    763794
    764795    {
     
    857888    QCOMPARE(evalJS("typeof myObject.stringListProperty[2]"), sString);
    858889    QCOMPARE(evalJS("myObject.stringListProperty[2]"), QLatin1String("true"));
     890    evalJS("myObject.webElementProperty=document.body;");
     891    QCOMPARE(evalJS("myObject.webElementProperty.tagName"), QLatin1String("BODY"));
    859892
    860893    // try to delete
     
    893926                    "myObject.readOnlyProperty == 987"), sTrue);
    894927    QCOMPARE(m_myObject->readOnlyProperty(), 987);
     928
     929    // QObject* property
     930    m_myObject->setObjectStarProperty(0);
     931    QCOMPARE(m_myObject->objectStarProperty(), (QObject*)0);
     932    QCOMPARE(evalJS("myObject.objectStarProperty == null"), sTrue);
     933    QCOMPARE(evalJS("typeof myObject.objectStarProperty"), sObject);
     934    QCOMPARE(evalJS("Boolean(myObject.objectStarProperty)"), sFalse);
     935    QCOMPARE(evalJS("String(myObject.objectStarProperty) == 'null'"), sTrue);
     936    QCOMPARE(evalJS("myObject.objectStarProperty.objectStarProperty"),
     937        sUndefined);
     938    m_myObject->setObjectStarProperty(this);
     939    QCOMPARE(evalJS("myObject.objectStarProperty != null"), sTrue);
     940    QCOMPARE(evalJS("typeof myObject.objectStarProperty"), sObject);
     941    QCOMPARE(evalJS("Boolean(myObject.objectStarProperty)"), sTrue);
     942    QCOMPARE(evalJS("String(myObject.objectStarProperty) != 'null'"), sTrue);
    895943}
    896944
     
    19191967    QCOMPARE(m_myObject->qtFunctionInvoked(), 35);
    19201968    */
     1969
     1970    // should pick myOverloadedSlot(QRegExp)
     1971    m_myObject->resetQtFunctionInvoked();
     1972    evalJS("myObject.myOverloadedSlot(document.body)");
     1973    QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=37319", Continue);
     1974    QCOMPARE(m_myObject->qtFunctionInvoked(), 36);
     1975
    19211976    // should pick myOverloadedSlot(QObject*)
    19221977    m_myObject->resetQtFunctionInvoked();
     
    21022157}
    21032158
     2159class StringListTestObject : public QObject {
     2160    Q_OBJECT
     2161public Q_SLOTS:
     2162    QVariant stringList()
     2163    {
     2164        return QStringList() << "Q" << "t";
     2165    };
     2166};
     2167
     2168void tst_QWebFrame::arrayObjectEnumerable()
     2169{
     2170    QWebPage page;
     2171    QWebFrame* frame = page.mainFrame();
     2172    QObject* qobject = new StringListTestObject();
     2173    frame->addToJavaScriptWindowObject("test", qobject, QScriptEngine::ScriptOwnership);
     2174
     2175    const QString script("var stringArray = test.stringList();"
     2176                         "var result = '';"
     2177                         "for (var i in stringArray) {"
     2178                         "    result += stringArray[i];"
     2179                         "}"
     2180                         "result;");
     2181    QCOMPARE(frame->evaluateJavaScript(script).toString(), QString::fromLatin1("Qt"));
     2182}
     2183
    21042184void tst_QWebFrame::symmetricUrl()
    21052185{
     
    22452325    {
    22462326        QString url = request.url().toString();
    2247         if (op == QNetworkAccessManager::GetOperation)
     2327        if (op == QNetworkAccessManager::GetOperation) {
    22482328            if (url == "qrc:/test1.html" ||  url == "http://abcdef.abcdef/")
    22492329                return new FakeReply(request, this);
     
    22562336            }
    22572337#endif
     2338       }
    22582339
    22592340        return QNetworkAccessManager::createRequest(op, request, outgoingData);
     
    22722353
    22732354    frame->setUrl(QUrl("qrc:/test1.html"));
    2274     QTest::qWait(200);
     2355    waitForSignal(frame, SIGNAL(loadFinished(bool)), 200);
    22752356    QCOMPARE(spy.count(), 1);
    22762357    QCOMPARE(frame->requestedUrl(), QUrl("qrc:/test1.html"));
     
    22782359
    22792360    frame->setUrl(QUrl("qrc:/non-existent.html"));
    2280     QTest::qWait(200);
     2361    waitForSignal(frame, SIGNAL(loadFinished(bool)), 200);
    22812362    QCOMPARE(spy.count(), 2);
    22822363    QCOMPARE(frame->requestedUrl(), QUrl("qrc:/non-existent.html"));
     
    22842365
    22852366    frame->setUrl(QUrl("http://abcdef.abcdef"));
    2286     QTest::qWait(200);
     2367    waitForSignal(frame, SIGNAL(loadFinished(bool)), 200);
    22872368    QCOMPARE(spy.count(), 3);
    22882369    QCOMPARE(frame->requestedUrl(), QUrl("http://abcdef.abcdef/"));
     
    22952376    QSignalSpy spy2(page.networkAccessManager(), SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)));
    22962377    frame->setUrl(QUrl("qrc:/fake-ssl-error.html"));
    2297     QTest::qWait(200);
     2378    waitForSignal(frame, SIGNAL(loadFinished(bool)), 200);
    22982379    QCOMPARE(spy2.count(), 1);
    22992380    QCOMPARE(frame->requestedUrl(), QUrl("qrc:/fake-ssl-error.html"));
     
    23532434    QSignalSpy spy(&page, SIGNAL(loadFinished(bool)));
    23542435    frame->setHtml(html);
    2355     QTest::qWait(200);
     2436    waitForSignal(frame, SIGNAL(loadFinished(bool)), 200);
    23562437    QCOMPARE(spy.count(), 1);
    23572438
     
    23722453    // in few seconds, the CSS should be completey loaded
    23732454    frame->setHtml(html2);
    2374     QTest::qWait(200);
     2455    waitForSignal(frame, SIGNAL(loadFinished(bool)), 200);
    23752456    QCOMPARE(spy.size(), 2);
    23762457
     
    23812462void tst_QWebFrame::setHtmlWithBaseURL()
    23822463{
     2464    if (!QDir(TESTS_SOURCE_DIR).exists())
     2465        QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll);
     2466
     2467    QDir::setCurrent(TESTS_SOURCE_DIR);
     2468
    23832469    QString html("<html><body><p>hello world</p><img src='resources/image2.png'/></body></html>");
    23842470
     
    23892475    QSignalSpy spy(&page, SIGNAL(loadFinished(bool)));
    23902476
    2391     frame->setHtml(html, QUrl::fromLocalFile(QDir::currentPath()));
    2392     QTest::qWait(200);
     2477    frame->setHtml(html, QUrl::fromLocalFile(TESTS_SOURCE_DIR));
     2478    waitForSignal(frame, SIGNAL(loadFinished(bool)), 200);
    23932479    QCOMPARE(spy.count(), 1);
    23942480
     
    24972583}
    24982584
     2585#if !defined(Q_WS_MAEMO_5)
    24992586void tst_QWebFrame::popupFocus()
    25002587{
     
    25202607    // open the popup by clicking. check if focus is on the popup
    25212608    QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(25, 25));
    2522     QObject* webpopup = firstChildByClassName(&view, "WebCore::QWebPopup");
     2609    QObject* webpopup = firstChildByClassName(&view, "QComboBox");
    25232610    QComboBox* combo = qobject_cast<QComboBox*>(webpopup);
     2611    QVERIFY(combo != 0);
    25242612    QTRY_VERIFY(!view.hasFocus() && combo->view()->hasFocus()); // Focus should be on the popup
    25252613
     
    25272615    combo->hidePopup();
    25282616    QTRY_VERIFY(view.hasFocus() && !combo->view()->hasFocus()); // Focus should be back on the WebView
    2529 
    2530     // triple the flashing time, should at least blink twice already
    2531     int delay = qApp->cursorFlashTime() * 3;
     2617}
     2618#endif
     2619
     2620void tst_QWebFrame::inputFieldFocus()
     2621{
     2622    QWebView view;
     2623    view.setHtml("<html><body><input type=\"text\"></input></body></html>");
     2624    view.resize(400, 100);
     2625    view.show();
     2626    view.setFocus();
     2627    QTRY_VERIFY(view.hasFocus());
     2628
     2629    // double the flashing time, should at least blink once already
     2630    int delay = qApp->cursorFlashTime() * 2;
    25322631
    25332632    // focus the lineedit and check if it blinks
    2534     QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(200, 25));
    2535     m_popupTestView = &view;
     2633    QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(25, 25));
     2634    m_inputFieldsTestView = &view;
    25362635    view.installEventFilter( this );
    25372636    QTest::qWait(delay);
    2538     QVERIFY2(m_popupTestPaintCount >= 4,
     2637    QVERIFY2(m_inputFieldTestPaintCount >= 3,
    25392638             "The input field should have a blinking caret");
    25402639}
     
    26802779    m_page->mainFrame()->setHtml(html);
    26812780
    2682     QTest::qWait(200);
     2781    waitForSignal(m_page->mainFrame(), SIGNAL(loadFinished(bool)), 200);
    26832782    QCOMPARE(loadSpy.size(), 1);
    26842783
     
    26902789    frame->setHtml(innerHtml);
    26912790
    2692     QTest::qWait(200);
     2791    waitForSignal(frame, SIGNAL(loadFinished(bool)), 200);
    26932792    QCOMPARE(loadSpy.size(), 2);
    26942793
     
    27692868}
    27702869
     2870void tst_QWebFrame::scrollToAnchor()
     2871{
     2872    QWebPage page;
     2873    page.setViewportSize(QSize(480, 800));
     2874    QWebFrame* frame = page.mainFrame();
     2875
     2876    QString html("<html><body><p style=\"margin-bottom: 1500px;\">Hello.</p>"
     2877                 "<p><a id=\"foo\">This</a> is an anchor</p>"
     2878                 "<p style=\"margin-bottom: 1500px;\"><a id=\"bar\">This</a> is another anchor</p>"
     2879                 "</body></html>");
     2880    frame->setHtml(html);
     2881    frame->setScrollPosition(QPoint(0, 0));
     2882    QCOMPARE(frame->scrollPosition().x(), 0);
     2883    QCOMPARE(frame->scrollPosition().y(), 0);
     2884
     2885    QWebElement fooAnchor = frame->findFirstElement("a[id=foo]");
     2886
     2887    frame->scrollToAnchor("foo");
     2888    QCOMPARE(frame->scrollPosition().y(), fooAnchor.geometry().top());
     2889
     2890    frame->scrollToAnchor("bar");
     2891    frame->scrollToAnchor("foo");
     2892    QCOMPARE(frame->scrollPosition().y(), fooAnchor.geometry().top());
     2893
     2894    frame->scrollToAnchor("top");
     2895    QCOMPARE(frame->scrollPosition().y(), 0);
     2896
     2897    frame->scrollToAnchor("bar");
     2898    frame->scrollToAnchor("notexist");
     2899    QVERIFY(frame->scrollPosition().y() != 0);
     2900}
     2901
     2902
     2903void tst_QWebFrame::scrollbarsOff()
     2904{
     2905    QWebView view;
     2906    QWebFrame* mainFrame = view.page()->mainFrame();
     2907
     2908    mainFrame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
     2909    mainFrame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
     2910
     2911    QString html("<script>" \
     2912                 "   function checkScrollbar() {" \
     2913                 "       if (innerWidth === document.documentElement.offsetWidth)" \
     2914                 "           document.getElementById('span1').innerText = 'SUCCESS';" \
     2915                 "       else" \
     2916                 "           document.getElementById('span1').innerText = 'FAIL';" \
     2917                 "   }" \
     2918                 "</script>" \
     2919                 "<body>" \
     2920                 "   <div style='margin-top:1000px ; margin-left:1000px'>" \
     2921                 "       <a id='offscreen' href='a'>End</a>" \
     2922                 "   </div>" \
     2923                 "<span id='span1'></span>" \
     2924                 "</body>");
     2925
     2926
     2927    view.setHtml(html);
     2928    ::waitForSignal(&view, SIGNAL(loadFinished(bool)));
     2929
     2930    mainFrame->evaluateJavaScript("checkScrollbar();");
     2931    QCOMPARE(mainFrame->documentElement().findAll("span").at(0).toPlainText(), QString("SUCCESS"));
     2932}
     2933
    27712934void tst_QWebFrame::evaluateWillCauseRepaint()
    27722935{
     
    27772940    view.show();
    27782941
    2779     QTest::qWait(200);
     2942#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     2943    QTest::qWaitForWindowShown(&view);
     2944#else
     2945    QTest::qWait(2000);
     2946#endif
    27802947
    27812948    view.page()->mainFrame()->evaluateJavaScript(
     
    27832950
    27842951    ::waitForSignal(view.page(), SIGNAL(repaintRequested(QRect)));
    2785 
    2786     QTest::qWait(2000);
    27872952}
    27882953
     
    28252990}
    28262991
     2992void tst_QWebFrame::introspectQtMethods_data()
     2993{
     2994    QTest::addColumn<QString>("objectExpression");
     2995    QTest::addColumn<QString>("methodName");
     2996    QTest::addColumn<QStringList>("expectedPropertyNames");
     2997
     2998    QTest::newRow("myObject.mySignal")
     2999        << "myObject" << "mySignal" << (QStringList() << "connect" << "disconnect" << "length" << "name");
     3000    QTest::newRow("myObject.mySlot")
     3001        << "myObject" << "mySlot" << (QStringList() << "connect" << "disconnect" << "length" << "name");
     3002    QTest::newRow("myObject.myInvokable")
     3003        << "myObject" << "myInvokable" << (QStringList() << "connect" << "disconnect" << "length" << "name");
     3004    QTest::newRow("myObject.mySignal.connect")
     3005        << "myObject.mySignal" << "connect" << (QStringList() << "length" << "name");
     3006    QTest::newRow("myObject.mySignal.disconnect")
     3007        << "myObject.mySignal" << "disconnect" << (QStringList() << "length" << "name");
     3008}
     3009
     3010void tst_QWebFrame::introspectQtMethods()
     3011{
     3012    QFETCH(QString, objectExpression);
     3013    QFETCH(QString, methodName);
     3014    QFETCH(QStringList, expectedPropertyNames);
     3015
     3016    QString methodLookup = QString::fromLatin1("%0['%1']").arg(objectExpression).arg(methodName);
     3017    QCOMPARE(evalJSV(QString::fromLatin1("Object.getOwnPropertyNames(%0).sort()").arg(methodLookup)).toStringList(), expectedPropertyNames);
     3018
     3019    for (int i = 0; i < expectedPropertyNames.size(); ++i) {
     3020        QString name = expectedPropertyNames.at(i);
     3021        QCOMPARE(evalJS(QString::fromLatin1("%0.hasOwnProperty('%1')").arg(methodLookup).arg(name)), sTrue);
     3022        evalJS(QString::fromLatin1("var descriptor = Object.getOwnPropertyDescriptor(%0, '%1')").arg(methodLookup).arg(name));
     3023        QCOMPARE(evalJS("typeof descriptor"), QString::fromLatin1("object"));
     3024        QCOMPARE(evalJS("descriptor.get"), sUndefined);
     3025        QCOMPARE(evalJS("descriptor.set"), sUndefined);
     3026        QCOMPARE(evalJS(QString::fromLatin1("descriptor.value === %0['%1']").arg(methodLookup).arg(name)), sTrue);
     3027        QCOMPARE(evalJS(QString::fromLatin1("descriptor.enumerable")), sFalse);
     3028        QCOMPARE(evalJS(QString::fromLatin1("descriptor.configurable")), sFalse);
     3029    }
     3030
     3031    QVERIFY(evalJSV("var props=[]; for (var p in myObject.deleteLater) {props.push(p);}; props.sort()").toStringList().isEmpty());
     3032}
     3033
    28273034QTEST_MAIN(tst_QWebFrame)
    28283035#include "tst_qwebframe.moc"
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/qwebhistory.pro

    r561 r846  
    1 TEMPLATE = app
    2 TARGET = tst_qwebhistory
    3 include(../../../../WebKit.pri)
    4 SOURCES  += tst_qwebhistory.cpp
    5 RESOURCES  += tst_qwebhistory.qrc
    6 QT += testlib network
    7 QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
    8 
    9 symbian {
    10     TARGET.UID3 = 0xA000E53B
    11     TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
    12 }
     1isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
     2include(../tests.pri)
     3exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp

    r561 r846  
    3838    void loadPage(int nr)
    3939    {
    40         frame->load(QUrl("qrc:/data/page" + QString::number(nr) + ".html"));
     40        frame->load(QUrl("qrc:/resources/page" + QString::number(nr) + ".html"));
    4141        waitForLoadFinished.exec();
    4242    }
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/tst_qwebhistory.qrc

    r561 r846  
    11<!DOCTYPE RCC><RCC version="1.0">
    22<qresource>
    3     <file>data/page1.html</file>
    4     <file>data/page2.html</file>   
    5     <file>data/page3.html</file>
    6     <file>data/page4.html</file>
    7     <file>data/page5.html</file>
    8     <file>data/page6.html</file>
     3    <file>resources/page1.html</file>
     4    <file>resources/page2.html</file>   
     5    <file>resources/page3.html</file>
     6    <file>resources/page4.html</file>
     7    <file>resources/page5.html</file>
     8    <file>resources/page6.html</file>
    99</qresource>
    1010</RCC>
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro

    r561 r846  
    1 TEMPLATE = app
    2 TARGET = tst_qwebhistoryinterface
    3 include(../../../../WebKit.pri)
    4 SOURCES  += tst_qwebhistoryinterface.cpp
    5 QT += testlib network
    6 QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
    7 
    8 symbian {
    9     TARGET.UID3 = 0xA000E53C
    10     TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
    11 }
     1isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
     2include(../tests.pri)
     3exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro

    r561 r846  
    1 TEMPLATE = app
    2 TARGET = tst_qwebpage
    3 include(../../../../WebKit.pri)
    4 SOURCES  += tst_qwebpage.cpp
    5 RESOURCES  += tst_qwebpage.qrc
    6 QT += testlib network
    7 QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
    8 !symbian:DEFINES += SRCDIR=\\\"$$PWD/\\\"
    9 
    10 symbian {
    11     TARGET.UID3 = 0xA000E53E
    12     TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
    13 }
     1isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
     2include(../tests.pri)
     3exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp

    r769 r846  
    2020*/
    2121
    22 
     22#include "../util.h"
     23#include <QDir>
     24#include <QGraphicsWidget>
     25#include <QLineEdit>
     26#include <QLocale>
     27#include <QMenu>
     28#include <QPushButton>
     29#include <QStyle>
    2330#include <QtTest/QtTest>
    24 
     31#include <QTextCharFormat>
    2532#include <qgraphicsscene.h>
    2633#include <qgraphicsview.h>
    2734#include <qgraphicswebview.h>
     35#include <qnetworkrequest.h>
     36#include <qwebdatabase.h>
    2837#include <qwebelement.h>
    29 #include <qwebpage.h>
    30 #include <qwidget.h>
    31 #include <QGraphicsWidget>
    32 #include <qwebview.h>
    3338#include <qwebframe.h>
    3439#include <qwebhistory.h>
    35 #include <qnetworkrequest.h>
    36 #include <QDebug>
    37 #include <QLineEdit>
    38 #include <QMenu>
     40#include <qwebpage.h>
    3941#include <qwebsecurityorigin.h>
    40 #include <qwebdatabase.h>
    41 #include <QPushButton>
    42 #include <QDir>
    43 
    44 #if defined(Q_OS_SYMBIAN)
    45 # define SRCDIR ""
    46 #endif
    47 
    48 // Will try to wait for the condition while allowing event processing
    49 #define QTRY_COMPARE(__expr, __expected) \
    50     do { \
    51         const int __step = 50; \
    52         const int __timeout = 5000; \
    53         if ((__expr) != (__expected)) { \
    54             QTest::qWait(0); \
    55         } \
    56         for (int __i = 0; __i < __timeout && ((__expr) != (__expected)); __i+=__step) { \
    57             QTest::qWait(__step); \
    58         } \
    59         QCOMPARE(__expr, __expected); \
    60     } while(0)
    61 
    62 //TESTED_CLASS=
    63 //TESTED_FILES=
    64 
    65 // Task 160192
    66 /**
    67  * Starts an event loop that runs until the given signal is received.
    68  Optionally the event loop
    69  * can return earlier on a timeout.
    70  *
    71  * \return \p true if the requested signal was received
    72  *         \p false on timeout
    73  */
    74 static bool waitForSignal(QObject* obj, const char* signal, int timeout = 10000)
    75 {
    76     QEventLoop loop;
    77     QObject::connect(obj, signal, &loop, SLOT(quit()));
    78     QTimer timer;
    79     QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));
    80     if (timeout > 0) {
    81         QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
    82         timer.setSingleShot(true);
    83         timer.start(timeout);
    84     }
    85     loop.exec();
    86     return timeoutSpy.isEmpty();
    87 }
     42#include <qwebview.h>
    8843
    8944class EventSpy : public QObject, public QList<QEvent::Type>
     
    12883    void contextMenuCrash();
    12984    void database();
    130     void createPlugin();
     85    void createPluginWithPluginsEnabled();
     86    void createPluginWithPluginsDisabled();
    13187    void destroyPlugin_data();
    13288    void destroyPlugin();
     
    147103    void inputMethods_data();
    148104    void inputMethods();
     105    void inputMethodsTextFormat_data();
     106    void inputMethodsTextFormat();
    149107    void defaultTextEncoding();
    150108    void errorPageExtension();
     109    void errorPageExtensionInIFrames();
     110    void errorPageExtensionInFrameset();
     111    void userAgentApplicationName();
     112    void userAgentLocaleChange();
     113
     114    void viewModes();
    151115
    152116    void crashTests_LazyInitializationOfMainFrame();
     
    157121    void originatingObjectInNetworkRequests();
    158122    void testJSPrompt();
    159 
     123    void showModalDialog();
     124    void testStopScheduledPageRefresh();
     125    void findText();
     126   
    160127private:
    161128    QWebView* m_view;
     
    253220void tst_QWebPage::infiniteLoopJS()
    254221{
     222#ifdef Q_WS_MAEMO_5
     223    QSKIP("Test never terminates on Maemo 5 : https://bugs.webkit.org/show_bug.cgi?id=38538", SkipAll);
     224#endif
    255225    JSTestPage* newPage = new JSTestPage(m_view);
    256226    m_view->setPage(newPage);
     
    271241    QTRY_COMPARE(spyLoadFinished.count(), 1);
    272242
    273     QTest::qWait(3000);
    274 
    275     QVERIFY(spyLoadStarted.count() > 1);
    276     QVERIFY(spyLoadFinished.count() > 1);
     243    QTRY_VERIFY(spyLoadStarted.count() > 1);
     244    QTRY_VERIFY(spyLoadFinished.count() > 1);
    277245
    278246    spyLoadFinished.clear();
     
    396364    QVERIFY(networkManager->requestedUrls.count() >= 1);
    397365    QCOMPARE(networkManager->requestedUrls.at(0), QUrl("http://does.not/exist.png"));
     366}
     367
     368void tst_QWebPage::viewModes()
     369{
     370    m_view->setHtml("<body></body>");
     371    m_page->setProperty("_q_viewMode", "minimized");
     372
     373    QVariant empty = m_page->mainFrame()->evaluateJavaScript("window.styleMedia.matchMedium(\"(-webkit-view-mode)\")");
     374    QVERIFY(empty.type() == QVariant::Bool && empty.toBool());
     375
     376    QVariant minimized = m_page->mainFrame()->evaluateJavaScript("window.styleMedia.matchMedium(\"(-webkit-view-mode: minimized)\")");
     377    QVERIFY(minimized.type() == QVariant::Bool && minimized.toBool());
     378
     379    QVariant maximized = m_page->mainFrame()->evaluateJavaScript("window.styleMedia.matchMedium(\"(-webkit-view-mode: maximized)\")");
     380    QVERIFY(maximized.type() == QVariant::Bool && !maximized.toBool());
    398381}
    399382
     
    521504    QWebDatabase::removeAllDatabases();
    522505    QVERIFY(!origin.databases().size());
    523     QTest::qWait(1000);
    524506}
    525507
     
    564546};
    565547
    566 void tst_QWebPage::createPlugin()
    567 {
    568     QSignalSpy loadSpy(m_view, SIGNAL(loadFinished(bool)));
    569 
    570     PluginPage* newPage = new PluginPage(m_view);
    571     m_view->setPage(newPage);
    572 
    573     // plugins not enabled by default, so the plugin shouldn't be loaded
    574     m_view->setHtml(QString("<html><body><object type='application/x-qt-plugin' classid='pushbutton' id='mybutton'/></body></html>"));
     548static void createPlugin(QWebView *view)
     549{
     550    QSignalSpy loadSpy(view, SIGNAL(loadFinished(bool)));
     551
     552    PluginPage* newPage = new PluginPage(view);
     553    view->setPage(newPage);
     554
     555    // type has to be application/x-qt-plugin
     556    view->setHtml(QString("<html><body><object type='application/x-foobarbaz' classid='pushbutton' id='mybutton'/></body></html>"));
    575557    QTRY_COMPARE(loadSpy.count(), 1);
    576558    QCOMPARE(newPage->calls.count(), 0);
    577559
    578     m_view->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
    579 
    580     // type has to be application/x-qt-plugin
    581     m_view->setHtml(QString("<html><body><object type='application/x-foobarbaz' classid='pushbutton' id='mybutton'/></body></html>"));
     560    view->setHtml(QString("<html><body><object type='application/x-qt-plugin' classid='pushbutton' id='mybutton'/></body></html>"));
    582561    QTRY_COMPARE(loadSpy.count(), 2);
    583     QCOMPARE(newPage->calls.count(), 0);
    584 
    585     m_view->setHtml(QString("<html><body><object type='application/x-qt-plugin' classid='pushbutton' id='mybutton'/></body></html>"));
    586     QTRY_COMPARE(loadSpy.count(), 3);
    587562    QCOMPARE(newPage->calls.count(), 1);
    588563    {
     
    615590             QString::fromLatin1("function clicked() {\n    [native code]\n}"));
    616591
    617     m_view->setHtml(QString("<html><body><table>"
     592    view->setHtml(QString("<html><body><table>"
    618593                            "<tr><object type='application/x-qt-plugin' classid='lineedit' id='myedit'/></tr>"
    619594                            "<tr><object type='application/x-qt-plugin' classid='pushbutton' id='mybutton'/></tr>"
    620595                            "</table></body></html>"), QUrl("http://foo.bar.baz"));
    621     QTRY_COMPARE(loadSpy.count(), 4);
     596    QTRY_COMPARE(loadSpy.count(), 3);
    622597    QCOMPARE(newPage->calls.count(), 2);
    623598    {
     
    651626        QVERIFY(ci.returnValue->inherits("QPushButton"));
    652627    }
    653 
     628}
     629
     630void tst_QWebPage::createPluginWithPluginsEnabled()
     631{
     632    m_view->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
     633    createPlugin(m_view);
     634}
     635
     636void tst_QWebPage::createPluginWithPluginsDisabled()
     637{
     638    // Qt Plugins should be loaded by QtWebKit even when PluginsEnabled is
     639    // false. The client decides whether a Qt plugin is enabled or not when
     640    // it decides whether or not to instantiate it.
    654641    m_view->settings()->setAttribute(QWebSettings::PluginsEnabled, false);
    655 
    656     m_view->setHtml(QString("<html><body><object type='application/x-qt-plugin' classid='pushbutton' id='mybutton'/></body></html>"));
    657     QTRY_COMPARE(loadSpy.count(), 5);
    658     QCOMPARE(newPage->calls.count(), 0);
    659 }
    660 
     642    createPlugin(m_view);
     643}
    661644
    662645// Standard base class for template PluginTracerPage. In tests it is used as interface.
     
    12761259    QVERIFY(!action->isEnabled());
    12771260    QSignalSpy loadSpy(page, SIGNAL(loadFinished(bool)));
    1278     QUrl url = QUrl("qrc:///frametest/index.html");
     1261    QUrl url = QUrl("qrc:///resources/index.html");
    12791262    page->mainFrame()->load(url);
    12801263    QTRY_COMPARE(loadSpy.count(), 1);
     
    13071290    QWebPage* webPage = webView.page();
    13081291    QSignalSpy loadSpy(webPage, SIGNAL(loadFinished(bool)));
    1309     QUrl url = QUrl("qrc:///frametest/iframe.html");
     1292    QUrl url = QUrl("qrc:///resources/iframe.html");
    13101293    webPage->mainFrame()->load(url);
    13111294    QTRY_COMPARE(loadSpy.count(), 1);
     
    13911374
    13921375#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
    1393     QVERIFY(!viewEventSpy.contains(QEvent::RequestSoftwareInputPanel));
     1376    // This part of the test checks if the SIP (Software Input Panel) is triggered,
     1377    // which normally happens on mobile platforms, when a user input form receives
     1378    // a mouse click.
     1379    int  inputPanel = 0;
     1380    if (viewType == "QWebView") {
     1381        if (QWebView* wv = qobject_cast<QWebView*>(view))
     1382            inputPanel = wv->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel);
     1383    } else if (viewType == "QGraphicsWebView") {
     1384        if (QGraphicsWebView* wv = qobject_cast<QGraphicsWebView*>(view))
     1385            inputPanel = wv->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel);
     1386    }
     1387
     1388    // For non-mobile platforms RequestSoftwareInputPanel event is not called
     1389    // because there is no SIP (Software Input Panel) triggered. In the case of a
     1390    // mobile platform, an input panel, e.g. virtual keyboard, is usually invoked
     1391    // and the RequestSoftwareInputPanel event is called. For these two situations
     1392    // this part of the test can verified as the checks below.
     1393    if (inputPanel)
     1394        QVERIFY(viewEventSpy.contains(QEvent::RequestSoftwareInputPanel));
     1395    else
     1396        QVERIFY(!viewEventSpy.contains(QEvent::RequestSoftwareInputPanel));
    13941397#endif
    13951398    viewEventSpy.clear();
     
    14531456    QCOMPARE(selectionValue, QString("eb"));
    14541457
     1458    //Cancel current composition first
     1459    inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 0, 0, QVariant());
     1460    QInputMethodEvent eventSelection2("",inputAttributes);
     1461    page->event(&eventSelection2);
     1462
    14551463    //Set selection with negative length
    14561464    inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 6, -5, QVariant());
    1457     QInputMethodEvent eventSelection2("",inputAttributes);
    1458     page->event(&eventSelection2);
     1465    QInputMethodEvent eventSelection3("",inputAttributes);
     1466    page->event(&eventSelection3);
    14591467
    14601468    //ImAnchorPosition
     
    14951503#endif
    14961504
     1505    {
     1506        QList<QInputMethodEvent::Attribute> attributes;
     1507        QInputMethodEvent event(QString(), attributes);
     1508        event.setCommitString("XXX", 0, 0);
     1509        page->event(&event);
     1510        event.setCommitString(QString(), -2, 2); // Erase two characters.
     1511        page->event(&event);
     1512        event.setCommitString(QString(), -1, 1); // Erase one character.
     1513        page->event(&event);
     1514        variant = page->inputMethodQuery(Qt::ImSurroundingText);
     1515        value = variant.value<QString>();
     1516        QCOMPARE(value, QString("QtWebKit"));
     1517    }
     1518
     1519    // Cancel current composition first
     1520    inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 0, 0, QVariant());
     1521    QInputMethodEvent eventSelection4("", inputAttributes);
     1522    page->event(&eventSelection4);
     1523
     1524    // START - Tests for Selection when the Editor is NOT in Composition mode
     1525
     1526    // LEFT to RIGHT selection
     1527    // Deselect the selection by sending MouseButtonPress events
     1528    // This moves the current cursor to the end of the text
     1529    page->event(&evpres);
     1530    page->event(&evrel);
     1531
     1532    //Move to the start of the line
     1533    page->triggerAction(QWebPage::MoveToStartOfLine);
     1534
     1535    QKeyEvent keyRightEventPress(QEvent::KeyPress, Qt::Key_Right, Qt::NoModifier);
     1536    QKeyEvent keyRightEventRelease(QEvent::KeyRelease, Qt::Key_Right, Qt::NoModifier);
     1537
     1538    //Move 2 characters RIGHT
     1539    for (int j = 0; j < 2; ++j) {
     1540        page->event(&keyRightEventPress);
     1541        page->event(&keyRightEventRelease);
     1542    }
     1543
     1544    //Select to the end of the line
     1545    page->triggerAction(QWebPage::SelectEndOfLine);
     1546
     1547    //ImAnchorPosition QtWebKit
     1548    variant = page->inputMethodQuery(Qt::ImAnchorPosition);
     1549    anchorPosition =  variant.toInt();
     1550    QCOMPARE(anchorPosition, 2);
     1551
     1552    //ImCursorPosition
     1553    variant = page->inputMethodQuery(Qt::ImCursorPosition);
     1554    cursorPosition =  variant.toInt();
     1555    QCOMPARE(cursorPosition, 8);
     1556
     1557    //ImCurrentSelection
     1558    variant = page->inputMethodQuery(Qt::ImCurrentSelection);
     1559    selectionValue = variant.value<QString>();
     1560    QCOMPARE(selectionValue, QString("WebKit"));
     1561
     1562    //RIGHT to LEFT selection
     1563    //Deselect the selection (this moves the current cursor to the end of the text)
     1564    page->event(&evpres);
     1565    page->event(&evrel);
     1566
     1567    //ImAnchorPosition
     1568    variant = page->inputMethodQuery(Qt::ImAnchorPosition);
     1569    anchorPosition =  variant.toInt();
     1570    QCOMPARE(anchorPosition, 8);
     1571
     1572    //ImCursorPosition
     1573    variant = page->inputMethodQuery(Qt::ImCursorPosition);
     1574    cursorPosition =  variant.toInt();
     1575    QCOMPARE(cursorPosition, 8);
     1576
     1577    //ImCurrentSelection
     1578    variant = page->inputMethodQuery(Qt::ImCurrentSelection);
     1579    selectionValue = variant.value<QString>();
     1580    QCOMPARE(selectionValue, QString(""));
     1581
     1582    QKeyEvent keyLeftEventPress(QEvent::KeyPress, Qt::Key_Left, Qt::NoModifier);
     1583    QKeyEvent keyLeftEventRelease(QEvent::KeyRelease, Qt::Key_Left, Qt::NoModifier);
     1584
     1585    //Move 2 characters LEFT
     1586    for (int i = 0; i < 2; ++i) {
     1587        page->event(&keyLeftEventPress);
     1588        page->event(&keyLeftEventRelease);
     1589    }
     1590
     1591    //Select to the start of the line
     1592    page->triggerAction(QWebPage::SelectStartOfLine);
     1593
     1594    //ImAnchorPosition
     1595    variant = page->inputMethodQuery(Qt::ImAnchorPosition);
     1596    anchorPosition =  variant.toInt();
     1597    QCOMPARE(anchorPosition, 6);
     1598
     1599    //ImCursorPosition
     1600    variant = page->inputMethodQuery(Qt::ImCursorPosition);
     1601    cursorPosition =  variant.toInt();
     1602    QCOMPARE(cursorPosition, 0);
     1603
     1604    //ImCurrentSelection
     1605    variant = page->inputMethodQuery(Qt::ImCurrentSelection);
     1606    selectionValue = variant.value<QString>();
     1607    QCOMPARE(selectionValue, QString("QtWebK"));
     1608
     1609    //END - Tests for Selection when the Editor is not in Composition mode
     1610
    14971611    //ImhHiddenText
    14981612    QMouseEvent evpresPassword(QEvent::MouseButtonPress, inputs.at(1).geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier);
     
    15281642}
    15291643
     1644void tst_QWebPage::inputMethodsTextFormat_data()
     1645{
     1646    QTest::addColumn<QString>("string");
     1647    QTest::addColumn<int>("start");
     1648    QTest::addColumn<int>("length");
     1649
     1650    QTest::newRow("") << QString("") << 0 << 0;
     1651    QTest::newRow("Q") << QString("Q") << 0 << 1;
     1652    QTest::newRow("Qt") << QString("Qt") << 0 << 1;
     1653    QTest::newRow("Qt") << QString("Qt") << 0 << 2;
     1654    QTest::newRow("Qt") << QString("Qt") << 1 << 1;
     1655    QTest::newRow("Qt ") << QString("Qt ") << 0 << 1;
     1656    QTest::newRow("Qt ") << QString("Qt ") << 1 << 1;
     1657    QTest::newRow("Qt ") << QString("Qt ") << 2 << 1;
     1658    QTest::newRow("Qt ") << QString("Qt ") << 2 << -1;
     1659    QTest::newRow("Qt ") << QString("Qt ") << -2 << 3;
     1660    QTest::newRow("Qt ") << QString("Qt ") << 0 << 3;
     1661    QTest::newRow("Qt by") << QString("Qt by") << 0 << 1;
     1662    QTest::newRow("Qt by Nokia") << QString("Qt by Nokia") << 0 << 1;
     1663}
     1664
     1665
     1666void tst_QWebPage::inputMethodsTextFormat()
     1667{
     1668    QWebPage* page = new QWebPage;
     1669    QWebView* view = new QWebView;
     1670    view->setPage(page);
     1671    page->settings()->setFontFamily(QWebSettings::SerifFont, "FooSerifFont");
     1672    page->mainFrame()->setHtml("<html><body>" \
     1673                                            "<input type='text' id='input1' style='font-family: serif' value='' maxlength='20'/>");
     1674    page->mainFrame()->evaluateJavaScript("document.getElementById('input1').focus()");
     1675    page->mainFrame()->setFocus();
     1676    view->show();
     1677
     1678    QFETCH(QString, string);
     1679    QFETCH(int, start);
     1680    QFETCH(int, length);
     1681
     1682    QList<QInputMethodEvent::Attribute> attrs;
     1683    QTextCharFormat format;
     1684    format.setUnderlineStyle(QTextCharFormat::SingleUnderline);
     1685    format.setUnderlineColor(Qt::red);
     1686    attrs.append(QInputMethodEvent::Attribute(QInputMethodEvent::TextFormat, start, length, format));
     1687    QInputMethodEvent im(string, attrs);
     1688    page->event(&im);
     1689
     1690    QTest::qWait(1000);
     1691
     1692    delete view;
     1693}
    15301694// import a little DRT helper function to trigger the garbage collector
    15311695void QWEBKIT_EXPORT qt_drt_garbageCollector_collect();
     
    15561720{
    15571721    int i = QWebSecurityOrigin::localSchemes().size();
     1722
    15581723    QWebSecurityOrigin::removeLocalScheme("file");
    15591724    QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i);
    15601725    QWebSecurityOrigin::addLocalScheme("file");
    15611726    QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i);
     1727
     1728    QWebSecurityOrigin::removeLocalScheme("qrc");
     1729    QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i - 1);
     1730    QWebSecurityOrigin::addLocalScheme("qrc");
     1731    QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i);
     1732
    15621733    QString myscheme = "myscheme";
    15631734    QWebSecurityOrigin::addLocalScheme(myscheme);
     
    16141785    QWebSettings::enablePersistentStorage();
    16151786
    1616     // Give it some time to initialize - icon database needs it
    1617     QTest::qWait(1000);
    1618 
    1619     QCOMPARE(webPage.settings()->testAttribute(QWebSettings::LocalStorageEnabled), true);
    1620     QCOMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineStorageDatabaseEnabled), true);
    1621     QCOMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineWebApplicationCacheEnabled), true);
    1622 
    1623     QVERIFY(!webPage.settings()->offlineStoragePath().isEmpty());
    1624     QVERIFY(!webPage.settings()->offlineWebApplicationCachePath().isEmpty());
    1625     QVERIFY(!webPage.settings()->iconDatabasePath().isEmpty());
     1787
     1788    QTRY_COMPARE(webPage.settings()->testAttribute(QWebSettings::LocalStorageEnabled), true);
     1789    QTRY_COMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineStorageDatabaseEnabled), true);
     1790    QTRY_COMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineWebApplicationCacheEnabled), true);
     1791
     1792    QTRY_VERIFY(!webPage.settings()->offlineStoragePath().isEmpty());
     1793    QTRY_VERIFY(!webPage.settings()->offlineWebApplicationCachePath().isEmpty());
     1794    QTRY_VERIFY(!webPage.settings()->iconDatabasePath().isEmpty());
    16261795}
    16271796
     
    16651834    virtual bool extension(Extension, const ExtensionOption* option, ExtensionReturn* output)
    16661835    {
    1667         const ErrorPageExtensionOption* info = static_cast<const ErrorPageExtensionOption*>(option);
    16681836        ErrorPageExtensionReturn* errorPage = static_cast<ErrorPageExtensionReturn*>(output);
    16691837
    1670         if (info->frame == mainFrame()) {
    1671             errorPage->content = "data:text/html,error";
    1672             return true;
    1673         }
    1674 
    1675         return false;
     1838        errorPage->content = "data:text/html,error";
     1839        return true;
    16761840    }
    16771841};
     
    16841848    QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool)));
    16851849
    1686     page->mainFrame()->load(QUrl("qrc:///frametest/index.html"));
     1850    m_view->setUrl(QUrl("data:text/html,foo"));
    16871851    QTRY_COMPARE(spyLoadFinished.count(), 1);
    16881852
    16891853    page->mainFrame()->setUrl(QUrl("http://non.existent/url"));
    1690     QTest::qWait(2000);
    16911854    QTRY_COMPARE(spyLoadFinished.count(), 2);
    16921855    QCOMPARE(page->mainFrame()->toPlainText(), QString("data:text/html,error"));
     
    16971860
    16981861    page->triggerAction(QWebPage::Back);
    1699     QTest::qWait(2000);
    1700     QCOMPARE(page->history()->canGoBack(), false);
    1701     QCOMPARE(page->history()->canGoForward(), true);
     1862    QTRY_COMPARE(page->history()->canGoBack(), false);
     1863    QTRY_COMPARE(page->history()->canGoForward(), true);
    17021864
    17031865    page->triggerAction(QWebPage::Forward);
    1704     QTest::qWait(2000);
    1705     QCOMPARE(page->history()->canGoBack(), true);
    1706     QCOMPARE(page->history()->canGoForward(), false);
     1866    QTRY_COMPARE(page->history()->canGoBack(), true);
     1867    QTRY_COMPARE(page->history()->canGoForward(), false);
    17071868
    17081869    page->triggerAction(QWebPage::Back);
    1709     QTest::qWait(2000);
    1710     QCOMPARE(page->history()->canGoBack(), false);
    1711     QCOMPARE(page->history()->canGoForward(), true);
    1712     QCOMPARE(page->history()->currentItem().url(), QUrl("qrc:///frametest/index.html"));
     1870    QTRY_COMPARE(page->history()->canGoBack(), false);
     1871    QTRY_COMPARE(page->history()->canGoForward(), true);
     1872    QTRY_COMPARE(page->history()->currentItem().url(), QUrl("data:text/html,foo"));
    17131873
    17141874    m_view->setPage(0);
     1875}
     1876
     1877void tst_QWebPage::errorPageExtensionInIFrames()
     1878{
     1879    ErrorPage* page = new ErrorPage;
     1880    m_view->setPage(page);
     1881
     1882    m_view->setHtml(QString("data:text/html,"
     1883                            "<h1>h1</h1>"
     1884                            "<iframe src='data:text/html,<p/>p'></iframe>"
     1885                            "<iframe src='non-existent.html'></iframe>"));
     1886    QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool)));
     1887    QTRY_COMPARE(spyLoadFinished.count(), 1);
     1888
     1889    QCOMPARE(page->mainFrame()->childFrames()[1]->toPlainText(), QString("data:text/html,error"));
     1890
     1891    m_view->setPage(0);
     1892}
     1893
     1894void tst_QWebPage::errorPageExtensionInFrameset()
     1895{
     1896    ErrorPage* page = new ErrorPage;
     1897    m_view->setPage(page);
     1898
     1899    m_view->load(QUrl("qrc:///resources/index.html"));
     1900
     1901    QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool)));
     1902    QTRY_COMPARE(spyLoadFinished.count(), 1);
     1903    QCOMPARE(page->mainFrame()->childFrames()[1]->toPlainText(), QString("data:text/html,error"));
     1904
     1905    m_view->setPage(0);
     1906}
     1907
     1908class FriendlyWebPage : public QWebPage
     1909{
     1910public:
     1911    friend class tst_QWebPage;
     1912};
     1913
     1914void tst_QWebPage::userAgentApplicationName()
     1915{
     1916    const QString oldApplicationName = QCoreApplication::applicationName();
     1917    FriendlyWebPage page;
     1918
     1919    const QString applicationNameMarker = QString::fromUtf8("StrangeName\342\210\236");
     1920    QCoreApplication::setApplicationName(applicationNameMarker);
     1921    QVERIFY(page.userAgentForUrl(QUrl()).contains(applicationNameMarker));
     1922
     1923    QCoreApplication::setApplicationName(oldApplicationName);
     1924}
     1925
     1926void tst_QWebPage::userAgentLocaleChange()
     1927{
     1928    FriendlyWebPage page;
     1929    m_view->setPage(&page);
     1930
     1931    const QString markerString = QString::fromLatin1(" nn-NO)");
     1932
     1933    if (page.userAgentForUrl(QUrl()).contains(markerString))
     1934        QSKIP("marker string already present", SkipSingle);
     1935
     1936    m_view->setLocale(QLocale(QString::fromLatin1("nn_NO")));
     1937    QVERIFY(page.userAgentForUrl(QUrl()).contains(markerString));
    17151938}
    17161939
     
    17551978void tst_QWebPage::screenshot()
    17561979{
    1757     QDir::setCurrent(SRCDIR);
     1980    if (!QDir(TESTS_SOURCE_DIR).exists())
     1981        QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll);
     1982
     1983    QDir::setCurrent(TESTS_SOURCE_DIR);
    17581984
    17591985    QFETCH(QString, html);
     
    17611987    page->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
    17621988    QWebFrame* mainFrame = page->mainFrame();
    1763     mainFrame->setHtml(html, QUrl::fromLocalFile(QDir::currentPath()));
    1764     if (html.contains("</embed>")) {
    1765         // some reasonable time for the PluginStream to feed test.swf to flash and start painting
    1766         QTest::qWait(2000);
    1767     }
     1989    mainFrame->setHtml(html, QUrl::fromLocalFile(TESTS_SOURCE_DIR));
     1990    ::waitForSignal(mainFrame, SIGNAL(loadFinished(bool)), 2000);
    17681991
    17691992    // take screenshot without a view
     
    18712094}
    18722095
     2096class TestModalPage : public QWebPage
     2097{
     2098    Q_OBJECT
     2099public:
     2100    TestModalPage(QObject* parent = 0) : QWebPage(parent) {
     2101    }
     2102    virtual QWebPage* createWindow(WebWindowType) {
     2103        QWebPage* page = new TestModalPage();
     2104        connect(page, SIGNAL(windowCloseRequested()), page, SLOT(deleteLater()));
     2105        return page;
     2106    }
     2107};
     2108
     2109void tst_QWebPage::showModalDialog()
     2110{
     2111    TestModalPage page;
     2112    page.mainFrame()->setHtml(QString("<html></html>"));
     2113    QString res = page.mainFrame()->evaluateJavaScript("window.showModalDialog('javascript:window.returnValue=dialogArguments; window.close();', 'This is a test');").toString();
     2114    QCOMPARE(res, QString("This is a test"));
     2115}
     2116
     2117void tst_QWebPage::testStopScheduledPageRefresh()
     2118{   
     2119    // Without QWebPage::StopScheduledPageRefresh
     2120    QWebPage page1;
     2121    page1.setNetworkAccessManager(new TestNetworkManager(&page1));
     2122    page1.mainFrame()->setHtml("<html><head>"
     2123                                "<meta http-equiv=\"refresh\"content=\"0;URL=http://qt.nokia.com/favicon.ico\">"
     2124                                "</head><body><h1>Page redirects immediately...</h1>"
     2125                                "</body></html>");
     2126    QVERIFY(::waitForSignal(&page1, SIGNAL(loadFinished(bool))));
     2127    QTest::qWait(500);
     2128    QCOMPARE(page1.mainFrame()->url().toString(), QString("http://qt.nokia.com/favicon.ico"));
     2129   
     2130    // With QWebPage::StopScheduledPageRefresh
     2131    QWebPage page2;
     2132    page2.setNetworkAccessManager(new TestNetworkManager(&page2));
     2133    page2.mainFrame()->setHtml("<html><head>"
     2134                               "<meta http-equiv=\"refresh\"content=\"1;URL=http://qt.nokia.com/favicon.ico\">"
     2135                               "</head><body><h1>Page redirect test with 1 sec timeout...</h1>"
     2136                               "</body></html>");
     2137    page2.triggerAction(QWebPage::StopScheduledPageRefresh);
     2138    QTest::qWait(1500);
     2139    QCOMPARE(page2.mainFrame()->url().toString(), QString("about:blank"));
     2140}
     2141
     2142void tst_QWebPage::findText()
     2143{
     2144    m_view->setHtml(QString("<html><head></head><body><div>foo bar</div></body></html>"));
     2145    m_page->triggerAction(QWebPage::SelectAll);
     2146    QVERIFY(!m_page->selectedText().isEmpty());
     2147    m_page->findText("");
     2148    QVERIFY(m_page->selectedText().isEmpty());
     2149    QStringList words = (QStringList() << "foo" << "bar");
     2150    foreach (QString subString, words) {
     2151        m_page->findText(subString, QWebPage::FindWrapsAroundDocument);
     2152        QCOMPARE(m_page->selectedText(), subString);
     2153        m_page->findText("");
     2154        QVERIFY(m_page->selectedText().isEmpty());
     2155    }
     2156}
     2157
    18732158QTEST_MAIN(tst_QWebPage)
    18742159#include "tst_qwebpage.moc"
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc

    r561 r846  
    11<!DOCTYPE RCC><RCC version="1.0">
    22<qresource>
    3     <file>frametest/index.html</file>
    4     <file>frametest/frame_a.html</file>
    5     <file>frametest/iframe.html</file>
    6     <file>frametest/iframe2.html</file>
    7     <file>frametest/iframe3.html</file>
     3    <file>resources/index.html</file>
     4    <file>resources/frame_a.html</file>
     5    <file>resources/iframe.html</file>
     6    <file>resources/iframe2.html</file>
     7    <file>resources/iframe3.html</file>
    88</qresource>
    99</RCC>
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro

    r561 r846  
    1 TEMPLATE = app
    2 TARGET = tst_qwebplugindatabase
    3 include(../../../../WebKit.pri)
    4 SOURCES  += tst_qwebplugindatabase.cpp
    5 QT += testlib network
    6 QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
    7 
    8 symbian {
    9     TARGET.UID3 = 0xA000E540
    10     TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
    11 }
     1isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
     2include(../tests.pri)
     3exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebview/qwebview.pro

    r561 r846  
    1 TEMPLATE = app
    2 TARGET = tst_qwebview
    3 include(../../../../WebKit.pri)
    4 SOURCES  += tst_qwebview.cpp
    5 QT += testlib network
    6 QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
    7 RESOURCES  += tst_qwebview.qrc
    8 DEFINES += SRCDIR=\\\"$$PWD/\\\"
    9 
    10 symbian {
    11     TARGET.UID3 = 0xA000E53F
    12     TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
    13 }
     1isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
     2include(../tests.pri)
     3exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp

    r561 r846  
    4747    void reusePage_data();
    4848    void reusePage();
     49    void microFocusCoordinates();
     50    void focusInputTypes();
    4951
    5052    void crashTests();
     53};
     54
     55class WebView : public QWebView
     56{
     57    Q_OBJECT
     58
     59public:
     60    void fireMouseClick(QPoint point) {
     61        QMouseEvent presEv(QEvent::MouseButtonPress, point, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
     62        QMouseEvent relEv(QEvent::MouseButtonRelease, point, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
     63        QWebView::mousePressEvent(&presEv);
     64        QWebView::mousePressEvent(&relEv);
     65    }
     66
    5167};
    5268
     
    122138void tst_QWebView::reusePage()
    123139{
    124     QDir::setCurrent(SRCDIR);
     140    if (!QDir(TESTS_SOURCE_DIR).exists())
     141        QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll);
     142
     143    QDir::setCurrent(TESTS_SOURCE_DIR);
    125144
    126145    QFETCH(QString, html);
     
    130149    page->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
    131150    QWebFrame* mainFrame = page->mainFrame();
    132     mainFrame->setHtml(html, QUrl::fromLocalFile(QDir::currentPath()));
     151    mainFrame->setHtml(html, QUrl::fromLocalFile(TESTS_SOURCE_DIR));
    133152    if (html.contains("</embed>")) {
    134153        // some reasonable time for the PluginStream to feed test.swf to flash and start painting
    135         QTest::qWait(2000);
     154        waitForSignal(view1, SIGNAL(loadFinished(bool)), 2000);
    136155    }
    137156
    138157    view1->show();
    139     QTest::qWait(2000);
     158#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     159    QTest::qWaitForWindowShown(view1);
     160#else
     161    QTest::qWait(2000);
     162#endif
    140163    delete view1;
    141164    QVERIFY(page != 0); // deleting view must not have deleted the page, since it's not a child of view
     
    144167    view2->setPage(page);
    145168    view2->show(); // in Windowless mode, you should still be able to see the plugin here
    146     QTest::qWait(2000);
     169#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     170    QTest::qWaitForWindowShown(view2);
     171#else
     172    QTest::qWait(2000);
     173#endif
    147174    delete view2;
    148175
     
    186213    QWebView view;
    187214    WebViewCrashTest tester(&view);
    188     QUrl url("qrc:///data/index.html");
     215    QUrl url("qrc:///resources/index.html");
    189216    view.load(url);
    190217    QTRY_VERIFY(tester.m_executed); // If fail it means that the test wasn't executed.
    191218}
    192219
     220void tst_QWebView::microFocusCoordinates()
     221{
     222    QWebPage* page = new QWebPage;
     223    QWebView* webView = new QWebView;
     224    webView->setPage( page );
     225
     226    page->mainFrame()->setHtml("<html><body>" \
     227        "<input type='text' id='input1' style='font--family: serif' value='' maxlength='20'/><br>" \
     228        "<canvas id='canvas1' width='500' height='500'/>" \
     229        "<input type='password'/><br>" \
     230        "<canvas id='canvas2' width='500' height='500'/>" \
     231        "</body></html>");
     232
     233    page->mainFrame()->setFocus();
     234
     235    QVariant initialMicroFocus = page->inputMethodQuery(Qt::ImMicroFocus);
     236    QVERIFY(initialMicroFocus.isValid());
     237
     238    page->mainFrame()->scroll(0,50);
     239
     240    QVariant currentMicroFocus = page->inputMethodQuery(Qt::ImMicroFocus);
     241    QVERIFY(currentMicroFocus.isValid());
     242
     243    QCOMPARE(initialMicroFocus.toRect().translated(QPoint(0,-50)), currentMicroFocus.toRect());
     244}
     245
     246void tst_QWebView::focusInputTypes()
     247{
     248    QWebPage* page = new QWebPage;
     249    WebView* webView = new WebView;
     250    webView->setPage( page );
     251
     252    QCoreApplication::processEvents();
     253    QUrl url("qrc:///resources/input_types.html");
     254    page->mainFrame()->load(url);
     255    page->mainFrame()->setFocus();
     256
     257    QVERIFY(waitForSignal(page, SIGNAL(loadFinished(bool))));
     258
     259    // 'text' type
     260    webView->fireMouseClick(QPoint(20, 10));
     261#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) || defined(Q_OS_SYMBIAN)
     262    QVERIFY(webView->inputMethodHints() & Qt::ImhNoAutoUppercase);
     263    QVERIFY(webView->inputMethodHints() & Qt::ImhNoPredictiveText);
     264#else
     265    QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
     266#endif
     267    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
     268
     269    // 'password' field
     270    webView->fireMouseClick(QPoint(20, 60));
     271    QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText);
     272    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
     273
     274    // 'tel' field
     275    webView->fireMouseClick(QPoint(20, 110));
     276    QVERIFY(webView->inputMethodHints() == Qt::ImhDialableCharactersOnly);
     277    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
     278
     279    // 'number' field
     280    webView->fireMouseClick(QPoint(20, 160));
     281    QVERIFY(webView->inputMethodHints() == Qt::ImhDigitsOnly);
     282    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
     283
     284    // 'email' field
     285    webView->fireMouseClick(QPoint(20, 210));
     286    QVERIFY(webView->inputMethodHints() == Qt::ImhEmailCharactersOnly);
     287    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
     288
     289    // 'url' field
     290    webView->fireMouseClick(QPoint(20, 260));
     291    QVERIFY(webView->inputMethodHints() == Qt::ImhUrlCharactersOnly);
     292    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
     293
     294    // 'password' field
     295    webView->fireMouseClick(QPoint(20, 60));
     296    QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText);
     297    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
     298
     299    // 'text' type
     300    webView->fireMouseClick(QPoint(20, 10));
     301#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) || defined(Q_OS_SYMBIAN)
     302    QVERIFY(webView->inputMethodHints() & Qt::ImhNoAutoUppercase);
     303    QVERIFY(webView->inputMethodHints() & Qt::ImhNoPredictiveText);
     304#else
     305    QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
     306#endif
     307    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
     308
     309    // 'password' field
     310    webView->fireMouseClick(QPoint(20, 60));
     311    QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText);
     312    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
     313
     314    qWarning("clicking on text area");
     315    // 'text area' field
     316    webView->fireMouseClick(QPoint(20, 320));
     317    QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
     318    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
     319
     320    delete webView;
     321
     322}
    193323
    194324QTEST_MAIN(tst_QWebView)
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.qrc

    r561 r846  
    11<!DOCTYPE RCC><RCC version="1.0">
    22<qresource>
    3     <file>data/index.html</file>
    4     <file>data/frame_a.html</file>
     3    <file>resources/index.html</file>
     4    <file>resources/frame_a.html</file>
     5    <file>resources/input_types.html</file>
    56</qresource>
    67</RCC>
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/tests.pro

    r561 r846  
    11
    22TEMPLATE = subdirs
    3 SUBDIRS = qwebframe qwebpage qwebelement qgraphicswebview qwebhistoryinterface qwebview qwebhistory
    4 greaterThan(QT_MINOR_VERSION, 4): SUBDIRS += benchmarks/painting/tst_painting.pro benchmarks/loading/tst_loading.pro
     3SUBDIRS = qwebframe qwebpage qwebelement qgraphicswebview qwebhistoryinterface qwebview qwebhistory qwebinspector hybridPixmap
     4SUBDIRS += benchmarks/painting benchmarks/loading
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/util.h

    r561 r846  
    1818*/
    1919// Functions and macros that really need to be in QTestLib
     20
     21#include <QEventLoop>
     22#include <QSignalSpy>
     23#include <QTimer>
     24
     25#if !defined(TESTS_SOURCE_DIR)
     26#define TESTS_SOURCE_DIR ""
     27#endif
     28
     29/**
     30 * Starts an event loop that runs until the given signal is received.
     31 * Optionally the event loop
     32 * can return earlier on a timeout.
     33 *
     34 * \return \p true if the requested signal was received
     35 *         \p false on timeout
     36 */
     37static bool waitForSignal(QObject* obj, const char* signal, int timeout = 10000)
     38{
     39    QEventLoop loop;
     40    QObject::connect(obj, signal, &loop, SLOT(quit()));
     41    QTimer timer;
     42    QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));
     43    if (timeout > 0) {
     44        QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
     45        timer.setSingleShot(true);
     46        timer.start(timeout);
     47    }
     48    loop.exec();
     49    return timeoutSpy.isEmpty();
     50}
    2051
    2152// Will try to wait for the condition while allowing event processing
     
    4677        QCOMPARE(__expr, __expected); \
    4778    } while(0)
    48 
Note: See TracChangeset for help on using the changeset viewer.