Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
1 deleted
50 edited
97 copied

Legend:

Unmodified
Added
Removed
  • trunk

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

    r2 r561  
     12009-10-27  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Updated license
     6
     7        * LICENSE:
     8
     92009-10-26  Sam Weinig  <sam@webkit.org>
     10
     11        Reviewed by Anders Carlsson.
     12
     13        Move some WebView event handling code into its own file, WebViewEventHandling.mm
     14
     15        * WebKit.xcodeproj/project.pbxproj:
     16
     172009-10-19  John Gregg  <johnnyg@google.com>
     18
     19        Reviewed by Dimitri Glazkov.
     20
     21        set ENABLE_NOTIFICATIONS=1 for Chromium
     22        https://bugs.webkit.org/show_bug.cgi?id=29949
     23
     24        * chromium/features.gypi:
     25
     262009-10-13  Drew Wilson  <atwilson@atwilson-macpro.local>
     27
     28        Reviewed by David Levin.
     29
     30        Enable SHARED_WORKERS for Chromium
     31        https://bugs.webkit.org/show_bug.cgi?id=30289
     32
     33        * chromium/features.gypi:
     34        Turned on ENABLE_SHARED_WORKERS by default. This doesn't actually turn on
     35        SharedWorkers yet, as Chromium overrides this flag in its feature_overrides.gypi.
     36
     372009-10-12  Yaar Schnitman  <yaar@chromium.org>
     38
     39        Reviewed by Dimitri Glazkov.
     40
     41        Chromium Port - Windows
     42        https://bugs.webkit.org/show_bug.cgi?id=29969
     43
     44        * chromium/DEPS: Added gtest dep required by windows and incremented some of the deps revisions.
     45
     462009-10-06  Simon Fraser  <simon.fraser@apple.com>
     47
     48        Reviewed by Mark Rowe.
     49
     50        accessibility/media-element.html crashes (and has incorrect result)
     51        https://bugs.webkit.org/show_bug.cgi?id=30108
     52
     53        Fix up the accessibilty label for the newly added fullscreen button,
     54        and update the test result accordingly.
     55
     56        * English.lproj/Localizable.strings:
     57
     582009-10-05  Kevin Decker  <kdecker@apple.com>
     59
     60        Reviewed by Dan Bernstein.
     61
     62        * WebKit.xcodeproj/project.pbxproj: Add WebPluginHalterClient to the project.
     63
     642009-10-05  Yaar Schnitman  <yaar@chromium.org>
     65
     66        Reviewed by Dimitri Glazkov.
     67
     68        One of the dependencies' SVN url was missing a @ before the revision number.
     69
     70        https://bugs.webkit.org/show_bug.cgi?id=30101
     71
     72        * chromium/DEPS:
     73
     742009-10-05  Pierre d'Herbemont  <pdherbemont@webkit.org>
     75
     76        Reviewed by Simon Fraser
     77       
     78        Support fullscreen in MediaPlayer (Mac)
     79        https://bugs.webkit.org/show_bug.cgi?id=26742
     80
     81        Add new files for video fullscreen.
     82
     83        * WebKit.xcodeproj/project.pbxproj:
     84
     852009-10-05  Pavel Feldman  <pfeldman@chromium.org>
     86
     87        Reviewed by Timothy Hatcher.
     88
     89        Web Inspector: add testing harness for Web Inspector.
     90
     91        https://bugs.webkit.org/show_bug.cgi?id=30010
     92
     93        * WebKit.xcodeproj/project.pbxproj:
     94
     952009-10-04  Fumitoshi Ukai  <ukai@chromium.org>
     96
     97        Reviewed by Eric Seidel
     98
     99        Enable Web Sockets in chromium build.
     100        https://bugs.webkit.org/show_bug.cgi?id=29917
     101
     102        * chromium/features.gypi:
     103
     1042009-10-02  Yaar Schnitman  <yaar@chromium.org>
     105
     106        Reviewed by Dimitri Glazkov.
     107
     108        Added gyp_webkit that does a subset of the things gyp_chromium does
     109        plus some specialization for an upstream chromium build.
     110
     111        https://bugs.webkit.org/show_bug.cgi?id=29986
     112
     113        * chromium/DEPS: Points to gyp_webkit instead of gyp_chromium.
     114        * chromium/gyp_webkit: A new python file.
     115
     1162009-10-01  Yaar Schnitman  <yaar@chromium.org>
     117
     118        Reviewed by Dimitri Glazkov.
     119
     120        Make it possible to override the list of feature defines when building
     121        downstream.
     122
     123        https://bugs.webkit.org/show_bug.cgi?id=29979
     124
     125        * chromium/features.gypi:
     126
     1272009-10-01  Yaar Schnitman  <yaar@chromium.org>
     128
     129        Reviewed by Dimitri Glazkov.
     130
     131        Added windows-specific dependencies, updated some revisions and
     132        re-organized file to make revision tracking easier. Also removed
     133        extensions/v8 dependency that is no longer needed upstream.
     134
     135        https://bugs.webkit.org/show_bug.cgi?id=29973
     136
     137        * chromium/DEPS:
     138
     1392009-09-30  Yaar Schnitman  <yaar@chromium.org>
     140
     141        Reviewed by Dimitri Glazkov.
     142
     143        1. Keeping up with downstream revisions.
     144        2. Turning off v8 snapshot build step.
     145
     146        https://bugs.webkit.org/show_bug.cgi?id=29928
     147
     148        * chromium/DEPS
     149
     1502009-09-29  Brady Eidson  <beidson@apple.com>
     151
     152        Reviewed by John Sullivan.
     153
     154        WebKit Mac API should provide a delegate interface for global history.
     155        <rdar://problem/7042773> and https://webkit.org/b/29904
     156
     157        * WebKit.xcodeproj/project.pbxproj:
     158
     1592009-09-28  Yaar Schnitman  <yaar@chromium.org>
     160
     161        Reviewed by Dimitri Glazkov.
     162
     163        https://bugs.webkit.org/show_bug.cgi?id=29722
     164
     165        * chromium/DEPS: Describes the chromium port's dependencies and
     166          is used by gclient to fetch them.
     167        * chromium/webkit.gyp: Currently only builds webcore but in
     168          the future will also build the webkit api.
     169
     1702009-09-26  David Kilzer  <ddkilzer@apple.com>
     171
     172        Part 2 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets
     173
     174        Reviewed by Darin Adler.
     175
     176        Fix ENABLE_ORIENTATION_EVENTS for non-Mac platforms.
     177
     178        * chromium/features.gypi: Added 'ENABLE_ORIENTATION_EVENTS=0' to
     179        disable this feature by default.
     180
     1812009-09-22  Yaar Schnitman  <yaar@chromium.org>
     182
     183        Reviewed by David Levin.
     184
     185        Create chromium directory and ported chromium.org's features.gypi for
     186        the webkit chromium port.
     187
     188        https://bugs.webkit.org/show_bug.cgi?id=29617
     189
     190        * chromium/features.gypi: Added.
     191
     1922009-09-21  Dan Bernstein  <mitz@apple.com>
     193
     194        Reviewed by Anders Carlsson.
     195
     196        <rdar://problem/4137135> iFrame with PDF not being handled correctly on
     197        usps.com
     198        https://bugs.webkit.org/show_bug.cgi?id=4151
     199
     200        * WebKit.xcodeproj/project.pbxproj: Added WebPDFDocumentExtras.{h,mm}
     201        and WebJSPDFDoc.{h,mm} and changed WebPDFRepresentation to
     202        Objective-C++.
     203
     2042009-09-07  Steve Block  <steveblock@google.com>
     205
     206        Reviewed by Adam Barth.
     207
     208        Adds a mock Geolocation service. This will be used to provide predictable behavior of the
     209        Geolocation API for use in LayoutTests. Later changes will integrate the the mock
     210        Geolocation service with DumpRenderTree.
     211        https://bugs.webkit.org/show_bug.cgi?id=28264
     212
     213        * WebKit.xcodeproj/project.pbxproj: Modified. Adds WebGeolocationMock.
     214
     2152009-09-03  John Sullivan  <sullivan@apple.com>
     216
     217        Reviewed by Adam Roben
     218
     219        * StringsNotToBeLocalized.txt:
     220        Brought this file up to date.
     221
     2222009-08-31  Mark Rowe  <mrowe@apple.com>
     223
     224        Rubber-stamped by Beth Dakin.
     225
     226        Remove WebViewEditingContextMenu.nib and WebViewEditingContextMenuOld.nib.
     227        We stopped using these back in r18592 when we switched over to context menus
     228        driven by WebCore.
     229
     230        * English.lproj/WebViewEditingContextMenu.nib/classes.nib: Removed.
     231        * English.lproj/WebViewEditingContextMenu.nib/info.nib: Removed.
     232        * English.lproj/WebViewEditingContextMenu.nib/objects.nib: Removed.
     233        * English.lproj/WebViewEditingContextMenuOld.nib/classes.nib: Removed.
     234        * English.lproj/WebViewEditingContextMenuOld.nib/info.nib: Removed.
     235        * English.lproj/WebViewEditingContextMenuOld.nib/objects.nib: Removed.
     236        * WebKit.xcodeproj/project.pbxproj:
     237
     2382009-08-28  Chris Fleizach  <cfleizach@apple.com>
     239
     240        Reviewed by John Sullivan.
     241
     242        update-webkit-localizable-strings script can no longer complete
     243        https://bugs.webkit.org/show_bug.cgi?id=28792
     244
     245        * English.lproj/Localizable.strings:
     246
     2472009-08-27  John Sullivan  <sullivan@apple.com>
     248
     249        * StringsNotToBeLocalized.txt:
     250        Brought up to date, other than the problem mentioned in https://bugs.webkit.org/show_bug.cgi?id=28792
     251
     2522009-08-25  Eric Carlson  <eric.carlson@apple.com>
     253
     254        Reviewed by Oliver Hunt.
     255
     256        <video> and <audio> controller should be accessible
     257        https://bugs.webkit.org/show_bug.cgi?id=28081
     258
     259        Add localized strings for media controller accessiblility.
     260
     261        * English.lproj/Localizable.strings:
     262
     2632009-08-20  Chris Fleizach  <cfleizach@apple.com>
     264
     265        Reviewed by Darin Adler.
     266
     267        Enable various "grouping" ARIA roles
     268        https://bugs.webkit.org/show_bug.cgi?id=28486
     269
     270        * English.lproj/Localizable.strings:
     271
     2722009-08-18  Drew Wilson  <atwilson@google.com>
     273
     274        Reviewed by Eric Seidel.
     275
     276        Need to extend DumpRenderTree to expose number of worker threads.
     277        https://bugs.webkit.org/show_bug.cgi?id=28292
     278
     279        * WebKit.xcodeproj/project.pbxproj:
     280        Added WebWorkersPrivate APIs to mac WebKit to expose workerThreadCount() for DumpRenderTree.
     281
     2822009-08-06  Mark Rowe  <mrowe@apple.com>
     283
     284        Rubber-stamped by Sam Weinig.
     285
     286        Add explicit dependencies for our build verification scripts to ensure that they always run after linking has completed.
     287
     288        * WebKit.xcodeproj/project.pbxproj:
     289
     2902009-08-06  Mark Rowe  <mrowe@apple.com>
     291
     292        Bring a little order to our otherwise out of control lives.
     293
     294        * WebKit.xcodeproj/project.pbxproj:
     295
     2962009-08-06  Mark Rowe  <mrowe@apple.com>
     297
     298        Build fix.
     299
     300        Don't attempt to build a file that Anders just deleted.
     301
     302        * WebKit.xcodeproj/project.pbxproj:
     303
     3042009-07-29  David Kilzer  <ddkilzer@apple.com>
     305
     306        <http://webkit.org/b/27788> Don't export WebPluginController.h as a private header
     307
     308        Reviewed by Mark Rowe.
     309
     310        WebPluginController.h includes WebPluginContainerCheck.h, which
     311        is not a private header.  Since WebPluginController.h doesn't
     312        appear to be used anywhere, remove its private header status.
     313
     314        * WebKit.xcodeproj/project.pbxproj: Remove private header
     315        attribute from WebPluginController.h.
     316
     3172009-07-28  Maxime Simon  <simon.maxime@gmail.com>
     318
     319        Reviewed by David Levin.
     320
     321        Added FrameLoaderClient for Haiku WebCore support.
     322        https://bugs.webkit.org/show_bug.cgi?id=26952
     323
     324        * haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp: Added.
     325        (WebCore::FrameLoaderClientHaiku::FrameLoaderClientHaiku):
     326        (WebCore::FrameLoaderClientHaiku::setFrame):
     327        (WebCore::FrameLoaderClientHaiku::setWebView):
     328        (WebCore::FrameLoaderClientHaiku::detachFrameLoader):
     329        (WebCore::FrameLoaderClientHaiku::hasWebView):
     330        (WebCore::FrameLoaderClientHaiku::hasBackForwardList):
     331        (WebCore::FrameLoaderClientHaiku::resetBackForwardList):
     332        (WebCore::FrameLoaderClientHaiku::provisionalItemIsTarget):
     333        (WebCore::FrameLoaderClientHaiku::makeRepresentation):
     334        (WebCore::FrameLoaderClientHaiku::forceLayout):
     335        (WebCore::FrameLoaderClientHaiku::forceLayoutForNonHTML):
     336        (WebCore::FrameLoaderClientHaiku::updateHistoryForCommit):
     337        (WebCore::FrameLoaderClientHaiku::updateHistoryForBackForwardNavigation):
     338        (WebCore::FrameLoaderClientHaiku::updateHistoryForReload):
     339        (WebCore::FrameLoaderClientHaiku::updateHistoryForStandardLoad):
     340        (WebCore::FrameLoaderClientHaiku::updateHistoryForInternalLoad):
     341        (WebCore::FrameLoaderClientHaiku::updateHistoryAfterClientRedirect):
     342        (WebCore::FrameLoaderClientHaiku::setCopiesOnScroll):
     343        (WebCore::FrameLoaderClientHaiku::tokenForLoadErrorReset):
     344        (WebCore::FrameLoaderClientHaiku::resetAfterLoadError):
     345        (WebCore::FrameLoaderClientHaiku::doNotResetAfterLoadError):
     346        (WebCore::FrameLoaderClientHaiku::willCloseDocument):
     347        (WebCore::FrameLoaderClientHaiku::detachedFromParent2):
     348        (WebCore::FrameLoaderClientHaiku::detachedFromParent3):
     349        (WebCore::FrameLoaderClientHaiku::dispatchDidHandleOnloadEvents):
     350        (WebCore::FrameLoaderClientHaiku::dispatchDidReceiveServerRedirectForProvisionalLoad):
     351        (WebCore::FrameLoaderClientHaiku::dispatchDidCancelClientRedirect):
     352        (WebCore::FrameLoaderClientHaiku::dispatchWillPerformClientRedirect):
     353        (WebCore::FrameLoaderClientHaiku::dispatchDidChangeLocationWithinPage):
     354        (WebCore::FrameLoaderClientHaiku::dispatchWillClose):
     355        (WebCore::FrameLoaderClientHaiku::dispatchDidStartProvisionalLoad):
     356        (WebCore::FrameLoaderClientHaiku::dispatchDidReceiveTitle):
     357        (WebCore::FrameLoaderClientHaiku::dispatchDidCommitLoad):
     358        (WebCore::FrameLoaderClientHaiku::dispatchDidFinishDocumentLoad):
     359        (WebCore::FrameLoaderClientHaiku::dispatchDidFinishLoad):
     360        (WebCore::FrameLoaderClientHaiku::dispatchDidFirstLayout):
     361        (WebCore::FrameLoaderClientHaiku::dispatchDidFirstVisuallyNonEmptyLayout):
     362        (WebCore::FrameLoaderClientHaiku::dispatchShow):
     363        (WebCore::FrameLoaderClientHaiku::cancelPolicyCheck):
     364        (WebCore::FrameLoaderClientHaiku::dispatchWillSubmitForm):
     365        (WebCore::FrameLoaderClientHaiku::dispatchDidLoadMainResource):
     366        (WebCore::FrameLoaderClientHaiku::revertToProvisionalState):
     367        (WebCore::FrameLoaderClientHaiku::postProgressStartedNotification):
     368        (WebCore::FrameLoaderClientHaiku::postProgressEstimateChangedNotification):
     369        (WebCore::FrameLoaderClientHaiku::postProgressFinishedNotification):
     370        (WebCore::FrameLoaderClientHaiku::progressStarted):
     371        (WebCore::FrameLoaderClientHaiku::progressCompleted):
     372        (WebCore::FrameLoaderClientHaiku::setMainFrameDocumentReady):
     373        (WebCore::FrameLoaderClientHaiku::willChangeTitle):
     374        (WebCore::FrameLoaderClientHaiku::didChangeTitle):
     375        (WebCore::FrameLoaderClientHaiku::finishedLoading):
     376        (WebCore::FrameLoaderClientHaiku::canShowMIMEType):
     377        (WebCore::FrameLoaderClientHaiku::representationExistsForURLScheme):
     378        (WebCore::FrameLoaderClientHaiku::generatedMIMETypeForURLScheme):
     379        (WebCore::FrameLoaderClientHaiku::frameLoadCompleted):
     380        (WebCore::FrameLoaderClientHaiku::saveViewStateToItem):
     381        (WebCore::FrameLoaderClientHaiku::restoreViewState):
     382        (WebCore::FrameLoaderClientHaiku::restoreScrollPositionAndViewState):
     383        (WebCore::FrameLoaderClientHaiku::provisionalLoadStarted):
     384        (WebCore::FrameLoaderClientHaiku::shouldTreatURLAsSameAsCurrent):
     385        (WebCore::FrameLoaderClientHaiku::addHistoryItemForFragmentScroll):
     386        (WebCore::FrameLoaderClientHaiku::didFinishLoad):
     387        (WebCore::FrameLoaderClientHaiku::prepareForDataSourceReplacement):
     388        (WebCore::FrameLoaderClientHaiku::setTitle):
     389        (WebCore::FrameLoaderClientHaiku::userAgent):
     390        (WebCore::FrameLoaderClientHaiku::dispatchDidReceiveIcon):
     391        (WebCore::FrameLoaderClientHaiku::frameLoaderDestroyed):
     392        (WebCore::FrameLoaderClientHaiku::canHandleRequest):
     393        (WebCore::FrameLoaderClientHaiku::partClearedInBegin):
     394        (WebCore::FrameLoaderClientHaiku::updateGlobalHistory):
     395        (WebCore::FrameLoaderClientHaiku::updateGlobalHistoryRedirectLinks):
     396        (WebCore::FrameLoaderClientHaiku::shouldGoToHistoryItem):
     397        (WebCore::FrameLoaderClientHaiku::saveScrollPositionAndViewStateToItem):
     398        (WebCore::FrameLoaderClientHaiku::canCachePage):
     399        (WebCore::FrameLoaderClientHaiku::setMainDocumentError):
     400        (WebCore::FrameLoaderClientHaiku::committedLoad):
     401        (WebCore::FrameLoaderClientHaiku::cancelledError):
     402        (WebCore::FrameLoaderClientHaiku::blockedError):
     403        (WebCore::FrameLoaderClientHaiku::cannotShowURLError):
     404        (WebCore::FrameLoaderClientHaiku::interruptForPolicyChangeError):
     405        (WebCore::FrameLoaderClientHaiku::cannotShowMIMETypeError):
     406        (WebCore::FrameLoaderClientHaiku::fileDoesNotExistError):
     407        (WebCore::FrameLoaderClientHaiku::shouldFallBack):
     408        (WebCore::FrameLoaderClientHaiku::createDocumentLoader):
     409        (WebCore::FrameLoaderClientHaiku::download):
     410        (WebCore::FrameLoaderClientHaiku::assignIdentifierToInitialRequest):
     411        (WebCore::FrameLoaderClientHaiku::dispatchWillSendRequest):
     412        (WebCore::FrameLoaderClientHaiku::shouldUseCredentialStorage):
     413        (WebCore::FrameLoaderClientHaiku::dispatchDidReceiveAuthenticationChallenge):
     414        (WebCore::FrameLoaderClientHaiku::dispatchDidCancelAuthenticationChallenge):
     415        (WebCore::FrameLoaderClientHaiku::dispatchDidReceiveResponse):
     416        (WebCore::FrameLoaderClientHaiku::dispatchDidReceiveContentLength):
     417        (WebCore::FrameLoaderClientHaiku::dispatchDidFinishLoading):
     418        (WebCore::FrameLoaderClientHaiku::dispatchDidFailLoading):
     419        (WebCore::FrameLoaderClientHaiku::dispatchDidLoadResourceFromMemoryCache):
     420        (WebCore::FrameLoaderClientHaiku::dispatchDidLoadResourceByXMLHttpRequest):
     421        (WebCore::FrameLoaderClientHaiku::dispatchDidFailProvisionalLoad):
     422        (WebCore::FrameLoaderClientHaiku::dispatchDidFailLoad):
     423        (WebCore::FrameLoaderClientHaiku::dispatchCreatePage):
     424        (WebCore::FrameLoaderClientHaiku::dispatchDecidePolicyForMIMEType):
     425        (WebCore::FrameLoaderClientHaiku::dispatchDecidePolicyForNewWindowAction):
     426        (WebCore::FrameLoaderClientHaiku::dispatchDecidePolicyForNavigationAction):
     427        (WebCore::FrameLoaderClientHaiku::dispatchUnableToImplementPolicy):
     428        (WebCore::FrameLoaderClientHaiku::startDownload):
     429        (WebCore::FrameLoaderClientHaiku::createFrame):
     430        (WebCore::FrameLoaderClientHaiku::objectContentType):
     431        (WebCore::FrameLoaderClientHaiku::createPlugin):
     432        (WebCore::FrameLoaderClientHaiku::redirectDataToPlugin):
     433        (WebCore::FrameLoaderClientHaiku::pluginWillHandleLoadError):
     434        (WebCore::FrameLoaderClientHaiku::createJavaAppletWidget):
     435        (WebCore::FrameLoaderClientHaiku::overrideMediaType):
     436        (WebCore::FrameLoaderClientHaiku::windowObjectCleared):
     437        (WebCore::FrameLoaderClientHaiku::documentElementAvailable):
     438        (WebCore::FrameLoaderClientHaiku::didPerformFirstNavigation):
     439        (WebCore::FrameLoaderClientHaiku::registerForIconNotification):
     440        (WebCore::FrameLoaderClientHaiku::savePlatformDataToCachedFrame):
     441        (WebCore::FrameLoaderClientHaiku::transitionToCommittedFromCachedFrame):
     442        (WebCore::FrameLoaderClientHaiku::transitionToCommittedForNewPage):
     443        * haiku/WebCoreSupport/FrameLoaderClientHaiku.h: Added.
     444        (WebCore::FrameLoaderClientHaiku::~FrameLoaderClientHaiku):
     445
     4462009-07-28  Maxime Simon  <simon.maxime@gmail.com>
     447
     448        Reviewed by David Levin.
     449
     450        Added ChromeClient for Haiku WebCore support.
     451        https://bugs.webkit.org/show_bug.cgi?id=26952
     452
     453        * haiku/WebCoreSupport/ChromeClientHaiku.cpp: Added.
     454        (WebCore::ChromeClientHaiku::ChromeClientHaiku):
     455        (WebCore::ChromeClientHaiku::~ChromeClientHaiku):
     456        (WebCore::ChromeClientHaiku::chromeDestroyed):
     457        (WebCore::ChromeClientHaiku::setWindowRect):
     458        (WebCore::ChromeClientHaiku::windowRect):
     459        (WebCore::ChromeClientHaiku::pageRect):
     460        (WebCore::ChromeClientHaiku::scaleFactor):
     461        (WebCore::ChromeClientHaiku::focus):
     462        (WebCore::ChromeClientHaiku::unfocus):
     463        (WebCore::ChromeClientHaiku::canTakeFocus):
     464        (WebCore::ChromeClientHaiku::takeFocus):
     465        (WebCore::ChromeClientHaiku::createWindow):
     466        (WebCore::ChromeClientHaiku::createModalDialog):
     467        (WebCore::ChromeClientHaiku::show):
     468        (WebCore::ChromeClientHaiku::canRunModal):
     469        (WebCore::ChromeClientHaiku::runModal):
     470        (WebCore::ChromeClientHaiku::setToolbarsVisible):
     471        (WebCore::ChromeClientHaiku::toolbarsVisible):
     472        (WebCore::ChromeClientHaiku::setStatusbarVisible):
     473        (WebCore::ChromeClientHaiku::statusbarVisible):
     474        (WebCore::ChromeClientHaiku::setScrollbarsVisible):
     475        (WebCore::ChromeClientHaiku::scrollbarsVisible):
     476        (WebCore::ChromeClientHaiku::setMenubarVisible):
     477        (WebCore::ChromeClientHaiku::menubarVisible):
     478        (WebCore::ChromeClientHaiku::setResizable):
     479        (WebCore::ChromeClientHaiku::addMessageToConsole):
     480        (WebCore::ChromeClientHaiku::canRunBeforeUnloadConfirmPanel):
     481        (WebCore::ChromeClientHaiku::runBeforeUnloadConfirmPanel):
     482        (WebCore::ChromeClientHaiku::closeWindowSoon):
     483        (WebCore::ChromeClientHaiku::runJavaScriptAlert):
     484        (WebCore::ChromeClientHaiku::runJavaScriptConfirm):
     485        (WebCore::ChromeClientHaiku::runJavaScriptPrompt):
     486        (WebCore::ChromeClientHaiku::setStatusbarText):
     487        (WebCore::ChromeClientHaiku::shouldInterruptJavaScript):
     488        (WebCore::ChromeClientHaiku::tabsToLinks):
     489        (WebCore::ChromeClientHaiku::windowResizerRect):
     490        (WebCore::ChromeClientHaiku::repaint):
     491        (WebCore::ChromeClientHaiku::scroll):
     492        (WebCore::ChromeClientHaiku::screenToWindow):
     493        (WebCore::ChromeClientHaiku::windowToScreen):
     494        (WebCore::ChromeClientHaiku::platformWindow):
     495        (WebCore::ChromeClientHaiku::contentsSizeChanged):
     496        (WebCore::ChromeClientHaiku::scrollRectIntoView):
     497        (WebCore::ChromeClientHaiku::addToDirtyRegion):
     498        (WebCore::ChromeClientHaiku::scrollBackingStore):
     499        (WebCore::ChromeClientHaiku::updateBackingStore):
     500        (WebCore::ChromeClientHaiku::mouseDidMoveOverElement):
     501        (WebCore::ChromeClientHaiku::setToolTip):
     502        (WebCore::ChromeClientHaiku::print):
     503        (WebCore::ChromeClientHaiku::exceededDatabaseQuota):
     504        (WebCore::ChromeClientWx::reachedMaxAppCacheSize):
     505        (WebCore::ChromeClientHaiku::requestGeolocationPermissionForFrame):
     506        (WebCore::ChromeClientHaiku::runOpenPanel):
     507        (WebCore::ChromeClientHaiku::setCursor):
     508        (WebCore::ChromeClientHaiku::formStateDidChange):
     509        (WebCore::ChromeClientHaiku::createHTMLParserQuirks):
     510        * haiku/WebCoreSupport/ChromeClientHaiku.h: Added.
     511
     5122009-07-28  Robert Hogan  <robert@roberthogan.net>
     513
     514        Reviewed by Simon Hausmann.
     515
     516        Add WebKit version API to Qt.
     517
     518        Get the current version of WebKit from WebKit/mac/Configurations/Version.xcconfig
     519        at compile time and make it available to webkit ports through WebKitVersion.h.
     520
     521        https://bugs.webkit.org/show_bug.cgi?id=27158
     522
     523        * scripts/generate-webkitversion.pl: Added
     524
     5252009-07-24  Andrei Popescu  <andreip@google.com>
     526
     527        ApplicationCache should have size limit
     528        https://bugs.webkit.org/show_bug.cgi?id=22700
     529       
     530        Updated the project after adding WebApplicationCache.h/mm
     531
     532        * WebKit.xcodeproj/project.pbxproj:
     533
     5342009-07-16  Maxime Simon  <simon.maxime@gmail.com>
     535
     536        Reviewed by Eric Seidel.
     537
     538        Added InspectorClient for Haiku WebCore support.
     539        https://bugs.webkit.org/show_bug.cgi?id=26952
     540
     541        Adding two files, InspectorClientHaiku.h and InspectorClientHaiku.cpp
     542
     543        * haiku/WebCoreSupport/InspectorClientHaiku.cpp: Added.
     544        (WebCore::InspectorClientHaiku::inspectorDestroyed):
     545        (WebCore::InspectorClientHaiku::createPage):
     546        (WebCore::InspectorClientHaiku::localizedStringsURL):
     547        (WebCore::InspectorClientHaiku::hiddenPanels):
     548        (WebCore::InspectorClientHaiku::showWindow):
     549        (WebCore::InspectorClientHaiku::closeWindow):
     550        (WebCore::InspectorClientHaiku::attachWindow):
     551        (WebCore::InspectorClientHaiku::detachWindow):
     552        (WebCore::InspectorClientHaiku::setAttachedWindowHeight):
     553        (WebCore::InspectorClientHaiku::highlight):
     554        (WebCore::InspectorClientHaiku::hideHighlight):
     555        (WebCore::InspectorClientHaiku::inspectedURLChanged):
     556        (WebCore::InspectorClientHaiku::populateSetting):
     557        (WebCore::InspectorClientHaiku::storeSetting):
     558        (WebCore::InspectorClientHaiku::removeSetting):
     559        * haiku/WebCoreSupport/InspectorClientHaiku.h: Added.
     560
     5612009-07-16  Maxime Simon  <simon.maxime@gmail.com>
     562
     563        Reviewed by Oliver Hunt.
     564
     565        Added EditorClient for Haiku WebCore support.
     566        https://bugs.webkit.org/show_bug.cgi?id=26952
     567
     568        Adding two files, EditorClientHaiku.h and EditorClientHaiku.cpp
     569
     570        * haiku/WebCoreSupport/EditorClientHaiku.cpp: Added.
     571        (WebCore::EditorClientHaiku::EditorClientHaiku):
     572        (WebCore::EditorClientHaiku::setPage):
     573        (WebCore::EditorClientHaiku::pageDestroyed):
     574        (WebCore::EditorClientHaiku::shouldDeleteRange):
     575        (WebCore::EditorClientHaiku::shouldShowDeleteInterface):
     576        (WebCore::EditorClientHaiku::smartInsertDeleteEnabled):
     577        (WebCore::EditorClientHaiku::isSelectTrailingWhitespaceEnabled):
     578        (WebCore::EditorClientHaiku::isContinuousSpellCheckingEnabled):
     579        (WebCore::EditorClientHaiku::toggleContinuousSpellChecking):
     580        (WebCore::EditorClientHaiku::isGrammarCheckingEnabled):
     581        (WebCore::EditorClientHaiku::toggleGrammarChecking):
     582        (WebCore::EditorClientHaiku::spellCheckerDocumentTag):
     583        (WebCore::EditorClientHaiku::isEditable):
     584        (WebCore::EditorClientHaiku::shouldBeginEditing):
     585        (WebCore::EditorClientHaiku::shouldEndEditing):
     586        (WebCore::EditorClientHaiku::shouldInsertNode):
     587        (WebCore::EditorClientHaiku::shouldInsertText):
     588        (WebCore::EditorClientHaiku::shouldChangeSelectedRange):
     589        (WebCore::EditorClientHaiku::shouldApplyStyle):
     590        (WebCore::EditorClientHaiku::shouldMoveRangeAfterDelete):
     591        (WebCore::EditorClientHaiku::didBeginEditing):
     592        (WebCore::EditorClientHaiku::respondToChangedContents):
     593        (WebCore::EditorClientHaiku::respondToChangedSelection):
     594        (WebCore::EditorClientHaiku::didEndEditing):
     595        (WebCore::EditorClientHaiku::didWriteSelectionToPasteboard):
     596        (WebCore::EditorClientHaiku::didSetSelectionTypesForPasteboard):
     597        (WebCore::EditorClientHaiku::registerCommandForUndo):
     598        (WebCore::EditorClientHaiku::registerCommandForRedo):
     599        (WebCore::EditorClientHaiku::clearUndoRedoOperations):
     600        (WebCore::EditorClientHaiku::canUndo):
     601        (WebCore::EditorClientHaiku::canRedo):
     602        (WebCore::EditorClientHaiku::undo):
     603        (WebCore::EditorClientHaiku::redo):
     604        (WebCore::EditorClientHaiku::handleKeyboardEvent):
     605        (WebCore::EditorClientHaiku::handleInputMethodKeydown):
     606        (WebCore::EditorClientHaiku::textFieldDidBeginEditing):
     607        (WebCore::EditorClientHaiku::textFieldDidEndEditing):
     608        (WebCore::EditorClientHaiku::textDidChangeInTextField):
     609        (WebCore::EditorClientHaiku::doTextFieldCommandFromEvent):
     610        (WebCore::EditorClientHaiku::textWillBeDeletedInTextField):
     611        (WebCore::EditorClientHaiku::textDidChangeInTextArea):
     612        (WebCore::EditorClientHaiku::ignoreWordInSpellDocument):
     613        (WebCore::EditorClientHaiku::learnWord):
     614        (WebCore::EditorClientHaiku::checkSpellingOfString):
     615        (WebCore::EditorClientHaiku::getAutoCorrectSuggestionForMisspelledWord):
     616        (WebCore::EditorClientHaiku::checkGrammarOfString):
     617        (WebCore::EditorClientHaiku::updateSpellingUIWithGrammarString):
     618        (WebCore::EditorClientHaiku::updateSpellingUIWithMisspelledWord):
     619        (WebCore::EditorClientHaiku::showSpellingUI):
     620        (WebCore::EditorClientHaiku::spellingUIIsShowing):
     621        (WebCore::EditorClientHaiku::getGuessesForWord):
     622        (WebCore::EditorClientHaiku::setInputMethodState):
     623        (WebCore::EditorClientHaiku::isEditing):
     624        * haiku/WebCoreSupport/EditorClientHaiku.h: Added.
     625
     6262009-07-16  Maxime Simon  <simon.maxime@gmail.com>
     627
     628        Reviewed by Eric Seidel.
     629
     630        Added DragClient for Haiku WebCore support.
     631        https://bugs.webkit.org/show_bug.cgi?id=26952
     632
     633        Adding two files, DragClientHaiku.h and DragClientHaiku.cpp
     634
     635        * haiku/WebCoreSupport/DragClientHaiku.cpp: Added.
     636        (WebCore::DragClientHaiku::actionMaskForDrag):
     637        (WebCore::DragClientHaiku::willPerformDragDestinationAction):
     638        (WebCore::DragClientHaiku::dragControllerDestroyed):
     639        (WebCore::DragClientHaiku::dragSourceActionMaskForPoint):
     640        (WebCore::DragClientHaiku::willPerformDragSourceAction):
     641        (WebCore::DragClientHaiku::startDrag):
     642        (WebCore::DragClientHaiku::createDragImageForLink):
     643        * haiku/WebCoreSupport/DragClientHaiku.h: Added.
     644
     6452009-07-16  Maxime Simon  <simon.maxime@gmail.com>
     646
     647        Reviewed by Oliver Hunt.
     648
     649        Added ContextMenuClient for Haiku WebCore support.
     650        https://bugs.webkit.org/show_bug.cgi?id=26952
     651
     652        Adding two files, ContextMenuClientHaiku.h
     653        and ContextMenuClientHaiku.cpp
     654
     655        * haiku/WebCoreSupport/ContextMenuClientHaiku.cpp: Added.
     656        (WebCore::ContextMenuClientHaiku::contextMenuDestroyed):
     657        (WebCore::ContextMenuClientHaiku::getCustomMenuFromDefaultItems):
     658        (WebCore::ContextMenuClientHaiku::contextMenuItemSelected):
     659        (WebCore::ContextMenuClientHaiku::downloadURL):
     660        (WebCore::ContextMenuClientHaiku::lookUpInDictionary):
     661        (WebCore::ContextMenuClientHaiku::speak):
     662        (WebCore::ContextMenuClientHaiku::isSpeaking):
     663        (WebCore::ContextMenuClientHaiku::stopSpeaking):
     664        (WebCore::ContextMenuClientHaiku::searchWithGoogle):
     665        * haiku/WebCoreSupport/ContextMenuClientHaiku.h: Added.
     666
     6672009-07-10  Adam Roben  <aroben@apple.com>
     668
     669        Sort all our Xcode projects
     670
     671        Accomplished using sort-Xcode-project-file.
     672
     673        Requested by Dave Kilzer.
     674
     675        * WebKit.xcodeproj/project.pbxproj:
     676
     6772009-07-02  Adam Roben  <aroben@apple.com>
     678
     679        Fix warnings from update-webkit-localizable-strings
     680
     681        Rubber-stamped by Eric Carlson.
     682
     683        * English.lproj/Localizable.strings: Updated.
     684
     6852009-07-02  Adam Roben  <aroben@apple.com>
     686
     687        Update StringsNotToBeLocalized.txt for (not so) recent changes
     688
     689        Bug 26926: StringsNotToBeLocalized.txt is out-of-date
     690        <https://bugs.webkit.org/show_bug.cgi?id=26926>
     691
     692        Reviewed by John Sullivan.
     693
     694        * StringsNotToBeLocalized.txt:
     695
     6962009-07-02  Pierre d'Herbemont  <pdherbemont@apple.com>
     697
     698        Reviewed by Simon Fraser.
     699
     700        <rdar://problem/6518119>
     701
     702        Add localized strings for media controller status messages.
     703
     704        * English.lproj/Localizable.strings: Localized text.
     705
     7062009-06-08  Dan Bernstein  <mitz@apple.com>
     707
     708        Rubber-stamped by Mark Rowe.
     709
     710        - updated the project after giving Objective-C++ the .mm extension
     711
     712        * WebKit.xcodeproj/project.pbxproj:
     713
     7142009-06-04  Sam Weinig  <sam@webkit.org>
     715
     716        Reviewed by Alice Liu.
     717
     718        Move WebView internal data into WebViewData.h/mm.
     719
     720        * WebKit.xcodeproj/project.pbxproj:
     721
     7222009-06-03  Sam Weinig  <sam@webkit.org>
     723
     724        Reviewed by Mark Rowe.
     725
     726        Added WebDelegateImplementationCaching.h/mm
     727
     728        * WebKit.xcodeproj/project.pbxproj:
     729
     7302009-06-03  Sam Weinig  <sam@webkit.org>
     731
     732        Reviewed by Mark Rowe.
     733
     734        Add WebViewInternal.mm.
     735
     736        * WebKit.xcodeproj/project.pbxproj:
     737
     7382009-06-03  Dan Bernstein  <mitz@apple.com>
     739
     740        Reviewed by Anders Carlsson.
     741
     742        - WebKit project part of eliminating WebCoreTextRenderer
     743
     744        * WebKit.xcodeproj/project.pbxproj: Changed WebKitNSStringExtras.m to
     745            compile as Objective-C++.
     746
     7472009-06-01  Darin Adler  <darin@apple.com>
     748
     749        Reviewed by Maciej Stachowiak.
     750
     751        Bug 26113: break WebTextCompletionController out into its own source file
     752        https://bugs.webkit.org/show_bug.cgi?id=26113
     753
     754        * WebKit.xcodeproj/project.pbxproj: Add WebTextCompletionController.h/mm.
     755
     7562009-05-28  Mark Rowe  <mrowe@apple.com>
     757
     758        Rubber-stamped by Anders Carlsson.
     759
     760        Symlink WebKitPluginHost.app in to place if needed.
     761
     762        * WebKit.xcodeproj/project.pbxproj:
     763
     7642009-05-24  Darin Adler  <darin@apple.com>
     765
     766        * StringsNotToBeLocalized.txt: Updated for recent changes. Got rid of most full-file exceptions.
     767
     7682009-05-16  Anders Carlsson  <andersca@apple.com>
     769
     770        Reviewed by Sam Weinig and Dan Bernstein.
     771
     772        Fix <rdar://problem/6889644>.
     773       
     774        * English.lproj/Localizable.strings:
     775
     7762009-05-10  Alexey Proskuryakov  <ap@webkit.org>
     777
     778        Reviewed by Dan Bernstein.
     779
     780        <rdar://problem/6870383> Have to enter credentials twice when downloading from a protected page
     781
     782        * WebKit.xcodeproj/project.pbxproj: Renamed Misc/WebDownload.m as WebDownload.mm, so that
     783        it could use C++ code from AuthenticaitonMac.h.
     784
     7852009-04-27  Douglas R. Davidson  <ddavidso@apple.com>
     786
     787        Add localizable strings for
     788        <rdar://problem/6724106> WebViews need to implement text checking
     789
     790        Reviewed by Justin Garcia.
     791
     792        * English.lproj/Localizable.strings:
     793
     7942009-04-27  Kevin Decker  <kdecker@apple.com>
     795
     796        Reviewed by Anders Carlsson.
     797               
     798        <rdar://problem/6352982>
     799
     800        * WebKit.xcodeproj/project.pbxproj: Added WebNetscapeContainerCheckContextInfo.mm to the project.
     801
     8022009-04-23  Kevin Decker  <kdecker@apple.com>
     803
     804        Reviewed by Anders Carlsson.
     805
     806        * WebKit.xcodeproj/project.pbxproj: Added WebNetscapeContainerCheckPrivate.mm and header to the project.
     807
     8082009-04-21  Adam Roben  <aroben@apple.com>
     809
     810        Update StringsNotToBeLocalized.txt for recent changes
     811
     812        Rubber-stamped by John Sullivan.
     813
     814        * StringsNotToBeLocalized.txt:
     815
     8162009-04-19  Darin Adler  <darin@apple.com>
     817
     818        * StringsNotToBeLocalized.txt: Updated for recent changes.
     819
     8202009-04-17  David Kilzer  <ddkilzer@apple.com>
     821
     822        Simplify FEATURE_DEFINES definition
     823
     824        Reviewed by Darin Adler.
     825
     826        This moves FEATURE_DEFINES and its related ENABLE_FEATURE_NAME
     827        variables to their own FeatureDefines.xcconfig file.  It also
     828        extracts a new ENABLE_GEOLOCATION variable so that
     829        FEATURE_DEFINES only needs to be defined once.
     830
     831        * WebKit.xcodeproj/project.pbxproj: Added
     832        FeatureDefines.xcconfig file.
     833
     8342009-04-10  Timothy Hatcher  <timothy@apple.com>
     835
     836        Remove DOMDocumentPrivate.h now that <rdar://problem/6730996> is fixed.
     837
     838        Rubber-stamped by Mark Rowe.
     839
     840        * WebKit.xcodeproj/project.pbxproj:
     841
     8422009-04-09  Mike Thole  <mthole@apple.com>
     843
     844        Reviewed by Adam Roben.
     845
     846        * WebKit.xcodeproj/project.pbxproj:
     847            Set the Localizable.strings encoding to UTF-16.
     848
     8492009-04-07  Anders Carlsson  <andersca@apple.com>
     850
     851        Try to fix the Leopard build once more.
     852
     853        * WebKit.xcodeproj/project.pbxproj:
     854
     8552009-04-07  Anders Carlsson  <andersca@apple.com>
     856
     857        Another attempt at fixing the build.
     858       
     859        * WebKit.xcodeproj/project.pbxproj:
     860
     8612009-04-02  Adele Peterson  <adele@apple.com>
     862
     863        Reviewed by Darin Adler.
     864
     865        * WebKit.xcodeproj/project.pbxproj:
     866        Add WebDOMOperationsInternal.h and make WebDOMOperationsPrivate.h private.
     867
     8682009-04-01  Greg Bolsinga  <bolsinga@apple.com>
     869
     870        Reviewed by Mark Rowe.
     871
     872        https://bugs.webkit.org/show_bug.cgi?id=24990
     873        Put SECTORDER_FLAGS into xcconfig files.
     874
     875        * WebKit.xcodeproj/project.pbxproj:
     876
     8772009-03-27  Darin Adler  <darin@apple.com>
     878
     879        * StringsNotToBeLocalized.txt: Updated for recent changes.
     880
     8812009-03-16  Darin Adler  <darin@apple.com>
     882
     883        Reviewed by Dan Bernstein.
     884
     885        * English.lproj/Localizable.strings: Updated.
     886        * StringsNotToBeLocalized.txt: Updated for recent changes.
     887
     8882009-03-13  Greg Bolsinga  <bolsinga@apple.com>
     889
     890        Reviewed by Simon Fraser.
     891
     892        Update Geolocation perimission dialogs to be asynchronous.
     893        https://bugs.webkit.org/show_bug.cgi?id=24505
     894
     895        Add WebGeolocation, a wrapper around WebCore::Geolocation. It mimics the
     896        coding style set by WebSecurityOrigin.
     897
     898        * WebKit.xcodeproj/project.pbxproj:
     899
     9002009-03-13  Anders Carlsson  <andersca@apple.com>
     901
     902        Reviewed by Dan Bernstein.
     903
     904        <rdar://problem/6610666> Revise the Cocoa event model text API
     905       
     906        Remove nptextinput.h
     907       
     908        * WebKit.xcodeproj/project.pbxproj:
     909
     9102009-03-03  David Kilzer  <ddkilzer@apple.com>
     911
     912        <rdar://problem/6581203> WebCore and WebKit should install the same set of headers during installhdrs phase as build phase
     913
     914        Reviewed by Mark Rowe.
     915
     916        The fix is to add INSTALLHDRS_COPY_PHASE = YES and
     917        INSTALLHDRS_SCRIPT_PHASE = YES to WebKit.xcconfig, then to
     918        make sure various build phase scripts work with the installhdrs
     919        build phase.
     920
     921        * WebKit.xcodeproj/project.pbxproj:
     922        - Added shell code to prevent running "Check For Global
     923          Initializers", "Check For Exit Time Destructors" and "Check
     924          For Weak VTables" scripts during the installhdrs build phase.
     925        - Removed UMBRELLA_FRAMEWORKS_DIR from the Debug and Release
     926          targets since it's no longer needed after defining
     927          WEBCORE_PRIVATE_HEADERS_DIR in WebKit.xcconfig.
     928
     9292009-03-03  David Kilzer  <ddkilzer@apple.com>
     930
     931        Remove last vestiges of JAVASCRIPTCORE_PRIVATE_HEADERS_DIR from WebKit
     932
     933        Reviewed by Adam Roben.
     934
     935        Use of JAVASCRIPTCORE_PRIVATE_HEADERS_DIR was removed in r37465
     936        since NPAPI headers had migrated from JavaScriptCore to WebCore
     937        before that.
     938
     939        * WebKit.xcodeproj/project.pbxproj: Removed
     940        JAVASCRIPTCORE_PRIVATE_HEADERS_DIR build setting from from Debug
     941        and Release configurations.
     942
     9432009-03-02  Anders Carlsson  <andersca@apple.com>
     944
     945        WebNetscapePluginPackage.mm is an Objective-C++ file.
     946
     947        * WebKit.xcodeproj/project.pbxproj:
     948
     9492009-03-02  Anders Carlsson  <andersca@apple.com>
     950
     951        Reviewed by John Sullivan.
     952
     953        Rename WebNetscapePluginPackage.m to WebNetscapePluginPackage.mm
     954       
     955        * WebKit.xcodeproj/project.pbxproj:
     956
     9572009-02-20  Anders Carlsson  <andersca@apple.com>
     958
     959        Reviewed by Dan Bernstein.
     960
     961        Add new files.
     962       
     963        * WebKit.xcodeproj/project.pbxproj:
     964
     9652009-02-13  Darin Adler  <darin@apple.com>
     966
     967        * StringsNotToBeLocalized.txt: Updated for recent changes.
     968
     9692009-02-07  Darin Adler  <darin@apple.com>
     970
     971        * StringsNotToBeLocalized.txt: Updated for recent changes.
     972
     9732009-02-04  Timothy Hatcher  <timothy@apple.com>
     974
     975        Removed the WebDefaultScriptDebugDelegate now that we have CallScriptDebugDelegate.
     976
     977        <rdar://problem/6508457> Launching widget in Dashcode debugger is
     978        super-slow due forwardInvocation: calling debug delegate
     979
     980        Reviewed by Oliver Hunt.
     981
     982        * WebKit.xcodeproj/project.pbxproj:
     983
     9842009-02-02  Anders Carlsson  <andersca@apple.com>
     985
     986        Reviewed by Dan Bernstein.
     987       
     988        Remove WebKitPluginContainerView.{h|mm}, they aren't used anywhere.
     989       
     990        * WebKit.xcodeproj/project.pbxproj:
     991
     9922009-01-26  Mark Rowe  <mrowe@apple.com>
     993
     994        Rubber-stamped by Sam Weinig.
     995
     996        Clean up after r40240.
     997
     998        * WebKit.xcodeproj/project.pbxproj: Reinstate WebKitPluginHost.defs.
     999
     10002009-01-25  Darin Adler  <darin@apple.com>
     1001
     1002        Try to fix full build on Mac Leopard.
     1003
     1004        * WebKit.xcodeproj/project.pbxproj: Removed WebKitPluginClient.defs from the WebKit target.
     1005        Maybe this is temporary, but I had to do it to get the full build to succeed.
     1006
     10072009-01-25  Mark Rowe  <mrowe@apple.com>
     1008
     1009        Rubber-stamped by Dan Bernstein.
     1010
     1011        Improve the consistency of settings in our .xcconfig files.
     1012
     1013        * WebKit.xcodeproj/project.pbxproj:
     1014
     10152009-01-23  Brady Eidson  <beidson@apple.com>
     1016
     1017        Rubberstamped by Darin Adler
     1018
     1019        Rename CachedPagePlatformData to CachedFramePlatformData to more accurately reflect its true role.
     1020
     1021        * WebKit.xcodeproj/project.pbxproj:
     1022
     10232009-01-20  Anders Carlsson  <andersca@apple.com>
     1024
     1025        Reviewed by Sam Weinig.
     1026
     1027        Add ProxyInstance files.
     1028       
     1029        * WebKit.xcodeproj/project.pbxproj:
     1030
    110312009-01-04  David Kilzer  <ddkilzer@apple.com>
    21032
  • trunk/src/3rdparty/webkit/WebKit/LICENSE

    r2 r561  
    1 Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
     1Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
    22
    33Redistribution and use in source and binary forms, with or without
    44modification, are permitted provided that the following conditions
    55are met:
    6 
    761.  Redistributions of source code must retain the above copyright
    8     notice, this list of conditions and the following disclaimer. 
     7    notice, this list of conditions and the following disclaimer.
    982.  Redistributions in binary form must reproduce the above copyright
    109    notice, this list of conditions and the following disclaimer in the
    11     documentation and/or other materials provided with the distribution.
    12 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
    13     its contributors may be used to endorse or promote products derived
    14     from this software without specific prior written permission.
     10    documentation and/or other materials provided with the distribution.
    1511
    16 THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
     12THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
    1713EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    1814WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    19 DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
     15DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
    2016DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    2117(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    22 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    23 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    24 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    25 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     18LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
     19ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     20(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
     21SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  • trunk/src/3rdparty/webkit/WebKit/StringsNotToBeLocalized.txt

    r2 r561  
    88" Mac OS X %@; %@) AppleWebKit/%@ (KHTML, like Gecko) %@"
    99" Mac OS X %@; %@) AppleWebKit/%@ (KHTML, like Gecko)"
    10 " webViewDrawResizer delegate call"
     10" Version/3.2.1"
    1111"#"
    1212"%"
     
    4343"-"
    4444"-1px"
     45"-createPluginMIMETypesPreferences"
    4546"-khtml-text-decorations-in-effect"
    4647"."
     
    4849".download"
    4950".html"
     51".jpg"
    5052".svg"
    5153".xhtml"
     
    5355"/Frameworks/PDFKit.framework"
    5456"/Library/Internet Plug-Ins"
    55 "/System/Library/Frameworks/Accelerate.framework/Accelerate"
    5657"/System/Library/Frameworks/ApplicationServices.framework/Frameworks/LangAnalysis.framework/LangAnalysis"
    5758"/System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/HIToolbox"
     
    5960"/tmp/XXXXXX.tiff"
    6061"0"
     62"062AEEE3-9E42-44DC-A8A9-236B216FE011"
    6163"1"
    6264"1000"
     
    7274"6EB8D98F-2723-4472-88D3-5936F9D6E631"
    7375"7"
     76"7.1"
    7477"9"
    7578":"
    7679"://"
    7780":/?#"
     81";"
    7882"<!"
    7983"<%@ %@>"
     
    9397"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-."
    9498"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+.-"
     99"ARIAApplicationLog"
     100"ARIAApplicationMarquee"
     101"ARIAApplicationStatus"
     102"ARIAApplicationTimer"
     103"ARIADocument"
     104"ARIADocumentArticle"
     105"ARIADocumentNote"
     106"ARIADocumentRegion"
     107"ARIALandmarkApplication"
     108"ARIALandmarkBanner"
     109"ARIALandmarkComplementary"
     110"ARIALandmarkContentInfo"
     111"ARIALandmarkMain"
     112"ARIALandmarkNavigation"
     113"ARIALandmarkSearch"
     114"ARIAUserInterfaceTooltip"
    95115"AXEnhancedUserInterface"
     116"AccessibleBase"
    96117"AccessibleObjectFromWindow"
    97118"AllowsUndo"
     
    100121"AppleLanguages"
    101122"AppleTextDirection"
     123"AudioElement"
    102124"BEGIN:VCALENDAR"
    103125"BEGIN:VCARD"
    104126"BP_CreatePluginMIMETypesPreferences"
    105127"CFDictionaryPropertyBag"
    106 "CFNetwork"
    107 "CFNetwork_debug"
    108 "CFURLCacheCopySharedURLCache"
    109128"CSS"
     129"Change Back to \\U201C%@\\U201D"
    110130"Content-Encoding"
    111131"Content-Length"
    112132"Content-Type"
     133"CurrentTimeDisplay"
     134"D"
    113135"DCMDictionaryServiceWindowShow"
    114136"DELEGATE METHODS"
    115137"DOCBASE"
     138"DOMHTMLObjectElement"
     139"DOMNode"
    116140"DYLD_FRAMEWORK_PATH"
    117141"DefaultDownloadDelegate"
     
    121145"DeleteWordBackward"
    122146"DeleteWordForward"
     147"DisableWebKitDeveloperExtras"
    123148"FD3B2381-0BB6-4B59-AF09-0E599C8901CF"
    124149"FastMallocFreeSizeInCaches"
     
    127152"FastMallocReturnedSize"
    128153"FrameName"
     154"FullscreenButton"
    129155"GEN_DOMObject"
     156"GET"
    130157"GroupName"
    131158"HIDictionaryWindowShow"
     159"HTTP "
    132160"Helvetica"
     161"HostedNetscapePluginStream"
    133162"IDNScriptWhiteList"
    134163"IDNScriptWhiteList.txt"
     
    146175"ImmSetCandidateWindow"
    147176"ImmSetOpenStatus"
     177"IncludeDebugMenu"
    148178"InsertBacktab"
    149179"InsertNewline"
     
    154184"JavaScriptHeapSize"
    155185"Joy!peff"
    156 "KWQScrollBar"
    157186"LTR"
    158187"Library/Caches"
    159188"Library/Internet Plug-Ins"
    160189"LresultFromObject"
    161 "Lucida Grande"
    162 "MIMEType"
    163190"MIME\\Database\\Content Type"
    164191"MainPageJavaScript.js"
    165192"MemoryStream"
     193"MenuCommands"
     194"Microsoft/com.microsoft.Messenger"
    166195"MoveDown"
    167196"MoveDownAndModifySelection"
     
    190219"Mozilla/5.0 (Macintosh; U; "
    191220"Mozilla/5.0 (Windows; U; %s; %s) AppleWebKit/%s (KHTML, like Gecko)%s%s"
     221"MuteButton"
    192222"NP_GetEntryPoints"
    193223"NP_Initialize"
     
    202232"NSView"
    203233"NeXT smart paste pasteboard type"
     234"NetscapePluginInstanceProxy"
    204235"PDFDocument"
    205236"PDFPreviewView"
     
    208239"PDFViewDisplayModeChanged"
    209240"PDFViewScaleChanged"
     241"PNG"
    210242"POST"
    211243"PPC"
     244"PauseButton"
     245"PlayButton"
    212246"Quartz.framework"
    213247"RTL"
    214248"Referer"
     249"ReturnToRealtimeButton"
     250"RewindButton"
    215251"SAMILang"
    216252"SAMIStyle"
    217253"Safari.exe"
     254"SeekBackButton"
     255"SeekForwardButton"
     256"SelectAll"
     257"Slider"
     258"SliderThumb"
     259"StatusDisplay"
     260"TimeRemainingDisplay"
    218261"Times"
    219262"ToggleBold"
     
    222265"U+001B"
    223266"UTF-8"
     267"UnMuteButton"
    224268"UseBackForwardList"
    225269"User-Agent"
     270"VideoElement"
    226271"Volumes"
     272"W"
    227273"WEBKIT_UNSET_DYLD_FRAMEWORK_PATH"
    228274"WebActionButtonKey"
     
    271317"WebError"
    272318"WebFrame"
     319"WebFrameCanSuspendActiveDOMObjectsKey"
     320"WebFrameHasPluginsKey"
     321"WebFrameHasUnloadListenerKey"
     322"WebFrameMainDocumentErrorKey"
    273323"WebFramePolicyListener"
     324"WebFrameUsesApplicationCacheKey"
     325"WebFrameUsesDatabasesKey"
     326"WebFrameUsesGeolocationKey"
    274327"WebHTMLRepresentation"
    275328"WebHistory"
     
    300353"WebJavaScriptTextInputPanel"
    301354"WebKitClassFactory"
     355"WebKitDeveloperExtras"
    302356"WebKitErrorDomain"
    303357"WebKitErrorMIMETypeKey"
     
    306360"WebKitHistoryAgeInDaysLimit"
    307361"WebKitHistoryItemLimit"
    308 "WebKitInspectorAttached"
    309 "WebKitInspectorAttachedViewHeight"
     362"WebKitInspectorHiddenPanels"
     363"WebKitLocalCache"
    310364"WebKitLogLevel"
    311365"WebKitOmitPDFSupport"
     
    348402"WebPluginWillPresentNativeUserInterface"
    349403"WebPreferences"
     404"WebPreferences%d"
     405"WebPreferencesChangedNotification"
     406"WebPreferencesRemovedNotification"
    350407"WebProgressEstimateChangedNotification"
    351408"WebProgressFinishedNotification"
     
    359416"WebResourceTextEncodingName"
    360417"WebResourceURL"
    361 "WebScriptCallFrame"
    362 "WebScriptDebugServer"
    363418"WebScriptErrorDescription"
    364419"WebScriptErrorDomain"
     
    376431"WebURLProtectionSpace"
    377432"WebURLResponse"
     433"WebURLsWithTitlesPboardType"
    378434"WebView"
    379435"WebViewDidBeginEditingNotification"
     
    383439"WebViewDidEndEditingNotification"
    384440"WebViewWindowClass"
     441"WebWorkersPrivate"
     442"Windows %d.%d"
     443"Windows 95"
     444"Windows 98"
     445"Windows 98; Win 9x 4.90"
     446"Windows NT %d.%d"
    385447"XSL"
    386448"XXXXXX-"
     
    400462"\r"
    401463"\xFF\xD8\xFF\xE0"
     464"_isUsingAcceleratedCompositing"
    402465"_top"
    403466"a"
    404467"ab"
    405468"about:"
     469"actions"
     470"anchorPoint"
    406471"applewebdata"
    407472"applewebdata://%@"
     473"application.pdf"
    408474"application/atom+xml"
    409475"application/octet-stream"
     
    419485"b"
    420486"basefont"
     487"bounds"
    421488"bundlePath"
    422489"c"
     
    424491"canGoForward"
    425492"com.RealNetworks.RealOne Player"
     493"com.adiumX.adiumX"
    426494"com.adobe.Acrobat"
    427495"com.adobe.Acrobat.Pro"
     
    434502"com.adobe.distiller"
    435503"com.adobe.dreamweaver-9.0"
     504"com.alientechnology.Proteus"
     505"com.app4mac.KidsBrowsercom.app4mac.wKiosk"
    436506"com.apple.Aperture"
    437507"com.apple.AppKit"
     508"com.apple.Automator"
     509"com.apple.Automator."
     510"com.apple.AutomatorRunner"
     511"com.apple.Dashcode"
    438512"com.apple.Dictionary"
    439513"com.apple.HIWebView"
     
    441515"com.apple.JavaPluginCocoa"
    442516"com.apple.KeyboardUIModeDidChange"
     517"com.apple.Mail"
    443518"com.apple.QuickTime Plugin.plugin"
    444519"com.apple.Safari"
     
    446521"com.apple.WebKit"
    447522"com.apple.WebKit.PluginAgent"
     523"com.apple.Xcode"
     524"com.apple.dashboard.client"
     525"com.apple.helpviewer"
    448526"com.apple.hiview"
     527"com.apple.iChat"
    449528"com.apple.iWeb"
     529"com.apple.installer"
    450530"com.apple.mail"
    451531"com.apple.quicktime.webplugin"
    452532"com.apple.universalaccess"
     533"com.barebones.bbedit"
     534"com.barebones.textwrangler"
     535"com.barebones.yojimbo"
     536"com.culturedcode.xyle"
     537"com.e-frontier.shade10"
     538"com.equinux.iSale4"
     539"com.equinux.iSale5"
     540"com.freeverse.bumpercar"
     541"com.growl.growlframework"
     542"com.intrarts.PandoraMan"
     543"com.karelia.Sandvox"
    453544"com.lizardtech.NPDjVu"
     545"com.macrabbit.CSSEdit"
     546"com.macromates.textmate"
     547"com.macromedia.Flash Player.plugin"
    454548"com.macromedia.fireworks"
     549"com.microsoft.SilverlightPlugin"
    455550"com.microsoft.WMP.defaultplugin"
    456 "copyData"
     551"com.omnigroup.OmniWeb5"
     552"com.panic.Coda"
     553"com.ranchero.NetNewsWire"
     554"com.realmacsoftware.rapidweaverpro"
     555"com.red-sweater.marsedit"
     556"com.sunrisebrowser.Sunrise"
     557"com.thinkmac.NewsLife"
     558"com.yahoo.messenger3"
     559"contents"
     560"contentsRect"
     561"cp949"
    457562"cpuType"
     563"de.codingmonkeys.SubEthaEdit"
    458564"dir"
    459565"displayTitle"
     
    461567"en"
    462568"estimatedProgress"
    463 "eval"
     569"fi.karppinen.Pyro"
    464570"file:"
    465571"frameName"
    466572"ftp:"
     573"fullFrame"
     574"groupName"
    467575"htm"
    468576"html"
     577"http"
     578"http:"
    469579"http://"
    470580"http://www.google.com/search?q="
    471581"https"
     582"https:"
    472583"i"
    473584"icon.db"
     
    481592"image/tiff"
    482593"img"
     594"info.colloquy"
    483595"insertText:"
     596"inspectorStartsAttached"
    484597"isLoading"
    485598"isindex"
    486599"javascript:"
     600"jpeg"
    487601"js"
     602"kioskmode"
     603"ks_c_5601-1987"
     604"kungfoo.tv.ecto"
    488605"lastVisitWasFailure"
     606"lastVisitWasHTTPNonGet"
    489607"lastVisitedDate"
    490608"line-through"
     
    498616"mainFrameTitle"
    499617"mainFrameURL"
    500 "mainResource"
    501618"mimeType"
     619"missingImage"
    502620"name: %@\npath: %@\nmimeTypes:\n%@\npluginDescription:%@"
     621"net.hmdt-web.Shiira"
     622"nullPlugin"
    503623"nullplugin"
    504624"oleacc.dll"
     625"opacity"
     626"org.xlife.NewsFire"
     627"panEastCursor"
     628"panIcon"
     629"panNorthCursor"
     630"panNorthEastCursor"
     631"panNorthWestCursor"
     632"panSouthCursor"
     633"panSouthEastCursor"
     634"panSouthWestCursor"
     635"panWestCursor"
    505636"pluginHostPath"
    506637"pluginspage"
     638"position"
     639"public.url"
     640"public.url-name"
    507641"r"
    508642"r+b"
     643"redirectURLs"
    509644"rgb(%.0f,%.0f,%.0f)"
    510645"rgba(%.0f,%.0f,%.0f,%f)"
    511646"s"
     647"searchCancel"
     648"searchCancelPressed"
     649"searchMagnifier"
     650"searchMagnifierResults"
    512651"sourceURL"
    513652"src"
    514653"sub"
    515 "subframeArchives"
    516 "subresources"
     654"sublayerTransform"
     655"sublayers"
    517656"text/calendar"
    518657"text/directory"
     
    531670"text/x-vcard"
    532671"text/x-vcf"
    533 "textEncodingName"
     672"textAreaResizeCorner"
    534673"tiff"
     674"transform"
    535675"txt"
    536676"u"
     677"uk.co.opencommunity.vienna2"
    537678"userAgent"
     679"userInfo"
    538680"utf-16"
    539 "vImagePermuteChannels_ARGB8888"
     681"verticalTextCursor"
     682"visibleName"
    540683"visitCount"
    541684"webkit-fake-url"
     
    545688"xml"
    546689"xsl"
     690"zoomInCursor"
     691"zoomOutCursor"
    547692"{A3676398-4485-4a9d-87DC-CB5A40E6351D}"
    548693"~/Library/Icons"
     
    551696WebKit/mac/History/WebHistoryItem.mm:"children"
    552697WebKit/mac/History/WebHistoryItem.mm:"title"
    553 WebKit/mac/History/WebURLsWithTitles.h:"WebURLsWithTitlesPboardType"
    554698WebKit/mac/Misc/WebCache.mm:"Images"
    555699WebKit/mac/Misc/WebKitLogging.h:"<not running on main thread>"
    556700WebKit/mac/Misc/WebKitVersionChecks.m:"WebKit"
    557 WebKit/mac/Misc/WebNSNotificationCenterExtras.m
    558 WebKit/mac/Misc/WebNSObjectExtras.mm:"selector"
    559 WebKit/mac/Misc/WebNSObjectExtras.mm:"value"
    560 WebKit/mac/Misc/WebNSPasteboardExtras.mm
     701WebKit/mac/Misc/WebNSNotificationCenterExtras.m:"name"
     702WebKit/mac/Misc/WebNSNotificationCenterExtras.m:"object"
    561703WebKit/mac/Misc/WebNSURLExtras.mm:"file"
    562704WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm:" OK\n"
    563705WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm:": "
    564 WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm:"HTTP "
    565706WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm:"identity"
     707WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm:"localization"
    566708WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm:" OK\n"
    567709WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm:": "
    568 WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm:"HTTP "
    569710WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm:"identity"
     711WebKit/mac/Plugins/WebBaseNetscapePluginView.mm:"DIRECT"
     712WebKit/mac/Plugins/WebBaseNetscapePluginView.mm:"PROXY "
     713WebKit/mac/Plugins/WebBaseNetscapePluginView.mm:"SOCKS "
     714WebKit/mac/Plugins/WebBaseNetscapePluginView.mm:"basic"
     715WebKit/mac/Plugins/WebBaseNetscapePluginView.mm:"digest"
     716WebKit/mac/Plugins/WebBaseNetscapePluginView.mm:"true"
    570717WebKit/mac/Plugins/WebBasePluginPackage.mm:"Java Applet Plugin Enabler"
    571 WebKit/mac/Plugins/WebNetscapePluginPackage.m:"RealPlayer Plugin"
    572 WebKit/mac/Plugins/WebNetscapePluginPackage.m:"main"
     718WebKit/mac/Plugins/WebNetscapePluginPackage.mm:"RealPlayer Plugin"
     719WebKit/mac/Plugins/WebNetscapePluginPackage.mm:"main"
    573720WebKit/mac/Plugins/WebNetscapePluginView.mm:"height"
    574721WebKit/mac/Plugins/WebNetscapePluginView.mm:"width"
    575 WebKit/mac/Plugins/nptextinput.h
    576722WebKit/mac/WebCoreSupport/WebChromeClient.mm:"dialog"
    577723WebKit/mac/WebCoreSupport/WebChromeClient.mm:"fullscreen"
     
    590736WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm:"height"
    591737WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm:"width"
     738WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"Menlo"
     739WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"Monaco"
    592740WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"Web Inspector 2"
    593741WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"inspector"
    594 WebKit/mac/WebView/WebArchive.mm:"result"
    595742WebKit/mac/WebView/WebHTMLView.mm:"'%@'"
    596743WebKit/mac/WebView/WebHTMLView.mm:"Version:"
     
    618765WebKit/mac/WebView/WebHTMLView.mm:"white"
    619766WebKit/mac/WebView/WebPreferenceKeysPrivate.h
    620 WebKit/mac/WebView/WebPreferences.mm
    621 WebKit/mac/WebView/WebResource.mm:"URL"
    622 WebKit/mac/WebView/WebResource.mm:"data"
    623 WebKit/mac/WebView/WebResource.mm:"response"
    624 WebKit/mac/WebView/WebResource.mm:"result"
     767WebKit/mac/WebView/WebPreferences.mm:"Apple Chancery"
     768WebKit/mac/WebView/WebPreferences.mm:"Courier"
     769WebKit/mac/WebView/WebPreferences.mm:"ISO-8859-1"
     770WebKit/mac/WebView/WebPreferences.mm:"Identifier"
     771WebKit/mac/WebView/WebPreferences.mm:"Papyrus"
     772WebKit/mac/WebView/WebPreferences.mm:"Values"
    625773WebKit/mac/WebView/WebView.mm:"At least one WebView is still open."
    626774WebKit/mac/WebView/WebView.mm:"At least one WebView was closed with fast teardown."
     
    628776WebKit/mac/WebView/WebView.mm:"Search With Google"
    629777WebKit/mac/WebView/WebView.mm:"control"
     778WebKit/mac/WebView/WebView.mm:"data"
     779WebKit/mac/WebView/WebView.mm:"decoder"
     780WebKit/mac/WebView/WebView.mm:"frame"
    630781WebKit/mac/WebView/WebView.mm:"return "
    631 WebKit/win/AccessibleBase.cpp
    632 WebKit/win/DOMCoreClasses.h
     782WebKit/win/AccessibleBase.cpp:"Alt+"
     783WebKit/win/AccessibleBase.cpp:"Ctrl+"
     784WebKit/win/AccessibleBase.cpp:"Description: "
     785WebKit/win/AccessibleBase.cpp:"Shift+"
     786WebKit/win/AccessibleBase.cpp:"Win+"
    633787WebKit/win/ProgIDMacros.h:"OpenSource"
    634788WebKit/win/ProgIDMacros.h:"WebKit."
     
    636790WebKit/win/WebCache.cpp:"scripts"
    637791WebKit/win/WebCache.cpp:"style sheets"
     792WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"Courier New"
    638793WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"Web Inspector "
    639794WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"Web Inspector"
     
    641796WebKit/win/WebDatabaseManager.cpp:"Databases"
    642797WebKit/win/WebHistoryItem.cpp:"title"
    643 WebKit/win/WebKitDLL.cpp
    644798WebKit/win/WebPreferenceKeysPrivate.h
    645799WebKit/win/WebPreferences.cpp:"Arial"
     
    647801WebKit/win/WebPreferences.cpp:"Courier New"
    648802WebKit/win/WebPreferences.cpp:"Times New Roman"
    649 WebKit/win/WebScriptCallFrame.cpp:"False"
    650 WebKit/win/WebScriptCallFrame.cpp:"True"
    651 WebKit/win/WebScriptCallFrame.cpp:"undefined"
    652803WebKit/win/WebURLResponse.cpp:"Extension"
    653804WebKit/win/WebView.cpp:"Cancel"
     
    657808WebKit/win/WebView.cpp:"Paste"
    658809WebKit/win/WebView.cpp:"Redo"
    659 WebKit/win/WebView.cpp:"SelectAll"
    660810WebKit/win/WebView.cpp:"Undo"
    661 WebKit/win/WebView.cpp:"Windows %d.%d"
    662 WebKit/win/WebView.cpp:"Windows 95"
    663 WebKit/win/WebView.cpp:"Windows 98"
    664 WebKit/win/WebView.cpp:"Windows 98; Win 9x 4.90"
    665 WebKit/win/WebView.cpp:"Windows NT %d.%d"
    666811WebKit/win/WebView.cpp:"about"
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/headers.pri

    r2 r561  
    11WEBKIT_API_HEADERS = $$PWD/qwebframe.h \
     2                     $$PWD/qgraphicswebview.h \
    23                     $$PWD/qwebkitglobal.h \
    34                     $$PWD/qwebpage.h \
     
    67                     $$PWD/qwebhistoryinterface.h \
    78                     $$PWD/qwebdatabase.h \
    8                      $$PWD/qwebsecurityorigin.h
     9                     $$PWD/qwebsecurityorigin.h \
     10                     $$PWD/qwebelement.h \
     11                     $$PWD/qwebpluginfactory.h \
     12                     $$PWD/qwebhistory.h \
     13                     $$PWD/qwebinspector.h \
     14                     $$PWD/qwebkitversion.h
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp

    r2 r561  
    2020#include "config.h"
    2121#include "qwebdatabase.h"
     22
    2223#include "qwebdatabase_p.h"
    2324#include "qwebsecurityorigin.h"
     
    3334    \brief The QWebDatabase class provides access to HTML 5 databases created with JavaScript.
    3435
     36    \inmodule QtWebKit
     37
    3538    The upcoming HTML 5 standard includes support for SQL databases that web sites can create and
    36     access on a local computer through JavaScript. QWebDatabase is the C++ interface to these databases.
     39    access on a local computer through JavaScript. QWebDatabase is the C++ interface to these
     40    databases.
    3741
    38     For more information refer to the \l{http://www.w3.org/html/wg/html5/#sql}{HTML 5 Draft Standard}.
     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().
     44
     45    WebKit uses SQLite to create and access the local SQL databases. The location of the database
     46    file in the local file system is returned by fileName(). You can access the database directly
     47    through the QtSql database module.
     48
     49    For each database the web site can define an expectedSize(). The current size of the database
     50    in bytes is returned by size().
     51
     52    For more information refer to the \l{http://dev.w3.org/html5/webdatabase/}{HTML 5 Draft Standard}.
    3953
    4054    \sa QWebSecurityOrigin
     
    4458    Constructs a web database from \a other.
    4559*/
    46 QWebDatabase::QWebDatabase(const QWebDatabase& other) : d(other.d)
     60QWebDatabase::QWebDatabase(const QWebDatabase& other)
     61    : d(other.d)
    4762{
    4863}
     
    7085QString QWebDatabase::displayName() const
    7186{
     87#if ENABLE(DATABASE)
    7288    DatabaseDetails details = DatabaseTracker::tracker().detailsForNameAndOrigin(d->name, d->origin.get());
    7389    return details.displayName();
     90#else
     91    return QString();
     92#endif
    7493}
    7594
     
    7998qint64 QWebDatabase::expectedSize() const
    8099{
     100#if ENABLE(DATABASE)
    81101    DatabaseDetails details = DatabaseTracker::tracker().detailsForNameAndOrigin(d->name, d->origin.get());
    82102    return details.expectedUsage();
     103#else
     104    return 0;
     105#endif
    83106}
    84107
     
    88111qint64 QWebDatabase::size() const
    89112{
     113#if ENABLE(DATABASE)
    90114    DatabaseDetails details = DatabaseTracker::tracker().detailsForNameAndOrigin(d->name, d->origin.get());
    91115    return details.currentUsage();
     116#else
     117    return 0;
     118#endif
    92119}
    93120
     
    115142
    116143    \note Concurrent access to a database from multiple threads or processes
    117     is not very efficient because Sqlite is used as WebKit's database backend.
     144    is not very efficient because SQLite is used as WebKit's database backend.
    118145*/
    119146QString QWebDatabase::fileName() const
    120147{
     148#if ENABLE(DATABASE)
    121149    return DatabaseTracker::tracker().fullPathForDatabase(d->origin.get(), d->name, false);
     150#else
     151    return QString();
     152#endif
    122153}
    123154
     
    133164
    134165/*!
    135     Removes the database, \a db, from its security origin. All data stored in this database
    136     will be destroyed.
     166    Removes the database \a db from its security origin. All data stored in the
     167    database \a db will be destroyed.
    137168*/
    138 void QWebDatabase::removeDatabase(const QWebDatabase &db)
     169void QWebDatabase::removeDatabase(const QWebDatabase& db)
    139170{
     171#if ENABLE(DATABASE)
    140172    DatabaseTracker::tracker().deleteDatabase(db.d->origin.get(), db.d->name);
     173#endif
     174}
     175
     176/*!
     177  \since 4.6
     178
     179  Deletes all web databases in the configured offline storage path.
     180
     181  \sa QWebSettings::setOfflineStoragePath()
     182*/
     183void QWebDatabase::removeAllDatabases()
     184{
     185#if ENABLE(DATABASE)
     186    DatabaseTracker::tracker().deleteAllDatabases();
     187#endif
    141188}
    142189
     
    147194{
    148195}
     196
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.h

    r2 r561  
    3232class QWebSecurityOrigin;
    3333
    34 class QWEBKIT_EXPORT QWebDatabase
    35 {
     34class QWEBKIT_EXPORT QWebDatabase {
    3635public:
    3736    QWebDatabase(const QWebDatabase& other);
     
    4645    QWebSecurityOrigin origin() const;
    4746
    48     static void removeDatabase(const QWebDatabase &db);
     47    static void removeDatabase(const QWebDatabase&);
     48    static void removeAllDatabases();
    4949
    5050private:
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase_p.h

    r2 r561  
    2828
    2929
    30 class QWebDatabasePrivate : public QSharedData
    31 {
     30class QWebDatabasePrivate : public QSharedData {
    3231public:
    3332    WebCore::String name;
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp

    r2 r561  
    2121#include "config.h"
    2222#include "qwebframe.h"
     23
     24#include "CallFrame.h"
     25#include "Document.h"
     26#include "DocumentLoader.h"
     27#include "DragData.h"
     28#include "Element.h"
     29#include "FocusController.h"
     30#include "Frame.h"
     31#include "FrameLoaderClientQt.h"
     32#include "FrameTree.h"
     33#include "FrameView.h"
     34#include "GCController.h"
     35#include "GraphicsContext.h"
     36#include "HTMLMetaElement.h"
     37#include "HitTestResult.h"
     38#include "IconDatabase.h"
     39#include "InspectorController.h"
     40#include "JSDOMBinding.h"
     41#include "JSDOMWindowBase.h"
     42#include "JSLock.h"
     43#include "JSObject.h"
     44#include "NodeList.h"
     45#include "Page.h"
     46#include "PlatformMouseEvent.h"
     47#include "PlatformWheelEvent.h"
     48#include "PrintContext.h"
     49#include "PutPropertySlot.h"
     50#include "RenderTreeAsText.h"
     51#include "RenderView.h"
     52#include "ResourceRequest.h"
     53#include "ScriptController.h"
     54#include "ScriptSourceCode.h"
     55#include "ScriptValue.h"
     56#include "Scrollbar.h"
     57#include "SelectionController.h"
     58#include "SubstituteData.h"
     59#include "htmlediting.h"
     60#include "markup.h"
     61#include "qt_instance.h"
     62#include "qt_runtime.h"
     63#include "qwebelement.h"
     64#include "qwebframe_p.h"
    2365#include "qwebpage.h"
    2466#include "qwebpage_p.h"
    25 #include "qwebframe_p.h"
    2667#include "qwebsecurityorigin.h"
    2768#include "qwebsecurityorigin_p.h"
    28 
    29 #include "DocumentLoader.h"
    30 #include "FocusController.h"
    31 #include "FrameLoaderClientQt.h"
    32 #include "Frame.h"
    33 #include "FrameTree.h"
    34 #include "FrameView.h"
    35 #include "IconDatabase.h"
    36 #include "InspectorController.h"
    37 #include "Page.h"
    38 #include "PutPropertySlot.h"
    39 #include "ResourceRequest.h"
    40 #include "RenderView.h"
    41 #include "SelectionController.h"
    42 #include "Scrollbar.h"
    43 #include "PrintContext.h"
    44 #include "SubstituteData.h"
    45 
    46 #include "markup.h"
    47 #include "RenderTreeAsText.h"
    48 #include "Element.h"
    49 #include "Document.h"
    50 #include "DragData.h"
    51 #include "RenderView.h"
    52 #include "GraphicsContext.h"
    53 #include "PlatformMouseEvent.h"
    54 #include "PlatformWheelEvent.h"
    55 #include "GraphicsContext.h"
    56 #include "HitTestResult.h"
    57 
    58 #include "CallFrame.h"
    59 #include "JSDOMBinding.h"
    60 #include "JSDOMWindow.h"
    61 #include "JSLock.h"
    62 #include "JSObject.h"
    63 #include "qt_instance.h"
    64 #include "qt_runtime.h"
    6569#include "runtime.h"
    6670#include "runtime_object.h"
    6771#include "runtime_root.h"
    68 #include "ScriptController.h"
    69 #include "ScriptSourceCode.h"
    70 #include "ScriptValue.h"
    71 
    7272#include "wtf/HashMap.h"
    73 
     73#include <QMultiMap>
    7474#include <qdebug.h>
    7575#include <qevent.h>
    7676#include <qfileinfo.h>
    7777#include <qpainter.h>
    78 #include <QMultiMap>
     78#include <qprinter.h>
     79#include <qregion.h>
     80
     81#if QT_VERSION < 0x040400
     82#include "qwebnetworkinterface.h"
     83#endif
     84
    7985#if QT_VERSION >= 0x040400
    8086#include <qnetworkrequest.h>
    81 #else
    82 #include "qwebnetworkinterface.h"
    8387#endif
    84 #include <qregion.h>
    85 #include <qprinter.h>
    86 #include "HTMLMetaElement.h"
    87 #include "NodeList.h"
    8888
    8989using namespace WebCore;
     
    9696void QWEBKIT_EXPORT qt_drt_setJavaScriptProfilingEnabled(QWebFrame* qframe, bool enabled)
    9797{
     98#if ENABLE(JAVASCRIPT_DEBUGGER)
    9899    Frame* frame = QWebFramePrivate::core(qframe);
    99100    InspectorController* controller = frame->page()->inspectorController();
     
    104105    else
    105106        controller->disableProfiler();
    106 }
    107 
    108 void QWebFramePrivate::init(QWebFrame *qframe, WebCore::Page *webcorePage, QWebFrameData *frameData)
     107#endif
     108}
     109
     110// Pause a given CSS animation or transition on the target node at a specific time.
     111// If the animation or transition is already paused, it will update its pause time.
     112// This method is only intended to be used for testing the CSS animation and transition system.
     113bool QWEBKIT_EXPORT qt_drt_pauseAnimation(QWebFrame *qframe, const QString &animationName, double time, const QString &elementId)
     114{
     115    Frame* frame = QWebFramePrivate::core(qframe);
     116    if (!frame)
     117        return false;
     118
     119    AnimationController* controller = frame->animation();
     120    if (!controller)
     121        return false;
     122
     123    Document* doc = frame->document();
     124    Q_ASSERT(doc);
     125
     126    Node* coreNode = doc->getElementById(elementId);
     127    if (!coreNode || !coreNode->renderer())
     128        return false;
     129
     130    return controller->pauseAnimationAtTime(coreNode->renderer(), animationName, time);
     131}
     132
     133bool QWEBKIT_EXPORT qt_drt_pauseTransitionOfProperty(QWebFrame *qframe, const QString &propertyName, double time, const QString &elementId)
     134{
     135    Frame* frame = QWebFramePrivate::core(qframe);
     136    if (!frame)
     137        return false;
     138
     139    AnimationController* controller = frame->animation();
     140    if (!controller)
     141        return false;
     142
     143    Document* doc = frame->document();
     144    Q_ASSERT(doc);
     145
     146    Node* coreNode = doc->getElementById(elementId);
     147    if (!coreNode || !coreNode->renderer())
     148        return false;
     149
     150    return controller->pauseTransitionAtTime(coreNode->renderer(), propertyName, time);
     151}
     152
     153// Returns the total number of currently running animations (includes both CSS transitions and CSS animations).
     154int QWEBKIT_EXPORT qt_drt_numberOfActiveAnimations(QWebFrame *qframe)
     155{
     156    Frame* frame = QWebFramePrivate::core(qframe);
     157    if (!frame)
     158        return false;
     159
     160    AnimationController* controller = frame->animation();
     161    if (!controller)
     162        return false;
     163
     164    return controller->numberOfActiveAnimations();
     165}
     166
     167void QWEBKIT_EXPORT qt_drt_clearFrameName(QWebFrame* qFrame)
     168{
     169    Frame* frame = QWebFramePrivate::core(qFrame);
     170    frame->tree()->clearName();
     171}
     172
     173int QWEBKIT_EXPORT qt_drt_javaScriptObjectsCount()
     174{
     175    return JSDOMWindowBase::commonJSGlobalData()->heap.globalObjectCount();
     176}
     177
     178void QWEBKIT_EXPORT qt_drt_garbageCollector_collect()
     179{
     180    gcController().garbageCollectNow();
     181}
     182
     183void QWEBKIT_EXPORT qt_drt_garbageCollector_collectOnAlternateThread(bool waitUntilDone)
     184{
     185    gcController().garbageCollectOnAlternateThreadForDebugging(waitUntilDone);
     186}
     187
     188// Returns the value of counter in the element specified by \a id.
     189QString QWEBKIT_EXPORT qt_drt_counterValueForElementById(QWebFrame* qFrame, const QString& id)
     190{
     191    Frame* frame = QWebFramePrivate::core(qFrame);
     192    if (Document* document = frame->document()) {
     193        Element* element = document->getElementById(id);
     194        return WebCore::counterValueForElement(element);
     195    }
     196    return QString();
     197}
     198
     199// Suspend active DOM objects in this frame.
     200void QWEBKIT_EXPORT qt_suspendActiveDOMObjects(QWebFrame* qFrame)
     201{
     202    Frame* frame = QWebFramePrivate::core(qFrame);
     203    if (frame->document())
     204        frame->document()->suspendActiveDOMObjects();
     205}
     206           
     207// Resume active DOM objects in this frame.
     208void QWEBKIT_EXPORT qt_resumeActiveDOMObjects(QWebFrame* qFrame)
     209{
     210    Frame* frame = QWebFramePrivate::core(qFrame);
     211    if (frame->document())
     212        frame->document()->resumeActiveDOMObjects();
     213}                       
     214
     215QWebFrameData::QWebFrameData(WebCore::Page* parentPage, WebCore::Frame* parentFrame,
     216                             WebCore::HTMLFrameOwnerElement* ownerFrameElement,
     217                             const WebCore::String& frameName)
     218    : name(frameName)
     219    , ownerElement(ownerFrameElement)
     220    , page(parentPage)
     221    , allowsScrolling(true)
     222    , marginWidth(0)
     223    , marginHeight(0)
     224{
     225    frameLoaderClient = new FrameLoaderClientQt();
     226    frame = Frame::create(page, ownerElement, frameLoaderClient);
     227
     228    // FIXME: All of the below should probably be moved over into WebCore
     229    frame->tree()->setName(name);
     230    if (parentFrame)
     231        parentFrame->tree()->appendChild(frame);
     232}
     233
     234void QWebFramePrivate::init(QWebFrame *qframe, QWebFrameData *frameData)
    109235{
    110236    q = qframe;
     
    113239    marginWidth = frameData->marginWidth;
    114240    marginHeight = frameData->marginHeight;
    115 
    116     frameLoaderClient = new FrameLoaderClientQt();
    117     RefPtr<Frame> newFrame = Frame::create(webcorePage, frameData->ownerElement, frameLoaderClient);
    118     frame = newFrame.get();
     241    frame = frameData->frame.get();
     242    frameLoaderClient = frameData->frameLoaderClient;
    119243    frameLoaderClient->setFrame(qframe, frame);
    120 
    121     // FIXME: All of the below should probably be moved over into WebCore
    122     frame->tree()->setName(frameData->name);
    123     if (QWebFrame* _parentFrame = parentFrame())
    124         QWebFramePrivate::core(_parentFrame)->tree()->appendChild(frame);
    125 
    126     // balanced by adoptRef in FrameLoaderClientQt::createFrame
    127     if (frameData->ownerElement)
    128         frame->ref();
    129244
    130245    frame->init();
     
    145260}
    146261
     262void QWebFramePrivate::renderPrivate(QPainter *painter, QWebFrame::RenderLayer layer, const QRegion &clip)
     263{
     264    if (!frame->view() || !frame->contentRenderer())
     265        return;
     266
     267    QVector<QRect> vector = clip.rects();
     268    if (vector.isEmpty())
     269        return;
     270
     271    GraphicsContext context(painter);
     272    if (context.paintingDisabled() && !context.updatingControlTints())
     273        return;
     274
     275    WebCore::FrameView* view = frame->view();
     276    view->layoutIfNeededRecursive();
     277
     278    for (int i = 0; i < vector.size(); ++i) {
     279        const QRect& clipRect = vector.at(i);
     280        QRect intersectedRect = clipRect.intersected(view->frameRect());
     281
     282        painter->save();
     283        painter->setClipRect(clipRect, Qt::IntersectClip);
     284
     285        int x = view->x();
     286        int y = view->y();
     287
     288        if (layer & QWebFrame::ContentsLayer) {
     289            context.save();
     290
     291            int scrollX = view->scrollX();
     292            int scrollY = view->scrollY();
     293
     294            QRect rect = intersectedRect;
     295            context.translate(x, y);
     296            rect.translate(-x, -y);
     297            context.translate(-scrollX, -scrollY);
     298            rect.translate(scrollX, scrollY);
     299            context.clip(view->visibleContentRect());
     300
     301            view->paintContents(&context, rect);
     302
     303            context.restore();
     304        }
     305
     306        if (layer & QWebFrame::ScrollBarLayer
     307            && !view->scrollbarsSuppressed()
     308            && (view->horizontalScrollbar() || view->verticalScrollbar())) {
     309            context.save();
     310
     311            QRect rect = intersectedRect;
     312            context.translate(x, y);
     313            rect.translate(-x, -y);
     314
     315            view->paintScrollbars(&context, rect);
     316
     317            context.restore();
     318        }
     319
     320        if (layer & QWebFrame::PanIconLayer)
     321            view->paintPanScrollIcon(&context);
     322
     323        painter->restore();
     324    }
     325}
     326
     327static bool webframe_scrollOverflow(WebCore::Frame* frame, int dx, int dy)
     328{
     329    if (!frame || !frame->document() || !frame->eventHandler())
     330        return false;
     331
     332    Node* node = frame->document()->focusedNode();
     333    if (!node)
     334        node = frame->document()->elementFromPoint(frame->eventHandler()->currentMousePosition().x(),
     335                                                   frame->eventHandler()->currentMousePosition().y());
     336    if (!node)
     337        return false;
     338
     339    RenderObject* renderer = node->renderer();
     340    if (!renderer)
     341        return false;
     342
     343    if (renderer->isListBox())
     344        return false;
     345
     346    RenderLayer* renderLayer = renderer->enclosingLayer();
     347    if (!renderLayer)
     348        return false;
     349
     350    bool scrolledHorizontal = false;
     351    bool scrolledVertical = false;
     352
     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    return (scrolledHorizontal || scrolledVertical);
     364}
     365
    147366/*!
    148367    \class QWebFrame
    149368    \since 4.4
    150369    \brief The QWebFrame class represents a frame in a web page.
     370
     371    \inmodule QtWebKit
    151372
    152373    QWebFrame represents a frame inside a web page. Each QWebPage
     
    159380
    160381    The page() function returns a pointer to the web page object. See
    161     \l{Elements of QWebView} for an explanation of how web
     382    \l{QWebView}{Elements of QWebView} for an explanation of how web
    162383    frames are related to a web page and web view.
     384
     385    The QWebFrame class also offers methods to retrieve both the URL currently
     386    loaded by the frame (see url()) as well as the URL originally requested
     387    to be loaded (see requestedUrl()). These methods make possible the retrieval
     388    of the URL before and after a DNS resolution or a redirection occurs during
     389    the load process. The requestedUrl() also matches to the URL added to the
     390    frame history (\l{QWebHistory}) if load is successful.
    163391
    164392    The title of an HTML frame can be accessed with the title() property.
     
    184412*/
    185413
     414/*!
     415    \enum QWebFrame::RenderLayer
     416
     417    This enum describes the layers available for rendering using \l{QWebFrame::}{render()}.
     418    The layers can be OR-ed together from the following list:
     419
     420    \value ContentsLayer The web content of the frame
     421    \value ScrollBarLayer The scrollbars of the frame
     422    \value PanIconLayer The icon used when panning the frame
     423
     424    \value AllLayers Includes all the above layers
     425*/
     426
    186427QWebFrame::QWebFrame(QWebPage *parent, QWebFrameData *frameData)
    187428    : QObject(parent)
     
    189430{
    190431    d->page = parent;
    191     d->init(this, parent->d->page, frameData);
     432    d->init(this, frameData);
    192433
    193434    if (!frameData->url.isEmpty()) {
    194435        WebCore::ResourceRequest request(frameData->url, frameData->referrer);
    195         d->frame->loader()->load(request, frameData->name);
     436        d->frame->loader()->load(request, frameData->name, false);
    196437    }
    197438}
     
    202443{
    203444    d->page = parent->d->page;
    204     d->init(this, parent->d->page->d->page, frameData);
     445    d->init(this, frameData);
    205446}
    206447
     
    225466    javaScriptWindowObjectCleared() signal.
    226467
     468    If Javascript is not enabled for this page, then this method does nothing.
     469
    227470    The \a object will never be explicitly deleted by QtWebKit.
    228471*/
     
    247490    javaScriptWindowObjectCleared() signal.
    248491
     492    If Javascript is not enabled for this page, then this method does nothing.
     493
    249494    The ownership of \a object is specified using \a own.
    250495*/
    251496void QWebFrame::addToJavaScriptWindowObject(const QString &name, QObject *object, QScriptEngine::ValueOwnership ownership)
    252497{
    253     JSC::JSLock lock(false);
    254     JSDOMWindow* window = toJSDOMWindow(d->frame);
     498    if (!page()->settings()->testAttribute(QWebSettings::JavascriptEnabled))
     499        return;
     500
     501    JSC::JSLock lock(JSC::SilenceAssertionsOnly);
     502    JSDOMWindow* window = toJSDOMWindow(d->frame, mainThreadNormalWorld());
    255503    JSC::Bindings::RootObject* root = d->frame->script()->bindingRootObject();
    256504    if (!window) {
     
    261509    JSC::ExecState* exec = window->globalExec();
    262510
    263     JSC::JSObject*runtimeObject =
    264         JSC::Bindings::Instance::createRuntimeObject(exec, JSC::Bindings::QtInstance::getQtInstance(object, root, ownership));
     511    JSC::JSObject* runtimeObject =
     512            JSC::Bindings::QtInstance::getQtInstance(object, root, ownership)->createRuntimeObject(exec);
    265513
    266514    JSC::PutPropertySlot slot;
     
    269517
    270518/*!
    271     Returns the frame's content, converted to HTML.
     519    Returns the frame's content as HTML, enclosed in HTML and BODY tags.
    272520
    273521    \sa setHtml(), toPlainText()
     
    281529
    282530/*!
    283     Returns the content of this frame converted to plain text.
     531    Returns the content of this frame converted to plain text, completely
     532    stripped of all HTML formatting.
    284533
    285534    \sa toHtml()
     
    291540
    292541    Element *documentElement = d->frame->document()->documentElement();
    293     return documentElement->innerText();
     542    if (documentElement)
     543        return documentElement->innerText();
     544    return QString();
    294545}
    295546
     
    317568    if (d->frame->document())
    318569        return d->frame->loader()->documentLoader()->title();
    319     else return QString();
     570    return QString();
    320571}
    321572
     
    353604QMultiMap<QString, QString> QWebFrame::metaData() const
    354605{
    355     if(!d->frame->document())
    356        return QMap<QString,QString>();
    357 
    358     QMultiMap<QString,QString> map;
     606    if (!d->frame->document())
     607       return QMap<QString, QString>();
     608
     609    QMultiMap<QString, QString> map;
    359610    Document* doc = d->frame->document();
    360611    RefPtr<NodeList> list = doc->getElementsByTagName("meta");
     
    395646
    396647/*!
     648    \since 4.6
     649    \property QWebFrame::requestedUrl
     650
     651    The URL requested to loaded by the frame currently viewed. The URL may differ from
     652    the one returned by url() if a DNS resolution or a redirection occurs.
     653
     654    \sa url(), setUrl()
     655*/
     656QUrl QWebFrame::requestedUrl() const
     657{
     658    // There are some possible edge cases to be handled here,
     659    // apart from checking if activeDocumentLoader is valid:
     660    //
     661    // * Method can be called while processing an unsucessful load.
     662    //   In this case, frameLoaderClient will hold the current error
     663    //   (m_loadError), and we will make use of it to recover the 'failingURL'.
     664    // * If the 'failingURL' holds a null'ed string though, we fallback
     665    //   to 'outgoingReferrer' (it yet is safer than originalRequest).
     666    FrameLoader* loader = d->frame->loader();
     667    FrameLoaderClientQt* loaderClient = d->frameLoaderClient;
     668
     669    if (!loader->activeDocumentLoader()
     670        || !loaderClient->m_loadError.isNull()) {
     671        if (!loaderClient->m_loadError.failingURL().isNull())
     672            return QUrl(loaderClient->m_loadError.failingURL());
     673        else if (!loader->outgoingReferrer().isEmpty())
     674            return QUrl(loader->outgoingReferrer());
     675    }
     676
     677    return loader->originalRequest().url();
     678}
     679/*!
     680    \since 4.6
     681    \property QWebFrame::baseUrl
     682    \brief the base URL of the frame, can be used to resolve relative URLs
     683    \since 4.6
     684*/
     685
     686QUrl QWebFrame::baseUrl() const
     687{
     688    return d->frame->loader()->baseURL();
     689}
     690
     691/*!
    397692    \property QWebFrame::icon
    398693    \brief the icon associated with this frame
     
    468763        request.setHTTPBody(WebCore::FormData::create(postData.constData(), postData.size()));
    469764
    470     d->frame->loader()->load(request);
     765    d->frame->loader()->load(request, false);
    471766
    472767    if (d->parentFrame())
     
    510805            request.setHTTPMethod("POST");
    511806            break;
     807#if QT_VERSION >= 0x040600
     808        case QNetworkAccessManager::DeleteOperation:
     809            request.setHTTPMethod("DELETE");
     810            break;
     811#endif
    512812        case QNetworkAccessManager::UnknownOperation:
    513813            // eh?
     
    524824        request.setHTTPBody(WebCore::FormData::create(body.constData(), body.size()));
    525825
    526     d->frame->loader()->load(request);
     826    d->frame->loader()->load(request, false);
    527827
    528828    if (d->parentFrame())
     
    536836
    537837  The \a html is loaded immediately; external objects are loaded asynchronously.
     838
     839  If a script in the \a html runs longer than the default script timeout (currently 10 seconds),
     840  for example due to being blocked by a modal JavaScript alert dialog, this method will return
     841  as soon as possible after the timeout and any subsequent \a html will be loaded asynchronously.
    538842
    539843  When using this method WebKit assumes that external resources such as JavaScript programs or style
     
    542846  for the encoding to be specified by web server.
    543847
    544   \sa toHtml()
     848  \note This method will not affect session or global history for the frame.
     849
     850  \sa toHtml(), setContent()
    545851*/
    546852void QWebFrame::setHtml(const QString &html, const QUrl &baseUrl)
     
    550856    const QByteArray utf8 = html.toUtf8();
    551857    WTF::RefPtr<WebCore::SharedBuffer> data = WebCore::SharedBuffer::create(utf8.constData(), utf8.length());
    552     WebCore::SubstituteData substituteData(data, WebCore::String("text/html"), WebCore::String("utf-8"), kurl);
    553     d->frame->loader()->load(request, substituteData);
     858    WebCore::SubstituteData substituteData(data, WebCore::String("text/html"), WebCore::String("utf-8"), KURL());
     859    d->frame->loader()->load(request, substituteData, false);
    554860}
    555861
     
    563869  The \a data is loaded immediately; external objects are loaded asynchronously.
    564870
    565   \sa toHtml()
     871  \note This method will not affect session or global history for the frame.
     872
     873  \sa toHtml(), setHtml()
    566874*/
    567875void QWebFrame::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl)
     
    573881    if (actualMimeType.isEmpty())
    574882        actualMimeType = QLatin1String("text/html");
    575     WebCore::SubstituteData substituteData(buffer, WebCore::String(actualMimeType), WebCore::String(), kurl);
    576     d->frame->loader()->load(request, substituteData);
    577 }
    578 
     883    WebCore::SubstituteData substituteData(buffer, WebCore::String(actualMimeType), WebCore::String(), KURL());
     884    d->frame->loader()->load(request, substituteData, false);
     885}
    579886
    580887/*!
     
    635942        if (d->frame->view()) {
    636943            d->frame->view()->setHorizontalScrollbarMode((ScrollbarMode)policy);
    637             d->frame->view()->updateDefaultScrollbarState();
    638944        }
    639945    } else {
     
    641947        if (d->frame->view()) {
    642948            d->frame->view()->setVerticalScrollbarMode((ScrollbarMode)policy);
    643             d->frame->view()->updateDefaultScrollbarState();
    644949        }
    645950    }
     
    678983    Scrollbar *sb;
    679984    sb = (orientation == Qt::Horizontal) ? d->horizontalScrollBar() : d->verticalScrollBar();
    680     if (sb) {
     985    if (sb)
    681986        return sb->value();
    682     }
    683987    return 0;
    684988}
     
    7081012int QWebFrame::scrollBarMinimum(Qt::Orientation orientation) const
    7091013{
     1014    Q_UNUSED(orientation)
    7101015    return 0;
     1016}
     1017
     1018/*!
     1019  \since 4.6
     1020  Returns the geometry for the scrollbar with orientation \a orientation.
     1021
     1022  If the scrollbar does not exist an empty rect is returned.
     1023*/
     1024QRect QWebFrame::scrollBarGeometry(Qt::Orientation orientation) const
     1025{
     1026    Scrollbar *sb;
     1027    sb = (orientation == Qt::Horizontal) ? d->horizontalScrollBar() : d->verticalScrollBar();
     1028    if (sb)
     1029        return sb->frameRect();
     1030    return QRect();
    7111031}
    7121032
     
    7151035  Scrolls the frame \a dx pixels to the right and \a dy pixels downward. Both
    7161036  \a dx and \a dy may be negative.
    717  
     1037
    7181038  \sa QWebFrame::scrollPosition
    7191039*/
     
    7231043    if (!d->frame->view())
    7241044        return;
    725    
     1045
    7261046    d->frame->view()->scrollBy(IntSize(dx, dy));
     1047}
     1048
     1049/*!
     1050  \since 4.7
     1051  \internal
     1052  Scrolls nested frames starting at this frame, \a dx pixels to the right
     1053  and \a dy pixels downward. Both \a dx and \a dy may be negative. First attempts
     1054  to scroll elements with CSS overflow followed by this frame. If this
     1055  frame doesn't scroll, attempts to scroll the parent
     1056
     1057  \sa QWebFrame::scroll
     1058*/
     1059bool QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int dx, int dy)
     1060{
     1061    Frame* frame = QWebFramePrivate::core(qFrame);
     1062    bool scrolledHorizontal = false;
     1063    bool scrolledVertical = false;
     1064    bool scrolledOverflow = webframe_scrollOverflow(frame, dx, dy);
     1065
     1066    if (!scrolledOverflow) {
     1067        if (!frame || !frame->view())
     1068            return false;
     1069
     1070        do {
     1071            IntSize scrollOffset = frame->view()->scrollOffset();
     1072            IntPoint maxScrollOffset = frame->view()->maximumScrollPosition();
     1073
     1074            if (dx > 0) // scroll right
     1075                scrolledHorizontal = scrollOffset.width() < maxScrollOffset.x();
     1076            else if (dx < 0) // scroll left
     1077                scrolledHorizontal = scrollOffset.width() > 0;
     1078
     1079            if (dy > 0) // scroll down
     1080                scrolledVertical = scrollOffset.height() < maxScrollOffset.y();
     1081            else if (dy < 0) //scroll up
     1082                scrolledVertical = scrollOffset.height() > 0;
     1083
     1084            if (scrolledHorizontal || scrolledVertical) {
     1085                frame->view()->scrollBy(IntSize(dx, dy));
     1086                return true;
     1087            }
     1088            frame = frame->tree()->parent();
     1089        } while (frame && frame->view());
     1090    }
     1091    return (scrolledHorizontal || scrolledVertical || scrolledOverflow);
    7271092}
    7281093
     
    7361101{
    7371102    if (!d->frame->view())
    738         return QPoint(0,0);
     1103        return QPoint(0, 0);
    7391104
    7401105    IntSize ofs = d->frame->view()->scrollOffset();
     
    7511116
    7521117/*!
     1118  \since 4.6
     1119  Render the \a layer of the frame using \a painter clipping to \a clip.
     1120
     1121  \sa print()
     1122*/
     1123
     1124void QWebFrame::render(QPainter* painter, RenderLayer layer, const QRegion& clip)
     1125{
     1126    if (!clip.isEmpty())
     1127        d->renderPrivate(painter, layer, clip);
     1128    else if (d->frame->view())
     1129        d->renderPrivate(painter, layer, QRegion(d->frame->view()->frameRect()));
     1130}
     1131
     1132/*!
    7531133  Render the frame into \a painter clipping to \a clip.
    754 
    755   \sa print()
    7561134*/
    7571135void QWebFrame::render(QPainter *painter, const QRegion &clip)
    7581136{
    759     if (!d->frame->view() || !d->frame->contentRenderer())
     1137    d->renderPrivate(painter, AllLayers, clip);
     1138}
     1139
     1140/*!
     1141  Render the frame into \a painter.
     1142*/
     1143void QWebFrame::render(QPainter *painter)
     1144{
     1145    if (!d->frame->view())
    7601146        return;
    7611147
    762     d->frame->view()->layoutIfNeededRecursive();
    763 
    764     GraphicsContext ctx(painter);
    765     QVector<QRect> vector = clip.rects();
    766     WebCore::FrameView* view = d->frame->view();
    767     for (int i = 0; i < vector.size(); ++i) {
    768         if (i > 0) {
    769             painter->save();
    770             painter->setClipRect(vector.at(i), Qt::IntersectClip);
    771         }
    772 
    773         view->paint(&ctx, vector.at(i));
    774 
    775         if (i > 0)
    776             painter->restore();
    777     }
    778 }
    779 
    780 /*!
    781   Render the frame into \a painter.
    782 */
    783 void QWebFrame::render(QPainter *painter)
    784 {
    785     if (!d->frame->view() || !d->frame->contentRenderer())
    786         return;
    787 
    788     d->frame->view()->layoutIfNeededRecursive();
    789 
    790     GraphicsContext ctx(painter);
    791     WebCore::FrameView* view = d->frame->view();
    792     view->paint(&ctx, view->frameRect());
     1148    d->renderPrivate(painter, AllLayers, QRegion(d->frame->view()->frameRect()));
    7931149}
    7941150
     
    8391195
    8401196/*!
     1197    \property QWebFrame::focus
     1198    \since 4.6
     1199
     1200    Returns true if this frame has keyboard input focus; otherwise, returns false.
     1201*/
     1202bool QWebFrame::hasFocus() const
     1203{
     1204    WebCore::Frame* ff = d->frame->page()->focusController()->focusedFrame();
     1205    return ff && QWebFramePrivate::kit(ff) == this;
     1206}
     1207
     1208/*!
     1209    \since 4.6
     1210
     1211    Gives keyboard input focus to this frame.
     1212*/
     1213void QWebFrame::setFocus()
     1214{
     1215    QWebFramePrivate::core(this)->page()->focusController()->setFocusedFrame(QWebFramePrivate::core(this));
     1216}
     1217
     1218/*!
    8411219    Returns the position of the frame relative to it's parent frame.
    8421220*/
     
    8621240    \property QWebFrame::contentsSize
    8631241    \brief the size of the contents in this frame
     1242
     1243    \sa contentsSizeChanged()
    8641244*/
    8651245QSize QWebFrame::contentsSize() const
     
    8721252
    8731253/*!
     1254    \since 4.6
     1255
     1256    Returns the document element of this frame.
     1257
     1258    The document element provides access to the entire structured
     1259    content of the frame.
     1260*/
     1261QWebElement QWebFrame::documentElement() const
     1262{
     1263    WebCore::Document *doc = d->frame->document();
     1264    if (!doc)
     1265        return QWebElement();
     1266    return QWebElement(doc->documentElement());
     1267}
     1268
     1269/*!
     1270    \since 4.6
     1271    Returns a new list of elements matching the given CSS selector \a selectorQuery.
     1272    If there are no matching elements, an empty list is returned.
     1273
     1274    \l{http://www.w3.org/TR/REC-CSS2/selector.html#q1}{Standard CSS2 selector} syntax is
     1275    used for the query.
     1276
     1277    \sa QWebElement::findAll()
     1278*/
     1279QWebElementCollection QWebFrame::findAllElements(const QString &selectorQuery) const
     1280{
     1281    return documentElement().findAll(selectorQuery);
     1282}
     1283
     1284/*!
     1285    \since 4.6
     1286    Returns the first element in the frame's document that matches the
     1287    given CSS selector \a selectorQuery. If there is no matching element, a
     1288    null element is returned.
     1289
     1290    \l{http://www.w3.org/TR/REC-CSS2/selector.html#q1}{Standard CSS2 selector} syntax is
     1291    used for the query.
     1292
     1293    \sa QWebElement::findFirst()
     1294*/
     1295QWebElement QWebFrame::findFirstElement(const QString &selectorQuery) const
     1296{
     1297    return documentElement().findFirst(selectorQuery);
     1298}
     1299
     1300/*!
    8741301    Performs a hit test on the frame contents at the given position \a pos and returns the hit test result.
    8751302*/
     
    8791306        return QWebHitTestResult();
    8801307
    881     HitTestResult result = d->frame->eventHandler()->hitTestResultAtPoint(d->frame->view()->windowToContents(pos), /*allowShadowContent*/ false);
     1308    HitTestResult result = d->frame->eventHandler()->hitTestResultAtPoint(d->frame->view()->windowToContents(pos), /*allowShadowContent*/ false, /*ignoreClipping*/ true);
     1309
     1310    if (result.scrollbar())
     1311        return QWebHitTestResult();
     1312
    8821313    return QWebHitTestResult(new QWebHitTestResultPrivate(result));
    8831314}
     
    9161347    printContext.begin(pageRect.width());
    9171348
    918     printContext.computePageRects(pageRect, /*headerHeight*/0, /*footerHeight*/0, /*userScaleFactor*/1.0, pageHeight);
     1349    printContext.computePageRects(pageRect, /* headerHeight */ 0, /* footerHeight */ 0, /* userScaleFactor */ 1.0, pageHeight);
    9191350
    9201351    int docCopies;
    9211352    int pageCopies;
    922     if (printer->collateCopies() == true){
     1353    if (printer->collateCopies()) {
    9231354        docCopies = 1;
    9241355        pageCopies = printer->numCopies();
     
    9941425    QVariant rc;
    9951426    if (proxy) {
    996         JSC::JSValuePtr v = proxy->evaluate(ScriptSourceCode(scriptSource)).jsValue();
    997         if (v) {
    998             int distance = 0;
    999             rc = JSC::Bindings::convertValueToQVariant(proxy->globalObject()->globalExec(), v, QMetaType::Void, &distance);
    1000         }
     1427        JSC::JSValue v = d->frame->script()->executeScript(ScriptSourceCode(scriptSource)).jsValue();
     1428        int distance = 0;
     1429        rc = JSC::Bindings::convertValueToQVariant(proxy->globalObject(mainThreadNormalWorld())->globalExec(), v, QMetaType::Void, &distance);
    10011430    }
    10021431    return rc;
     
    10801509
    10811510/*!
     1511  \fn void QWebFrame::contentsSizeChanged(const QSize &size)
     1512  \since 4.6
     1513
     1514  This signal is emitted when the frame's contents size changes
     1515  to \a size.
     1516
     1517  \sa contentsSize()
     1518*/
     1519
     1520/*!
     1521    \fn void QWebFrame::loadStarted()
     1522    \since 4.6
     1523
     1524    This signal is emitted when a new load of this frame is started.
     1525
     1526    \sa loadFinished()
     1527*/
     1528
     1529/*!
     1530    \fn void QWebFrame::loadFinished(bool ok)
     1531    \since 4.6
     1532
     1533    This signal is emitted when a load of this frame is finished.
     1534    \a ok will indicate whether the load was successful or any error occurred.
     1535
     1536    \sa loadStarted()
     1537*/
     1538
     1539/*!
    10821540    \class QWebHitTestResult
    10831541    \since 4.4
     
    10851543    page content after a hit test.
    10861544
     1545    \inmodule QtWebKit
     1546
    10871547    QWebHitTestResult is returned by QWebFrame::hitTestContent() to provide
    10881548    information about the content of the web page at the specified position.
     
    11001560    : isContentEditable(false)
    11011561    , isContentSelected(false)
     1562    , isScrollBar(false)
    11021563{
    11031564    if (!hitTest.innerNode())
    11041565        return;
    11051566    pos = hitTest.point();
    1106     boundingRect = hitTest.boundingBox();
    1107     title = hitTest.title();
     1567    WebCore::TextDirection dir;
     1568    title = hitTest.title(dir);
    11081569    linkText = hitTest.textContent();
    11091570    linkUrl = hitTest.absoluteLinkURL();
     
    11111572    alternateText = hitTest.altDisplayString();
    11121573    imageUrl = hitTest.absoluteImageURL();
     1574    innerNode = hitTest.innerNode();
    11131575    innerNonSharedNode = hitTest.innerNonSharedNode();
     1576    boundingRect = innerNonSharedNode ? innerNonSharedNode->renderer()->absoluteBoundingBoxRect(true) : IntRect();
    11141577    WebCore::Image *img = hitTest.image();
    11151578    if (img) {
     
    11211584    if (wframe)
    11221585        linkTargetFrame = QWebFramePrivate::kit(wframe);
     1586    linkElement = QWebElement(hitTest.URLElement());
    11231587
    11241588    isContentEditable = hitTest.isContentEditable();
    11251589    isContentSelected = hitTest.isSelected();
     1590    isScrollBar = hitTest.scrollbar();
    11261591
    11271592    if (innerNonSharedNode && innerNonSharedNode->document()
    11281593        && innerNonSharedNode->document()->frame())
    11291594        frame = QWebFramePrivate::kit(innerNonSharedNode->document()->frame());
     1595
     1596    enclosingBlock = QWebElement(WebCore::enclosingBlock(innerNode.get()));
    11301597}
    11311598
     
    12041671
    12051672/*!
     1673    \since 4.6
     1674    Returns the block element that encloses the element hit.
     1675
     1676    A block element is an element that is rendered using the
     1677    CSS "block" style. This includes for example text
     1678    paragraphs.
     1679*/
     1680QWebElement QWebHitTestResult::enclosingBlockElement() const
     1681{
     1682    if (!d)
     1683        return QWebElement();
     1684    return d->enclosingBlock;
     1685}
     1686
     1687/*!
    12061688    Returns the title of the nearest enclosing HTML element.
    12071689*/
     
    12441726
    12451727/*!
     1728  \since 4.6
     1729  Returns the element that represents the link.
     1730
     1731  \sa linkTargetFrame()
     1732*/
     1733QWebElement QWebHitTestResult::linkElement() const
     1734{
     1735    if (!d)
     1736        return QWebElement();
     1737    return d->linkElement;
     1738}
     1739
     1740/*!
    12461741    Returns the frame that will load the link if it is activated.
     1742
     1743    \sa linkElement()
    12471744*/
    12481745QWebFrame *QWebHitTestResult::linkTargetFrame() const
     
    13051802
    13061803/*!
     1804    \since 4.6
     1805    Returns the underlying DOM element as QWebElement.
     1806*/
     1807QWebElement QWebHitTestResult::element() const
     1808{
     1809    if (!d || !d->innerNonSharedNode || !d->innerNonSharedNode->isElementNode())
     1810        return QWebElement();
     1811
     1812    return QWebElement(static_cast<WebCore::Element*>(d->innerNonSharedNode.get()));
     1813}
     1814
     1815/*!
    13071816    Returns the frame the hit test was executed in.
    13081817*/
     
    13131822    return d->frame;
    13141823}
    1315 
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h

    r2 r561  
    11/*
    2     Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
     2    Copyright (C) 2008,2009 Nokia Corporation and/or its subsidiary(-ies)
    33    Copyright (C) 2007 Staikos Computing Services Inc.
    44
     
    5050class QWebHistoryItem;
    5151class QWebSecurityOrigin;
     52class QWebElement;
     53class QWebElementCollection;
    5254
    5355namespace WebCore {
     
    6062class QWebFrame;
    6163
    62 class QWEBKIT_EXPORT QWebHitTestResult
    63 {
     64class QWEBKIT_EXPORT QWebHitTestResult {
    6465public:
    6566    QWebHitTestResult();
     
    7273    QPoint pos() const;
    7374    QRect boundingRect() const;
     75    QWebElement enclosingBlockElement() const;
    7476    QString title() const;
    7577
     
    7880    QUrl linkTitle() const;
    7981    QWebFrame *linkTargetFrame() const;
     82    QWebElement linkElement() const;
    8083
    8184    QString alternateText() const; // for img, area, input and applet
     
    8689    bool isContentEditable() const;
    8790    bool isContentSelected() const;
     91
     92    QWebElement element() const;
    8893
    8994    QWebFrame *frame() const;
     
    98103};
    99104
    100 class QWEBKIT_EXPORT QWebFrame : public QObject
    101 {
     105class QWEBKIT_EXPORT QWebFrame : public QObject {
    102106    Q_OBJECT
    103107    Q_PROPERTY(qreal textSizeMultiplier READ textSizeMultiplier WRITE setTextSizeMultiplier DESIGNABLE false)
     
    105109    Q_PROPERTY(QString title READ title)
    106110    Q_PROPERTY(QUrl url READ url WRITE setUrl)
     111    Q_PROPERTY(QUrl requestedUrl READ requestedUrl)
     112    Q_PROPERTY(QUrl baseUrl READ baseUrl)
    107113    Q_PROPERTY(QIcon icon READ icon)
    108114    Q_PROPERTY(QSize contentsSize READ contentsSize)
    109115    Q_PROPERTY(QPoint scrollPosition READ scrollPosition WRITE setScrollPosition)
     116    Q_PROPERTY(bool focus READ hasFocus)
    110117private:
    111118    QWebFrame(QWebPage *parent, QWebFrameData *frameData);
     
    136143    void setUrl(const QUrl &url);
    137144    QUrl url() const;
     145    QUrl requestedUrl() const;
     146    QUrl baseUrl() const;
    138147    QIcon icon() const;
    139148    QMultiMap<QString, QString> metaData() const;
     
    151160    int scrollBarMinimum(Qt::Orientation orientation) const;
    152161    int scrollBarMaximum(Qt::Orientation orientation) const;
     162    QRect scrollBarGeometry(Qt::Orientation orientation) const;
    153163
    154164    void scroll(int, int);
     
    156166    void setScrollPosition(const QPoint &pos);
    157167
    158     void render(QPainter *painter, const QRegion &clip);
    159     void render(QPainter *painter);
     168    enum RenderLayer {
     169        ContentsLayer = 0x10,
     170        ScrollBarLayer = 0x20,
     171        PanIconLayer = 0x40,
     172
     173        AllLayers = 0xff
     174    };
     175
     176    void render(QPainter*);
     177    void render(QPainter*, const QRegion& clip);
     178    void render(QPainter*, RenderLayer layer, const QRegion& clip = QRegion());
    160179
    161180    void setTextSizeMultiplier(qreal factor);
     
    164183    qreal zoomFactor() const;
    165184    void setZoomFactor(qreal factor);
     185
     186    bool hasFocus() const;
     187    void setFocus();
    166188
    167189    QPoint pos() const;
    168190    QRect geometry() const;
    169191    QSize contentsSize() const;
     192
     193    QWebElement documentElement() const;
     194    QWebElementCollection findAllElements(const QString &selectorQuery) const;
     195    QWebElement findFirstElement(const QString &selectorQuery) const;
    170196
    171197    QWebHitTestResult hitTestContent(const QPoint &pos) const;
     
    191217
    192218    void iconChanged();
     219
     220    void contentsSizeChanged(const QSize &size);
     221
     222    void loadStarted();
     223    void loadFinished(bool ok);
    193224
    194225private:
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h

    r2 r561  
    2828#include "KURL.h"
    2929#include "PlatformString.h"
     30#include "qwebelement.h"
    3031#include "wtf/RefPtr.h"
    3132#include "Frame.h"
    3233
    33 namespace WebCore
    34 {
     34namespace WebCore {
    3535    class FrameLoaderClientQt;
    3636    class FrameView;
     
    4040class QWebPage;
    4141
     42class QWebFrameData {
     43public:
     44    QWebFrameData(WebCore::Page*, WebCore::Frame* parentFrame = 0,
     45                  WebCore::HTMLFrameOwnerElement* = 0,
     46                  const WebCore::String& frameName = WebCore::String());
    4247
    43 class QWebFrameData
    44 {
    45 public:
    4648    WebCore::KURL url;
    4749    WebCore::String name;
    4850    WebCore::HTMLFrameOwnerElement* ownerElement;
     51    WebCore::Page* page;
     52    RefPtr<WebCore::Frame> frame;
     53    WebCore::FrameLoaderClientQt* frameLoaderClient;
    4954
    5055    WebCore::String referrer;
     
    5459};
    5560
    56 class QWebFramePrivate
    57 {
     61class QWebFramePrivate {
    5862public:
    5963    QWebFramePrivate()
     
    6872        , marginHeight(-1)
    6973        {}
    70     void init(QWebFrame *qframe, WebCore::Page *page,
    71               QWebFrameData *frameData);
     74    void init(QWebFrame* qframe, QWebFrameData* frameData);
    7275
    7376    inline QWebFrame *parentFrame() { return qobject_cast<QWebFrame*>(q->parent()); }
     
    7679    WebCore::Scrollbar* verticalScrollBar() const;
    7780
    78     Qt::ScrollBarPolicy horizontalScrollBarPolicy;
    79     Qt::ScrollBarPolicy verticalScrollBarPolicy;
    80 
    8181    static WebCore::Frame* core(QWebFrame*);
    8282    static QWebFrame* kit(WebCore::Frame*);
    8383
     84    void renderPrivate(QPainter*, QWebFrame::RenderLayer, const QRegion& clip);
     85
     86    bool scrollOverflow(int dx, int dy);
     87
    8488    QWebFrame *q;
     89    Qt::ScrollBarPolicy horizontalScrollBarPolicy;
     90    Qt::ScrollBarPolicy verticalScrollBarPolicy;
    8591    WebCore::FrameLoaderClientQt *frameLoaderClient;
    8692    WebCore::Frame *frame;
     
    9298};
    9399
    94 class QWebHitTestResultPrivate
    95 {
     100class QWebHitTestResultPrivate {
    96101public:
    97     QWebHitTestResultPrivate() : isContentEditable(false), isContentSelected(false) {}
     102    QWebHitTestResultPrivate() : isContentEditable(false), isContentSelected(false), isScrollBar(false) {}
    98103    QWebHitTestResultPrivate(const WebCore::HitTestResult &hitTest);
    99104
    100105    QPoint pos;
    101106    QRect boundingRect;
     107    QWebElement enclosingBlock;
    102108    QString title;
    103109    QString linkText;
     
    105111    QString linkTitle;
    106112    QPointer<QWebFrame> linkTargetFrame;
     113    QWebElement linkElement;
    107114    QString alternateText;
    108115    QUrl imageUrl;
     
    110117    bool isContentEditable;
    111118    bool isContentSelected;
     119    bool isScrollBar;
    112120    QPointer<QWebFrame> frame;
     121    RefPtr<WebCore::Node> innerNode;
    113122    RefPtr<WebCore::Node> innerNonSharedNode;
    114123};
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.cpp

    r2 r561  
    2121#include "qwebhistory.h"
    2222#include "qwebhistory_p.h"
     23#include "qwebframe_p.h"
    2324
    2425#include "PlatformString.h"
     
    2930
    3031#include <QSharedData>
     32#include <QDebug>
     33
     34enum {
     35    InitialHistoryVersion = 1,
     36    DefaultHistoryVersion = InitialHistoryVersion
     37};
    3138
    3239/*!
    3340  \class QWebHistoryItem
    34   \ingroup explicitly-shared
    3541  \since 4.4
    3642  \brief The QWebHistoryItem class represents one item in the history of a QWebPage
     43
     44  \inmodule QtWebKit
    3745
    3846  Each QWebHistoryItem instance represents an entry in the history stack of a Web page,
     
    5260  \endtable
    5361
    54   \note QWebHistoryItem objects are value based and \l{explicitly shared}.
     62  \note QWebHistoryItem objects are value based, but \e{explicitly shared}. Changing
     63  a QWebHistoryItem instance by calling setUserData() will change all copies of that
     64  instance.
    5565
    5666  \sa QWebHistory, QWebPage::history(), QWebHistoryInterface
     
    5868
    5969/*!
    60   Constructs a history item from \a other.
     70  Constructs a history item from \a other. The new item and \a other
     71  will share their data, and modifying either this item or \a other will
     72  modify both instances.
    6173*/
    6274QWebHistoryItem::QWebHistoryItem(const QWebHistoryItem &other)
     
    6678
    6779/*!
    68   Assigns the \a other history item to this.
     80  Assigns the \a other history item to this. This item and \a other
     81  will share their data, and modifying either this item or \a other will
     82  modify both instances.
    6983*/
    7084QWebHistoryItem &QWebHistoryItem::operator=(const QWebHistoryItem &other)
     
    163177
    164178 Stores user specific data \a userData with the history item.
     179 
     180 \note All copies of this item will be modified.
    165181
    166182 \sa userData()
     
    193209  \since 4.4
    194210  \brief The QWebHistory class represents the history of a QWebPage
     211
     212  \inmodule QtWebKit
    195213
    196214  Each QWebPage instance contains a history of visited pages that can be accessed
     
    214232  clear() function.
    215233
     234  QWebHistory's state can be saved to a QDataStream using the >> operator and loaded
     235  by using the << operator.
     236
    216237  \sa QWebHistoryItem, QWebHistoryInterface, QWebPage
    217238*/
     
    235256void QWebHistory::clear()
    236257{
    237     RefPtr<WebCore::HistoryItem> current = d->lst->currentItem();
    238     int capacity = d->lst->capacity();
    239     d->lst->setCapacity(0);   
    240 
    241     WebCore::Page* page = d->lst->page();
     258    //shortcut to private BackForwardList
     259    WebCore::BackForwardList* lst = d->lst;
     260
     261    //clear visited links
     262    WebCore::Page* page = lst->page();
    242263    if (page && page->groupPtr())
    243264        page->groupPtr()->removeVisitedLinks();
    244265
    245     d->lst->setCapacity(capacity);
    246     d->lst->addItem(current.get());
    247     d->lst->goToItem(current.get());
     266    //if count() == 0 then just return
     267    if (!lst->entries().size())
     268        return;
     269
     270    RefPtr<WebCore::HistoryItem> current = lst->currentItem();
     271    int capacity = lst->capacity();
     272    lst->setCapacity(0);
     273
     274    lst->setCapacity(capacity);   //revert capacity
     275    lst->addItem(current.get());  //insert old current item
     276    lst->goToItem(current.get()); //and set it as current again
     277
     278    d->page()->updateNavigationActions();
    248279}
    249280
     
    258289
    259290    QList<QWebHistoryItem> ret;
    260     for (int i = 0; i < items.size(); ++i) {
     291    for (unsigned i = 0; i < items.size(); ++i) {
    261292        QWebHistoryItemPrivate *priv = new QWebHistoryItemPrivate(items[i].get());
    262293        ret.append(QWebHistoryItem(priv));
     
    277308
    278309    QList<QWebHistoryItem> ret;
    279     for (int i = 0; i < items.size(); ++i) {
     310    for (unsigned i = 0; i < items.size(); ++i) {
    280311        QWebHistoryItemPrivate *priv = new QWebHistoryItemPrivate(items[i].get());
    281312        ret.append(QWebHistoryItem(priv));
     
    296327
    297328    QList<QWebHistoryItem> ret;
    298     for (int i = 0; i < items.size(); ++i) {
     329    for (unsigned i = 0; i < items.size(); ++i) {
    299330        QWebHistoryItemPrivate *priv = new QWebHistoryItemPrivate(items[i].get());
    300331        ret.append(QWebHistoryItem(priv));
     
    332363void QWebHistory::back()
    333364{
    334     d->lst->goBack();
    335     WebCore::Page* page = d->lst->page();
    336     page->goToItem(currentItem().d->item, WebCore::FrameLoadTypeIndexedBackForward);
     365    if (canGoBack()) {
     366        d->lst->goBack();
     367        WebCore::Page* page = d->lst->page();
     368        page->goToItem(currentItem().d->item, WebCore::FrameLoadTypeIndexedBackForward);
     369    }
    337370}
    338371
     
    345378void QWebHistory::forward()
    346379{
    347     d->lst->goForward();
    348     WebCore::Page* page = d->lst->page();
    349     page->goToItem(currentItem().d->item, WebCore::FrameLoadTypeIndexedBackForward);
     380    if (canGoForward()) {
     381        d->lst->goForward();
     382        WebCore::Page* page = d->lst->page();
     383        page->goToItem(currentItem().d->item, WebCore::FrameLoadTypeIndexedBackForward);
     384    }
    350385}
    351386
     
    406441QWebHistoryItem QWebHistory::itemAt(int i) const
    407442{
    408     WebCore::HistoryItem *item = d->lst->itemAtIndex(i);
    409 
    410     QWebHistoryItemPrivate *priv = new QWebHistoryItemPrivate(item);
     443    QWebHistoryItemPrivate *priv;
     444    if (i < 0 || i >= count())
     445        priv = new QWebHistoryItemPrivate(0);
     446    else {
     447        WebCore::HistoryItem *item = d->lst->entries()[i].get();
     448        priv = new QWebHistoryItemPrivate(item);
     449    }
    411450    return QWebHistoryItem(priv);
    412451}
     
    442481}
    443482
     483/*!
     484  \since 4.6
     485  \fn QDataStream& operator<<(QDataStream& stream, const QWebHistory& history)
     486  \relates QWebHistory
     487
     488  \brief The operator<< function streams a history into a data stream.
     489
     490  It saves the \a history into the specified \a stream.
     491*/
     492
     493QDataStream& operator<<(QDataStream& target, const QWebHistory& history)
     494{
     495    QWebHistoryPrivate* d = history.d;
     496
     497    int version = DefaultHistoryVersion;
     498
     499    target << version;
     500    target << history.count() << history.currentItemIndex();
     501
     502    const WebCore::HistoryItemVector &items = d->lst->entries();
     503    for (unsigned i = 0; i < items.size(); i++)
     504        items[i].get()->saveState(target, version);
     505
     506    return target;
     507}
     508
     509/*!
     510  \fn QDataStream& operator>>(QDataStream& stream, QWebHistory& history)
     511  \relates QWebHistory
     512  \since 4.6
     513
     514  \brief The operator>> function loads a history from a data stream.
     515
     516  Loads a QWebHistory from the specified \a stream into the given \a history.
     517*/
     518
     519QDataStream& operator>>(QDataStream& source, QWebHistory& history)
     520{
     521    QWebHistoryPrivate* d = history.d;
     522
     523    int version;
     524
     525    source >> version;
     526
     527    if (version == 1) {
     528        int count;
     529        int currentIndex;
     530        source >> count >> currentIndex;
     531
     532        history.clear();
     533        // only if there are elements
     534        if (count) {
     535            // after clear() is new clear HistoryItem (at the end we had to remove it)
     536            WebCore::HistoryItem* nullItem = d->lst->currentItem();
     537            for (int i = 0; i < count; i++) {
     538                WTF::PassRefPtr<WebCore::HistoryItem> item = WebCore::HistoryItem::create();
     539                item->restoreState(source, version);
     540                d->lst->addItem(item);
     541            }
     542            d->lst->removeItem(nullItem);
     543            history.goToItem(history.itemAt(currentIndex));
     544        }
     545    }
     546
     547    d->page()->updateNavigationActions();
     548
     549    return source;
     550}
     551
     552QWebPagePrivate* QWebHistoryPrivate::page()
     553{
     554    return QWebFramePrivate::kit(lst->page()->mainFrame())->page()->handle();
     555}
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.h

    r2 r561  
    3636
    3737class QWebHistoryItemPrivate;
    38 class QWEBKIT_EXPORT QWebHistoryItem
    39 {
     38
     39class QWEBKIT_EXPORT QWebHistoryItem {
    4040public:
    4141    QWebHistoryItem(const QWebHistoryItem &other);
     
    6161    friend class QWebPage;
    6262    friend class WebCore::FrameLoaderClientQt;
     63    friend class QWebHistoryItemPrivate;
     64    //friend QDataStream & operator<<(QDataStream& out,const QWebHistoryItem& hist);
     65    //friend QDataStream & operator>>(QDataStream& in,QWebHistoryItem& hist);
    6366    QExplicitlySharedDataPointer<QWebHistoryItemPrivate> d;
    6467};
    6568
     69
    6670class QWebHistoryPrivate;
    67 class QWEBKIT_EXPORT QWebHistory
    68 {
     71class QWEBKIT_EXPORT QWebHistory {
    6972public:
    7073    void clear();
     
    99102    friend class QWebPage;
    100103    friend class QWebPagePrivate;
     104    friend QWEBKIT_EXPORT QDataStream& operator>>(QDataStream&, QWebHistory&);
     105    friend QWEBKIT_EXPORT QDataStream& operator<<(QDataStream&, const QWebHistory&);
    101106
    102107    Q_DISABLE_COPY(QWebHistory)
     
    105110};
    106111
     112QWEBKIT_EXPORT QDataStream& operator<<(QDataStream& stream, const QWebHistory& history);
     113QWEBKIT_EXPORT QDataStream& operator>>(QDataStream& stream, QWebHistory& history);
     114
    107115#endif
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory_p.h

    r2 r561  
    2323#include "BackForwardList.h"
    2424#include "HistoryItem.h"
     25#include <QtCore/qglobal.h>
     26#include <QtCore/qshareddata.h>
    2527
    26 class QWebHistoryItemPrivate : public QSharedData
    27 {
     28class QWebPagePrivate;
     29
     30class Q_AUTOTEST_EXPORT QWebHistoryItemPrivate : public QSharedData {
    2831public:
    29     QWebHistoryItemPrivate(WebCore::HistoryItem *i)
     32    static QExplicitlySharedDataPointer<QWebHistoryItemPrivate> get(QWebHistoryItem* q)
     33    {
     34        return q->d;
     35    }
     36    QWebHistoryItemPrivate(WebCore::HistoryItem* i)
    3037    {
    3138        if (i)
     
    3845            item->deref();
    3946    }
    40     WebCore::HistoryItem *item;
     47
     48    WebCore::HistoryItem* item;
    4149};
    4250
    43 class QWebHistoryPrivate : public QSharedData
    44 {
     51class QWebHistoryPrivate : public QSharedData {
    4552public:
    46     QWebHistoryPrivate(WebCore::BackForwardList *l)
     53    QWebHistoryPrivate(WebCore::BackForwardList* l)
    4754    {
    4855        l->ref();
     
    5360        lst->deref();
    5461    }
    55     WebCore::BackForwardList *lst;
     62
     63    QWebPagePrivate* page();
     64
     65    WebCore::BackForwardList* lst;
    5666};
    5767
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebhistoryinterface.cpp

    r2 r561  
    2929
    3030
    31 static QWebHistoryInterface *default_interface;
     31static QWebHistoryInterface* default_interface;
    3232
    3333static bool gRoutineAdded;
     
    3535static void gCleanupInterface()
    3636{
    37     if (default_interface && default_interface->parent() == 0)
     37    if (default_interface && !default_interface->parent())
    3838        delete default_interface;
    3939    default_interface = 0;
     
    4848  \a defaultInterface if it does not have a parent.
    4949*/
    50 void QWebHistoryInterface::setDefaultInterface(QWebHistoryInterface *defaultInterface)
     50void QWebHistoryInterface::setDefaultInterface(QWebHistoryInterface* defaultInterface)
    5151{
    5252    if (default_interface == defaultInterface)
    5353        return;
    54     if (default_interface && default_interface->parent() == 0)
     54
     55    if (default_interface && !default_interface->parent())
    5556        delete default_interface;
    5657
     
    7172  default interface has been set, QtWebkit will not track history.
    7273*/
    73 QWebHistoryInterface *QWebHistoryInterface::defaultInterface()
     74QWebHistoryInterface* QWebHistoryInterface::defaultInterface()
    7475{
    7576    return default_interface;
     
    8081  \since 4.4
    8182  \brief The QWebHistoryInterface class provides an interface to implement link history.
     83
     84  \inmodule QtWebKit
    8285
    8386  The QWebHistoryInterface is an interface that can be used to
     
    9295    Constructs a new QWebHistoryInterface with parent \a parent.
    9396*/
    94 QWebHistoryInterface::QWebHistoryInterface(QObject *parent) : QObject(parent)
     97QWebHistoryInterface::QWebHistoryInterface(QObject* parent)
     98    : QObject(parent)
    9599{
    96100}
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebhistoryinterface.h

    r2 r561  
    2727#include "qwebkitglobal.h"
    2828
    29 class QWEBKIT_EXPORT QWebHistoryInterface : public QObject
    30 {
     29class QWEBKIT_EXPORT QWebHistoryInterface : public QObject {
    3130    Q_OBJECT
    3231public:
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h

    r2 r561  
    2323#include <QtCore/qglobal.h>
    2424
    25 #if defined(Q_OS_WIN)
    26 #  if defined(QT_NODLL)
    27 #    undef QT_MAKEDLL
    28 #    undef QT_DLL
    29 #  elif defined(QT_MAKEDLL)        /* create a Qt DLL library */
    30 #    if defined(QT_DLL)
    31 #      undef QT_DLL
    32 #    endif
    33 #    if defined(BUILD_WEBKIT)
    34 #        define QWEBKIT_EXPORT Q_DECL_EXPORT
    35 #    else
    36 #        define QWEBKIT_EXPORT Q_DECL_IMPORT
    37 #    endif
    38 #  elif defined(QT_DLL) /* use a Qt DLL library */
    39 #    define QWEBKIT_EXPORT Q_DECL_IMPORT
     25#if defined(QT_MAKEDLL)        /* create a Qt DLL library */
     26#  if defined(BUILD_WEBKIT)
     27#      define QWEBKIT_EXPORT Q_DECL_EXPORT
     28#  else
     29#      define QWEBKIT_EXPORT Q_DECL_IMPORT
    4030#  endif
     31#elif defined(QT_DLL) /* use a Qt DLL library */
     32#  define QWEBKIT_EXPORT Q_DECL_IMPORT
    4133#endif
    4234
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp

    r2 r561  
    2828#include "qwebhistory.h"
    2929#include "qwebhistory_p.h"
     30#include "qwebinspector.h"
     31#include "qwebinspector_p.h"
    3032#include "qwebsettings.h"
     33#include "qwebkitversion.h"
    3134
    3235#include "Frame.h"
     
    3538#include "FrameLoaderClientQt.h"
    3639#include "FrameView.h"
     40#include "FormState.h"
     41#include "ApplicationCacheStorage.h"
    3742#include "ChromeClientQt.h"
    3843#include "ContextMenu.h"
     
    4348#include "DragData.h"
    4449#include "EditorClientQt.h"
     50#include "SecurityOrigin.h"
    4551#include "Settings.h"
    4652#include "Page.h"
     
    5864#include "PlatformKeyboardEvent.h"
    5965#include "PlatformWheelEvent.h"
     66#include "PluginDatabase.h"
    6067#include "ProgressTracker.h"
    6168#include "RefPtr.h"
     69#include "RenderTextControl.h"
     70#include "TextIterator.h"
    6271#include "HashMap.h"
     72#include "HTMLFormElement.h"
     73#include "HTMLInputElement.h"
     74#include "HTMLNames.h"
    6375#include "HitTestResult.h"
    6476#include "WindowFeatures.h"
    6577#include "LocalizedStrings.h"
     78#include "Cache.h"
    6679#include "runtime/InitializeThreading.h"
     80#include "PageGroup.h"
     81#include "QWebPageClient.h"
    6782
    6883#include <QApplication>
     
    87102#include <QStyle>
    88103#include <QSysInfo>
     104#include <QTextCharFormat>
    89105#if QT_VERSION >= 0x040400
    90106#include <QNetworkAccessManager>
     
    93109#include "qwebnetworkinterface.h"
    94110#endif
     111#if defined(Q_WS_X11)
     112#include <QX11Info>
     113#endif
    95114
    96115using namespace WebCore;
     116
     117void QWEBKIT_EXPORT qt_drt_overwritePluginDirectories()
     118{
     119    PluginDatabase* db = PluginDatabase::installedPlugins(/* populate */ false);
     120
     121    Vector<String> paths;
     122    String qtPath(qgetenv("QTWEBKIT_PLUGIN_PATH").data());
     123    qtPath.split(UChar(':'), /* allowEmptyEntries */ false, paths);
     124
     125    db->setPluginDirectories(paths);
     126    db->refresh();
     127}
    97128
    98129bool QWebPagePrivate::drtRun = false;
     
    112143}
    113144
     145class QWebPageWidgetClient : public QWebPageClient {
     146public:
     147    QWebPageWidgetClient(QWidget* view)
     148        : view(view)
     149    {
     150        Q_ASSERT(view);
     151    }
     152
     153    virtual void scroll(int dx, int dy, const QRect&);
     154    virtual void update(const QRect& dirtyRect);
     155    virtual void setInputMethodEnabled(bool enable);
     156    virtual bool inputMethodEnabled() const;
     157#if QT_VERSION >= 0x040600
     158    virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable);
     159#endif
     160
     161#ifndef QT_NO_CURSOR
     162    virtual QCursor cursor() const;
     163    virtual void updateCursor(const QCursor& cursor);
     164#endif
     165
     166    virtual QPalette palette() const;
     167    virtual int screenNumber() const;
     168    virtual QWidget* ownerWidget() const;
     169
     170    virtual QObject* pluginParent() const;
     171
     172    QWidget* view;
     173};
     174
     175void QWebPageWidgetClient::scroll(int dx, int dy, const QRect& rectToScroll)
     176{
     177    view->scroll(qreal(dx), qreal(dy), rectToScroll);
     178}
     179
     180void QWebPageWidgetClient::update(const QRect & dirtyRect)
     181{
     182    view->update(dirtyRect);
     183}
     184
     185void QWebPageWidgetClient::setInputMethodEnabled(bool enable)
     186{
     187    view->setAttribute(Qt::WA_InputMethodEnabled, enable);
     188}
     189
     190bool QWebPageWidgetClient::inputMethodEnabled() const
     191{
     192    return view->testAttribute(Qt::WA_InputMethodEnabled);
     193}
     194
     195#if QT_VERSION >= 0x040600
     196void QWebPageWidgetClient::setInputMethodHint(Qt::InputMethodHint hint, bool enable)
     197{
     198    if (enable)
     199        view->setInputMethodHints(view->inputMethodHints() | hint);
     200    else
     201        view->setInputMethodHints(view->inputMethodHints() & ~hint);
     202}
     203#endif
     204#ifndef QT_NO_CURSOR
     205QCursor QWebPageWidgetClient::cursor() const
     206{
     207    return view->cursor();
     208}
     209
     210void QWebPageWidgetClient::updateCursor(const QCursor& cursor)
     211{
     212    view->setCursor(cursor);
     213}
     214#endif
     215
     216QPalette QWebPageWidgetClient::palette() const
     217{
     218    return view->palette();
     219}
     220
     221int QWebPageWidgetClient::screenNumber() const
     222{
     223#if defined(Q_WS_X11)
     224    if (view)
     225        return view->x11Info().screen();
     226#endif
     227
     228    return 0;
     229}
     230
     231QWidget* QWebPageWidgetClient::ownerWidget() const
     232{
     233    return view;
     234}
     235
     236QObject* QWebPageWidgetClient::pluginParent() const
     237{
     238    return view;
     239}
     240
    114241// Lookup table mapping QWebPage::WebActions to the associated Editor commands
    115 static const char* editorCommandWebActions[] = 
     242static const char* editorCommandWebActions[] =
    116243{
    117244    0, // OpenLink,
     
    119246    0, // OpenLinkInNewWindow,
    120247    0, // OpenFrameInNewWindow,
    121    
     248
    122249    0, // DownloadLinkToDisk,
    123250    0, // CopyLinkToClipboard,
    124    
     251
    125252    0, // OpenImageInNewWindow,
    126253    0, // DownloadImageToDisk,
    127254    0, // CopyImageToClipboard,
    128    
     255
    129256    0, // Back,
    130257    0, // Forward,
    131258    0, // Stop,
    132259    0, // Reload,
    133    
     260
    134261    "Cut", // Cut,
    135262    "Copy", // Copy,
    136263    "Paste", // Paste,
    137    
     264
    138265    "Undo", // Undo,
    139266    "Redo", // Redo,
     
    164291    "DeleteWordBackward", // DeleteStartOfWord,
    165292    "DeleteWordForward", // DeleteEndOfWord,
    166    
     293
    167294    0, // SetTextDirectionDefault,
    168295    0, // SetTextDirectionLeftToRight,
    169296    0, // SetTextDirectionRightToLeft,
    170    
     297
    171298    "ToggleBold", // ToggleBold,
    172299    "ToggleItalic", // ToggleItalic,
    173300    "ToggleUnderline", // ToggleUnderline,
    174    
     301
    175302    0, // InspectElement,
    176303
     
    179306
    180307    "SelectAll", // SelectAll
     308    0, // ReloadAndBypassCache,
     309
     310    "PasteAndMatchStyle", // PasteAndMatchStyle
     311    "RemoveFormat", // RemoveFormat
     312    "Strikethrough", // ToggleStrikethrough,
     313    "Subscript", // ToggleSubscript
     314    "Superscript", // ToggleSuperscript
     315    "InsertUnorderedList", // InsertUnorderedList
     316    "InsertOrderedList", // InsertOrderedList
     317    "Indent", // Indent
     318    "Outdent", // Outdent,
     319
     320    "AlignCenter", // AlignCenter,
     321    "AlignJustified", // AlignJustified,
     322    "AlignLeft", // AlignLeft,
     323    "AlignRight", // AlignRight,
    181324
    182325    0 // WebActionCount
     
    188331    if ((action > QWebPage::NoWebAction) && (action < int(sizeof(editorCommandWebActions) / sizeof(const char*))))
    189332        return editorCommandWebActions[action];
    190    
    191333    return 0;
    192334}
    193 
    194 #ifndef QT_NO_CURSOR
    195 SetCursorEvent::SetCursorEvent(const QCursor& cursor)
    196     : QEvent(static_cast<QEvent::Type>(EventType))
    197     , m_cursor(cursor)
    198 {}
    199 
    200 QCursor SetCursorEvent::cursor() const
    201 {
    202     return m_cursor;
    203 }
    204 #endif
    205335
    206336// If you change this make sure to also adjust the docs for QWebPage::userAgentForUrl
     
    233363QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
    234364    : q(qq)
     365    , client(0)
     366#if QT_VERSION < 0x040600
    235367    , view(0)
    236     , viewportSize(QSize(0,0))
     368#endif
     369    , inspectorFrontend(0)
     370    , inspector(0)
     371    , inspectorIsInternalOnly(false)
     372    , viewportSize(QSize(0, 0))
     373    , clickCausedFocus(false)
    237374{
    238375    WebCore::InitializeLoggingChannelsIfNecessary();
    239376    JSC::initializeThreading();
    240     WebCore::FrameLoader::setLocalLoadPolicy(WebCore::FrameLoader::AllowLocalLoadsForLocalAndSubstituteData);
     377    WebCore::SecurityOrigin::setLocalLoadPolicy(WebCore::SecurityOrigin::AllowLocalLoadsForLocalAndSubstituteData);
    241378
    242379    chromeClient = new ChromeClientQt(q);
     
    244381    editorClient = new EditorClientQt(q);
    245382    page = new Page(chromeClient, contextMenuClient, editorClient,
    246                     new DragClientQt(q), new InspectorClientQt(q));
    247 
    248     // ### should be configurable
    249     page->settings()->setDefaultTextEncodingName("iso-8859-1");
     383                    new DragClientQt(q), new InspectorClientQt(q), 0);
    250384
    251385    settings = new QWebSettings(page->settings());
     
    264398    forwardUnsupportedContent = false;
    265399    editable = false;
     400    useFixedLayout = false;
    266401    linkPolicy = QWebPage::DontDelegateLinks;
    267402#ifndef QT_NO_CONTEXTMENU
     
    271406    history.d = new QWebHistoryPrivate(page->backForwardList());
    272407    memset(actions, 0, sizeof(actions));
     408
     409    PageGroup::setShouldTrackVisitedLinks(true);
    273410}
    274411
     
    306443{
    307444    if (!mainFrame) {
    308         QWebFrameData frameData;
    309         frameData.ownerElement = 0;
    310         frameData.allowsScrolling = true;
    311         frameData.marginWidth = 0;
    312         frameData.marginHeight = 0;
     445        QWebFrameData frameData(page);
    313446        mainFrame = new QWebFrame(q, &frameData);
    314447
     
    351484        const QList<WebCore::ContextMenuItem> *items, QBitArray *visitedWebActions)
    352485{
    353     QMenu* menu = new QMenu(view);
     486    QMenu* menu = new QMenu(q->view());
    354487    for (int i = 0; i < items->count(); ++i) {
    355488        const ContextMenuItem &item = items->at(i);
     
    390523                    subMenu->setTitle(item.title());
    391524                    menu->addAction(subMenu->menuAction());
    392                 } else {
     525                } else
    393526                    delete subMenu;
    394                 }
    395527                break;
    396528            }
     
    400532}
    401533#endif // QT_NO_CONTEXTMENU
    402 
    403 QWebFrame *QWebPagePrivate::frameAt(const QPoint &pos) const
    404 {
    405     QWebFrame *frame = mainFrame;
    406 
    407 redo:
    408     QList<QWebFrame*> children = frame->childFrames();
    409     for (int i = 0; i < children.size(); ++i) {
    410         if (children.at(i)->geometry().contains(pos)) {
    411             frame = children.at(i);
    412             goto redo;
    413         }
    414     }
    415     if (frame->geometry().contains(pos))
    416         return frame;
    417     return 0;
    418 }
    419534
    420535void QWebPagePrivate::_q_webActionTriggered(bool checked)
     
    427542}
    428543
     544void QWebPagePrivate::_q_cleanupLeakMessages()
     545{
     546#ifndef NDEBUG
     547    // Need this to make leak messages accurate.
     548    cache()->setCapacities(0, 0, 0);
     549#endif
     550}
     551
    429552void QWebPagePrivate::updateAction(QWebPage::WebAction action)
    430553{
     
    441564    switch (action) {
    442565        case QWebPage::Back:
    443             enabled = loader->canGoBackOrForward(-1);
     566            enabled = page->canGoBackOrForward(-1);
    444567            break;
    445568        case QWebPage::Forward:
    446             enabled = loader->canGoBackOrForward(1);
     569            enabled = page->canGoBackOrForward(1);
    447570            break;
    448571        case QWebPage::Stop:
     
    450573            break;
    451574        case QWebPage::Reload:
     575        case QWebPage::ReloadAndBypassCache:
    452576            enabled = !loader->isLoading();
    453577            break;
     
    495619    updateAction(QWebPage::Stop);
    496620    updateAction(QWebPage::Reload);
     621    updateAction(QWebPage::ReloadAndBypassCache);
    497622}
    498623
     
    536661    updateAction(QWebPage::InsertParagraphSeparator);
    537662    updateAction(QWebPage::InsertLineSeparator);
     663    updateAction(QWebPage::PasteAndMatchStyle);
     664    updateAction(QWebPage::RemoveFormat);
     665    updateAction(QWebPage::ToggleStrikethrough);
     666    updateAction(QWebPage::ToggleSubscript);
     667    updateAction(QWebPage::ToggleSuperscript);
     668    updateAction(QWebPage::InsertUnorderedList);
     669    updateAction(QWebPage::InsertOrderedList);
     670    updateAction(QWebPage::Indent);
     671    updateAction(QWebPage::Outdent);
     672    updateAction(QWebPage::AlignCenter);
     673    updateAction(QWebPage::AlignJustified);
     674    updateAction(QWebPage::AlignLeft);
     675    updateAction(QWebPage::AlignRight);
    538676}
    539677
     
    547685}
    548686
    549 void QWebPagePrivate::mouseMoveEvent(QMouseEvent *ev)
     687void QWebPagePrivate::mouseMoveEvent(QGraphicsSceneMouseEvent* ev)
    550688{
    551689    WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
     
    557695}
    558696
    559 void QWebPagePrivate::mousePressEvent(QMouseEvent *ev)
     697void QWebPagePrivate::mouseMoveEvent(QMouseEvent *ev)
    560698{
    561699    WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
     
    563701        return;
    564702
     703    bool accepted = frame->eventHandler()->mouseMoved(PlatformMouseEvent(ev, 0));
     704    ev->setAccepted(accepted);
     705}
     706
     707void QWebPagePrivate::mousePressEvent(QGraphicsSceneMouseEvent* ev)
     708{
     709    WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
     710    if (!frame->view())
     711        return;
     712
    565713    if (tripleClickTimer.isActive()
    566             && (ev->pos() - tripleClick).manhattanLength()
     714            && (ev->pos().toPoint() - tripleClick).manhattanLength()
    567715                < QApplication::startDragDistance()) {
    568716        mouseTripleClickEvent(ev);
     
    578726}
    579727
    580 void QWebPagePrivate::mouseDoubleClickEvent(QMouseEvent *ev)
     728void QWebPagePrivate::mousePressEvent(QMouseEvent *ev)
     729{
     730    WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
     731    if (!frame->view())
     732        return;
     733
     734    RefPtr<WebCore::Node> oldNode;
     735    if (page->focusController()->focusedFrame()
     736        && page->focusController()->focusedFrame()->document())
     737        oldNode = page->focusController()->focusedFrame()->document()->focusedNode();
     738
     739    if (tripleClickTimer.isActive()
     740            && (ev->pos() - tripleClick).manhattanLength()
     741                < QApplication::startDragDistance()) {
     742        mouseTripleClickEvent(ev);
     743        return;
     744    }
     745
     746    bool accepted = false;
     747    PlatformMouseEvent mev(ev, 1);
     748    // ignore the event if we can't map Qt's mouse buttons to WebCore::MouseButton
     749    if (mev.button() != NoButton)
     750        accepted = frame->eventHandler()->handleMousePressEvent(mev);
     751    ev->setAccepted(accepted);
     752
     753    RefPtr<WebCore::Node> newNode;
     754    if (page->focusController()->focusedFrame()
     755        && page->focusController()->focusedFrame()->document())
     756        newNode = page->focusController()->focusedFrame()->document()->focusedNode();
     757
     758    if (newNode && oldNode != newNode)
     759        clickCausedFocus = true;
     760}
     761
     762void QWebPagePrivate::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *ev)
    581763{
    582764    WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
     
    592774
    593775    tripleClickTimer.start(QApplication::doubleClickInterval(), q);
     776    tripleClick = ev->pos().toPoint();
     777}
     778
     779void QWebPagePrivate::mouseDoubleClickEvent(QMouseEvent *ev)
     780{
     781    WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
     782    if (!frame->view())
     783        return;
     784
     785    bool accepted = false;
     786    PlatformMouseEvent mev(ev, 2);
     787    // ignore the event if we can't map Qt's mouse buttons to WebCore::MouseButton
     788    if (mev.button() != NoButton)
     789        accepted = frame->eventHandler()->handleMousePressEvent(mev);
     790    ev->setAccepted(accepted);
     791
     792    tripleClickTimer.start(QApplication::doubleClickInterval(), q);
    594793    tripleClick = ev->pos();
    595794}
    596795
    597 void QWebPagePrivate::mouseTripleClickEvent(QMouseEvent *ev)
     796void QWebPagePrivate::mouseTripleClickEvent(QGraphicsSceneMouseEvent *ev)
    598797{
    599798    WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
     
    609808}
    610809
    611 void QWebPagePrivate::mouseReleaseEvent(QMouseEvent *ev)
     810void QWebPagePrivate::mouseTripleClickEvent(QMouseEvent *ev)
     811{
     812    WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
     813    if (!frame->view())
     814        return;
     815
     816    bool accepted = false;
     817    PlatformMouseEvent mev(ev, 3);
     818    // ignore the event if we can't map Qt's mouse buttons to WebCore::MouseButton
     819    if (mev.button() != NoButton)
     820        accepted = frame->eventHandler()->handleMousePressEvent(mev);
     821    ev->setAccepted(accepted);
     822}
     823
     824void QWebPagePrivate::handleClipboard(QEvent* ev, Qt::MouseButton button)
     825{
     826#ifndef QT_NO_CLIPBOARD
     827    if (QApplication::clipboard()->supportsSelection()) {
     828        bool oldSelectionMode = Pasteboard::generalPasteboard()->isSelectionMode();
     829        Pasteboard::generalPasteboard()->setSelectionMode(true);
     830        WebCore::Frame* focusFrame = page->focusController()->focusedOrMainFrame();
     831        if (button == Qt::LeftButton) {
     832            if (focusFrame && (focusFrame->editor()->canCopy() || focusFrame->editor()->canDHTMLCopy())) {
     833                focusFrame->editor()->copy();
     834                ev->setAccepted(true);
     835            }
     836        } else if (button == Qt::MidButton) {
     837            if (focusFrame && (focusFrame->editor()->canPaste() || focusFrame->editor()->canDHTMLPaste())) {
     838                focusFrame->editor()->paste();
     839                ev->setAccepted(true);
     840            }
     841        }
     842        Pasteboard::generalPasteboard()->setSelectionMode(oldSelectionMode);
     843    }
     844#endif
     845}
     846
     847void QWebPagePrivate::mouseReleaseEvent(QGraphicsSceneMouseEvent* ev)
    612848{
    613849    WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
     
    622858    ev->setAccepted(accepted);
    623859
    624 #ifndef QT_NO_CLIPBOARD
    625     if (QApplication::clipboard()->supportsSelection()) {
    626         bool oldSelectionMode = Pasteboard::generalPasteboard()->isSelectionMode();
    627         Pasteboard::generalPasteboard()->setSelectionMode(true);
    628         WebCore::Frame* focusFrame = page->focusController()->focusedOrMainFrame();
    629         if (ev->button() == Qt::LeftButton) {
    630             if(focusFrame && (focusFrame->editor()->canCopy() || focusFrame->editor()->canDHTMLCopy())) {
    631                 focusFrame->editor()->copy();
    632                 ev->setAccepted(true);
    633             }
    634         } else if (ev->button() == Qt::MidButton) {
    635             if(focusFrame && (focusFrame->editor()->canPaste() || focusFrame->editor()->canDHTMLPaste())) {
    636                 focusFrame->editor()->paste();
    637                 ev->setAccepted(true);
    638             }
     860    handleClipboard(ev, ev->button());
     861    handleSoftwareInputPanel(ev->button());
     862}
     863
     864void QWebPagePrivate::handleSoftwareInputPanel(Qt::MouseButton button)
     865{
     866#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     867    Frame* frame = page->focusController()->focusedFrame();
     868    if (!frame)
     869        return;
     870
     871    if (client && client->inputMethodEnabled()
     872        && frame->document()->focusedNode()
     873        && button == Qt::LeftButton && qApp->autoSipEnabled()) {
     874        QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel(
     875            client->ownerWidget()->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel));
     876        if (!clickCausedFocus || behavior == QStyle::RSIP_OnMouseClick) {
     877            QEvent event(QEvent::RequestSoftwareInputPanel);
     878            QApplication::sendEvent(client->ownerWidget(), &event);
    639879        }
    640         Pasteboard::generalPasteboard()->setSelectionMode(oldSelectionMode);
    641     }
    642 #endif
     880    }
     881
     882    clickCausedFocus = false;
     883#endif
     884}
     885
     886void QWebPagePrivate::mouseReleaseEvent(QMouseEvent *ev)
     887{
     888    WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
     889    if (!frame->view())
     890        return;
     891
     892    bool accepted = false;
     893    PlatformMouseEvent mev(ev, 0);
     894    // ignore the event if we can't map Qt's mouse buttons to WebCore::MouseButton
     895    if (mev.button() != NoButton)
     896        accepted = frame->eventHandler()->handleMouseReleaseEvent(mev);
     897    ev->setAccepted(accepted);
     898
     899    handleClipboard(ev, ev->button());
     900    handleSoftwareInputPanel(ev->button());
    643901}
    644902
    645903#ifndef QT_NO_CONTEXTMENU
    646 void QWebPagePrivate::contextMenuEvent(QContextMenuEvent *ev)
     904void QWebPagePrivate::contextMenuEvent(const QPoint& globalPos)
    647905{
    648906    QMenu *menu = q->createStandardContextMenu();
    649907    if (menu) {
    650         menu->exec(ev->globalPos());
     908        menu->exec(globalPos);
    651909        delete menu;
    652910    }
     
    673931
    674932#ifndef QT_NO_WHEELEVENT
     933void QWebPagePrivate::wheelEvent(QGraphicsSceneWheelEvent* ev)
     934{
     935    WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
     936    if (!frame->view())
     937        return;
     938
     939    WebCore::PlatformWheelEvent pev(ev);
     940    bool accepted = frame->eventHandler()->handleWheelEvent(pev);
     941    ev->setAccepted(accepted);
     942}
     943
    675944void QWebPagePrivate::wheelEvent(QWheelEvent *ev)
    676945{
     
    7431012    bool handled = false;
    7441013    WebCore::Frame* frame = page->focusController()->focusedOrMainFrame();
    745     WebCore::Editor* editor = frame->editor();
    7461014    // we forward the key event to WebCore first to handle potential DOM
    7471015    // defined event handlers and later on end up in EditorClientQt::handleKeyboardEvent
     
    7521020        handled = true;
    7531021        QFont defaultFont;
    754         if (view)
    755             defaultFont = view->font();
     1022        if (q->view())
     1023            defaultFont = q->view()->font();
    7561024        QFontMetrics fm(defaultFont);
    757         int fontHeight = fm.height();
    758         if (!handleScrolling(ev)) {
     1025        if (!handleScrolling(ev, frame)) {
    7591026            switch (ev->key()) {
     1027            case Qt::Key_Back:
     1028                q->triggerAction(QWebPage::Back);
     1029                break;
     1030            case Qt::Key_Forward:
     1031                q->triggerAction(QWebPage::Forward);
     1032                break;
     1033            case Qt::Key_Stop:
     1034                q->triggerAction(QWebPage::Stop);
     1035                break;
     1036            case Qt::Key_Refresh:
     1037                q->triggerAction(QWebPage::Reload);
     1038                break;
    7601039            case Qt::Key_Backspace:
    7611040                if (ev->modifiers() == Qt::ShiftModifier)
     
    7631042                else
    7641043                    q->triggerAction(QWebPage::Back);
     1044                break;
    7651045            default:
    7661046                handled = false;
     
    7851065}
    7861066
    787 void QWebPagePrivate::focusInEvent(QFocusEvent *ev)
     1067void QWebPagePrivate::focusInEvent(QFocusEvent*)
    7881068{
    7891069    FocusController *focusController = page->focusController();
    790     Frame *frame = focusController->focusedFrame();
    7911070    focusController->setActive(true);
    792     if (frame) {
    793         frame->selection()->setFocused(true);
    794     } else {
     1071    focusController->setFocused(true);
     1072    if (!focusController->focusedFrame())
    7951073        focusController->setFocusedFrame(QWebFramePrivate::core(mainFrame));
    796     }
    797 }
    798 
    799 void QWebPagePrivate::focusOutEvent(QFocusEvent *ev)
     1074}
     1075
     1076void QWebPagePrivate::focusOutEvent(QFocusEvent*)
    8001077{
    8011078    // only set the focused frame inactive so that we stop painting the caret
     
    8041081    FocusController *focusController = page->focusController();
    8051082    focusController->setActive(false);
    806     Frame *frame = focusController->focusedFrame();
    807     if (frame) {
    808         frame->selection()->setFocused(false);
    809     }
    810 }
    811 
    812 void QWebPagePrivate::dragEnterEvent(QDragEnterEvent *ev)
     1083    focusController->setFocused(false);
     1084}
     1085
     1086void QWebPagePrivate::dragEnterEvent(QGraphicsSceneDragDropEvent* ev)
     1087{
     1088#ifndef QT_NO_DRAGANDDROP
     1089    DragData dragData(ev->mimeData(), ev->pos().toPoint(),
     1090            QCursor::pos(), dropActionToDragOp(ev->possibleActions()));
     1091    Qt::DropAction action = dragOpToDropAction(page->dragController()->dragEntered(&dragData));
     1092    ev->setDropAction(action);
     1093    if (action != Qt::IgnoreAction)
     1094        ev->accept();
     1095#endif
     1096}
     1097
     1098void QWebPagePrivate::dragEnterEvent(QDragEnterEvent* ev)
    8131099{
    8141100#ifndef QT_NO_DRAGANDDROP
     
    8221108}
    8231109
    824 void QWebPagePrivate::dragLeaveEvent(QDragLeaveEvent *ev)
     1110void QWebPagePrivate::dragLeaveEvent(QGraphicsSceneDragDropEvent* ev)
    8251111{
    8261112#ifndef QT_NO_DRAGANDDROP
     
    8311117}
    8321118
    833 void QWebPagePrivate::dragMoveEvent(QDragMoveEvent *ev)
     1119void QWebPagePrivate::dragLeaveEvent(QDragLeaveEvent* ev)
     1120{
     1121#ifndef QT_NO_DRAGANDDROP
     1122    DragData dragData(0, IntPoint(), QCursor::pos(), DragOperationNone);
     1123    page->dragController()->dragExited(&dragData);
     1124    ev->accept();
     1125#endif
     1126}
     1127
     1128void QWebPagePrivate::dragMoveEvent(QGraphicsSceneDragDropEvent* ev)
     1129{
     1130#ifndef QT_NO_DRAGANDDROP
     1131    DragData dragData(ev->mimeData(), ev->pos().toPoint(),
     1132            QCursor::pos(), dropActionToDragOp(ev->possibleActions()));
     1133    Qt::DropAction action = dragOpToDropAction(page->dragController()->dragUpdated(&dragData));
     1134    ev->setDropAction(action);
     1135    if (action != Qt::IgnoreAction)
     1136        ev->accept();
     1137#endif
     1138}
     1139
     1140void QWebPagePrivate::dragMoveEvent(QDragMoveEvent* ev)
    8341141{
    8351142#ifndef QT_NO_DRAGANDDROP
     
    8431150}
    8441151
    845 void QWebPagePrivate::dropEvent(QDropEvent *ev)
     1152void QWebPagePrivate::dropEvent(QGraphicsSceneDragDropEvent* ev)
     1153{
     1154#ifndef QT_NO_DRAGANDDROP
     1155    DragData dragData(ev->mimeData(), ev->pos().toPoint(),
     1156            QCursor::pos(), dropActionToDragOp(ev->possibleActions()));
     1157    Qt::DropAction action = dragOpToDropAction(page->dragController()->performDrag(&dragData));
     1158    if (action != Qt::IgnoreAction)
     1159        ev->accept();
     1160#endif
     1161}
     1162
     1163void QWebPagePrivate::dropEvent(QDropEvent* ev)
    8461164{
    8471165#ifndef QT_NO_DRAGANDDROP
     
    8541172}
    8551173
    856 void QWebPagePrivate::leaveEvent(QEvent *ev)
     1174void QWebPagePrivate::leaveEvent(QEvent*)
    8571175{
    8581176    // Fake a mouse move event just outside of the widget, since all
     
    8971215    }
    8981216
     1217    RenderObject* renderer = 0;
     1218    RenderTextControl* renderTextControl = 0;
     1219
     1220    if (frame->selection()->rootEditableElement())
     1221        renderer = frame->selection()->rootEditableElement()->shadowAncestorNode()->renderer();
     1222
     1223    if (renderer && renderer->isTextControl())
     1224        renderTextControl = toRenderTextControl(renderer);
     1225
     1226    Vector<CompositionUnderline> underlines;
     1227
     1228    for (int i = 0; i < ev->attributes().size(); ++i) {
     1229        const QInputMethodEvent::Attribute& a = ev->attributes().at(i);
     1230        switch (a.type) {
     1231        case QInputMethodEvent::TextFormat: {
     1232            QTextCharFormat textCharFormat = a.value.value<QTextFormat>().toCharFormat();
     1233            QColor qcolor = textCharFormat.underlineColor();
     1234            underlines.append(CompositionUnderline(a.start, a.length, Color(makeRGBA(qcolor.red(), qcolor.green(), qcolor.blue(), qcolor.alpha())), false));
     1235            break;
     1236        }
     1237        case QInputMethodEvent::Cursor: {
     1238            frame->setCaretVisible(a.length); //if length is 0 cursor is invisible
     1239            if (a.length > 0) {
     1240                RenderObject* caretRenderer = frame->selection()->caretRenderer();
     1241                if (caretRenderer) {
     1242                    QColor qcolor = a.value.value<QColor>();
     1243                    caretRenderer->style()->setColor(Color(makeRGBA(qcolor.red(), qcolor.green(), qcolor.blue(), qcolor.alpha())));
     1244                }
     1245            }
     1246            break;
     1247        }
     1248#if QT_VERSION >= 0x040600
     1249        case QInputMethodEvent::Selection: {
     1250            if (renderTextControl) {
     1251                renderTextControl->setSelectionStart(a.start);
     1252                renderTextControl->setSelectionEnd(a.start + a.length);
     1253            }
     1254            break;
     1255        }
     1256#endif
     1257        }
     1258    }
     1259
    8991260    if (!ev->commitString().isEmpty())
    9001261        editor->confirmComposition(ev->commitString());
    901     else {
     1262    else if (!ev->preeditString().isEmpty()) {
    9021263        QString preedit = ev->preeditString();
    903         // ### FIXME: use the provided QTextCharFormat (use color at least)
    904         Vector<CompositionUnderline> underlines;
    905         underlines.append(CompositionUnderline(0, preedit.length(), Color(0,0,0), false));
    9061264        editor->setComposition(preedit, underlines, preedit.length(), 0);
    9071265    }
     
    9391297        }
    9401298#ifndef QT_NO_SHORTCUT
    941         else if (editorActionForKeyEvent(event) != QWebPage::NoWebAction) {
     1299        else if (editorActionForKeyEvent(event) != QWebPage::NoWebAction)
    9421300            event->accept();
    943         }
    944 #endif
    945     }
    946 }
    947 
    948 bool QWebPagePrivate::handleScrolling(QKeyEvent *ev)
     1301#endif
     1302    }
     1303}
     1304
     1305bool QWebPagePrivate::handleScrolling(QKeyEvent *ev, Frame *frame)
    9491306{
    9501307    ScrollDirection direction;
     
    9931350    }
    9941351
    995     if (!mainFrame->d->frame->eventHandler()->scrollOverflow(direction, granularity))
    996         mainFrame->d->frame->view()->scroll(direction, granularity);
    997 
    998     return true;
     1352    return frame->eventHandler()->scrollRecursively(direction, granularity);
    9991353}
    10001354
     
    10101364QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const
    10111365{
    1012     switch(property) {
    1013     case Qt::ImMicroFocus: {
    1014         Frame *frame = d->page->focusController()->focusedFrame();
    1015         if (frame) {
     1366    Frame* frame = d->page->focusController()->focusedFrame();
     1367    if (!frame)
     1368        return QVariant();
     1369
     1370    WebCore::Editor* editor = frame->editor();
     1371
     1372    RenderObject* renderer = 0;
     1373    RenderTextControl* renderTextControl = 0;
     1374
     1375    if (frame->selection()->rootEditableElement())
     1376        renderer = frame->selection()->rootEditableElement()->shadowAncestorNode()->renderer();
     1377
     1378    if (renderer && renderer->isTextControl())
     1379        renderTextControl = toRenderTextControl(renderer);
     1380
     1381    switch (property) {
     1382        case Qt::ImMicroFocus: {
    10161383            return QVariant(frame->selection()->absoluteCaretBounds());
    10171384        }
    1018         return QVariant();
    1019     }
    1020     case Qt::ImFont: {
    1021         QWebView *webView = qobject_cast<QWebView *>(d->view);
    1022         if (webView)
    1023             return QVariant(webView->font());
    1024         return QVariant();
    1025     }
    1026     case Qt::ImCursorPosition: {
    1027         Frame *frame = d->page->focusController()->focusedFrame();
    1028         if (frame) {
    1029             Selection selection = frame->selection()->selection();
    1030             if (selection.isCaret()) {
    1031                 return QVariant(selection.start().offset());
     1385        case Qt::ImFont: {
     1386            if (renderTextControl) {
     1387                RenderStyle* renderStyle = renderTextControl->style();
     1388                return QVariant(QFont(renderStyle->font().font()));
    10321389            }
     1390            return QVariant(QFont());
    10331391        }
    1034         return QVariant();
    1035     }
    1036     case Qt::ImSurroundingText: {
    1037         Frame *frame = d->page->focusController()->focusedFrame();
    1038         if (frame) {
    1039             Document *document = frame->document();
    1040             if (document->focusedNode()) {
    1041                 return QVariant(document->focusedNode()->nodeValue());
     1392        case Qt::ImCursorPosition: {
     1393            if (renderTextControl) {
     1394                if (editor->hasComposition()) {
     1395                    RefPtr<Range> range = editor->compositionRange();
     1396                    return QVariant(renderTextControl->selectionEnd() - TextIterator::rangeLength(range.get()));
     1397                }
     1398                return QVariant(renderTextControl->selectionEnd());
    10421399            }
     1400            return QVariant();
    10431401        }
    1044         return QVariant();
    1045     }
    1046     case Qt::ImCurrentSelection:
    1047         return QVariant(selectedText());
    1048     default:
    1049         return QVariant();
    1050     }
    1051 }
     1402        case Qt::ImSurroundingText: {
     1403            if (renderTextControl) {
     1404                QString text = renderTextControl->text();
     1405                RefPtr<Range> range = editor->compositionRange();
     1406                if (range) {
     1407                    text.remove(range->startPosition().offsetInContainerNode(), TextIterator::rangeLength(range.get()));
     1408                }
     1409                return QVariant(text);
     1410            }
     1411            return QVariant();
     1412        }
     1413        case Qt::ImCurrentSelection: {
     1414            if (renderTextControl) {
     1415                int start = renderTextControl->selectionStart();
     1416                int end = renderTextControl->selectionEnd();
     1417                if (end > start)
     1418                    return QVariant(QString(renderTextControl->text()).mid(start,end-start));
     1419            }
     1420            return QVariant();
     1421
     1422        }
     1423#if QT_VERSION >= 0x040600
     1424        case Qt::ImAnchorPosition: {
     1425            if (renderTextControl) {
     1426                if (editor->hasComposition()) {
     1427                    RefPtr<Range> range = editor->compositionRange();
     1428                    return QVariant(renderTextControl->selectionStart() - TextIterator::rangeLength(range.get()));
     1429                }
     1430                return QVariant(renderTextControl->selectionStart());
     1431            }
     1432            return QVariant();
     1433        }
     1434        case Qt::ImMaximumTextLength: {
     1435            if (frame->selection()->isContentEditable()) {
     1436                if (frame->document() && frame->document()->focusedNode()) {
     1437                    if (frame->document()->focusedNode()->hasTagName(HTMLNames::inputTag)) {
     1438                        HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(frame->document()->focusedNode());
     1439                        return QVariant(inputElement->maxLength());
     1440                    }
     1441                }
     1442                return QVariant(InputElement::s_maximumLength);
     1443            }
     1444            return QVariant(0);
     1445        }
     1446#endif
     1447        default:
     1448            return QVariant();
     1449    }
     1450}
     1451
     1452/*!
     1453    \internal
     1454*/
     1455void QWebPagePrivate::setInspector(QWebInspector* insp)
     1456{
     1457    if (inspector)
     1458        inspector->d->setFrontend(0);
     1459
     1460    if (inspectorIsInternalOnly) {
     1461        QWebInspector* inspToDelete = inspector;
     1462        inspector = 0;
     1463        inspectorIsInternalOnly = false;
     1464        delete inspToDelete;    // Delete after to prevent infinite recursion
     1465    }
     1466
     1467    inspector = insp;
     1468
     1469    // Give inspector frontend web view if previously created
     1470    if (inspector && inspectorFrontend)
     1471        inspector->d->setFrontend(inspectorFrontend);
     1472}
     1473
     1474/*!
     1475    \internal
     1476    Returns the inspector and creates it if it wasn't created yet.
     1477    The instance created here will not be available through QWebPage's API.
     1478*/
     1479QWebInspector* QWebPagePrivate::getOrCreateInspector()
     1480{
     1481    if (!inspector) {
     1482        QWebInspector* insp = new QWebInspector;
     1483        insp->setPage(q);
     1484        inspectorIsInternalOnly = true;
     1485
     1486        Q_ASSERT(inspector); // Associated through QWebInspector::setPage(q)
     1487    }
     1488    return inspector;
     1489}
     1490
     1491/*! \internal */
     1492InspectorController* QWebPagePrivate::inspectorController()
     1493{
     1494    return page->inspectorController();
     1495}
     1496
    10521497
    10531498/*!
     
    10621507   \value FindWrapsAroundDocument Makes findText() restart from the beginning of the document if the end
    10631508   was reached and the text was not found.
     1509   \value HighlightAllOccurrences Highlights all existing occurrences of a specific string.
    10641510*/
    10651511
     
    10961542
    10971543    Actions only have an effect when they are applicable. The availability of
    1098     actions can be be determined by checking \l{QAction::}{enabled()} on the
     1544    actions can be be determined by checking \l{QAction::}{isEnabled()} on the
    10991545    action returned by \l{QWebPage::}{action()}.
    11001546
     
    11151561    \value Stop Stop loading the current page.
    11161562    \value Reload Reload the current page.
     1563    \value ReloadAndBypassCache Reload the current page, but do not use any local cache. (Added in Qt 4.6)
    11171564    \value Cut Cut the content currently selected into the clipboard.
    11181565    \value Copy Copy the content currently selected into the clipboard.
     
    11561603    \value InsertLineSeparator Insert a new line.
    11571604    \value SelectAll Selects all content.
     1605    \value PasteAndMatchStyle Paste content from the clipboard with current style.
     1606    \value RemoveFormat Removes formatting and style.
     1607    \value ToggleStrikethrough Toggle the formatting between strikethrough and normal style.
     1608    \value ToggleSubscript Toggle the formatting between subscript and baseline.
     1609    \value ToggleSuperscript Toggle the formatting between supercript and baseline.
     1610    \value InsertUnorderedList Toggles the selection between an ordered list and a normal block.
     1611    \value InsertOrderedList Toggles the selection between an ordered list and a normal block.
     1612    \value Indent Increases the indentation of the currently selected format block by one increment.
     1613    \value Outdent Decreases the indentation of the currently selected format block by one increment.
     1614    \value AlignCenter Applies center alignment to content.
     1615    \value AlignJustified Applies full justification to content.
     1616    \value AlignLeft Applies left justification to content.
     1617    \value AlignRight Applies right justification to content.
     1618
     1619
    11581620    \omitvalue WebActionCount
    11591621
     
    11711633    \since 4.4
    11721634    \brief The QWebPage class provides an object to view and edit web documents.
     1635
     1636    \inmodule QtWebKit
    11731637
    11741638    QWebPage holds a main frame responsible for web content, settings, the history
     
    11991663    Suppose we have a \c Thumbnail class as follows:
    12001664
    1201     \snippet doc/src/snippets/webkit/webpage/main.cpp 0
     1665    \snippet webkitsnippets/webpage/main.cpp 0
    12021666
    12031667    The \c Thumbnail's constructor takes in a \a url. We connect our QWebPage
     
    12051669    \c render().
    12061670
    1207     \snippet doc/src/snippets/webkit/webpage/main.cpp 1
     1671    \snippet webkitsnippets/webpage/main.cpp 1
    12081672
    12091673    The \c render() function shows how we can paint a thumbnail using a
    12101674    QWebPage object.
    12111675
    1212     \snippet doc/src/snippets/webkit/webpage/main.cpp 2
     1676    \snippet webkitsnippets/webpage/main.cpp 2
    12131677
    12141678    We begin by setting the \l{QWebPage::viewportSize()}{viewportSize} and
     
    12221686
    12231687/*!
    1224     Constructs an empty QWebView with parent \a parent.
     1688    Constructs an empty QWebPage with parent \a parent.
    12251689*/
    12261690QWebPage::QWebPage(QObject *parent)
     
    12311695
    12321696    connect(this, SIGNAL(loadProgress(int)), this, SLOT(_q_onLoadProgressChanged(int)));
     1697#ifndef NDEBUG
     1698    connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()), this, SLOT(_q_cleanupLeakMessages()));
     1699#endif
    12331700}
    12341701
     
    12381705QWebPage::~QWebPage()
    12391706{
     1707    d->createMainFrame();
    12401708    FrameLoader *loader = d->mainFrame->d->frame->loader();
    12411709    if (loader)
    12421710        loader->detachFromParent();
     1711    if (d->inspector)
     1712        d->inspector->setPage(0);
    12431713    delete d;
    12441714}
     
    12651735QWebFrame *QWebPage::currentFrame() const
    12661736{
     1737    d->createMainFrame();
    12671738    return static_cast<WebCore::FrameLoaderClientQt *>(d->page->focusController()->focusedOrMainFrame()->loader()->client())->webFrame();
    12681739}
    12691740
     1741
     1742/*!
     1743    \since 4.6
     1744
     1745    Returns the frame at the given point \a pos.
     1746
     1747    \sa mainFrame(), currentFrame()
     1748*/
     1749QWebFrame* QWebPage::frameAt(const QPoint& pos) const
     1750{
     1751    QWebFrame* webFrame = mainFrame();
     1752    if (!webFrame->geometry().contains(pos))
     1753        return 0;
     1754    QWebHitTestResult hitTestResult = webFrame->hitTestContent(pos);
     1755    return hitTestResult.frame();
     1756}
     1757
    12701758/*!
    12711759    Returns a pointer to the view's history of navigated web pages.
     
    12731761QWebHistory *QWebPage::history() const
    12741762{
     1763    d->createMainFrame();
    12751764    return &d->history;
    12761765}
     
    12831772void QWebPage::setView(QWidget *view)
    12841773{
    1285     d->view = view;
    1286     setViewportSize(view ? view->size() : QSize(0, 0));
     1774    if (this->view() != view) {
     1775        d->view = view;
     1776        if (!view) {
     1777            delete d->client;
     1778            d->client = 0;
     1779        } else {
     1780            if (!d->client)
     1781                d->client = new QWebPageWidgetClient(view);
     1782            else
     1783                static_cast<QWebPageWidgetClient*>(d->client)->view = view;
     1784        }
     1785        setViewportSize(view ? view->size() : QSize(0, 0));
     1786    }
    12871787}
    12881788
     
    12941794QWidget *QWebPage::view() const
    12951795{
     1796#if QT_VERSION < 0x040600
    12961797    return d->view;
     1798#else
     1799    return d->view.data();
     1800#endif
    12971801}
    12981802
     
    13191823void QWebPage::javaScriptAlert(QWebFrame *frame, const QString& msg)
    13201824{
     1825    Q_UNUSED(frame)
    13211826#ifndef QT_NO_MESSAGEBOX
    1322     QMessageBox::information(d->view, tr("JavaScript Alert - %1").arg(mainFrame()->url().host()), msg, QMessageBox::Ok);
     1827    QMessageBox::information(view(), tr("JavaScript Alert - %1").arg(mainFrame()->url().host()), msg, QMessageBox::Ok);
    13231828#endif
    13241829}
     
    13321837bool QWebPage::javaScriptConfirm(QWebFrame *frame, const QString& msg)
    13331838{
     1839    Q_UNUSED(frame)
    13341840#ifdef QT_NO_MESSAGEBOX
    13351841    return true;
    13361842#else
    1337     return QMessageBox::Yes == QMessageBox::information(d->view, tr("JavaScript Confirm - %1").arg(mainFrame()->url().host()), msg, QMessageBox::Yes, QMessageBox::No);
     1843    return QMessageBox::Yes == QMessageBox::information(view(), tr("JavaScript Confirm - %1").arg(mainFrame()->url().host()), msg, QMessageBox::Yes, QMessageBox::No);
    13381844#endif
    13391845}
     
    13441850
    13451851    If the prompt was cancelled by the user the implementation should return false; otherwise the
    1346     result should be written to \a result and true should be returned.
     1852    result should be written to \a result and true should be returned. If the prompt was not cancelled by the
     1853    user, the implementation should return true and the result string must not be null.
    13471854
    13481855    The default implementation uses QInputDialog::getText.
     
    13501857bool QWebPage::javaScriptPrompt(QWebFrame *frame, const QString& msg, const QString& defaultValue, QString* result)
    13511858{
     1859    Q_UNUSED(frame)
    13521860    bool ok = false;
    13531861#ifndef QT_NO_INPUTDIALOG
    1354     QString x = QInputDialog::getText(d->view, tr("JavaScript Prompt - %1").arg(mainFrame()->url().host()), msg, QLineEdit::Normal, defaultValue, &ok);
    1355     if (ok && result) {
     1862    QString x = QInputDialog::getText(view(), tr("JavaScript Prompt - %1").arg(mainFrame()->url().host()), msg, QLineEdit::Normal, defaultValue, &ok);
     1863    if (ok && result)
    13561864        *result = x;
    1357     }
    13581865#endif
    13591866    return ok;
     1867}
     1868
     1869/*!
     1870    \fn bool QWebPage::shouldInterruptJavaScript()
     1871    \since 4.6
     1872    This function is called when a JavaScript program is running for a long period of time.
     1873
     1874    If the user wanted to stop the JavaScript the implementation should return true; otherwise false.
     1875
     1876    The default implementation executes the query using QMessageBox::information with QMessageBox::Yes and QMessageBox::No buttons.
     1877
     1878    \warning Because of binary compatibility constraints, this function is not virtual. If you want to
     1879    provide your own implementation in a QWebPage subclass, reimplement the shouldInterruptJavaScript()
     1880    slot in your subclass instead. QtWebKit will dynamically detect the slot and call it.
     1881*/
     1882bool QWebPage::shouldInterruptJavaScript()
     1883{
     1884#ifdef QT_NO_MESSAGEBOX
     1885    return false;
     1886#else
     1887    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);
     1888#endif
    13601889}
    13611890
     
    13731902QWebPage *QWebPage::createWindow(WebWindowType type)
    13741903{
    1375     QWebView *webView = qobject_cast<QWebView *>(d->view);
     1904    QWebView *webView = qobject_cast<QWebView *>(view());
    13761905    if (webView) {
    13771906        QWebView *newView = webView->createWindow(type);
     
    14221951    \sa action()
    14231952*/
    1424 void QWebPage::triggerAction(WebAction action, bool checked)
     1953void QWebPage::triggerAction(WebAction action, bool)
    14251954{
    14261955    WebCore::Frame *frame = d->page->focusController()->focusedOrMainFrame();
     
    14341963            if (QWebFrame *targetFrame = d->hitTestResult.linkTargetFrame()) {
    14351964                WTF::RefPtr<WebCore::Frame> wcFrame = targetFrame->d->frame;
    1436                 targetFrame->d->frame->loader()->loadFrameRequestWithFormAndValues(frameLoadRequest(d->hitTestResult.linkUrl(), wcFrame.get()),
    1437                                                                                    /*lockHistory*/ false, /*event*/ 0,
    1438                                                                                    /*HTMLFormElement*/ 0, /*formValues*/
    1439                                                                                    WTF::HashMap<String, String>());
     1965                targetFrame->d->frame->loader()->loadFrameRequest(frameLoadRequest(d->hitTestResult.linkUrl(), wcFrame.get()),
     1966                                                                  /*lockHistory*/ false, /*lockBackForwardList*/ false, /*event*/ 0,
     1967                                                                  /*FormState*/ 0, SendReferrer);
    14401968                break;
    14411969            }
     
    14511979            break;
    14521980        }
    1453         case CopyLinkToClipboard:
     1981        case CopyLinkToClipboard: {
     1982#if defined(Q_WS_X11)
     1983            bool oldSelectionMode = Pasteboard::generalPasteboard()->isSelectionMode();
     1984            Pasteboard::generalPasteboard()->setSelectionMode(true);
    14541985            editor->copyURL(d->hitTestResult.linkUrl(), d->hitTestResult.linkText());
    1455             break;
     1986            Pasteboard::generalPasteboard()->setSelectionMode(oldSelectionMode);
     1987#endif
     1988            editor->copyURL(d->hitTestResult.linkUrl(), d->hitTestResult.linkText());
     1989            break;
     1990        }
    14561991        case OpenImageInNewWindow:
    14571992            openNewWindow(d->hitTestResult.imageUrl(), frame);
     
    14782013            break;
    14792014        case Reload:
    1480             mainFrame()->d->frame->loader()->reload();
     2015            mainFrame()->d->frame->loader()->reload(/*endtoendreload*/false);
     2016            break;
     2017        case ReloadAndBypassCache:
     2018            mainFrame()->d->frame->loader()->reload(/*endtoendreload*/true);
    14812019            break;
    14822020        case SetTextDirectionDefault:
     
    14892027            editor->setBaseWritingDirection(RightToLeftWritingDirection);
    14902028            break;
    1491         case InspectElement:
    1492             if (!d->hitTestResult.isNull())
     2029        case InspectElement: {
     2030            if (!d->hitTestResult.isNull()) {
     2031                d->getOrCreateInspector(); // Make sure the inspector is created
     2032                d->inspector->show(); // The inspector is expected to be shown on inspection
    14932033                d->page->inspectorController()->inspect(d->hitTestResult.d->innerNonSharedNode.get());
    1494             else
    1495                 d->page->inspectorController()->show();
    1496             break;
     2034            }
     2035            break;
     2036        }
    14972037        default:
    14982038            command = QWebPagePrivate::editorCommandForWebActions(action);
     
    15302070        WebCore::FrameView* view = frame->d->frame->view();
    15312071        view->setFrameRect(QRect(QPoint(0, 0), size));
    1532         frame->d->frame->forceLayout();
     2072        view->forceLayout();
    15332073        view->adjustViewSize();
    15342074    }
    15352075}
    15362076
     2077QSize QWebPage::preferredContentsSize() const
     2078{
     2079    QWebFrame* frame = d->mainFrame;
     2080    if (frame) {
     2081        WebCore::FrameView* view = frame->d->frame->view();
     2082        if (view && view->useFixedLayout())
     2083            return d->mainFrame->d->frame->view()->fixedLayoutSize();
     2084    }
     2085
     2086    return d->fixedLayoutSize;
     2087}
     2088
     2089/*!
     2090    \property QWebPage::preferredContentsSize
     2091    \since 4.6
     2092    \brief the size of the fixed layout
     2093
     2094    The size affects the layout of the page in the viewport.  If set to a fixed size of
     2095    1024x768 for example then webkit will layout the page as if the viewport were that size
     2096    rather than something different.
     2097*/
     2098void QWebPage::setPreferredContentsSize(const QSize &size) const
     2099{
     2100    d->fixedLayoutSize = size;
     2101
     2102    QWebFrame *frame = mainFrame();
     2103    if (frame->d->frame && frame->d->frame->view()) {
     2104        WebCore::FrameView* view = frame->d->frame->view();
     2105
     2106        if (size.isValid()) {
     2107            view->setUseFixedLayout(true);
     2108            view->setFixedLayoutSize(size);
     2109            view->forceLayout();
     2110        } else if (view->useFixedLayout()) {
     2111            view->setUseFixedLayout(false);
     2112            view->forceLayout();
     2113        }
     2114    }
     2115}
    15372116
    15382117/*!
     
    15562135#endif
    15572136{
     2137    Q_UNUSED(frame)
    15582138    if (type == NavigationTypeLinkClicked) {
    15592139        switch (d->linkPolicy) {
     
    15622142
    15632143            case DelegateExternalLinks:
    1564                 if (WebCore::FrameLoader::shouldTreatSchemeAsLocal(request.url().scheme()))
     2144                if (WebCore::SecurityOrigin::shouldTreatURLSchemeAsLocal(request.url().scheme()))
    15652145                    return true;
    15662146                emit linkClicked(request.url());
     
    15852165QString QWebPage::selectedText() const
    15862166{
     2167    d->createMainFrame();
    15872168    return d->page->focusController()->focusedOrMainFrame()->selectedText();
    15882169}
     
    18022383            break;
    18032384
     2385        case PasteAndMatchStyle:
     2386            text = tr("Paste and Match Style");
     2387            break;
     2388        case RemoveFormat:
     2389            text = tr("Remove formatting");
     2390            break;
     2391
     2392        case ToggleStrikethrough:
     2393            text = tr("Strikethrough");
     2394            checkable = true;
     2395            break;
     2396        case ToggleSubscript:
     2397            text = tr("Subscript");
     2398            checkable = true;
     2399            break;
     2400        case ToggleSuperscript:
     2401            text = tr("Superscript");
     2402            checkable = true;
     2403            break;
     2404        case InsertUnorderedList:
     2405            text = tr("Insert Bulleted List");
     2406            checkable = true;
     2407            break;
     2408        case InsertOrderedList:
     2409            text = tr("Insert Numbered List");
     2410            checkable = true;
     2411            break;
     2412        case Indent:
     2413            text = tr("Indent");
     2414            break;
     2415        case Outdent:
     2416            text = tr("Outdent");
     2417            break;
     2418        case AlignCenter:
     2419            text = tr("Center");
     2420            break;
     2421        case AlignJustified:
     2422            text = tr("Justify");
     2423            break;
     2424        case AlignLeft:
     2425            text = tr("Align Left");
     2426            break;
     2427        case AlignRight:
     2428            text = tr("Align Right");
     2429            break;
     2430
    18042431        case NoWebAction:
    18052432            return 0;
     
    18642491        d->mouseMoveEvent(static_cast<QMouseEvent*>(ev));
    18652492        break;
     2493    case QEvent::GraphicsSceneMouseMove:
     2494        d->mouseMoveEvent(static_cast<QGraphicsSceneMouseEvent*>(ev));
     2495        break;
    18662496    case QEvent::MouseButtonPress:
    18672497        d->mousePressEvent(static_cast<QMouseEvent*>(ev));
     2498        break;
     2499    case QEvent::GraphicsSceneMousePress:
     2500        d->mousePressEvent(static_cast<QGraphicsSceneMouseEvent*>(ev));
    18682501        break;
    18692502    case QEvent::MouseButtonDblClick:
    18702503        d->mouseDoubleClickEvent(static_cast<QMouseEvent*>(ev));
    18712504        break;
     2505    case QEvent::GraphicsSceneMouseDoubleClick:
     2506        d->mouseDoubleClickEvent(static_cast<QGraphicsSceneMouseEvent*>(ev));
     2507        break;
    18722508    case QEvent::MouseButtonRelease:
    18732509        d->mouseReleaseEvent(static_cast<QMouseEvent*>(ev));
    18742510        break;
     2511    case QEvent::GraphicsSceneMouseRelease:
     2512        d->mouseReleaseEvent(static_cast<QGraphicsSceneMouseEvent*>(ev));
     2513        break;
    18752514#ifndef QT_NO_CONTEXTMENU
    18762515    case QEvent::ContextMenu:
    1877         d->contextMenuEvent(static_cast<QContextMenuEvent*>(ev));
     2516        d->contextMenuEvent(static_cast<QContextMenuEvent*>(ev)->globalPos());
     2517        break;
     2518    case QEvent::GraphicsSceneContextMenu:
     2519        d->contextMenuEvent(static_cast<QGraphicsSceneContextMenuEvent*>(ev)->screenPos());
    18782520        break;
    18792521#endif
     
    18812523    case QEvent::Wheel:
    18822524        d->wheelEvent(static_cast<QWheelEvent*>(ev));
     2525        break;
     2526    case QEvent::GraphicsSceneWheel:
     2527        d->wheelEvent(static_cast<QGraphicsSceneWheelEvent*>(ev));
    18832528        break;
    18842529#endif
     
    18992544        d->dragEnterEvent(static_cast<QDragEnterEvent*>(ev));
    19002545        break;
     2546    case QEvent::GraphicsSceneDragEnter:
     2547        d->dragEnterEvent(static_cast<QGraphicsSceneDragDropEvent*>(ev));
     2548        break;
    19012549    case QEvent::DragLeave:
    19022550        d->dragLeaveEvent(static_cast<QDragLeaveEvent*>(ev));
     2551        break;
     2552    case QEvent::GraphicsSceneDragLeave:
     2553        d->dragLeaveEvent(static_cast<QGraphicsSceneDragDropEvent*>(ev));
    19032554        break;
    19042555    case QEvent::DragMove:
    19052556        d->dragMoveEvent(static_cast<QDragMoveEvent*>(ev));
    19062557        break;
     2558    case QEvent::GraphicsSceneDragMove:
     2559        d->dragMoveEvent(static_cast<QGraphicsSceneDragDropEvent*>(ev));
     2560        break;
    19072561    case QEvent::Drop:
    19082562        d->dropEvent(static_cast<QDropEvent*>(ev));
     2563        break;
     2564    case QEvent::GraphicsSceneDrop:
     2565        d->dropEvent(static_cast<QGraphicsSceneDragDropEvent*>(ev));
    19092566        break;
    19102567#endif
     
    19642621                // FIXME: mac port calls this if there is no selectedDOMRange
    19652622                //frame->setSelectionFromNone();
    1966             } else {
     2623            } else
    19672624                frame->removeEditingStyleFromBodyElement();
    1968             }
    19692625        }
    19702626
     
    19802636/*!
    19812637    \property QWebPage::forwardUnsupportedContent
    1982     \brief whether QWebPage should forward unsupported content through the
    1983     unsupportedContent signal
    1984 
    1985     If disabled the download of such content is aborted immediately.
     2638    \brief whether QWebPage should forward unsupported content
     2639
     2640    If enabled, the unsupportedContent() signal is emitted with a network reply that
     2641    can be used to read the content.
     2642
     2643    If disabled, the download of such content is aborted immediately.
    19862644
    19872645    By default unsupported content is not forwarded.
     
    20302688    d->page->contextMenuController()->clearContextMenu();
    20312689
    2032     if (QWebFrame* webFrame = d->frameAt(event->pos())) {
     2690    if (QWebFrame* webFrame = frameAt(event->pos())) {
    20332691        Frame* frame = QWebFramePrivate::core(webFrame);
    2034         if (Scrollbar* scrollbar = frame->view()->scrollbarUnderMouse(PlatformMouseEvent(event, 1))) {
     2692        if (Scrollbar* scrollbar = frame->view()->scrollbarAtPoint(PlatformMouseEvent(event, 1).pos()))
    20352693            return scrollbar->contextMenu(PlatformMouseEvent(event, 1));
    2036         }
    20372694    }
    20382695
     
    20642721    }
    20652722
     2723    d->createMainFrame();
    20662724    WebCore::Frame* focusedFrame = d->page->focusController()->focusedOrMainFrame();
    20672725    HitTestResult result = focusedFrame->eventHandler()->hitTestResultAtPoint(focusedFrame->view()->windowToContents(pos), /*allowShadowContent*/ false);
    20682726
    2069     d->hitTestResult = QWebHitTestResult(new QWebHitTestResultPrivate(result));
     2727    if (result.scrollbar())
     2728        d->hitTestResult = QWebHitTestResult();
     2729    else
     2730        d->hitTestResult = QWebHitTestResult(new QWebHitTestResultPrivate(result));
    20702731    WebCore::ContextMenu menu(result);
    20712732    menu.populate();
     
    20862747    for (int i = 0; i < QWebPage::WebActionCount; ++i) {
    20872748        if (originallyEnabledWebActions.at(i)) {
    2088             if (QAction *a = this->action(QWebPage::WebAction(i))) {
     2749            if (QAction *a = this->action(QWebPage::WebAction(i)))
    20892750                a->setEnabled(true);
    2090             }
    20912751        }
    20922752    }
     
    21112771    file selection is allowed.
    21122772
     2773    \omitvalue ErrorPageExtension (introduced in Qt 4.6)
     2774*/
     2775
     2776/*!
     2777    \enum QWebPage::ErrorDomain
     2778    \since 4.6
     2779    \internal
     2780
     2781    \value QtNetwork
     2782    \value Http
     2783    \value WebKit
    21132784*/
    21142785
     
    21182789    \brief The ExtensionOption class provides an extended input argument to QWebPage's extension support.
    21192790
     2791    \inmodule QtWebKit
     2792
    21202793    \sa QWebPage::extension()
     2794*/
     2795
     2796/*!
     2797    \class QWebPage::ErrorPageExtensionOption
     2798    \since 4.6
     2799    \brief The ErrorPageExtensionOption class describes the option
     2800    for the error page extension.
     2801
     2802    \inmodule QtWebKit
     2803
     2804    The ErrorPageExtensionOption class holds the \a url for which an error occoured as well as
     2805    the associated \a frame.
     2806
     2807    The error itself is reported by an error \a domain, the \a error code as well as \a errorString.
     2808
     2809    \sa QWebPage::ErrorPageExtensionReturn
     2810*/
     2811
     2812/*!
     2813    \class QWebPage::ErrorPageExtensionReturn
     2814    \since 4.6
     2815    \brief The ErrorPageExtensionReturn describes the error page, which will be shown for the
     2816    frame for which the error occured.
     2817
     2818    \inmodule QtWebKit
     2819
     2820    The ErrorPageExtensionReturn class holds the data needed for creating an error page. Some are
     2821    optional such as \a contentType, which defaults to "text/html", as well as the \a encoding, which
     2822    is assumed to be UTF-8 if not indicated otherwise.
     2823
     2824    The error page is stored in the \a content byte array, as HTML content. In order to convert a
     2825    QString to a byte array, the QString::toUtf8() method can be used.
     2826
     2827    External objects such as stylesheets or images referenced in the HTML are located relative to
     2828    \a baseUrl.
     2829
     2830    \sa QWebPage::ErrorPageExtensionOption, QString::toUtf8()
     2831*/
     2832
     2833/*!
     2834    \fn QWebPage::ErrorPageExtensionReturn::ErrorPageExtensionReturn()
     2835
     2836    Constructs a new error page object.
    21212837*/
    21222838
     
    21272843    for the multiple files selection extension.
    21282844
     2845    \inmodule QtWebKit
     2846
    21292847    The ChooseMultipleFilesExtensionOption class holds the frame originating the request
    21302848    and the suggested filenames which might be provided.
     
    21392857    for the multiple files selection extension.
    21402858
     2859    \inmodule QtWebKit
     2860
    21412861    The ChooseMultipleFilesExtensionReturn class holds the filenames selected by the user
    21422862    when the extension is invoked.
     
    21632883        // FIXME: do not ignore suggestedFiles
    21642884        QStringList suggestedFiles = static_cast<const ChooseMultipleFilesExtensionOption*>(option)->suggestedFileNames;
    2165         QStringList names = QFileDialog::getOpenFileNames(d->view, QString::null);
     2885        QStringList names = QFileDialog::getOpenFileNames(view(), QString::null);
    21662886        static_cast<ChooseMultipleFilesExtensionReturn*>(output)->fileNames = names;
    21672887        return true;
     
    21882908
    21892909/*!
    2190     Finds the next occurrence of the string, \a subString, in the page, using the given \a options.
    2191     Returns true of \a subString was found and selects the match visually; otherwise returns false.
     2910    Finds the specified string, \a subString, in the page, using the given \a options.
     2911
     2912    If the HighlightAllOccurrences flag is passed, the function will highlight all occurrences
     2913    that exist in the page. All subsequent calls will extend the highlight, rather than
     2914    replace it, with occurrences of the new string.
     2915
     2916    If the HighlightAllOccurrences flag is not passed, the function will select an occurrence
     2917    and all subsequent calls will replace the current occurrence with the next one.
     2918
     2919    To clear the selection, just pass an empty string.
     2920
     2921    Returns true if \a subString was found; otherwise returns false.
    21922922*/
    21932923bool QWebPage::findText(const QString &subString, FindFlags options)
     
    21972927        caseSensitivity = ::TextCaseSensitive;
    21982928
    2199     ::FindDirection direction = ::FindDirectionForward;
    2200     if (options & FindBackward)
    2201         direction = ::FindDirectionBackward;
    2202 
    2203     const bool shouldWrap = options & FindWrapsAroundDocument;
    2204 
    2205     return d->page->findString(subString, caseSensitivity, direction, shouldWrap);
     2929    if (options & HighlightAllOccurrences) {
     2930        if (subString.isEmpty()) {
     2931            d->page->unmarkAllTextMatches();
     2932            return true;
     2933        } else
     2934            return d->page->markAllMatchesForText(subString, caseSensitivity, true, 0);
     2935    } else {
     2936        ::FindDirection direction = ::FindDirectionForward;
     2937        if (options & FindBackward)
     2938            direction = ::FindDirectionBackward;
     2939
     2940        const bool shouldWrap = options & FindWrapsAroundDocument;
     2941
     2942        return d->page->findString(subString, caseSensitivity, direction, shouldWrap);
     2943    }
    22062944}
    22072945
     
    22252963QString QWebPage::chooseFile(QWebFrame *parentFrame, const QString& suggestedFile)
    22262964{
     2965    Q_UNUSED(parentFrame)
    22272966#ifndef QT_NO_FILEDIALOG
    2228     return QFileDialog::getOpenFileName(d->view, QString::null, suggestedFile);
     2967    return QFileDialog::getOpenFileName(view(), QString::null, suggestedFile);
    22292968#else
    22302969    return QString::null;
     
    22643003    Sets the QNetworkAccessManager \a manager responsible for serving network requests for this
    22653004    QWebPage.
     3005
     3006    \note It is currently not supported to change the network access manager after the
     3007    QWebPage has used it. The results of doing this are undefined.
    22663008
    22673009    \sa networkAccessManager()
     
    23233065    The default implementation returns the following value:
    23243066
    2325     "Mozilla/5.0 (%Platform%; %Security%; %Subplatform%; %Locale%) AppleWebKit/%WebKitVersion% (KHTML, like Gecko, Safari/419.3) %AppVersion"
     3067    "Mozilla/5.0 (%Platform%; %Security%; %Subplatform%; %Locale%) AppleWebKit/%WebKitVersion% (KHTML, like Gecko) %AppVersion Safari/%WebKitVersion%"
    23263068
    23273069    In this string the following values are replaced at run-time:
     
    23313073    \o %Locale% is replaced with QLocale::name(). The locale is determined from the view of the QWebPage. If no view is set on the QWebPage,
    23323074    then a default constructed QLocale is used instead.
    2333     \o %WebKitVersion% currently expands to 527+
     3075    \o %WebKitVersion% is the version of WebKit the application was compiled against.
    23343076    \o %AppVersion% expands to QCoreApplication::applicationName()/QCoreApplication::applicationVersion() if they're set; otherwise defaulting to Qt and the current Qt version.
    23353077    \endlist
     
    23403082    QString ua = QLatin1String("Mozilla/5.0 ("
    23413083
    2342     // Plastform
     3084    // Platform
    23433085#ifdef Q_WS_MAC
    23443086    "Macintosh"
     
    23493091#elif defined Q_WS_X11
    23503092    "X11"
     3093#elif defined Q_OS_SYMBIAN
     3094    "SymbianOS"
    23513095#else
    23523096    "Unknown"
    23533097#endif
    2354     "; "
     3098    // Placeholder for Platform Version
     3099    "%1; "
    23553100
    23563101    // Placeholder for security strength (N or U)
    2357     "%1; "
     3102    "%2; "
    23583103
    23593104    // Subplatform"
     
    23613106    "AIX"
    23623107#elif defined Q_OS_WIN32
    2363     "%2"
     3108    "%3"
    23643109#elif defined Q_OS_DARWIN
    23653110#ifdef __i386__ || __x86_64__
     
    24133158#elif defined Q_OS_ULTRIX
    24143159    "DEC Ultrix"
     3160#elif defined Q_WS_S60
     3161    "Series60"
    24153162#elif defined Q_OS_UNIX
    24163163    "UNIX BSD/SYSV system"
     
    24203167    "Unknown"
    24213168#endif
    2422     "; ");
     3169    // Placeholder for SubPlatform Version
     3170    "%4; ");
     3171
     3172    // Platform Version
     3173    QString osVer;
     3174#ifdef Q_OS_SYMBIAN
     3175    QSysInfo::SymbianVersion symbianVersion = QSysInfo::symbianVersion();
     3176    switch (symbianVersion) {
     3177    case QSysInfo::SV_9_2:
     3178        osVer = "/9.2";
     3179        break;
     3180    case QSysInfo::SV_9_3:
     3181        osVer = "/9.3";
     3182        break;
     3183    case QSysInfo::SV_9_4:
     3184        osVer = "/9.4";
     3185        break;
     3186    default:
     3187        osVer = "Unknown";
     3188    }
     3189#endif
     3190    ua = ua.arg(osVer);
    24233191
    24243192    QChar securityStrength(QLatin1Char('N'));
    24253193#if !defined(QT_NO_OPENSSL)
    2426     if (QSslSocket::supportsSsl())
    2427         securityStrength = QLatin1Char('U');
     3194    // we could check QSslSocket::supportsSsl() here, but this makes
     3195    // OpenSSL, certificates etc being loaded in all cases were QWebPage
     3196    // is used. This loading is not needed for non-https.
     3197    securityStrength = QLatin1Char('U');
     3198    // this may lead to a false positive: We indicate SSL since it is
     3199    // compiled in even though supportsSsl() might return false
    24283200#endif
    24293201    ua = ua.arg(securityStrength);
     
    24313203#if defined Q_OS_WIN32
    24323204    QString ver;
    2433     switch(QSysInfo::WindowsVersion) {
     3205    switch (QSysInfo::WindowsVersion) {
    24343206        case QSysInfo::WV_32s:
    24353207            ver = "Windows 3.1";
     
    24593231            ver = "Windows NT 6.0";
    24603232            break;
     3233#if QT_VERSION > 0x040500
     3234        case QSysInfo::WV_WINDOWS7:
     3235            ver = "Windows NT 6.1";
     3236            break;
     3237#endif
    24613238        case QSysInfo::WV_CE:
    24623239            ver = "Windows CE";
     
    24753252#endif
    24763253
     3254    // SubPlatform Version
     3255    QString subPlatformVer;
     3256#ifdef Q_OS_SYMBIAN
     3257    QSysInfo::S60Version s60Version = QSysInfo::s60Version();
     3258    switch (s60Version) {
     3259    case QSysInfo::SV_S60_3_1:
     3260        subPlatformVer = "/3.1";
     3261        break;
     3262    case QSysInfo::SV_S60_3_2:
     3263        subPlatformVer = "/3.2";
     3264        break;
     3265    case QSysInfo::SV_S60_5_0:
     3266        subPlatformVer = "/5.0";
     3267        break;
     3268    default:
     3269        subPlatformVer = " Unknown";
     3270    }
     3271#endif
     3272    ua = ua.arg(subPlatformVer);
     3273
    24773274    // Language
    24783275    QLocale locale;
    2479     if (d->view)
    2480         locale = d->view->locale();
     3276    if (view())
     3277        locale = view()->locale();
    24813278    QString name = locale.name();
    24823279    name[2] = QLatin1Char('-');
     
    24853282
    24863283    // webkit/qt version
    2487     ua.append(QLatin1String("AppleWebKit/" WEBKIT_VERSION " (KHTML, like Gecko, Safari/419.3) "));
     3284    ua.append(QString(QLatin1String("AppleWebKit/%1 (KHTML, like Gecko) "))
     3285                      .arg(QString(qWebKitVersion())));
    24883286
    24893287    // Application name/version
    24903288    QString appName = QCoreApplication::applicationName();
    24913289    if (!appName.isEmpty()) {
    2492         ua.append(QLatin1Char(' ') + appName);
     3290        ua.append(appName);
    24933291#if QT_VERSION >= 0x040400
    24943292        QString appVer = QCoreApplication::applicationVersion();
     
    25013299        ua.append(QLatin1String(qVersion()));
    25023300    }
     3301
     3302    ua.append(QString(QLatin1String(" Safari/%1"))
     3303                      .arg(qWebKitVersion()));
     3304
    25033305    return ua;
    25043306}
    25053307
    25063308
    2507 void QWebPagePrivate::_q_onLoadProgressChanged(int) {
     3309void QWebPagePrivate::_q_onLoadProgressChanged(int)
     3310{
    25083311    m_totalBytes = page->progress()->totalPageAndResourceBytesToLoad();
    25093312    m_bytesReceived = page->progress()->totalBytesReceived();
     
    25173320    \sa bytesReceived()
    25183321*/
    2519 quint64 QWebPage::totalBytes() const {
     3322quint64 QWebPage::totalBytes() const
     3323{
     3324    return d->m_totalBytes;
     3325}
     3326
     3327
     3328/*!
     3329    Returns the number of bytes that were received from the network to render the current page.
     3330
     3331    \sa totalBytes()
     3332*/
     3333quint64 QWebPage::bytesReceived() const
     3334{
    25203335    return d->m_bytesReceived;
    2521 }
    2522 
    2523 
    2524 /*!
    2525     Returns the number of bytes that were received from the network to render the current page.
    2526 
    2527     \sa totalBytes()
    2528 */
    2529 quint64 QWebPage::bytesReceived() const {
    2530     return d->m_totalBytes;
    25313336}
    25323337
     
    26503455    \fn void QWebPage::unsupportedContent(QNetworkReply *reply)
    26513456
    2652     This signals is emitted when webkit cannot handle a link the user navigated to.
    2653 
    2654     At signal emissions time the meta data of the QNetworkReply \a reply is available.
     3457    This signal is emitted when WebKit cannot handle a link the user navigated to.
     3458
     3459    At signal emission time the meta-data of the QNetworkReply \a reply is available.
    26553460
    26563461    \note This signal is only emitted if the forwardUnsupportedContent property is set to true.
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h

    r2 r561  
    2626
    2727#include <QtCore/qobject.h>
     28#include <QtCore/qurl.h>
    2829#include <QtGui/qwidget.h>
    2930
     
    3132class QNetworkProxy;
    3233class QUndoStack;
    33 class QUrl;
    3434class QMenu;
    3535class QNetworkRequest;
     
    3838QT_END_NAMESPACE
    3939
     40class QWebElement;
    4041class QWebFrame;
    4142class QWebNetworkRequest;
     
    5354    class EditorClientQt;
    5455    class FrameLoaderClientQt;
    55     class FrameLoadRequest;
    5656    class InspectorClientQt;
    5757    class ResourceHandle;
    5858    class HitTestResult;
     59    class QNetworkReplyHandler;
     60
     61    struct FrameLoadRequest;
    5962}
    6063
    61 class QWEBKIT_EXPORT QWebPage : public QObject
    62 {
     64class QWEBKIT_EXPORT QWebPage : public QObject {
    6365    Q_OBJECT
    6466
     
    6668    Q_PROPERTY(QString selectedText READ selectedText)
    6769    Q_PROPERTY(QSize viewportSize READ viewportSize WRITE setViewportSize)
     70    Q_PROPERTY(QSize preferredContentsSize READ preferredContentsSize WRITE setPreferredContentsSize)
    6871    Q_PROPERTY(bool forwardUnsupportedContent READ forwardUnsupportedContent WRITE setForwardUnsupportedContent)
    6972    Q_PROPERTY(LinkDelegationPolicy linkDelegationPolicy READ linkDelegationPolicy WRITE setLinkDelegationPolicy)
     
    148151
    149152        SelectAll,
     153        ReloadAndBypassCache,
     154
     155        PasteAndMatchStyle,
     156        RemoveFormat,
     157
     158        ToggleStrikethrough,
     159        ToggleSubscript,
     160        ToggleSuperscript,
     161        InsertUnorderedList,
     162        InsertOrderedList,
     163        Indent,
     164        Outdent,
     165
     166        AlignCenter,
     167        AlignJustified,
     168        AlignLeft,
     169        AlignRight,
    150170
    151171        WebActionCount
     
    155175        FindBackward = 1,
    156176        FindCaseSensitively = 2,
    157         FindWrapsAroundDocument = 4
     177        FindWrapsAroundDocument = 4,
     178        HighlightAllOccurrences = 8
    158179    };
    159180    Q_DECLARE_FLAGS(FindFlags, FindFlag)
     
    175196    QWebFrame *mainFrame() const;
    176197    QWebFrame *currentFrame() const;
     198    QWebFrame* frameAt(const QPoint& pos) const;
    177199
    178200    QWebHistory *history() const;
     
    216238    void setViewportSize(const QSize &size) const;
    217239
     240    QSize preferredContentsSize() const;
     241    void setPreferredContentsSize(const QSize &size) const;
     242
    218243    virtual bool event(QEvent*);
    219244    bool focusNextPrevChild(bool next);
     
    243268
    244269    enum Extension {
    245         ChooseMultipleFilesExtension
     270        ChooseMultipleFilesExtension,
     271        ErrorPageExtension
    246272    };
    247273    class ExtensionOption
     
    261287    };
    262288
     289    enum ErrorDomain { QtNetwork, Http, WebKit };
     290    class ErrorPageExtensionOption : public ExtensionOption {
     291    public:
     292        QUrl url;
     293        QWebFrame* frame;
     294        ErrorDomain domain;
     295        int error;
     296        QString errorString;
     297    };
     298
     299    class ErrorPageExtensionReturn : public ExtensionReturn {
     300    public:
     301        ErrorPageExtensionReturn() : contentType(QLatin1String("text/html")), encoding(QLatin1String("utf-8")) {};
     302        QString contentType;
     303        QString encoding;
     304        QUrl baseUrl;
     305        QByteArray content;
     306    };
     307
     308
    263309    virtual bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0);
    264310    virtual bool supportsExtension(Extension extension) const;
    265311
    266312    inline QWebPagePrivate* handle() const { return d; }
     313
     314public Q_SLOTS:
     315    bool shouldInterruptJavaScript();
    267316
    268317Q_SIGNALS:
     
    318367    Q_PRIVATE_SLOT(d, void _q_onLoadProgressChanged(int))
    319368    Q_PRIVATE_SLOT(d, void _q_webActionTriggered(bool checked))
     369    Q_PRIVATE_SLOT(d, void _q_cleanupLeakMessages())
     370
    320371    QWebPagePrivate *d;
    321372
     
    323374    friend class QWebPagePrivate;
    324375    friend class QWebView;
     376    friend class QGraphicsWebView;
     377    friend class QWebInspector;
    325378    friend class WebCore::ChromeClientQt;
    326379    friend class WebCore::EditorClientQt;
     
    328381    friend class WebCore::InspectorClientQt;
    329382    friend class WebCore::ResourceHandle;
     383    friend class WebCore::QNetworkReplyHandler;
    330384};
    331385
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h

    r2 r561  
    2626#include <qpointer.h>
    2727#include <qevent.h>
     28#include <qgraphicssceneevent.h>
    2829
    2930#include "qwebpage.h"
     
    3637#include <wtf/RefPtr.h>
    3738
    38 namespace WebCore
    39 {
     39namespace WebCore {
    4040    class ChromeClientQt;
    4141    class ContextMenuClientQt;
     
    4444    class EditorClientQt;
    4545    class Element;
     46    class InspectorController;
    4647    class Node;
    4748    class Page;
    48 
    49 #ifndef QT_NO_CURSOR
    50     class SetCursorEvent : public QEvent {
    51     public:
    52         static const int EventType = 724;
    53         SetCursorEvent(const QCursor&);
    54 
    55         QCursor cursor() const;
    56     private:
    57         QCursor m_cursor;
    58     };
    59 #endif
     49    class Frame;
    6050}
    6151
     
    6656QT_END_NAMESPACE
    6757
    68 class QWebPagePrivate
    69 {
     58class QWebInspector;
     59class QWebPageClient;
     60
     61class QWebPagePrivate {
    7062public:
    71     QWebPagePrivate(QWebPage *);
     63    QWebPagePrivate(QWebPage*);
    7264    ~QWebPagePrivate();
    7365    void createMainFrame();
    7466#ifndef QT_NO_CONTEXTMENU
    75     QMenu *createContextMenu(const WebCore::ContextMenu *webcoreMenu, const QList<WebCore::ContextMenuItem> *items, QBitArray *visitedWebActions);
     67    QMenu* createContextMenu(const WebCore::ContextMenu* webcoreMenu, const QList<WebCore::ContextMenuItem>* items, QBitArray* visitedWebActions);
    7668#endif
    77 
    78     QWebFrame *frameAt(const QPoint &pos) const;
    79 
    8069    void _q_onLoadProgressChanged(int);
    8170    void _q_webActionTriggered(bool checked);
     71    void _q_cleanupLeakMessages();
    8272    void updateAction(QWebPage::WebAction action);
    8373    void updateNavigationActions();
     
    8777
    8878    void mouseMoveEvent(QMouseEvent*);
     79    void mouseMoveEvent(QGraphicsSceneMouseEvent*);
    8980    void mousePressEvent(QMouseEvent*);
     81    void mousePressEvent(QGraphicsSceneMouseEvent*);
    9082    void mouseDoubleClickEvent(QMouseEvent*);
     83    void mouseDoubleClickEvent(QGraphicsSceneMouseEvent*);
    9184    void mouseTripleClickEvent(QMouseEvent*);
     85    void mouseTripleClickEvent(QGraphicsSceneMouseEvent*);
    9286    void mouseReleaseEvent(QMouseEvent*);
     87    void mouseReleaseEvent(QGraphicsSceneMouseEvent*);
    9388#ifndef QT_NO_CONTEXTMENU
    94     void contextMenuEvent(QContextMenuEvent*);
     89    void contextMenuEvent(const QPoint& globalPos);
    9590#endif
    9691#ifndef QT_NO_WHEELEVENT
    9792    void wheelEvent(QWheelEvent*);
     93    void wheelEvent(QGraphicsSceneWheelEvent*);
    9894#endif
    9995    void keyPressEvent(QKeyEvent*);
     
    10298    void focusOutEvent(QFocusEvent*);
    10399
    104     void dragEnterEvent(QDragEnterEvent *);
    105     void dragLeaveEvent(QDragLeaveEvent *);
    106     void dragMoveEvent(QDragMoveEvent *);
    107     void dropEvent(QDropEvent *);
     100    void dragEnterEvent(QDragEnterEvent*);
     101    void dragEnterEvent(QGraphicsSceneDragDropEvent*);
     102    void dragLeaveEvent(QDragLeaveEvent*);
     103    void dragLeaveEvent(QGraphicsSceneDragDropEvent*);
     104    void dragMoveEvent(QDragMoveEvent*);
     105    void dragMoveEvent(QGraphicsSceneDragDropEvent*);
     106    void dropEvent(QDropEvent*);
     107    void dropEvent(QGraphicsSceneDragDropEvent*);
    108108
    109109    void inputMethodEvent(QInputMethodEvent*);
    110110
    111111    void shortcutOverrideEvent(QKeyEvent*);
    112     void leaveEvent(QEvent *);
    113     bool handleScrolling(QKeyEvent*);
     112    void leaveEvent(QEvent*);
     113    void handleClipboard(QEvent*, Qt::MouseButton);
     114    void handleSoftwareInputPanel(Qt::MouseButton);
     115    bool handleScrolling(QKeyEvent*, WebCore::Frame*);
     116
     117    void setInspector(QWebInspector*);
     118    QWebInspector* getOrCreateInspector();
     119    WebCore::InspectorController* inspectorController();
    114120
    115121#ifndef QT_NO_SHORTCUT
     
    126132
    127133    QWebPage *q;
     134    QWebPageClient* client;
    128135#ifndef QT_NO_UNDOSTACK
    129136    QUndoStack *undoStack;
    130137#endif
    131     QWidget *view;
     138
     139#if QT_VERSION >= 0x040600
     140    QWeakPointer<QWidget> view;
     141#else
     142    QWidget* view;
     143#endif
    132144
    133145    bool insideOpenCall;
     
    137149    QPoint tripleClick;
    138150    QBasicTimer tripleClickTimer;
     151
     152    bool clickCausedFocus;
    139153
    140154#if QT_VERSION < 0x040400
     
    155169
    156170    QSize viewportSize;
     171    QSize fixedLayoutSize;
    157172    QWebHistory history;
    158173    QWebHitTestResult hitTestResult;
     
    163178    QPalette palette;
    164179    bool editable;
     180    bool useFixedLayout;
    165181
    166182    QAction *actions[QWebPage::WebActionCount];
     
    168184    QWebPluginFactory *pluginFactory;
    169185
     186    QWidget* inspectorFrontend;
     187    QWebInspector* inspector;
     188    bool inspectorIsInternalOnly; // True if created through the Inspect context menu action
     189
    170190    static bool drtRun;
    171191};
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp

    r2 r561  
    2626    \brief The QWebPluginFactory class creates plugins to be embedded into web
    2727    pages.
     28
     29    \inmodule QtWebKit
    2830
    2931    QWebPluginFactory is a factory for creating plugins for QWebPage. A plugin
     
    4850    \since 4.4
    4951    \brief the QWebPluginFactory::Plugin structure describes the properties of a plugin a QWebPluginFactory can create.
     52
     53    \inmodule QtWebKit
    5054*/
    5155
     
    6973    \since 4.4
    7074    \brief The QWebPluginFactory::MimeType structure describes a mime type supported by a plugin.
     75
     76    \inmodule QtWebKit
     77*/
     78
     79/*!
     80    Returns true if this mimetype is the same as the \a other mime type.
     81*/
     82bool QWebPluginFactory::MimeType::operator==(const MimeType& other) const
     83{
     84    return name == other.name
     85           && description == other.description
     86           && fileExtensions == other.fileExtensions;
     87}
     88
     89/*!
     90    \fn bool QWebPluginFactory::MimeType::operator!=(const MimeType& other) const
     91
     92    Returns true if this mimetype is different from the \a other mime type.
    7193*/
    7294
     
    137159
    138160    \code
    139     <object type="application/x-pdf" data="http://qtsoftware.com/document.pdf" width="500" height="400">
     161    <object type="application/x-pdf" data="http://qt.nokia.com/document.pdf" width="500" height="400">
    140162        <param name="showTableOfContents" value="true" />
    141163        <param name="hideThumbnails" value="false" />
     
    150172            \o "application/x-pdf"
    151173    \row    \o url
    152             \o "http://qtsoftware.com/document.pdf"
     174            \o "http://qt.nokia.com/document.pdf"
    153175    \row    \o argumentNames
    154176            \o "showTableOfContents" "hideThumbnails"
     
    174196    \brief The ExtensionOption class provides an extended input argument to QWebPluginFactory's extension support.
    175197
     198    \inmodule QtWebKit
     199
    176200    \sa QWebPluginFactory::extension()
    177201*/
     
    181205    \since 4.4
    182206    \brief The ExtensionOption class provides an extended output argument to QWebPluginFactory's extension support.
     207
     208    \inmodule QtWebKit
    183209
    184210    \sa QWebPluginFactory::extension()
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.h

    r2 r561  
    3232class QWebPluginFactoryPrivate;
    3333
    34 class QWEBKIT_EXPORT QWebPluginFactory : public QObject
    35 {
     34class QWEBKIT_EXPORT QWebPluginFactory : public QObject {
    3635    Q_OBJECT
    3736public:
    38     struct MimeType {
     37    struct QWEBKIT_EXPORT MimeType {
    3938        QString name;
    4039        QString description;
    4140        QStringList fileExtensions;
     41        bool operator==(const MimeType& other) const;
     42        inline bool operator!=(const MimeType& other) const { return !operator==(other); }
    4243    };
    4344
     
    4849    };
    4950
    50     explicit QWebPluginFactory(QObject *parent = 0);
     51    explicit QWebPluginFactory(QObject* parent = 0);
    5152    virtual ~QWebPluginFactory();
    5253
     
    5455    virtual void refreshPlugins();
    5556
    56     virtual QObject *create(const QString &mimeType,
    57                             const QUrl &url,
    58                             const QStringList &argumentNames,
    59                             const QStringList &argumentValues) const = 0;
     57    virtual QObject *create(const QString& mimeType,
     58                            const QUrl&,
     59                            const QStringList& argumentNames,
     60                            const QStringList& argumentValues) const = 0;
    6061
    6162    enum Extension {
     
    6566    class ExtensionReturn
    6667    {};
    67     virtual bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0);
     68    virtual bool extension(Extension extension, const ExtensionOption* option = 0, ExtensionReturn* output = 0);
    6869    virtual bool supportsExtension(Extension extension) const;
    6970
    7071private:
    71     QWebPluginFactoryPrivate *d;
     72    QWebPluginFactoryPrivate* d;
    7273};
    7374
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.cpp

    r2 r561  
    3131using namespace WebCore;
    3232
     33void QWEBKIT_EXPORT qt_drt_whiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains)
     34{
     35    SecurityOrigin::whiteListAccessFromOrigin(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains);
     36}
     37
     38void QWEBKIT_EXPORT qt_drt_resetOriginAccessWhiteLists()
     39{
     40    SecurityOrigin::resetOriginAccessWhiteLists();
     41}
     42
    3343/*!
    3444    \class QWebSecurityOrigin
     
    3646    \brief The QWebSecurityOrigin class defines a security boundary for web sites.
    3747
     48    \inmodule QtWebKit
     49
    3850    QWebSecurityOrigin provides access to the security domains defined by web sites.
    39     An origin consists of a host name, a scheme, and a port number. Web sites with the same
    40     security origin can access each other's resources for client-side scripting or databases.
    41 
    42     ### diagram
     51    An origin consists of a host name, a scheme, and a port number. Web sites
     52    with the same security origin can access each other's resources for client-side
     53    scripting or databases.
    4354
    4455    For example the site \c{http://www.example.com/my/page.html} is allowed to share the same
     
    4859    because they are of a different security origin.
    4960
    50     QWebSecurity also provides access to all databases defined within a security origin.
     61    Call QWebFrame::securityOrigin() to get the QWebSecurityOrigin for a frame in a
     62    web page, and use host(), scheme() and port() to identify the security origin.
     63
     64    Use databases() to access the databases defined within a security origin. The
     65    disk usage of the origin's databases can be limited with setDatabaseQuota().
     66    databaseQuota() and databaseUsage() report the current limit as well as the
     67    current usage.
    5168
    5269    For more information refer to the
     
    102119qint64 QWebSecurityOrigin::databaseUsage() const
    103120{
     121#if ENABLE(DATABASE)
    104122    return DatabaseTracker::tracker().usageForOrigin(d->origin.get());
     123#else
     124    return 0;
     125#endif
    105126}
    106127
     
    110131qint64 QWebSecurityOrigin::databaseQuota() const
    111132{
     133#if ENABLE(DATABASE)
    112134    return DatabaseTracker::tracker().quotaForOrigin(d->origin.get());
     135#else
     136    return 0;
     137#endif
    113138}
    114139
     
    122147void QWebSecurityOrigin::setDatabaseQuota(qint64 quota)
    123148{
     149#if ENABLE(DATABASE)
    124150    DatabaseTracker::tracker().setQuota(d->origin.get(), quota);
     151#endif
    125152}
    126153
     
    145172QList<QWebSecurityOrigin> QWebSecurityOrigin::allOrigins()
    146173{
     174    QList<QWebSecurityOrigin> webOrigins;
     175
     176#if ENABLE(DATABASE)
    147177    Vector<RefPtr<SecurityOrigin> > coreOrigins;
    148178    DatabaseTracker::tracker().origins(coreOrigins);
    149     QList<QWebSecurityOrigin> webOrigins;
    150179
    151180    for (unsigned i = 0; i < coreOrigins.size(); ++i) {
     
    153182        webOrigins.append(priv);
    154183    }
     184#endif
     185
    155186    return webOrigins;
    156187}
     
    161192QList<QWebDatabase> QWebSecurityOrigin::databases() const
    162193{
     194    QList<QWebDatabase> databases;
     195
     196#if ENABLE(DATABASE)
    163197    Vector<String> nameVector;
    164     QList<QWebDatabase> databases;
     198
    165199    if (!DatabaseTracker::tracker().databaseNamesForOrigin(d->origin.get(), nameVector))
    166200        return databases;
     
    172206        databases.append(webDatabase);
    173207    }
     208#endif
     209
    174210    return databases;
    175211}
    176212
     213/*!
     214    \since 4.6
     215
     216    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.
     218*/
     219void QWebSecurityOrigin::addLocalScheme(const QString& scheme)
     220{
     221    SecurityOrigin::registerURLSchemeAsLocal(scheme);
     222}
     223
     224/*!
     225    \since 4.6
     226
     227    Removes the given \a scheme from the list of local schemes.
     228
     229    \sa addLocalScheme()
     230*/
     231void QWebSecurityOrigin::removeLocalScheme(const QString& scheme)
     232{
     233    SecurityOrigin::removeURLSchemeRegisteredAsLocal(scheme);
     234}
     235
     236/*!
     237    \since 4.6
     238    Returns a list of all the schemes that were set by the application as local schemes,
     239    \sa addLocalScheme(), removeLocalScheme()
     240*/
     241QStringList QWebSecurityOrigin::localSchemes()
     242{
     243    QStringList list;
     244    const URLSchemesMap& map = SecurityOrigin::localURLSchemes();
     245    URLSchemesMap::const_iterator end = map.end();
     246    for (URLSchemesMap::const_iterator i = map.begin(); i != end; ++i) {
     247        const QString scheme = *i;
     248        list.append(scheme);
     249    }
     250    return list;
     251}
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.h

    r2 r561  
    3535class QWebFrame;
    3636
    37 class QWEBKIT_EXPORT QWebSecurityOrigin
    38 {
     37class QWEBKIT_EXPORT QWebSecurityOrigin {
    3938public:
    4039    static QList<QWebSecurityOrigin> allOrigins();
     40    static void addLocalScheme(const QString& scheme);
     41    static void removeLocalScheme(const QString& scheme);
     42    static QStringList localSchemes();
    4143
    4244    ~QWebSecurityOrigin();
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin_p.h

    r2 r561  
    2424#include "RefPtr.h"
    2525
    26 class QWebSecurityOriginPrivate : public QSharedData
    27 {
     26class QWebSecurityOriginPrivate : public QSharedData {
    2827public:
    2928    QWebSecurityOriginPrivate(WebCore::SecurityOrigin* o)
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp

    r2 r561  
    2323#include "qwebpage.h"
    2424#include "qwebpage_p.h"
     25#include "qwebplugindatabase_p.h"
    2526
    2627#include "Cache.h"
     28#include "CrossOriginPreflightResultCache.h"
     29#include "FontCache.h"
    2730#include "Page.h"
    2831#include "PageCache.h"
     
    3538#include "ApplicationCacheStorage.h"
    3639#include "DatabaseTracker.h"
    37 
     40#include "FileSystem.h"
     41
     42#include <QApplication>
     43#include <QDesktopServices>
     44#include <QDir>
    3845#include <QHash>
    3946#include <QSharedData>
     
    4148#include <QFileInfo>
    4249
    43 class QWebSettingsPrivate
    44 {
     50#if ENABLE(QT_BEARER)
     51#include "NetworkStateNotifier.h"
     52#endif
     53
     54void QWEBKIT_EXPORT qt_networkAccessAllowed(bool isAllowed)
     55{
     56#if ENABLE(QT_BEARER)
     57    WebCore::networkStateNotifier().setNetworkAccessAllowed(isAllowed);
     58#endif
     59}
     60
     61class QWebSettingsPrivate {
    4562public:
    46     QWebSettingsPrivate(WebCore::Settings *wcSettings = 0)
     63    QWebSettingsPrivate(WebCore::Settings* wcSettings = 0)
    4764        : settings(wcSettings)
    4865    {
     
    5370    QHash<int, bool> attributes;
    5471    QUrl userStyleSheetLocation;
    55     QString localStorageDatabasePath;
     72    QString defaultTextEncoding;
     73    QString localStoragePath;
    5674    QString offlineWebApplicationCachePath;
    5775    qint64 offlineStorageDefaultQuota;
    5876
    5977    void apply();
    60     WebCore::Settings *settings;
     78    WebCore::Settings* settings;
    6179};
    6280
     
    7896}
    7997
    80 Q_GLOBAL_STATIC(QList<QWebSettingsPrivate *>, allSettings);
     98Q_GLOBAL_STATIC(QList<QWebSettingsPrivate*>, allSettings);
    8199
    82100void QWebSettingsPrivate::apply()
     
    85103        settings->setTextAreasAreResizable(true);
    86104
    87         QWebSettingsPrivate *global = QWebSettings::globalSettings()->d;
     105        QWebSettingsPrivate* global = QWebSettings::globalSettings()->d;
    88106
    89107        QString family = fontFamilies.value(QWebSettings::StandardFont,
     
    162180        settings->setUserStyleSheetLocation(WebCore::KURL(location));
    163181
    164         QString localStoragePath = !localStorageDatabasePath.isEmpty() ? localStorageDatabasePath : global->localStorageDatabasePath;
    165         settings->setLocalStorageDatabasePath(localStoragePath);
     182        QString encoding = !defaultTextEncoding.isEmpty() ? defaultTextEncoding: global->defaultTextEncoding;
     183        settings->setDefaultTextEncodingName(encoding);
     184
     185        QString storagePath = !localStoragePath.isEmpty() ? localStoragePath : global->localStoragePath;
     186        settings->setLocalStorageDatabasePath(storagePath);
    166187
    167188        value = attributes.value(QWebSettings::ZoomTextOnly,
     
    181202        settings->setOfflineWebApplicationCacheEnabled(value);
    182203
    183         value = attributes.value(QWebSettings::LocalStorageDatabaseEnabled,
    184                                       global->attributes.value(QWebSettings::LocalStorageDatabaseEnabled));
     204        value = attributes.value(QWebSettings::LocalStorageEnabled,
     205                                      global->attributes.value(QWebSettings::LocalStorageEnabled));
     206                                                                                                                                 
    185207        settings->setLocalStorageEnabled(value);
     208
     209        value = attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls,
     210                                      global->attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls));
     211        settings->setAllowUniversalAccessFromFileURLs(value);
     212        settings->setUsesPageCache(WebCore::pageCache()->capacity());
    186213    } else {
    187         QList<QWebSettingsPrivate *> settings = *::allSettings();
     214        QList<QWebSettingsPrivate*> settings = *::allSettings();
    188215        for (int i = 0; i < settings.count(); ++i)
    189216            settings[i]->apply();
     
    197224    QWebPage instances where the particular setting is not overriden already.
    198225*/
    199 QWebSettings *QWebSettings::globalSettings()
    200 {
    201     static QWebSettings *global = 0;
     226QWebSettings* QWebSettings::globalSettings()
     227{
     228    static QWebSettings* global = 0;
    202229    if (!global)
    203230        global = new QWebSettings;
     
    211238    by QWebPage and QWebFrame.
    212239
     240    \inmodule QtWebKit
     241
    213242    Each QWebPage object has its own QWebSettings object, which configures the
    214243    settings for that page. If a setting is not configured, then it is looked
    215244    up in the global settings object, which can be accessed using
    216     QWebSettings::globalSettings().
    217 
    218     QWebSettings allows configuring font properties such as font size and font
    219     family, the location of a custom stylesheet, and generic attributes like java
    220     script, plugins, etc. The \l{QWebSettings::WebAttribute}{WebAttribute}
    221     enum further describes this.
    222 
    223     QWebSettings also configures global properties such as the web page memory
    224     cache and the web page icon database, local database storage and offline
     245    globalSettings().
     246
     247    QWebSettings allows configuration of browser properties, such as font sizes and
     248    families, the location of a custom style sheet, and generic attributes like
     249    JavaScript and plugins. Individual attributes are set using the setAttribute()
     250    function. The \l{QWebSettings::WebAttribute}{WebAttribute} enum further describes
     251    each attribute.
     252
     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
    225255    applications storage.
     256
     257    \section1 Enabling Plugins
     258
     259    Support for browser plugins can enabled by setting the
     260    \l{QWebSettings::PluginsEnabled}{PluginsEnabled} attribute. For many applications,
     261    this attribute is enabled for all pages by setting it on the
     262    \l{globalSettings()}{global settings object}.
    226263
    227264    \section1 Web Application Support
     
    237274    for each application by calling setOfflineStorageDefaultQuota().
    238275
    239     \sa QWebPage::settings(), QWebView::settings(), {Browser}
     276    \sa QWebPage::settings(), QWebView::settings(), {Web Browser}
    240277*/
    241278
     
    285322    \value AutoLoadImages Specifies whether images are automatically loaded in
    286323        web pages.
     324    \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.
    287326    \value JavascriptEnabled Enables or disables the running of JavaScript
    288327        programs.
     
    297336        can read or write to the clipboard.
    298337    \value DeveloperExtrasEnabled Enables extra tools for Web developers.
    299         Currently this enables the "Inspect" element in the context menu,
    300     which shows the WebKit WebInspector for web site debugging.
     338        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.
    301341    \value LinksIncludedInFocusChain Specifies whether hyperlinks should be
    302342        included in the keyboard focus chain.
     
    306346        are also drawn when the page is printed.
    307347    \value OfflineStorageDatabaseEnabled Specifies whether support for the HTML 5
    308         offline storage feature is enabled or not.
     348        offline storage feature is enabled or not. Disabled by default.
    309349    \value OfflineWebApplicationCacheEnabled Specifies whether support for the HTML 5
    310         web application cache feature is enabled or not.
    311     \value LocalStorageDatabaseEnabled Specifies whether support for the HTML 5
    312         local storage feature is enabled or not.
     350        web application cache feature is enabled or not. Disabled by default.
     351    \value LocalStorageEnabled Specifies whether support for the HTML 5
     352        local storage feature is enabled or not. Disabled by default.
     353    \value LocalStorageDatabaseEnabled \e{This enum value is deprecated.} Use
     354        QWebSettings::LocalStorageEnabled instead.
     355    \value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are allowed to access remote urls.
    313356*/
    314357
     
    322365    d->fontSizes.insert(QWebSettings::MinimumFontSize, 0);
    323366    d->fontSizes.insert(QWebSettings::MinimumLogicalFontSize, 0);
    324     d->fontSizes.insert(QWebSettings::DefaultFontSize, 14);
    325     d->fontSizes.insert(QWebSettings::DefaultFixedFontSize, 14);
     367    d->fontSizes.insert(QWebSettings::DefaultFontSize, 16);
     368    d->fontSizes.insert(QWebSettings::DefaultFixedFontSize, 13);
    326369    d->fontFamilies.insert(QWebSettings::StandardFont, QLatin1String("Arial"));
    327370    d->fontFamilies.insert(QWebSettings::FixedFont, QLatin1String("Courier New"));
     
    332375
    333376    d->attributes.insert(QWebSettings::AutoLoadImages, true);
     377    d->attributes.insert(QWebSettings::DnsPrefetchEnabled, false);
    334378    d->attributes.insert(QWebSettings::JavascriptEnabled, true);
    335379    d->attributes.insert(QWebSettings::LinksIncludedInFocusChain, true);
    336380    d->attributes.insert(QWebSettings::ZoomTextOnly, false);
    337381    d->attributes.insert(QWebSettings::PrintElementBackgrounds, true);
    338     d->attributes.insert(QWebSettings::OfflineStorageDatabaseEnabled, true);
    339     d->attributes.insert(QWebSettings::OfflineWebApplicationCacheEnabled, true);
    340     d->attributes.insert(QWebSettings::LocalStorageDatabaseEnabled, true);
     382    d->attributes.insert(QWebSettings::OfflineStorageDatabaseEnabled, false);
     383    d->attributes.insert(QWebSettings::OfflineWebApplicationCacheEnabled, false);
     384    d->attributes.insert(QWebSettings::LocalStorageEnabled, false);
     385    d->attributes.insert(QWebSettings::LocalContentCanAccessRemoteUrls, false);
    341386    d->offlineStorageDefaultQuota = 5 * 1024 * 1024;
    342 
     387    d->defaultTextEncoding = QLatin1String("iso-8859-1");
    343388}
    344389
     
    346391    \internal
    347392*/
    348 QWebSettings::QWebSettings(WebCore::Settings *settings)
     393QWebSettings::QWebSettings(WebCore::Settings* settings)
    349394    : d(new QWebSettingsPrivate(settings))
    350395{
     
    381426    int defaultValue = 0;
    382427    if (d->settings) {
    383         QWebSettingsPrivate *global = QWebSettings::globalSettings()->d;
     428        QWebSettingsPrivate* global = QWebSettings::globalSettings()->d;
    384429        defaultValue = global->fontSizes.value(type);
    385430    }
     
    404449    Specifies the location of a user stylesheet to load with every web page.
    405450
    406     The \a location can be a URL or a path on the local filesystem.
     451    The \a location must be either a path on the local filesystem, or a data URL
     452    with UTF-8 and Base64 encoded data, such as:
     453
     454    "data:text/css;charset=utf-8;base64,cCB7IGJhY2tncm91bmQtY29sb3I6IHJlZCB9Ow==;"
    407455
    408456    \sa userStyleSheetUrl()
    409457*/
    410 void QWebSettings::setUserStyleSheetUrl(const QUrl &location)
     458void QWebSettings::setUserStyleSheetUrl(const QUrl& location)
    411459{
    412460    d->userStyleSheetLocation = location;
     
    425473
    426474/*!
     475    \since 4.6
     476    Specifies the default text encoding system.
     477
     478    The \a encoding, must be a string describing an encoding such as "utf-8",
     479    "iso-8859-1", etc. If left empty a default value will be used. For a more
     480    extensive list of encoding names see \l{QTextCodec}
     481
     482    \sa defaultTextEncoding()
     483*/
     484void QWebSettings::setDefaultTextEncoding(const QString& encoding)
     485{
     486    d->defaultTextEncoding = encoding;
     487    d->apply();
     488}
     489
     490/*!
     491    \since 4.6
     492    Returns the default text encoding.
     493
     494    \sa setDefaultTextEncoding()
     495*/
     496QString QWebSettings::defaultTextEncoding() const
     497{
     498    return d->defaultTextEncoding;
     499}
     500
     501/*!
    427502    Sets the path of the icon database to \a path. The icon database is used
    428503    to store "favicons" associated with web sites.
     
    432507    Setting an empty path disables the icon database.
    433508*/
    434 void QWebSettings::setIconDatabasePath(const QString &path)
     509void QWebSettings::setIconDatabasePath(const QString& path)
    435510{
    436511    WebCore::iconDatabase()->delayDatabaseCleanup();
     
    455530QString QWebSettings::iconDatabasePath()
    456531{
    457     if (WebCore::iconDatabase()->isEnabled() && WebCore::iconDatabase()->isOpen()) {
     532    if (WebCore::iconDatabase()->isEnabled() && WebCore::iconDatabase()->isOpen())
    458533        return WebCore::iconDatabase()->databasePath();
    459     } else {
     534    else
    460535        return QString();
    461     }
    462536}
    463537
     
    481555    \sa setIconDatabasePath()
    482556*/
    483 QIcon QWebSettings::iconForUrl(const QUrl &url)
     557QIcon QWebSettings::iconForUrl(const QUrl& url)
    484558{
    485559    WebCore::Image* image = WebCore::iconDatabase()->iconForPageURL(WebCore::KURL(url).string(),
    486560                                WebCore::IntSize(16, 16));
    487     if (!image) {
     561    if (!image)
    488562        return QPixmap();
    489     }
    490     QPixmap *icon = image->nativeImageForCurrentFrame();
    491     if (!icon) {
     563
     564    QPixmap* icon = image->nativeImageForCurrentFrame();
     565    if (!icon)
    492566        return QPixmap();
    493     }
    494     return *icon;
    495 }
     567
     568    return* icon;
     569}
     570
     571/*
     572    Returns the plugin database object.
     573
     574QWebPluginDatabase *QWebSettings::pluginDatabase()
     575{
     576    static QWebPluginDatabase* database = 0;
     577    if (!database)
     578        database = new QWebPluginDatabase();
     579    return database;
     580}
     581*/
    496582
    497583/*!
     
    504590    \sa webGraphic()
    505591*/
    506 void QWebSettings::setWebGraphic(WebGraphic type, const QPixmap &graphic)
    507 {
    508     WebGraphicHash *h = graphics();
     592void QWebSettings::setWebGraphic(WebGraphic type, const QPixmap& graphic)
     593{
     594    WebGraphicHash* h = graphics();
    509595    if (graphic.isNull())
    510596        h->remove(type);
     
    528614
    529615/*!
    530     Sets the maximum number of pages to hold in the memory cache to \a pages.
     616    Frees up as much memory as possible by cleaning all memory caches such
     617    as page, object and font cache.
     618
     619    \since 4.6
     620 */
     621void QWebSettings::clearMemoryCaches()
     622{
     623    // Turn the cache on and off.  Disabling the object cache will remove all
     624    // resources from the cache.  They may still live on if they are referenced
     625    // by some Web page though.
     626    if (!WebCore::cache()->disabled()) {
     627        WebCore::cache()->setDisabled(true);
     628        WebCore::cache()->setDisabled(false);
     629    }
     630
     631    int pageCapacity = WebCore::pageCache()->capacity();
     632    // Setting size to 0, makes all pages be released.
     633    WebCore::pageCache()->setCapacity(0);
     634    WebCore::pageCache()->releaseAutoreleasedPagesNow();
     635    WebCore::pageCache()->setCapacity(pageCapacity);
     636
     637    // Invalidating the font cache and freeing all inactive font data.
     638    WebCore::fontCache()->invalidate();
     639
     640    // Empty the Cross-Origin Preflight cache
     641    WebCore::CrossOriginPreflightResultCache::shared().empty();
     642}
     643
     644/*!
     645    Sets the maximum number of pages to hold in the memory page cache to \a pages.
     646
     647    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.
     650
     651    For more information about the feature, please refer to:
     652
     653    http://webkit.org/blog/427/webkit-page-cache-i-the-basics/
    531654*/
    532655void QWebSettings::setMaximumPagesInCache(int pages)
    533656{
     657    QWebSettingsPrivate* global = QWebSettings::globalSettings()->d;
    534658    WebCore::pageCache()->setCapacity(qMax(0, pages));
     659    global->apply();
    535660}
    536661
     
    549674   The \a cacheMinDeadCapacity specifies the \e minimum number of bytes that
    550675   dead objects should consume when the cache is under pressure.
    551    
     676
    552677   \a cacheMaxDead is the \e maximum number of bytes that dead objects should
    553678   consume when the cache is \bold not under pressure.
     
    561686void QWebSettings::setObjectCacheCapacities(int cacheMinDeadCapacity, int cacheMaxDead, int totalCapacity)
    562687{
    563     bool disableCache = cacheMinDeadCapacity == 0 && cacheMaxDead == 0 && totalCapacity == 0;
     688    bool disableCache = !cacheMinDeadCapacity && !cacheMaxDead && !totalCapacity;
    564689    WebCore::cache()->setDisabled(disableCache);
    565690
     
    573698    \a which.
    574699*/
    575 void QWebSettings::setFontFamily(FontFamily which, const QString &family)
     700void QWebSettings::setFontFamily(FontFamily which, const QString& family)
    576701{
    577702    d->fontFamilies.insert(which, family);
     
    587712    QString defaultValue;
    588713    if (d->settings) {
    589         QWebSettingsPrivate *global = QWebSettings::globalSettings()->d;
     714        QWebSettingsPrivate* global = QWebSettings::globalSettings()->d;
    590715        defaultValue = global->fontFamilies.value(which);
    591716    }
     
    609734/*!
    610735    \fn void QWebSettings::setAttribute(WebAttribute attribute, bool on)
    611    
     736
    612737    Enables or disables the specified \a attribute feature depending on the
    613738    value of \a on.
     
    628753    bool defaultValue = false;
    629754    if (d->settings) {
    630         QWebSettingsPrivate *global = QWebSettings::globalSettings()->d;
     755        QWebSettingsPrivate* global = QWebSettings::globalSettings()->d;
    631756        defaultValue = global->attributes.value(attr);
    632757    }
     
    706831}
    707832
    708 /*
    709     \internal
     833/*!
     834    \since 4.6
    710835    \relates QWebSettings
    711    
     836
    712837    Sets the path for HTML5 offline web application cache storage to \a path.
    713838
     839    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
     841    first ask the application cache for the contents, before hitting the
     842    network.
     843
     844    The feature is described in details at:
     845    http://dev.w3.org/html5/spec/Overview.html#appcache
     846
    714847    \a path must point to an existing directory where the cache is stored.
    715848
     
    718851    \sa offlineWebApplicationCachePath()
    719852*/
    720 void QWEBKIT_EXPORT qt_websettings_setOfflineWebApplicationCachePath(const QString& path)
     853void QWebSettings::setOfflineWebApplicationCachePath(const QString& path)
    721854{
    722855#if ENABLE(OFFLINE_WEB_APPLICATIONS)
     
    725858}
    726859
    727 /*
    728     \internal
     860/*!
     861    \since 4.6
    729862    \relates QWebSettings
    730    
     863
    731864    Returns the path of the HTML5 offline web application cache storage
    732865    or an empty string if the feature is disabled.
     
    734867    \sa setOfflineWebApplicationCachePath()
    735868*/
    736 QString QWEBKIT_EXPORT qt_websettings_offlineWebApplicationCachePath()
     869QString QWebSettings::offlineWebApplicationCachePath()
    737870{
    738871#if ENABLE(OFFLINE_WEB_APPLICATIONS)
     
    743876}
    744877
    745 /*
    746     \since 4.5
     878/*!
     879    \since 4.6
     880
     881    Sets the value of the quota for the offline web application cache
     882    to \a maximumSize.
     883*/
     884void QWebSettings::setOfflineWebApplicationCacheQuota(qint64 maximumSize)
     885{
     886#if ENABLE(OFFLINE_WEB_APPLICATIONS)
     887    WebCore::cacheStorage().setMaximumSize(maximumSize);
     888#endif
     889}
     890
     891/*!
     892    \since 4.6
     893
     894    Returns the value of the quota for the offline web application cache.
     895*/
     896qint64 QWebSettings::offlineWebApplicationCacheQuota()
     897{
     898#if ENABLE(OFFLINE_WEB_APPLICATIONS)
     899    return WebCore::cacheStorage().maximumSize();
     900#else
     901    return 0;
     902#endif
     903}
     904
     905/*!
     906    \since 4.6
    747907    \relates QWebSettings
    748908
    749     Sets the path for HTML5 local storage databases to \a path.
    750 
    751     \a path must point to an existing directory where the cache is stored.
    752 
    753     Setting an empty path disables the feature.
    754 
    755     \sa localStorageDatabasePath()
    756 */
    757 void QWEBKIT_EXPORT qt_websettings_setLocalStorageDatabasePath(QWebSettings* settings, const QString& path)
    758 {
    759     QWebSettingsPrivate *d = settings->handle();
    760     d->localStorageDatabasePath = path;
     909    Sets the path for HTML5 local storage to \a path.
     910   
     911    For more information on HTML5 local storage see the
     912    \l{http://www.w3.org/TR/webstorage/#the-localstorage-attribute}{Web Storage standard}.
     913   
     914    Support for local storage can enabled by setting the
     915    \l{QWebSettings::LocalStorageEnabled}{LocalStorageEnabled} attribute.     
     916
     917    \sa localStoragePath()
     918*/
     919void QWebSettings::setLocalStoragePath(const QString& path)
     920{
     921    d->localStoragePath = path;
    761922    d->apply();
    762923}
    763924
    764 /*
    765     \since 4.5
     925/*!
     926    \since 4.6
    766927    \relates QWebSettings
    767928
    768     Returns the path for HTML5 local storage databases
    769     or an empty string if the feature is disabled.
    770 
    771     \sa setLocalStorageDatabasePath()
    772 */
    773 QString QWEBKIT_EXPORT qt_websettings_localStorageDatabasePath(QWebSettings* settings)
    774 {
    775     return settings->handle()->localStorageDatabasePath;
     929    Returns the path for HTML5 local storage.
     930   
     931    \sa setLocalStoragePath()
     932*/
     933QString QWebSettings::localStoragePath() const
     934{
     935    return d->localStoragePath;
     936}
     937
     938/*!
     939    \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   
     947    \sa localStoragePath()
     948*/
     949void QWebSettings::enablePersistentStorage(const QString& path)
     950{
     951    QString storagePath;
     952
     953    if (path.isEmpty()) {
     954        storagePath = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
     955
     956        if (storagePath.isEmpty())
     957            storagePath = WebCore::pathByAppendingComponent(QDir::homePath(), QCoreApplication::applicationName());
     958    } else
     959        storagePath = path;
     960
     961    WebCore::makeAllDirectories(storagePath);
     962
     963    QWebSettings::setIconDatabasePath(storagePath);
     964    QWebSettings::setOfflineWebApplicationCachePath(storagePath);
     965    QWebSettings::setOfflineStoragePath(WebCore::pathByAppendingComponent(storagePath, "Databases"));
     966    QWebSettings::globalSettings()->setLocalStoragePath(WebCore::pathByAppendingComponent(storagePath, "LocalStorage"));
     967    QWebSettings::globalSettings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
     968    QWebSettings::globalSettings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true);
     969    QWebSettings::globalSettings()->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, true);
    776970}
    777971
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h

    r2 r561  
    2828#include <QtCore/qshareddata.h>
    2929
    30 namespace WebCore
    31 {
     30namespace WebCore {
    3231    class Settings;
    3332}
    3433
    3534class QWebPage;
     35class QWebPluginDatabase;
    3636class QWebSettingsPrivate;
    3737QT_BEGIN_NAMESPACE
     
    3939QT_END_NAMESPACE
    4040
    41 class QWEBKIT_EXPORT QWebSettings
    42 {
     41class QWEBKIT_EXPORT QWebSettings {
    4342public:
    4443    enum FontFamily {
     
    6463        OfflineStorageDatabaseEnabled,
    6564        OfflineWebApplicationCacheEnabled,
    66         LocalStorageDatabaseEnabled
     65        LocalStorageEnabled,
     66#ifdef QT_DEPRECATED
     67        LocalStorageDatabaseEnabled = LocalStorageEnabled,
     68#endif
     69        LocalContentCanAccessRemoteUrls,
     70        DnsPrefetchEnabled
    6771    };
    6872    enum WebGraphic {
     
    96100    QUrl userStyleSheetUrl() const;
    97101
     102    void setDefaultTextEncoding(const QString &encoding);
     103    QString defaultTextEncoding() const;
     104
    98105    static void setIconDatabasePath(const QString &location);
    99106    static QString iconDatabasePath();
    100107    static void clearIconDatabase();
    101108    static QIcon iconForUrl(const QUrl &url);
     109
     110    //static QWebPluginDatabase *pluginDatabase();
    102111
    103112    static void setWebGraphic(WebGraphic type, const QPixmap &graphic);
     
    112121    static void setOfflineStorageDefaultQuota(qint64 maximumSize);
    113122    static qint64 offlineStorageDefaultQuota();
     123
     124    static void setOfflineWebApplicationCachePath(const QString& path);
     125    static QString offlineWebApplicationCachePath();
     126    static void setOfflineWebApplicationCacheQuota(qint64 maximumSize);
     127    static qint64 offlineWebApplicationCacheQuota();
     128   
     129    void setLocalStoragePath(const QString& path);
     130    QString localStoragePath() const;
     131
     132    static void clearMemoryCaches();
     133
     134    static void enablePersistentStorage(const QString& path = QString());
    114135
    115136    inline QWebSettingsPrivate* handle() const { return d; }
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp

    r2 r561  
    22    Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
    33    Copyright (C) 2008 Holger Hans Peter Freyther
     4    Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
    45
    56    This library is free software; you can redistribute it and/or
     
    2122#include "config.h"
    2223#include "qwebview.h"
     24
     25#include "QWebPageClient.h"
    2326#include "qwebframe.h"
    2427#include "qwebpage_p.h"
     
    2831#include "qpainter.h"
    2932#include "qprinter.h"
    30 
    31 class QWebViewPrivate
    32 {
     33#include "qdir.h"
     34#include "qfile.h"
     35
     36class QWebViewPrivate {
    3337public:
    3438    QWebViewPrivate(QWebView *view)
    3539        : view(view)
    3640        , page(0)
    37 #ifndef QT_NO_CURSOR
    38         , cursorSetByWebCore(false)
    39         , usesWebCoreCursor(true)
    40 #endif
    41     {}
     41        , renderHints(QPainter::TextAntialiasing)
     42    {
     43        Q_ASSERT(view);
     44    }
     45
     46    void _q_pageDestroyed();
    4247
    4348    QWebView *view;
    4449    QWebPage *page;
    4550
    46 
    47 #ifndef QT_NO_CURSOR
    48     /*
    49      * We keep track of if we have called setCursor and if the CursorChange
    50      * event is sent due our setCursor call and if we currently use the WebCore
    51      * Cursor and use it to decide if we can update to another WebCore Cursor.
    52      */
    53     bool cursorSetByWebCore;
    54     bool usesWebCoreCursor;
    55 
    56     void setCursor(const QCursor& newCursor)
    57     {
    58         webCoreCursor = newCursor;
    59 
    60         if (usesWebCoreCursor) {
    61             cursorSetByWebCore = true;
    62             view->setCursor(webCoreCursor);
    63         }
    64     }
    65 
    66     QCursor webCoreCursor;
    67 #endif
     51    QPainter::RenderHints renderHints;
    6852};
     53
     54void QWebViewPrivate::_q_pageDestroyed()
     55{
     56    page = 0;
     57    view->setPage(0);
     58}
    6959
    7060/*!
     
    7565    \ingroup advanced
    7666
     67    \inmodule QtWebKit
     68
    7769    QWebView is the main widget component of the QtWebKit web browsing module.
    7870    It can be used in various applications to display web content live from the
    7971    Internet.
    8072
    81     The image below shows QWebView previewed in \QD with the Trolltech website.
     73    The image below shows QWebView previewed in \QD with a Nokia website.
    8274
    8375    \image qwebview-url.png
    8476
    8577    A web site can be loaded onto QWebView with the load() function. Like all
    86     Qt Widgets, the show() function must be invoked in order to display
     78    Qt widgets, the show() function must be invoked in order to display
    8779    QWebView. The snippet below illustrates this:
    8880
    89     \snippet doc/src/snippets/webkit/simple/main.cpp Using QWebView
     81    \snippet webkitsnippets/simple/main.cpp Using QWebView
    9082
    9183    Alternatively, setUrl() can also be used to load a web site. If you have
     
    144136    on QtGui, so you should use a QApplication instead of QCoreApplication.
    145137
    146     \sa {Previewer Example}, {Browser}
     138    \sa {Previewer Example}, {Web Browser}, {Form Extractor Example},
     139    {Google Chat Example}, {Fancy Browser Example}
    147140*/
    148141
     
    157150    d = new QWebViewPrivate(this);
    158151
    159 #if !defined(Q_WS_QWS)
     152#if !defined(Q_WS_QWS) && !defined(Q_OS_SYMBIAN)
    160153    setAttribute(Qt::WA_InputMethodEnabled);
    161154#endif
     
    172165QWebView::~QWebView()
    173166{
    174     if (d->page)
     167    if (d->page) {
     168#if QT_VERSION >= 0x040600
     169        d->page->d->view.clear();
     170#else
    175171        d->page->d->view = 0;
     172#endif
     173        delete d->page->d->client;
     174        d->page->d->client = 0;
     175    }
    176176
    177177    if (d->page && d->page->parent() == this)
     
    203203    \sa page()
    204204*/
    205 void QWebView::setPage(QWebPage *page)
     205void QWebView::setPage(QWebPage* page)
    206206{
    207207    if (d->page == page)
    208208        return;
    209209    if (d->page) {
    210         if (d->page->parent() == this) {
     210        d->page->d->client = 0; // unset the page client
     211        if (d->page->parent() == this)
    211212            delete d->page;
    212         } else {
     213        else
    213214            d->page->disconnect(this);
    214         }
    215215    }
    216216    d->page = page;
     
    220220        // #### connect signals
    221221        QWebFrame *mainFrame = d->page->mainFrame();
    222         connect(mainFrame, SIGNAL(titleChanged(const QString&)),
    223                 this, SIGNAL(titleChanged(const QString&)));
     222        connect(mainFrame, SIGNAL(titleChanged(QString)),
     223                this, SIGNAL(titleChanged(QString)));
    224224        connect(mainFrame, SIGNAL(iconChanged()),
    225225                this, SIGNAL(iconChanged()));
    226         connect(mainFrame, SIGNAL(urlChanged(const QUrl &)),
    227                 this, SIGNAL(urlChanged(const QUrl &)));
     226        connect(mainFrame, SIGNAL(urlChanged(QUrl)),
     227                this, SIGNAL(urlChanged(QUrl)));
    228228
    229229        connect(d->page, SIGNAL(loadStarted()),
     
    233233        connect(d->page, SIGNAL(loadFinished(bool)),
    234234                this, SIGNAL(loadFinished(bool)));
    235         connect(d->page, SIGNAL(statusBarMessage(const QString &)),
    236                 this, SIGNAL(statusBarMessage(const QString &)));
    237         connect(d->page, SIGNAL(linkClicked(const QUrl &)),
    238                 this, SIGNAL(linkClicked(const QUrl &)));
     235        connect(d->page, SIGNAL(statusBarMessage(QString)),
     236                this, SIGNAL(statusBarMessage(QString)));
     237        connect(d->page, SIGNAL(linkClicked(QUrl)),
     238                this, SIGNAL(linkClicked(QUrl)));
    239239
    240240        connect(d->page, SIGNAL(microFocusChanged()),
    241241                this, SLOT(updateMicroFocus()));
     242        connect(d->page, SIGNAL(destroyed()),
     243                this, SLOT(_q_pageDestroyed()));
    242244    }
    243245    setAttribute(Qt::WA_OpaquePaintEvent, d->page);
     
    250252    \note The view remains the same until enough data has arrived to display the new \a url.
    251253
    252     \sa setUrl(), url(), urlChanged()
     254    \sa setUrl(), url(), urlChanged(), QUrl::fromUserInput()
    253255*/
    254256void QWebView::load(const QUrl &url)
     
    326328    It is equivalent to
    327329
    328     \snippet doc/src/snippets/code/src_3rdparty_webkit_WebKit_qt_Api_qwebview.cpp 0
     330    \snippet webkitsnippets/qtwebkit_qwebview_snippet.cpp 0
    329331*/
    330332QWebHistory *QWebView::history() const
     
    338340    It is equivalent to
    339341
    340     \snippet doc/src/snippets/code/src_3rdparty_webkit_WebKit_qt_Api_qwebview.cpp 1
     342    \snippet webkitsnippets/qtwebkit_qwebview_snippet.cpp 1
    341343
    342344    \sa QWebSettings::globalSettings()
     
    430432    selected text to the clipboard.
    431433
    432     \snippet doc/src/snippets/code/src_3rdparty_webkit_WebKit_qt_Api_qwebview.cpp 2
     434    \snippet webkitsnippets/qtwebkit_qwebview_snippet.cpp 2
    433435
    434436    \sa pageAction()
     
    534536
    535537/*!
    536     Finds the next occurrence of the string, \a subString, in the page, using
    537     the given \a options. Returns true of \a subString was found and selects
    538     the match visually; otherwise returns false.
     538    \property QWebView::renderHints
     539    \since 4.6
     540    \brief the default render hints for the view
     541
     542    These hints are used to initialize QPainter before painting the Web page.
     543
     544    QPainter::TextAntialiasing is enabled by default.
     545
     546    \note This property is not available on Symbian. However, the getter and
     547    setter functions can still be used directly.
     548
     549    \sa QPainter::renderHints()
     550*/
     551
     552/*!
     553    \since 4.6
     554    Returns the render hints used by the view to render content.
     555
     556    \sa QPainter::renderHints()
     557*/
     558QPainter::RenderHints QWebView::renderHints() const
     559{
     560    return d->renderHints;
     561}
     562
     563/*!
     564    \since 4.6
     565    Sets the render hints used by the view to the specified \a hints.
     566
     567    \sa QPainter::setRenderHints()
     568*/
     569void QWebView::setRenderHints(QPainter::RenderHints hints)
     570{
     571    if (hints == d->renderHints)
     572        return;
     573    d->renderHints = hints;
     574    update();
     575}
     576
     577/*!
     578    \since 4.6
     579    If \a enabled is true, enables the specified render \a hint; otherwise
     580    disables it.
     581
     582    \sa renderHints, QPainter::renderHints()
     583*/
     584void QWebView::setRenderHint(QPainter::RenderHint hint, bool enabled)
     585{
     586    QPainter::RenderHints oldHints = d->renderHints;
     587    if (enabled)
     588        d->renderHints |= hint;
     589    else
     590        d->renderHints &= ~hint;
     591    if (oldHints != d->renderHints)
     592        update();
     593}
     594
     595
     596/*!
     597    Finds the specified string, \a subString, in the page, using the given \a options.
     598
     599    If the HighlightAllOccurrences flag is passed, the function will highlight all occurrences
     600    that exist in the page. All subsequent calls will extend the highlight, rather than
     601    replace it, with occurrences of the new string.
     602
     603    If the HighlightAllOccurrences flag is not passed, the function will select an occurrence
     604    and all subsequent calls will replace the current occurrence with the next one.
     605
     606    To clear the selection, just pass an empty string.
     607
     608    Returns true if \a subString was found; otherwise returns false.
    539609
    540610    \sa selectedText(), selectionChanged()
     
    567637            d->page->event(e);
    568638#ifndef QT_NO_CURSOR
    569         } else if (e->type() == static_cast<QEvent::Type>(WebCore::SetCursorEvent::EventType)) {
    570             d->setCursor(static_cast<WebCore::SetCursorEvent*>(e)->cursor());
    571639#if QT_VERSION >= 0x040400
    572640        } else if (e->type() == QEvent::CursorChange) {
    573             // Okay we might use the WebCore Cursor now.
    574             d->usesWebCoreCursor = d->cursorSetByWebCore;
    575             d->cursorSetByWebCore = false;
    576 
    577             // Go back to the WebCore Cursor. QWidget::unsetCursor is appromixated with this
    578             if (!d->usesWebCoreCursor && cursor().shape() == Qt::ArrowCursor) {
    579                 d->usesWebCoreCursor = true;
    580                 d->setCursor(d->webCoreCursor);
    581             }
    582 #endif
    583 #endif
    584         } else if (e->type() == QEvent::Leave) {
     641            // An unsetCursor will set the cursor to Qt::ArrowCursor.
     642            // Thus this cursor change might be a QWidget::unsetCursor()
     643            // If this is not the case and it came from WebCore, the
     644            // QWebPageClient already has set its cursor internally
     645            // to Qt::ArrowCursor, so updating the cursor is always
     646            // right, as it falls back to the last cursor set by
     647            // WebCore.
     648            // FIXME: Add a QEvent::CursorUnset or similar to Qt.
     649            if (cursor().shape() == Qt::ArrowCursor)
     650                d->page->d->client->resetCursor();
     651#endif
     652#endif
     653        } else if (e->type() == QEvent::Leave)
    585654            d->page->event(e);
    586         }
    587655    }
    588656
     
    607675    It is equivalent to
    608676
    609     \snippet doc/src/snippets/code/src_3rdparty_webkit_WebKit_qt_Api_qwebview.cpp 3
     677    \snippet webkitsnippets/qtwebkit_qwebview_snippet.cpp 3
    610678
    611679    \sa reload(), pageAction(), loadFinished()
     
    623691    It is equivalent to
    624692
    625     \snippet doc/src/snippets/code/src_3rdparty_webkit_WebKit_qt_Api_qwebview.cpp 4
     693    \snippet webkitsnippets/qtwebkit_qwebview_snippet.cpp 4
    626694
    627695    \sa forward(), pageAction()
     
    639707    It is equivalent to
    640708
    641     \snippet doc/src/snippets/code/src_3rdparty_webkit_WebKit_qt_Api_qwebview.cpp 5
     709    \snippet webkitsnippets/qtwebkit_qwebview_snippet.cpp 5
    642710
    643711    \sa back(), pageAction()
     
    681749    QWebFrame *frame = d->page->mainFrame();
    682750    QPainter p(this);
     751    p.setRenderHints(d->renderHints);
    683752
    684753    frame->render(&p, ev->region());
     
    686755#ifdef    QWEBKIT_TIME_RENDERING
    687756    int elapsed = time.elapsed();
    688     qDebug()<<"paint event on "<<ev->region()<<", took to render =  "<<elapsed;
    689 #endif
    690 }
    691 
    692 /*!
    693     This function is called whenever WebKit wants to create a new window of the given \a type, for example as a result of
    694     a JavaScript request to open a document in a new window.
     757    qDebug() << "paint event on " << ev->region() << ", took to render =  " << elapsed;
     758#endif
     759}
     760
     761/*!
     762    This function is called from the createWindow() method of the associated QWebPage,
     763    each time the page wants to create a new window of the given \a type. This might
     764    be the result, for example, of a JavaScript request to open a document in a new window.
     765
     766    \note If the createWindow() method of the associated page is reimplemented, this
     767    method is not called, unless explicitly done so in the reimplementation.
    695768
    696769    \sa QWebPage::createWindow()
     
    882955void QWebView::changeEvent(QEvent *e)
    883956{
    884     if (d->page && e->type() == QEvent::PaletteChange) {
     957    if (d->page && e->type() == QEvent::PaletteChange)
    885958        d->page->setPalette(palette());
    886     }
    887959    QWidget::changeEvent(e);
    888960}
     
    907979    \fn void QWebView::statusBarMessage(const QString& text)
    908980
    909     This signal is emitted when the statusbar \a text is changed by the page.
     981    This signal is emitted when the status bar \a text is changed by the page.
    910982*/
    911983
     
    915987    This signal is emitted whenever the icon of the page is loaded or changes.
    916988
    917     \sa icon()
     989    In order for icons to be loaded, you will need to set an icon database path
     990    using QWebSettings::setIconDatabasePath().
     991
     992    \sa icon(), QWebSettings::setIconDatabasePath()
    918993*/
    919994
     
    9651040    \sa QWebPage::linkDelegationPolicy()
    9661041*/
     1042
     1043#include "moc_qwebview.cpp"
     1044
  • trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebview.h

    r2 r561  
    2626#include <QtGui/qwidget.h>
    2727#include <QtGui/qicon.h>
     28#include <QtGui/qpainter.h>
    2829#include <QtCore/qurl.h>
    2930#if QT_VERSION >= 0x040400
     
    4041class QWebNetworkRequest;
    4142
    42 class QWEBKIT_EXPORT QWebView : public QWidget
    43 {
     43class QWEBKIT_EXPORT QWebView : public QWidget {
    4444    Q_OBJECT
    4545    Q_PROPERTY(QString title READ title)
     
    5151    Q_PROPERTY(qreal textSizeMultiplier READ textSizeMultiplier WRITE setTextSizeMultiplier DESIGNABLE false)
    5252    Q_PROPERTY(qreal zoomFactor READ zoomFactor WRITE setZoomFactor)
     53
     54    Q_PROPERTY(QPainter::RenderHints renderHints READ renderHints WRITE setRenderHints)
     55    Q_FLAGS(QPainter::RenderHints)
    5356public:
    54     explicit QWebView(QWidget *parent = 0);
     57    explicit QWebView(QWidget* parent = 0);
    5558    virtual ~QWebView();
    5659
    57     QWebPage *page() const;
    58     void setPage(QWebPage *page);
     60    QWebPage* page() const;
     61    void setPage(QWebPage* page);
    5962
    60     void load(const QUrl &url);
     63    void load(const QUrl& url);
    6164#if QT_VERSION < 0x040400 && !defined(qdoc)
    62     void load(const QWebNetworkRequest &request);
     65    void load(const QWebNetworkRequest& request);
    6366#else
    64     void load(const QNetworkRequest &request,
     67    void load(const QNetworkRequest& request,
    6568              QNetworkAccessManager::Operation operation = QNetworkAccessManager::GetOperation,
    6669              const QByteArray &body = QByteArray());
    6770#endif
    68     void setHtml(const QString &html, const QUrl &baseUrl = QUrl());
    69     void setContent(const QByteArray &data, const QString &mimeType = QString(), const QUrl &baseUrl = QUrl());
     71    void setHtml(const QString& html, const QUrl& baseUrl = QUrl());
     72    void setContent(const QByteArray& data, const QString& mimeType = QString(), const QUrl& baseUrl = QUrl());
    7073
    71     QWebHistory *history() const;
    72     QWebSettings *settings() const;
     74    QWebHistory* history() const;
     75    QWebSettings* settings() const;
    7376
    7477    QString title() const;
     
    7982    QString selectedText() const;
    8083
    81     QAction *pageAction(QWebPage::WebAction action) const;
     84    QAction* pageAction(QWebPage::WebAction action) const;
    8285    void triggerPageAction(QWebPage::WebAction action, bool checked = false);
    8386
     
    100103    qreal textSizeMultiplier() const;
    101104
    102     bool findText(const QString &subString, QWebPage::FindFlags options = 0);
     105    QPainter::RenderHints renderHints() const;
     106    void setRenderHints(QPainter::RenderHints hints);
     107    void setRenderHint(QPainter::RenderHint hint, bool enabled = true);
    103108
    104     virtual bool event(QEvent *);
     109    bool findText(const QString& subString, QWebPage::FindFlags options = 0);
     110
     111    virtual bool event(QEvent*);
    105112
    106113public Q_SLOTS:
     
    110117    void reload();
    111118
    112     void print(QPrinter *printer) const;
     119    void print(QPrinter*) const;
    113120
    114121Q_SIGNALS:
     
    118125    void titleChanged(const QString& title);
    119126    void statusBarMessage(const QString& text);
    120     void linkClicked(const QUrl &url);
     127    void linkClicked(const QUrl&);
    121128    void selectionChanged();
    122129    void iconChanged();
    123     void urlChanged(const QUrl &url);
     130    void urlChanged(const QUrl&);
    124131
    125132protected:
    126     void resizeEvent(QResizeEvent *e);
    127     void paintEvent(QPaintEvent *ev);
     133    void resizeEvent(QResizeEvent*);
     134    void paintEvent(QPaintEvent*);
    128135
    129136    virtual QWebView *createWindow(QWebPage::WebWindowType type);
     
    142149    virtual void keyPressEvent(QKeyEvent*);
    143150    virtual void keyReleaseEvent(QKeyEvent*);
    144     virtual void dragEnterEvent(QDragEnterEvent *);
    145     virtual void dragLeaveEvent(QDragLeaveEvent *);
    146     virtual void dragMoveEvent(QDragMoveEvent *);
    147     virtual void dropEvent(QDropEvent *);
     151    virtual void dragEnterEvent(QDragEnterEvent*);
     152    virtual void dragLeaveEvent(QDragLeaveEvent*);
     153    virtual void dragMoveEvent(QDragMoveEvent*);
     154    virtual void dropEvent(QDropEvent*);
    148155    virtual void focusInEvent(QFocusEvent*);
    149156    virtual void focusOutEvent(QFocusEvent*);
     
    154161private:
    155162    friend class QWebPage;
    156     QWebViewPrivate *d;
     163    QWebViewPrivate* d;
     164    Q_PRIVATE_SLOT(d, void _q_pageDestroyed())
    157165};
    158166
  • trunk/src/3rdparty/webkit/WebKit/qt/ChangeLog

    r2 r561  
    1 2009-04-02  Takumi Asaki <takumi.asaki@nokia.com>
    2 
    3         Reviewed by Simon Hausmann.
    4 
    5         Fix pre-edit handling of text fields with input methods.
    6 
    7         The input method sends an empty preeditString() if all characters of
    8         the preedit should be deleted. So inputMethodEvent() has to use
    9         preeditString() if it's empty.
     12010-01-14  Simon Hausmann  <simon.hausmann@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Update Symbian .def symbol export files after private API additions.
     6
     7        * symbian/bwins/QtWebKitu.def:
     8        * symbian/eabi/QtWebKitu.def:
     9
     102009-12-18  Joe Ligman  <joseph.ligman@nokia.com>
     11
     12        Reviewed by Kenneth Rohde Christiansen.
     13
     14        [Qt] Add new API to QWebFrame to scrollRecursively starting with any css overflow
     15        then checking current frame and then ancestors
     16        https://bugs.webkit.org/show_bug.cgi?id=32668
     17
     18        * Api/qwebframe.cpp:
     19        (QWebFramePrivate::scrollOverflow):
     20        (QWebFrame::scrollRecursively):
     21        * Api/qwebframe.h:
     22        * Api/qwebframe_p.h:
     23        * tests/qwebframe/qwebframe.qrc:
     24        * tests/qwebframe/testiframe.html: Added.
     25        * tests/qwebframe/testiframe2.html: Added.
     26        * tests/qwebframe/tst_qwebframe.cpp:
     27
     282010-01-07  Yael Aharon  <yael.aharon@nokia.com>
     29
     30        Reviewed by Kenneth Rohde Christiansen.
     31
     32        [Qt] Allow the application to override online/offline network status
     33        https://bugs.webkit.org/show_bug.cgi?id=32684
     34
     35        Add a setting so that applications can overide the network status.
     36        Applications that use this setting still need to block network access
     37        through QNAM.
     38
     39        * Api/qwebsettings.cpp:
     40        (qt_networkAccessAllowed):
     41
     422010-01-07  Yongjun Zhang  <yongjun.zhang@nokia.com>, Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     43
     44        Reviewed by Simon Hausmann.
     45
     46        [Qt] need an API to suspend and resume active Javascript DOM objects.
     47        https://bugs.webkit.org/show_bug.cgi?id=31673
     48
     49        Add suspend and resume DOM objects private API to QWebFrame.
     50
     51        * Api/qwebframe.cpp:
     52        (qt_suspendActiveDOMObjects):
     53        (qt_resumeActiveDOMObjects):
     54
     552009-12-30  Janne Koskinen  <janne.p.koskinen@digia.com>
     56
     57        Reviewed by Simon Hausmann.
     58
     59        Upstream Symbian def files from Qt 4.6.
     60
     61        These files define the ABI of QtWebKit on Symbian.
     62
     63        * symbian/bwins/QtWebKitu.def: Added.
     64        * symbian/eabi/QtWebKitu.def: Added.
     65
     662009-12-14  Holger Hans Peter Freyther  <zecke@selfish.org>
     67
     68        Reviewed by Kenneth Rohde Christiansen.
     69
     70        [Qt] Fix JavaScript prompt behavior for empty/null strings.
     71        https://bugs.webkit.org/show_bug.cgi?id=30914
     72
     73        The patch is based on the work done by Gupta Manish.
     74
     75        In the default implementation of the JavaScript prompt
     76        we are using a QInputDialog to get the text and this has
     77        one quirk with regard to not entering any text.
     78
     79        In other WebKit ports and in Firefox an empty string is
     80        returned but in the Qt case it is a null string.
     81
     82        Change the API documentation in QWebPage to mention we want to
     83        have a non null string but do the fixup in the ChromeClientQt
     84        to support existing code.
     85
     86        * Api/qwebpage.cpp:
     87        (QWebPage::javaScriptPrompt): Change API documentation
     88        * WebCoreSupport/ChromeClientQt.cpp:
     89        (WebCore::ChromeClientQt::runJavaScriptPrompt): Fixup null QString
     90
     912009-12-21  David Boddie  <dboddie@trolltech.com>
     92
     93        Reviewed by Simon Hausmann.
     94
     95        Doc: Minor fixes to language.
     96
     97        * Api/qwebpage.cpp:
     98
     992009-12-15  Holger Hans Peter Freyther  <zecke@selfish.org>
     100
     101        Reviewed by NOBODY (OOPS!).
     102
     103        [Qt] Do not disable the inspector on show and hide
     104        https://bugs.webkit.org/show_bug.cgi?id=31851
     105
     106        On Qt/X11 with some window managers the window will be
     107        hidden when switching windows. In this case all the results
     108        are gone when coming back to the window.
     109
     110        Attempt to use the CloseEvent to figure out if the window
     111        was closed and withdrawn as this is more friendly to the
     112        user of the inspector client.
     113
     114        * Api/qwebinspector.cpp:
     115        (QWebInspector::event):
     116        (QWebInspector::hideEvent):
     117
     1182009-12-13  Simon Hausmann  <hausmann@webkit.org>
     119
     120        Reviewed by Holger Freyther.
     121
     122        [Qt] Re-enable QWebView::renderHints property for Qt for Symbian
     123
     124        https://bugs.webkit.org/show_bug.cgi?id=28273
     125
     126        The bug in Qt's moc that triggered a linking error when declaring this
     127        property has been fixed and we can remove the workaround.
     128
     129        * Api/qwebview.h:
     130
     1312009-11-30  Abhinav Mithal  <abhinav.mithal@nokia.com>
     132
     133        Reviewed by Simon Hausmann.
     134
     135        [Qt][Symbian] Report SymbianOS in user agent string for Symbian
     136        https://bugs.webkit.org/show_bug.cgi?id=31961
     137
     138        * Api/qwebpage.cpp:
     139        (QWebPage::userAgentForUrl):
     140
     1412009-11-28  Simon Hausmann  <simon.hausmann@nokia.com>
     142
     143        Reviewed by Kenneth Rohde Christiansen.
     144
     145        [Qt] SoftwareInputPanelRequest event sent when clicking in newly loaded page
     146
     147        https://bugs.webkit.org/show_bug.cgi?id=31401
     148
     149        Don't set the event unless there is a focused node we can use
     150        for editing afterwards.
     151
     152        * Api/qwebpage.cpp:
     153        (QWebPagePrivate::handleSoftwareInputPanel):
     154        * tests/qwebpage/tst_qwebpage.cpp:
     155        (tst_QWebPage::inputMethods):
     156
     1572009-11-23  David Boddie  <dboddie@trolltech.com>
     158
     159        Reviewed by Simon Hausmann.
     160
     161        Updated the QWebElement documentation with links to examples and
     162        external resources.
     163        Fixed the project file for the webelement snippet and tidied up the
     164        markers used for quoting the code.
     165
     166        * Api/qwebelement.cpp:
     167        * docs/webkitsnippets/webelement/main.cpp:
     168        (findAll):
     169        * docs/webkitsnippets/webelement/webelement.pro:
     170
     1712009-11-23  Simon Hausmann  <simon.hausmann@nokia.com>
     172
     173        Reviewed by Kenneth Rohde Christiansen.
     174
     175        [Qt] Wrong runtime instance objects of wrapped QObjects may be used if
     176        the wrapped object died before the gc removed the instance.
     177
     178        https://bugs.webkit.org/show_bug.cgi?id=31681
     179
     180        Added a unit-test to verify that wrapping a QObject with the
     181        same identity as a previously but now dead object works.
     182
     183        * tests/qwebframe/tst_qwebframe.cpp:
     184
     1852009-11-19  Olivier Goffart  <ogoffart@trolltech.com>
     186
     187        Reviewed by Simon Hausmann.
     188
     189        [Qt] Normalize signal and slot signatures.
     190
     191        * Api/qgraphicswebview.cpp:
     192        (QGraphicsWebView::setPage):
     193        * Api/qwebview.cpp:
     194        (QWebView::setPage):
     195        * WebCoreSupport/FrameLoaderClientQt.cpp:
     196        (WebCore::FrameLoaderClientQt::setFrame):
     197        * docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp:
     198        (wrapInFunction):
     199        * tests/qwebframe/tst_qwebframe.cpp:
     200        * tests/qwebpage/tst_qwebpage.cpp:
     201        (tst_QWebPage::modified):
     202        (tst_QWebPage::database):
     203
     2042009-11-18  Paul Olav Tvete  <paul.tvete@nokia.com>
     205
     206        Reviewed by Simon Hausmann.
     207
     208        [Qt] Make the QWebElement::render() test pass when pixmaps aren't 32 bit.
     209
     210        * tests/qwebelement/tst_qwebelement.cpp:
     211        (tst_QWebElement::render):
     212
     2132009-11-18  Simon Hausmann  <simon.hausmann@nokia.com>
     214
     215        Reviewed by Tor Arne VestbÞ.
     216
     217        Clarify and simplify the legal section in the overview documentation,
     218        after review with our legal team.
     219
     220        * docs/qtwebkit.qdoc:
     221
     2222009-11-18  Simon Hausmann  <simon.hausmann@nokia.com>
     223
     224        Reviewed and suggested by Tor Arne VestbÞ.
     225
     226        Fix the autotest after commit ecbb2c0dd21bfc197e1f7b53150ec9b1a1d8cb8f
     227        to compare the Qt::ImFont property's family against an explicitly
     228        previously configured family.
     229
     230        * tests/qwebpage/tst_qwebpage.cpp:
     231        (tst_QWebPage::inputMethods):
     232
     2332009-11-16  Simon Hausmann  <simon.hausmann@nokia.com>
     234
     235        Reviewed by Kenneth Rohde Christiansen.
     236
     237        API documentation fixes.
     238
     239        * Api/qgraphicswebview.cpp: Removed duplicate docs.
     240        * Api/qwebelement.cpp: Added missing docs.
     241        * Api/qwebsettings.cpp: Ditto.
     242
     2432009-11-14  Antonio Gomes  <tonikitoo@webkit.org>
     244
     245        Reviewed by Antti Koivisto.
     246
     247        [Qt] Broken back/forward after using ErrorPageExtension to set error page
     248        https://bugs.webkit.org/show_bug.cgi?id=30573
     249
     250        Implemented autotests for covering the back/forward
     251        reset problem involving error pages.
     252
     253        * tests/qwebpage/tst_qwebpage.cpp:
     254        (tst_QWebPage::errorPageExtension):
     255
     2562009-11-16  Holger Hans Peter Freyther  <zecke@selfish.org>
     257
     258        Reviewed by NOBODY (OOPS!).
     259
     260        [Qt] Do not show the QWidget when the WebCore::Widget is hidden
     261        https://bugs.webkit.org/show_bug.cgi?id=31203
     262
     263        The clipping code was making a QWidget visible even if the
     264        WebCore::Widget was hidden. Fix the bug by calling setVisible
     265        only if the WebCore::Widget is shown.
     266
     267        * WebCoreSupport/FrameLoaderClientQt.cpp:
     268        (WebCore::QtPluginWidget::show): Override WebCore::Widget
     269        (WebCore::QtPluginWidget::hide): Override WebCore::Widget
     270        (WebCore::QtPluginWidget::handleVisibility): New method to call setVisible when we are visible
     271        (FrameLoaderClientQt::createPlugin): Hide the QWidget by default
     272
     2732009-11-09  Benjamin Poulain  <benjamin.poulain@nokia.com>
     274
     275        Reviewed by Kenneth Rohde Christiansen.
     276
     277        https://bugs.webkit.org/show_bug.cgi?id=30628
     278        Add an API to get all the attributes from a QWebElement.
     279
     280        * Api/qwebelement.cpp:
     281        (QWebElement::attributesName):
     282        * Api/qwebelement.h:
     283        * tests/qwebelement/tst_qwebelement.cpp:
     284        (tst_QWebElement::listAttributes):
     285
     2862009-11-13  Andras Becsi  <becsi.andras@stud.u-szeged.hu>
     287
     288        Reviewed by Kenneth Rohde Christiansen.
     289
     290        [Qt] Enable Page Cache if setMaximumPagesInCache needs it.
     291        This fixes https://bugs.webkit.org/show_bug.cgi?id=31266.
     292
     293        * Api/qwebsettings.cpp:
     294        (QWebSettingsPrivate::apply):
     295        (QWebSettings::setMaximumPagesInCache):
     296
     2972009-11-13  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     298
     299        Reviewed by Simon Hausmann.
     300
     301        Update documentation for the Qt API
     302
     303        * Api/qgraphicswebview.cpp:
     304        * Api/qwebelement.cpp:
     305        * Api/qwebframe.cpp:
     306        * Api/qwebsettings.cpp:
     307        * Api/qwebview.cpp:
     308
     3092009-11-13  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     310
     311        Reviewed by Simon Hausmann.
     312
     313        Use correct install-path when running qdoc3
     314
     315        * docs/docs.pri:
     316
     3172009-11-12  Antonio Gomes  <tonikitoo@webkit.org>
     318
     319        Reviewed by Jan Alonzo.
     320
     321        [Qt] Various doc fixes
     322        https://bugs.webkit.org/show_bug.cgi?id=31358
     323
     324        QWebPage's constructor docs are mentioning "QWebView":
     325        "Constructs an empty QWebView with parent".
     326
     327        * Api/qwebpage.cpp:
     328
     3292009-11-11  Antonio Gomes  <tonikitoo@webkit.org>
     330
     331        Reviewed by Kenneth Christiansen.
     332
     333        [Qt] Various doc fixes
     334        https://bugs.webkit.org/show_bug.cgi?id=31358
     335
     336        Fixed wrong documentation: item's dimensions do fit to Web page
     337        content by default.
     338
     339        Kenneth agreed to land this as a followup patch to the
     340        just landed documentation patch.
     341
     342        * Api/qgraphicswebview.cpp:
     343
     3442009-11-11  David Boddie  <dboddie@trolltech.com>
     345
     346        Reviewed by Kenneth Christiansen.
     347
     348        [Qt] Various doc fixes
     349        https://bugs.webkit.org/show_bug.cgi?id=31323
     350
     351        Fixed and synchronized QWebView related documentation.
     352
     353        * Api/qgraphicswebview.cpp:
     354        * Api/qwebview.cpp:
     355
     3562009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     357
     358        Reviewed by Kenneth Rohde Christiansen.
     359
     360        [Qt] Few classes have virtual functions but non-virtual destructor
     361        https://bugs.webkit.org/show_bug.cgi?id=31269
     362
     363        * Api/qgraphicswebview.cpp:
     364        (QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate): Add virtual
     365        destructor.
     366
     3672009-10-30  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     368
     369        Reviewed by NOBODY (OOPS!).
     370
     371        [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml()
     372
     373        This ensures that long-running JavaScript (for example due to a modal alert() dialog),
     374        will not trigger a deferred load after only 500ms (the default tokenizer delay) while
     375        still giving a reasonable timeout (10 seconds) to prevent deadlock.
     376
     377        https://bugs.webkit.org/show_bug.cgi?id=29381
     378
     379        * Api/qwebframe.cpp: Document the behaviour
     380        * WebCoreSupport/FrameLoaderClientQt.cpp: set the custom tokenizer delay for substitute loads
     381        * tests/qwebframe/tst_qwebframe.cpp: Add test
     382
     3832009-11-13  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     384
     385        Reviewed by Kenneth Rohde Christiansen.
     386
     387        [Qt] Fix initial QWebView focus behavior.
     388
     389        focusController->setFocused(true) was not always called.
     390        https://bugs.webkit.org/show_bug.cgi?id=31466
     391
     392        * Api/qwebpage.cpp:
     393        (QWebPagePrivate::focusInEvent):
     394
     3952009-11-12  Benjamin Poulain  <benjamin.poulain@nokia.com>
     396
     397        Reviewed by Kenneth Rohde Christiansen.
     398
     399        Custom printing shrink factors
     400        https://bugs.webkit.org/show_bug.cgi?id=29042
     401
     402        This reverts commit r49769. The public API for this needs to be reviewed
     403        before its inclusion in Qt.
     404
     405        * Api/qwebsettings.cpp:
     406        (QWebSettingsPrivate::apply):
     407        (QWebSettings::QWebSettings):
     408        * Api/qwebsettings.h:
     409
     4102009-11-11  Liang QI  <liang.qi@nokia.com>
     411        Update documentation for the Qt API
     412
     413        * Api/qgraphicswebview.cpp:
     414        * Api/qwebelement.cpp:
     415        * Api/qwebframe.cpp:
     416        * Api/qwebsettings.cpp:
     417        * Api/qwebview.cpp:
     418
     4192009-11-13  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     420
     421        Reviewed by Simon Hausmann.
     422
     423
     424        [Qt] Fix tst_qwebpage and tst_qwebframe compilation on Symbian.
     425
     426        * tests/qwebframe/qwebframe.pro:
     427        * tests/qwebframe/tst_qwebframe.cpp:
     428        * tests/qwebpage/qwebpage.pro:
     429        * tests/qwebpage/tst_qwebpage.cpp:
     430
     4312009-11-11  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     432
     433        Reviewed by Simon Hausmann.
     434
     435        Fix a crash in the layout test plugins/document-open.html
     436
     437        * Api/qwebframe.cpp:
     438        (QWebFrame::toPlainText):
     439
     4402009-11-11  Warwick Allison  <warwick.allison@nokia.com>, Simon Hausmann  <simon.hausmann@nokia.com>
     441
     442        Reviewed by Tor Arne VestbÞ.
     443
     444        [Qt] Regression: Preserve the parent of plugin objects when using
     445        QtWebKit with only a QWebPage.
     446
     447        * WebCoreSupport/FrameLoaderClientQt.cpp:
     448        (WebCore::FrameLoaderClientQt::createPlugin): Don't reparent
     449        plugins to 0.
     450        * tests/qwebpage/tst_qwebpage.cpp:
     451        (PluginCounterPage::PluginCounterPage): Initialize m_pluginParent to 0.
     452        (PluginCounterPage::~PluginCounterPage): Delete the plugin parent later
     453        (after the page)
     454        (PluginTracerPage::createPlugin): Assign a dummy parent to the plugin.
     455        (PluginTracerPage::PluginTracerPage): Set up the plugin parent.
     456        (tst_QWebPage::createViewlessPlugin): Verify that for viewless pages the
     457        plugin parent remains unchanged.
     458
     4592009-11-11  David Boddie  <dboddie@trolltech.com>
     460
     461        [Qt] Doc: Added internal or hidden placeholder documentation.
     462
     463        * Api/qwebpage.cpp:
     464
     4652009-11-11  Martin Smith  <msmith@trolltech.com>
     466
     467        [Qt] doc: Changed Trolltech to Nokia
     468
     469        * Api/qwebview.cpp:
     470
     4712009-11-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     472
     473        Unreviewed documentation fixes.
     474
     475        Added a few improvements from Jocelyn Turcotte to the
     476        createWindow docs.
     477
     478        * Api/qwebview.cpp:
     479
     4802009-11-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     481
     482        Unreviewed documentation fix.
     483
     484        [Qt] Make qwebpage's createWindow not qwebview dependent.
     485        https://bugs.webkit.org/show_bug.cgi?id=30771
     486
     487        Update documentation to make it clear that a reimplementation
     488        of the createWindow method of the associated QWebPage can
     489        result in the QWebView::createWindow method to never be called.
     490
     491        * Api/qwebview.cpp:
     492
     4932009-11-11  Simon Hausmann  <simon.hausmann@nokia.com>
     494
     495        Reviewed by Tor Arne VestbÞ.
     496
     497        Fix enabling of software input panel when activating editable elements
     498        in QGraphicsWebView.
     499
     500        * Api/qgraphicswebview.cpp:
     501        (QGraphicsWebViewPrivate::inputMethodEnabled): Implement method to
     502        query for input method support.
     503        * Api/qwebpage.cpp:
     504        (QWebPageWidgetClient::inputMethodEnabled): Ditto for QWidget.
     505        (QWebPagePrivate::handleSoftwareInputPanel): Don't use view() to
     506        test for input method support. Instead query using QWebPageClient
     507        and send the SIPR event to the ownerWidget() instead of the view().
     508        The latter is null for QGraphicsWebView.
     509        * tests/qwebpage/tst_qwebpage.cpp:
     510        (EventSpy::EventSpy):
     511        (EventSpy::eventFilter):
     512        (tst_QWebPage::inputMethods): Modify the test to verify that SIPR
     513        events are dispatched when activating focusable content.
     514
     5152009-11-09  Benjamin Poulain  <benjamin.poulain@nokia.com>
     516
     517        Reviewed by Kenneth Rohde Christiansen.
     518
     519        https://bugs.webkit.org/show_bug.cgi?id=30772
     520        Add a non-const iterator to QWebElementCollection.
     521        Move the two attributes of the iterator to private.
     522
     523        * Api/qwebelement.h:
     524        (const_iterator::begin):
     525        (const_iterator::end):
     526        (const_iterator::constBegin):
     527        (const_iterator::constEnd):
     528        (const_iterator::iterator::iterator):
     529        (const_iterator::iterator::operator*):
     530        (const_iterator::iterator::operator==):
     531        (const_iterator::iterator::operator!=):
     532        (const_iterator::iterator::operator<):
     533        (const_iterator::iterator::operator<=):
     534        (const_iterator::iterator::operator>):
     535        (const_iterator::iterator::operator>=):
     536        (const_iterator::iterator::operator++):
     537        (const_iterator::iterator::operator--):
     538        (const_iterator::iterator::operator+=):
     539        (const_iterator::iterator::operator-=):
     540        (const_iterator::iterator::operator+):
     541        (const_iterator::iterator::operator-):
     542        * tests/qwebelement/tst_qwebelement.cpp:
     543        (tst_QWebElement::nonConstIterator):
     544        (tst_QWebElement::constIterator):
     545
     5462009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     547
     548        Reviewed by Kenneth Christiansen.
     549
     550        [Qt] Remove the sessionStorage setting (per Page)
     551        https://bugs.webkit.org/show_bug.cgi?id=31249
     552
     553        This setting allows to run sessionStorage on/off on a per page
     554        basis. Remove this prematurely exposed API.
     555
     556        * Api/qwebsettings.cpp:
     557        (QWebSettingsPrivate::apply):
     558        (QWebSettings::QWebSettings):
     559        * tests/qwebpage/tst_qwebpage.cpp:
     560        (tst_QWebPage::database):
     561        (tst_QWebPage::testOptionalJSObjects):
     562
     5632009-11-09  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     564
     565        Reviewed by Simon Hausmann.
     566
     567        [Qt] Remove the QWebPage:webInspectorTriggered signal.
     568        User customization of the communication between QWebPage
     569        and QWebInspector will be properly designed in the next version.
     570        https://bugs.webkit.org/show_bug.cgi?id=30773
     571
     572        * Api/qwebinspector.cpp:
     573        * Api/qwebpage.cpp:
     574        (QWebPagePrivate::getOrCreateInspector):
     575        (QWebPage::triggerAction):
     576        * Api/qwebpage.h:
     577        * QtLauncher/main.cpp:
     578        (MainWindow::MainWindow):
     579
     5802009-11-05  Simon Hausmann  <hausmann@webkit.org>
     581
     582        Reviewed by Tor Arne VestbÞ.
     583
     584        Added a missing re-implementation of QGraphicsItem::inputMethodQuery().
     585
     586        * Api/qgraphicswebview.cpp:
     587        (QGraphicsWebView::inputMethodQuery):
     588        * Api/qgraphicswebview.h:
     589
     5902009-11-04  Simon Hausmann  <hausmann@webkit.org>
     591
     592        Reviewed by Tor Arne VestbÞ.
     593
     594        Provide a dummy re-implementation of QGraphicsLayoutItem::sizeHint(),
     595        similar to QWebView.
     596
     597        * Api/qgraphicswebview.cpp:
     598        (QGraphicsWebView::sizeHint):
     599        * Api/qgraphicswebview.h:
     600
     6012009-11-04  Simon Hausmann  <hausmann@webkit.org>
     602
     603        Reviewed by Tor Arne VestbÞ.
     604
     605        Removed zoomFactoryChanged() signal and added
     606        linkClicked() to QGraphicsWebView, for consistency with
     607        QWebView.
     608
     609        * Api/qgraphicswebview.cpp:
     610        (QGraphicsWebView::setPage):
     611        (QGraphicsWebView::setZoomFactor):
     612        * Api/qgraphicswebview.h:
     613
     6142009-11-04  Simon Hausmann  <hausmann@webkit.org>
     615
     616        Reviewed by Tor Arne VestbÞ.
     617
     618        Added QGraphicsWebView::findText() for convenience and consistency
     619        with QWebView.
     620
     621        * Api/qgraphicswebview.cpp:
     622        (QGraphicsWebView::findText):
     623        * Api/qgraphicswebview.h:
     624
     6252009-11-04  Simon Hausmann  <hausmann@webkit.org>
     626
     627        Reviewed by Tor Arne VestbÞ.
     628
     629        Added QGraphicsWebView::pageAction() and triggerPageAction(), for
     630        consistency with QWebView.
     631
     632        * Api/qgraphicswebview.cpp:
     633        (QGraphicsWebView::pageAction):
     634        (QGraphicsWebView::triggerPageAction):
     635        * Api/qgraphicswebview.h:
     636
     6372009-11-04  Simon Hausmann  <hausmann@webkit.org>
     638
     639        Reviewed by Tor Arne VestbÞ.
     640
     641        Removed QGraphicsWebView::toHtml() after API review.
     642
     643        That's consistent with QWebView and also based on the assumption that
     644        toHtml() is called less frequently than setHtml().
     645
     646        * Api/qgraphicswebview.cpp:
     647        * Api/qgraphicswebview.h:
     648        * tests/qgraphicswebview/tst_qgraphicswebview.cpp:
     649        (tst_QGraphicsWebView::qgraphicswebview):
     650
     6512009-11-04  Simon Hausmann  <hausmann@webkit.org>
     652
     653        Reviewed by Tor Arne VestbÞ.
     654
     655        Removed the interactive property of QGraphicsWebView.
     656
     657        There are clearly use-cases for this feature, but it will require
     658        more work to make this fully work with an enum to have fine-grained
     659        control over the interactivity levels. For now it is easy to achieve
     660        in user-code what the boolean property did.
     661
     662        * Api/qgraphicswebview.cpp:
     663        (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate):
     664        (QGraphicsWebView::hoverMoveEvent):
     665        (QGraphicsWebView::mouseMoveEvent):
     666        (QGraphicsWebView::mousePressEvent):
     667        (QGraphicsWebView::mouseReleaseEvent):
     668        (QGraphicsWebView::mouseDoubleClickEvent):
     669        (QGraphicsWebView::keyPressEvent):
     670        (QGraphicsWebView::keyReleaseEvent):
     671        (QGraphicsWebView::dragLeaveEvent):
     672        (QGraphicsWebView::dragMoveEvent):
     673        (QGraphicsWebView::dropEvent):
     674        (QGraphicsWebView::wheelEvent):
     675        (QGraphicsWebView::inputMethodEvent):
     676        * Api/qgraphicswebview.h:
     677        * tests/qgraphicswebview/tst_qgraphicswebview.cpp:
     678        (tst_QGraphicsWebView::qgraphicswebview):
     679
     6802009-11-04  Simon Hausmann  <hausmann@webkit.org>
     681
     682        Reviewed by Tor Arne VestbÞ.
     683
     684        Make the QGraphicsWebView constructor explicit.
     685
     686        * Api/qgraphicswebview.h:
     687
     6882009-11-05  Simon Hausmann  <hausmann@webkit.org>
     689
     690        Last Qt 4.5 build fix (*sigh*)
     691
     692        * tests/qwebpage/tst_qwebpage.cpp:
     693        (inputMethodHints): inputMethodHints() is only used for
     694        Qt 4.6, so guard the whole function.
     695
     6962009-11-05  Simon Hausmann  <hausmann@webkit.org>
     697
     698        Another prospective build fix against Qt 4.5 (build bot)
     699
     700        Don't compile & run the QGraphicsWebView portion of the
     701        input methods auto test with Qt 4.5.
     702
     703        * tests/qwebpage/tst_qwebpage.cpp:
     704        (tst_QWebPage::inputMethods_data):
     705        (inputMethodHints):
     706        (inputMethodEnabled):
     707        (tst_QWebPage::inputMethods):
     708
     7092009-11-05  Simon Hausmann  <hausmann@webkit.org>
     710
     711        Prospective build fix against Qt 4.5 (build bot)
     712
     713        * Api/qgraphicswebview.cpp:
     714        (QGraphicsWebViewPrivate::setInputMethodEnabled): Guard the
     715        use of Qt 4.6 specific API with #ifdefs.
     716
     7172009-11-01  Simon Hausmann  <hausmann@webkit.org>
     718
     719        Reviewed by Kenneth Christiansen.
     720
     721        [Qt] Fix enabling of input method support on QGraphicsWebView.
     722        https://bugs.webkit.org/show_bug.cgi?id=30605
     723
     724        Instead of setting the unsupported widget attribute on the
     725        QGraphicsWidget in setInputMethodEnabled() set the
     726        ItemAcceptsInputMethod GraphicsItem flag directly.
     727
     728        Changed the existing input method auto test to run once
     729        on a QWebView and once on a QGraphicsWebView.
     730
     731        * Api/qgraphicswebview.cpp:
     732        (QGraphicsWebViewPrivate::setInputMethodEnabled):
     733        * tests/qwebpage/tst_qwebpage.cpp:
     734        (tst_QWebPage::inputMethods_data):
     735        (inputMethodHints):
     736        (inputMethodEnabled):
     737        (tst_QWebPage::inputMethods):
     738
     7392009-11-04  Simon Hausmann  <hausmann@webkit.org>
     740
     741        Reviewed by Kenneth Christiansen.
     742
     743        Added QGraphicsWebView::modified property, for consistency
     744        with QWebView.
     745
     746        * Api/qgraphicswebview.cpp:
     747        (QGraphicsWebView::isModified):
     748        * Api/qgraphicswebview.h:
     749        * tests/qgraphicswebview/tst_qgraphicswebview.cpp:
     750        (tst_QGraphicsWebView::qgraphicswebview):
     751
     7522009-11-04  Simon Hausmann  <hausmann@webkit.org>
     753
     754        Reviewed by Kenneth Christiansen.
     755
     756        Removed status and progress properties of QGraphicsWebView.
     757        Added loadProgress and statusBarMessage signals instead,
     758        after API review.
     759
     760        * Api/qgraphicswebview.cpp:
     761        (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate):
     762        (QGraphicsWebView::setPage):
     763        * Api/qgraphicswebview.h:
     764        * tests/qgraphicswebview/tst_qgraphicswebview.cpp:
     765        (tst_QGraphicsWebView::qgraphicswebview):
     766
     7672009-11-04  Yael Aharon  <yael.aharon@nokia.com>
     768
     769        Reviewed by Simon Hausmann.
     770
     771        [Qt] REGRESSION: Allow applications to use their own QWidget bypassing QWebView.
     772        https://bugs.webkit.org/show_bug.cgi?id=30979
     773
     774        Decouple QWebViewPrivate from QWebPageClient, and automatically create
     775        QWebPageWidgetClient whenever the view is QWidget based.
     776
     777        * Api/qwebpage.cpp:
     778        (QWebPageWidgetClient::QWebPageWidgetClient):
     779        (QWebPageWidgetClient::scroll):
     780        (QWebPageWidgetClient::update):
     781        (QWebPageWidgetClient::setInputMethodEnabled):
     782        (QWebPageWidgetClient::setInputMethodHint):
     783        (QWebPageWidgetClient::cursor):
     784        (QWebPageWidgetClient::updateCursor):
     785        (QWebPageWidgetClient::palette):
     786        (QWebPageWidgetClient::screenNumber):
     787        (QWebPageWidgetClient::ownerWidget):
     788        (QWebPageWidgetClient::pluginParent):
     789        (QWebPage::setView):
     790        * Api/qwebview.cpp:
     791        (QWebView::~QWebView):
     792        (QWebView::setPage):
     793        (QWebView::event):
     794
     7952009-11-03  Andras Becsi  <becsi.andras@stud.u-szeged.hu>
     796
     797        Reviewed by Simon Hausmann.
     798
     799        [Qt] Fix build of unit-test after r50454.
     800
     801        * tests/qwebpage/tst_qwebpage.cpp:
     802
     8032009-11-03  Simon Hausmann  <hausmann@webkit.org>
     804
     805        Reviewed by Tor Arne VestbÞ.
     806
     807        Make QWebPluginDatabase private API for now.
     808
     809        https://bugs.webkit.org/show_bug.cgi?id=30775
     810
     811        * Api/headers.pri:
     812        * Api/qwebplugindatabase.cpp:
     813        * Api/qwebplugindatabase_p.h: Renamed from WebKit/qt/Api/qwebplugindatabase.h.
     814        * Api/qwebsettings.cpp:
     815        * Api/qwebsettings.h:
     816        * QtLauncher/main.cpp:
     817        (MainWindow::setupUI):
     818        * tests/tests.pro:
     819
     8202009-11-03  Simon Hausmann  <hausmann@webkit.org>
     821
     822        Rubber-stamped by Tor Arne VestbÞ.
     823
     824        Oops, also remove the API docs of the removed networkRequestStarted() signal.
     825
     826        * Api/qwebpage.cpp:
     827
     8282009-11-03  Simon Hausmann  <hausmann@webkit.org>
     829
     830        Reviewed by Tor Arne VestbÞ.
     831
     832        Replace the QWebPage::networkRequestStarted() signal with the originatingObject
     833        property set to the QWebFrame that belongs to the request.
     834
     835        https://bugs.webkit.org/show_bug.cgi?id=29975
     836
     837        * Api/qwebpage.h:
     838        * WebCoreSupport/FrameLoaderClientQt.cpp:
     839        (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNewWindowAction):
     840        (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction):
     841        (WebCore::FrameLoaderClientQt::startDownload):
     842        * tests/qwebpage/tst_qwebpage.cpp:
     843        (tst_QWebPage::loadFinished):
     844        (TestNetworkManager::createRequest):
     845        (tst_QWebPage::originatingObjectInNetworkRequests):
     846
     8472009-11-02  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
     848
     849        Reviewed by Adam Barth.
     850
     851        QWebView crash fix.
     852
     853        The QWebView should not crash if the stop() method is called from
     854        a function triggered by the loadProgress signal.
     855
     856        A null pointer protection was added in the ProgressTracker::incrementProgress.
     857
     858        New autotest was created.
     859
     860        https://bugs.webkit.org/show_bug.cgi?id=29425
     861
     862        * tests/qwebview/tst_qwebview.cpp:
     863        (WebViewCrashTest::WebViewCrashTest):
     864        (WebViewCrashTest::loading):
     865        (tst_QWebView::crashTests):
     866
     8672009-10-30  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     868
     869        Reviewed by Tor Arne VestbÞ.
     870
     871        [Qt] Remove the QWebInspector::windowTitleChanged signal,
     872        QEvent::WindowTitleChange can be used to achieve the same.
     873        https://bugs.webkit.org/show_bug.cgi?id=30927
     874
     875        * Api/qwebinspector.cpp:
     876        * Api/qwebinspector.h:
     877        * WebCoreSupport/InspectorClientQt.cpp:
     878        (WebCore::InspectorClientQt::updateWindowTitle):
     879
     8802009-10-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     881
     882        Reviewed by Tor Arne VestbÞ.
     883
     884        [Qt] Implement DELETE HTTP method for XmlHttpRequest
     885        https://bugs.webkit.org/show_bug.cgi?id=30894
     886
     887        No new tests as this functionality is already tested by the
     888        xmlhttprequest LayoutTests. As this patch depends on an unreleased
     889        version of the dependent QtNetwork library and the tests will be
     890        enabled later once the dependent library is released (and the
     891        buildbot is updated).
     892
     893        * Api/qwebframe.cpp:
     894        (QWebFrame::load):
     895
     8962009-10-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     897
     898        Reviewed by Tor Arne VestbÞ.
     899
     900        Remove QWebView::guessUrlFromString() and replace its use
     901        with the new QUrl::fromUserInput() if using Qt 4.6 or newer.
     902
     903        * Api/qwebview.cpp:
     904        * Api/qwebview.h:
     905        * QGVLauncher/main.cpp:
     906        (urlFromUserInput):
     907        (WebPage::applyProxy):
     908        (MainWindow::load):
     909        * QtLauncher/main.cpp:
     910        (urlFromUserInput):
     911        (MainWindow::MainWindow):
     912        (MainWindow::changeLocation):
     913        * tests/qwebview/tst_qwebview.cpp:
     914
     9152009-10-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     916
     917        Reviewed by Tor Arne VestbÞ.
     918
     919        Serialize directly to the stream, and not first to an QByteArray,
     920        that is later serialized. That is slower and also uses more bytes.
     921
     922        * Api/qwebhistory.cpp:
     923        (operator<<):
     924        (operator>>):
     925
     9262009-10-28  Shinichiro Hamaji  <hamaji@chromium.org>
     927
     928        Reviewed by Eric Seidel.
     929
     930        [Qt] WebFrame::counterValueForElementById must not be exposed
     931        https://bugs.webkit.org/show_bug.cgi?id=30882
     932
     933        * Api/qwebframe.cpp:
     934        (qt_drt_counterValueForElementById):
     935        * Api/qwebframe.h:
     936
     9372009-10-27  Shinichiro Hamaji  <hamaji@chromium.org>
     938
     939        Reviewed by Darin Adler.
     940
     941        Provide a way to get counter values with layoutTestContoller
     942        https://bugs.webkit.org/show_bug.cgi?id=30555
     943
     944        * Api/qwebframe.cpp:
     945        (QWebFrame::counterValueForElementById):
     946        (QWebHitTestResult::frame):
     947        * Api/qwebframe.h:
     948
     9492009-10-28  Antonio Gomes  <tonikitoo@webkit.org>
     950
     951        Pushing missing WebKit/qt/tests/qwebframe/resources/ dir from bug 29248.
     952
     953        [Qt] [API] Make it possible to have 'invisible' loads
     954        https://bugs.webkit.org/show_bug.cgi?id=29248
     955
     956        * tests/qwebframe/resources/image2.png: Copied from WebKit/qt/tests/qwebelement/image.png.
     957
     9582009-10-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     959
     960        Reviewed by Tor Arne VestbÞ.
     961
     962        [Qt] QWebHistory::saveState() is inconsistent with the Qt API
     963        https://bugs.webkit.org/show_bug.cgi?id=30710
     964
     965        Make the versioning internal and enforce it in the WebCore
     966        part. Adjust the comments, as well as remove now dead code.
     967
     968        * Api/qwebhistory.cpp:
     969        (operator<<):
     970        (operator>>):
     971        * Api/qwebhistory.h:
     972
     9732009-10-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     974
     975        Reviewed by Holger Freyther.
     976
     977        [Qt] QWebHistory::saveState() is inconsistent with the Qt API
     978        https://bugs.webkit.org/show_bug.cgi?id=30710
     979
     980        Remove the QWebHistory::saveState() and ::restoreState() as
     981        they are inconsistent with the Qt API.
     982
     983        Update unittests to reflect the change.
     984
     985        * Api/qwebhistory.cpp:
     986        (operator<<):
     987        (operator>>):
     988        * Api/qwebhistory.h:
     989        * tests/qwebhistory/tst_qwebhistory.cpp:
     990        (saveHistory):
     991        (restoreHistory):
     992        (tst_QWebHistory::saveAndRestore_crash_1):
     993        (tst_QWebHistory::saveAndRestore_crash_2):
     994        (tst_QWebHistory::saveAndRestore_crash_3):
     995        (tst_QWebHistory::clear):
     996
     9972009-10-27  Antonio Gomes  <tonikitoo@webkit.org>
     998
     999        Reviewed by Holger Freyther.
     1000
     1001        Complementary fix to bug 30779.
     1002
     1003        By mistake I used QWeakPointer's toStrongRef() method which docs
     1004        explicitly say to not be used in this situation (when the tracked
     1005        pointer is devired from QObject). Instead QWeakPointer's data()
     1006        is recommended.
     1007
     1008        * Api/qwebpage.cpp:
     1009        (QWebPage::view):
     1010
     10112009-10-27  Holger Hans Peter Freyther  <zecke@selfish.org>
     1012
     1013        Reviewed by Simon Fraser.
     1014
     1015        Change HitTestResult methods to use (3d) transformation aware methods
     1016        https://bugs.webkit.org/show_bug.cgi?id=27347
     1017
     1018        The HitTestResult::boundingBox method was removed. The
     1019        RenderObject must be used directly. In contrast to the
     1020        old HitTestResult::boundingBox method this code must use
     1021        a (3d) transformation aware method to not run into an
     1022        assert in SVGRenderBase::mapLocalToContainer.
     1023
     1024        * Api/qwebframe.cpp:
     1025        (QWebHitTestResultPrivate::QWebHitTestResultPrivate):
     1026
     10272009-10-27  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1028
     1029        Rubberstamped by Oliver Hunt.
     1030
     1031        Change two methods to be internal for DRT use only.
     1032
     1033        Part of [Qt] Review all new API in Qt 4.6
     1034        https://bugs.webkit.org/show_bug.cgi?id=29843#c11
     1035
     1036        * Api/qwebsecurityorigin.cpp:
     1037        (qt_drt_whiteListAccessFromOrigin):
     1038        (qt_drt_resetOriginAccessWhiteLists):
     1039        (QWebSecurityOrigin::localSchemes):
     1040        * Api/qwebsecurityorigin.h:
     1041
     10422009-10-27  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1043
     1044        Reviewed by Tor Arne VestbÞ.
     1045
     1046        Make sure that initiating a rotation while rotating won't make
     1047        it end up at rotation positions that are not a multiply of
     1048        180 degrees.
     1049
     1050        * QGVLauncher/main.cpp:
     1051        (MainView::animatedFlip):
     1052
     10532009-10-27  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1054
     1055        Unreviewed Qt build fix.
     1056
     1057        Update the tests as well to the new API change.
     1058
     1059        * tests/qwebelement/tst_qwebelement.cpp:
     1060        (tst_QWebElement::clear):
     1061
     10622009-10-27  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1063
     1064        Rubberstamped by Tor Arne VestbÞ.
     1065
     1066        [Qt] QWebElement::removeChildren() should be
     1067        QWebElement::removeAllChildren()
     1068        https://bugs.webkit.org/show_bug.cgi?id=30630
     1069
     1070        * Api/qwebelement.cpp:
     1071        (QWebElement::removeAllChildren):
     1072        * Api/qwebelement.h:
     1073
     10742009-10-27  Antonio Gomes  <tonikitoo@webkit.org>
     1075
     1076        Reviewed by Antti Koivisto and Holger Freyther.
     1077
     1078        Make QWebPagePrivate's (QWidget) view to be a QWeakPointer.
     1079        https://bugs.webkit.org/show_bug.cgi?id=30779
     1080
     1081        The fact that it was been set from external objects of qwebpage
     1082        and not being deleted internally can lead to dangling references.
     1083
     1084        * Api/qgraphicswebview.cpp:
     1085        (QGraphicsWebView::~QGraphicsWebView):
     1086        * Api/qwebpage.cpp:
     1087        (QWebPagePrivate::QWebPagePrivate):
     1088        (QWebPagePrivate::createContextMenu):
     1089        (QWebPagePrivate::handleSoftwareInputPanel):
     1090        (QWebPagePrivate::keyPressEvent):
     1091        (QWebPage::setView):
     1092        (QWebPage::view):
     1093        (QWebPage::javaScriptAlert):
     1094        (QWebPage::javaScriptConfirm):
     1095        (QWebPage::javaScriptPrompt):
     1096        (QWebPage::shouldInterruptJavaScript):
     1097        (QWebPage::createWindow):
     1098        (QWebPage::extension):
     1099        (QWebPage::chooseFile):
     1100        (QWebPage::userAgentForUrl):
     1101        * Api/qwebpage_p.h:
     1102        * Api/qwebview.cpp:
     1103        (QWebView::~QWebView):
     1104
     11052009-10-26  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1106
     1107        Unreviewed documentation fix from David Boddie (Qt Doc Team)
     1108
     1109        Removes the check around the RenderHints property documentation
     1110        that was clearly added to synchronize the source and header files
     1111        when the #if !defined(Q_OS_SYMBIAN) guards was added to the
     1112        property.
     1113
     1114        The documentation has also been updated to ensure that Symbian
     1115        users know that there is no actual RenderHints property on their
     1116        platform.
     1117
     1118        * Api/qwebview.cpp:
     1119
     11202009-10-26  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1121
     1122        Unreviewed documentation fix from David Boddie (Qt Doc Team)
     1123
     1124        Ensure that qdoc will always see the RenderHints property.
     1125
     1126        The property was only defined in the header file if the Q_OS_SYMBIAN
     1127        symbol was not defined, resulting in the property not showing up
     1128        in the Qt documentation just because one platform doesn't support it.
     1129
     1130        A follow up commit will improve the documentation for the property
     1131        and note that it is not supported on the Symbiam platform.
     1132
     1133        * Api/qwebview.h:
     1134
     11352009-10-26  Benjamin Poulain  <benjamin.poulain@nokia.com>
     1136
     1137        Reviewed by Tor Arne VestbÞ.
     1138
     1139        [Qt] Reintroduce QWebElementCollection
     1140
     1141        Revert the patch that has replaced QWebElementCollection
     1142        with QList<QWebElement>. Update the tests accordingly.
     1143
     1144        Remove the constness of the return type of QWebElement operator[].
     1145
     1146        https://bugs.webkit.org/show_bug.cgi?id=30767
     1147
     1148        * Api/qwebelement.cpp:
     1149        (QWebElement::findAll):
     1150        (QWebElementCollectionPrivate::QWebElementCollectionPrivate):
     1151        (QWebElementCollectionPrivate::create):
     1152        (QWebElementCollection::QWebElementCollection):
     1153        (QWebElementCollection::operator=):
     1154        (QWebElementCollection::~QWebElementCollection):
     1155        (QWebElementCollection::operator+):
     1156        (QWebElementCollection::append):
     1157        (QWebElementCollection::count):
     1158        (QWebElementCollection::at):
     1159        (QWebElementCollection::toList):
     1160        * Api/qwebelement.h:
     1161        (const_iterator::begin):
     1162        (const_iterator::end):
     1163        (const_iterator::operator[]):
     1164        * Api/qwebframe.cpp:
     1165        (QWebFrame::findAllElements):
     1166        * Api/qwebframe.h:
     1167        * QtLauncher/main.cpp:
     1168        (MainWindow::selectElements):
     1169        * tests/qwebelement/tst_qwebelement.cpp:
     1170        (tst_QWebElement::simpleCollection):
     1171        (tst_QWebElement::iteration):
     1172        (tst_QWebElement::emptyCollection):
     1173        (tst_QWebElement::appendCollection):
     1174        (tst_QWebElement::nullSelect):
     1175        (tst_QWebElement::hasSetFocus):
     1176        (tst_QWebElement::render):
     1177        * tests/qwebpage/tst_qwebpage.cpp:
     1178        (tst_QWebPage::inputMethods):
     1179
     11802009-10-24  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     1181
     1182        Reviewed by Holger Freyther.
     1183
     1184        [Qt] [Symbian] Set the capability and memory required to run QtWebKit for Symbian
     1185        https://bugs.webkit.org/show_bug.cgi?id=30476
     1186
     1187        Assign ReadUserData WriteUserData NetworkServices Symbian capabilities
     1188        to all QtWebkit executables.
     1189
     1190        * QGVLauncher/QGVLauncher.pro:
     1191        * QtLauncher/QtLauncher.pro:
     1192        * tests/benchmarks/loading/tst_loading.pro:
     1193        * tests/benchmarks/painting/tst_painting.pro:
     1194        * tests/qgraphicswebview/qgraphicswebview.pro:
     1195        * tests/qwebelement/qwebelement.pro:
     1196        * tests/qwebframe/qwebframe.pro:
     1197        * tests/qwebhistory/qwebhistory.pro:
     1198        * tests/qwebhistoryinterface/qwebhistoryinterface.pro:
     1199        * tests/qwebpage/qwebpage.pro:
     1200        * tests/qwebplugindatabase/qwebplugindatabase.pro:
     1201        * tests/qwebview/qwebview.pro:
     1202
     12032009-10-22  Gavin Barraclough  <barraclough@apple.com>
     1204
     1205        Reviewed by NOBODY (speculative build fix - qt is currently already broken!)
     1206        Build fix following bug #30696.
     1207
     1208        * Api/qwebelement.cpp:
     1209        (setupScriptContext):
     1210        * Api/qwebframe.cpp:
     1211        (QWebFrame::evaluateJavaScript):
     1212
     12132009-10-22  Shu Chang  <Chang.Shu@nokia.com>
     1214
     1215        Reviewed by Eric Seidel.
     1216
     1217        [Qt] Enable track visited links in QWebPage
     1218        https://bugs.webkit.org/show_bug.cgi?id=30574
     1219
     1220        Test: fast/history/clicked-link-is-visited.html
     1221
     1222        * Api/qwebpage.cpp:
     1223        (QWebPagePrivate::QWebPagePrivate):
     1224
     12252009-10-22  Girish Ramakrishnan  <girish@forwardbias.in>
     1226
     1227        Reviewed by Eric Seidel.
     1228
     1229        [Qt] Add Print Shortcut to QtLauncher
     1230
     1231        https://bugs.webkit.org/show_bug.cgi?id=30682
     1232
     1233        * QtLauncher/main.cpp:
     1234        (MainWindow::setupUI):
     1235
     12362009-10-22  Antonio Gomes  <tonikitoo@webkit.org>
     1237
     1238        Rubberstamped by Tor Arne VestbÞ.
     1239
     1240        Code standarlization for QGVLauncher.
     1241
     1242        1) Made member initilization lists in constructors
     1243           to be per line.
     1244        2) Made applyProxy method inline as all other methods in
     1245           WebPage class.
     1246
     1247        * QGVLauncher/main.cpp:
     1248        (WebPage::WebPage):
     1249        (WebPage::applyProxy):
     1250        (MainView::MainView):
     1251        (MainWindow::MainWindow):
     1252        (MainWindow::init):
     1253
     12542009-10-22  Antonio Gomes  <tonikitoo@webkit.org>
     1255
     1256        Reviewed by Tor Arne VestbÞ.
     1257
     1258        Add a Y-Axis rotation to QGVLauncher.
     1259
     1260        It uses the QStateMachine API from Qt 4.6.
     1261
     1262        * QGVLauncher/main.cpp:
     1263        (WebView::WebView):
     1264        (WebView::setYRotation):
     1265        (WebView::yRotation):
     1266        (MainView::flip):
     1267        (MainView::animatedYFlip):
     1268        (SharedScene::SharedScene):
     1269        (SharedScene::webView):
     1270        (MainWindow::init):
     1271        (MainWindow::animatedYFlip):
     1272        (MainWindow::buildUI):
     1273
     12742009-10-20  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1275
     1276        Reviewed By Adam Barth.
     1277
     1278        Add some actions to the menu for cursor debugging.
     1279
     1280        GraphicsView based launcher only.
     1281
     1282        * QGVLauncher/main.cpp:
     1283        (MainView::setWaitCursor):
     1284        (MainView::resetCursor):
     1285        (MainView::flip):
     1286        (MainWindow::setWaitCursor):
     1287        (MainWindow::resetCursor):
     1288        (MainWindow::buildUI):
     1289
     12902009-10-20  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1291
     1292        Rubberstamped by Adam Barth.
     1293
     1294        Remove clipRenderToViewport as agreed upon in
     1295        https://bugs.webkit.org/show_bug.cgi?id=29843
     1296
     1297        * Api/qwebframe.cpp:
     1298        * Api/qwebframe.h:
     1299        * Api/qwebframe_p.h:
     1300        (QWebFramePrivate::QWebFramePrivate):
     1301
     13022009-10-20  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1303
     1304        Reviewed by Adam Barth.
     1305
     1306        Update the tests to test the new render functionality, and take
     1307        into consideration that render() clips to the frame itself as well
     1308        as the viewport.
     1309
     1310        QWebFrame::render() now always clips, so the old tests were bogus.
     1311
     1312        Rendering pure contents (no scrollbars etc) without clipping can now
     1313        be accomplished using QWebFrame::documentElement()->render(...)
     1314
     1315        * Api/qwebframe.cpp:
     1316        * Api/qwebframe.h:
     1317        * Api/qwebframe_p.h:
     1318        (QWebFramePrivate::QWebFramePrivate):
     1319        * tests/qwebframe/tst_qwebframe.cpp:
     1320
     13212009-10-20  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1322
     1323        Rubberstamped by Adam Barth.
     1324
     1325        As we do not support rendering a QWebFrame without it being clipped
     1326        the the frame as well as the viewport, we now set the viewport size
     1327        to the size of the contents.
     1328
     1329        Rendering pure contents (no scrollbars etc) without clipping can be
     1330        acomplished using QWebFrame::documentElement()->render(...)
     1331
     1332        * tests/qwebelement/tst_qwebelement.cpp:
     1333        (tst_QWebElement::render):
     1334
     13352009-10-20  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1336
     1337        Reviewed by Tor Arne VestbÞ.
     1338
     1339        Add menu item to dump the plugin list to the console,
     1340        which can be handy for debugging.
     1341
     1342        * QtLauncher/main.cpp:
     1343        (MainWindow::dumpPlugins):
     1344        (MainWindow::setupUI):
     1345
     13462009-10-19  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1347
     1348        Reviewed by Tor Arne VestbÞ.
     1349
     1350        Introduce new render method on QWebFrame, which supports specifying
     1351        which layers to render (scrollbars, contents, pan-icon).
     1352
     1353        * Api/qwebframe.cpp:
     1354        (QWebFramePrivate::renderPrivate):
     1355        (QWebFrame::render):
     1356        * Api/qwebframe.h:
     1357        * Api/qwebframe_p.h:
     1358
     13592009-10-19  Antonio Gomes  <tonikitoo@webkit.org>
     1360
     1361        Reviewed by Ariya Hidayat.
     1362
     1363        [Qt] Infinite loop (leading to crash) when setting cursor in QGraphicsWebView
     1364        https://bugs.webkit.org/show_bug.cgi?id=30549
     1365
     1366        Patch reimplements QGraphicsItem's itemChange method, and make
     1367        CursorChange event to be emitted after cursor has already been
     1368        set.
     1369
     1370        QWidget::setCursor send the event just after it sets the cursor,
     1371        then patch makes both behaviors compatible.
     1372
     1373        * Api/qgraphicswebview.cpp:
     1374        (QGraphicsWebView::itemChange):
     1375        * Api/qgraphicswebview.h:
     1376
     13772009-10-19  Nate Chapin  <japhet@chromium.org>
     1378
     1379        Unreviewed, build fix.
     1380
     1381        Update call to FrameLoader::loadFrameRequest().
     1382
     1383        * Api/qwebpage.cpp:
     1384        (QWebPage::triggerAction):
     1385
     13862009-10-19  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
     1387
     1388        Reviewed by Ariya Hidayat.
     1389
     1390        Add QWebElement::render API which allows rendering of single
     1391        element.
     1392
     1393        * Api/qwebelement.cpp:
     1394        (QWebElement::render):
     1395        * Api/qwebelement.h:
     1396        * tests/qwebelement/tst_qwebelement.cpp:
     1397        (tst_QWebElement::render):
     1398        * tests/qwebelement/qwebelement.qrc:
     1399        * tests/qwebelement/image.png: Added.
     1400
     14012009-10-19  Markus Goetz <Markus.Goetz@nokia.com>
     1402
     1403        Reviewed by Ariya Hidayat.
     1404
     1405        QWebPage: Doc: setNetworkAccessManager should only be called once.
     1406
     1407        * Api/qwebpage.cpp:
     1408
     14092009-10-19  Antonio Gomes  <tonikitoo@webkit.org>
     1410
     1411        Reviewed by Tor Arne.
     1412
     1413        Wrong ifdef combination in QGraphicsWebView's event method.
     1414
     1415        * Api/qgraphicswebview.cpp:
     1416        (QGraphicsWebView::event):
     1417
     14182009-10-19  Girish Ramakrishnan  <girish@forwardbias.in>
     1419
     1420        Reviewed by Holger Freyther.
     1421
     1422        [Qt] Windowed Plugins: Don't crash when client is 0.
     1423       
     1424        Client is 0 when we use QWebPage without a QWebView or QGraphicsWebView.
     1425        In addition, setFrameRect()/updatePluginWidget() is called even if the
     1426        plugin was not succesfully loaded. updatePluginWidget() updates the
     1427        window rect which is, in theory, useful to draw something that indicates
     1428        that we didn't load successfully.
     1429       
     1430        So, a status check is added to setNPWindowIfNeeded.
     1431
     1432        https://bugs.webkit.org/show_bug.cgi?id=30380
     1433
     1434        * tests/qwebpage/qwebpage.pro:
     1435        * tests/qwebpage/tst_qwebpage.cpp:
     1436        (takeScreenshot):
     1437        (tst_QWebPage::screenshot_data):
     1438        (tst_QWebPage::screenshot):
     1439        * tests/resources/test.swf: Copied from LayoutTests/fast/replaced/resources/test.swf.
     1440
     14412009-10-19  Girish Ramakrishnan  <girish@forwardbias.in>
     1442
     1443        Reviewed by Holger Freyther.
     1444
     1445        [Qt] Windowed Plugins: Fix crash when QWebPage is deleted after QWebView.
     1446       
     1447        Fixes various sources of crashes:
     1448        1. The PluginContainer is a child of QWebView. When the view gets deleted,
     1449        the PluginView is not notified about the deletion of PluginContainer.
     1450        2. QWebView destructor does not set client to 0.
     1451        3. Sometimes pending paint events are sent after the plugin has died, so add
     1452        a check in PluginView::setNPWindowIfNeeded.
     1453
     1454        https://bugs.webkit.org/show_bug.cgi?id=30354
     1455
     1456        * Api/qwebview.cpp:
     1457        (QWebView::~QWebView):
     1458        * tests/qwebview/qwebview.pro:
     1459        * tests/qwebview/tst_qwebview.cpp:
     1460        (tst_QWebView::reusePage_data):
     1461        (tst_QWebView::reusePage):
     1462
     14632009-10-19  Jakob Truelsen  <antialize@gmail.com>
     1464
     1465        Reviewed by Adam Barth.
     1466
     1467        https://bugs.webkit.org/show_bug.cgi?id=29042
     1468
     1469        Allow one to costumize the minimal and maximal shrink factors,
     1470        Added methods setPrintingMinimumShrinkFactor, printingMinimumShrinkFactor,
     1471        setPrintingMaximumShrinkFactor, printingMaximumShrinkFactor to QWebSettings.
     1472
     1473
     1474        * Api/qwebsettings.cpp:
     1475        (QWebSettingsPrivate::apply):
     1476        (QWebSettings::QWebSettings):
     1477        (QWebSettings::setPrintingMinimumShrinkFactor):
     1478        (QWebSettings::printingMinimumShrinkFactor):
     1479        (QWebSettings::setPrintingMaximumShrinkFactor):
     1480        (QWebSettings::printingMaximumShrinkFactor):
     1481        * Api/qwebsettings.h:
     1482
     14832009-10-18  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1484
     1485        Reviewed by Simon Hausmann.
     1486
     1487        Rename fixedContentsSize property to preferredContentsSize as
     1488        agreed upon with Simon Hausmann and Matthias Ettrich.
     1489
     1490        * Api/qwebpage.cpp:
     1491        (QWebPage::preferredContentsSize):
     1492        (QWebPage::setPreferredContentsSize):
     1493        * Api/qwebpage.h:
     1494        * WebCoreSupport/FrameLoaderClientQt.cpp:
     1495        (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage):
     1496
     14972009-10-16  Antonio Gomes  <tonikitoo@webkit.org>
     1498
     1499        Reviewed by Simon Hausmann.
     1500
     1501        [Qt] QGLauncher leaks WebPage object
     1502        https://bugs.webkit.org/show_bug.cgi?id=30465
     1503
     1504        Make 'SharedScene' to own 'WebPage' reference and delete it at its destructor.
     1505
     1506        * Api/qwebpage.cpp:
     1507        (QWebPage::view):
     1508        * Api/qwebpage_p.h:
     1509        * QGVLauncher/main.cpp:
     1510        (SharedScene::SharedScene):
     1511        (SharedScene::~SharedScene):
     1512
     15132009-10-16  Antonio Gomes  <tonikitoo@webkit.org>
     1514
     1515        Reviewed by Simon Hausmann.
     1516
     1517        [Qt] "dangling" pointer to qwebpage's view object can leads QGLauncher to crash
     1518        https://bugs.webkit.org/show_bug.cgi?id=30459
     1519
     1520        Remove all setView(ev->widget()) calls in QWebPage and QGWV event handling methods,
     1521        since QWebPageClient would do the trick.
     1522
     1523        * Api/qgraphicswebview.cpp:
     1524        (QGraphicsWebView::hoverMoveEvent):
     1525        * Api/qwebpage.cpp:
     1526        (QWebPagePrivate::mouseMoveEvent):
     1527        (QWebPagePrivate::mousePressEvent):
     1528        (QWebPagePrivate::mouseDoubleClickEvent):
     1529        (QWebPagePrivate::mouseReleaseEvent):
     1530        (QWebPagePrivate::wheelEvent):
     1531        (QWebPagePrivate::dragEnterEvent):
     1532        (QWebPagePrivate::dragLeaveEvent):
     1533        (QWebPagePrivate::dragMoveEvent):
     1534
     15352009-10-16  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     1536
     1537        Pull out r49676 as it caused build breakges on Symbian
     1538
     1539        * Api/qwebpage.cpp:
     1540
     15412009-10-16  Yael Aharon  <yael.aharon@nokia.com>
     1542
     1543        Reviewed by Tor Arne VestbÞ.
     1544
     1545        [Qt] Need a way to inform the application when a Netscape plugin is created or deleted
     1546        https://bugs.webkit.org/show_bug.cgi?id=30179
     1547
     1548        Added "c" style static methods for the application to hook up for
     1549        receiving notifications when a plugin is created or destroyed.
     1550
     1551        * Api/qwebpage.cpp:
     1552
     15532009-10-15  Antonio Gomes  <tonikitoo@webkit.org>
     1554
     1555        Rubberstamped by Tor Arne.
     1556
     1557        Make QGLauncher's WebPage class constructor to get a QObject* as parent (not QWidget*).
     1558
     1559        * QGVLauncher/main.cpp:
     1560        (WebPage::WebPage):
     1561
     15622009-10-15  Antonio Gomes  <tonikitoo@webkit.org>
     1563
     1564        Reviewed by Tor Arne.
     1565
     1566        [Qt] QGLauncher crashes while closing a window
     1567        https://bugs.webkit.org/show_bug.cgi?id=30385
     1568
     1569        Set page's pageClient reference to '0' at QGWV deletion.
     1570
     1571        * Api/qgraphicswebview.cpp:
     1572        (QGraphicsWebView::~QGraphicsWebView):
     1573        * tests/qgraphicswebview/tst_qgraphicswebview.cpp:
     1574        (WebPage::WebPage):
     1575        (WebPage::aborting):
     1576        (tst_QGraphicsWebView::crashOnViewlessWebPages):
     1577
     15782009-10-13  Antonio Gomes  <tonikitoo@webkit.org>
     1579
     1580        Reviewed by Simon Hausmann.
     1581
     1582        [Qt] Make context menu to work in QGraphicsWebView
     1583        https://bugs.webkit.org/show_bug.cgi?id=30336
     1584
     1585        * Api/qgraphicswebview.cpp:
     1586        (QGraphicsWebView::event):
     1587
     15882009-10-13  Girish Ramakrishnan  <girish@forwardbias.in>
     1589
     1590        Reviewed by Simon Hausmann.
     1591
     1592        [Qt] Plugins : Remove all traces of winId. Use ownerWidget() instead.
     1593       
     1594        This is a bug for two reasons:
     1595        1. Everytime we use winId(), we end up creating a native widget. This causes an
     1596        unnecessary copy of contents from the backing store to the native widget.
     1597        2. Neither windowed nor windowless plugins require the winId of the QWebView or
     1598        QGraphicsView.
     1599       
     1600        Introduce ownerWidget() which returns a QWidget * without creating a native widget
     1601        (as opposed to QWidget::find(winId)).
     1602
     1603        https://bugs.webkit.org/show_bug.cgi?id=30170
     1604
     1605        * Api/qgraphicswebview.cpp:
     1606        (QGraphicsWebViewPrivate::ownerWidget):
     1607        * Api/qwebview.cpp:
     1608        (QWebViewPrivate::ownerWidget):
     1609
     16102009-10-13  Antonio Gomes  <tonikitoo@webkit.org>
     1611
     1612        Reviewed by Simon Hausmann.
     1613
     1614        [Qt] Add some initial autotests for QWebPage's ErrorPageExtention
     1615        https://bugs.webkit.org/show_bug.cgi?id=30296
     1616
     1617        * tests/qwebpage/tst_qwebpage.cpp:
     1618        (ErrorPage::ErrorPage):
     1619        (ErrorPage::supportsExtension):
     1620        (ErrorPage::extension):
     1621        (tst_QWebPage::errorPageExtension):
     1622
     16232009-10-13  Antonio Gomes  <tonikitoo@webkit.org>
     1624
     1625        Reviewed by Simon Hausmann.
     1626
     1627        [Qt] better handle possible edge cases on qwebframe::requestedUrl use
     1628        https://bugs.webkit.org/show_bug.cgi?id=30216
     1629
     1630        QWebFrame::requestedUrl can be called at any time during the load
     1631        process, including:
     1632
     1633        * An error handling (whereas an alternate error page for unsuccessful
     1634          load is being set);
     1635        * A ssl error exception call;
     1636        * During navigation notifications/callbacks (titleChanged, urlChanged,
     1637          progresses, addHistoryEntry, etc);
     1638        * Among others.
     1639
     1640        This patch makes requestedUrl calls to fallback to FrameLoaderClient
     1641        m_loadError's failingURL when an error has occurred, unless it is
     1642        null/empty.
     1643
     1644        Also, m_loadError is now being reset at each the main frame starts a
     1645        load, in order to avoid previous load errors footprints.
     1646
     1647        * Api/qwebframe.cpp:
     1648        (QWebFrame::requestedUrl):
     1649        * WebCoreSupport/FrameLoaderClientQt.cpp:
     1650        (WebCore::FrameLoaderClientQt::postProgressStartedNotification):
     1651
     16522009-10-12  Jakub Wieczorek  <faw217@gmail.com>
     1653
     1654        Reviewed by Simon Hausmann.
     1655
     1656        [Qt] Missing default value for the default text encoding.
     1657        https://bugs.webkit.org/show_bug.cgi?id=30311
     1658
     1659        QtWebKit has provided a default, hardcoded value for default charset but since
     1660        the addition of the defaultTextEncoding setting in QWebSettings, that hardcoded
     1661        value has had no effect.
     1662
     1663        Added a regression test and unskipped fast/dom/Document/document-charset.html,
     1664        which is passing now.
     1665
     1666        * Api/qwebpage.cpp:
     1667        (QWebPagePrivate::QWebPagePrivate):
     1668        * Api/qwebsettings.cpp:
     1669        (QWebSettings::QWebSettings):
     1670        * tests/qwebpage/tst_qwebpage.cpp:
     1671        (tst_QWebPage::defaultTextEncoding):
     1672
     16732009-10-12  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1674
     1675        Reviewed by Simon Hausmann.
     1676
     1677        Implement the new palette() methods on the page clients
     1678
     1679        * Api/qgraphicswebview.cpp:
     1680        (QGraphicsWebViewPrivate::palette):
     1681        * Api/qwebview.cpp:
     1682        (QWebViewPrivate::palette):
     1683
     16842009-10-12  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
     1685
     1686        Reviewed by Simon Hausmann.
     1687
     1688        QWebPage's createViewlessPlugin autotest crash fix.
     1689       
     1690        It is possible that plugins that are QWidgets or QGraphicsWidgets
     1691        are created before a view has been assigned to a QWebPage. The
     1692        plug-ins won't be fully functional, as by design, they should
     1693        visualise something, but they won't crash and will stay in memory.
     1694
     1695        An autotest that covers this use-case, is included.
     1696
     1697        https://bugs.webkit.org/show_bug.cgi?id=30118
     1698
     1699        * WebCoreSupport/FrameLoaderClientQt.cpp:
     1700        (WebCore::FrameLoaderClientQt::createPlugin):
     1701        * tests/qwebpage/tst_qwebpage.cpp:
     1702        (PluginTrackedPageWidget::PluginTrackedPageWidget):
     1703        (PluginTrackedPageGraphicsWidget::PluginTrackedPageGraphicsWidget):
     1704        (PluginTrackedPageGraphicsWidget::createPlugin):
     1705        (tst_QWebPage::destroyPlugin):
     1706        (tst_QWebPage::createViewlessPlugin):
     1707
     17082009-10-09  Joe Ligman  <joseph.ligman@nokia.com>
     1709
     1710        Reviewed by Simon Hausmann.
     1711
     1712        Sets Qt::WA_InputMethodEnabled and Qt::ImhHiddenText for password fields in EditorClientQt
     1713        setInputMethodState. This change is needed so widgets such as the s60 software
     1714        input panel can receive input method events for password fields.
     1715        It's up to the Qt platform to determine which widget will receive input method
     1716        events when these flags are set.
     1717        Also added implementation for setInputMethodEnabled and setInputMethodHint
     1718        to QGraphicsWebViewPrivate and QWebViewPrivate. This change removes the direct
     1719        dependency on QWebView and uses QWebPageClient.
     1720        Added autotest to tst_qwebpage.cpp
     1721        https://bugs.webkit.org/show_bug.cgi?id=30023
     1722
     1723        * Api/qgraphicswebview.cpp:
     1724        (QGraphicsWebViewPrivate::setInputMethodEnabled):
     1725        (QGraphicsWebViewPrivate::setInputMethodHint):
     1726        * Api/qwebview.cpp:
     1727        (QWebViewPrivate::setInputMethodEnabled):
     1728        (QWebViewPrivate::setInputMethodHint):
     1729        * WebCoreSupport/EditorClientQt.cpp:
     1730        (WebCore::EditorClientQt::setInputMethodState):
     1731        * tests/qwebpage/tst_qwebpage.cpp:
     1732        (tst_QWebPage::inputMethods):
     1733
     17342009-10-08  Adam Barth  <abarth@webkit.org>
     1735
     1736        Reviewed by Eric Seidel.
     1737
     1738        Move executeScript from FrameLoader to ScriptController
     1739        https://bugs.webkit.org/show_bug.cgi?id=30200
     1740
     1741        Update API call.
     1742
     1743        * Api/qwebframe.cpp:
     1744        (QWebFrame::evaluateJavaScript):
     1745
     17462009-10-08  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
     1747
     1748        Reviewed by Simon Hausmann.
     1749
     1750        Part of testOptionalJSObjects autotest was marked as "expect to fail".
     1751
     1752        Two places in tst_QWebPage::testOptionalJSObjects were marked as
     1753        expected to fail. The problem concern checking if a feature is enabled
     1754        or disabled. According to discussion on webkit dev mailing list
     1755        a disabled feature should be invisible from java script level, but
     1756        there are exceptions from the rule. So we decided to disable the test
     1757        for now.
     1758
     1759        https://bugs.webkit.org/show_bug.cgi?id=29867
     1760
     1761        * tests/qwebpage/tst_qwebpage.cpp:
     1762        (tst_QWebPage::testOptionalJSObjects):
     1763
     17642009-10-07  Adam Barth  <abarth@webkit.org>
     1765
     1766        Reviewed by Darin Adler.
     1767
     1768        Factor PolicyChecker out of FrameLoader
     1769        https://bugs.webkit.org/show_bug.cgi?id=30155
     1770
     1771        Move the policy callback to the policy object.
     1772
     1773        * WebCoreSupport/FrameLoaderClientQt.cpp:
     1774        (WebCore::FrameLoaderClientQt::callPolicyFunction):
     1775
     17762009-10-07  Antonio Gomes  <tonikitoo@webkit.org>
     1777
     1778        Reviewed by Simon Hausmann.
     1779
     1780        [Qt] Get rid of useless loadFailed signal in QGraphicsWebView
     1781        https://bugs.webkit.org/show_bug.cgi?id=30166
     1782
     1783        * Api/qgraphicswebview.cpp:
     1784        (QGraphicsWebViewPrivate::_q_doLoadFinished):
     1785        * Api/qgraphicswebview.h:
     1786        * QGVLauncher/main.cpp:
     1787        (MainWindow::init):
     1788        (MainWindow::loadFinished):
     1789
     17902009-10-07  Girish Ramakrishnan  <girish@forwardbias.in>
     1791
     1792        Reviewed by Simon Hausmann.
     1793
     1794        Add a simple rotation effect to QGVLauncher
     1795
     1796        https://bugs.webkit.org/show_bug.cgi?id=30162
     1797
     1798        * QGVLauncher/main.cpp:
     1799        (MainView::animatedFlip):
     1800        (MainWindow::animatedFlip):
     1801        (MainWindow::buildUI):
     1802
     18032009-10-07  Volker Hilsheimer  <volker.hilsheimer@nokia.com>
     1804
     1805        Reviewed by Simon Hausmann.
     1806
     1807        Doc: Document HTML and status as properties.
     1808
     1809        * Api/qgraphicswebview.cpp:
     1810
     18112009-10-07  Martin Smith  <msmith@trolltech.com>
     1812
     1813        Reviewed by Simon Hausmann.
     1814
     1815        Fix qdoc warning about disabled renderHints property
     1816        on Symbian.
     1817
     1818        * Api/qwebview.cpp:
     1819        * Api/qwebview.h:
     1820
     18212009-10-06  Adam Barth  <abarth@webkit.org>
     1822
     1823        Reviewed by Eric Seidel.
     1824
     1825        Move setLocalLoadPolicy and friends to SecurityOrigin
     1826        https://bugs.webkit.org/show_bug.cgi?id=30110
     1827
     1828        Call the new API.
     1829
     1830        * Api/qwebpage.cpp:
     1831        (QWebPagePrivate::QWebPagePrivate):
     1832
     18332009-10-06  Benjamin C Meyer  <bmeyer@rim.com>
     1834
     1835        Reviewed by Ariya Hidayat.
     1836       
     1837        When the drag data contains an image set it on the QDrag so it will be visible to the user.
     1838       
     1839        * WebCoreSupport/DragClientQt.cpp:
     1840        (WebCore::DragClientQt::startDrag):
     1841
     18422009-10-06  Pavel Feldman  <pfeldman@chromium.org>
     1843
     1844        Reviewed by Timothy Hatcher.
     1845
     1846        Web Inspector: close inspector client view on
     1847        InspectorController::close API call.
     1848
     1849        In order to run batch web inspector layout tests (and not affect
     1850        subsequent tests) we should close inspector client's view upon
     1851        InspectorController::close API call.
     1852
     1853        https://bugs.webkit.org/show_bug.cgi?id=30009
     1854
     1855        * WebCoreSupport/InspectorClientQt.cpp:
     1856        (WebCore::InspectorClientQt::createPage):
     1857
     18582009-10-06  Janne Koskinen  <janne.p.koskinen@digia.com>
     1859
     1860        Reviewed by Simon Hausmann.
     1861
     1862        [Qt] don't enable input methods on Symbian by default.
     1863        https://bugs.webkit.org/show_bug.cgi?id=30117
     1864
     1865        If input methods are enabled Symbian FEP will be launched on every
     1866        pointer event making webpage navigation impossible with QWebView.
     1867
     1868        * Api/qwebview.cpp:
     1869        (QWebView::QWebView):
     1870
     18712009-10-05  Holger Hans Peter Freyther  <zecke@selfish.org>
     1872
     1873        Reviewed by Simon Hausmann.
     1874
     1875        QtLauncher: print the number of loaded urls
     1876       
     1877        When using the -r mode print the number of URLs loaded so far. This
     1878        is extremly useful when opening the same URL over and over again and
     1879        one wants to see the progress.
     1880
     1881        * QtLauncher/main.cpp:
     1882        (URLLoader::URLLoader):
     1883        (URLLoader::loadNext):
     1884
     18852009-10-05  Girish Ramakrishnan  <girish@forwardbias.in>
     1886
     1887        Reviewed by Simon Hausmann.
     1888
     1889        Add screenshot option to menubar
     1890
     1891        https://bugs.webkit.org/show_bug.cgi?id=30067
     1892
     1893        * QtLauncher/main.cpp:
     1894        (MainWindow::screenshot):
     1895        (MainWindow::setupUI):
     1896
     18972009-10-05  Girish Ramakrishnan  <girish@forwardbias.in>
     1898
     1899        Reviewed by Simon Hausmann.
     1900
     1901        Setting the env QTLAUNCHER_USE_ARGB_VISUALS makes Qt use WA_TranslucentWindow.
     1902
     1903        https://bugs.webkit.org/show_bug.cgi?id=30068
     1904
     1905        * QtLauncher/main.cpp:
     1906        (MainWindow::MainWindow):
     1907
     19082009-10-05  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1909
     1910        Rubberstamped by Simon Hausmann.
     1911
     1912        Add documentation to the ErrorPageExtension.
     1913
     1914        * Api/qwebpage.cpp:
     1915
     19162009-10-02  Yael Aharon  <yael.aharon@nokia.com>
     1917
     1918        Reviewed by Simon Hausmann.
     1919
     1920        [Qt] Inform the application when a new request is created
     1921        https://bugs.webkit.org/show_bug.cgi?id=29975
     1922
     1923        Add a signal to QWebPage, to inform the application when a request is created.
     1924
     1925        * Api/qwebpage.cpp:
     1926        * Api/qwebpage.h:
     1927        * tests/qwebpage/tst_qwebpage.cpp:
     1928        (tst_QWebPage::loadFinished):
     1929
     19302009-10-05  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1931
     1932        Reviewed by Simon Hausmann.
     1933
     1934        ErrorPageExtension: Add a pointer to the QWebFrame that had
     1935        an error.
     1936
     1937        * Api/qwebpage.h:
     1938        * WebCoreSupport/FrameLoaderClientQt.cpp:
     1939        (WebCore::FrameLoaderClientQt::callErrorPageExtension):
     1940
     19412009-10-05  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     1942
     1943        Reviewed by Tor Arne VestbÞ.
     1944
     1945        Do not empty the offline web appcache when clearing
     1946        memory caches. That one is not in memory, but stored
     1947        in sqlite.
     1948
     1949        * Api/qwebsettings.cpp:
     1950        (QWebSettings::clearMemoryCaches):
     1951
     19522009-10-05  J-P Nurmi  <jpnurmi@gmail.com>
     1953
     1954        Reviewed by Simon Hausmann.
     1955
     1956        Added QGraphicsWidget-plugins support to FrameLoaderClientQt.
     1957
     1958        https://bugs.webkit.org/show_bug.cgi?id=29710
     1959
     1960        * Api/qgraphicswebview.cpp:
     1961        (QGraphicsWebViewPrivate::pluginParent):
     1962        * Api/qwebview.cpp:
     1963        (QWebViewPrivate::pluginParent):
     1964        * WebCoreSupport/FrameLoaderClientQt.cpp:
     1965        (WebCore::):
     1966        (WebCore::FrameLoaderClientQt::createPlugin):
     1967
     19682009-10-03  Adam Barth  <abarth@webkit.org>
     1969
     1970        Unreview build fix.  I wish I had a try server...
     1971
     1972        * Api/qwebpage.cpp:
     1973        (QWebPagePrivate::updateAction):
     1974
     19752009-10-02  Norbert Leser  <norbert.leser@nokia.com>
     1976
     1977        Reviewed by Simon Hausmann.
     1978
     1979        Conditionally guard cursor code (cursor and updateCursor functions) with !QT_NO_CURSOR.
     1980        Otherwise, it is inconsistent with class declaration of QCursor.
     1981
     1982        * Api/qgraphicswebview.cpp:
     1983        * Api/qwebview.cpp:
     1984
     19852009-10-02  Prasanth Ullattil  <prasanth.ullattil@nokia.com>
     1986
     1987        Reviewed by Simon Hausmann.
     1988
     1989        Fix compiler warnings about unused function arguments.
     1990
     1991        * Api/qwebframe.cpp:
     1992        (QWebFrame::scrollBarMinimum):
     1993        * Api/qwebpage.cpp:
     1994        (QWebPagePrivate::focusInEvent):
     1995        (QWebPagePrivate::focusOutEvent):
     1996        (QWebPagePrivate::leaveEvent):
     1997        (QWebPage::javaScriptAlert):
     1998        (QWebPage::javaScriptConfirm):
     1999        (QWebPage::javaScriptPrompt):
     2000        (QWebPage::triggerAction):
     2001        (QWebPage::acceptNavigationRequest):
     2002        (QWebPage::chooseFile):
     2003        * WebCoreSupport/ChromeClientQt.cpp:
     2004        (WebCore::ChromeClientQt::repaint):
     2005        (WebCore::ChromeClientQt::mouseDidMoveOverElement):
     2006        (WebCore::ChromeClientQt::reachedMaxAppCacheSize):
     2007        * WebCoreSupport/ContextMenuClientQt.cpp:
     2008        (WebCore::ContextMenuClientQt::downloadURL):
     2009        * WebCoreSupport/FrameLoaderClientQt.cpp:
     2010        (WebCore::FrameLoaderClientQt::dispatchWillPerformClientRedirect):
     2011        (WebCore::FrameLoaderClientQt::setMainFrameDocumentReady):
     2012        (WebCore::FrameLoaderClientQt::representationExistsForURLScheme):
     2013        (WebCore::FrameLoaderClientQt::generatedMIMETypeForURLScheme):
     2014        (WebCore::FrameLoaderClientQt::shouldGoToHistoryItem):
     2015        (WebCore::FrameLoaderClientQt::pluginWillHandleLoadError):
     2016        (WebCore::FrameLoaderClientQt::assignIdentifierToInitialRequest):
     2017        (WebCore::FrameLoaderClientQt::dispatchDidFinishLoading):
     2018        (WebCore::FrameLoaderClientQt::createJavaAppletWidget):
     2019        * WebCoreSupport/InspectorClientQt.cpp:
     2020        (WebCore::InspectorClientQt::setAttachedWindowHeight):
     2021        (WebCore::InspectorClientQt::highlight):
     2022        (WebCore::InspectorClientQt::removeSetting):
     2023
     20242009-10-01  Simon Hausmann  <simon.hausmann@nokia.com>
     2025
     2026        Reviewed by Tor Arne VestbÞ.
     2027
     2028        Make Software Input Panel requests work with QGraphicsWebView
     2029        _and_ QWebView by sharing the event code in handleSoftwareInputPanel().
     2030
     2031        * Api/qwebpage.cpp:
     2032        (QWebPagePrivate::mouseReleaseEvent):
     2033        (QWebPagePrivate::handleSoftwareInputPanel):
     2034        * Api/qwebpage_p.h:
     2035
     20362009-10-01  Alexis Menard  <alexis.menard@nokia.com>
     2037
     2038        Reviewed by Tor Arne VestbÞ.
     2039
     2040        Rename QWebGraphicsItem to QGraphicsWebView
     2041
     2042        * Api/headers.pri:
     2043        * Api/qwebpage.h:
     2044        * Api/qwebgraphicsitem.cpp: Renamed.
     2045        * Api/qwebgraphicsitem.h: Renamed.
     2046        * WebKit/qt/QGVLauncher/main.cpp:
     2047        * tests/tests.pro:
     2048        * tests/qwebgraphicsitem/qwebgraphicsitem.pro: Renamed.
     2049        * tests/qwebgraphicsitem/tst_qwebgraphicsitem.cpp: Renamed.
     2050
     20512009-10-01  Antonio Gomes   <tonikitoo@webkit.org>
     2052
     2053        Reviewed by Simon Hausmann.
     2054
     2055        https://bugs.webkit.org/show_bug.cgi?id=29248
     2056        [Qt] [API] Make it possible to have 'invisible' loads
     2057
     2058        Make QWebFrame's setHtml and setContent methods to not change
     2059        session and global history at all.
     2060
     2061        * Api/qwebframe.cpp:
     2062        (QWebFrame::setHtml):
     2063        (QWebFrame::setContent):
     2064        * tests/qwebframe/qwebframe.pro:
     2065        * tests/qwebframe/tst_qwebframe.cpp:
     2066
     20672009-10-01  Kristian Amlie  <kristian.amlie@nokia.com>
     2068
     2069        Reviewed by Simon Hausmann.
     2070
     2071        Fixed software input panel support on web input elements.
     2072
     2073        Send the RequestSoftwareInputPanel event if the element supports focus
     2074        and the element is clicked.
     2075
     2076        * Api/qwebpage.cpp:
     2077        (QWebPagePrivate::QWebPagePrivate):
     2078        (QWebPagePrivate::mousePressEvent):
     2079        (QWebPagePrivate::mouseReleaseEvent):
     2080        * Api/qwebpage_p.h:
     2081
     20822009-10-01  Joe Ligman  <joseph.ligman@nokia.com>
     2083
     2084        Reviewed by Simon Hausmann.
     2085
     2086        Implementation for QWebPage::inputMethodQuery and QWebPagePrivate::inputMethodEvent
     2087
     2088        https://bugs.webkit.org/show_bug.cgi?id=29681
     2089
     2090        Some additional changes from Kristian Amlie <kristian.amlie@nokia.com>:
     2091
     2092            * Fixed surrounding text to exclude preedit string
     2093            * Avoid emission of microFocusChanged during setComposition()
    102094
    112095        * Api/qwebpage.cpp:
    122096        (QWebPagePrivate::inputMethodEvent):
    13 
    14 2009-03-30  Simon Hausmann  <simon.hausmann@nokia.com>
    15 
    16         Rubber-stamped by Tor Arne VestbÞ.
    17 
    18         Document that setHtml/setContent loads only the html/data immediately, not external objects.
    19 
    20         * Api/qwebframe.cpp:
     2097        (QWebPage::inputMethodQuery):
     2098        * WebCoreSupport/EditorClientQt.cpp:
     2099        (WebCore::EditorClientQt::respondToChangedSelection):
     2100        * tests/qwebpage/tst_qwebpage.cpp:
     2101        (tst_QWebPage::inputMethods):
     2102
     21032009-09-30  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2104
     2105        Reviewed by David Hyatt.
     2106
     2107        Add the failed URL to the ErrorPageExtension, as it is quite
     2108        useful for creating error pages.
     2109
     2110        * Api/qwebpage.h:
     2111        * WebCoreSupport/FrameLoaderClientQt.cpp:
     2112        (WebCore::FrameLoaderClientQt::callErrorPageExtension):
     2113
     21142009-09-29  Andras Becsi  <becsi.andras@stud.u-szeged.hu>
     2115
     2116        Reviewed by Tor Arne VestbÞ.
     2117
     2118        [Qt] Default font size reconciliation to 16px/13px to match other platform's de-facto standard.
     2119        This fixes https://bugs.webkit.org/show_bug.cgi?id=19674.
     2120
     2121        * Api/qwebsettings.cpp:
     2122        (QWebSettings::QWebSettings):
     2123
     21242009-09-29  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
     2125
     2126        Reviewed by Simon Hausmann.
     2127
     2128        https://bugs.webkit.org/show_bug.cgi?id=29844
     2129
     2130        QWebPage dependency autotest fix.
     2131
     2132        Fix for database() autotest. All opened databases should be removed at
     2133        end of test.
     2134
     2135        * tests/qwebpage/tst_qwebpage.cpp:
     2136        (tst_QWebPage::database):
     2137
     21382009-09-29  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
     2139
     2140        Reviewed by Simon Hausmann.
     2141
     2142        Some QWebHistory and QWebPage autotest crash fixes.
     2143
     2144        Some checking for m_mainFrame were added. MainFrame should be created
     2145        at some point of QWebPage live cicle.
     2146
     2147        https://bugs.webkit.org/show_bug.cgi?id=29803
     2148
     2149        * Api/qwebpage.cpp:
     2150        (QWebPage::~QWebPage):
     2151        (QWebPage::currentFrame):
     2152        (QWebPage::history):
     2153        (QWebPage::selectedText):
     2154        (QWebPage::updatePositionDependentActions):
     2155        * tests/qwebpage/tst_qwebpage.cpp:
     2156        (tst_QWebPage::crashTests_LazyInitializationOfMainFrame):
     2157
     21582009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2159
     2160        Reviewed by Simon Hausmann and Tor Arne VestbÞ.
     2161
     2162        Implement QWebPage Extension for error pages, incl.
     2163        an example on how to use it in QtLauncher.
     2164
     2165        Correct our use of ResourceError.
     2166
     2167        * Api/qwebpage.h:
     2168        (ExtensionOption::):
     2169        (ExtensionOption::ErrorPageExtensionReturn::ErrorPageExtensionReturn):
     2170        * QtLauncher/main.cpp:
     2171        (WebPage::supportsExtension):
     2172        (MainWindow::MainWindow):
     2173        (MainWindow::selectElements):
     2174        (WebPage::extension):
     2175        * WebCoreSupport/FrameLoaderClientQt.cpp:
     2176        (WebCore::FrameLoaderClientQt::cancelledError):
     2177        (WebCore::FrameLoaderClientQt::blockedError):
     2178        (WebCore::FrameLoaderClientQt::cannotShowURLError):
     2179        (WebCore::FrameLoaderClientQt::interruptForPolicyChangeError):
     2180        (WebCore::FrameLoaderClientQt::cannotShowMIMETypeError):
     2181        (WebCore::FrameLoaderClientQt::fileDoesNotExistError):
     2182        (WebCore::FrameLoaderClientQt::callErrorPageExtension):
     2183        (WebCore::FrameLoaderClientQt::dispatchDidFailProvisionalLoad):
     2184        (WebCore::FrameLoaderClientQt::dispatchDidFailLoad):
     2185        * WebCoreSupport/FrameLoaderClientQt.h:
     2186
     21872009-09-28  Andre Poenitz  <andre.poenitz@trolltech.com>
     2188
     2189        Reviewed by Simon Hausmann.
     2190
     2191        Compile fix with namespaced Qt.
     2192
     2193        * Api/qwebinspector_p.h:
     2194
     21952009-09-27  Joe Ligman  <joseph.ligman@mindspring.com>
     2196
     2197        Reviewed by Simon Hausmann.
     2198
     2199        [Qt] Adding API setFocus and hasFocus to QWebElement. This API is needed for
     2200        clients that want to check/set the focus node of the document.
     2201        https://bugs.webkit.org/show_bug.cgi?id=29682
     2202
     2203        * Api/qwebelement.cpp:
     2204        (QWebElement::hasFocus):
     2205        (QWebElement::setFocus):
     2206        * Api/qwebelement.h:
     2207        * tests/qwebelement/tst_qwebelement.cpp:
     2208        (tst_QWebElement::hasSetFocus):
     2209
     22102009-09-25  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
     2211
     2212        Reviewed by Simon Hausmann.
     2213
     2214        [Qt] Make tst_qwebframe work if Qt built without SSL support
     2215        https://bugs.webkit.org/show_bug.cgi?id=29735
     2216
     2217        * tests/qwebframe/tst_qwebframe.cpp: Missing #ifndef blocks added.
     2218
     22192009-09-24  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     2220
     2221        Reviewed by Simon Hausmann.
     2222
     2223        [Qt] Update QWebElement API to remove script related methods.
     2224        QWebElement::evaluateScript is the only one kept, these are
     2225        removed to postpone most of the QtWebKit<->JavaScript API design
     2226        after 4.6.
     2227        https://bugs.webkit.org/show_bug.cgi?id=29708
     2228
     2229        * Api/qwebelement.cpp:
     2230        * Api/qwebelement.h:
     2231        Methods removed:
     2232        - QWebElement::callFunction
     2233        - QWebElement::functions
     2234        - QWebElement::scriptableProperty
     2235        - QWebElement::setScriptableProperty
     2236        - QWebElement::scriptableProperties
     2237        * tests/qwebelement/tst_qwebelement.cpp:
     2238        (tst_QWebElement::evaluateScript):
     2239
     22402009-09-25  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     2241
     2242        Reviewed by Simon Hausmann.
     2243
     2244        [Qt] Rename QWebElement::evaluateScript
     2245        to QWebElement::evaluateJavaScript.
     2246        https://bugs.webkit.org/show_bug.cgi?id=29709
     2247
     2248        * Api/qwebelement.cpp:
     2249        (QWebElement::evaluateJavaScript):
     2250        * Api/qwebelement.h:
     2251        * tests/qwebelement/tst_qwebelement.cpp:
     2252        (tst_QWebElement::evaluateJavaScript):
     2253
     22542009-09-25  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     2255
     2256        Reviewed by Simon Hausmann.
     2257
     2258        [Qt] Update the stypeProperty API of QWebElement.
     2259        https://bugs.webkit.org/show_bug.cgi?id=29711
     2260
     2261        * Api/qwebelement.cpp:
     2262        (QWebElement::styleProperty):
     2263        - Merge the stypeProperty and the computedStyleProperty methods
     2264        - Remove the default value for the style resolving enum
     2265        - Rename ResolveRule to StyleResolveStrategy
     2266        (QWebElement::setStyleProperty):
     2267        - Remove the priority argument since it is possible to control the
     2268          behaviour by adding !important or removing in the value.
     2269        * Api/qwebelement.h:
     2270        * tests/qwebelement/tst_qwebelement.cpp:
     2271        (tst_QWebElement::style):
     2272        (tst_QWebElement::computedStyle):
     2273        * tests/qwebframe/tst_qwebframe.cpp:
     2274
     22752009-09-24  Jon Honeycutt  <jhoneycutt@apple.com>
     2276
     2277        Reviewed by Alice Liu.
     2278
     2279        * Api/qwebpage.cpp:
     2280        (QWebPagePrivate::QWebPagePrivate):
     2281        Pass 0 for new Page constructor argument.
     2282
     22832009-09-24  Martin Smith  <msmith@trolltech.com>
     2284
     2285        Reviewed by Simon Hausmann.
     2286
     2287        qdoc: Added \brief texts to all the since 4.6 functions.
     2288
     2289        * Api/qwebhistory.cpp:
     2290
     22912009-09-23  J-P Nurmi  <jpnurmi@gmail.com>
     2292
     2293        Reviewed by Simon Hausmann.
     2294
     2295        Prevent QWebPage::setView() from changing the viewport size on the fly
     2296        in case the view doesn't actually change. QWebPage::setView() is
     2297        called upon every QWebGraphicsItem::hoverMoveEvent(), which forced
     2298        the viewport size to be equal to the size of the whole graphics view.
     2299
     2300        https://bugs.webkit.org/show_bug.cgi?id=29676
     2301
     2302        * Api/qwebpage.cpp:
     2303        (QWebPage::setView):
     2304
     23052009-09-23  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
     2306
     2307        Reviewed by Simon Hausmann.
     2308
     2309        [Qt] Crash fix in QWebHistory back and forward methods.
     2310       
     2311        QWebHistory::back() and QWebHistory::forward() were crashing on
     2312        ASSERT in WebCore::BackForwardList. The methods should check
     2313        canGoBack() and canGoForward() at the beginning.
     2314
     2315        https://bugs.webkit.org/show_bug.cgi?id=29675
     2316
     2317        * Api/qwebhistory.cpp:
     2318        (QWebHistory::back):
     2319        (QWebHistory::forward):
     2320
     23212009-09-23  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
     2322
     2323        Reviewed by Simon Hausmann.
     2324
     2325        [Qt] Bug fix. QWebHistory should call QWebPage::updateNavigationActions
     2326       
     2327        In QWebHistory's methods that change item count or current item call
     2328        to QWebPage::updateNavigationActions should be executed.
     2329        QWebHistory::clear() and QWebHistory::restorState() were changed.
     2330        New helper method, QWebPagePrivate accesor, were created in
     2331        QWebHistoryPrivate class.
     2332        Two autotest were developed.
     2333
     2334        https://bugs.webkit.org/show_bug.cgi?id=29246
     2335
     2336        * Api/qwebhistory.cpp:
     2337        (QWebHistory::clear):
     2338        (QWebHistory::restoreState):
     2339        (QWebHistoryPrivate::page):
     2340        * Api/qwebhistory_p.h:
     2341        * tests/qwebhistory/tst_qwebhistory.cpp:
     2342        (tst_QWebHistory::saveAndRestore_1):
     2343        (tst_QWebHistory::clear):
     2344
     23452009-09-23  Norbert Leser  <norbert.leser@nokia.com>
     2346
     2347        Reviewed by Tor Arne VestbÞ.
     2348
     2349        Need to guard QX11Info include with Q_WS_X11.
     2350        That class may not be available (in QT 4.5 for Symbian, for instance).
     2351        Completes fixes in r48627 and r48604.
     2352
     2353        * Api/qwebgraphicsitem.cpp:
    212354        * Api/qwebview.cpp:
    222355
    23 2009-03-26  Simon Hausmann  <simon.hausmann@nokia.com>
    24 
    25         Rubber-stamped by Tor Arne VestbÞ.
    26 
    27         Fix the documentation of the QLocale usage in userAgentForUrl.
    28 
    29         * Api/qwebpage.cpp:
    30 
    31 2009-03-20  Erik L. Bunce  <elbunce@xendom.com>
    32 
    33         Reviewed by Simon Hausmann.
    34 
    35         Fix for InsertParagraphSeparator and InsertLineSeparator so that
    36         QWebPage::action() creates QActions for them. Also make sure they get
    37         updated appropriately.
    38 
    39         * Api/qwebpage.cpp:
    40         (QWebPagePrivate::updateEditorActions):
    41         (QWebPage::action):
     23562009-09-22  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     2357
     2358        Reviewed by Simon Hausmann.
     2359
     2360        [Qt] Add default timeout while waiting for signals in QWebPage auto
     2361        tests.
     2362        https://bugs.webkit.org/show_bug.cgi?id=29637
     2363
    422364        * tests/qwebpage/tst_qwebpage.cpp:
    43         (tst_QWebPage::textEditing):
    44 
    45 2009-03-20  Erik L. Bunce  <elbunce@xendom.com>
     2365        (waitForSignal):
     2366
     23672009-09-22  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     2368
     2369        Reivewed by Simon Hausmann.
     2370
     2371        Fix the Qt/Mac build after r48604 (Implement new QWebPageClient class)
     2372
     2373        There's no QWidget::x11Info() on Mac, and setPlatformPluginWidget()
     2374        takes a QWidget*, not a QWebPageClient*
     2375
     2376        * Api/qwebgraphicsitem.cpp:
     2377        (QWebGraphicsItemPrivate::screenNumber):
     2378        * Api/qwebview.cpp:
     2379        (QWebViewPrivate::screenNumber):
     2380
     23812009-09-21  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2382
     2383        Reviewed by Simon Hausmann.
     2384
     2385        For Qt, platformPageClient() will now return a class derived from
     2386        the QWebPageClient, so the patch adapts our Qt hooks to go though
     2387        this class and not depend on the QWebView.
     2388
     2389        * Api/qwebgraphicsitem.cpp:
     2390        (QWebGraphicsItemPrivate::scroll):
     2391        (QWebGraphicsItemPrivate::update):
     2392        (QWebGraphicsItemPrivate::cursor):
     2393        (QWebGraphicsItemPrivate::updateCursor):
     2394        (QWebGraphicsItemPrivate::screenNumber):
     2395        (QWebGraphicsItemPrivate::winId):
     2396        (QWebGraphicsItem::event):
     2397        (QWebGraphicsItem::setPage):
     2398        * Api/qwebgraphicsitem.h:
     2399        * Api/qwebpage.cpp:
     2400        (QWebPagePrivate::QWebPagePrivate):
     2401        * Api/qwebpage_p.h:
     2402        * Api/qwebview.cpp:
     2403        (QWebViewPrivate::scroll):
     2404        (QWebViewPrivate::update):
     2405        (QWebViewPrivate::cursor):
     2406        (QWebViewPrivate::updateCursor):
     2407        (QWebViewPrivate::screenNumber):
     2408        (QWebViewPrivate::winId):
     2409        (QWebView::setPage):
     2410        (QWebView::event):
     2411        * WebCoreSupport/ChromeClientQt.cpp:
     2412        (WebCore::ChromeClientQt::repaint):
     2413        (WebCore::ChromeClientQt::scroll):
     2414        (WebCore::ChromeClientQt::platformPageClient):
     2415
     24162009-09-21  Yael Aharon  <yael.aharon@nokia.com>
     2417
     2418        Reviewed by Simon Hausmann.
     2419
     2420        https://bugs.webkit.org/show_bug.cgi?id=29609
     2421        Build fix for windows when using Qt 4.5.0.
     2422
     2423        * Api/qwebpage.cpp:
     2424        (QWebPage::userAgentForUrl):
     2425
     24262009-09-19  Benjamin Poulain  <benjamin.poulain@nokia.com>
     2427
     2428        Reviewed by Simon Hausmann.
     2429
     2430        https://bugs.webkit.org/show_bug.cgi?id=29345
     2431        The tests of QWebFrame did not use QTRY_VERIFY for
     2432        tests involving the event loop.
     2433
     2434        * tests/qwebframe/tst_qwebframe.cpp:
     2435        * tests/util.h: Added. Copy of tests/shared/util.h of Qt
     2436
     24372009-09-19  Jakub Wieczorek  <faw217@gmail.com>
     2438
     2439        Reviewed by Simon Hausmann.
     2440
     2441        [Qt] Add an autotest stub for QWebGraphicsItem.
     2442
     2443        It just calls all the functions and makes sure they don't crash.
     2444
     2445        * tests/qwebgraphicsitem/qwebgraphicsitem.pro: Added.
     2446        * tests/qwebgraphicsitem/tst_qwebgraphicsitem.cpp: Added.
     2447        (tst_QWebGraphicsItem::qwebgraphicsitem):
     2448        * tests/tests.pro:
     2449
     24502009-09-18  Norbert Leser  <norbert.leser@nokia.com>
     2451
     2452        Reviewed by Eric Seidel.
     2453
     2454        Corrected the Symbian specific UID3 values to be assigned
     2455        from the "unprotected" pool that permits self-signing of
     2456        those test and demo executables. (Added new UID3 values
     2457        where they were missing for new components.)
     2458
     2459        * QGVLauncher/QGVLauncher.pro:
     2460        * QtLauncher/QtLauncher.pro:
     2461        * tests/benchmarks/loading/tst_loading.pro:
     2462        * tests/benchmarks/painting/tst_painting.pro:
     2463        * tests/qwebelement/qwebelement.pro:
     2464        * tests/qwebframe/qwebframe.pro:
     2465        * tests/qwebhistory/qwebhistory.pro:
     2466        * tests/qwebhistoryinterface/qwebhistoryinterface.pro:
     2467        * tests/qwebpage/qwebpage.pro:
     2468        * tests/qwebplugindatabase/qwebplugindatabase.pro:
     2469        * tests/qwebview/qwebview.pro:
     2470
     24712009-09-17  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2472
     2473        Reviewed by Simon Hausmann.
     2474
     2475        Make PlatformWindow return something else than PlatformWidget
     2476        https://bugs.webkit.org/show_bug.cgi?id=29085
     2477
     2478        Reflect the rename of platformWindow and it's return type.
     2479
     2480        * WebCoreSupport/ChromeClientQt.cpp:
     2481        (WebCore::ChromeClientQt::platformPageClient):
     2482        * WebCoreSupport/ChromeClientQt.h:
     2483
     24842009-09-18  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     2485
     2486        Reviewed by Simon Hausmann.
     2487
     2488        [Qt] Add persistence support for configuration options in the
     2489        inspector.
     2490
     2491        * Api/qwebinspector.cpp:
     2492        * QtLauncher/main.cpp:
     2493        (main):
     2494        * WebCoreSupport/InspectorClientQt.cpp:
     2495        (WebCore::InspectorClientQt::populateSetting):
     2496        (WebCore::InspectorClientQt::storeSetting):
     2497        (WebCore::variantToSetting):
     2498        (WebCore::settingToVariant):
     2499
     25002009-09-18  Simon Hausmann  <simon.hausmann@nokia.com>
     2501
     2502        Reviewed by Ariya Hidayat.
     2503
     2504        Fixed a bunch of documentation warnings.
     2505
     2506        * Api/qwebgraphicsitem.cpp:
     2507        * Api/qwebplugindatabase.cpp:
     2508        * Api/qwebpluginfactory.cpp:
     2509        * Api/qwebsecurityorigin.cpp:
     2510
     25112009-09-18  Warwick Allison  <warwick.allison@nokia.com>
     2512
     2513        Reviewed by Simon Hausmann.
     2514
     2515        Added a test that console output works.
     2516
     2517        * tests/qwebpage/tst_qwebpage.cpp:
     2518        (ConsolePage::ConsolePage):
     2519        (ConsolePage::javaScriptConsoleMessage):
     2520        (tst_QWebPage::consoleOutput):
     2521
     25222009-09-17  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2523
     2524        Reviewed by Simon Hausmann.
     2525
     2526        Improve documentation for Page Cache.
     2527
     2528        * Api/qwebsettings.cpp:
     2529
     25302009-09-17  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     2531
     2532        Reviewed by Simon Hausmann.
     2533
     2534        [Qt] Update QWebSettings::setUserStyleSheetUrl() docs and test
     2535
     2536        https://bugs.webkit.org/show_bug.cgi?id=29081
     2537
     2538        The documentation now specifies that the URL has to be a local file
     2539        or a a data-URL (with utf-8 and base64-encoded data), as these are the
     2540        only two schemes that the current code path accepts.
     2541
     2542        The auto-test has been updated to reflect this limitation.
     2543
     2544        At a later point we should concider adding API for the new way of
     2545        doing both user defined stylesheets and scripts.
     2546
     2547        * Api/qwebsettings.cpp:
     2548        * tests/qwebpage/tst_qwebpage.cpp:
     2549
     25502009-09-17  Janne Koskinen  <janne.p.koskinen@digia.com>
     2551
     2552        Reviewed by Simon Hausmann.
     2553
     2554        Symbian build fix.
     2555
     2556        Moved the #ifdefs around _q_cleanupLeakMessages() into the function
     2557        definition.
     2558
     2559        QMake is not being able to distinguish between release and debug builds
     2560        in Symbian build. This is a Symbian toolchain issue.
     2561
     2562        * Api/qwebpage.cpp:
     2563        (QWebPagePrivate::_q_cleanupLeakMessages):
     2564        * Api/qwebpage.h:
     2565        * Api/qwebpage_p.h:
     2566
     25672009-09-17  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     2568
     2569        Reviewed by Simon Hausmann.
     2570
     2571        Small cosmetic documentation fixlet in the QWebInspector.
     2572
     2573        * Api/qwebinspector.cpp:
     2574
     25752009-09-16  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
     2576
     2577        Reviewed by Eric Seidel.
     2578
     2579        Detect and add Windows7 properly to the user agent.
     2580
     2581        * Api/qwebpage.cpp:
     2582        (QWebPage::userAgentForUrl):
     2583
     25842009-09-16  Andras Becsi  <andrewbecsi@yahoo.co.uk>
     2585
     2586        Rubberstamped by Kenneth Christiansen.
     2587
     2588        [Qt] Build fix for previous changes.
     2589
     2590        * QGVLauncher/main.cpp:
     2591        (MainView::flip):
     2592
     25932009-09-16  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2594
     2595        Unreviewed potential Qt < 4.6 build fix.
     2596
     2597        * QGVLauncher/main.cpp:
     2598        (MainView::flip):
     2599
     26002009-09-16  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2601
     2602        Reviewed by Simon Hausmann.
     2603
     2604        Add a "Flip effect" to our GraphicsView based launcher.
     2605
     2606        * QGVLauncher/main.cpp:
     2607        (MainView::resizeEvent):
     2608        (MainView::flip):
     2609        (MainWindow::flip):
     2610        (MainWindow::buildUI):
     2611
     26122009-09-16  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
     2613
     2614        Rubber-stamped by Simon Hausmann.
     2615
     2616        [Qt] Typo fix. Pass the window object to the Format
     2617        menu. In this way Qt can free its internal graphical
     2618        objects during exit.
     2619
     2620        * QtLauncher/main.cpp:
     2621        (MainWindow::setupUI):
     2622
     26232009-09-16  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
    462624
    472625        Reviewed by Tor Arne VestbÞ.
    482626
    49         Fix QWebPage::WebActions action states to more closely match when they are
    50         actually applicable and remove erroneous documentation.
    51 
    52         * Most WebActions implemented using editor commands now use the
    53           Editor::Command::isEnabled() to control their availability.
    54         * SelectAll is always enabled (since it's editor command is).
    55         * SetTextDirection{} family of WebActions are available when canEdit() is true
    56           and not just canEditRichly().
    57 
    58         Fix and clarify documentation about the availability of various web actions.
     2627        [Qt] Build break fix on gcc ARM.
     2628
     2629        * Api/qwebgraphicsitem.cpp:
     2630        (QWebGraphicsItemPrivate::_q_doLoadProgress):
     2631
     26322009-09-16  Warwick Allison  <warwick.allison@nokia.com>
     2633
     2634        Reviewed by Simon Hausmann.
     2635
     2636        Fix a crash in QWebFrame::hasFocus() with a simple null pointer check
     2637        when the focused frame is null. We do the same check in other places
     2638        where we call kit().
     2639
     2640        * Api/qwebframe.cpp:
     2641        (QWebFrame::hasFocus):
     2642
     26432009-09-16  Jure Repinc  <jlp@holodeck1.com>
     2644
     2645        Reviewed by Simon Hausmann.
     2646
     2647        Fixed a typo found during translation.
     2648
     2649        * WebCoreSupport/FrameLoaderClientQt.cpp:
     2650        (WebCore::FrameLoaderClientQt::interruptForPolicyChangeError):
     2651
     26522009-09-14  Jakub Wieczorek  <faw217@gmail.com>
     2653
     2654        Reviewed by Simon Hausmann.
     2655
     2656        [Qt] QWebGraphicsItem should check for null QWebPage.
     2657        https://bugs.webkit.org/show_bug.cgi?id=29185
     2658
     2659        Don't crash in QWebGraphicsItem when the page is still null, by
     2660        either checking if it's the case or constructing the default one.
     2661
     2662        * Api/qwebgraphicsitem.cpp:
     2663        (QWebGraphicsItem::icon):
     2664        (QWebGraphicsItem::setZoomFactor):
     2665        (QWebGraphicsItem::zoomFactor):
     2666        (QWebGraphicsItem::setGeometry):
     2667        (QWebGraphicsItem::load):
     2668        (QWebGraphicsItem::setHtml):
     2669        (QWebGraphicsItem::toHtml):
     2670        (QWebGraphicsItem::setContent):
     2671        (QWebGraphicsItem::history):
     2672        (QWebGraphicsItem::settings):
     2673
     26742009-09-11  David Boddie  <dboddie@trolltech.com>
     2675
     2676        Reviewed by Simon Hausmann.
     2677
     2678        Doc: Note that Netscape plugins are only available on desktop platforms.
     2679
     2680        * docs/qtwebkit.qdoc:
     2681
     26822009-09-11  Martin Smith  <msmith@trolltech.com>
     2683
     2684        Reviewed by Simon Hausmann.
     2685
     2686        Adjust the name of the contentspage for the documentation
     2687        to the new name used in Qt 4.6.
     2688
     2689        * docs/qtwebkit.qdoc:
     2690
     26912009-09-11  Ariya Hidayat  <ariya.hidayat@nokia.com>
     2692
     2693        Reviewed by Simon Hausmann.
     2694
     2695        Changed URLs from qtsoftware.com to qt.nokia.com, as part of a general
     2696        renaming.
     2697
     2698        * Api/qwebpluginfactory.cpp:
     2699        * docs/webkitsnippets/simple/main.cpp:
     2700        (main):
     2701        * docs/webkitsnippets/webpage/main.cpp:
     2702        (main):
     2703
     27042009-09-11  Volker Hilsheimer  <volker.hilsheimer@nokia.com>
     2705
     2706        Reviewed by Simon Hausmann.
     2707
     2708        Restructure the documentation, both on a file and on a content level.
     2709
     2710        * Api/qwebdatabase.cpp:
     2711        * Api/qwebelement.cpp:
     2712        * Api/qwebframe.cpp:
     2713        * Api/qwebhistory.cpp:
     2714        * Api/qwebhistoryinterface.cpp:
     2715        * Api/qwebpage.cpp:
     2716        * Api/qwebpluginfactory.cpp:
     2717        * Api/qwebsecurityorigin.cpp:
     2718        * Api/qwebsettings.cpp:
     2719        * Api/qwebview.cpp:
     2720        * docs/qtwebkit.qdoc:
     2721
     27222009-09-11  Yongjun Zhang  <yongjun.zhang@nokia.com>
     2723
     2724        Reviewed by Simon Hausmann.
     2725       
     2726        https://bugs.webkit.org/show_bug.cgi?id=29136
     2727        [Qt] emit microFocusChanged() signal when no QWidget-based view is present.
     2728
     2729        emit microFocusChange() signal regardless of view.
     2730
     2731        * WebCoreSupport/EditorClientQt.cpp:
     2732        (WebCore::EditorClientQt::setInputMethodState):
     2733
     27342009-09-11  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     2735
     2736        Reviewed by Simon Hausmann.
     2737
     2738        https://bugs.webkit.org/show_bug.cgi?id=28806
     2739
     2740        [Qt] Make the WebInspector available as a QWidget.
     2741
     2742        * Api/headers.pri:
     2743        * Api/qwebelement.cpp:
     2744        (QWebElement::enclosingElement):
     2745        * Api/qwebelement.h:
     2746        * Api/qwebinspector.cpp: Added.
     2747        * Api/qwebinspector.h: Added.
     2748        * Api/qwebinspector_p.h: Added.
     2749        * Api/qwebpage.cpp:
     2750        (QWebPagePrivate::QWebPagePrivate):
     2751        (QWebPagePrivate::setInspector):
     2752        (QWebPagePrivate::getOrCreateInspector):
     2753        (QWebPagePrivate::inspectorController):
     2754        (QWebPage::~QWebPage):
     2755        (QWebPage::triggerAction):
     2756        * Api/qwebpage.h:
     2757        * Api/qwebpage_p.h:
     2758        * Api/qwebsettings.cpp:
     2759        * QtLauncher/main.cpp:
     2760        (MainWindow::MainWindow):
     2761        * WebCoreSupport/InspectorClientQt.cpp:
     2762        (WebCore::InspectorClientWebPage::InspectorClientWebPage):
     2763        (WebCore::InspectorClientWebPage::createWindow):
     2764        (WebCore::InspectorClientQt::createPage):
     2765        (WebCore::InspectorClientQt::showWindow):
     2766        (WebCore::InspectorClientQt::closeWindow):
     2767        (WebCore::InspectorClientQt::attachWindow):
     2768        (WebCore::InspectorClientQt::detachWindow):
     2769        (WebCore::InspectorClientQt::updateWindowTitle):
     2770        * WebCoreSupport/InspectorClientQt.h:
     2771        * docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp: Added.
     2772
     27732009-09-10  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2774
     2775        Reviewed by Eric Seidel.
     2776
     2777        [Qt] Fix comparison between signed and unsigned integer warnings
     2778        https://bugs.webkit.org/show_bug.cgi?id=29162
     2779
     2780        No functional change.
     2781
     2782        * Api/qwebelement.cpp:
     2783        (QWebElement::findAll):
     2784        * Api/qwebhistory.cpp:
     2785        (QWebHistory::items):
     2786        (QWebHistory::backItems):
     2787        (QWebHistory::forwardItems):
     2788        (QWebHistory::saveState):
     2789        * Api/qwebplugindatabase.cpp:
     2790        (QWebPluginDatabase::setSearchPaths):
     2791        * WebCoreSupport/ChromeClientQt.cpp:
     2792        (WebCore::ChromeClientQt::runOpenPanel):
     2793        * WebCoreSupport/FrameLoaderClientQt.cpp:
     2794        (WebCore::FrameLoaderClientQt::createPlugin):
     2795
     27962009-09-10  Simon Hausmann  <hausmann@webkit.org>
     2797
     2798        Rubber-stamped by Ariya Hidayat.
     2799
     2800        Fix a bunch of qdoc warnings: Invalid references, non-standard
     2801        wording, etc.
     2802
     2803        * Api/qwebelement.cpp:
     2804        * Api/qwebgraphicsitem.cpp:
     2805        * Api/qwebsecurityorigin.cpp:
     2806
     28072009-09-10  Simon Hausmann  <hausmann@webkit.org>
     2808
     2809        Reviewed by Ariya Hidayat.
     2810
     2811        Fix context menu event delivery with QWebGraphicsItem.
     2812
     2813        Re-implement the correct context menu virtual function using
     2814        a QGraphicsSceneContextMenuEvent and forward & handle it in
     2815        QWebPage.
     2816
     2817        * Api/qwebgraphicsitem.cpp:
     2818        (QWebGraphicsItem::contextMenuEvent):
     2819        * Api/qwebgraphicsitem.h:
     2820        * Api/qwebpage.cpp:
     2821        (QWebPagePrivate::contextMenuEvent):
     2822        (QWebPage::event):
     2823        * Api/qwebpage_p.h:
     2824
     28252009-09-10  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2826
     2827        Unreviewed.
     2828
     2829        Build fix for QtWebKit for Mac after r48219.
     2830
     2831        qevent and qstyleoption are QtGui interfaces.
     2832
     2833        * Api/qwebgraphicsitem.cpp:
     2834        * Api/qwebgraphicsitem.h:
     2835
     28362009-09-09  Simon Hausmann  <hausmann@webkit.org>
     2837
     2838        Reviewed by Tor Arne VestbÞ.
     2839
     2840        Call the right base class function QGraphicsWidget::event() instead
     2841        of skipping it and using QObject::event() instead.
     2842
     2843        * Api/qwebgraphicsitem.cpp:
     2844        (QWebGraphicsItem::event):
     2845
     28462009-09-09  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2847
     2848        Unreviewed.
     2849
     2850        Fix comment at Tor Arne VestbÞ's request.
     2851
     2852        * Api/qwebgraphicsitem.cpp:
     2853        (QWebGraphicsItem::sceneEvent):
     2854        (QWebGraphicsItem::event):
     2855
     28562009-09-09  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2857
     2858        Reviewed by Tor Arne VestbÞ.
     2859
     2860        Implement some virtual event methods so that we can fix
     2861        event-related bugs in Qt patch releases.
     2862
     2863        * Api/qwebgraphicsitem.cpp:
     2864        (QWebGraphicsItem::sceneEvent):
     2865        (QWebGraphicsItem::event):
     2866        * Api/qwebgraphicsitem.h:
     2867
     28682009-09-09  Kenneth Rohde Christiansen  <kenneth@webkit.org>, Antonio Gomes  <antonio.gomes@openbossa.org>
     2869
     2870        Reviewed by Simon Hausmann.
     2871
     2872        Add a new QGraphicsWidget based version of the "QWebView"
     2873        under the name "QWebGraphicsItem".
     2874
     2875        https://bugs.webkit.org/show_bug.cgi?id=28862
     2876
     2877        Includes an alternative Qt launcher using the QGraphicsView.
     2878
     2879        * Api/headers.pri:
     2880        * Api/qwebgraphicsitem.cpp: Added.
     2881        * Api/qwebgraphicsitem.h: Added.
     2882        * Api/qwebpage.h:
     2883        * QGVLauncher/QGVLauncher.pro: Copied from WebKit/qt/QtLauncher/QtLauncher.pro.
     2884        * QGVLauncher/main.cpp: Added.
     2885        * WebCoreSupport/ChromeClientQt.cpp:
     2886        (WebCore::ChromeClientQt::repaint):
     2887        (WebCore::ChromeClientQt::scroll):
     2888
     28892009-09-08  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2890
     2891        Unreviewed build fix.
     2892
     2893        Potential build fix for Qt 4.5
     2894
     2895        * Api/qwebpage.cpp:
     2896        (QWebPagePrivate::mousePressEvent):
     2897
     28982009-09-08  Benjamin Poulain  <benjamin.poulain@nokia.com>
     2899
     2900        Reviewed by Simon Hausmann.
     2901
     2902        https://bugs.webkit.org/show_bug.cgi?id=29007
     2903        Add a test for the signal QWebFrame::javaScriptWindowObjectCleared()
     2904
     2905        * tests/qwebframe/tst_qwebframe.cpp:
     2906
     29072009-09-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2908
     2909        Reviewed by Simon Hausmann.
     2910
     2911        [Qt] Fix unused variable warnings
     2912        https://bugs.webkit.org/show_bug.cgi?id=29018
     2913
     2914        * Api/qwebpage.cpp:
     2915        (QWebPagePrivate::keyPressEvent):
     2916        * WebCoreSupport/FrameLoaderClientQt.cpp:
     2917        (WebCore::FrameLoaderClientQt::startDownload):
     2918        (WebCore::FrameLoaderClientQt::createFrame):
     2919
     29202009-09-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2921
     2922        Reviewed by Ariya Hidayat.
     2923
     2924        [Qt] Use the declaration order in initializer lists
     2925        https://bugs.webkit.org/show_bug.cgi?id=29017
     2926
     2927        * Api/qwebframe_p.h:
     2928
     29292009-09-08  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2930
     2931        Reviewed by Simon Hausmann.
     2932
     2933        Add support for handling QGraphicsScene events.
     2934
     2935        * Api/qwebpage.cpp:
     2936        (QWebPagePrivate::mouseMoveEvent):
     2937        (QWebPagePrivate::mousePressEvent):
     2938        (QWebPagePrivate::mouseDoubleClickEvent):
     2939        (QWebPagePrivate::mouseTripleClickEvent):
     2940        (QWebPagePrivate::handleClipboard):
     2941        (QWebPagePrivate::mouseReleaseEvent):
     2942        (QWebPagePrivate::wheelEvent):
     2943        (QWebPagePrivate::dragEnterEvent):
     2944        (QWebPagePrivate::dragLeaveEvent):
     2945        (QWebPagePrivate::dragMoveEvent):
     2946        (QWebPagePrivate::dropEvent):
     2947        (QWebPage::event):
     2948        * Api/qwebpage_p.h:
     2949
     29502009-09-08  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2951
     2952        Reviewed by Simon Hausmann.
     2953
     2954        [Qt] Make cursor set cleaner in QtWebKit Api: eliminate SetCursorEvent hack.
     2955        https://bugs.webkit.org/show_bug.cgi?id=28865
     2956
     2957        Clean up the unserCursor hack to use the QCursor set
     2958        as a property of the QWidget by WebCore::WidgetQt.
     2959
     2960        Remove all code that are no longer necessary for getting
     2961        cursor change events.
     2962
     2963        Patch by Kenneth Rohde Christiansen <kenneth@webkit.org> and
     2964                 Antonio Gomes <antonio.gomes@openbossa.org> on 2009-09-07
     2965
     2966        * Api/qwebpage.cpp:
     2967        * Api/qwebpage_p.h:
     2968        * Api/qwebview.cpp:
     2969        (QWebViewPrivate::QWebViewPrivate):
     2970        (QWebView::event):
     2971
     29722009-09-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2973
     2974        Reviewed by Simon Hausmann.
     2975
     2976        [Qt] QtWebKit single API to enable persistency
     2977        https://bugs.webkit.org/show_bug.cgi?id=28682
     2978
     2979        Disable LocalStorage, ApplicationCache, HTML5 offline storage by
     2980        default.
     2981
     2982        If persistency is enabled the default directory for LocalStorage and
     2983        ApplicationCache is now based on QDesktopServices::DataLocation and not
     2984        QDesktopServices::CacheLocation (as it is expected to keep this data
     2985        around after a reboot).
     2986
     2987        If persistency is enabled initialize HTML5 offline storage as well - this
     2988        fixed offline Storage for QtLauncher.
     2989
     2990        * Api/qwebpage.cpp:
     2991        (QWebPagePrivate::QWebPagePrivate):
     2992        * Api/qwebsettings.cpp:
     2993        (QWebSettings::QWebSettings):
     2994        (QWebSettings::enablePersistentStorage):
     2995        * Api/qwebsettings.h: Add a new API called enablePersistentStorage
     2996        * QtLauncher/main.cpp: Use the new enablePersistentStorage API
     2997        (main):
     2998
     29992009-09-07  Jakub Wieczorek  <faw217@gmail.com>
     3000
     3001        Reviewed by Simon Hausmann.
     3002
     3003        Speed up the QWebPluginInfo::supportsMimeType() function.
     3004        https://bugs.webkit.org/show_bug.cgi?id=27651
     3005
     3006        Instead of going through the MIME types list constructed with
     3007        mimeTypes() function, look up the internal mimeToDescriptions map.
     3008
     3009        * Api/qwebplugindatabase.cpp:
     3010        (QWebPluginInfo::supportsMimeType):
     3011
     30122009-09-07  Jakub Wieczorek  <faw217@gmail.com>
     3013
     3014        Reviewed by Simon Hausmann.
     3015
     3016        Speed up the QWebPluginInfo::mimeTypes() function.
     3017        https://bugs.webkit.org/show_bug.cgi?id=27651
     3018
     3019        Instead of constructing a list of MIME types every time it is called,
     3020        do this only once.
     3021
     3022        * Api/qwebplugindatabase.cpp:
     3023        (QWebPluginInfo::mimeTypes):
     3024        (QWebPluginInfo::operator=):
     3025        * Api/qwebplugindatabase.h:
     3026        * tests/qwebplugindatabase/tst_qwebplugindatabase.cpp:
     3027        (tst_QWebPluginDatabase::operatorassign_data):
     3028        (tst_QWebPluginDatabase::operatorassign):
     3029
     30302009-09-07  Jakub Wieczorek  <faw217@gmail.com>
     3031
     3032        Reviewed by Simon Hausmann.
     3033
     3034        Remove the private classes from QWebPluginDatabase.
     3035        https://bugs.webkit.org/show_bug.cgi?id=27651
     3036
     3037        Instead, hold the PluginDatabase and PluginPackage objects as class
     3038        members and take care of refcounting on our own instead of using RefPtr.
     3039
     3040        This way we not only made the code cleaner but also got rid of
     3041        redundant allocations when constructing null QWebPluginInfo objects.
     3042
     3043        The private classes have been forward-declared and the d-pointers left
     3044        to be on the safe side.
     3045
     3046        * Api/qwebplugindatabase.cpp:
     3047        (QWebPluginInfo::QWebPluginInfo):
     3048        (QWebPluginInfo::~QWebPluginInfo):
     3049        (QWebPluginInfo::name):
     3050        (QWebPluginInfo::description):
     3051        (QWebPluginInfo::mimeTypes):
     3052        (QWebPluginInfo::path):
     3053        (QWebPluginInfo::isNull):
     3054        (QWebPluginInfo::setEnabled):
     3055        (QWebPluginInfo::isEnabled):
     3056        (QWebPluginInfo::operator==):
     3057        (QWebPluginInfo::operator!=):
     3058        (QWebPluginInfo::operator=):
     3059        (QWebPluginDatabase::QWebPluginDatabase):
     3060        (QWebPluginDatabase::~QWebPluginDatabase):
     3061        (QWebPluginDatabase::plugins):
     3062        (QWebPluginDatabase::searchPaths):
     3063        (QWebPluginDatabase::setSearchPaths):
     3064        (QWebPluginDatabase::addSearchPath):
     3065        (QWebPluginDatabase::refresh):
     3066        (QWebPluginDatabase::pluginForMimeType):
     3067        (QWebPluginDatabase::setPreferredPluginForMimeType):
     3068        * Api/qwebplugindatabase.h:
     3069        * Api/qwebplugindatabase_p.h: Removed.
     3070
     30712009-09-05  Jakub Wieczorek  <faw217@gmail.com>
     3072
     3073        Reviewed by Eric Seidel.
     3074
     3075        [Qt] r47424 broke binary compatibility
     3076        https://bugs.webkit.org/show_bug.cgi?id=28996
     3077
     3078        Append the new DnsPrefetchEnabled attribute at the end of the enum.
     3079
     3080        * Api/qwebsettings.h:
     3081
     30822009-09-04  Mark Mentovai  <mark@chromium.org>
     3083
     3084        Reviewed by Dave Hyatt.
     3085
     3086        https://bugs.webkit.org/show_bug.cgi?id=28614
     3087
     3088        Account for scrollbar state changes that occur during layout.
     3089
     3090        * Api/qwebframe.cpp:
     3091        (QWebFrame::setScrollBarPolicy):
     3092
     3093        Eliminate duplicated (and incorrect) scrollbar mode tracking between
     3094        FrameView and ScrollView.
     3095
     30962009-09-04  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     3097
     3098        Reviewed by Eric Seidel.
     3099
     3100        [Qt] Fix tst_QWebPage::database autotest failure
     3101        https://bugs.webkit.org/show_bug.cgi?id=28961
     3102
     3103        Make sure that the test case enables the feature before
     3104        the feature gets tested
     3105
     3106        * tests/qwebpage/tst_qwebpage.cpp:
     3107        (tst_QWebPage::database):
     3108
     31092009-09-04  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
     3110
     3111        Reviewed by Eric Seidel.
     3112       
     3113        Any QtWebKit application crashes on exit if the inspector is
     3114        used during the session rather then exiting.
     3115       
     3116        If a QWebView has a QWebPage that is destroyed the QWebView
     3117        does not update its pointer and will crash the next time
     3118        it access the page pointers (such as in its destructor).
     3119       
     3120        InspectorClientView should not call deleteLater when the page
     3121        is destroyed because it does not have a parent and is a top
     3122        level widget.  close() needs to be called so that QApplication
     3123        can exit the application if quitOnLastWindowClosed is set
     3124        and a InspectorClientView is the last window, otherwise
     3125        the application will never exit.
     3126       
     3127        * Api/qwebview.cpp:
     3128        (QWebViewPrivate::_q_pageDestroyed):
     3129        (QWebView::setPage):
     3130        * Api/qwebview.h:
     3131        * WebCoreSupport/InspectorClientQt.cpp:
     3132        (WebCore::InspectorClientView::InspectorClientView):
     3133
     31342009-09-03  Adam Barth  <abarth@webkit.org>
     3135
     3136        Reviewed by eric@webkit.org.
     3137
     3138        https://bugs.webkit.org/show_bug.cgi?id=24696
     3139
     3140        Stub implementations of mixed content methods of FrameLoaderClient.
     3141
     3142        * WebCoreSupport/FrameLoaderClientQt.cpp:
     3143        (WebCore::FrameLoaderClientQt::didDisplayInsecureContent):
     3144        (WebCore::FrameLoaderClientQt::didRunInsecureContent):
     3145        * WebCoreSupport/FrameLoaderClientQt.h:
     3146
     31472009-09-03  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     3148
     3149        Reviewed by Eric Seidel.
     3150
     3151        [Qt] Add a setting to turn SessionStorage on/off
     3152        https://bugs.webkit.org/show_bug.cgi?id=28836
     3153
     3154        * Api/qwebsettings.cpp:
     3155        (QWebSettingsPrivate::apply):
     3156        (QWebSettings::QWebSettings):
     3157        * Api/qwebsettings.h:
     3158        * tests/qwebpage/tst_qwebpage.cpp:
     3159        (testFlag):
     3160        (tst_QWebPage::testOptionalJSObjects):
     3161
     31622009-09-02  Richard Moore  <rich@kde.org>
     3163
     3164        Reviewed by Tor Arne VestbÞ.
     3165
     3166        [Qt] Make sure we relayout the page after evaluating JS
     3167
     3168        https://bugs.webkit.org/show_bug.cgi?id=28235
     3169
     3170        QtWebKit does not always seem to reflow the page when evaluating
     3171        javascript. This patch changes the way evaluateJavaScript works to
     3172        use the frameloader which ensures that this is done properly.
     3173
     3174        * Api/qwebframe.cpp:
     3175        (QWebFrame::evaluateJavaScript):
     3176        * tests/qwebframe/tst_qwebframe.cpp:
     3177
     31782009-08-28  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
     3179
     3180        Reviewed by Holger Freyther.
     3181
     3182        https://bugs.webkit.org/show_bug.cgi?id=25889
     3183        [GTK] scrollbar policy for main frame is not implementable
     3184
     3185        Add empty implementation for new ChromeClient method.
     3186
     3187        * WebCoreSupport/ChromeClientQt.h:
     3188        (WebCore::ChromeClientQt::scrollbarsModeDidChange):
     3189
     31902009-08-27  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
     3191
     3192        Reviewed by Ariya Hidayat.
     3193
     3194        QWebHistory::clear() modifications.
     3195
     3196        Clear() method was changed. If QWebHistory is empty (there is no
     3197        elements even current) clear() do nothing. If there at least one
     3198        element clear() will delete everything apart of current.
     3199
     3200        New autotests in QWebHistory
     3201
     3202        New autotests were added to QWebHistory. They should check some crashes
     3203        in save and restore state process and clear() method and general
     3204        behavior on where QWebHistory::count() == 0 or QWebHistory::count() == 1
     3205
     3206        Bugzilla: https://bugs.webkit.org/show_bug.cgi?id=28711
     3207
     3208        * Api/qwebhistory.cpp:
     3209        (QWebHistory::clear):
     3210        * tests/qwebhistory/tst_qwebhistory.cpp:
     3211        (tst_QWebHistory::back):
     3212        (tst_QWebHistory::forward):
     3213        (tst_QWebHistory::saveAndRestore_crash_1):
     3214        (tst_QWebHistory::saveAndRestore_crash_2):
     3215        (tst_QWebHistory::saveAndRestore_crash_3):
     3216        (tst_QWebHistory::clear):
     3217
     32182009-08-27  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
     3219
     3220        Reviewed by Ariya Hidayat.
     3221
     3222        [Qt] Cleanup, old and commented part of source code was removed.
     3223        Fix some formatting problems.
     3224
     3225        https://bugs.webkit.org/show_bug.cgi?id=28712
     3226
     3227        * Api/qwebhistory_p.h:
     3228        (QWebHistoryPrivate::QWebHistoryPrivate):
     3229
     32302009-08-26  Adam Barth  <abarth@webkit.org>
     3231
     3232        Reviewed by Oliver Hunt.
     3233
     3234        Don't let local files access web URLs
     3235        https://bugs.webkit.org/show_bug.cgi?id=28480
     3236
     3237        * Api/qwebsettings.cpp:
     3238        (QWebSettings::QWebSettings):
     3239
     32402009-08-25  Antonio Gomes   <antonio.gomes@openbossa.org>
     3241
     3242        Reviewed by Ariya Hidayat.
     3243
     3244        Bug 28708 - Make possible to better use ResourceError in FrameLoaderClientQt class.
     3245
     3246        * Api/qwebframe.cpp:
     3247        (QWebFrame::requestedUrl):
     3248        * WebCoreSupport/FrameLoaderClientQt.cpp:
     3249        (WebCore::FrameLoaderClientQt::FrameLoaderClientQt):
     3250        (WebCore::FrameLoaderClientQt::dispatchDidFinishLoad):
     3251        (WebCore::FrameLoaderClientQt::postProgressFinishedNotification):
     3252        (WebCore::FrameLoaderClientQt::dispatchDidFailProvisionalLoad):
     3253        (WebCore::FrameLoaderClientQt::dispatchDidFailLoad):
     3254        * WebCoreSupport/FrameLoaderClientQt.h:
     3255
     32562009-08-22  Adam Barth  <abarth@webkit.org>
     3257
     3258        Revert 47684.  We're going to do this later once clients have had a
     3259        chance to opt into the setting they like.
     3260
     3261        * Api/qwebsettings.cpp:
     3262        (QWebSettings::QWebSettings):
     3263
     32642009-08-22  Adam Barth  <abarth@webkit.org>
     3265
     3266        Reviewed by Eric Seidel.
     3267
     3268        Don't let local files access web URLs
     3269        https://bugs.webkit.org/show_bug.cgi?id=28480
     3270
     3271        * Api/qwebsettings.cpp:
     3272        (QWebSettings::QWebSettings):
     3273
     32742009-08-19  Aaron Boodman  <aa@chromium.org>
     3275
     3276        Speculative build break fix for qt.
     3277
     3278        * Api/qwebsecurityorigin.cpp:
     3279        (QWebSecurityOrigin::whiteListAccessFromOrigin):
     3280        * Api/qwebsecurityorigin.h:
     3281
     32822009-08-19  Aaron Boodman  <aa@chromium.org>
     3283
     3284        Reviewed by David Levin.
     3285
     3286        https://bugs.webkit.org/show_bug.cgi?id=24853: Provide a way for WebKit clients to
     3287        specify a more granular policy for cross-origin XHR access.
     3288
     3289        * Api/qwebsecurityorigin.cpp: Add API to manipulate origin access whitelists.
     3290        (QWebSecurityOrigin::whiteListAccessFromOrigin): Ditto.
     3291        (QWebSecurityOrigin::resetOriginAccessWhiteLists): Ditto.
     3292        * Api/qwebsecurityorigin.h: Ditto.
     3293
     32942009-08-18  Markus Goetz <Markus.Goetz@nokia.com>
     3295
     3296        Reviwed by Ariya Hidayat.
     3297
     3298        [Qt] For prefecthDNS, the pre-fetching has to be enabled in the
     3299        WebSettings.
     3300
     3301        * Api/qwebsettings.cpp:
     3302        (QWebSettings::QWebSettings):
     3303        * Api/qwebsettings.h:
     3304
     33052009-08-17  Darin Adler  <darin@apple.com>
     3306
     3307        Try to fix Qt build again.
     3308
     3309        * WebCoreSupport/EditorClientQt.cpp: Move "using namespace".
     3310
     33112009-08-17  Darin Adler  <darin@apple.com>
     3312
     3313        Try to fix Qt build.
     3314
     3315        * WebCoreSupport/EditorClientQt.cpp:
     3316        (WebCore::EditorClientQt::shouldShowDeleteInterface):
     3317        Use getAttribute(classAttr) instead of className() function.
     3318
     33192009-08-14  Yongjun Zhang  <yongjun.zhang@nokia.com>
     3320
     3321        Reviewed by Simon Hausmann.
     3322
     3323        RVCT elftran fails to resolve QPainter::staticMetaObject coming with
     3324        QWebView::RenderHints property.
     3325
     3326        This is a temporary fix and will be revereted when the right symbols
     3327        exported from Qt lib in S60.
     3328
     3329        https://bugs.webkit.org/show_bug.cgi?id=28181
     3330
     3331        * Api/qwebview.h:
     3332
     33332009-08-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     3334
     3335        Reviewed by Simon Hausmann.
     3336
     3337        [Qt] Public API to configure the storage path for HTML5 localStorage
     3338        https://bugs.webkit.org/show_bug.cgi?id=28036
     3339
     3340        Disables LocalStorage for QtWebKit by default by setting
     3341        QWebSettings::LocalStorageEnabled to false.
     3342
     3343        Sets up a default for the LocalStorage path so that clients would only
     3344        need to enable the LocalStorageEnabled setting to turn on LocalStoragre
     3345        support.
     3346
     3347        Turn on LocalStorage support for QtLauncher and the relevant test
     3348        since LocalStorage is now disabled by default for QtWebkit.
     3349
     3350        * Api/qwebpage.cpp:
     3351        (defaultCachePath):
     3352        (initializeApplicationCachePathIfNecessary):
     3353        (QWebPagePrivate::QWebPagePrivate):
     3354        * Api/qwebsettings.cpp:
     3355        (QWebSettingsPrivate::apply):
     3356        (QWebSettings::QWebSettings):
     3357        (QWebSettings::setLocalStoragePath):
     3358        (QWebSettings::localStoragePath):
     3359        * Api/qwebsettings.h:
     3360        * QtLauncher/main.cpp:
     3361        (main):
     3362        * tests/qwebpage/tst_qwebpage.cpp:
     3363        (tst_QWebPage::multiplePageGroupsAndLocalStorage):
     3364
     33652009-08-14  Yael Aharon  <yael.aharon@nokia.com>
     3366
     3367        Reviewed by Simon Hausmann.
     3368
     3369        [Qt] Allow applications to register their own local URL scheme.
     3370        https://bugs.webkit.org/show_bug.cgi?id=28240
     3371
     3372        * Api/qwebsecurityorigin.cpp:
     3373        (QWebSecurityOrigin::addLocalScheme):
     3374        (QWebSecurityOrigin::removeLocalScheme):
     3375        (QWebSecurityOrigin::localSchemes):
     3376        * Api/qwebsecurityorigin.h:
     3377        * tests/qwebpage/tst_qwebpage.cpp:
     3378        (tst_QWebPage::localURLSchemes):
     3379
     33802009-08-13  Mark Rowe  <mrowe@apple.com>
     3381
     3382        Try and fix the Qt build.
     3383
     3384        * Api/qwebelement.cpp:
     3385
     33862009-08-13  Kavindra Devi Palaraja  <kavindra.palaraja@nokia.com>
     3387
     3388        Reviewed by Simon Hausmann.
     3389
     3390        Doc - Some cleanup on the documentation of QWebElement
     3391
     3392        * Api/qwebelement.cpp:
     3393
     33942009-08-13  Norbert Leser  <norbert.leser@nokia.com>
     3395
     3396        Reviewed by Simon Hausmann.
     3397
     3398        Symbian target components (library and executable files)
     3399        require Unique Identifiers (i.e., UID3).
     3400        These identifiers are defined in the respective project
     3401        files, conditionally for "symbian" platform.
     3402
     3403        * QtLauncher/QtLauncher.pro:
     3404        * tests/qwebelement/qwebelement.pro:
     3405        * tests/qwebframe/qwebframe.pro:
     3406        * tests/qwebhistory/qwebhistory.pro:
     3407        * tests/qwebhistoryinterface/qwebhistoryinterface.pro:
     3408        * tests/qwebpage/qwebpage.pro:
     3409        * tests/qwebview/qwebview.pro:
     3410
     34112009-08-12  George Wright  <george.wright@torchmobile.com>
     3412
     3413        Reviewed by Adam Treat.
     3414
     3415        Initialise zoom levels independent of whether a URL is valid or not to
     3416        fix https://bugs.webkit.org/show_bug.cgi?id=28162
     3417
     3418        * QtLauncher/main.cpp:
     3419        (MainWindow::MainWindow):
     3420
     34212009-08-12  Joerg Bornemann  <joerg.bornemann@trolltech.com>
     3422
     3423        Reviewed by Simon Hausmann.
     3424
     3425        QtWebKit compile fix for Windows CE
     3426
     3427        There's no getenv on Windows CE, use qgetenv instead.
     3428
     3429        * Api/qwebpage.cpp:
     3430        (qt_drt_overwritePluginDirectories):
     3431
     34322009-08-10  Kavindra Palaraja  <kavindra.palaraja@nokia.com>
     3433
     3434        Reviewed by Simon Hausmann.
     3435
     3436        Various fixes and improvements to the QWebPluginInfo, QWebPluginDatabase and QWebSettings documentation.
     3437
     3438        * Api/qwebplugindatabase.cpp:
     3439        * Api/qwebsettings.cpp:
     3440
     34412009-08-08  Volker Hilsheimer  <volker.hilsheimer@nokia.com>
     3442
     3443        Reviewed by Simon Hausmann.
     3444
     3445        Doc: there is no group of explicitly shared classes, only one class uses this.
     3446
     3447        Explain the implications in the QWebHistoryItem documentation, and get rid
     3448        of the "group".
     3449
     3450        * Api/qwebhistory.cpp:
     3451
     34522009-08-05  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
     3453
     3454        Reviewed by Simon Hausmann.
     3455
     3456        [Qt] Fix build error caused by http://trac.webkit.org/changeset/46763
     3457
     3458        * Api/qwebpluginfactory.h: Export macro added.
     3459
     34602009-08-04  Antonio Gomes   <antonio.gomes@openbossa.org>
     3461
     3462        Reviewed by Simon Hausmann.
     3463
     3464        [Qt] QWebFrame::requestedUrl method can mis-behave in case of unhandled sslErrors.
     3465        https://bugs.webkit.org/show_bug.cgi?id=27804
     3466
     3467        * Api/qwebframe.cpp:
     3468        (QWebFrame::requestedUrl):
     3469        * tests/qwebframe/tst_qwebframe.cpp:
     3470
     34712009-08-04  Simon Hausmann  <simon.hausmann@nokia.com>
     3472
     3473        Reviewed by Tor Arne VestbÞ.
     3474
     3475        Rename QWebPlugin to QWebPluginInfo, as discussed on IRC.
     3476
     3477        * Api/qwebplugindatabase.cpp:
     3478        (QWebPluginInfoPrivate::QWebPluginInfoPrivate):
     3479        (QWebPluginInfo::QWebPluginInfo):
     3480        (QWebPluginInfo::~QWebPluginInfo):
     3481        (QWebPluginInfo::name):
     3482        (QWebPluginInfo::description):
     3483        (QWebPluginInfo::mimeTypes):
     3484        (QWebPluginInfo::supportsMimeType):
     3485        (QWebPluginInfo::path):
     3486        (QWebPluginInfo::isNull):
     3487        (QWebPluginInfo::setEnabled):
     3488        (QWebPluginInfo::isEnabled):
     3489        (QWebPluginInfo::operator==):
     3490        (QWebPluginInfo::operator!=):
     3491        (QWebPluginInfo::operator=):
     3492        (QWebPluginDatabase::plugins):
     3493        (QWebPluginDatabase::pluginForMimeType):
     3494        (QWebPluginDatabase::setPreferredPluginForMimeType):
     3495        * Api/qwebplugindatabase.h:
     3496        * Api/qwebplugindatabase_p.h:
     3497        * tests/qwebplugindatabase/tst_qwebplugindatabase.cpp:
     3498        (tst_QWebPluginDatabase::installedPlugins):
     3499        (tst_QWebPluginDatabase::searchPaths):
     3500        (tst_QWebPluginDatabase::null_data):
     3501        (tst_QWebPluginDatabase::null):
     3502        (tst_QWebPluginDatabase::pluginForMimeType):
     3503        (tst_QWebPluginDatabase::enabled):
     3504        (tst_QWebPluginDatabase::operatorequal_data):
     3505        (tst_QWebPluginDatabase::operatorequal):
     3506        (tst_QWebPluginDatabase::preferredPlugin):
     3507
     35082009-08-04  Simon Hausmann  <simon.hausmann@nokia.com>
     3509
     3510        Reviewed by Adam Treat.
     3511
     3512        Replace QWebPlugin::MimeType with a typedef to
     3513        QWebPluginFactory::MimeType.
     3514
     3515        * Api/qwebplugindatabase.cpp:
     3516        * Api/qwebplugindatabase.h:
     3517        * Api/qwebpluginfactory.cpp:
     3518        (QWebPluginFactory::MimeType::operator==):
     3519        * Api/qwebpluginfactory.h:
     3520
     35212009-08-04  Jakub Wieczorek  <faw217@gmail.com>
     3522
     3523        Reviewed by Simon Hausmann.
     3524
     3525        Add QWebPluginDatabase API to the Qt API.
     3526       
     3527        https://bugs.webkit.org/show_bug.cgi?id=27651
     3528
     3529        * Api/headers.pri:
     3530        * Api/qwebplugindatabase.cpp: Added.
     3531        (QWebPluginPrivate::QWebPluginPrivate):
     3532        (QWebPluginDatabasePrivate::QWebPluginDatabasePrivate):
     3533        (QWebPlugin::MimeType::operator==):
     3534        (QWebPlugin::QWebPlugin):
     3535        (QWebPlugin::~QWebPlugin):
     3536        (QWebPlugin::name):
     3537        (QWebPlugin::description):
     3538        (QWebPlugin::mimeTypes):
     3539        (QWebPlugin::supportsMimeType):
     3540        (QWebPlugin::path):
     3541        (QWebPlugin::isNull):
     3542        (QWebPlugin::setEnabled):
     3543        (QWebPlugin::isEnabled):
     3544        (QWebPlugin::operator==):
     3545        (QWebPlugin::operator!=):
     3546        (QWebPlugin::operator=):
     3547        (QWebPluginDatabase::QWebPluginDatabase):
     3548        (QWebPluginDatabase::~QWebPluginDatabase):
     3549        (QWebPluginDatabase::plugins):
     3550        (QWebPluginDatabase::defaultSearchPaths):
     3551        (QWebPluginDatabase::searchPaths):
     3552        (QWebPluginDatabase::setSearchPaths):
     3553        (QWebPluginDatabase::addSearchPath):
     3554        (QWebPluginDatabase::refresh):
     3555        (QWebPluginDatabase::pluginForMimeType):
     3556        (QWebPluginDatabase::setPreferredPluginForMimeType):
     3557        * Api/qwebplugindatabase.h: Added.
     3558        * Api/qwebplugindatabase_p.h: Added.
     3559        * Api/qwebsettings.cpp:
     3560        (QWebSettings::pluginDatabase):
     3561        * Api/qwebsettings.h:
     3562        * tests/qwebplugindatabase/qwebplugindatabase.pro: Added.
     3563        * tests/qwebplugindatabase/tst_qwebplugindatabase.cpp: Added.
     3564        (tst_QWebPluginDatabase::installedPlugins):
     3565        (tst_QWebPluginDatabase::searchPaths):
     3566        (tst_QWebPluginDatabase::null_data):
     3567        (tst_QWebPluginDatabase::null):
     3568        (tst_QWebPluginDatabase::pluginForMimeType):
     3569        (tst_QWebPluginDatabase::enabled):
     3570        (tst_QWebPluginDatabase::operatorequal_data):
     3571        (tst_QWebPluginDatabase::operatorequal):
     3572        (tst_QWebPluginDatabase::preferredPlugin):
     3573        * tests/tests.pro:
     3574
     35752009-08-03  Balazs Kelemen  <kelemen.balazs.3@stud.u-szeged.hu>
     3576
     3577        Reviewed by Simon Hausmann.
     3578
     3579        Do memory cleanup when running robotized QtLauncher in debug as well.
     3580
     3581        * QtLauncher/main.cpp:
     3582        (launcherMain):
     3583        (main):
     3584
     35852009-07-30  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     3586
     3587        Reviewed by Tor Arne VestbÞ.
     3588
     3589        [Qt] Initialize HTML5 Application Cache for QtWebKit to a sensible default
     3590        https://bugs.webkit.org/show_bug.cgi?id=27866
     3591
     3592        * Api/qwebpage.cpp:
     3593        (initializeApplicationCachePathIfNecessary):
     3594        (QWebPagePrivate::QWebPagePrivate):
     3595
     35962009-07-31  Jakob Petsovits  <jakob.petsovits@torchmobile.com>
     3597
     3598        Reviewed by Adam Treat.
     3599
     3600        Build QtWebKit without benchmark tests for Qt < 4.5.
     3601        https://bugs.webkit.org/show_bug.cgi?id=27886
     3602
     3603        The QBENCHMARK macro is only available from 4.5 on,
     3604        so builds for Qt < 4.5 shouldn't try to build those.
     3605
     3606        * tests/tests.pro:
     3607
     36082009-07-31  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     3609
     3610        Reviewed by Adam Treat.
     3611
     3612        Fix warning by migrating use of QString.sprintf(...) to
     3613        QString.arg().arg()...
     3614
     3615        * WebCoreSupport/EditorClientQt.cpp:
     3616        (dumpRange):
     3617
     36182009-07-31  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     3619
     3620        Reviewed by Tor Arne VestbÞ.
     3621
     3622        Expose the Offline Web Application Cache in the Qt API.
     3623
     3624        * Api/qwebsettings.cpp:
     3625        (QWebSettings::QWebSettings):
     3626        (QWebSettings::setOfflineWebApplicationCachePath):
     3627        (QWebSettings::offlineWebApplicationCachePath):
     3628        (QWebSettings::setOfflineWebApplicationCacheQuota):
     3629        (QWebSettings::offlineWebApplicationCacheQuota):
     3630        * Api/qwebsettings.h:
     3631
     36322009-07-30  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     3633
     3634        Reviewed by Adam Treat.
     3635
     3636        Add missing Q_OBJECT to class inheriting from QObject.
     3637
     3638        * tests/qwebframe/tst_qwebframe.cpp:
     3639
     36402009-07-30  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     3641
     3642        Reviewed by Adam Treat.
     3643
     3644        Fix indentation.
     3645
     3646        * tests/qwebframe/tst_qwebframe.cpp:
     3647
     36482009-07-30  Volker Hilsheimer <volker.hilsheimer@nokia.com>
     3649
     3650        Reviewed by Simon Hausmann.
     3651
     3652        Fix documentation links to examples.
     3653
     3654        * Api/qwebview.cpp:
     3655
     36562009-07-30  Balazs Kelemen  <kelemen.balazs.3@stud.u-szeged.hu>
     3657
     3658        Reviewed by Simon Hausmann.
     3659
     3660        Allocate MainWindow on heap in robotized QtLauncher as well.
     3661
     3662        * QtLauncher/main.cpp:
     3663        (main):
     3664
     36652009-07-29  Kevin McCullough  <kmccullough@apple.com>
     3666
     3667        Reviewed by Darin Adler.
     3668
     3669        Added foundation work to allow a testing infrastructure for the Web
     3670        Inspector.
     3671
     3672        * WebCoreSupport/InspectorClientQt.cpp:
     3673        (WebCore::InspectorClientQt::inspectorWindowObjectCleared):
     3674        * WebCoreSupport/InspectorClientQt.h:
     3675
     36762009-07-29  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
     3677
     3678        Reviewed by Simon Hausmann.
     3679
     3680        [Qt] In debug mode, this fix frees cached resources
     3681        and other unreferenced objects (by calling the
     3682        garbage collector) to remove the LEAK messages.
     3683        https://bugs.webkit.org/show_bug.cgi?id=27767
     3684
     3685        * Api/qwebframe.cpp:
     3686        (qt_drt_cache_clear):
     3687        * QtLauncher/main.cpp:
     3688        (main):
     3689
     36902009-07-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     3691
     3692        Fix the Qt build by adapting to the changes of ScriptObject.
     3693
     3694        * Api/qwebelement.cpp:
     3695        (setupScriptObject):
     3696
     36972009-07-28  Robert Hogan  <robert@roberthogan.net>
     3698
     3699        Reviewed by Simon Hausmann.
     3700
     3701        Add WebKit version API to Qt.
     3702
     3703        Get the current version of WebKit from WebKit/mac/Configurations/Version.xcconfig
     3704        at compile time and make it available to Qt applications through
     3705        qWebKitVersion().
     3706
     3707        Also amend the User Agent string to place the Safari clause outside
     3708        the final bracket and to the end of the UA string.
     3709
     3710        https://bugs.webkit.org/show_bug.cgi?id=27158
     3711
     3712        Minor build tweak by Simon Hausmann (adding export macros to new functions).
     3713
     3714        * Api/headers.pri:
     3715        * Api/qwebkitversion.cpp: Added.
     3716        (webKitVersion):
     3717        (webKitMajorVersion):
     3718        (webKitMinorVersion):
     3719        * Api/qwebkitversion.h: Added.
     3720        * Api/qwebpage.cpp:
     3721        (QWebPage::userAgentForUrl):
     3722        * tests/qwebview/tst_qwebview.cpp:
     3723        (tst_QWebView::getWebKitVersion):
     3724
     37252009-07-28  Simon Hausmann  <simon.hausmann@nokia.com>
     3726
     3727        Rubber-stamped by Ariya Hidayat.
     3728
     3729        Fix compilation with the precompiled header.
     3730
     3731        * WebKit_pch.h: Don't include JSDOMBinding.h and MathObject.h,
     3732        as they include AtomicString.h. AtomicString.cpp needs to enable
     3733        a #define before including AtomicString.h, which breaks if the PCH
     3734        forces the inclusion beforehand.
     3735
     37362009-07-28  Ariya Hidayat  <ariya.hidayat@nokia.com>
     3737
     3738        Reviewed by Simon Hausmann.
     3739
     3740        Added tests to ensure that scroll position can be changed
     3741        programmatically, even when the scroll bar policy is set to off.
     3742
     3743        * tests/qwebframe/tst_qwebframe.cpp:
     3744
     37452009-07-28  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     3746
     3747        Reviewed by Simon Hausmann.
     3748       
     3749        Fix a few compilation warnings in the QWebFrame tests.
     3750
     3751        * tests/qwebframe/tst_qwebframe.cpp:
     3752
     37532009-07-28  Andre Pedralho  <andre.pedralho@openbossa.org>
     3754
     3755         Reviewed by Simon Hausmann.
     3756
     3757         Fixed tst_QWebFrame::hasSetFocus test which was using
     3758         an undefined resource.
     3759         https://bugs.webkit.org/show_bug.cgi?id=27512
     3760
     3761         * tests/qwebframe/tst_qwebframe.cpp:
     3762
     37632009-07-28  Simon Hausmann  <simon.hausmann@nokia.com>
     3764
     3765        Reviewed by Ariya Hidayat.
     3766
     3767        Make it possible to pass relative file names to QtLauncher.
     3768
     3769        * QtLauncher/main.cpp:
     3770        (MainWindow::MainWindow):
     3771
     37722009-07-27  Alexey Proskuryakov  <ap@webkit.org>
     3773
     3774        Reviewed by Darin Adler.
     3775
     3776        https://bugs.webkit.org/show_bug.cgi?id=27735
     3777        Give a helpful name to JSLock constructor argument
     3778
     3779        * Api/qwebframe.cpp:
     3780        (QWebFrame::addToJavaScriptWindowObject):
     3781
     37822009-07-27  Volker Hilsheimer <volker.hilsheimer@nokia.com>
     3783
     3784        Reviewed by Simon Hausmann.
     3785
     3786        QWebView's "enabled" parameter should default to true, as with QGraphicsView and
     3787        QPainter.
     3788
     3789        * Api/qwebview.cpp: Add reference to QPainter::renderHints().
     3790        * Api/qwebview.h: Add default for enabled argument.
     3791
     37922009-07-26  Kavindra Palaraja  <kavindra.palaraja@nokia.com>
     3793
     3794        Reviewed by Simon Hausmann.
     3795
     3796        More documentation cleanups in the QWebElement class overview.
     3797
     3798        * Api/qwebelement.cpp:
     3799
     38002009-07-26  Kavindra Palaraja  <kavindra.palaraja@nokia.com>
     3801
     3802        Reviewed by Simon Hausmann.
     3803
     3804        Clean up documentation of QWebElement's findFirst and findAll functions,
     3805        as well as their QWebFrame counterparts.
     3806
     3807        * Api/qwebelement.cpp:
     3808        * Api/qwebframe.cpp:
     3809
     38102009-07-26  Kavindra Palaraja  <kavindra.palaraja@nokia.com>
     3811
     3812        Reviewed by Simon Hausmann.
     3813
     3814        Various documentation cleanups
     3815
     3816        * Fixed qdoc warnings
     3817        * Hide QWebNetworkInterface from the class overview
     3818        * Mention QWebElement in the module overview
     3819        * More cleanups
     3820
     3821        * Api/qwebframe.cpp:
     3822        * Api/qwebnetworkinterface.cpp:
     3823        * Api/qwebview.cpp:
     3824        * docs/qtwebkit.qdoc:
     3825
     38262009-07-26  Kavindra Palaraja  <kavindra.palaraja@nokia.com>
     3827
     3828        Reviewed by Simon Hausmann.
     3829
     3830        Added missing class diagram referenced from the docs, taken from the Qt
     3831        documentation.
     3832
     3833        * docs/qtwebkit.qdocconf: Register the image directory with
     3834        qdoc.
     3835        * docs/qwebview-diagram.png: Added.
     3836
     38372009-07-24  Antonio Gomes   <antonio.gomes@openbossa.org>
     3838
     3839        Reviewed by Adam Treat.
     3840
     3841        As per discussion on IRC, changed originalUrl by requestedUrl.
     3842
     3843        * Api/qwebframe.cpp:
     3844        (QWebFrame::requestedUrl):
     3845        * Api/qwebframe.h:
     3846        * tests/qwebframe/tst_qwebframe.cpp:
     3847
     38482009-07-24  Andre Pedralho  <andre.pedralho@openbossa.org>
     3849
     3850        Reviewed by Adam Treat.
     3851
     3852        Removed void QWebFrame::renderContents(...) and added the Q_PROPERTY
     3853        clipRenderToViewport to control whether QWebFrame::render would call
     3854        FrameView::paintContents rather than FrameView::paint and do not clip
     3855        the frame content to viewport.
     3856
     3857
     3858        * Api/qwebframe.cpp:
     3859        (QWebFramePrivate::renderPrivate):
     3860        (QWebFrame::clipRenderToViewport):
     3861        (QWebFrame::setClipRenderToViewport):
     3862        * Api/qwebframe.h:
     3863        * Api/qwebframe_p.h:
     3864        (QWebFramePrivate::QWebFramePrivate):
     3865        * tests/qwebframe/tst_qwebframe.cpp:
     3866
     38672009-07-24  Antonio Gomes   <antonio.gomes@openbossa.org>
     3868
     3869        Reviewed by Simon Hausmann.
     3870
     3871        [QT] Implement originalUrl getter method to the API
     3872        https://bugs.webkit.org/show_bug.cgi?id=25867
     3873
     3874        * Api/qwebframe.cpp:
     3875        (QWebFrame::originalUrl):
     3876        * Api/qwebframe.h:
     3877        * tests/qwebframe/qwebframe.qrc:
     3878        * tests/qwebframe/test1.html: Added.
     3879        * tests/qwebframe/test2.html: Added.
     3880        * tests/qwebframe/tst_qwebframe.cpp:
     3881
     38822009-07-24  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     3883
     3884        Build fix for Qt.
     3885
     3886        Fix build issue introduced in 46344
     3887        ([Bug 22700] ApplicationCache should have size limit)
     3888
     3889        Remove method only added to the Qt ChromeClient.
     3890
     3891        * WebCoreSupport/ChromeClientQt.h:
     3892
     38932009-07-24  Andrei Popescu  <andreip@google.com>
     3894
     3895        Reviewed by Anders Carlsson.
     3896
     3897        ApplicationCache should have size limit
     3898        https://bugs.webkit.org/show_bug.cgi?id=22700
     3899
     3900        * WebCoreSupport/ChromeClientQt.cpp:
     3901        (WebCore::ChromeClientQt::reachedMaxAppCacheSize):
     3902        Adds empty implementation of the reachedMaxAppCacheSize callback.
     3903        * WebCoreSupport/ChromeClientQt.h:
     3904
     39052009-07-23  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     3906
     3907        Reviewed by Simon Hausmann.
     3908
     3909        [Qt] Add simple proxy support for QtLauncher
     3910        https://bugs.webkit.org/show_bug.cgi?id=27495
     3911
     3912        Picks up proxy settings from the http_proxy environment
     3913        variable.
     3914
     3915        * QtLauncher/QtLauncher.pro: Add QtNetwork dependency for all
     3916        platforms.
     3917        * QtLauncher/main.cpp:
     3918        (MainWindow::MainWindow):
     3919
     39202009-07-23  Simon Hausmann  <simon.hausmann@nokia.com>
     3921
     3922        Reviewed by Holger Freyther.
     3923
     3924        Added a testcase to verify that cached methods in the QOBject bindings
     3925        remain alife even after garbage collection.
     3926
     3927        * tests/qwebpage/tst_qwebpage.cpp:
     3928        (tst_QWebPage::protectBindingsRuntimeObjectsFromCollector):
     3929
     39302009-07-23  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
     3931
     3932        Reviewed by Simon Hausmann.
     3933
     3934        Fixing two issues related to QtLauncher
     3935          - MainWindow objects are not always freed after close
     3936          - JavaScript window.close() sometimes crashes
     3937        https://bugs.webkit.org/show_bug.cgi?id=27601
     3938
     3939        * QtLauncher/main.cpp:
     3940        (MainWindow::MainWindow):
     3941        (main):
     3942
     39432009-07-21  Volker Hilsheimer <volker.hilsheimer@nokia.com>
     3944
     3945        Reviewed by Simon Hausmann.
     3946
     3947        Various improvements to the API documentation.
     3948
     3949        * Updated link to W3c Database spec
     3950        * Formatting fixes, cleanups
     3951        * Add missing \since 4.6 tags to QWebPage::frameAt
     3952        * Extend QWebDatabase and QWebSecurityOrigin docs.
     3953
     3954        * Api/qwebdatabase.cpp:
     3955        * Api/qwebpage.cpp:
     3956        * Api/qwebsecurityorigin.cpp:
     3957        * Api/qwebview.cpp:
     3958
     39592009-07-21  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     3960
     3961        Rubber-stamped by Simon Hausmann.
     3962
     3963        Remove preliminary-tag from QWebElement
     3964
     3965        * Api/qwebelement.cpp:
     3966
     39672009-07-20  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     3968
     3969        Reviewed by Eric Seidel.
     3970
     3971        Fix Qt code to follow the WebKit Coding Style.
     3972
     3973        * Api/qcookiejar.cpp:
     3974        (QCookieJar::setCookieJar):
     3975        (QCookieJar::cookieJar):
     3976        * Api/qcookiejar.h:
     3977        * Api/qwebdatabase.cpp:
     3978        (QWebDatabase::QWebDatabase):
     3979        (QWebDatabase::removeDatabase):
     3980        * Api/qwebdatabase.h:
     3981        * Api/qwebdatabase_p.h:
     3982        * Api/qwebelement.h:
     3983        * Api/qwebframe.cpp:
     3984        (QWebFrame::title):
     3985        (QWebFrame::print):
     3986        * Api/qwebframe.h:
     3987        * Api/qwebframe_p.h:
     3988        * Api/qwebhistory.cpp:
     3989        (QWebHistory::clear):
     3990        * Api/qwebhistory.h:
     3991        * Api/qwebhistory_p.h:
     3992        * Api/qwebhistoryinterface.cpp:
     3993        (gCleanupInterface):
     3994        (QWebHistoryInterface::setDefaultInterface):
     3995        (QWebHistoryInterface::defaultInterface):
     3996        (QWebHistoryInterface::QWebHistoryInterface):
     3997        * Api/qwebhistoryinterface.h:
     3998        * Api/qwebnetworkinterface.cpp:
     3999        (QWebNetworkManager::started):
     4000        (QWebNetworkManager::finished):
     4001        (QWebNetworkInterfacePrivate::parseDataUrl):
     4002        (QWebNetworkInterface::addJob):
     4003        (WebCoreHttp::onResponseHeaderReceived):
     4004        (WebCoreHttp::onReadyRead):
     4005        * Api/qwebnetworkinterface.h:
     4006        * Api/qwebnetworkinterface_p.h:
     4007        * Api/qwebpage.cpp:
     4008        (QWebPagePrivate::editorCommandForWebActions):
     4009        (QWebPagePrivate::createContextMenu):
     4010        (QWebPagePrivate::focusInEvent):
     4011        (QWebPage::fixedContentsSize):
     4012        (QWebPage::setContentEditable):
     4013        (QWebPage::swallowContextMenuEvent):
     4014        (QWebPage::findText):
     4015        * Api/qwebpage.h:
     4016        * Api/qwebpage_p.h:
     4017        * Api/qwebpluginfactory.h:
     4018        * Api/qwebsecurityorigin.h:
     4019        * Api/qwebsecurityorigin_p.h:
     4020        * Api/qwebsettings.cpp:
     4021        (QWebSettingsPrivate::QWebSettingsPrivate):
     4022        (QWebSettingsPrivate::apply):
     4023        (QWebSettings::globalSettings):
     4024        (QWebSettings::QWebSettings):
     4025        (QWebSettings::fontSize):
     4026        (QWebSettings::setUserStyleSheetUrl):
     4027        (QWebSettings::setDefaultTextEncoding):
     4028        (QWebSettings::setIconDatabasePath):
     4029        (QWebSettings::iconDatabasePath):
     4030        (QWebSettings::iconForUrl):
     4031        (QWebSettings::setWebGraphic):
     4032        (QWebSettings::setFontFamily):
     4033        (QWebSettings::fontFamily):
     4034        (QWebSettings::testAttribute):
     4035        (qt_websettings_setLocalStorageDatabasePath):
     4036        * Api/qwebsettings.h:
     4037        * Api/qwebview.cpp:
     4038        (QWebView::setPage):
     4039        (QWebView::event):
     4040        * Api/qwebview.h:
     4041
     40422009-07-20  Holger Hans Peter Freyther  <zecke@selfish.org>
     4043
     4044        Reviewed by Simon Hausmann.
     4045
     4046        [Qt] Add test for loading webpages...
     4047
     4048        Performance test for loading webpages. Wait for the loadFinished
     4049        signal to be fired. This should include a non empty layout.
     4050
     4051        * tests/benchmarks/loading/tst_loading.cpp: Added.
     4052        (waitForSignal):
     4053        (tst_Loading::init):
     4054        (tst_Loading::cleanup):
     4055        (tst_Loading::load_data):
     4056        (tst_Loading::load):
     4057        * tests/benchmarks/loading/tst_loading.pro: Added.
     4058        * tests/tests.pro:
     4059
     40602009-07-20  Holger Hans Peter Freyther  <zecke@selfish.org>
     4061
     4062        Reviewed by Simon Hausmann.
     4063
     4064        [Qt] Add a test case for drawing a simple viewrect to a QPixmap
     4065
     4066        * tests/benchmarks/painting/tst_painting.cpp: Added.
     4067        (waitForSignal):
     4068        (tst_Painting::init):
     4069        (tst_Painting::cleanup):
     4070        (tst_Painting::paint_data):
     4071        (tst_Painting::paint):
     4072        * tests/benchmarks/painting/tst_painting.pro: Added.
     4073        * tests/tests.pro:
     4074
     40752009-07-20  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     4076
     4077        Reviewed by Holger Freyther.
     4078
     4079        [Qt] Add an option for QtLauncher to build without QtUiTools dependency
     4080        https://bugs.webkit.org/show_bug.cgi?id=27438
     4081
     4082        Based on Norbert Leser's work.
     4083
     4084        * QtLauncher/main.cpp:
     4085        (WebPage::createPlugin):
     4086
     40872009-07-17  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
     4088
     4089        Reviewed by Adam Treat.
     4090
     4091        Coding style fixes.
     4092
     4093        * Api/qcookiejar.cpp:
     4094        (QCookieJarPrivate::QCookieJarPrivate):
     4095        (qHash):
     4096        (QCookieJar::cookieJar):
     4097        * Api/qwebelement.cpp:
     4098        (QWebElement::functions):
     4099        (QWebElement::scriptableProperties):
     4100        * Api/qwebframe.cpp:
     4101        (QWebFrame::metaData):
     4102        (QWebFrame::scrollBarValue):
     4103        (QWebFrame::scroll):
     4104        (QWebFrame::scrollPosition):
     4105        (QWebFrame::print):
     4106        * Api/qwebnetworkinterface.cpp:
     4107        (decodePercentEncoding):
     4108        (QWebNetworkRequestPrivate::init):
     4109        (QWebNetworkRequestPrivate::setURL):
     4110        (QWebNetworkRequest::QWebNetworkRequest):
     4111        (QWebNetworkRequest::operator=):
     4112        (QWebNetworkRequest::setUrl):
     4113        (QWebNetworkRequest::setHttpHeader):
     4114        (QWebNetworkRequest::httpHeaderField):
     4115        (QWebNetworkRequest::setHttpHeaderField):
     4116        (QWebNetworkRequest::setPostData):
     4117        (QWebNetworkJob::setResponse):
     4118        (QWebNetworkJob::frame):
     4119        (QWebNetworkManager::add):
     4120        (QWebNetworkManager::cancel):
     4121        (QWebNetworkManager::started):
     4122        (QWebNetworkManager::data):
     4123        (QWebNetworkManager::finished):
     4124        (QWebNetworkManager::addHttpJob):
     4125        (QWebNetworkManager::cancelHttpJob):
     4126        (QWebNetworkManager::httpConnectionClosed):
     4127        (QWebNetworkInterfacePrivate::sendFileData):
     4128        (QWebNetworkInterfacePrivate::parseDataUrl):
     4129        (QWebNetworkManager::doWork):
     4130        (QWebNetworkInterface::setDefaultInterface):
     4131        (QWebNetworkInterface::defaultInterface):
     4132        (QWebNetworkInterface::QWebNetworkInterface):
     4133        (QWebNetworkInterface::addJob):
     4134        (QWebNetworkInterface::cancelJob):
     4135        (WebCoreHttp::WebCoreHttp):
     4136        (WebCoreHttp::request):
     4137        (WebCoreHttp::scheduleNextRequest):
     4138        (WebCoreHttp::getConnection):
     4139        (WebCoreHttp::onResponseHeaderReceived):
     4140        (WebCoreHttp::onReadyRead):
     4141        (WebCoreHttp::onRequestFinished):
     4142        (WebCoreHttp::onAuthenticationRequired):
     4143        (WebCoreHttp::onProxyAuthenticationRequired):
     4144        * Api/qwebpage.cpp:
     4145        (QWebPagePrivate::QWebPagePrivate):
     4146        (QWebPagePrivate::mouseReleaseEvent):
     4147        (QWebPagePrivate::inputMethodEvent):
     4148        (QWebPagePrivate::shortcutOverrideEvent):
     4149        (QWebPage::inputMethodQuery):
     4150        (QWebPage::javaScriptPrompt):
     4151        (QWebPage::updatePositionDependentActions):
     4152        (QWebPage::userAgentForUrl):
     4153        (QWebPagePrivate::_q_onLoadProgressChanged):
     4154        (QWebPage::totalBytes):
     4155        (QWebPage::bytesReceived):
     4156        * Api/qwebsettings.cpp:
     4157        (QWebSettings::iconForUrl):
     4158        (QWebSettings::setObjectCacheCapacities):
     4159        * Api/qwebview.cpp:
     4160        (QWebView::paintEvent):
     4161        (QWebView::changeEvent):
     4162
     41632009-07-17  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
     4164
     4165        Reviewed by Simon Hausmann.
     4166
     4167        Overwrite the plugin directories for the DRT.
     4168        Part of https://bugs.webkit.org/show_bug.cgi?id=27215
     4169
     4170        * Api/qwebpage.cpp:
     4171        (qt_drt_overwritePluginDirectories): Only set the plugin directories
     4172        to the ones in the QTWEBKIT_PLUGIN_PATH environment variable.
     4173
     41742009-07-16  Xiaomei Ji  <xji@chromium.org>
     4175
     4176        Reviewed by Dan Bernstein.
     4177
     4178        This is the 2nd part of fixing "RTL: tooltip does not get its directionlity from its element's."
     4179        https://bugs.webkit.org/show_bug.cgi?id=24187
     4180
     4181        Add one extra parameter to the callee of HitTestResult::title() due to the signature change.
     4182
     4183        * Api/qwebframe.cpp:
     4184        (QWebHitTestResultPrivate::QWebHitTestResultPrivate): Add direction as a parameter to the callee of HitTestResult::title().
     4185        * WebCoreSupport/ChromeClientQt.cpp:
     4186        (WebCore::ChromeClientQt::mouseDidMoveOverElement): Add direction as a parameter to the callee of HitTestResult::title().
     4187
     41882009-07-16  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
     4189
     4190        Reviewed by Adam Treat.
     4191
     4192        Add new action to qwebpage to reload without cache.
    594193
    604194        * Api/qwebpage.cpp:
    614195        (QWebPagePrivate::updateAction):
    62         (QWebPagePrivate::updateEditorActions):
     4196        (QWebPagePrivate::updateNavigationActions):
     4197        (QWebPage::triggerAction):
     4198        * Api/qwebpage.h:
     4199
     42002009-07-16  Xiaomei Ji  <xji@chromium.org>
     4201
     4202        Reviewed by Darin Adler.
     4203
     4204        Fix tooltip does not get its directionality from its element's directionality.
     4205        https://bugs.webkit.org/show_bug.cgi?id=24187
     4206
     4207        Per mitz's suggestion in comment #6, while getting the plain-text
     4208        title, we also get the directionality of the title. How to handle
     4209        the directionality is up to clients. Clients could ignore it,
     4210        or use attribute or unicode control characters to display the title
     4211        as what they want.
     4212
     4213
     4214        * WebCoreSupport/ChromeClientQt.cpp:
     4215        (WebCore::ChromeClientQt::setToolTip): Add directionality as 2nd parameter to setToopTip() (without handling it yet).
     4216        * WebCoreSupport/ChromeClientQt.h: Add directionality as 2nd parameter to setToolTip().
     4217
     42182009-07-15  Yael Aharon  <yael.aharon@nokia.com>
     4219
     4220        Reviewed by Simon Hausmann.
     4221
     4222        https://bugs.webkit.org/show_bug.cgi?id=27285
     4223
     4224        When the user clicks a link with a target attribute, the newly created window should be visible.
     4225        Make new windows created in Qtlauncher visible.
     4226
     4227        * QtLauncher/main.cpp:
     4228        (WebPage::createWindow):
     4229
     42302009-07-14  Adam Treat  <adam.treat@torchmobile.com>
     4231
     4232        Reviewed by Zack Rusin.
     4233
     4234        https://bugs.webkit.org/show_bug.cgi?id=26983
     4235
     4236        The default constructed values for QSize and WebCore::IntSize are different.  The former
     4237        produces an invalid size whereas the latter produces a size of zero.  This was causing
     4238        a layout to be triggered when constructing a view and an assert to be hit.  This patch fixes
     4239        the crash by taking care not to cause an unnecessary layout triggered by ScrollView::setFixedLayoutSize.
     4240
     4241        * WebCoreSupport/FrameLoaderClientQt.cpp:
     4242        (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage):
     4243
     42442009-07-13  Simon Hausmann  <simon.hausmann@nokia.com>
     4245
     4246        Reviewed by Ariya Hidayat.
     4247
     4248        Fix qdoc warnings for QWebPage::shouldInterruptJavaScript() and mention
     4249        how to re-implement it.
     4250
     4251        * Api/qwebpage.cpp:
     4252
     42532009-07-13  Simon Hausmann  <hausmann@webkit.org>
     4254
     4255        Reviewed by Ariya Hidayat.
     4256
     4257        Fix crash with plugins when the plugin stream is cancelled.
     4258
     4259        Similar to r26667 handle the case where didReceiveResponse on the
     4260        plugin view results in failure to set up the stream and
     4261        setMainDocumentError being called instead. This will set the
     4262        m_pluginView back to 0 and we need check for it before calling
     4263        didReceiveData.
     4264
     4265        This was triggered by consecutive execution of
     4266        LayoutTests/plugins/return-error-from-new-stream-callback-in-full-frame-plugin.html
     4267        followed by LayoutTests/scrollbars/scrollbar-crash-on-refresh.html
     4268
     4269        * WebCoreSupport/FrameLoaderClientQt.cpp:
     4270        (WebCore::FrameLoaderClientQt::committedLoad):
     4271
     42722009-07-13  Simon Hausmann  <hausmann@webkit.org>
     4273
     4274        Reviewed by Ariya Hidayat.
     4275
     4276        Added QWebDatabase::removeAllDatabases, as a way to delete all
     4277        databases from the offline storage path.
     4278
     4279        Used by the Qt DRT.
     4280
     4281        * Api/qwebdatabase.cpp:
     4282        (QWebDatabase::removeAllDatabases):
     4283        * Api/qwebdatabase.h:
     4284
     42852009-07-13  Simon Hausmann  <hausmann@webkit.org>
     4286
     4287        Reviewed by Ariya Hidayat.
     4288
     4289        Added loadStarted() and loadFinished() signals to QWebFrame,
     4290        to allow load tracking of individual frames, as opposed to
     4291        QWebPage's loadStarted/loadFinished signals that are emitted
     4292        whenever _any_ child frame loads/finishes.
     4293
     4294        * Api/qwebframe.cpp: Document new signals.
     4295        * Api/qwebframe.h: Add new signals.
     4296        * WebCoreSupport/FrameLoaderClientQt.cpp:
     4297        (WebCore::FrameLoaderClientQt::setFrame): Connect new signals.
     4298
     42992009-07-13  Simon Hausmann  <hausmann@webkit.org>
     4300
     4301        Reviewed by Ariya Hidayat.
     4302
     4303        Add hooks for the GCController JavaScript interface needed by the
     4304        Qt DRT.
     4305
     4306        Fixed sort order of includes in qwebframe.cpp.
     4307
     4308        * Api/qwebframe.cpp:
     4309        (qt_drt_javaScriptObjectsCount):
     4310        (qt_drt_garbageCollector_collect):
     4311        (qt_drt_garbageCollector_collectOnAlternateThread):
     4312
     43132009-07-13  Simon Hausmann  <hausmann@webkit.org>
     4314
     4315        Reviewed by Ariya Hidayat.
     4316
     4317        Add hooks for the GCController JavaScript interface needed by the
     4318        Qt DRT.
     4319
     4320        Fixed sort order of includes in qwebframe.cpp.
     4321
     4322        * Api/qwebframe.cpp:
     4323        (qt_drt_javaScriptObjectsCount):
     4324        (qt_drt_garbageCollector_collect):
     4325        (qt_drt_garbageCollector_collectOnAlternateThread):
     4326
     43272009-07-12  Brent Fulgham  <bfulgham@gmail.com>
     4328
     4329        Speculative build fix after http://trac.webkit.org/changeset/45786.
     4330
     4331        * WebCoreSupport/ChromeClientQt.cpp:
     4332        (WebCore::ChromeClientQt::addMessageToConsole):
     4333        * WebCoreSupport/ChromeClientQt.h:
     4334
     43352009-07-10  Yael Aharon  <yael.aharon@nokia.com>
     4336
     4337        Reviewed by Holger Freyther.
     4338
     4339        https://bugs.webkit.org/show_bug.cgi?id=27136
     4340
     4341        Fix a bug where webkit hangs when executing infinite JavaScript loop.
     4342
     4343        * Api/qwebpage.cpp:
     4344        (QWebPage::shouldInterruptJavaScript):
     4345        * Api/qwebpage.h:
     4346        * WebCoreSupport/ChromeClientQt.cpp:
     4347        (WebCore::ChromeClientQt::shouldInterruptJavaScript):
    634348        * tests/qwebpage/tst_qwebpage.cpp:
    64         (tst_QWebPage::textSelection):
    65 
    66 2009-03-19  Ariya Hidayat <ariya.hidayat@trolltech.com>
    67 
    68         Reviewed by Simon Hausmann.
    69 
    70         Fixes pedantic compilation in QtWebKit.
    71 
    72         There are no semi-colons after namespace declarations.
     4349        (JSTestPage::JSTestPage):
     4350        (JSTestPage::shouldInterruptJavaScript):
     4351        (tst_QWebPage::infiniteLoopJS):
     4352
     43532009-07-10  Simon Hausmann  <simon.hausmann@nokia.com>
     4354
     4355        Reviewed by Holger Freyther.
     4356
     4357        https://bugs.webkit.org/show_bug.cgi?id=27108
     4358
     4359        Fix crash when in frame tree of a new frame before the new frame
     4360        has been installed in the frame tree, similar to r35088.
     4361
     4362        After calling Frame::init() the frame it may have been removed from the
     4363        frame tree again through JavaScript. Detect this by checking the page()
     4364        afterwards.
     4365
     4366        To make this check safe the Frame::init() code was moved into
     4367        QWebFrameData's constructor, where a RefPtr holds a reference to the frame.
     4368        After the check back in FrameLoaderClientQt we would hold the single
     4369        reference left and after release() the frame, its frame loader, its
     4370        client as well as the QWebFrame should have disappeared then.
     4371
     4372        * Api/qwebframe.cpp:
     4373        (QWebFramePrivate::init): Only call Frame::init here, the rest is
     4374        done in QWebFrameData's constructor.
     4375        (QWebFrame::QWebFrame):
     4376        * Api/qwebframe_p.h: Adjust declaration.
     4377        (QWebFrameData::QWebFrameData): Create the Frame here.
     4378        * Api/qwebpage.cpp:
     4379        (QWebPagePrivate::createMainFrame): Adjust and simplify
     4380        to new QWebFrame constructor.
     4381        * WebCoreSupport/FrameLoaderClientQt.cpp:
     4382        (WebCore::FrameLoaderClientQt::createFrame): Adjust to
     4383        new QWebFrame construction using QWebFrameData and add the
     4384        check like in r35088.
     4385
     43862009-07-09  Beth Dakin  <bdakin@apple.com>
     4387
     4388        Reviewed by Dave Hyatt.
     4389
     4390        Make Widget RefCounted to fix:
     4391
     4392        <rdar://problem/7038831> REGRESSION (TOT): In Mail, a crash occurs
     4393        at WebCore::Widget::afterMouseDown() after clicking To Do's close
     4394        box
     4395        <rdar://problem/6978804> WER #16: Repro Access Violation in
     4396        WebCore::PluginView::bindingInstance (1310178023)
     4397        -and-
     4398        <rdar://problem/6991251> WER #13: Crash in WebKit!
     4399        WebCore::PluginView::performRequest+203 (1311461169)
     4400
     4401        * WebCoreSupport/FrameLoaderClientQt.cpp:
     4402        (WebCore::FrameLoaderClientQt::createPlugin):
     4403        (WebCore::FrameLoaderClientQt::createJavaAppletWidget):
     4404        * WebCoreSupport/FrameLoaderClientQt.h:
     4405
     44062009-07-08  Pradeepto Bhattacharya  <pradeepto@kde.org>
     4407
     4408        Reviewed by Ariya Hidayat.
     4409
     4410        Build fix.
     4411
     4412        * WebCoreSupport/FrameLoaderClientQt.h: Removed the slot slotCallPolicyFunction().
     4413
     44142009-07-08  Simon Hausmann  <hausmann@webkit.org>
     4415
     4416        Reviewed by Tor Arne VestbÞ.
     4417
     4418        https://bugs.webkit.org/show_bug.cgi?id=27080
     4419
     4420        Fix DRT instability issues with fast/loader/submit-form-while-parsing-2.html
     4421
     4422        When the form is submitted we call the policy function in the frame
     4423        loader delayed with a queued connection. That queued connection
     4424        sometimes interferes with the javascript timeout set in the testcase.
     4425
     4426        Eliminate the entire delayed policy function mechanism and instead always
     4427        call back directly, like in the other ports. In most other places we called
     4428        the slot directly anyway.
     4429
     4430        * WebCoreSupport/FrameLoaderClientQt.cpp:
     4431        (WebCore::FrameLoaderClientQt::FrameLoaderClientQt): Remove m_policyFunction.
     4432        (WebCore::FrameLoaderClientQt::callPolicyFunction): Call the policy function directly instead
     4433        of emitting the queued signal.
     4434        (WebCore::FrameLoaderClientQt::cancelPolicyCheck): Call callPolicyFunction directly.
     4435        (WebCore::FrameLoaderClientQt::dispatchWillSubmitForm): Ditto.
     4436        (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForMIMEType): Ditto.
     4437        (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNewWindowAction): Ditto.
     4438        (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction): Ditto.
     4439        * WebCoreSupport/FrameLoaderClientQt.h: Remove m_policyFunction as well as the associated
     4440        signal.
     4441
     44422009-07-07  Simon Hausmann  <hausmann@webkit.org>
     4443
     4444        Reviewed by Holger Freyther.
     4445
     4446        Add Qt DRT hook for clearing the frame name.
     4447
     4448        * Api/qwebframe.cpp:
     4449        (qt_drt_clearFrameName):
     4450
     44512009-07-05  Simon Hausmann  <hausmann@webkit.org>
     4452
     4453        Reviewed by Holger Freyther.
     4454
     4455        Fix two qdoc warnings.
     4456
     4457        Added missing \property for QWebFrame::hasFocus and added \a
     4458        tag for pos of QWebPage::frameAt.
     4459
     4460        * Api/qwebframe.cpp:
     4461        * Api/qwebpage.cpp:
     4462
     44632009-07-04  Holger Hans Peter Freyther  <zecke@selfish.org>
     4464
     4465        Reviewed by Simon Hausmann.
     4466
     4467        Use the recently introduced FocusController::setFocused
     4468
     4469        Use the recently introduced FocusController::setFocused
     4470        in the Qt platform. The SelectionController will be updated
     4471        from within the FocusController now.
     4472
     4473        * Api/qwebpage.cpp:
     4474        (QWebPagePrivate::focusInEvent):
     4475        (QWebPagePrivate::focusOutEvent):
     4476
     44772009-07-02  Simon Hausmann  <simon.hausmann@nokia.com>
     4478
     4479        Reviewed by Ariya Hidayat.
     4480
     4481        Improve documentation of QWebFrame::setFocus and hasFocus()
     4482        Added missing Q_PROPERTY for QWebFrame::hasFocus.
     4483
     4484        * Api/qwebframe.cpp: Clarify the docs.
     4485        * Api/qwebframe.h: add Q_PROPERTY(focus).
     4486
     44872009-07-02  Joe Ligman  <joseph.ligman@nokia.com>
     4488
     4489        Reviewed by Simon Hausmann.
     4490
     4491        Bug 26855: [Qt] New methods for QWebFrame to check and set focus.
     4492
     4493        Added new public methods QWebFrame::hasFocus() and QWebFrame::setFocus()
     4494        Added auto test.
     4495
     4496        * Api/qwebframe.cpp:
     4497        (QWebFrame::hasFocus):
     4498        (QWebFrame::setFocus):
     4499        * Api/qwebframe.h:
     4500        * tests/qwebframe/tst_qwebframe.cpp:
     4501
     45022009-07-01  Robert Hogan <robert@roberthogan.net>
     4503
     4504        Reviewed by NOBODY.
     4505       
     4506        Fix Qt segfault when javascript disabled.
     4507        If clients call addToJavaScriptWindowObject even though JavascriptEnabled is false
     4508        webkit will segfault on the assert:
     4509          ASSERTION FAILED: _rootObject
     4510          (../../../WebCore/bridge/runtime.cpp:52
     4511          JSC::Bindings::Instance::Instance(WTF::PassRefPtr<JSC::Bindings::RootObject>))
     4512        Fix is to ensure JavaScript is enabled when client calls addToJavaScriptWindowObject.
     4513
     4514        https://bugs.webkit.org/show_bug.cgi?id=26906
     4515
     4516        * Api/qwebframe.cpp:
     4517        (QWebFrame::addToJavaScriptWindowObject):
     4518
     45192009-07-01  Jakub Wieczorek  <faw217@gmail.com>
     4520
     4521        Reviewed by Simon Hausmann.
     4522
     4523        [Qt] Move some API headers from WebCore.pro to headers.pri so that they
     4524        get installed when running make install from the build directory.
     4525
     4526        * Api/headers.pri:
     4527
     45282009-07-01  Balazs Kelemen  <kelemen.balazs.3@stud.u-szeged.hu>
     4529
     4530        Reviewed by Simon Hausmann.
     4531
     4532        Fixed robotized QtLauncher to work when there is no index.html in the user's home.
     4533
     4534        * QtLauncher/main.cpp:
     4535        (main):
     4536
     45372009-06-30  Brian Weinstein  <bweinstein@apple.com>
     4538
     4539        Reviewed by Adam Roben.
     4540       
     4541        Renamed scrollbarUnderPoint to scrollbarAtPoint to follow conventions.
     4542
     4543        * Api/qwebpage.cpp:
     4544        (QWebPage::swallowContextMenuEvent):
     4545
     45462009-06-30  Joe Ligman  <joseph.ligman@nokia.com>
     4547
     4548        Reviewed by Adam Treat.
     4549
     4550        Bug 26422: [Qt] QWebPagePrivate::frameAt calculates wrong frame
     4551
     4552        Added a public method QWebPage::frameAt
     4553        Removed QWebPagePrivate::frameAt, which calcuated the wrong frame
     4554        Modified QWebPage::swallowContextMenuEvent to use the new frameAt method
     4555        New test case for frameAt added to tst_qwebpage.cpp
     4556
     4557        * Api/qwebpage.cpp:
     4558        (QWebPage::frameAt):
     4559        (QWebPage::swallowContextMenuEvent):
     4560        * Api/qwebpage.h:
     4561        * Api/qwebpage_p.h:
     4562        * tests/qwebpage/frametest/iframe.html: Added.
     4563        * tests/qwebpage/frametest/iframe2.html: Added.
     4564        * tests/qwebpage/frametest/iframe3.html: Added.
     4565        * tests/qwebpage/tst_qwebpage.cpp:
     4566        (frameAtHelper):
     4567        (tst_QWebPage::frameAt):
     4568        * tests/qwebpage/tst_qwebpage.qrc:
     4569
     45702009-06-30  Jakub Wieczorek  <faw217@gmail.com>
     4571
     4572        Reviewed by Simon Hausmann.
     4573
     4574        Add QWebFrame::baseUrl() function that exposes the base URL of a frame.
     4575        Autotests included.
     4576
     4577        * Api/qwebframe.cpp:
     4578        (QWebFrame::baseUrl):
     4579        * Api/qwebframe.h:
     4580        * tests/qwebframe/tst_qwebframe.cpp:
     4581
     45822009-06-29  Simon Hausmann  <simon.hausmann@nokia.com>
     4583
     4584        Fix the Qt build, add missing isSpeaking() implementation to
     4585        ContextMenuClient.
     4586
     4587        * WebCoreSupport/ContextMenuClientQt.cpp:
     4588        (WebCore::ContextMenuClientQt::isSpeaking):
     4589        * WebCoreSupport/ContextMenuClientQt.h:
     4590
     45912009-06-28  Sriram Yadavalli  <sriram.yadavalli@nokia.com>
     4592
     4593        Reviewed by Eric Seidel.
     4594
     4595        [Qt] Fix build break for Qt
     4596        https://bugs.webkit.org/show_bug.cgi?id=26779
     4597
     4598        * Api/qwebpage.cpp:
     4599        (QWebPage::swallowContextMenuEvent):
     4600
     46012009-06-27  Simon Hausmann  <simon.hausmann@nokia.com>
     4602
     4603        Build fix for Qt under Windows.
     4604
     4605        * Api/qwebhistory.h: Use consistent export linkage for the datastream operators.
     4606
     46072009-06-26  Brian Weinstein  <bweinstein@apple.com>
     4608
     4609        Reviewed by Simon Fraser.
     4610       
     4611        Changed call of scrollbarUnderMouse to scrollbarUnderPoint to match new API.
     4612
     4613        * Api/qwebpage.cpp:
     4614        (QWebPage::swallowContextMenuEvent):
     4615
     46162009-06-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
     4617
     4618        Reviewed by Simon Hausmann.
     4619
     4620        Add support for saving and loading of QWebHistory to and from a QByteArray.
     4621
     4622        This includes streaming operators for QWebHistory. for convenience.
     4623
     4624        New autotests that test QWebHistory and QWebHistoryItem serialization.
     4625
     4626        * Api/qwebhistory.cpp:
     4627        (QWebHistory::restoreState):
     4628        (QWebHistory::saveState):
     4629        (operator<<):
     4630        (operator>>):
     4631        * Api/qwebhistory.h:
     4632        * Api/qwebhistory_p.h:
     4633        * tests/qwebhistory/tst_qwebhistory.cpp:
     4634        (tst_QWebHistory::):
     4635        (tst_QWebHistory::init):
     4636        (tst_QWebHistory::title):
     4637        (tst_QWebHistory::count):
     4638        (tst_QWebHistory::back):
     4639        (tst_QWebHistory::forward):
     4640        (tst_QWebHistory::itemAt):
     4641        (tst_QWebHistory::goToItem):
     4642        (tst_QWebHistory::items):
     4643        (tst_QWebHistory::serialize_1):
     4644        (tst_QWebHistory::serialize_2):
     4645        (tst_QWebHistory::serialize_3):
     4646        (tst_QWebHistory::saveAndRestore_1):
     4647        (tst_QWebHistory::saveAndRestore_2):
     4648        (tst_QWebHistory::saveAndRestore_3):
     4649
     46502009-06-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
     4651
     4652        Reviewed by Simon Hausmann.
     4653
     4654        Fix the behaviour of QWebHistory::itemAt to interpret the specified index as absolute index.
     4655
     4656        Returns an invalid QWebHistoryItem if the index is out of range.
     4657
     4658        * Api/qwebhistory.cpp:
     4659        (QWebHistory::itemAt):
     4660        * tests/qwebhistory/tst_qwebhistory.cpp:
     4661        (tst_QWebHistory::itemAt):
     4662
     46632009-06-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
     4664
     4665        Reviewed by Simon Hausmann.
     4666
     4667        Added a few autotest to QWebHistory.
     4668
     4669        * tests/qwebhistory/data/page1.html: Added.
     4670        * tests/qwebhistory/data/page2.html: Added.
     4671        * tests/qwebhistory/data/page3.html: Added.
     4672        * tests/qwebhistory/data/page4.html: Added.
     4673        * tests/qwebhistory/data/page5.html: Added.
     4674        * tests/qwebhistory/data/page6.html: Added.
     4675        * tests/qwebhistory/qwebhistory.pro: Added.
     4676        * tests/qwebhistory/tst_qwebhistory.cpp: Added.
     4677        (tst_QWebHistory::):
     4678        (tst_QWebHistory::tst_QWebHistory):
     4679        (tst_QWebHistory::~tst_QWebHistory):
     4680        (tst_QWebHistory::init):
     4681        (tst_QWebHistory::cleanup):
     4682        (tst_QWebHistory::title):
     4683        (tst_QWebHistory::count):
     4684        (tst_QWebHistory::back):
     4685        (tst_QWebHistory::forward):
     4686        (tst_QWebHistory::goToItem):
     4687        (tst_QWebHistory::items):
     4688        * tests/qwebhistory/tst_qwebhistory.qrc: Added.
     4689        * tests/tests.pro:
     4690
     46912009-06-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
     4692
     4693        Reviewed by Simon Hausmann.
     4694
     4695        Fix support for documenting functions prefixed with QWEBKIT_EXPORT
     4696
     4697        Add QWEBKIT_EXPORT to the list of macros to ignore by qdoc.
     4698
     4699        * docs/qtwebkit.qdocconf:
     4700
     47012009-06-26  Yongjun Zhang  <yongjun.zhang@nokia.com>
     4702
     4703        Reviewed by Eric Seidel.
     4704
     4705        Bug 20303: [Qt] Key events are not working in frames.
     4706
     4707        Send scrolling events to current focused frame, bubble the event
     4708        up to parent frame if it is not handled.  Use EventHandler's new
     4709        shared scrolling code.
     4710
     4711        * Api/qwebpage.cpp:
     4712        (QWebPagePrivate::keyPressEvent):
     4713        (QWebPagePrivate::handleScrolling):
     4714        * Api/qwebpage_p.h:
     4715
     47162009-06-25  Jakub Wieczorek  <faw217@gmail.com>
     4717
     4718        Reviewed by Adam Treat.
     4719
     4720        Add highlight functionality to the QWebPage::findText() method. Introduced is
     4721        new HighlightAllOccurrences flag which passed to the function will make it mark
     4722        all existing occurrences of specified string in the page.
     4723
     4724        * Api/qwebpage.cpp:
     4725        (QWebPage::findText):
     4726        * Api/qwebpage.h:
     4727        * Api/qwebview.cpp:
     4728
     47292009-06-19  Daniel Teske <qt-info@nokia.com>
     4730
     4731        Reviewed by Simon Hausmann.
     4732
     4733        Remove warnings for QString() constructions from const char *
     4734
     4735        By explicitly wrapping it with QLatin1String() / QLatin1Char()
     4736
     4737        * Api/qwebelement.cpp:
     4738        (QWebElement::classes): Use QLatin1String.
     4739        (QWebElement::addClass): Ditto.
     4740        (QWebElement::removeClass): Ditto.
     4741        (QWebElement::toggleClass): Ditto.
     4742
     47432009-06-18  Friedemann Kleint  <Friedemann.Kleint@nokia.com>
     4744
     4745        Reviewed by Simon Hausmann.
     4746
     4747        Fixed MinGW compilation.
     4748
     4749        * Api/qwebelement.cpp:
     4750        (QWebElement::evaluateScript):
     4751
     47522009-06-18  Markus Goetz <Markus.Goetz@nokia.com>
     4753
     4754        Reviewed by Simon Hausman.
     4755
     4756        Clarify in docs how to compile with debug information.
     4757
     4758        * docs/qtwebkit.qdoc:
     4759
     47602009-06-17  Markus Goetz <Markus.Goetz@nokia.com>
     4761
     4762        Reviewed by Simon Hausmann.
     4763
     4764        QWebPage: Don't call supportsSsl()
     4765
     4766        This stops QWebPage from loading the OpenSSL libs,
     4767        certificates etc. when they are not needed for the non-HTTPS case.
     4768
     4769        Loading the SSL libraries can be a very slow operation.
     4770
     4771        * Api/qwebpage.cpp:
     4772        (QWebPage::userAgentForUrl):
     4773
     47742009-06-16  David Boddie  <dboddie@trolltech.com>
     4775
     4776        Reviewed by Simon Hausmann.
     4777
     4778        Doc: Fixed QWebPage::forwardUnsupportedContent documentation and added
     4779        more information about Web plugins.
     4780
     4781        * Api/qwebpage.cpp:
     4782        * Api/qwebsettings.cpp:
     4783        * docs/qtwebkit.qdoc:
     4784
     47852009-06-16  Morten Engvoldsen  <morten.engvoldsen@nokia.com>
     4786
     4787        Reviewed by Ariya Hidayat.
     4788
     4789        Clearifying QWebFrame docs
     4790
     4791        Adding docs to toHtml() and toPlainText()
     4792
     4793        * Api/qwebframe.cpp:
     4794
     47952009-06-15  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
     4796
     4797        Reviewed by Adam Treat.
     4798
     4799        Support the back/forward/stop/refresh multimedia keys and accept the
     4800        event when handling backspace and shift backspace as we should.
     4801
     4802        * Api/qwebpage.cpp:
     4803        (QWebPagePrivate::keyPressEvent):
     4804
     48052009-06-15  Andre Pedralho  <andre.pedralho@openbossa.org>
     4806
     4807        Reviewed by Adam Treat.
     4808
     4809        https://bugs.webkit.org/show_bug.cgi?id=26351
     4810        Remove bool QWebHitTestResult::isScrollBar() const and make sure a null QWebHitTestResult is returned instead.
     4811
     4812        * Api/qwebframe.cpp:
     4813        (QWebFrame::hitTestContent):
     4814        * Api/qwebframe.h:
     4815        * Api/qwebpage.cpp:
     4816        (QWebPage::updatePositionDependentActions):
     4817
     48182009-06-15  Simon Hausmann  <simon.hausmann@nokia.com>
     4819
     4820        Reviewed by Adam Treat.
     4821
     4822        Fix the logic for disabling the fixed layout feature, when an invalid
     4823        QSize is set.
     4824
     4825        * Api/qwebpage.cpp:
     4826        (QWebPage::setFixedContentsSize):
     4827
     48282009-06-13  Adam Barth  <abarth@webkit.org>
     4829
     4830        Reviewed by Darin Fisher.
     4831
     4832        https://bugs.webkit.org/show_bug.cgi?id=24492
     4833
     4834        Move registerURLSchemeAsLocal from FrameLoader to SecurityOrigin.
     4835
     4836        * Api/qwebpage.cpp:
     4837        (QWebPage::acceptNavigationRequest):
     4838
     48392009-06-10  Antonio Gomes   <antonio.gomes@openbossa.org>
     4840
     4841        Reviewed by Ariya Hidayat.
     4842
     4843        Documented ResolveRule and StylePriority enum values as well as their use in
     4844        QWebElement::styleProperty and QWebElement::setStyleProperty methods.
     4845
     4846        Based on the work of Simon Hausmann.
     4847
     4848        * Api/qwebelement.cpp:
     4849        (QWebElement::styleProperty):
     4850        (QWebElement::setStyleProperty):
     4851        * Api/qwebelement.h:
     4852
     48532009-06-09  Ariya Hidayat  <ariya.hidayat@nokia.com>
     4854
     4855        Rubber-stamped by Simon Hausmann.
     4856
     4857        Fix qdoc warning, function parameter string must be referred.
     4858
     4859        * Api/qwebview.cpp:
     4860
     48612009-06-09  Simon Hausmann  <simon.hausmann@nokia.com>
     4862
     4863        Reviewed by Ariya Hidayat.
     4864
     4865        Renamed QWebSettings::AllowUniversalAccessFromFileUrls to
     4866        LocalContentCanAccessRemoteUrls, as discussed in the API review.
     4867
     4868        * Api/qwebsettings.cpp:
     4869        (QWebSettingsPrivate::apply):
     4870        (QWebSettings::QWebSettings):
     4871        * Api/qwebsettings.h:
     4872
     48732009-06-09  Simon Hausmann  <simon.hausmann@nokia.com>
     4874
     4875        Reviewed by Ariya Hidayat.
     4876
     4877        Merged useFixedLayout property with fixedLayoutSize and
     4878        renamed the latter to fixedContentsSize.
     4879
     4880        * Api/qwebpage.cpp:
     4881        (QWebPage::fixedContentsSize):
     4882        (QWebPage::setFixedContentsSize):
     4883        * Api/qwebpage.h:
     4884        * WebCoreSupport/FrameLoaderClientQt.cpp:
     4885        (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage):
     4886
     48872009-06-09  Simon Hausmann  <simon.hausmann@nokia.com>
     4888
     4889        Reviewed by Ariya Hidayat.
     4890
     4891        Renamed QWebHitTestResult::linkTarget to linkElement() and made it return
     4892        a QWebElement. The link target itself is always the target DOM attribute.
     4893
     4894        * Api/qwebframe.cpp:
     4895        (QWebHitTestResultPrivate::QWebHitTestResultPrivate):
     4896        (QWebHitTestResult::linkElement):
     4897        * Api/qwebframe.h:
     4898        * Api/qwebframe_p.h:
     4899        * tests/qwebframe/tst_qwebframe.cpp:
     4900
     49012009-06-08  Simon Hausmann  <simon.hausmann@nokia.com>
     4902
     4903        Reviewed by Holger Freyther.
     4904
     4905        Renamed QWebElement::enclosingBlock to enclosingBlockElement
     4906        and changed the return type to QWebElement, as discussed in
     4907        the API review. This API is more generic and through
     4908        QWebElement's geometry() it is possible to retrieve the
     4909        same information.
     4910
     4911        * Api/qwebelement.cpp:
     4912        (QWebElement::QWebElement):
     4913        * Api/qwebelement.h:
     4914        * Api/qwebframe.cpp:
     4915        (QWebHitTestResultPrivate::QWebHitTestResultPrivate):
     4916        (QWebHitTestResult::enclosingBlockElement):
     4917        * Api/qwebframe.h:
     4918        * Api/qwebframe_p.h:
     4919
     49202009-06-05  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     4921
     4922        Reviewed by Simon Hausmann.
     4923
     4924        [Qt] Add missing includes of config.h
     4925
     4926        * Api/qcookiejar.cpp:
     4927        * Api/qwebnetworkinterface.cpp:
     4928        * Plugins/ICOHandler.cpp:
     4929        * WebCoreSupport/DragClientQt.cpp:
     4930        * WebCoreSupport/EditCommandQt.cpp:
     4931
     49322009-06-03  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
     4933
     4934        Reviewed by Simon Hausmann.
     4935
     4936        Add API to make it possible to clear all memory caches used by
     4937        QtWebKit.
     4938
     4939        * Api/qwebsettings.cpp:
     4940        (QWebSettings::clearMemoryCaches):
     4941        * Api/qwebsettings.h:
     4942
     49432009-06-01  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
     4944
     4945        Rubber-stamped by Gustavo Noronha.
     4946
     4947        Before guessing the url trim the string to remove whitespace added to the start/end by the user.
     4948
     4949        * Api/qwebview.cpp:
     4950        (QWebView::guessUrlFromString):
     4951        * tests/qwebview/tst_qwebview.cpp:
     4952        (tst_QWebView::guessUrlFromString_data):
     4953
     49542009-06-01  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
     4955
     4956        Rubber-stamped by Gustavo Noronha.
     4957
     4958        Use QLatin1Char() to compile when QT_NO_CAST_FROM_ASCII and QT_NO_CAST_TO_ASCII is defined
     4959
     4960        * Api/qwebview.cpp:
     4961        (QWebView::guessUrlFromString):
     4962
     49632009-06-01  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
     4964
     4965        Rubber-stamped by Gustavo Noronha.
     4966
     4967        Cleanup autotest file
     4968        - use proper includes
     4969        - remove useless constructor and destructor
     4970        - add missing newline at the end of the file
     4971
     4972        * tests/qwebview/tst_qwebview.cpp:
     4973
     49742009-06-01  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
     4975
     4976        Rubber-stamped by Gustavo Noronha.
     4977
     4978        Add a missing space between two words in the documentation.
     4979
     4980        * Api/qwebview.cpp:
     4981
     49822009-05-26  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
     4983
     4984        Reviewed by Holger Freyther.
     4985
     4986        https://bugs.webkit.org/show_bug.cgi?id=25823
     4987
     4988        Add an API to generate a QUrl out of a string correcting for errors and missing information.
     4989        See the API documentation for more details about the function.
     4990
     4991        Autotests: included
     4992
     4993        * Api/qwebview.cpp:
     4994        (QWebView::guessUrlFromString):
     4995        * Api/qwebview.h:
     4996        * QtLauncher/main.cpp:
     4997        (MainWindow::MainWindow):
     4998        (MainWindow::changeLocation):
     4999        * tests/qwebview/.gitignore: Added.
     5000        * tests/qwebview/qwebview.pro:
     5001        (tst_QWebView::initTestCase):
     5002        (tst_QWebView::cleanupTestCase):
     5003        (tst_QWebView::init):
     5004        (tst_QWebView::cleanup):
     5005        (tst_QWebView::guessUrlFromString_data):
     5006        (tst_QWebView::guessUrlFromString):
     5007
     50082009-05-23  David Kilzer  <ddkilzer@apple.com>
     5009
     5010        Part 2 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr
     5011
     5012        <https://bugs.webkit.org/show_bug.cgi?id=25495>
     5013
     5014        Reviewed by Oliver Hunt.
     5015
     5016        * WebCoreSupport/ChromeClientQt.h:
     5017        (WebCore::ChromeClientQt::createHTMLParserQuirks): Return a
     5018        PassOwnPtr<> instead of a raw HTMLParserQuirks pointer.
     5019
     50202009-05-23  Jakob Truelsen  <antialize@gmail.com>
     5021
     5022        Reviewed by Holger Freyther.
     5023
     5024        https://bugs.webkit.org/show_bug.cgi?id=25863
     5025
     5026        Expose the default text encoding property to Qt.
     5027
     5028        * Api/qwebsettings.cpp:
     5029        (QWebSettingsPrivate::apply):
     5030        (QWebSettings::setDefaultTextEncoding):
     5031        (QWebSettings::defaultTextEncoding):
     5032        * Api/qwebsettings.h:
     5033
     50342009-05-21  Antonio Gomes   <antonio.gomes@openbossa.org>
     5035
     5036        Reviewed by Simon Hausmann.
     5037
     5038        [Qt] Additional test for resource load (CSS file) for QWebFrame.
     5039
     5040        * tests/qwebframe/qwebframe.qrc:
     5041        * tests/qwebframe/style.css: Added.
     5042        * tests/qwebframe/tst_qwebframe.cpp:
     5043
     50442009-05-22  Simon Hausmann  <simon.hausmann@nokia.com>
     5045
     5046        Unreviewed Qt build fix.
     5047
     5048        Provide dummy implementation of pure virtual EditorClient method.
     5049
     5050        * WebCoreSupport/EditorClientQt.cpp:
     5051        (WebCore::EditorClientQt::getAutoCorrectSuggestionForMisspelledWord):
     5052        * WebCoreSupport/EditorClientQt.h:
     5053
     50542009-05-20  Ariya Hidayat  <ariya.hidayat@nokia.com>
     5055
     5056        Reviewed by Simon Hausmann and Holger Freyther.
     5057
     5058        [Qt] Add renderHints property to QWebView.
     5059
     5060        * Api/qwebview.cpp:
     5061        (QWebViewPrivate::QWebViewPrivate):
     5062        (QWebView::renderHints):
     5063        (QWebView::setRenderHints):
     5064        (QWebView::setRenderHint):
     5065        (QWebView::paintEvent):
     5066        * Api/qwebview.h:
     5067        * tests/qwebview/qwebview.pro: Added.
     5068        * tests/qwebview/tst_qwebview.cpp: Added.
     5069        (tst_QWebView::tst_QWebView):
     5070        (tst_QWebView::~tst_QWebView):
     5071        (tst_QWebView::init):
     5072        (tst_QWebView::cleanup):
     5073        (tst_QWebView::renderHints):
     5074        * tests/tests.pro:
     5075
     50762009-05-20  Holger Hans Peter Freyther  <zecke@selfish.org>
     5077
     5078        Reviewed by Darin Adler.
     5079
     5080        https://bugs.webkit.org/show_bug.cgi?id=25834
     5081
     5082        Make ChromeClient a interface again
     5083
     5084        With recent additions to ChromeClient.h empty defaults were
     5085        added. This is bad for porters as these changes go unnoticed
     5086        and at runtime no notImplemented warning is logged and grepping
     5087        for notImplemented will not show anything. Change this Client
     5088        to be like the other Clients again and always have pure virtuals
     5089        (but for stuff inside #ifdef PLATFORM(MAC)).
     5090
     5091        Update the various WebKit/* implementations to compile again.
     5092
     5093        * WebCoreSupport/ChromeClientQt.cpp:
     5094        (WebCore::ChromeClientQt::setCursor):
     5095        (WebCore::ChromeClientQt::requestGeolocationPermissionForFrame):
     5096        * WebCoreSupport/ChromeClientQt.h:
     5097        (WebCore::ChromeClientQt::scrollRectIntoView):
     5098
     50992009-05-19  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
     5100
     5101        Reviewed by Simon Hausmann.
     5102
     5103        Fix a plugin bug in the WebKit code, similar to the one in WebCore.
     5104
     5105        The problem is when a non visible QtPluginWidget would show it self
     5106        in a sibling frame. The problem was due to our clipping. In Qt,
     5107        if setMask is set with an empty QRegion, no clipping will
     5108        be performed, so in that case we hide the PluginContainer
     5109
     5110        * WebCoreSupport/FrameLoaderClientQt.cpp:
     5111        (WebCore::):
     5112
     51132009-05-18  Zoltan Horvath <horvath.zoltan.6@stud.u-szeged.hu>
     5114
     5115        Reviewed by Ariya Hidayat.
     5116
     5117        Makes QtLauncher to accept multiple urls in command line and opens these in separate windows.
     5118
     5119        * QtLauncher/main.cpp:
     5120        (MainWindow::newWindow):
     5121        (main):
     5122
     51232009-05-14  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
     5124
     5125        Reviewed by Ariya Hidayat.
     5126
     5127        Add a comment to QWebView::iconChanged(), mentioning that you will
     5128        need to set the icon database path for icons to be loaded, and thus
     5129        receive the signal.
     5130
     5131        * Api/qwebview.cpp:
     5132
     51332009-05-14  Yael Aharon  <yael.aharon@nokia.com>
     5134
     5135        Reviewed by Ariya Hidayat.
     5136
     5137        Fix setHtml test case by adding <head> tag to the expected result. This tag is automatically added by WebKit.
     5138
     5139        * tests/qwebframe/tst_qwebframe.cpp:
     5140
     51412009-05-14  Yael Aharon  <yael.aharon@nokia.com>
     5142
     5143        Reviewed by Ariya Hidayat.
     5144
     5145        Add a test case for the signal urlChanged().
     5146        * tests/qwebframe/tst_qwebframe.cpp:
     5147
     51482009-05-13  Yael Aharon <yael.aharon@nokia.com>
     5149
     5150        Reviewed by Ariya Hidayat.
     5151
     5152        Move emitting the signal QWebFrame::urlChanged to FrameLoaderClientQt::dispatchDidCommitLoad().
     5153        This is to ensure that urlChanged() is emitted even if the frame has no title.
     5154
     5155        * WebCoreSupport/FrameLoaderClientQt.cpp:
     5156        (WebCore::FrameLoaderClientQt::dispatchDidReceiveTitle):
     5157        (WebCore::FrameLoaderClientQt::dispatchDidCommitLoad):
     5158
     51592009-05-13  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
     5160
     5161        Rubberstamped by Ariya Hidayat.
     5162
     5163        Fix coding style: Add {} to contents of if, containing a for loop.
     5164
     5165        * Api/qwebelement.cpp:
     5166        (QWebElement::styleProperty):
     5167
     51682009-05-12  Antonio Gomes   <antonio.gomes@openbossa.org>
     5169
     5170        Reviewed by Ariya Hidayat.
     5171
     5172        Fixed a possible crash @styleProperty when there is no embedded/external CSS set.
     5173
     5174        * Api/qwebelement.cpp:
     5175        (QWebElement::styleProperty):
     5176        * tests/qwebelement/tst_qwebelement.cpp:
     5177        (tst_QWebElement::style):
     5178
     51792009-05-12  Antonio Gomes   <antonio.gomes@openbossa.org>
     5180
     5181        Reviewed by Ariya Hidayat.
     5182
     5183        Added external CSS test cases to QWebElement::styleProperty() method.
     5184
     5185        Also some ::styleProperty() tests cleanup.
     5186
     5187        * tests/qwebelement/tst_qwebelement.cpp:
     5188        (tst_QWebElement::style):
     5189
     51902009-05-12  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
     5191
     5192        Reviewed by Ariya Hidayat.
     5193
     5194        Many methods were not considering the case of the element not having
     5195        siblings or children when inserting nodes, and thus broke in some
     5196        situations. This patch fixes that.
     5197
     5198        * Api/qwebelement.cpp:
     5199        (QWebElement::prependInside):
     5200        (QWebElement::appendOutside):
     5201        (QWebElement::encloseWith):
     5202
     52032009-05-08  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
     5204
     5205        Reviewed by Ariya Hidayat.
     5206
     5207        Make is possible to mark a style property as important while setting
     5208        it. Also support the normal CSS property syntax "!important", while
     5209        accepting spaces between the ! and the important keyword.
     5210
     5211        * Api/qwebelement.cpp:
     5212        (QWebElement::setStyleProperty):
     5213        * Api/qwebelement.h:
     5214        * tests/qwebelement/tst_qwebelement.cpp:
     5215        (tst_QWebElement::style):
     5216
     52172009-05-08  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
     5218
     5219        Reviewed by Ariya Hidayat.
     5220
     5221        Working with Antonio Gomes.
     5222
     5223        Add support for finding the style property actually applied to the element.
     5224
     5225        * Api/qwebelement.cpp:
     5226        (QWebElement::styleProperty):
     5227        * Api/qwebelement.h:
     5228        * tests/qwebelement/tst_qwebelement.cpp:
     5229        (tst_QWebElement::style):
     5230
     52312009-05-11  Norbert Leser  <norbert.leser@nokia.com>
     5232
     5233        Reviewed by Darin Adler.
     5234
     5235        Bug 24538: class/struct mixup in forward declarations
     5236        https://bugs.webkit.org/show_bug.cgi?id=24538
     5237
     5238        * Api/qwebpage.h:
     5239
     52402009-05-11  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     5241
     5242        Reviewed by Holger Freyther.
     5243
     5244        Fix Qt build when ENABLE_DATABASE is turned off
     5245
     5246        https://bugs.webkit.org/show_bug.cgi?id=25587
     5247
     5248        * Api/qwebdatabase.cpp:
     5249        (QWebDatabase::displayName):
     5250        (QWebDatabase::expectedSize):
     5251        (QWebDatabase::size):
     5252        (QWebDatabase::fileName):
     5253        (QWebDatabase::removeDatabase):
     5254        * Api/qwebdatabase_p.h:
     5255        * Api/qwebsecurityorigin.cpp:
     5256        (QWebSecurityOrigin::allOrigins):
     5257        (QWebSecurityOrigin::databases):
     5258
     52592009-05-05  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
     5260
     5261        Reviewed by Simon Hausmann.
     5262
     5263        Improve behaviour of the QWebElement enclose* functions, to work
     5264        similar to the jQuery wrap functions. We now enclose the contents
     5265        of the element in the child of the deepest descendant element
     5266        within the structure of the enclose element structure given.
     5267
     5268        * Api/qwebelement.cpp:
     5269        (findInsertionPoint):
     5270        (QWebElement::encloseContentsWith):
     5271        (QWebElement::encloseWith):
     5272        (QWebElement::replace):
     5273        * tests/qwebelement/tst_qwebelement.cpp:
     5274        (tst_QWebElement::encloseContentsWith):
     5275        (tst_QWebElement::encloseWith):
     5276
     52772009-05-06  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
     5278
     5279        Reviewed by Simon Hausmann.
     5280
     5281        After commit rev @43215, setHtml() without a <head> tag,
     5282        automatically adds it, so update our test case to respect this.
     5283
     5284        * tests/qwebelement/tst_qwebelement.cpp:
     5285        (tst_QWebElement::textHtml):
     5286
     52872009-05-06  Simon Hausmann  <simon.hausmann@nokia.com>
     5288
     5289        Unreviewed Qt build fix.
     5290
     5291        Dont' use ENABLE() in Qt API headers, as they are not available when building
     5292        against the API.
    735293
    745294        * Api/qwebdatabase.h:
    755295        * Api/qwebsecurityorigin.h:
    765296
    77 2009-03-19  David Boddie  <dboddie@trolltech.com>
    78 
    79         Reviewed by Simon Hausmann.
    80 
    81         Doc: Removed obsolete warning about Flash and other plugins.
    82 
    83         * Api/qwebsettings.cpp:
    84 
    85 2009-03-19  Paul Olav Tvete  <paul.tvete@nokia.com>
    86 
    87         Reviewed by Simon Hausmann.
    88 
    89         Properly escape tooltip text
    90 
    91         ManualTest: http://xkcd.com/554/
    92 
     52972009-05-05  Ben Murdoch  <benm@google.com>
     5298
     5299        Reviewed by Eric Seidel.
     5300       
     5301        Add #if ENABLE(DATABASE) guards around database code so toggling ENABLE_DATABASE off does not break builds.
     5302        https://bugs.webkit.org/show_bug.cgi?id=24776
     5303
     5304        * Api/qwebdatabase.cpp:
     5305        * Api/qwebdatabase.h:
     5306        * Api/qwebdatabase_p.h:
     5307        * Api/qwebsecurityorigin.cpp:
     5308        (QWebSecurityOrigin::databaseUsage):
     5309        (QWebSecurityOrigin::databaseQuota):
     5310        (QWebSecurityOrigin::setDatabaseQuota):
     5311        * Api/qwebsecurityorigin.h:
    935312        * WebCoreSupport/ChromeClientQt.cpp:
    94         (WebCore::ChromeClientQt::setToolTip):
    95 
    96 2009-03-03  Ariya Hidayat  <ariya.hidayat@trolltech.com>
    97 
    98         Rubber-stamped by Simon Hausmann.
    99 
    100         [Qt] Create and update the action for SelectAll.
    101 
    102         * Api/qwebpage.cpp:
    103         (QWebPagePrivate::updateAction):
    104         (QWebPagePrivate::updateEditorActions):
    105         (QWebPage::action):
    106         * tests/qwebpage/tst_qwebpage.cpp:
    107         (tst_QWebPage::textSelection):
    108 
    109 2009-02-25  Kavindra Palaraja  <kavindra.palaraja@nokia.com>
    110 
    111         Reviewed by Simon Hausmann.
    112 
    113         Fix the documentation for the linkHovered signal.
    114 
    115         * Api/qwebpage.cpp:
    116 
    117 2009-02-23  Thiago Macieira  <thiago.macieira@nokia.com>
    118 
    119         Reviewed by Simon Hausmann.
    120 
    121         Fix the Copyright notices in a few files
    122 
    123         * WebKit_pch.h:
    124 
    125 2008-12-13  Holger Hans Peter Freyther  <zecke@selfish.org>
    126 
    127         Reviewed by NOBODY (OOPS!).
     5313        (WebCore::ChromeClientQt::exceededDatabaseQuota):
     5314        * WebCoreSupport/ChromeClientQt.h:
     5315
     53162009-05-05  Simon Hausmann  <simon.hausmann@nokia.com>
     5317
     5318        Reviewed by Tor Arne VestbÞ.
     5319
     5320        Various improvements to the class documentation, including a simple snippet for QWebElement.
     5321
     5322        * Api/qwebelement.cpp:
     5323        * Api/qwebframe.cpp:
     5324        * docs/webkitsnippets/webelement/main.cpp: Added.
     5325        * docs/webkitsnippets/webelement/webelement.pro: Added.
     5326
     53272009-05-05  Simon Hausmann  <simon.hausmann@nokia.com>
     5328
     5329        Reviewed by Ariya Hidayat.
     5330
     5331        Simplify variant conversion by moving the null check into
     5332        convertValueToQVariant.
     5333
     5334        * Api/qwebframe.cpp:
     5335        (QWebFrame::evaluateJavaScript): Moved null check into conversion function.
     5336        * tests/qwebframe/tst_qwebframe.cpp:
     5337        Added test to verify the correct conversion of null values to QVariant.
     5338
     53392009-05-01  Geoffrey Garen  <ggaren@apple.com>
     5340
     5341        Rubber Stamped by Sam Weinig.
     5342       
     5343        Renamed JSValuePtr => JSValue.
     5344
     5345        * Api/qwebelement.cpp:
     5346        (setupScriptContext):
     5347        (setupScriptObject):
     5348        (QWebElement::evaluateScript):
     5349        (QWebElement::functions):
     5350        (QWebElement::scriptableProperty):
     5351        (QWebElement::setScriptableProperty):
     5352        (QWebElement::scriptableProperties):
     5353
     53542009-05-01  Pavel Feldman  <pfeldman@chromium.org>
     5355
     5356        Reviewed by Timothy Hatcher.
     5357
     5358        Add a FrameLoaderClient callback for the ResourceRetrievedByXMLHttpRequest.
     5359
     5360        https://bugs.webkit.org/show_bug.cgi?id=25347
     5361
     5362        * WebCoreSupport/FrameLoaderClientQt.cpp:
     5363        (WebCore::FrameLoaderClientQt::dispatchDidLoadResourceByXMLHttpRequest):
     5364        * WebCoreSupport/FrameLoaderClientQt.h:
     5365
     53662009-04-30  David Kilzer  <ddkilzer@apple.com>
     5367
     5368        Provide a mechanism to create a quirks delegate for HTMLParser
     5369
     5370        Reviewed by David Hyatt.
     5371
     5372        * WebCoreSupport/ChromeClientQt.h:
     5373        (WebCore::ChromeClientQt::createHTMLParserQuirks): Added.  The
     5374        default implementation of this factory method returns 0.
     5375
     53762009-04-30  Ariya Hidayat  <ariya.hidayat@nokia.com>
     5377
     5378        Unreviewed build fix after r43072.
     5379
     5380        * Api/qwebframe.cpp:
     5381        (qt_drt_setJavaScriptProfilingEnabled): Enclose with JAVASCRIPT_DEBUGGER.
     5382
     53832009-04-30  Ariya Hidayat  <ariya.hidayat@nokia.com>
     5384
     5385        Unreviewed build fix after r43063.
     5386
     5387        * WebCoreSupport/ChromeClientQt.cpp:
     5388        (WebCore::ChromeClientQt::addMessageToConsole):
     5389        * WebCoreSupport/ChromeClientQt.h:
     5390
     53912009-04-30  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
     5392
     5393        Reviewed by Simon Hausmann.
     5394
     5395        Implement encloseContentsWith and rename wrap to encloseWith.
     5396
     5397        Also in encloseWith, make sure that you cannot enclose with
     5398        non-enclosable elements.
     5399
     5400        * Api/qwebelement.cpp:
     5401        (QWebElement::encloseContentsWith):
     5402        (QWebElement::encloseWith):
     5403        * Api/qwebelement.h:
     5404        * tests/qwebelement/tst_qwebelement.cpp:
     5405        (tst_QWebElement::encloseContentsWith):
     5406        (tst_QWebElement::encloseWith):
     5407
     54082009-04-30  Holger Hans Peter Freyther  <zecke@selfish.org>
     5409
     5410        Reviewed by Darin Adler.
    1285411
    1295412        The Qt API exposes a global history patch CSSStyleSelector to make API consumers work again
     
    1625445        * tests/tests.pro:
    1635446
     54472009-04-30  Ariya Hidayat  <ariya.hidayat@nokia.com>
     5448
     5449        Unreviewed build fix, after r43035.
     5450
     5451        Temporarily use Position::deprecatedEditingOffset().
     5452
     5453        * Api/qwebpage.cpp:
     5454        (QWebPage::inputMethodQuery):
     5455
     54562009-03-27  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
     5457
     5458        Reviewed by Simon Hausmann.
     5459
     5460        Update the page actions when a finishing loading even if the frame is
     5461        not the top frame such as when browsing inside of a website with frames.
     5462        https://bugs.webkit.org/show_bug.cgi?id=24890
     5463
     5464        * WebCoreSupport/FrameLoaderClientQt.cpp:
     5465        (WebCore::FrameLoaderClientQt::dispatchDidFinishLoad):
     5466        * tests/qwebpage/frametest/frame_a.html: Added.
     5467        * tests/qwebpage/frametest/index.html: Added.
     5468        * tests/qwebpage/tst_qwebpage.cpp:
     5469        (tst_QWebPage::backActionUpdate):
     5470
     54712009-04-29  Ariya Hidayat  <ariya.hidayat@nokia.com>
     5472
     5473        Reviewed by Simon Hausmann.
     5474
     5475        Implement QWebElement::evaluateScript.
     5476
     5477        * Api/qwebelement.cpp:
     5478        (setupScriptContext):
     5479        (QWebElement::evaluateScript):
     5480        * Api/qwebelement.h:
     5481        * tests/qwebelement/tst_qwebelement.cpp:
     5482        (tst_QWebElement::evaluateScript):
     5483
     54842009-04-29  Simon Hausmann  <simon.hausmann@nokia.com>
     5485
     5486        Reviewed by Ariya Hidayat.
     5487
     5488        Replaced QWebElementCollection with QList<QWebElement>.
     5489
     5490        * Api/qwebelement.cpp:
     5491        (QWebElement::findAll):
     5492        * Api/qwebelement.h:
     5493        * Api/qwebframe.cpp:
     5494        (QWebFrame::findAllElements):
     5495        * Api/qwebframe.h:
     5496        * QtLauncher/main.cpp:
     5497        (MainWindow::selectElements):
     5498        * tests/qwebelement/tst_qwebelement.cpp:
     5499        (tst_QWebElement::simpleCollection):
     5500        (tst_QWebElement::namespaceURI):
     5501        (tst_QWebElement::nullSelect):
     5502
     55032009-04-28  Simon Hausmann  <simon.hausmann@nokia.com>
     5504
     5505        Reviewed by Tor Arne VestbÞ.
     5506
     5507        QWebElement API changes after another round of API review:
     5508
     5509        * Fix argument names of findAll/findFirst
     5510        * Split up toXml into innerXml and outerXml
     5511        * Removed confusing toggleClass overload
     5512        * Fixed casing of namespaceUri to follow QXmlStreamReader
     5513        * Removed tagName from firstChild/nextSibling/etc.
     5514        * Renamed append/prepend/insertAfter/insertBefore to [append|prepend][Inside|Outside]
     5515        * Renamed wrapWith() back to wrap()
     5516        * Made clone() const
     5517        * Renamed remove() to takeFromDocument(), added removeFromDocument()
     5518        * Renamed clear() to removeChildren()
     5519        * Renamed scriptsFunctions/callScriptFunction to functions()/callFunction()
     5520        * Renamed scriptProperty to scriptableProperty
     5521
     5522        * Api/qwebelement.cpp:
     5523        (QWebElement::findAll):
     5524        (QWebElement::findFirst):
     5525        (QWebElement::setOuterXml):
     5526        (QWebElement::toOuterXml):
     5527        (QWebElement::setInnerXml):
     5528        (QWebElement::toInnerXml):
     5529        (QWebElement::namespaceUri):
     5530        (QWebElement::firstChild):
     5531        (QWebElement::lastChild):
     5532        (QWebElement::nextSibling):
     5533        (QWebElement::previousSibling):
     5534        (QWebElement::callFunction):
     5535        (QWebElement::functions):
     5536        (QWebElement::scriptableProperty):
     5537        (QWebElement::setScriptableProperty):
     5538        (QWebElement::scriptableProperties):
     5539        (QWebElement::appendInside):
     5540        (QWebElement::prependInside):
     5541        (QWebElement::prependOutside):
     5542        (QWebElement::appendOutside):
     5543        (QWebElement::clone):
     5544        (QWebElement::takeFromDocument):
     5545        (QWebElement::removeFromDocument):
     5546        (QWebElement::removeChildren):
     5547        (QWebElement::wrap):
     5548        (QWebElement::replace):
     5549        * Api/qwebelement.h:
     5550        * Api/qwebframe.cpp:
     5551        (QWebFrame::findAllElements):
     5552        (QWebFrame::findFirstElement):
     5553        * Api/qwebframe.h:
     5554        * tests/qwebelement/tst_qwebelement.cpp:
     5555        (tst_QWebElement::textHtml):
     5556        (tst_QWebElement::classes):
     5557        (tst_QWebElement::namespaceURI):
     5558        (tst_QWebElement::foreachManipulation):
     5559        (tst_QWebElement::callFunction):
     5560        (tst_QWebElement::callFunctionSubmitForm):
     5561        (tst_QWebElement::functionNames):
     5562        (tst_QWebElement::properties):
     5563        (tst_QWebElement::appendAndPrepend):
     5564        (tst_QWebElement::insertBeforeAndAfter):
     5565        (tst_QWebElement::remove):
     5566        (tst_QWebElement::clear):
     5567        (tst_QWebElement::replaceWith):
     5568
     55692009-04-28  Simon Hausmann  <simon.hausmann@nokia.com>
     5570
     5571        Reviewed by Tor Arne VestbÞ.
     5572
     5573        Fix some qdoc warnings.
     5574
     5575        * Api/qwebframe.cpp: Fix links.
     5576        * Api/qwebnetworkinterface.cpp: Make docs internal.
     5577        * Api/qwebnetworkinterface.h: Ditto.
     5578        * Api/qwebpage.cpp: Fix property name in \property.
     5579
     55802009-04-24  Simon Hausmann  <simon.hausmann@nokia.com>
     5581
     5582        Rubber-stamped by Ariya Hidayat.
     5583
     5584        Fix qdoc warning about link to QAction::isEnabled.
     5585
     5586        * Api/qwebpage.cpp:
     5587
     55882009-04-24  Simon Hausmann  <simon.hausmann@nokia.com>
     5589
     5590        Reviewed by Ariya Hidayat.
     5591
     5592        Added support for generating API docs in the Qt build using "make docs"
     5593
     5594        Added code snippets and overview from the Qt sources references in the API docs.
     5595
     5596        * Api/qwebpage.cpp: Adjust paths to snippets.
     5597        * Api/qwebview.cpp: Ditto.
     5598        * docs/docs.pri: Added.
     5599        * docs/qtwebkit.qdoc: Added.
     5600        * docs/qtwebkit.qdocconf: Added.
     5601        * docs/webkitsnippets/qtwebkit_build_snippet.qdoc: Added.
     5602        * docs/webkitsnippets/qtwebkit_qwebview_snippet.cpp: Added.
     5603        * docs/webkitsnippets/simple/main.cpp: Added.
     5604        * docs/webkitsnippets/simple/simple.pro: Added.
     5605        * docs/webkitsnippets/webpage/main.cpp: Added.
     5606        * docs/webkitsnippets/webpage/webpage.pro: Added.
     5607
     56082009-04-23  Antonio Gomes   <antonio.gomes@openbossa.org>
     5609
     5610        Reviewed by Ariya Hidayat.
     5611
     5612        [Qt] Added QWebElement::computedStyleProperty method.
     5613
     5614        * Api/qwebelement.cpp:
     5615        (QWebElement::computedStyleProperty):
     5616        * Api/qwebelement.h:
     5617        * tests/qwebelement/tst_qwebelement.cpp:
     5618        (tst_QWebElement::computedStyle):
     5619
     56202009-04-23  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     5621
     5622        Rubber-stamped by Ariya Hidayat.
     5623
     5624        [Qt] Rename QWebElement arguments from html to markup
     5625
     5626        * Api/qwebelement.cpp:
     5627        (QWebElement::append):
     5628        (QWebElement::prepend):
     5629        (QWebElement::insertBefore):
     5630        (QWebElement::insertAfter):
     5631        * Api/qwebelement.h:
     5632
     56332009-04-21  Antonio Gomes   <antonio.gomes@openbossa.org>
     5634
     5635        Reviewed by Ariya Hidayat.
     5636
     5637        QWebElementSelection renamed to QWebElementCollection.
     5638
     5639        * Api/qwebelement.cpp:
     5640        (QWebElement::findAll):
     5641        (QWebElementCollectionPrivate::QWebElementCollectionPrivate):
     5642        (QWebElementCollectionPrivate::create):
     5643        (QWebElementCollection::QWebElementCollection):
     5644        (QWebElementCollection::operator=):
     5645        (QWebElementCollection::~QWebElementCollection):
     5646        (QWebElementCollection::operator+):
     5647        (QWebElementCollection::append):
     5648        (QWebElementCollection::count):
     5649        (QWebElementCollection::at):
     5650        (QWebElementCollection::toList):
     5651        * Api/qwebelement.h:
     5652        * Api/qwebframe.cpp:
     5653        (QWebFrame::findAllElements):
     5654        * Api/qwebframe.h:
     5655        * QtLauncher/main.cpp:
     5656        (MainWindow::selectElements):
     5657        * tests/qwebelement/tst_qwebelement.cpp:
     5658        (tst_QWebElement::simpleCollection):
     5659        (tst_QWebElement::iteration):
     5660        (tst_QWebElement::emptyCollection):
     5661        (tst_QWebElement::appendCollection):
     5662        (tst_QWebElement::nullSelect):
     5663
     56642009-04-17  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     5665
     5666        Reviewed by Simon Hausmann.
     5667
     5668        https://bugs.webkit.org/show_bug.cgi?id=25242
     5669
     5670        Remove QtCore 4.5 dependency from QWebElement test
     5671
     5672        * tests/qwebelement/tst_qwebelement.cpp:
     5673        (tst_QWebElement::iteration): Use QList::count() instead of QList::length()
     5674
     56752009-04-16  Holger Hans Peter Freyther  <zecke@selfish.org>
     5676
     5677        Rubber-stamped by Simon Hausmann.
     5678
     5679        Make the operator== and operator!= non inline to
     5680        allow looking at the d-pointer in the future.
     5681
     5682        * Api/qwebelement.cpp:
     5683        (QWebElement::operator==):
     5684        (QWebElement::operator!=):
     5685        * Api/qwebelement.h:
     5686
     56872009-04-15  Antonio Gomes   <antonio.gomes@openbossa.org>
     5688
     5689        Reviewed by Ariya Hidayat.
     5690
     5691        Rename extend() method in QWebElementSelection to append().
     5692
     5693        * Api/qwebelement.cpp:
     5694        (QWebElementSelection::append):
     5695        * Api/qwebelement.h:
     5696        * tests/qwebelement/tst_qwebelement.cpp:
     5697        (tst_QWebElement::appendSelection):
     5698
     56992009-04-15  Antonio Gomes   <antonio.gomes@openbossa.org>
     5700
     5701        Reviewed by Simon Hausmann.
     5702
     5703        Fixed nit/typo in QWebElement documentation.
     5704
     5705        * Api/qwebelement.cpp:
     5706
     57072009-04-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     5708
     5709        Reviewed by Simon Hausmann.
     5710
     5711        https://bugs.webkit.org/show_bug.cgi?id=24841
     5712
     5713        Fix linking against QtWebKit for Symbian and other platforms
     5714        where the OS ABI distinguishes between an import or an export situation.
     5715
     5716        * Api/qwebkitglobal.h: Instead of white-listing Win, remove the test.
     5717
     57182009-04-14  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
     5719
     5720        Reviewed by Tor Arne VestbÞ.
     5721
     5722        Rename QWebElement::setHtml and html to setXml and toXml respectivily.
     5723       
     5724        Also add a mean to define the scope (inner or other).
     5725
     5726        * Api/qwebelement.cpp:
     5727        (QWebElement::setXml):
     5728        (QWebElement::toXml):
     5729        * Api/qwebelement.h:
     5730        * tests/qwebelement/tst_qwebelement.cpp:
     5731        (tst_QWebElement::textHtml):
     5732        (tst_QWebElement::foreachManipulation):
     5733
     57342009-04-14  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
     5735
     5736        Reviewed by Tor Arne VestbÞ.
     5737
     5738        Rename QWebElement::setText() and text() to ::setPlainText and
     5739        ::toPlainText, respectively.
     5740
     5741        * Api/qwebelement.cpp:
     5742        (QWebElement::setPlainText):
     5743        (QWebElement::toPlainText):
     5744        * Api/qwebelement.h:
     5745        * tests/qwebelement/tst_qwebelement.cpp:
     5746        (tst_QWebElement::textHtml):
     5747        (tst_QWebElement::simpleSelection):
     5748        (tst_QWebElement::appendAndPrepend):
     5749        (tst_QWebElement::insertBeforeAndAfter):
     5750        (tst_QWebElement::replaceWith):
     5751        (tst_QWebElement::wrap):
     5752        (tst_QWebElement::firstChildNextSiblingWithTag):
     5753        (tst_QWebElement::lastChildPreviousSiblingWithTag):
     5754
     57552009-04-06  Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     5756
     5757        Reviewed by Simon Hausmann.
     5758
     5759        [Qt] Rename DOM API select function to findFirst, findAll, etc.
     5760
     5761        * Api/qwebelement.cpp:
     5762        (QWebElement::findAll):
     5763        (QWebElement::findFirst):
     5764        * Api/qwebelement.h:
     5765        * Api/qwebframe.cpp:
     5766        (QWebFrame::findAllElements):
     5767        (QWebFrame::findFirstElement):
     5768        * Api/qwebframe.h:
     5769        * QtLauncher/main.cpp:
     5770        (MainWindow::selectElements):
     5771        * tests/qwebelement/tst_qwebelement.cpp:
     5772        (tst_QWebElement::simpleSelection):
     5773        (tst_QWebElement::attributesNS):
     5774        (tst_QWebElement::classes):
     5775        (tst_QWebElement::namespaceURI):
     5776        (tst_QWebElement::iteration):
     5777        (tst_QWebElement::foreachManipulation):
     5778        (tst_QWebElement::callFunctionSubmitForm):
     5779        (tst_QWebElement::documentElement):
     5780        (tst_QWebElement::frame):
     5781        (tst_QWebElement::style):
     5782        (tst_QWebElement::extendSelection):
     5783        (tst_QWebElement::properties):
     5784        (tst_QWebElement::appendAndPrepend):
     5785        (tst_QWebElement::insertBeforeAndAfter):
     5786        (tst_QWebElement::remove):
     5787        (tst_QWebElement::clear):
     5788        (tst_QWebElement::replaceWith):
     5789        (tst_QWebElement::wrap):
     5790        (tst_QWebElement::nullSelect):
     5791        (tst_QWebElement::firstChildNextSibling):
     5792        (tst_QWebElement::firstChildNextSiblingWithTag):
     5793        (tst_QWebElement::lastChildPreviousSibling):
     5794        (tst_QWebElement::lastChildPreviousSiblingWithTag):
     5795
     57962009-04-06  Simon Hausmann  <simon.hausmann@nokia.com>
     5797            Ariya Hidayat <ariya.hidayat@nokia.com>
     5798            Tor Arne VestbÞ  <tor.arne.vestbo@nokia.com>
     5799            Genevieve Mak <gen@staikos.net>
     5800
     5801        Reviewed by Tor Arne VestbÞ, Simon Hausmann
     5802
     5803        First revision of new API in the Qt port to access the DOM.
     5804
     5805        * Api/headers.pri: Added qwebelement.h to the API headers.
     5806        * Api/qwebelement.cpp: Added.
     5807        * Api/qwebelement.h: Added.
     5808        * Api/qwebframe.cpp:
     5809        (QWebFrame::documentElement): Added accessor for the document element.
     5810        (QWebFrame::selectElements): Added convenienc query method.
     5811        (QWebFrame::selectElement): Ditto.
     5812        (QWebHitTestResult::element): Added accessor for underlying DOM element.
     5813        * Api/qwebframe.h:
     5814        * QtLauncher/main.cpp: Simple test gui for element selections.
     5815        * tests/qwebelement/qwebelement.pro: Added.
     5816        * tests/qwebelement/tst_qwebelement.cpp: Added.
     5817        * tests/tests.pro: Added QWebElement & QWebElementSelection unit tests.
     5818
     58192009-04-02  Simon Hausmann  <simon.hausmann@nokia.com>
     5820
     5821        Fix the Qt build.
     5822
     5823        * Api/qwebpage.cpp:
     5824        (QWebPage::triggerAction): Adapted code to renamed loadFrameRequest function.
     5825
     58262009-04-02  Takumi Asaki <takumi.asaki@nokia.com>
     5827
     5828        Reviewed by Simon Hausmann.
     5829
     5830        Fix pre-edit handling of text fields with input methods.
     5831
     5832        The input method sends an empty preeditString() if all characters of
     5833        the preedit should be deleted. So inputMethodEvent() has to use
     5834        preeditString() if it's empty.
     5835
     5836        * Api/qwebpage.cpp:
     5837        (QWebPagePrivate::inputMethodEvent):
     5838
     58392009-03-30  Simon Hausmann  <simon.hausmann@nokia.com>
     5840
     5841        Rubber-stamped by Tor Arne VestbÞ.
     5842
     5843        Document that setHtml/setContent loads only the html/data immediately, not external objects.
     5844
     5845        * Api/qwebframe.cpp:
     5846        * Api/qwebview.cpp:
     5847
     58482009-03-29  Darin Adler  <darin@apple.com>
     5849
     5850        Try to fix Qt build.
     5851
     5852        * WebCoreSupport/EditorClientQt.cpp: Added include of HTMLElement.h.
     5853
     5854        * WebCoreSupport/FrameLoaderClientQt.cpp: Added include of FormState.h.
     5855        (WebCore::FrameLoaderClientQt::prepareForDataSourceReplacement):
     5856        Removed unneeded call to detachChildren, which is called by FrameLoader
     5857        right after this.
     5858        (WebCore::FrameLoaderClientQt::createFrame): Use loadURLIntoChildFrame
     5859        as other platforms do in the corresponding functions.
     5860
     58612009-03-27  Erik L. Bunce  <elbunce@xendom.com>
     5862
     5863        Reviewed by Simon Hausmann.
     5864
     5865        https://bugs.webkit.org/show_bug.cgi?id=24869
     5866
     5867        Fixes an incorrect case in tst_qwebpage.
     5868
     5869        * tests/qwebpage/tst_qwebpage.cpp:
     5870        (tst_QWebPage::cursorMovements):
     5871
     58722009-03-27  Erik L. Bunce  <elbunce@xendom.com>
     5873
     5874        Reviewed by Simon Hausmann.
     5875
     5876        https://bugs.webkit.org/show_bug.cgi?id=24746
     5877
     5878        Add new editing related QWebPage::WebActions
     5879        * Clipboard: PasteAndMatchStyle
     5880        * Formatting: RemoveFormat, ToggleStrikethrough, ToggleSubscript, and
     5881          ToggleSuperscript
     5882        * List Editing: InsertUnorderedList, InsertOrderedList, Indent, Outdent
     5883        * Paragraph Justification: AlignCenter, AlignJustified, AlignLeft, AlignRight
     5884
     5885        Improved selection and editing tests.
     5886
     5887        * Api/qwebpage.cpp:
     5888        (QWebPagePrivate::updateEditorActions):
     5889        (QWebPage::action):
     5890        * Api/qwebpage.h:
     5891        * tests/qwebpage/tst_qwebpage.cpp:
     5892        (tst_QWebPage::textSelection):
     5893        (tst_QWebPage::textEditing):
     5894
     58952009-03-26  Simon Hausmann  <simon.hausmann@nokia.com>
     5896
     5897        Rubber-stamped by Tor Arne VestbÞ.
     5898
     5899        Fix the documentation of the QLocale usage in userAgentForUrl.
     5900
     5901        * Api/qwebpage.cpp:
     5902
     59032009-03-20  Erik L. Bunce  <elbunce@xendom.com>
     5904
     5905        Reviewed by Simon Hausmann.
     5906
     5907        Fix for InsertParagraphSeparator and InsertLineSeparator so that
     5908        QWebPage::action() creates QActions for them. Also make sure they get
     5909        updated appropriately.
     5910
     5911        * Api/qwebpage.cpp:
     5912        (QWebPagePrivate::updateEditorActions):
     5913        (QWebPage::action):
     5914        * tests/qwebpage/tst_qwebpage.cpp:
     5915        (tst_QWebPage::textEditing):
     5916
     59172009-03-20  Erik L. Bunce  <elbunce@xendom.com>
     5918
     5919        Reviewed by Tor Arne VestbÞ.
     5920
     5921        Fix QWebPage::WebActions action states to more closely match when they are
     5922        actually applicable and remove erroneous documentation.
     5923
     5924        * Most WebActions implemented using editor commands now use the
     5925          Editor::Command::isEnabled() to control their availability.
     5926        * SelectAll is always enabled (since it's editor command is).
     5927        * SetTextDirection{} family of WebActions are available when canEdit() is true
     5928          and not just canEditRichly().
     5929
     5930        Fix and clarify documentation about the availability of various web actions.
     5931
     5932        * Api/qwebpage.cpp:
     5933        (QWebPagePrivate::updateAction):
     5934        (QWebPagePrivate::updateEditorActions):
     5935        * tests/qwebpage/tst_qwebpage.cpp:
     5936        (tst_QWebPage::textSelection):
     5937
     59382009-03-19  Ariya Hidayat <ariya.hidayat@trolltech.com>
     5939
     5940        Reviewed by Simon Hausmann.
     5941
     5942        Fixes pedantic compilation in QtWebKit.
     5943
     5944        There are no semi-colons after namespace declarations.
     5945
     5946        * Api/qwebdatabase.h:
     5947        * Api/qwebsecurityorigin.h:
     5948
     59492009-03-19  David Boddie  <dboddie@trolltech.com>
     5950
     5951        Reviewed by Simon Hausmann.
     5952
     5953        Doc: Removed obsolete warning about Flash and other plugins.
     5954
     5955        * Api/qwebsettings.cpp:
     5956
     59572009-03-19  Paul Olav Tvete  <paul.tvete@nokia.com>
     5958
     5959        Reviewed by Simon Hausmann.
     5960
     5961        Properly escape tooltip text
     5962
     5963        ManualTest: http://xkcd.com/554/
     5964
     5965        * WebCoreSupport/ChromeClientQt.cpp:
     5966        (WebCore::ChromeClientQt::setToolTip):
     5967
     59682009-03-10  Adam Treat  <adam.treat@torchmobile.com>
     5969
     5970        Build fix for Qt after r41555.
     5971
     5972        * Api/qwebpage.cpp:
     5973        (QWebPage::acceptNavigationRequest):
     5974
     59752009-03-10  Xan Lopez  <xlopez@igalia.com>
     5976
     5977        Build fix, no review.
     5978
     5979        * Api/qwebpage.cpp:
     5980        (QWebPage::inputMethodQuery):
     5981
     59822009-03-07  Adam Treat  <adam.treat@torchmobile.com>
     5983
     5984        Reviewed by Cameron Zwarich.
     5985
     5986        These methods are clearly returning the wrong values as the two were
     5987        returning swapped information.
     5988
     5989        * Api/qwebpage.cpp:
     5990        (QWebPage::totalBytes):
     5991        (QWebPage::bytesReceived):
     5992
     59932009-03-05  Ariya Hidayat  <ariya.hidayat@nokia.com>
     5994
     5995        Rubber-stamped by Simon Hausmann.
     5996
     5997        [Qt] NPAPI plugins are supported, adjust the API documentation.
     5998
     5999        * Api/qwebsettings.cpp:
     6000
     60012009-03-04  Adam Barth  <abath@webkit.org>
     6002
     6003        Reviewed by Alexey Proskuryakov.
     6004
     6005        https://bugs.webkit.org/show_bug.cgi?id=24356
     6006
     6007        Fix WebKit style for allowUniversalAccessFromFileURLs.
     6008
     6009        * Api/qwebsettings.cpp:
     6010        (QWebSettingsPrivate::apply):
     6011
     60122009-03-03  Adam Barth  <abarth@webkit.org>
     6013
     6014        Reviewed by Alexey Proskuryakov.
     6015
     6016        https://bugs.webkit.org/show_bug.cgi?id=24340
     6017
     6018        Expose AllowUniversalAccessFromFileUrls to Qt clients.
     6019
     6020        * Api/qwebsettings.cpp:
     6021        (QWebSettingsPrivate::apply):
     6022        (QWebSettings::QWebSettings):
     6023        * Api/qwebsettings.h:
     6024
     60252009-03-03  Ariya Hidayat  <ariya.hidayat@trolltech.com>
     6026
     6027        Rubber-stamped by Simon Hausmann.
     6028
     6029        [Qt] Create and update the action for SelectAll.
     6030
     6031        * Api/qwebpage.cpp:
     6032        (QWebPagePrivate::updateAction):
     6033        (QWebPagePrivate::updateEditorActions):
     6034        (QWebPage::action):
     6035        * tests/qwebpage/tst_qwebpage.cpp:
     6036        (tst_QWebPage::textSelection):
     6037
     60382009-03-02  Adam Treat  <adam.treat@torchmobile.com>
     6039
     6040        Reviewed by Eric Seidel.
     6041
     6042        Add three new drt helper functions that enable all of the tests in
     6043        LayoutTests/animation/* and LayoutTests/transitions/* to now pass.
     6044
     6045        * Api/qwebframe.cpp:
     6046        (qt_drt_pauseAnimation):
     6047        (qt_drt_pauseTransitionOfProperty):
     6048        (qt_drt_numberOfActiveAnimations):
     6049
     60502009-03-02  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
     6051
     6052        Reviewed by George Staikos.
     6053
     6054        https://bugs.webkit.org/show_bug.cgi?id=21230
     6055        On X11 match the behavior of Firefox and also copy the url to the
     6056        clipboard selection when the action Copy Link Location is executed.
     6057
     6058        * Api/qwebpage.cpp:
     6059        (QWebPage::triggerAction):
     6060
     60612009-02-25  Kavindra Palaraja  <kavindra.palaraja@nokia.com>
     6062
     6063        Reviewed by Simon Hausmann.
     6064
     6065        Fix the documentation for the linkHovered signal.
     6066
     6067        * Api/qwebpage.cpp:
     6068
     60692009-02-23  Adam Treat  <adam.treat@torchmobile.com>
     6070
     6071        Reviewed by Darin Adler.
     6072
     6073        https://bugs.webkit.org/show_bug.cgi?id=24094
     6074        Make sure to empty the cache on exit to get rid of superfluous leak messages
     6075        for CachedResource's in order to keep the leak messages accurate.  This
     6076        is analagous to what the Mac port is doing on application exit when all
     6077        WebView's have been closed.
     6078
     6079        * Api/qwebpage.cpp:
     6080        (QWebPagePrivate::_q_cleanupLeakMessages):
     6081        (QWebPage::QWebPage):
     6082        * Api/qwebpage.h:
     6083        * Api/qwebpage_p.h:
     6084
     60852009-02-23  Thiago Macieira  <thiago.macieira@nokia.com>
     6086
     6087        Reviewed by Simon Hausmann.
     6088
     6089        Fix the Copyright notices in a few files
     6090
     6091        * WebKit_pch.h:
     6092
    16460932009-02-16  Simon Hausmann  <simon.hausmann@nokia.com>
    1656094
     
    1726101        PluginDatabase if plugins are disabled in the settings.
    1736102
     61032009-02-13  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
     6104
     6105        Reviewed by Nikolas Zimmermann.
     6106
     6107        https://bugs.webkit.org/show_bug.cgi?id=23738
     6108        Expose the url elements target frame string.  This is the sister function
     6109        to the existing linkTargetFrame which returns the QWebFrame*.  When the
     6110        linkTargetFrame is 0 it is useful to know what the target was to be.
     6111
     6112        * Api/qwebframe.cpp:
     6113        (QWebHitTestResultPrivate::QWebHitTestResultPrivate):
     6114        (QWebHitTestResult::linkTarget):
     6115        * Api/qwebframe.h:
     6116        * Api/qwebframe_p.h:
     6117        * tests/qwebframe/tst_qwebframe.cpp:
     6118
    17461192009-02-13  David Boddie  <dboddie@trolltech.com>
    1756120
     
    1876132
    1886133        * Api/qwebsettings.cpp:
     6134
     61352009-02-11  Dimitri Dupuis-latour  <dupuislatour@apple.com>
     6136
     6137        Stub out InspectorClientQt::hiddenPanels.
     6138
     6139        Reviewed by Timothy Hatcher.
     6140
     6141        * WebCoreSupport/InspectorClientQt.cpp:
     6142        (WebCore::InspectorClientQt::hiddenPanels):
     6143        * WebCoreSupport/InspectorClientQt.h:
    1896144
    19061452009-02-10  Karsten Heimrich  <kheimric@trolltech.com>
     
    1986153        (WebCore::FrameLoaderClientQt::dispatchDidChangeLocationWithinPage):
    1996154        update and emit in case we navigate inside a webpage
     6155
     61562009-02-10  Adam Treat  <adam.treat@torchmobile.com>
     6157
     6158        Fix the Qt build as class Selection is now VisibleSelection.
     6159
     6160        * Api/qwebpage.cpp:
     6161        (QWebPage::inputMethodQuery):
     6162
     61632009-02-06  Geoffrey Garen  <ggaren@apple.com>
     6164
     6165        Build fix.
     6166
     6167        * WebCoreSupport/FrameLoaderClientQt.cpp:
     6168        (WebCore::FrameLoaderClientQt::updateGlobalHistoryRedirectLinks):
     6169        * WebCoreSupport/FrameLoaderClientQt.h:
    2006170
    20161712009-02-06  Kavindra Palaraja  <kavindra.palaraja@nokia.com>
     
    2196189        models.
    2206190
     61912009-02-06  Aaron Boodman  <aa@chromium.org>
     6192
     6193        Reviewed by Holger Freyther.
     6194
     6195        * WebCoreSupport/FrameLoaderClientQt.cpp:
     6196        (WebCore::FrameLoaderClientQt::documentElementAvailable):)
     6197        Fix compile error in Qt build introduced by the below change (r40694).
     6198
     61992009-02-05  Aaron Boodman  <aa@chromium.org>
     6200
     6201        Reviewed by Dave Hyatt.
     6202
     6203        https://bugs.webkit.org/show_bug.cgi?id=23708
     6204        Adds documentElementAvailable() callback to FrameLoaderClient.
     6205
     6206        * WebCoreSupport/FrameLoaderClientQt.cpp:
     6207        (WebCore::FrameLoaderClient::documentElementAvailable):
     6208        Stub out documentElementAvailable().
     6209        * WebCoreSupport/FrameLoaderClientQt.h:
     6210        Ditto.
     6211
    22162122009-02-04  David Boddie  <dboddie@trolltech.com>
    2226213
     
    2356226
    2366227        * tests/qwebframe/tst_qwebframe.cpp:
     6228
     62292009-02-02  Geoffrey Garen  <ggaren@apple.com>
     6230
     6231        Build fix.
     6232
     6233        * Api/qwebframe.cpp:
     6234        (QWebFrame::QWebFrame):
     6235        (QWebFrame::load):
     6236        (QWebFrame::setHtml):
     6237        (QWebFrame::setContent):
     6238
     62392009-02-02  Geoffrey Garen  <ggaren@apple.com>
     6240
     6241        Build fix.
     6242
     6243        * WebCoreSupport/FrameLoaderClientQt.cpp:
     6244        (WebCore::FrameLoaderClientQt::createFrame):
     6245
     62462009-02-02  Geoffrey Garen  <ggaren@apple.com>
     6247
     6248        Reviewed by Sam Weinig.
     6249
     6250        Track redirects in global history.
     6251
     6252        Keep Qt building.
     6253
     6254        * WebCoreSupport/FrameLoaderClientQt.cpp:
     6255        (WebCore::FrameLoaderClientQt::updateGlobalHistoryForRedirectWithoutHistoryItem):
     6256        (WebCore::FrameLoaderClientQt::createFrame):
     6257        * WebCoreSupport/FrameLoaderClientQt.h:
     6258
     62592009-02-02  Anders Carlsson  <andersca@apple.com>
     6260
     6261        Reviewed by Dan Bernstein.
     6262
     6263        Update for changes to WebCore.
     6264
     6265        * WebCoreSupport/FrameLoaderClientQt.cpp:
     6266        (WebCore::FrameLoaderClientQt::createPlugin):
     6267        (WebCore::FrameLoaderClientQt::createJavaAppletWidget):
     6268        * WebCoreSupport/FrameLoaderClientQt.h:
     6269
     62702009-02-02  Adam Treat  <adam.treat@torchmobile.com>
     6271
     6272        Reviewed by Nikolas Zimmermann.
     6273
     6274        https://bugs.webkit.org/show_bug.cgi?id=23587
     6275        Refactor HitTestRequest to eliminate all the ugly boolean arguments and
     6276        use an enum bitflag instead.  Cleanup all the code that constructs the
     6277        various HitTestRequests to make the code more readable.
     6278
     6279        * Api/qwebframe.cpp:
     6280        (QWebFrame::hitTestContent):
     6281
     62822009-02-02  Adam Treat  <adam.treat@torchmobile.com>
     6283
     6284        Fix the Qt build to call forceLayout on the view instead.
     6285
     6286        * Api/qwebpage.cpp:
     6287        (QWebPage::setFixedLayoutSize):
     6288        (QWebPage::setUseFixedLayout):
     6289
     62902009-02-02  Holger Hans Peter Freyther  <zecke@selfish.org>
     6291
     6292        Reviewed by Darin Adler.
     6293
     6294        Move Frame::forceLayout, Frame::adjustPageHeight and Frame::forceLayoutWithPageWidthRange to FrameView
     6295
     6296        https://bugs.webkit.org/show_bug.cgi?id=23428
     6297
     6298        FrameView::forceLayout could be killed but the comment might
     6299        contain a value over the the plain FrameView::layout...
     6300
     6301        Adjust the WebCore/WebKit consumers of these methods.
     6302
     6303        * Api/qwebpage.cpp:
     6304        (QWebPage::setViewportSize):
     6305        * WebCoreSupport/FrameLoaderClientQt.cpp:
     6306        (WebCore::FrameLoaderClientQt::forceLayout):
     6307
     63082009-01-30  Geoffrey Garen  <ggaren@apple.com>
     6309
     6310        Build fix.
     6311
     6312        * WebCoreSupport/FrameLoaderClientQt.cpp:
     6313        (WebCore::FrameLoaderClientQt::createFrame):
     6314
     63152009-01-30  Holger Hans Peter Freyther  <zecke@selfish.org>
     6316
     6317        Reviewed by Simon Hausmann.
     6318
     6319        https://bugs.webkit.org/show_bug.cgi?id=22056
     6320
     6321        Kill FrameLoaderClient.cpp, move the code over to Frame::createView
     6322
     6323        FrameLoaderClient is supposed to be an interface, move the
     6324        to be shared code to Frame which is a controller and is
     6325        allowed to create a FrameView.
     6326
     6327        * WebCoreSupport/FrameLoaderClientQt.cpp:
     6328        (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage):
     6329
     63302009-01-30  Geoffrey Garen  <ggaren@apple.com>
     6331
     6332        Reviewed by Sam Weinig.
     6333
     6334        Split "lockHistory" into "lockHistory" and "lockBackForwardList" in
     6335        preparation for setting them differently during a redirect.
     6336
     6337        * Api/qwebpage.cpp:
     6338        (QWebPage::triggerAction):
     6339
     63402009-01-30  Brady Eidson  <beidson@apple.com>
     6341
     6342        Reviewed by Sam Weinig
     6343
     6344        Remove FrameLoaderClient code that is now handled by FrameLoader itself
     6345
     6346        * WebCoreSupport/FrameLoaderClientQt.cpp:
     6347        (WebCore::FrameLoaderClientQt::frameLoadCompleted):
    2376348
    23863492009-01-30  Simon Hausmann  <simon.hausmann@nokia.com>
     
    2486359        * Api/qwebsettings.h:
    2496360
     63612009-01-28  Adam Treat  <adam.treat@torchmobile.com>
     6362
     6363        Reviewed by Nikolas Zimmermann and George Staikos.
     6364
     6365        https://bugs.webkit.org/show_bug.cgi?id=23557
     6366        Do not clip the QWebFrame::hitTestContent method to the visible viewport
     6367        and add a regression test to make sure it works.
     6368
     6369        * Api/qwebframe.cpp:
     6370        (QWebFrame::hitTestContent):
     6371        * tests/qwebframe/tst_qwebframe.cpp:
     6372
    25063732009-01-28  Ariya Hidayat  <ariya.hidayat@trolltech.com>
    2516374
     
    2656388        Reviewed by Simon Hausmann.
    2666389
    267         http://www.qtsoftware.com/developer/task-tracker/index_html?id=238391&method=entry
     6390        http://qt.nokia.com/developer/task-tracker/index_html?id=238391&method=entry
    2686391
    2696392        [Qt] If QPainter fails to start on a QPrinter instance, do not
     
    2726395        * Api/qwebframe.cpp:
    2736396        (QWebFrame::print):
     6397
     63982009-01-27  Brady Eidson  <beidson@apple.com>
     6399
     6400        Reviewed by Dan Bernstein
     6401
     6402        Rework FrameLoaderClient to work on a CachedFrame basis instead of CachedPage
     6403
     6404        * WebCoreSupport/FrameLoaderClientQt.cpp:
     6405        (WebCore::FrameLoaderClientQt::savePlatformDataToCachedFrame):
     6406        (WebCore::FrameLoaderClientQt::transitionToCommittedFromCachedFrame):
     6407        * WebCoreSupport/FrameLoaderClientQt.h:
     6408
     64092009-01-26  Simon Fraser  <simon.fraser@apple.com>
     6410
     6411        Reviewed by David Hyatt
     6412       
     6413        Back out r40285, because it was checked in with no bug number, no
     6414        testcase, is rendering change that did not get thorough review,
     6415        and broke the Mac build.
     6416
     6417        * Api/qwebframe.cpp:
     6418        (QWebFrame::hitTestContent):
     6419
     64202009-01-26  Adam Treat  <adam.treat@torchmobile.com>
     6421
     6422        Reviewed by Nikolas Zimmermann.
     6423
     6424        Do not clip the QWebFrame::hitTestContent method to the visible viewport.
     6425
     6426        * Api/qwebframe.cpp:
     6427        (QWebFrame::hitTestContent):
    2746428
    27564292009-01-26  David Boddie  <dboddie@trolltech.com>
     
    3346488
    3356489        * Api/qwebhistory.h:
     6490
     64912009-01-24  Adam Treat  <adam.treat@torchmobile.com>
     6492
     6493        Oops, fix the Qt build.
     6494
     6495        * Api/qwebframe.cpp:
     6496        (QWebFrame::render):
     6497
     64982009-01-24  Adam Treat  <adam.treat@torchmobile.com>
     6499
     6500        Reviewed by Nikolas Zimmermann.
     6501
     6502        Add QWebFrame::renderContents() method which allows arbitary rendering
     6503        of any content region within the QWebFrame.  It also does not draw any
     6504        scrollbars.
     6505
     6506        * Api/qwebframe.cpp:
     6507        (QWebFrame::renderContents):
     6508        * Api/qwebframe.h:
    3366509
    33765102009-01-23  Ariya Hidayat  <ariya.hidayat@trolltech.com>
     
    4086581        Rubber-stamped by Simon Hausmann.
    4096582
    410         http://www.qtsoftware.com/developer/task-tracker/index_html?id=219344&method=entry
     6583        http://qt.nokia.com/developer/task-tracker/index_html?id=219344&method=entry
    4116584
    4126585        [Qt] API documentation for QWebPage::WebAction enum.
    4136586
    4146587        * Api/qwebpage.cpp:
     6588
     65892009-01-16  Ariya Hidayat  <ariya.hidayat@trolltech.com>
     6590
     6591        Another attempt at fixing the Qt build.
     6592
     6593        * Api/qwebframe.cpp:
     6594        (QWebFrame::addToJavaScriptWindowObject):
    4156595
    41665962009-01-14  Ariya Hidayat  <ariya.hidayat@trolltech.com>
     
    4566636        Reviewed by Simon Hausmann.
    4576637
    458         http://www.qtsoftware.com/developer/task-tracker/index_html?id=241144&method=entry
     6638        http://qt.nokia.com/developer/task-tracker/index_html?id=241144&method=entry
    4596639
    4606640        [Qt] Create actions for text selection and editing for QWebPage.
     
    4846664        (tst_QWebPage::cursorMovements):
    4856665
    486 2009-01-13  Ariya Hidayat  <ariya.hidayat@trolltech.com>
    487 
    488         Rubber-stamped by Tor Arne VestbÞ.
    489 
    490         [Qt] Missing piece from my previous commit:
    491         Disable and enable the cursor navigation actions when contentEditable
    492         is changed.
    493 
    494         * Api/qwebpage.cpp:
    495         (QWebPagePrivate::updateEditorActions):
    496 
    497 2009-01-13  Ariya Hidayat  <ariya.hidayat@trolltech.com>
    498 
    499         Reviewed by Tor Arne VestbÞ.
    500 
    501         [Qt] Create actions for cursor navigation for QWebPage.
    502         Also properly disable and enable them when contentEditable is toggled.
    503 
    504         * Api/qwebpage.cpp:
    505         (QWebPagePrivate::updateAction):
    506         (QWebPage::action):
    507 
    50866662009-01-08  Yongjun Zhang  <yongjun.zhang@nokia.com>
    5096667
     
    5246682        * WebCoreSupport/ChromeClientQt.cpp:
    5256683        (WebCore::ChromeClientQt::repaint):
     6684
     66852009-01-13  Ariya Hidayat  <ariya.hidayat@trolltech.com>
     6686
     6687        Rubber-stamped by Tor Arne VestbÞ.
     6688
     6689        [Qt] Missing piece from my previous commit:
     6690        Disable and enable the cursor navigation actions when contentEditable
     6691        is changed.
     6692
     6693        * Api/qwebpage.cpp:
     6694        (QWebPagePrivate::updateEditorActions):
     6695
     66962009-01-13  Ariya Hidayat  <ariya.hidayat@trolltech.com>
     6697
     6698        Reviewed by Tor Arne VestbÞ.
     6699
     6700        [Qt] Create actions for cursor navigation for QWebPage.
     6701        Also properly disable and enable them when contentEditable is toggled.
     6702
     6703        * Api/qwebpage.cpp:
     6704        (QWebPagePrivate::updateAction):
     6705        (QWebPage::action):
    5266706
    52767072009-01-13  Simon Hausmann  <simon.hausmann@nokia.com>
     
    6826862        Reviewed by George Staikos.
    6836863
     6864        Add Qt API to QWebHitTestResult::isScrollBar method
     6865
     6866        * Api/qwebframe.cpp:
     6867        (QWebHitTestResultPrivate::QWebHitTestResultPrivate):
     6868        (QWebHitTestResult::isScrollBar):
     6869        * Api/qwebframe.h:
     6870        * Api/qwebframe_p.h:
     6871        (QWebHitTestResultPrivate::QWebHitTestResultPrivate):
     6872
     68732009-01-07  Adam Treat  <adam.treat@torchmobile.com>
     6874
     6875        Reviewed by George Staikos.
     6876
     6877        Add Qt API for QWebFrame::scrollBarGeometry method
     6878
     6879        * Api/qwebframe.cpp:
     6880        (QWebFrame::scrollBarGeometry):
     6881        * Api/qwebframe.h:
     6882
     68832009-01-07  Adam Treat  <adam.treat@torchmobile.com>
     6884
     6885        Reviewed by George Staikos.
     6886
    6846887        Fix unused variable warnings
    6856888
     
    7066909        * Api/qwebkitglobal.h:
    7076910
     69112009-01-06  Adam Treat  <adam.treat@torchmobile.com>
     6912
     6913        Reviewed by Simon Hausmann.
     6914
     6915        Update the documentation to reflect when these API changes will land in
     6916        upstream Qt
     6917
     6918        * Api/qwebframe.cpp:
     6919        * Api/qwebpage.cpp:
     6920
     69212009-01-05  Adam Treat  <adam.treat@torchmobile.com>
     6922
     6923        Reviewed by George Staikos.
     6924
     6925        Add Qt API for QWebFrame::contentsSizeChanged signal
     6926
     6927        * Api/qwebframe.cpp:
     6928        * Api/qwebframe.h:
     6929        * WebCoreSupport/ChromeClientQt.cpp:
     6930        (WebCore::ChromeClientQt::contentsSizeChanged):
     6931        * WebCoreSupport/ChromeClientQt.h:
     6932
    70869332009-01-05  Adam Treat  <adam.treat@torchmobile.com>
    7096934
     
    7156940        * Api/qwebframe.cpp:
    7166941        (QWebFrame::setScrollBarPolicy):
     6942        * WebCoreSupport/FrameLoaderClientQt.cpp:
     6943        (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage):
     6944
     69452009-01-04  Adam Treat  <adam.treat@torchmobile.com>
     6946
     6947        Reviewed by George Staikos.
     6948
     6949        Add new API to QWebHitTestResult to return a rect for the smallest enclosing
     6950        block element of the hit test
     6951
     6952        * Api/qwebframe.cpp:
     6953        (QWebHitTestResultPrivate::QWebHitTestResultPrivate):
     6954        (QWebHitTestResult::enclosingBlock):
     6955        * Api/qwebframe.h:
     6956        * Api/qwebframe_p.h:
     6957
     69582008-12-30  Adam Treat  <adam.treat@torchmobile.com>
     6959
     6960        Reviewed by George Staikos.
     6961
     6962        Make the qt port build and work with the new fixedLayoutSize feature
     6963
     6964        * Api/qwebpage.cpp:
     6965        (QWebPagePrivate::QWebPagePrivate):
     6966        (QWebPage::fixedLayoutSize):
     6967        (QWebPage::setFixedLayoutSize):
     6968        (QWebPage::useFixedLayout):
     6969        (QWebPage::setUseFixedLayout):
     6970        * Api/qwebpage.h:
     6971        * Api/qwebpage_p.h:
    7176972        * WebCoreSupport/FrameLoaderClientQt.cpp:
    7186973        (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage):
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp

    r2 r561  
    4040#include "DatabaseTracker.h"
    4141#include "SecurityOrigin.h"
     42#include "QWebPageClient.h"
    4243
    4344#include "qwebpage.h"
     
    4647#include "qwebsecurityorigin.h"
    4748#include "qwebsecurityorigin_p.h"
     49#include "qwebview.h"
    4850
    4951#include <qtooltip.h>
     
    229231}
    230232
    231 void ChromeClientQt::addMessageToConsole(const String& message, unsigned int lineNumber,
    232                                          const String& sourceID)
     233void ChromeClientQt::addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message,
     234                                         unsigned int lineNumber, const String& sourceID)
    233235{
    234236    QString x = message;
     
    277279    FrameLoaderClientQt *fl = static_cast<FrameLoaderClientQt*>(f->loader()->client());
    278280    bool rc = m_webPage->javaScriptPrompt(fl->webFrame(), (QString)message, (QString)defaultValue, &x);
    279     result = x;
     281
     282    // Fix up a quirk in the QInputDialog class. If no input happened the string should be empty
     283    // but it is null. See https://bugs.webkit.org/show_bug.cgi?id=30914.
     284    if (rc && result.isNull())
     285        result = String("");
     286    else
     287        result = x;
     288
    280289    return rc;
    281290}
     
    289298bool ChromeClientQt::shouldInterruptJavaScript()
    290299{
    291     notImplemented();
    292     return false;
     300    bool shouldInterrupt = false;
     301    QMetaObject::invokeMethod(m_webPage, "shouldInterruptJavaScript", Qt::DirectConnection, Q_RETURN_ARG(bool, shouldInterrupt));
     302    return shouldInterrupt;
    293303}
    294304
     
    303313}
    304314
    305 void ChromeClientQt::repaint(const IntRect& windowRect, bool contentChanged, bool immediate, bool repaintContentOnly)
     315void ChromeClientQt::repaint(const IntRect& windowRect, bool contentChanged, bool, bool)
    306316{
    307317    // No double buffer, so only update the QWidget if content changed.
    308318    if (contentChanged) {
    309         QWidget* view = m_webPage->view();
    310         if (view) {
     319        if (platformPageClient()) {
    311320            QRect rect(windowRect);
    312321            rect = rect.intersected(QRect(QPoint(0, 0), m_webPage->viewportSize()));
    313322            if (!rect.isEmpty())
    314                 view->update(rect);
     323                platformPageClient()->update(rect);
    315324        }
    316325        emit m_webPage->repaintRequested(windowRect);
     
    323332void ChromeClientQt::scroll(const IntSize& delta, const IntRect& scrollViewRect, const IntRect&)
    324333{
    325     QWidget* view = m_webPage->view();
    326     if (view)
    327         view->scroll(delta.width(), delta.height(), scrollViewRect);
     334    if (platformPageClient())
     335        platformPageClient()->scroll(delta.width(), delta.height(), scrollViewRect);
    328336    emit m_webPage->scrollRequested(delta.width(), delta.height(), scrollViewRect);
    329337}
     
    341349}
    342350
    343 PlatformWidget ChromeClientQt::platformWindow() const
    344 {
    345     return m_webPage->view();
    346 }
    347 
    348 void ChromeClientQt::contentsSizeChanged(Frame*, const IntSize&) const
    349 {
    350 }
    351 
    352 void ChromeClientQt::mouseDidMoveOverElement(const HitTestResult& result, unsigned modifierFlags)
    353 {
     351PlatformPageClient ChromeClientQt::platformPageClient() const
     352{
     353    return m_webPage->d->client;
     354}
     355
     356void ChromeClientQt::contentsSizeChanged(Frame* frame, const IntSize& size) const
     357{
     358    emit QWebFramePrivate::kit(frame)->contentsSizeChanged(size);
     359}
     360
     361void ChromeClientQt::mouseDidMoveOverElement(const HitTestResult& result, unsigned)
     362{
     363    TextDirection dir;
    354364    if (result.absoluteLinkURL() != lastHoverURL
    355         || result.title() != lastHoverTitle
     365        || result.title(dir) != lastHoverTitle
    356366        || result.textContent() != lastHoverContent) {
    357367        lastHoverURL = result.absoluteLinkURL();
    358         lastHoverTitle = result.title();
     368        lastHoverTitle = result.title(dir);
    359369        lastHoverContent = result.textContent();
    360370        emit m_webPage->linkHovered(lastHoverURL.prettyURL(),
     
    363373}
    364374
    365 void ChromeClientQt::setToolTip(const String &tip)
     375void ChromeClientQt::setToolTip(const String &tip, TextDirection)
    366376{
    367377#ifndef QT_NO_TOOLTIP
     
    387397}
    388398
     399#if ENABLE(DATABASE)
    389400void ChromeClientQt::exceededDatabaseQuota(Frame* frame, const String& databaseName)
    390401{
    391402    quint64 quota = QWebSettings::offlineStorageDefaultQuota();
    392 #if ENABLE(DATABASE)
     403
    393404    if (!DatabaseTracker::tracker().hasEntryForOrigin(frame->document()->securityOrigin()))
    394405        DatabaseTracker::tracker().setQuota(frame->document()->securityOrigin(), quota);
     406
     407    emit m_webPage->databaseQuotaExceeded(QWebFramePrivate::kit(frame), databaseName);
     408}
    395409#endif
    396     emit m_webPage->databaseQuotaExceeded(QWebFramePrivate::kit(frame), databaseName);
    397 }
     410
     411#if ENABLE(OFFLINE_WEB_APPLICATIONS)
     412void ChromeClientQt::reachedMaxAppCacheSize(int64_t)
     413{
     414    // FIXME: Free some space.
     415    notImplemented();
     416}
     417#endif
    398418
    399419void ChromeClientQt::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> prpFileChooser)
     
    407427
    408428        if (!fileChooser->filenames().isEmpty())
    409             for (int i = 0; i < fileChooser->filenames().size(); ++i)
     429            for (unsigned i = 0; i < fileChooser->filenames().size(); ++i)
    410430                option.suggestedFileNames += fileChooser->filenames()[i];
    411431
     
    429449}
    430450
    431 }
     451bool ChromeClientQt::setCursor(PlatformCursorHandle)
     452{
     453    notImplemented();
     454    return false;
     455}
     456
     457void ChromeClientQt::requestGeolocationPermissionForFrame(Frame*, Geolocation*)
     458{
     459    // See the comment in WebCore/page/ChromeClient.h
     460    notImplemented();
     461}
     462
     463}
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h

    r2 r561  
    8484        virtual void setResizable(bool);
    8585
    86         virtual void addMessageToConsole(const String& message, unsigned int lineNumber,
    87                                          const String& sourceID);
     86        virtual void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message,
     87                                         unsigned int lineNumber, const String& sourceID);
    8888
    8989        virtual bool canRunBeforeUnloadConfirmPanel();
     
    106106        virtual IntPoint screenToWindow(const IntPoint&) const;
    107107        virtual IntRect windowToScreen(const IntRect&) const;
    108         virtual PlatformWidget platformWindow() const;
     108        virtual PlatformPageClient platformPageClient() const;
    109109        virtual void contentsSizeChanged(Frame*, const IntSize&) const;
    110110
     111        virtual void scrollbarsModeDidChange() const { }
    111112        virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags);
    112113
    113         virtual void setToolTip(const String&);
     114        virtual void setToolTip(const String&, TextDirection);
    114115
    115116        virtual void print(Frame*);
    116 
     117#if ENABLE(DATABASE)
    117118        virtual void exceededDatabaseQuota(Frame*, const String&);
    118 
     119#endif
     120#if ENABLE(OFFLINE_WEB_APPLICATIONS)
     121        virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
     122#endif
    119123        virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
    120124
    121125        virtual void formStateDidChange(const Node*) { }
     126
     127        virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
     128
     129        virtual bool setCursor(PlatformCursorHandle);
     130
     131        virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const {}
     132
     133        virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
    122134
    123135        QWebPage* m_webPage;
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp

    r2 r561  
    5353}
    5454
    55 void ContextMenuClientQt::downloadURL(const KURL& url)
     55void ContextMenuClientQt::downloadURL(const KURL&)
    5656{
    5757    notImplemented();
     
    6868}
    6969
     70bool ContextMenuClientQt::isSpeaking()
     71{
     72    notImplemented();
     73    return false;
     74}
     75
    7076void ContextMenuClientQt::stopSpeaking()
    7177{
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h

    r2 r561  
    4545        virtual void lookUpInDictionary(Frame*);
    4646        virtual void speak(const String&);
     47        virtual bool isSpeaking();
    4748        virtual void stopSpeaking();
    4849        virtual void searchWithGoogle(const Frame*);
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/DragClientQt.cpp

    r2 r561  
    2424 */
    2525
     26#include "config.h"
    2627#include "DragClientQt.h"
    2728
     
    6667    if (view) {
    6768        QDrag *drag = new QDrag(view);
     69        if (clipboardData->hasImage())
     70            drag->setPixmap(qvariant_cast<QPixmap>(clipboardData->imageData()));
    6871        drag->setMimeData(clipboardData);
    6972        drag->start();
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditCommandQt.cpp

    r2 r561  
    1818*/
    1919
     20#include "config.h"
    2021#include <wtf/Platform.h>
    2122#include "EditCommandQt.h"
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp

    r2 r561  
    22 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
    33 * Copyright (C) 2006 Zack Rusin <zack@kde.org>
    4  * Copyright (C) 2006, 2008 Apple Computer, Inc.
     4 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
    55 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
    66 *
     
    3535#include "qwebpage_p.h"
    3636
     37#include "CSSStyleDeclaration.h"
    3738#include "Document.h"
    3839#include "EditCommandQt.h"
    39 #include "Page.h"
    4040#include "Editor.h"
    4141#include "FocusController.h"
    4242#include "Frame.h"
     43#include "HTMLElement.h"
     44#include "HTMLInputElement.h"
     45#include "HTMLNames.h"
    4346#include "KeyboardCodes.h"
    4447#include "KeyboardEvent.h"
     48#include "NotImplemented.h"
     49#include "Page.h"
    4550#include "Page.h"
    4651#include "PlatformKeyboardEvent.h"
    47 #include "NotImplemented.h"
    48 #include "Node.h"
     52#include "QWebPageClient.h"
    4953#include "Range.h"
    5054
     
    8488    if (!range)
    8589        return QLatin1String("(null)");
    86     QString str;
    8790    WebCore::ExceptionCode code;
    88     str.sprintf("range from %ld of %ls to %ld of %ls",
    89                 range->startOffset(code), dumpPath(range->startContainer(code)).unicode(),
    90                 range->endOffset(code), dumpPath(range->endContainer(code)).unicode());
     91
     92    QString str = QString("range from %1 of %2 to %3 of %4")
     93        .arg(range->startOffset(code)).arg(dumpPath(range->startContainer(code)))
     94        .arg(range->endOffset(code)).arg(dumpPath(range->endContainer(code)));
     95
    9196    return str;
    9297}
     
    95100namespace WebCore {
    96101
     102using namespace HTMLNames;
    97103
    98104bool EditorClientQt::shouldDeleteRange(Range* range)
     
    107113{
    108114    if (QWebPagePrivate::drtRun)
    109         return element->className() == "needsDeletionUI";
     115        return element->getAttribute(classAttr) == "needsDeletionUI";
    110116    return false;
    111117}
     
    217223    m_page->d->updateEditorActions();
    218224    emit m_page->selectionChanged();
    219     emit m_page->microFocusChanged();
     225    Frame* frame = m_page->d->page->focusController()->focusedOrMainFrame();
     226    if (!frame->editor()->ignoreCompositionSelectionChange())
     227        emit m_page->microFocusChanged();
    220228}
    221229
     
    547555}
    548556
     557String EditorClientQt::getAutoCorrectSuggestionForMisspelledWord(const String&)
     558{
     559    notImplemented();
     560    return String();
     561}
     562
    549563void EditorClientQt::checkGrammarOfString(const UChar*, int, Vector<GrammarDetail>&, int*, int*)
    550564{
     
    585599void EditorClientQt::setInputMethodState(bool active)
    586600{
    587     QWidget *view = m_page->view();
    588     if (view) {
    589         view->setAttribute(Qt::WA_InputMethodEnabled, active);
    590         emit m_page->microFocusChanged();
     601    QWebPageClient* webPageClient = m_page->d->client;
     602    if (webPageClient) {
     603#if QT_VERSION >= 0x040600
     604        bool isPasswordField = false;
     605        if (!active) {
     606            // Setting the Qt::WA_InputMethodEnabled attribute true and Qt::ImhHiddenText flag
     607            // for password fields. The Qt platform is responsible for determining which widget
     608            // 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            }
     616        }
     617        webPageClient->setInputMethodHint(Qt::ImhHiddenText, isPasswordField);
     618#endif
     619        webPageClient->setInputMethodEnabled(active);
    591620    }
     621    emit m_page->microFocusChanged();
    592622}
    593623
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.h

    r2 r561  
    9999    virtual void learnWord(const String&);
    100100    virtual void checkSpellingOfString(const UChar*, int length, int* misspellingLocation, int* misspellingLength);
     101    virtual String getAutoCorrectSuggestionForMisspelledWord(const String& misspelledWord);
    101102    virtual void checkGrammarOfString(const UChar*, int length, Vector<GrammarDetail>&, int* badGrammarLocation, int* badGrammarLength);
    102103    virtual void updateSpellingUIWithGrammarString(const String&, const GrammarDetail&);
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp

    r2 r561  
    3333#include "CSSComputedStyleDeclaration.h"
    3434#include "CSSPropertyNames.h"
     35#include "FormState.h"
    3536#include "FrameLoaderClientQt.h"
    3637#include "FrameTree.h"
    3738#include "FrameView.h"
    3839#include "DocumentLoader.h"
     40#include "JSDOMWindowBase.h"
    3941#include "MIMETypeRegistry.h"
    4042#include "ResourceResponse.h"
     
    4648#include "ResourceRequest.h"
    4749#include "HistoryItem.h"
     50#include "HTMLAppletElement.h"
    4851#include "HTMLFormElement.h"
     52#include "HTMLPlugInElement.h"
    4953#include "NotImplemented.h"
    5054#include "QNetworkReplyHandler.h"
     
    5256#include "ResourceHandle.h"
    5357#include "Settings.h"
     58#include "ScriptString.h"
     59#include "QWebPageClient.h"
    5460
    5561#include "qwebpage.h"
     62#include "qwebpage_p.h"
    5663#include "qwebframe.h"
    5764#include "qwebframe_p.h"
     
    6471#include <QDebug>
    6572#if QT_VERSION >= 0x040400
     73#include <QGraphicsScene>
     74#include <QGraphicsWidget>
    6675#include <QNetworkRequest>
    6776#include <QNetworkReply>
     
    141150    , m_hasSentResponseToPlugin(false)
    142151    , m_firstData(false)
    143     , m_policyFunction(0)
    144     , m_loadSucceeded(false)
    145 {
    146     connect(this, SIGNAL(sigCallPolicyFunction(int)), this, SLOT(slotCallPolicyFunction(int)), Qt::QueuedConnection);
     152    , m_loadError (ResourceError())
     153{
    147154}
    148155
     
    163170    connect(this, SIGNAL(loadStarted()),
    164171            m_webFrame->page(), SIGNAL(loadStarted()));
     172    connect(this, SIGNAL(loadStarted()),
     173            m_webFrame, SIGNAL(loadStarted()));
    165174    connect(this, SIGNAL(loadProgress(int)),
    166175            m_webFrame->page(), SIGNAL(loadProgress(int)));
    167176    connect(this, SIGNAL(loadFinished(bool)),
    168177            m_webFrame->page(), SIGNAL(loadFinished(bool)));
    169     connect(this, SIGNAL(titleChanged(const QString&)),
    170             m_webFrame, SIGNAL(titleChanged(const QString&)));
     178    connect(this, SIGNAL(loadFinished(bool)),
     179            m_webFrame, SIGNAL(loadFinished(bool)));
     180    connect(this, SIGNAL(titleChanged(QString)),
     181            m_webFrame, SIGNAL(titleChanged(QString)));
    171182}
    172183
     
    178189void FrameLoaderClientQt::callPolicyFunction(FramePolicyFunction function, PolicyAction action)
    179190{
    180     ASSERT(!m_policyFunction);
    181     ASSERT(function);
    182 
    183     m_policyFunction = function;
    184     emit sigCallPolicyFunction(action);
    185 }
    186 
    187 void FrameLoaderClientQt::slotCallPolicyFunction(int action)
    188 {
    189     if (!m_frame || !m_policyFunction)
    190         return;
    191     FramePolicyFunction function = m_policyFunction;
    192     m_policyFunction = 0;
    193     (m_frame->loader()->*function)(WebCore::PolicyAction(action));
     191    (m_frame->loader()->policyChecker()->*function)(action);
    194192}
    195193
     
    200198}
    201199
    202 void FrameLoaderClientQt::savePlatformDataToCachedPage(CachedPage*)
    203 {
    204     notImplemented();
    205 }
    206 
    207 void FrameLoaderClientQt::transitionToCommittedFromCachedPage(CachedPage*)
     200void FrameLoaderClientQt::savePlatformDataToCachedFrame(CachedFrame*)
     201{
     202    notImplemented();
     203}
     204
     205void FrameLoaderClientQt::transitionToCommittedFromCachedFrame(CachedFrame*)
    208206{
    209207}
     
    216214    QBrush brush = m_webFrame->page()->palette().brush(QPalette::Base);
    217215    QColor backgroundColor = brush.style() == Qt::SolidPattern ? brush.color() : QColor();
    218     WebCore::FrameLoaderClient::transitionToCommittedForNewPage(m_frame, m_webFrame->page()->viewportSize(),
    219                                                                 backgroundColor, !backgroundColor.alpha(),
    220                                                                 /*fixedLayoutSize*/ IntSize(),
    221                                                                 /*useFixedLayout*/ false,
    222                                                                 (ScrollbarMode)m_webFrame->scrollBarPolicy(Qt::Horizontal),
    223                                                                 (ScrollbarMode)m_webFrame->scrollBarPolicy(Qt::Vertical));
     216
     217    QWebPage* page = m_webFrame->page();
     218    const QSize preferredLayoutSize = page->preferredContentsSize();
     219
     220    m_frame->createView(m_webFrame->page()->viewportSize(),
     221                        backgroundColor, !backgroundColor.alpha(),
     222                        preferredLayoutSize.isValid() ? IntSize(preferredLayoutSize) : IntSize(),
     223                        preferredLayoutSize.isValid(),
     224                        (ScrollbarMode)m_webFrame->scrollBarPolicy(Qt::Horizontal),
     225                        (ScrollbarMode)m_webFrame->scrollBarPolicy(Qt::Vertical));
    224226}
    225227
     
    233235void FrameLoaderClientQt::forceLayout()
    234236{
    235     m_frame->forceLayout(true);
     237    FrameView* view = m_frame->view();
     238    if (view)
     239        view->forceLayout(true);
    236240}
    237241
     
    284288
    285289
    286 void FrameLoaderClientQt::dispatchWillPerformClientRedirect(const KURL& url,
    287                                                             double interval,
    288                                                             double fireDate)
     290void FrameLoaderClientQt::dispatchWillPerformClientRedirect(const KURL& url, double, double)
    289291{
    290292    if (dumpFrameLoaderCallbacks)
     
    333335        return;
    334336
    335 
    336 
    337     // ### hack
    338     emit m_webFrame->urlChanged(m_webFrame->url());
    339337    emit titleChanged(title);
    340338}
     
    349347        return;
    350348
     349    emit m_webFrame->urlChanged(m_webFrame->url());
    351350    m_webFrame->page()->d->updateNavigationActions();
    352351
     
    364363
    365364    if (QWebPagePrivate::drtRun) {
    366         int unloadEventCount = m_frame->eventHandler()->pendingFrameUnloadEventCount();
     365        int unloadEventCount = m_frame->domWindow()->pendingUnloadEventListeners();
    367366        if (unloadEventCount)
    368367            printf("%s - has %u onunload handler(s)\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)), unloadEventCount);
     
    381380        printf("%s - didFinishLoadForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
    382381
    383     m_loadSucceeded = true;
    384 
    385     if (m_frame->tree()->parent() || !m_webFrame)
     382    // Clears the previous error.
     383    m_loadError = ResourceError();
     384
     385    if (!m_webFrame)
    386386        return;
    387387    m_webFrame->page()->d->updateNavigationActions();
     
    409409{
    410410//    qDebug() << "FrameLoaderClientQt::cancelPolicyCheck";
    411     m_policyFunction = 0;
    412411}
    413412
     
    417416{
    418417    notImplemented();
    419     Q_ASSERT(!m_policyFunction);
    420418    // FIXME: This is surely too simple
    421419    callPolicyFunction(function, PolicyUse);
     
    437435{
    438436    if (m_webFrame && m_frame->page()) {
     437        // A new load starts, so lets clear the previous error.
     438        m_loadError = ResourceError();
    439439        emit loadStarted();
    440440        postProgressEstimateChangedNotification();
     
    468468
    469469    if (m_webFrame && m_frame->page())
    470         emit loadFinished(m_loadSucceeded);
    471 }
    472 
    473 void FrameLoaderClientQt::setMainFrameDocumentReady(bool b)
     470        emit loadFinished(m_loadError.isNull());
     471}
     472
     473void FrameLoaderClientQt::setMainFrameDocumentReady(bool)
    474474{
    475475    // this is only interesting once we provide an external API for the DOM
     
    521521}
    522522
    523 bool FrameLoaderClientQt::representationExistsForURLScheme(const String& URLScheme) const
     523bool FrameLoaderClientQt::representationExistsForURLScheme(const String&) const
    524524{
    525525    return false;
     
    527527
    528528
    529 String FrameLoaderClientQt::generatedMIMETypeForURLScheme(const String& URLScheme) const
     529String FrameLoaderClientQt::generatedMIMETypeForURLScheme(const String&) const
    530530{
    531531    notImplemented();
     
    537537{
    538538    // Note: Can be called multiple times.
    539     // Even if already complete, we might have set a previous item on a frame that
    540     // didn't do any data loading on the past transaction. Make sure to clear these out.
    541     m_frame->loader()->setPreviousHistoryItem(0);
    542539}
    543540
     
    565562void FrameLoaderClientQt::prepareForDataSourceReplacement()
    566563{
    567     m_frame->loader()->detachChildren();
    568564}
    569565
     
    615611}
    616612
     613void FrameLoaderClientQt::documentElementAvailable()
     614{
     615    return;
     616}
     617
    617618void FrameLoaderClientQt::didPerformFirstNavigation() const
    618619{
     
    634635}
    635636
    636 bool FrameLoaderClientQt::shouldGoToHistoryItem(WebCore::HistoryItem *item) const
     637void FrameLoaderClientQt::updateGlobalHistoryRedirectLinks()
     638{
     639}
     640
     641bool FrameLoaderClientQt::shouldGoToHistoryItem(WebCore::HistoryItem *) const
    637642{
    638643    return true;
     644}
     645
     646void FrameLoaderClientQt::didDisplayInsecureContent()
     647{
     648    notImplemented();
     649}
     650
     651void FrameLoaderClientQt::didRunInsecureContent(WebCore::SecurityOrigin*)
     652{
     653    notImplemented();
    639654}
    640655
     
    681696        if (!m_hasSentResponseToPlugin) {
    682697            m_pluginView->didReceiveResponse(loader->response());
     698            // didReceiveResponse sets up a new stream to the plug-in. on a full-page plug-in, a failure in
     699            // setting up this stream can cause the main document load to be cancelled, setting m_pluginView
     700            // to null
     701            if (!m_pluginView)
     702                return;
    683703            m_hasSentResponseToPlugin = true;
    684704        }
     
    689709WebCore::ResourceError FrameLoaderClientQt::cancelledError(const WebCore::ResourceRequest& request)
    690710{
    691     return ResourceError("Error", -999, request.url().prettyURL(),
     711    ResourceError error = ResourceError("QtNetwork", QNetworkReply::OperationCanceledError, request.url().prettyURL(),
    692712            QCoreApplication::translate("QWebFrame", "Request cancelled", 0, QCoreApplication::UnicodeUTF8));
     713    error.setIsCancellation(true);
     714    return error;
    693715}
    694716
     
    706728WebCore::ResourceError FrameLoaderClientQt::blockedError(const WebCore::ResourceRequest& request)
    707729{
    708     return ResourceError("Error", WebKitErrorCannotUseRestrictedPort, request.url().prettyURL(),
     730    return ResourceError("WebKit", WebKitErrorCannotUseRestrictedPort, request.url().prettyURL(),
    709731            QCoreApplication::translate("QWebFrame", "Request blocked", 0, QCoreApplication::UnicodeUTF8));
    710732}
     
    713735WebCore::ResourceError FrameLoaderClientQt::cannotShowURLError(const WebCore::ResourceRequest& request)
    714736{
    715     return ResourceError("Error", WebKitErrorCannotShowURL, request.url().string(),
     737    return ResourceError("WebKit", WebKitErrorCannotShowURL, request.url().string(),
    716738            QCoreApplication::translate("QWebFrame", "Cannot show URL", 0, QCoreApplication::UnicodeUTF8));
    717739}
     
    719741WebCore::ResourceError FrameLoaderClientQt::interruptForPolicyChangeError(const WebCore::ResourceRequest& request)
    720742{
    721     return ResourceError("Error", WebKitErrorFrameLoadInterruptedByPolicyChange, request.url().string(),
    722             QCoreApplication::translate("QWebFrame", "Frame load interruped by policy change", 0, QCoreApplication::UnicodeUTF8));
     743    return ResourceError("WebKit", WebKitErrorFrameLoadInterruptedByPolicyChange, request.url().string(),
     744            QCoreApplication::translate("QWebFrame", "Frame load interrupted by policy change", 0, QCoreApplication::UnicodeUTF8));
    723745}
    724746
    725747WebCore::ResourceError FrameLoaderClientQt::cannotShowMIMETypeError(const WebCore::ResourceResponse& response)
    726748{
    727     return ResourceError("Error", WebKitErrorCannotShowMIMEType, response.url().string(),
     749    return ResourceError("WebKit", WebKitErrorCannotShowMIMEType, response.url().string(),
    728750            QCoreApplication::translate("QWebFrame", "Cannot show mimetype", 0, QCoreApplication::UnicodeUTF8));
    729751}
     
    731753WebCore::ResourceError FrameLoaderClientQt::fileDoesNotExistError(const WebCore::ResourceResponse& response)
    732754{
    733     return ResourceError("Error", -998 /* ### */, response.url().string(),
     755    return ResourceError("QtNetwork", QNetworkReply::ContentNotFoundError, response.url().string(),
    734756            QCoreApplication::translate("QWebFrame", "File does not exist", 0, QCoreApplication::UnicodeUTF8));
    735757}
    736758
    737 WebCore::ResourceError FrameLoaderClientQt::pluginWillHandleLoadError(const WebCore::ResourceResponse& response)
     759WebCore::ResourceError FrameLoaderClientQt::pluginWillHandleLoadError(const WebCore::ResourceResponse&)
    738760{
    739761    notImplemented();
     
    750772{
    751773    RefPtr<DocumentLoader> loader = DocumentLoader::create(request, substituteData);
    752     if (substituteData.isValid())
     774    if (substituteData.isValid()) {
    753775        loader->setDeferMainResourceDataLoad(false);
     776        // Use the default timeout interval for JS as the HTML tokenizer delay. This ensures
     777        // that long-running JavaScript will still allow setHtml() to be synchronous, while
     778        // still giving a reasonable timeout to prevent deadlock.
     779        double delay = JSDOMWindowBase::commonJSGlobalData()->timeoutChecker.timeoutInterval() / 1000.0f;
     780        m_frame->page()->setCustomHTMLTokenizerTimeDelay(delay);
     781    } else {
     782        m_frame->page()->setCustomHTMLTokenizerTimeDelay(-1);
     783    }
    754784    return loader.release();
    755785}
     
    773803}
    774804
    775 void FrameLoaderClientQt::assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader* loader, const WebCore::ResourceRequest& request)
     805void FrameLoaderClientQt::assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader*, const WebCore::ResourceRequest& request)
    776806{
    777807    if (dumpResourceLoadCallbacks)
     
    820850}
    821851
    822 void FrameLoaderClientQt::dispatchDidFinishLoading(WebCore::DocumentLoader* loader, unsigned long)
     852void FrameLoaderClientQt::dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long)
    823853{
    824854}
     
    842872}
    843873
    844 void FrameLoaderClientQt::dispatchDidFailProvisionalLoad(const WebCore::ResourceError&)
     874void FrameLoaderClientQt::dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const WebCore::ScriptString&)
     875{
     876    notImplemented();
     877}
     878
     879void FrameLoaderClientQt::callErrorPageExtension(const WebCore::ResourceError& error)
     880{
     881    QWebPage* page = m_webFrame->page();
     882    if (page->supportsExtension(QWebPage::ErrorPageExtension)) {
     883        QWebPage::ErrorPageExtensionOption option;
     884
     885        if (error.domain() == "QtNetwork")
     886            option.domain = QWebPage::QtNetwork;
     887        else if (error.domain() == "HTTP")
     888            option.domain = QWebPage::Http;
     889        else if (error.domain() == "WebKit")
     890            option.domain = QWebPage::WebKit;
     891        else
     892            return;
     893
     894        option.url = QUrl(error.failingURL());
     895        option.frame = m_webFrame;
     896        option.error = error.errorCode();
     897        option.errorString = error.localizedDescription();
     898
     899        QWebPage::ErrorPageExtensionReturn output;
     900        if (!page->extension(QWebPage::ErrorPageExtension, &option, &output))
     901            return;
     902
     903        KURL baseUrl(output.baseUrl);
     904        KURL failingUrl(option.url);
     905
     906        WebCore::ResourceRequest request(baseUrl);
     907        WTF::RefPtr<WebCore::SharedBuffer> buffer = WebCore::SharedBuffer::create(output.content.constData(), output.content.length());
     908        WebCore::SubstituteData substituteData(buffer, output.contentType, output.encoding, failingUrl);
     909        m_frame->loader()->load(request, substituteData, false);
     910    }
     911}
     912
     913void FrameLoaderClientQt::dispatchDidFailProvisionalLoad(const WebCore::ResourceError& error)
    845914{
    846915    if (dumpFrameLoaderCallbacks)
    847916        printf("%s - didFailProvisionalLoadWithError\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
    848917
    849     m_loadSucceeded = false;
    850 }
    851 
    852 void FrameLoaderClientQt::dispatchDidFailLoad(const WebCore::ResourceError&)
     918    m_loadError = error;
     919    if (!error.isNull() && !error.isCancellation())
     920        callErrorPageExtension(error);
     921}
     922
     923void FrameLoaderClientQt::dispatchDidFailLoad(const WebCore::ResourceError& error)
    853924{
    854925    if (dumpFrameLoaderCallbacks)
    855926        printf("%s - didFailLoadWithError\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
    856927
    857     m_loadSucceeded = false;
     928    m_loadError = error;
     929    if (!error.isNull() && !error.isCancellation())
     930        callErrorPageExtension(error);
    858931}
    859932
     
    871944{
    872945    // we need to call directly here
    873     Q_ASSERT(!m_policyFunction);
    874     m_policyFunction = function;
    875946    if (canShowMIMEType(MIMEType))
    876         slotCallPolicyFunction(PolicyUse);
     947        callPolicyFunction(function, PolicyUse);
    877948    else
    878         slotCallPolicyFunction(PolicyDownload);
     949        callPolicyFunction(function, PolicyDownload);
    879950}
    880951
    881952void FrameLoaderClientQt::dispatchDecidePolicyForNewWindowAction(FramePolicyFunction function, const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request, PassRefPtr<WebCore::FormState>, const WebCore::String&)
    882953{
    883     Q_ASSERT(!m_policyFunction);
    884954    Q_ASSERT(m_webFrame);
    885     m_policyFunction = function;
    886955#if QT_VERSION < 0x040400
    887956    QWebNetworkRequest r(request);
    888957#else
    889     QNetworkRequest r(request.toNetworkRequest());
     958    QNetworkRequest r(request.toNetworkRequest(m_webFrame));
    890959#endif
    891960    QWebPage* page = m_webFrame->page();
     
    900969        }
    901970
    902         slotCallPolicyFunction(PolicyIgnore);
     971        callPolicyFunction(function, PolicyIgnore);
    903972        return;
    904973    }
    905     slotCallPolicyFunction(PolicyUse);
     974    callPolicyFunction(function, PolicyUse);
    906975}
    907976
    908977void FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction(FramePolicyFunction function, const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request, PassRefPtr<WebCore::FormState>)
    909978{
    910     Q_ASSERT(!m_policyFunction);
    911979    Q_ASSERT(m_webFrame);
    912     m_policyFunction = function;
    913980#if QT_VERSION < 0x040400
    914981    QWebNetworkRequest r(request);
    915982#else
    916     QNetworkRequest r(request.toNetworkRequest());
     983    QNetworkRequest r(request.toNetworkRequest(m_webFrame));
    917984#endif
    918985    QWebPage*page = m_webFrame->page();
     
    927994        }
    928995
    929         slotCallPolicyFunction(PolicyIgnore);
     996        callPolicyFunction(function, PolicyIgnore);
    930997        return;
    931998    }
    932     slotCallPolicyFunction(PolicyUse);
     999    callPolicyFunction(function, PolicyUse);
    9331000}
    9341001
     
    9441011        return;
    9451012
    946     QWebPage *page = m_webFrame->page();
    947     emit m_webFrame->page()->downloadRequested(request.toNetworkRequest());
     1013    emit m_webFrame->page()->downloadRequested(request.toNetworkRequest(m_webFrame));
    9481014#endif
    9491015}
     
    9551021        return 0;
    9561022
    957     QWebFrameData frameData;
     1023    QWebFrameData frameData(m_frame->page(), m_frame, ownerElement, name);
    9581024    frameData.url = url;
    959     frameData.name = name;
    960     frameData.ownerElement = ownerElement;
    9611025    frameData.referrer = referrer;
    9621026    frameData.allowsScrolling = allowsScrolling;
     
    9641028    frameData.marginHeight = marginHeight;
    9651029
    966     QWebFrame* webFrame = new QWebFrame(m_webFrame, &frameData);
     1030    QPointer<QWebFrame> webFrame = new QWebFrame(m_webFrame, &frameData);
     1031    // The creation of the frame may have run arbitrary JavaScript that removed it from the page already.
     1032    if (!webFrame->d->frame->page()) {
     1033        frameData.frame.release();
     1034        ASSERT(webFrame.isNull());
     1035        return 0;
     1036    }
     1037
    9671038    emit m_webFrame->page()->frameCreated(webFrame);
    9681039
    969     RefPtr<Frame> childFrame = adoptRef(webFrame->d->frame);
    970 
    9711040    // ### set override encoding if we have one
    9721041
    973     FrameLoadType loadType = m_frame->loader()->loadType();
    974     FrameLoadType childLoadType = FrameLoadTypeRedirectWithLockedHistory;
    975 
    976     childFrame->loader()->loadURL(frameData.url, frameData.referrer, String(), childLoadType, 0, 0);
     1042    frameData.frame->loader()->loadURLIntoChildFrame(frameData.url, frameData.referrer, frameData.frame.get());
    9771043
    9781044    // The frame's onload handler may have removed it from the document.
    979     if (!childFrame->tree()->parent())
     1045    if (!frameData.frame->tree()->parent())
    9801046        return 0;
    9811047
    982     return childFrame.release();
     1048    return frameData.frame.release();
    9831049}
    9841050
     
    10321098{
    10331099public:
    1034     QtPluginWidget(QWidget* w = 0): Widget(w) {}
     1100    QtPluginWidget(QWidget* w = 0)
     1101        : Widget(w)
     1102        , m_visible(false)
     1103    {}
     1104
    10351105    ~QtPluginWidget()
    10361106    {
     
    10591129        clipRect.move(-windowRect.x(), -windowRect.y());
    10601130        clipRect.intersect(platformWidget()->rect());
    1061         platformWidget()->setMask(QRegion(clipRect.x(), clipRect.y(), clipRect.width(), clipRect.height()));
    1062     }
     1131
     1132        QRegion clipRegion = QRegion(clipRect);
     1133        platformWidget()->setMask(clipRegion);
     1134
     1135        handleVisibility();
     1136    }
     1137
     1138    virtual void hide()
     1139    {
     1140        m_visible = false;
     1141        Widget::hide();
     1142    }
     1143
     1144    virtual void show()
     1145    {
     1146        m_visible = true;
     1147        if (!platformWidget())
     1148            return;
     1149
     1150        handleVisibility();   
     1151    }
     1152
     1153private:
     1154    void handleVisibility()
     1155    {
     1156        if (!m_visible)
     1157            return;
     1158
     1159        // if setMask is set with an empty QRegion, no clipping will
     1160        // be performed, so in that case we hide the platformWidget
     1161        QRegion mask = platformWidget()->mask();
     1162        platformWidget()->setVisible(!mask.isEmpty());
     1163    }
     1164
     1165    bool m_visible;
    10631166};
    10641167
    1065 Widget* FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, Element* element, const KURL& url, const Vector<String>& paramNames,
     1168#if QT_VERSION >= 0x040600
     1169class QtPluginGraphicsWidget: public Widget
     1170{
     1171public:
     1172    static RefPtr<QtPluginGraphicsWidget> create(QGraphicsWidget* w = 0)
     1173    {
     1174        return adoptRef(new QtPluginGraphicsWidget(w));
     1175    }
     1176
     1177    ~QtPluginGraphicsWidget()
     1178    {
     1179        if (graphicsWidget)
     1180            graphicsWidget->deleteLater();
     1181    }
     1182    virtual void invalidateRect(const IntRect& r)
     1183    {
     1184        QGraphicsScene* scene = graphicsWidget ? graphicsWidget->scene() : 0;
     1185        if (scene)
     1186            scene->update(QRect(r));
     1187    }
     1188    virtual void frameRectsChanged()
     1189    {
     1190        if (!graphicsWidget)
     1191            return;
     1192
     1193        IntRect windowRect = convertToContainingWindow(IntRect(0, 0, frameRect().width(), frameRect().height()));
     1194        graphicsWidget->setGeometry(QRect(windowRect));
     1195
     1196        // FIXME: clipping of graphics widgets
     1197    }
     1198    virtual void show()
     1199    {
     1200        if (graphicsWidget)
     1201            graphicsWidget->show();
     1202    }
     1203    virtual void hide()
     1204    {
     1205        if (graphicsWidget)
     1206            graphicsWidget->hide();
     1207    }
     1208private:
     1209    QtPluginGraphicsWidget(QGraphicsWidget* w = 0): Widget(0), graphicsWidget(w) {}
     1210
     1211    QGraphicsWidget* graphicsWidget;
     1212};
     1213#endif
     1214
     1215PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames,
    10661216                                          const Vector<String>& paramValues, const String& mimeType, bool loadManually)
    10671217{
     
    10761226    QString classid(element->getAttribute("classid"));
    10771227
    1078     for (int i = 0; i < paramNames.size(); ++i) {
     1228    for (unsigned i = 0; i < paramNames.size(); ++i) {
    10791229        params.append(paramNames[i]);
    10801230        if (paramNames[i] == "classid")
    10811231            classid = paramValues[i];
    10821232    }
    1083     for (int i = 0; i < paramValues.size(); ++i)
     1233    for (unsigned i = 0; i < paramValues.size(); ++i)
    10841234        values.append(paramValues[i]);
    10851235
     
    10991249                styleSheet += QLatin1Char(';');
    11001250
    1101             for (int i = 0; i < numqStyleSheetProperties; ++i) {
     1251            for (unsigned i = 0; i < numqStyleSheetProperties; ++i) {
    11021252                CSSPropertyID property = qstyleSheetProperties[i];
    11031253
     
    11241274            QWidget* widget = qobject_cast<QWidget*>(object);
    11251275            if (widget) {
    1126                 QWidget* view = m_webFrame->page()->view();
    1127                 if (view)
    1128                     widget->setParent(view);
    1129                 QtPluginWidget* w = new QtPluginWidget();
     1276                QWidget* parentWidget = 0;
     1277                if (m_webFrame->page()->d->client)
     1278                    parentWidget = qobject_cast<QWidget*>(m_webFrame->page()->d->client->pluginParent());
     1279                if (parentWidget) // don't reparent to nothing (i.e. keep whatever parent QWebPage::createPlugin() chose.
     1280                    widget->setParent(parentWidget);
     1281                widget->hide();
     1282                RefPtr<QtPluginWidget> w = adoptRef(new QtPluginWidget());
    11301283                w->setPlatformWidget(widget);
    11311284                // Make sure it's invisible until properly placed into the layout
     
    11331286                return w;
    11341287            }
     1288#if QT_VERSION >= 0x040600
     1289            QGraphicsWidget* graphicsWidget = qobject_cast<QGraphicsWidget*>(object);
     1290            if (graphicsWidget) {
     1291                QGraphicsObject* parentWidget = 0;
     1292                if (m_webFrame->page()->d->client)
     1293                    parentWidget = qobject_cast<QGraphicsObject*>(m_webFrame->page()->d->client->pluginParent());
     1294                graphicsWidget->hide();
     1295                if (parentWidget) // don't reparent to nothing (i.e. keep whatever parent QWebPage::createPlugin() chose.
     1296                    graphicsWidget->setParentItem(parentWidget);
     1297                RefPtr<QtPluginGraphicsWidget> w = QtPluginGraphicsWidget::create(graphicsWidget);
     1298                // Make sure it's invisible until properly placed into the layout
     1299                w->setFrameRect(IntRect(0, 0, 0, 0));
     1300                return w;
     1301            }
     1302#endif
    11351303            // FIXME: make things work for widgetless plugins as well
    11361304            delete object;
    11371305    } else { // NPAPI Plugins
    1138         PluginView* pluginView = PluginView::create(m_frame, pluginSize, element, url,
     1306        RefPtr<PluginView> pluginView = PluginView::create(m_frame, pluginSize, element, url,
    11391307            paramNames, paramValues, mimeType, loadManually);
    11401308        return pluginView;
     
    11511319}
    11521320
    1153 Widget* FrameLoaderClientQt::createJavaAppletWidget(const IntSize&, Element*, const KURL& baseURL,
    1154                                                     const Vector<String>& paramNames, const Vector<String>& paramValues)
     1321PassRefPtr<Widget> FrameLoaderClientQt::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL&,
     1322                                                    const Vector<String>&, const Vector<String>&)
    11551323{
    11561324    notImplemented();
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h

    r2 r561  
    6060        friend class ::QWebFrame;
    6161        void callPolicyFunction(FramePolicyFunction function, PolicyAction action);
    62     private slots:
    63         void slotCallPolicyFunction(int);
     62        void callErrorPageExtension(const ResourceError&);
    6463    signals:
    65         void sigCallPolicyFunction(int);
    6664        void loadStarted();
    6765        void loadProgress(int d);
     
    9997        virtual void dispatchDidFailLoading(WebCore::DocumentLoader*, unsigned long, const WebCore::ResourceError&);
    10098        virtual bool dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, int);
     99        virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const WebCore::ScriptString& sourceString);
    101100
    102101        virtual void dispatchDidHandleOnloadEvents();
     
    148147
    149148        virtual void updateGlobalHistory();
     149        virtual void updateGlobalHistoryRedirectLinks();
    150150        virtual bool shouldGoToHistoryItem(HistoryItem*) const;
     151
     152        virtual void didDisplayInsecureContent();
     153        virtual void didRunInsecureContent(SecurityOrigin*);
    151154
    152155        virtual ResourceError cancelledError(const ResourceRequest&);
     
    178181        virtual String userAgent(const WebCore::KURL&);
    179182
    180         virtual void savePlatformDataToCachedPage(WebCore::CachedPage*);
    181         virtual void transitionToCommittedFromCachedPage(WebCore::CachedPage*);
     183        virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*);
     184        virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*);
    182185        virtual void transitionToCommittedForNewPage();
    183186
     
    187190        virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
    188191                                   const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) ;
    189         virtual Widget* createPlugin(const IntSize&, Element*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool);
     192        virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool);
    190193        virtual void redirectDataToPlugin(Widget* pluginWidget);
    191194
    192         virtual Widget* createJavaAppletWidget(const IntSize&, Element*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues);
     195        virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues);
    193196
    194197        virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType);
     
    196199
    197200        virtual void windowObjectCleared();
     201        virtual void documentElementAvailable();
    198202        virtual void didPerformFirstNavigation() const;
    199203
     
    207211        ResourceResponse m_response;
    208212        bool m_firstData;
    209         FramePolicyFunction m_policyFunction;
    210213
    211214        // Plugin view to redirect data to
     
    213216        bool m_hasSentResponseToPlugin;
    214217
    215         bool m_loadSucceeded;
     218        ResourceError m_loadError;
    216219    };
    217220
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp

    r2 r561  
    3232#include "InspectorClientQt.h"
    3333
     34#include "qwebinspector.h"
     35#include "qwebinspector_p.h"
    3436#include "qwebpage.h"
    3537#include "qwebpage_p.h"
    3638#include "qwebview.h"
    3739
     40#include <QtCore/QSettings>
    3841#include <QtCore/QCoreApplication>
    3942
     
    4548namespace WebCore {
    4649
    47 class InspectorClientWebPage : public QWebPage
    48 {
     50static const QLatin1String settingStoragePrefix("Qt/QtWebKit/QWebInspector/");
     51static const QLatin1String settingStorageTypeSuffix(".type");
     52
     53static InspectorController::Setting variantToSetting(const QVariant& qvariant);
     54static QVariant settingToVariant(const InspectorController::Setting& icSetting);
     55
     56class InspectorClientWebPage : public QWebPage {
    4957    Q_OBJECT
    5058    friend class InspectorClientQt;
    5159public:
     60    InspectorClientWebPage(QObject* parent = 0)
     61    : QWebPage(parent)
     62    {
     63        settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, false);
     64    }
     65
    5266    QWebPage* createWindow(QWebPage::WebWindowType)
    5367    {
    54         QWidget *w = new QWebView(0);
    55         QWebPage *page = new QWebPage(w);
    56         page->setView(w);
    57         connect(page, SIGNAL(destroyed()), w, SLOT(deleteLater()));
     68        QWebView* view = new QWebView;
     69        QWebPage* page = new QWebPage;
     70        view->setPage(page);
     71        view->setAttribute(Qt::WA_DeleteOnClose);
    5872        return page;
    5973    }
    60 
    61 Q_SIGNALS:
    62     void attachRequested();
    63     void detachRequested();
    6474};
    65 
    66 
    67 class InspectorClientView : public QWebView {
    68 public:
    69     InspectorClientView(InspectorController* controller)
    70         : QWebView(0)
    71         , m_controller(controller)
    72     {
    73         setPage(new InspectorClientWebPage);
    74         connect(page(), SIGNAL(destroyed()), SLOT(deleteLater()));
    75     }
    76 
    77 protected:
    78 
    79     void closeEvent(QCloseEvent* ev)
    80     {
    81         QWidget::closeEvent(ev);
    82         m_controller->setWindowVisible(false);
    83     }
    84 
    85 private:
    86     InspectorController* m_controller;
    87 };
    88 
    8975
    9076InspectorClientQt::InspectorClientQt(QWebPage* page)
     
    9985Page* InspectorClientQt::createPage()
    10086{
    101     if (m_webPage)
    102         return m_webPage->d->page;
    103 
    104     InspectorClientView* view = new InspectorClientView(m_inspectedWebPage->d->page->inspectorController());
    105     m_webPage.set(qobject_cast<InspectorClientWebPage*>(view->page()));
    106     m_webPage->mainFrame()->load(QString::fromLatin1("qrc:/webkit/inspector/inspector.html"));
    107     m_webPage->view()->setMinimumSize(400,300);
    108     return m_webPage->d->page;
     87    QWebView* inspectorView = new QWebView;
     88    InspectorClientWebPage* inspectorPage = new InspectorClientWebPage(inspectorView);
     89    inspectorView->setPage(inspectorPage);
     90    m_inspectorView.set(inspectorView);
     91
     92    inspectorPage->mainFrame()->load(QString::fromLatin1("qrc:/webkit/inspector/inspector.html"));
     93    m_inspectedWebPage->d->inspectorFrontend = inspectorView;
     94    m_inspectedWebPage->d->getOrCreateInspector()->d->setFrontend(inspectorView);
     95
     96    return m_inspectorView->page()->d->page;
    10997}
    11098
     
    115103}
    116104
     105String InspectorClientQt::hiddenPanels()
     106{
     107    notImplemented();
     108    return String();
     109}
     110
    117111void InspectorClientQt::showWindow()
    118112{
    119     if (!m_webPage)
    120         return;
    121 
    122113    updateWindowTitle();
    123     m_webPage->view()->show();
    124     m_inspectedWebPage->d->page->inspectorController()->setWindowVisible(true);
     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.
    125120}
    126121
    127122void InspectorClientQt::closeWindow()
    128123{
    129     if (!m_webPage)
    130         return;
    131 
    132     m_webPage->view()->hide();
    133     m_inspectedWebPage->d->page->inspectorController()->setWindowVisible(false);
    134 }
    135 
    136 bool InspectorClientQt::windowVisible()
    137 {
    138     if (!m_webPage)
    139         return false;
    140     return m_webPage->view()->isVisible();
     124    if (m_inspectedWebPage->d->inspector)
     125        m_inspectedWebPage->d->inspector->close();
    141126}
    142127
    143128void InspectorClientQt::attachWindow()
    144129{
    145     if (!m_webPage)
    146         return;
    147 
    148     emit m_webPage->attachRequested();
     130    notImplemented();
    149131}
    150132
    151133void InspectorClientQt::detachWindow()
    152134{
    153     if (!m_webPage)
    154         return;
    155 
    156     emit m_webPage->detachRequested();
    157 }
    158 
    159 void InspectorClientQt::setAttachedWindowHeight(unsigned height)
    160 {
    161     notImplemented();
    162 }
    163 
    164 void InspectorClientQt::highlight(Node* node)
     135    notImplemented();
     136}
     137
     138void InspectorClientQt::setAttachedWindowHeight(unsigned)
     139{
     140    notImplemented();
     141}
     142
     143void InspectorClientQt::highlight(Node*)
    165144{
    166145    notImplemented();
     
    178157}
    179158
     159void InspectorClientQt::inspectorWindowObjectCleared()
     160{
     161    notImplemented();
     162}
     163
    180164void InspectorClientQt::updateWindowTitle()
    181165{
    182     if (!m_webPage)
     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
     172void InspectorClientQt::populateSetting(const String& key, InspectorController::Setting& setting)
     173{
     174    QSettings qsettings;
     175    if (qsettings.status() == QSettings::AccessError) {
     176        // QCoreApplication::setOrganizationName and QCoreApplication::setApplicationName haven't been called
     177        qWarning("QWebInspector: QSettings couldn't read configuration setting [%s].",
     178                 qPrintable(static_cast<QString>(key)));
    183179        return;
    184 
    185     QString caption = QCoreApplication::translate("QWebPage", "Web Inspector - %2");
    186     m_webPage->view()->setWindowTitle(caption.arg(m_inspectedURL));
    187 }
    188 
    189 void InspectorClientQt::populateSetting(const String& key, InspectorController::Setting& setting)
    190 {
    191     notImplemented();
     180    }
     181
     182    QString settingKey(settingStoragePrefix + key);
     183    QString storedValueType = qsettings.value(settingKey + settingStorageTypeSuffix).toString();
     184    QVariant storedValue = qsettings.value(settingKey);
     185    storedValue.convert(QVariant::nameToType(storedValueType.toAscii().data()));
     186    setting = variantToSetting(storedValue);
    192187}
    193188
    194189void InspectorClientQt::storeSetting(const String& key, const InspectorController::Setting& setting)
    195190{
    196     notImplemented();
    197 }
    198 
    199 void InspectorClientQt::removeSetting(const String& key)
    200 {
    201     notImplemented();
     191    QSettings qsettings;
     192    if (qsettings.status() == QSettings::AccessError) {
     193        qWarning("QWebInspector: QSettings couldn't persist configuration setting [%s].",
     194                 qPrintable(static_cast<QString>(key)));
     195        return;
     196    }
     197
     198    QVariant valueToStore = settingToVariant(setting);
     199    QString settingKey(settingStoragePrefix + key);
     200    qsettings.setValue(settingKey, valueToStore);
     201    qsettings.setValue(settingKey + settingStorageTypeSuffix, QVariant::typeToName(valueToStore.type()));
     202}
     203
     204void InspectorClientQt::removeSetting(const String&)
     205{
     206    notImplemented();
     207}
     208
     209static InspectorController::Setting variantToSetting(const QVariant& qvariant)
     210{
     211    InspectorController::Setting retVal;
     212
     213    switch (qvariant.type()) {
     214    case QVariant::Bool:
     215        retVal.set(qvariant.toBool());
     216        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    }
     235    }
     236
     237    return retVal;
     238}
     239
     240static QVariant settingToVariant(const InspectorController::Setting& icSetting)
     241{
     242    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
     268    return retVal;
    202269}
    203270
  • trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.h

    r2 r561  
    3636
    3737class QWebPage;
     38class QWebView;
    3839
    3940namespace WebCore {
     
    4142    class Page;
    4243    class String;
    43     class InspectorClientWebPage;
    4444
    4545    class InspectorClientQt : public InspectorClient {
     
    5353        virtual String localizedStringsURL();
    5454
     55        virtual String hiddenPanels();
     56
    5557        virtual void showWindow();
    5658        virtual void closeWindow();
    57         virtual bool windowVisible();
    5859
    5960        virtual void attachWindow();
     
    7071        virtual void removeSetting(const String& key);
    7172
     73        virtual void inspectorWindowObjectCleared();
     74
    7275    private:
    7376        void updateWindowTitle();
    7477        QWebPage* m_inspectedWebPage;
    75         OwnPtr<InspectorClientWebPage> m_webPage;
     78        OwnPtr<QWebView> m_inspectorView;
    7679        QString m_inspectedURL;
    7780    };
  • trunk/src/3rdparty/webkit/WebKit/qt/WebKit_pch.h

    r2 r561  
    7878#include <wtf/AlwaysInline.h>
    7979#include <wtf/GetPtr.h>
    80 
    81 #include "../../WebCore/bindings/js/JSDOMBinding.h"
    82 #include "../../JavaScriptCore/runtime/MathObject.h"
    8380#endif
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro

    r2 r561  
    66QT += testlib network
    77QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
     8!symbian:DEFINES += SRCDIR=\\\"$$PWD/resources\\\"
     9
     10symbian {
     11    TARGET.UID3 = 0xA000E53D
     12    TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
     13}
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.qrc

    r2 r561  
    22<qresource prefix="/">
    33<file>image.png</file>
     4<file>style.css</file>
     5<file>test1.html</file>
     6<file>test2.html</file>
     7<file>testiframe.html</file>
     8<file>testiframe2.html</file>
    49</qresource>
    510</RCC>
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp

    r2 r561  
    2222
    2323#include <qwebpage.h>
     24#include <qwebelement.h>
    2425#include <qwidget.h>
    2526#include <qwebview.h>
     
    2930#include <QApplication>
    3031#include <QComboBox>
     32#include <QPicture>
    3133#include <QRegExp>
    3234#include <QNetworkRequest>
     35#include <QNetworkReply>
     36#ifndef QT_NO_OPENSSL
     37#include <qsslerror.h>
     38#endif
     39#include "../util.h"
     40
     41#if defined(Q_OS_SYMBIAN)
     42# define SRCDIR ""
     43#endif
     44
    3345//TESTED_CLASS=
    3446//TESTED_FILES=
     
    571583    void symmetricUrl();
    572584    void progressSignal();
     585    void urlChange();
    573586    void domCycles();
     587    void requestedUrl();
     588    void javaScriptWindowObjectCleared_data();
     589    void javaScriptWindowObjectCleared();
     590    void javaScriptWindowObjectClearedOnEvaluate();
    574591    void setHtml();
    575592    void setHtmlWithResource();
     593    void setHtmlWithBaseURL();
     594    void setHtmlWithJSAlert();
    576595    void ipv6HostEncoding();
    577596    void metaData();
    578597    void popupFocus();
     598    void hitTestContent();
    579599    void jsByteArray();
    580600    void ownership();
     601    void nullValue();
     602    void baseUrl_data();
     603    void baseUrl();
     604    void hasSetFocus();
     605    void render();
     606    void scrollPosition();
     607    void evaluateWillCauseRepaint();
     608    void qObjectWrapperWithSameIdentity();
     609    void scrollRecursively();
     610
    581611private:
    582612    QString  evalJS(const QString&s) {
     
    678708    m_myObject = new MyQObject();
    679709    m_page->mainFrame()->addToJavaScriptWindowObject("myObject", m_myObject);
     710    QDir::setCurrent(SRCDIR);
    680711}
    681712
     
    21252156}
    21262157
     2158void tst_QWebFrame::urlChange()
     2159{
     2160    QSignalSpy urlSpy(m_page->mainFrame(), SIGNAL(urlChanged(QUrl)));
     2161
     2162    QUrl dataUrl("data:text/html,<h1>Test");
     2163    m_view->setUrl(dataUrl);
     2164
     2165    ::waitForSignal(m_page->mainFrame(), SIGNAL(urlChanged(QUrl)));
     2166
     2167    QCOMPARE(urlSpy.size(), 1);
     2168
     2169    QUrl dataUrl2("data:text/html,<html><head><title>title</title></head><body><h1>Test</body></html>");
     2170    m_view->setUrl(dataUrl2);
     2171
     2172    ::waitForSignal(m_page->mainFrame(), SIGNAL(urlChanged(QUrl)));
     2173
     2174    QCOMPARE(urlSpy.size(), 2);
     2175}
     2176
     2177
    21272178void tst_QWebFrame::domCycles()
    21282179{
     
    21322183}
    21332184
     2185class FakeReply : public QNetworkReply {
     2186    Q_OBJECT
     2187
     2188public:
     2189    FakeReply(const QNetworkRequest& request, QObject* parent = 0)
     2190        : QNetworkReply(parent)
     2191    {
     2192        setOperation(QNetworkAccessManager::GetOperation);
     2193        setRequest(request);
     2194        if (request.url() == QUrl("qrc:/test1.html")) {
     2195            setHeader(QNetworkRequest::LocationHeader, QString("qrc:/test2.html"));
     2196            setAttribute(QNetworkRequest::RedirectionTargetAttribute, QUrl("qrc:/test2.html"));
     2197        }
     2198#ifndef QT_NO_OPENSSL
     2199        else if (request.url() == QUrl("qrc:/fake-ssl-error.html"))
     2200            setError(QNetworkReply::SslHandshakeFailedError, tr("Fake error !")); // force a ssl error
     2201#endif
     2202        else if (request.url() == QUrl("http://abcdef.abcdef/"))
     2203            setError(QNetworkReply::HostNotFoundError, tr("Invalid URL"));
     2204
     2205        open(QIODevice::ReadOnly);
     2206        QTimer::singleShot(0, this, SLOT(timeout()));
     2207    }
     2208    ~FakeReply()
     2209    {
     2210        close();
     2211    }
     2212    virtual void abort() {}
     2213    virtual void close() {}
     2214
     2215protected:
     2216    qint64 readData(char*, qint64)
     2217    {
     2218        return 0;
     2219    }
     2220
     2221private slots:
     2222    void timeout()
     2223    {
     2224        if (request().url() == QUrl("qrc://test1.html"))
     2225            emit error(this->error());
     2226        else if (request().url() == QUrl("http://abcdef.abcdef/"))
     2227            emit metaDataChanged();
     2228#ifndef QT_NO_OPENSSL
     2229        else if (request().url() == QUrl("qrc:/fake-ssl-error.html"))
     2230            return;
     2231#endif
     2232
     2233        emit readyRead();
     2234        emit finished();
     2235    }
     2236};
     2237
     2238class FakeNetworkManager : public QNetworkAccessManager {
     2239    Q_OBJECT
     2240
     2241public:
     2242    FakeNetworkManager(QObject* parent) : QNetworkAccessManager(parent) { }
     2243
     2244protected:
     2245    virtual QNetworkReply* createRequest(Operation op, const QNetworkRequest& request, QIODevice* outgoingData)
     2246    {
     2247        QString url = request.url().toString();
     2248        if (op == QNetworkAccessManager::GetOperation)
     2249            if (url == "qrc:/test1.html" ||  url == "http://abcdef.abcdef/")
     2250                return new FakeReply(request, this);
     2251#ifndef QT_NO_OPENSSL
     2252            else if (url == "qrc:/fake-ssl-error.html") {
     2253                FakeReply* reply = new FakeReply(request, this);
     2254                QList<QSslError> errors;
     2255                emit sslErrors(reply, errors << QSslError(QSslError::UnspecifiedError));
     2256                return reply;
     2257            }
     2258#endif
     2259
     2260        return QNetworkAccessManager::createRequest(op, request, outgoingData);
     2261    }
     2262};
     2263
     2264void tst_QWebFrame::requestedUrl()
     2265{
     2266    QWebPage page;
     2267    QWebFrame* frame = page.mainFrame();
     2268
     2269    // in few seconds, the image should be completely loaded
     2270    QSignalSpy spy(&page, SIGNAL(loadFinished(bool)));
     2271    FakeNetworkManager* networkManager = new FakeNetworkManager(&page);
     2272    page.setNetworkAccessManager(networkManager);
     2273
     2274    frame->setUrl(QUrl("qrc:/test1.html"));
     2275    QTest::qWait(200);
     2276    QCOMPARE(spy.count(), 1);
     2277    QCOMPARE(frame->requestedUrl(), QUrl("qrc:/test1.html"));
     2278    QCOMPARE(frame->url(), QUrl("qrc:/test2.html"));
     2279
     2280    frame->setUrl(QUrl("qrc:/non-existent.html"));
     2281    QTest::qWait(200);
     2282    QCOMPARE(spy.count(), 2);
     2283    QCOMPARE(frame->requestedUrl(), QUrl("qrc:/non-existent.html"));
     2284    QCOMPARE(frame->url(), QUrl("qrc:/non-existent.html"));
     2285
     2286    frame->setUrl(QUrl("http://abcdef.abcdef"));
     2287    QTest::qWait(200);
     2288    QCOMPARE(spy.count(), 3);
     2289    QCOMPARE(frame->requestedUrl(), QUrl("http://abcdef.abcdef/"));
     2290    QCOMPARE(frame->url(), QUrl("http://abcdef.abcdef/"));
     2291
     2292#ifndef QT_NO_OPENSSL
     2293    qRegisterMetaType<QList<QSslError> >("QList<QSslError>");
     2294    qRegisterMetaType<QNetworkReply* >("QNetworkReply*");
     2295
     2296    QSignalSpy spy2(page.networkAccessManager(), SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)));
     2297    frame->setUrl(QUrl("qrc:/fake-ssl-error.html"));
     2298    QTest::qWait(200);
     2299    QCOMPARE(spy2.count(), 1);
     2300    QCOMPARE(frame->requestedUrl(), QUrl("qrc:/fake-ssl-error.html"));
     2301    QCOMPARE(frame->url(), QUrl("qrc:/fake-ssl-error.html"));
     2302#endif
     2303}
     2304
     2305void tst_QWebFrame::javaScriptWindowObjectCleared_data()
     2306{
     2307    QTest::addColumn<QString>("html");
     2308    QTest::addColumn<int>("signalCount");
     2309    QTest::newRow("with <script>") << "<html><body><script></script><p>hello world</p></body></html>" << 1;
     2310    QTest::newRow("without <script>") << "<html><body><p>hello world</p></body></html>" << 0;
     2311}
     2312
     2313void tst_QWebFrame::javaScriptWindowObjectCleared()
     2314{
     2315    QWebPage page;
     2316    QWebFrame* frame = page.mainFrame();
     2317    QSignalSpy spy(frame, SIGNAL(javaScriptWindowObjectCleared()));
     2318    QFETCH(QString, html);
     2319    frame->setHtml(html);
     2320
     2321    QFETCH(int, signalCount);
     2322    QCOMPARE(spy.count(), signalCount);
     2323}
     2324
     2325void tst_QWebFrame::javaScriptWindowObjectClearedOnEvaluate()
     2326{
     2327    QWebPage page;
     2328    QWebFrame* frame = page.mainFrame();
     2329    QSignalSpy spy(frame, SIGNAL(javaScriptWindowObjectCleared()));
     2330    frame->setHtml("<html></html>");
     2331    QCOMPARE(spy.count(), 0);
     2332    frame->evaluateJavaScript("var a = 'a';");
     2333    QCOMPARE(spy.count(), 1);
     2334    // no new clear for a new script:
     2335    frame->evaluateJavaScript("var a = 1;");
     2336    QCOMPARE(spy.count(), 1);
     2337}
     2338
    21342339void tst_QWebFrame::setHtml()
    21352340{
    2136     QString html("<html><body><p>hello world</p></body></html>");
     2341    QString html("<html><head></head><body><p>hello world</p></body></html>");
    21372342    m_view->page()->mainFrame()->setHtml(html);
    21382343    QCOMPARE(m_view->page()->mainFrame()->toHtml(), html);
     
    21552360    QCOMPARE(frame->evaluateJavaScript("document.images[0].width").toInt(), 128);
    21562361    QCOMPARE(frame->evaluateJavaScript("document.images[0].height").toInt(), 128);
     2362
     2363    QString html2 =
     2364        "<html>"
     2365            "<head>"
     2366                "<link rel='stylesheet' href='qrc:/style.css' type='text/css' />"
     2367            "</head>"
     2368            "<body>"
     2369                "<p id='idP'>some text</p>"
     2370            "</body>"
     2371        "</html>";
     2372
     2373    // in few seconds, the CSS should be completey loaded
     2374    frame->setHtml(html2);
     2375    QTest::qWait(200);
     2376    QCOMPARE(spy.size(), 2);
     2377
     2378    QWebElement p = frame->documentElement().findAll("p").at(0);
     2379    QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("red"));
     2380}
     2381
     2382void tst_QWebFrame::setHtmlWithBaseURL()
     2383{
     2384    QString html("<html><body><p>hello world</p><img src='resources/image2.png'/></body></html>");
     2385
     2386    QWebPage page;
     2387    QWebFrame* frame = page.mainFrame();
     2388
     2389    // in few seconds, the image should be completey loaded
     2390    QSignalSpy spy(&page, SIGNAL(loadFinished(bool)));
     2391
     2392    frame->setHtml(html, QUrl::fromLocalFile(QDir::currentPath()));
     2393    QTest::qWait(200);
     2394    QCOMPARE(spy.count(), 1);
     2395
     2396    QCOMPARE(frame->evaluateJavaScript("document.images.length").toInt(), 1);
     2397    QCOMPARE(frame->evaluateJavaScript("document.images[0].width").toInt(), 128);
     2398    QCOMPARE(frame->evaluateJavaScript("document.images[0].height").toInt(), 128);
     2399
     2400    // no history item has to be added.
     2401    QCOMPARE(m_view->page()->history()->count(), 0);
     2402}
     2403
     2404class MyPage : public QWebPage
     2405{
     2406public:
     2407    MyPage() :  QWebPage(), alerts(0) {}
     2408    int alerts;
     2409
     2410protected:
     2411    virtual void javaScriptAlert(QWebFrame*, const QString& msg)
     2412    {
     2413        alerts++;
     2414        QCOMPARE(msg, QString("foo"));
     2415        // Should not be enough to trigger deferred loading, since we've upped the HTML
     2416        // tokenizer delay in the Qt frameloader. See HTMLTokenizer::continueProcessing()
     2417        QTest::qWait(1000);
     2418    }
     2419};
     2420
     2421void tst_QWebFrame::setHtmlWithJSAlert()
     2422{
     2423    QString html("<html><head></head><body><script>alert('foo');</script><p>hello world</p></body></html>");
     2424    MyPage page;
     2425    m_view->setPage(&page);
     2426    page.mainFrame()->setHtml(html);
     2427    QCOMPARE(page.alerts, 1);
     2428    QCOMPARE(m_view->page()->mainFrame()->toHtml(), html);
    21572429}
    21582430
     
    22452517    view.show();
    22462518    view.setFocus();
    2247     QTest::qWait(200);
    2248     QVERIFY2(view.hasFocus(),
    2249              "The WebView should be created");
     2519    QTRY_VERIFY(view.hasFocus());
    22502520
    22512521    // open the popup by clicking. check if focus is on the popup
     
    22532523    QObject* webpopup = firstChildByClassName(&view, "WebCore::QWebPopup");
    22542524    QComboBox* combo = qobject_cast<QComboBox*>(webpopup);
    2255     QTest::qWait(500);
    2256     QVERIFY2(!view.hasFocus() && combo->view()->hasFocus(),
    2257              "Focus sould be on the Popup");
     2525    QTRY_VERIFY(!view.hasFocus() && combo->view()->hasFocus()); // Focus should be on the popup
    22582526
    22592527    // hide the popup and check if focus is on the page
    22602528    combo->hidePopup();
    2261     QTest::qWait(500);
    2262     QVERIFY2(view.hasFocus() && !combo->view()->hasFocus(),
    2263              "Focus sould be back on the WebView");
     2529    QTRY_VERIFY(view.hasFocus() && !combo->view()->hasFocus()); // Focus should be back on the WebView
    22642530
    22652531    // triple the flashing time, should at least blink twice already
     
    22732539    QVERIFY2(m_popupTestPaintCount >= 4,
    22742540             "The input field should have a blinking caret");
     2541}
     2542
     2543void tst_QWebFrame::hitTestContent()
     2544{
     2545    QString html("<html><body><p>A paragraph</p><br/><br/><br/><a href=\"about:blank\" target=\"_foo\">link text</a></body></html>");
     2546
     2547    QWebPage page;
     2548    QWebFrame* frame = page.mainFrame();
     2549    frame->setHtml(html);
     2550    page.setViewportSize(QSize(200, 0)); //no height so link is not visible
     2551    QWebHitTestResult result = frame->hitTestContent(QPoint(10, 100));
     2552    QCOMPARE(result.linkText(), QString("link text"));
     2553    QWebElement link = result.linkElement();
     2554    QCOMPARE(link.attribute("target"), QString("_foo"));
    22752555}
    22762556
     
    23522632}
    23532633
     2634void tst_QWebFrame::nullValue()
     2635{
     2636    QVariant v = m_view->page()->mainFrame()->evaluateJavaScript("null");
     2637    QVERIFY(v.isNull());
     2638}
     2639
     2640void tst_QWebFrame::baseUrl_data()
     2641{
     2642    QTest::addColumn<QString>("html");
     2643    QTest::addColumn<QUrl>("loadUrl");
     2644    QTest::addColumn<QUrl>("url");
     2645    QTest::addColumn<QUrl>("baseUrl");
     2646
     2647    QTest::newRow("null") << QString() << QUrl()
     2648                          << QUrl("about:blank") << QUrl("about:blank");
     2649
     2650    QTest::newRow("foo") << QString() << QUrl("http://foobar.baz/")
     2651                         << QUrl("http://foobar.baz/") << QUrl("http://foobar.baz/");
     2652
     2653    QString html = "<html>"
     2654        "<head>"
     2655            "<base href=\"http://foobaz.bar/\" />"
     2656        "</head>"
     2657    "</html>";
     2658    QTest::newRow("customBaseUrl") << html << QUrl("http://foobar.baz/")
     2659                                   << QUrl("http://foobar.baz/") << QUrl("http://foobaz.bar/");
     2660}
     2661
     2662void tst_QWebFrame::baseUrl()
     2663{
     2664    QFETCH(QString, html);
     2665    QFETCH(QUrl, loadUrl);
     2666    QFETCH(QUrl, url);
     2667    QFETCH(QUrl, baseUrl);
     2668
     2669    m_page->mainFrame()->setHtml(html, loadUrl);
     2670    QCOMPARE(m_page->mainFrame()->url(), url);
     2671    QCOMPARE(m_page->mainFrame()->baseUrl(), baseUrl);
     2672}
     2673
     2674void tst_QWebFrame::hasSetFocus()
     2675{
     2676    QString html("<html><body><p>top</p>" \
     2677                    "<iframe width='80%' height='30%'/>" \
     2678                 "</body></html>");
     2679
     2680    QSignalSpy loadSpy(m_page, SIGNAL(loadFinished(bool)));
     2681    m_page->mainFrame()->setHtml(html);
     2682
     2683    QTest::qWait(200);
     2684    QCOMPARE(loadSpy.size(), 1);
     2685
     2686    QList<QWebFrame*> children = m_page->mainFrame()->childFrames();
     2687    QWebFrame* frame = children.at(0);
     2688    QString innerHtml("<html><body><p>another iframe</p>" \
     2689                        "<iframe width='80%' height='30%'/>" \
     2690                      "</body></html>");
     2691    frame->setHtml(innerHtml);
     2692
     2693    QTest::qWait(200);
     2694    QCOMPARE(loadSpy.size(), 2);
     2695
     2696    m_page->mainFrame()->setFocus();
     2697    QTRY_VERIFY(m_page->mainFrame()->hasFocus());
     2698
     2699    for (int i = 0; i < children.size(); ++i) {
     2700        children.at(i)->setFocus();
     2701        QTRY_VERIFY(children.at(i)->hasFocus());
     2702        QVERIFY(!m_page->mainFrame()->hasFocus());
     2703    }
     2704
     2705    m_page->mainFrame()->setFocus();
     2706    QTRY_VERIFY(m_page->mainFrame()->hasFocus());
     2707}
     2708
     2709void tst_QWebFrame::render()
     2710{
     2711    QString html("<html>" \
     2712                    "<head><style>" \
     2713                       "body, iframe { margin: 0px; border: none; }" \
     2714                    "</style></head>" \
     2715                    "<body><iframe width='100px' height='100px'/></body>" \
     2716                 "</html>");
     2717
     2718    QWebPage page;
     2719    page.mainFrame()->setHtml(html);
     2720
     2721    QList<QWebFrame*> frames = page.mainFrame()->childFrames();
     2722    QWebFrame *frame = frames.at(0);
     2723    QString innerHtml("<body style='margin: 0px;'><img src='qrc:/image.png'/></body>");
     2724    frame->setHtml(innerHtml);
     2725
     2726    QPicture picture;
     2727
     2728    QSize size = page.mainFrame()->contentsSize();
     2729    page.setViewportSize(size);
     2730
     2731    // render contents layer only (the iframe is smaller than the image, so it will have scrollbars)
     2732    QPainter painter1(&picture);
     2733    frame->render(&painter1, QWebFrame::ContentsLayer);
     2734    painter1.end();
     2735
     2736    QCOMPARE(size.width(), picture.boundingRect().width() + frame->scrollBarGeometry(Qt::Vertical).width());
     2737    QCOMPARE(size.height(), picture.boundingRect().height() + frame->scrollBarGeometry(Qt::Horizontal).height());
     2738
     2739    // render everything, should be the size of the iframe
     2740    QPainter painter2(&picture);
     2741    frame->render(&painter2, QWebFrame::AllLayers);
     2742    painter2.end();
     2743
     2744    QCOMPARE(size.width(), picture.boundingRect().width());   // width: 100px
     2745    QCOMPARE(size.height(), picture.boundingRect().height()); // height: 100px
     2746}
     2747
     2748void tst_QWebFrame::scrollPosition()
     2749{
     2750    // enlarged image in a small viewport, to provoke the scrollbars to appear
     2751    QString html("<html><body><img src='qrc:/image.png' height=500 width=500/></body></html>");
     2752
     2753    QWebPage page;
     2754    page.setViewportSize(QSize(200, 200));
     2755
     2756    QWebFrame* frame = page.mainFrame();
     2757    frame->setHtml(html);
     2758    frame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
     2759    frame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
     2760
     2761    // try to set the scroll offset programmatically
     2762    frame->setScrollPosition(QPoint(23, 29));
     2763    QCOMPARE(frame->scrollPosition().x(), 23);
     2764    QCOMPARE(frame->scrollPosition().y(), 29);
     2765
     2766    int x = frame->evaluateJavaScript("window.scrollX").toInt();
     2767    int y = frame->evaluateJavaScript("window.scrollY").toInt();
     2768    QCOMPARE(x, 23);
     2769    QCOMPARE(y, 29);
     2770}
     2771
     2772void tst_QWebFrame::evaluateWillCauseRepaint()
     2773{
     2774    QWebView view;
     2775    QString html("<html><body>top<div id=\"junk\" style=\"display: block;\">"
     2776                    "junk</div>bottom</body></html>");
     2777    view.setHtml(html);
     2778    view.show();
     2779
     2780    QTest::qWait(200);
     2781
     2782    view.page()->mainFrame()->evaluateJavaScript(
     2783        "document.getElementById('junk').style.display = 'none';");
     2784
     2785    ::waitForSignal(view.page(), SIGNAL(repaintRequested(QRect)));
     2786
     2787    QTest::qWait(2000);
     2788}
     2789
     2790class TestFactory : public QObject
     2791{
     2792    Q_OBJECT
     2793public:
     2794    TestFactory()
     2795        : obj(0), counter(0)
     2796    {}
     2797
     2798    Q_INVOKABLE QObject* getNewObject()
     2799    {
     2800        delete obj;
     2801        obj = new QObject(this);
     2802        obj->setObjectName(QLatin1String("test") + QString::number(++counter));
     2803        return obj;
     2804
     2805    }
     2806
     2807    QObject* obj;
     2808    int counter;
     2809};
     2810
     2811void tst_QWebFrame::qObjectWrapperWithSameIdentity()
     2812{
     2813    m_view->setHtml("<script>function triggerBug() { document.getElementById('span1').innerText = test.getNewObject().objectName; }</script>"
     2814                    "<body><span id='span1'>test</span></body>");
     2815
     2816    QWebFrame* mainFrame = m_view->page()->mainFrame();
     2817    QCOMPARE(mainFrame->toPlainText(), QString("test"));
     2818
     2819    mainFrame->addToJavaScriptWindowObject("test", new TestFactory, QScriptEngine::ScriptOwnership);
     2820
     2821    mainFrame->evaluateJavaScript("triggerBug();");
     2822    QCOMPARE(mainFrame->toPlainText(), QString("test1"));
     2823
     2824    mainFrame->evaluateJavaScript("triggerBug();");
     2825    QCOMPARE(mainFrame->toPlainText(), QString("test2"));
     2826}
     2827
     2828bool QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int dx, int dy);
     2829
     2830void tst_QWebFrame::scrollRecursively()
     2831{
     2832    // The test content is
     2833    // a nested frame set
     2834    // The main frame scrolls
     2835    // and has two children
     2836    // an iframe and a div overflow
     2837    // both scroll
     2838    QWebView webView;
     2839    QWebPage* webPage = webView.page();
     2840    QSignalSpy loadSpy(webPage, SIGNAL(loadFinished(bool)));
     2841    QUrl url = QUrl("qrc:///testiframe.html");
     2842    webPage->mainFrame()->load(url);
     2843    QTRY_COMPARE(loadSpy.count(), 1);
     2844
     2845    QList<QWebFrame*> children =  webPage->mainFrame()->childFrames();
     2846    QVERIFY(children.count() == 1);
     2847
     2848    // 1st test
     2849    // call scrollRecursively over mainframe
     2850    // verify scrolled
     2851    // verify scroll postion changed
     2852    QPoint scrollPosition(webPage->mainFrame()->scrollPosition());
     2853    QVERIFY(qtwebkit_webframe_scrollRecursively(webPage->mainFrame(), 10, 10));
     2854    QVERIFY(scrollPosition != webPage->mainFrame()->scrollPosition());
     2855
     2856    // 2nd test
     2857    // call scrollRecursively over child iframe
     2858    // verify scrolled
     2859    // verify child scroll position changed
     2860    // verify parent's scroll position did not change
     2861    scrollPosition = webPage->mainFrame()->scrollPosition();
     2862    QPoint childScrollPosition = children.at(0)->scrollPosition();
     2863    QVERIFY(qtwebkit_webframe_scrollRecursively(children.at(0), 10, 10));
     2864    QVERIFY(scrollPosition == webPage->mainFrame()->scrollPosition());
     2865    QVERIFY(childScrollPosition != children.at(0)->scrollPosition());
     2866
     2867    // 3rd test
     2868    // call scrollRecursively over div overflow
     2869    // verify scrolled == true
     2870    // verify parent and child frame's scroll postion did not change
     2871    QWebElement div = webPage->mainFrame()->documentElement().findFirst("#content1");
     2872    QMouseEvent evpres(QEvent::MouseMove, div.geometry().center(), Qt::NoButton, Qt::NoButton, Qt::NoModifier);
     2873    webPage->event(&evpres);
     2874    scrollPosition = webPage->mainFrame()->scrollPosition();
     2875    childScrollPosition = children.at(0)->scrollPosition();
     2876    QVERIFY(qtwebkit_webframe_scrollRecursively(webPage->mainFrame(), 5, 5));
     2877    QVERIFY(childScrollPosition == children.at(0)->scrollPosition());
     2878    QVERIFY(scrollPosition == webPage->mainFrame()->scrollPosition());
     2879
     2880    // 4th test
     2881    // call scrollRecursively twice over childs iframe
     2882    // verify scrolled == true first time
     2883    // verify parent's scroll == true second time
     2884    // verify parent and childs scroll position changed
     2885    childScrollPosition = children.at(0)->scrollPosition();
     2886    QVERIFY(qtwebkit_webframe_scrollRecursively(children.at(0), -10, -10));
     2887    QVERIFY(childScrollPosition != children.at(0)->scrollPosition());
     2888    scrollPosition = webPage->mainFrame()->scrollPosition();
     2889    QVERIFY(qtwebkit_webframe_scrollRecursively(children.at(0), -10, -10));
     2890    QVERIFY(scrollPosition != webPage->mainFrame()->scrollPosition());
     2891
     2892}
     2893
    23542894QTEST_MAIN(tst_QWebFrame)
    23552895#include "tst_qwebframe.moc"
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro

    r2 r561  
    55QT += testlib network
    66QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
     7
     8symbian {
     9    TARGET.UID3 = 0xA000E53C
     10    TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
     11}
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro

    r2 r561  
    33include(../../../../WebKit.pri)
    44SOURCES  += tst_qwebpage.cpp
     5RESOURCES  += tst_qwebpage.qrc
    56QT += testlib network
    67QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
     8!symbian:DEFINES += SRCDIR=\\\"$$PWD/\\\"
     9
     10symbian {
     11    TARGET.UID3 = 0xA000E53E
     12    TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
     13}
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp

    r2 r561  
    11/*
    22    Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
     3    Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
    34
    45    This library is free software; you can redistribute it and/or
     
    2122#include <QtTest/QtTest>
    2223
     24#include <qgraphicsscene.h>
     25#include <qgraphicsview.h>
     26#include <qgraphicswebview.h>
     27#include <qwebelement.h>
    2328#include <qwebpage.h>
    2429#include <qwidget.h>
     30#include <QGraphicsWidget>
    2531#include <qwebview.h>
    2632#include <qwebframe.h>
     
    3339#include <qwebdatabase.h>
    3440#include <QPushButton>
     41#include <QDir>
     42
     43#if defined(Q_OS_SYMBIAN)
     44# define SRCDIR ""
     45#endif
    3546
    3647// Will try to wait for the condition while allowing event processing
     
    6071 *         \p false on timeout
    6172 */
    62 static bool waitForSignal(QObject* obj, const char* signal, int timeout = 0)
     73static bool waitForSignal(QObject* obj, const char* signal, int timeout = 10000)
    6374{
    6475    QEventLoop loop;
     
    7586}
    7687
     88class EventSpy : public QObject, public QList<QEvent::Type>
     89{
     90    Q_OBJECT
     91public:
     92    EventSpy(QObject* objectToSpy)
     93    {
     94        objectToSpy->installEventFilter(this);
     95    }
     96
     97    virtual bool eventFilter(QObject* receiver, QEvent* event)
     98    {
     99        append(event->type());
     100        return false;
     101    }
     102};
     103
    77104class tst_QWebPage : public QObject
    78105{
     
    93120
    94121    void acceptNavigationRequest();
     122    void infiniteLoopJS();
    95123    void loadFinished();
    96124    void acceptNavigationRequestWithNewWindow();
     
    100128    void database();
    101129    void createPlugin();
     130    void destroyPlugin_data();
    102131    void destroyPlugin();
     132    void createViewlessPlugin_data();
    103133    void createViewlessPlugin();
    104134    void multiplePageGroupsAndLocalStorage();
     
    106136    void textSelection();
    107137    void textEditing();
    108 
    109 private:
    110 
     138    void backActionUpdate();
     139    void frameAt();
     140    void requestCache();
     141    void protectBindingsRuntimeObjectsFromCollector();
     142    void localURLSchemes();
     143    void testOptionalJSObjects();
     144    void testEnablePersistentStorage();
     145    void consoleOutput();
     146    void inputMethods_data();
     147    void inputMethods();
     148    void defaultTextEncoding();
     149    void errorPageExtension();
     150
     151    void crashTests_LazyInitializationOfMainFrame();
     152
     153    void screenshot_data();
     154    void screenshot();
     155
     156    void originatingObjectInNetworkRequests();
    111157
    112158private:
     
    190236}
    191237
     238class JSTestPage : public QWebPage
     239{
     240Q_OBJECT
     241public:
     242    JSTestPage(QObject* parent = 0)
     243    : QWebPage(parent) {}
     244
     245public slots:
     246    bool shouldInterruptJavaScript() {
     247        return true;
     248    }
     249};
     250
     251void tst_QWebPage::infiniteLoopJS()
     252{
     253    JSTestPage* newPage = new JSTestPage(m_view);
     254    m_view->setPage(newPage);
     255    m_view->setHtml(QString("<html><bodytest</body></html>"), QUrl());
     256    m_view->page()->mainFrame()->evaluateJavaScript("var run = true;var a = 1;while(run){a++;}");
     257}
    192258
    193259void tst_QWebPage::loadFinished()
    194260{
     261    qRegisterMetaType<QWebFrame*>("QWebFrame*");
     262    qRegisterMetaType<QNetworkRequest*>("QNetworkRequest*");
    195263    QSignalSpy spyLoadStarted(m_view, SIGNAL(loadStarted()));
    196264    QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool)));
     
    212280    QTRY_COMPARE(spyLoadFinished.count(), 1);
    213281    QCOMPARE(spyLoadFinished.count(), 1);
     282}
     283
     284class ConsolePage : public QWebPage
     285{
     286public:
     287    ConsolePage(QObject* parent = 0) : QWebPage(parent) {}
     288
     289    virtual void javaScriptConsoleMessage(const QString& message, int lineNumber, const QString& sourceID)
     290    {
     291        messages.append(message);
     292        lineNumbers.append(lineNumber);
     293        sourceIDs.append(sourceID);
     294    }
     295
     296    QStringList messages;
     297    QList<int> lineNumbers;
     298    QStringList sourceIDs;
     299};
     300
     301void tst_QWebPage::consoleOutput()
     302{
     303    ConsolePage page;
     304    page.mainFrame()->evaluateJavaScript("this is not valid JavaScript");
     305    QCOMPARE(page.messages.count(), 1);
     306    QCOMPARE(page.lineNumbers.at(0), 1);
    214307}
    215308
     
    278371
    279372    QList<QUrl> requestedUrls;
     373    QList<QNetworkRequest> requests;
    280374
    281375protected:
    282376    virtual QNetworkReply* createRequest(Operation op, const QNetworkRequest &request, QIODevice* outgoingData) {
     377        requests.append(request);
    283378        requestedUrls.append(request.url());
    284379        return QNetworkAccessManager::createRequest(op, request, outgoingData);
     
    292387    networkManager->requestedUrls.clear();
    293388
    294     m_page->settings()->setUserStyleSheetUrl(QUrl("data:text/css,p { background-image: url('http://does.not/exist.png');}"));
     389    m_page->settings()->setUserStyleSheetUrl(QUrl("data:text/css;charset=utf-8;base64,"
     390            + QByteArray("p { background-image: url('http://does.not/exist.png');}").toBase64()));
    295391    m_view->setHtml("<p>hello world</p>");
    296392    QVERIFY(::waitForSignal(m_view, SIGNAL(loadFinished(bool))));
    297393
    298     QVERIFY(networkManager->requestedUrls.count() >= 2);
    299     QCOMPARE(networkManager->requestedUrls.at(0), QUrl("data:text/css,p { background-image: url('http://does.not/exist.png');}"));
    300     QCOMPARE(networkManager->requestedUrls.at(1), QUrl("http://does.not/exist.png"));
     394    QVERIFY(networkManager->requestedUrls.count() >= 1);
     395    QCOMPARE(networkManager->requestedUrls.at(0), QUrl("http://does.not/exist.png"));
    301396}
    302397
     
    354449    QVERIFY(m_page->history()->count() == 2);
    355450    m_page->mainFrame()->setUrl(QUrl("data:text/html,<body>This is fifth page"));
    356     QVERIFY(::waitForSignal(m_page, SIGNAL(saveFrameStateRequested(QWebFrame*, QWebHistoryItem*))));
     451    QVERIFY(::waitForSignal(m_page, SIGNAL(saveFrameStateRequested(QWebFrame*,QWebHistoryItem*))));
    357452}
    358453
     
    381476    QVERIFY(QWebSettings::offlineStorageDefaultQuota() == 1024 * 1024);
    382477
     478    m_page->settings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
     479    m_page->settings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true);
     480
    383481    QString dbFileName = path + "Databases.db";
    384482
     
    387485
    388486    qRegisterMetaType<QWebFrame*>("QWebFrame*");
    389     QSignalSpy spy(m_page, SIGNAL(databaseQuotaExceeded(QWebFrame *, QString)));
     487    QSignalSpy spy(m_page, SIGNAL(databaseQuotaExceeded(QWebFrame*,QString)));
    390488    m_view->setHtml(QString("<html><head><script>var db; db=openDatabase('testdb', '1.0', 'test database API', 50000); </script></head><body><div></div></body></html>"), QUrl("http://www.myexample.com"));
    391489    QTRY_COMPARE(spy.count(), 1);
     
    408506    QTest::qWait(200);
    409507
     508    // Remove all databases.
    410509    QWebSecurityOrigin origin = m_page->mainFrame()->securityOrigin();
    411510    QList<QWebDatabase> dbs = origin.databases();
    412     if (dbs.count() > 0) {
    413         QString fileName = dbs[0].fileName();
     511    for (int i = 0; i < dbs.count(); i++) {
     512        QString fileName = dbs[i].fileName();
    414513        QVERIFY(QFile::exists(fileName));
    415         QWebDatabase::removeDatabase(dbs[0]);
     514        QWebDatabase::removeDatabase(dbs[i]);
    416515        QVERIFY(!QFile::exists(fileName));
    417516    }
     517    QVERIFY(!origin.databases().size());
     518    // Remove removed test :-)
     519    QWebDatabase::removeAllDatabases();
     520    QVERIFY(!origin.databases().size());
    418521    QTest::qWait(1000);
    419522}
     
    554657}
    555658
    556 class PluginTrackedPage : public QWebPage
    557 {
     659
     660// Standard base class for template PluginTracerPage. In tests it is used as interface.
     661class PluginCounterPage : public QWebPage {
    558662public:
    559 
    560     int count;
    561     QPointer<QWidget> widget;
    562 
    563     PluginTrackedPage(QWidget *parent = 0) : QWebPage(parent), count(0) {
     663    int m_count;
     664    QPointer<QObject> m_widget;
     665    QObject* m_pluginParent;
     666    PluginCounterPage(QObject* parent = 0)
     667        : QWebPage(parent)
     668        , m_count(0)
     669        , m_widget(0)
     670        , m_pluginParent(0)
     671    {
    564672       settings()->setAttribute(QWebSettings::PluginsEnabled, true);
    565673    }
    566 
    567     virtual QObject* createPlugin(const QString&, const QUrl&, const QStringList&, const QStringList&) {
    568        count++;
    569        QWidget *w = new QWidget;
    570        widget = w;
    571        return w;
     674    ~PluginCounterPage()
     675    {
     676        if (m_pluginParent)
     677            m_pluginParent->deleteLater();
    572678    }
    573679};
    574680
     681template<class T>
     682class PluginTracerPage : public PluginCounterPage {
     683public:
     684    PluginTracerPage(QObject* parent = 0)
     685        : PluginCounterPage(parent)
     686    {
     687        // this is a dummy parent object for the created plugin
     688        m_pluginParent = new T;
     689    }
     690    virtual QObject* createPlugin(const QString&, const QUrl&, const QStringList&, const QStringList&)
     691    {
     692        m_count++;
     693        m_widget = new T;
     694        // need a cast to the specific type, as QObject::setParent cannot be called,
     695        // because it is not virtual. Instead it is necesary to call QWidget::setParent,
     696        // which also takes a QWidget* instead of a QObject*. Therefore we need to
     697        // upcast to T*, which is a QWidget.
     698        static_cast<T*>(m_widget.data())->setParent(static_cast<T*>(m_pluginParent));
     699        return m_widget;
     700    }
     701};
     702
     703class PluginFactory {
     704public:
     705    enum FactoredType {QWidgetType, QGraphicsWidgetType};
     706    static PluginCounterPage* create(FactoredType type, QObject* parent = 0)
     707    {
     708        PluginCounterPage* result = 0;
     709        switch (type) {
     710        case QWidgetType:
     711            result = new PluginTracerPage<QWidget>(parent);
     712            break;
     713        case QGraphicsWidgetType:
     714            result = new PluginTracerPage<QGraphicsWidget>(parent);
     715            break;
     716        default: {/*Oops*/};
     717        }
     718        return result;
     719    }
     720
     721    static void prepareTestData()
     722    {
     723        QTest::addColumn<int>("type");
     724        QTest::newRow("QWidget") << (int)PluginFactory::QWidgetType;
     725        QTest::newRow("QGraphicsWidget") << (int)PluginFactory::QGraphicsWidgetType;
     726    }
     727};
     728
     729void tst_QWebPage::destroyPlugin_data()
     730{
     731    PluginFactory::prepareTestData();
     732}
     733
    575734void tst_QWebPage::destroyPlugin()
    576735{
    577     PluginTrackedPage* page = new PluginTrackedPage(m_view);
     736    QFETCH(int, type);
     737    PluginCounterPage* page = PluginFactory::create((PluginFactory::FactoredType)type, m_view);
    578738    m_view->setPage(page);
    579739
     
    581741    QString content("<html><body><object type=\"application/x-qt-plugin\" classid=\"QProgressBar\"></object></body></html>");
    582742    m_view->setHtml(content);
    583     QVERIFY(page->widget != 0);
    584     QCOMPARE(page->count, 1);
     743    QVERIFY(page->m_widget);
     744    QCOMPARE(page->m_count, 1);
    585745
    586746    // navigate away, the plugin widget should be destructed
    587747    m_view->setHtml("<html><body>Hi</body></html>");
    588748    QTestEventLoop::instance().enterLoop(1);
    589     QVERIFY(page->widget == 0);
     749    QVERIFY(!page->m_widget);
     750}
     751
     752void tst_QWebPage::createViewlessPlugin_data()
     753{
     754    PluginFactory::prepareTestData();
    590755}
    591756
    592757void tst_QWebPage::createViewlessPlugin()
    593758{
    594     PluginTrackedPage* page = new PluginTrackedPage;
     759    QFETCH(int, type);
     760    PluginCounterPage* page = PluginFactory::create((PluginFactory::FactoredType)type);
    595761    QString content("<html><body><object type=\"application/x-qt-plugin\" classid=\"QProgressBar\"></object></body></html>");
    596762    page->mainFrame()->setHtml(content);
    597     QCOMPARE(page->count, 1);
    598     QVERIFY(page->widget != 0);
     763    QCOMPARE(page->m_count, 1);
     764    QVERIFY(page->m_widget);
     765    QVERIFY(page->m_pluginParent);
     766    QVERIFY(page->m_widget->parent() == page->m_pluginParent);
    599767    delete page;
     768
    600769}
    601770
     
    603772void QWEBKIT_EXPORT qt_webpage_setGroupName(QWebPage* page, const QString& groupName);
    604773QString QWEBKIT_EXPORT qt_webpage_groupName(QWebPage* page);
    605 void QWEBKIT_EXPORT qt_websettings_setLocalStorageDatabasePath(QWebSettings* settings, const QString& path);
    606774
    607775void tst_QWebPage::multiplePageGroupsAndLocalStorage()
     
    614782    QWebView view2;
    615783
    616     qt_websettings_setLocalStorageDatabasePath(view1.page()->settings(), QDir::toNativeSeparators(QDir::currentPath() + "/path1"));
     784    view1.page()->settings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
     785    view1.page()->settings()->setLocalStoragePath(QDir::toNativeSeparators(QDir::currentPath() + "/path1"));
    617786    qt_webpage_setGroupName(view1.page(), "group1");
    618     qt_websettings_setLocalStorageDatabasePath(view2.page()->settings(), QDir::toNativeSeparators(QDir::currentPath() + "/path2"));
     787    view2.page()->settings()->setAttribute(QWebSettings::LocalStorageEnabled, true);   
     788    view2.page()->settings()->setLocalStoragePath(QDir::toNativeSeparators(QDir::currentPath() + "/path2"));
    619789    qt_webpage_setGroupName(view2.page(), "group2");
    620790    QCOMPARE(qt_webpage_groupName(view1.page()), QString("group1"));
     
    8331003    page->triggerAction(QWebPage::MoveToStartOfBlock);
    8341004    QVERIFY(page->isSelectionCollapsed());
    835     QCOMPARE(page->selectionStartOffset(), 2);
     1005    QCOMPARE(page->selectionStartOffset(), 0);
    8361006
    8371007    // cursor will be after the word "you!"
     
    8701040        "<p>May the source<br/>be with you!</p></body></html>");
    8711041    page->mainFrame()->setHtml(content);
    872 
    873     // this will select the first paragraph
    874     QString script = "var range = document.createRange(); " \
    875         "var node = document.getElementById(\"one\"); " \
    876         "range.selectNode(node); " \
    877         "getSelection().addRange(range);";
    878     page->mainFrame()->evaluateJavaScript(script);
    879     QCOMPARE(page->selectedText().trimmed(), QString::fromLatin1("The quick brown fox"));
    8801042
    8811043    // these actions must exist
     
    8941056    QVERIFY(page->action(QWebPage::SelectEndOfDocument) != 0);
    8951057
    896     // right now they are disabled because contentEditable is false
     1058    // right now they are disabled because contentEditable is false and
     1059    // there isn't an existing selection to modify
    8971060    QCOMPARE(page->action(QWebPage::SelectNextChar)->isEnabled(), false);
    8981061    QCOMPARE(page->action(QWebPage::SelectPreviousChar)->isEnabled(), false);
     
    9111074    QCOMPARE(page->action(QWebPage::SelectAll)->isEnabled(), true);
    9121075
    913     // make it editable before navigating the cursor
    914     page->setContentEditable(true);
    915 
    916     // here the actions are enabled after contentEditable is true
    917     QCOMPARE(page->action(QWebPage::SelectAll)->isEnabled(), true);
     1076    // this will select the first paragraph
     1077    QString selectScript = "var range = document.createRange(); " \
     1078        "var node = document.getElementById(\"one\"); " \
     1079        "range.selectNode(node); " \
     1080        "getSelection().addRange(range);";
     1081    page->mainFrame()->evaluateJavaScript(selectScript);
     1082    QCOMPARE(page->selectedText().trimmed(), QString::fromLatin1("The quick brown fox"));
     1083
     1084    // here the actions are enabled after a selection has been created
    9181085    QCOMPARE(page->action(QWebPage::SelectNextChar)->isEnabled(), true);
    9191086    QCOMPARE(page->action(QWebPage::SelectPreviousChar)->isEnabled(), true);
     
    9291096    QCOMPARE(page->action(QWebPage::SelectEndOfDocument)->isEnabled(), true);
    9301097
     1098    // make it editable before navigating the cursor
     1099    page->setContentEditable(true);
     1100
     1101    // cursor will be before the word "The", this makes sure there is a charet
     1102    page->triggerAction(QWebPage::MoveToStartOfDocument);
     1103    QVERIFY(page->isSelectionCollapsed());
     1104    QCOMPARE(page->selectionStartOffset(), 0);
     1105
     1106    // here the actions are enabled after contentEditable is true
     1107    QCOMPARE(page->action(QWebPage::SelectNextChar)->isEnabled(), true);
     1108    QCOMPARE(page->action(QWebPage::SelectPreviousChar)->isEnabled(), true);
     1109    QCOMPARE(page->action(QWebPage::SelectNextWord)->isEnabled(), true);
     1110    QCOMPARE(page->action(QWebPage::SelectPreviousWord)->isEnabled(), true);
     1111    QCOMPARE(page->action(QWebPage::SelectNextLine)->isEnabled(), true);
     1112    QCOMPARE(page->action(QWebPage::SelectPreviousLine)->isEnabled(), true);
     1113    QCOMPARE(page->action(QWebPage::SelectStartOfLine)->isEnabled(), true);
     1114    QCOMPARE(page->action(QWebPage::SelectEndOfLine)->isEnabled(), true);
     1115    QCOMPARE(page->action(QWebPage::SelectStartOfBlock)->isEnabled(), true);
     1116    QCOMPARE(page->action(QWebPage::SelectEndOfBlock)->isEnabled(), true);
     1117    QCOMPARE(page->action(QWebPage::SelectStartOfDocument)->isEnabled(), true);
     1118    QCOMPARE(page->action(QWebPage::SelectEndOfDocument)->isEnabled(), true);
     1119
    9311120    delete page;
    9321121}
     
    9401129    page->mainFrame()->setHtml(content);
    9411130
    942     // this will select the first paragraph
    943     QString script = "var range = document.createRange(); " \
    944         "var node = document.getElementById(\"one\"); " \
    945         "range.selectNode(node); " \
    946         "getSelection().addRange(range);";
    947     page->mainFrame()->evaluateJavaScript(script);
    948     QCOMPARE(page->selectedText().trimmed(), QString::fromLatin1("The quick brown fox"));
    949 
    9501131    // these actions must exist
     1132    QVERIFY(page->action(QWebPage::Cut) != 0);
     1133    QVERIFY(page->action(QWebPage::Copy) != 0);
     1134    QVERIFY(page->action(QWebPage::Paste) != 0);
    9511135    QVERIFY(page->action(QWebPage::DeleteStartOfWord) != 0);
    9521136    QVERIFY(page->action(QWebPage::DeleteEndOfWord) != 0);
     
    9591143    QVERIFY(page->action(QWebPage::InsertParagraphSeparator) != 0);
    9601144    QVERIFY(page->action(QWebPage::InsertLineSeparator) != 0);
     1145    QVERIFY(page->action(QWebPage::PasteAndMatchStyle) != 0);
     1146    QVERIFY(page->action(QWebPage::RemoveFormat) != 0);
     1147    QVERIFY(page->action(QWebPage::ToggleStrikethrough) != 0);
     1148    QVERIFY(page->action(QWebPage::ToggleSubscript) != 0);
     1149    QVERIFY(page->action(QWebPage::ToggleSuperscript) != 0);
     1150    QVERIFY(page->action(QWebPage::InsertUnorderedList) != 0);
     1151    QVERIFY(page->action(QWebPage::InsertOrderedList) != 0);
     1152    QVERIFY(page->action(QWebPage::Indent) != 0);
     1153    QVERIFY(page->action(QWebPage::Outdent) != 0);
     1154    QVERIFY(page->action(QWebPage::AlignCenter) != 0);
     1155    QVERIFY(page->action(QWebPage::AlignJustified) != 0);
     1156    QVERIFY(page->action(QWebPage::AlignLeft) != 0);
     1157    QVERIFY(page->action(QWebPage::AlignRight) != 0);
    9611158
    9621159    // right now they are disabled because contentEditable is false
     1160    QCOMPARE(page->action(QWebPage::Cut)->isEnabled(), false);
     1161    QCOMPARE(page->action(QWebPage::Paste)->isEnabled(), false);
    9631162    QCOMPARE(page->action(QWebPage::DeleteStartOfWord)->isEnabled(), false);
    9641163    QCOMPARE(page->action(QWebPage::DeleteEndOfWord)->isEnabled(), false);
     
    9711170    QCOMPARE(page->action(QWebPage::InsertParagraphSeparator)->isEnabled(), false);
    9721171    QCOMPARE(page->action(QWebPage::InsertLineSeparator)->isEnabled(), false);
     1172    QCOMPARE(page->action(QWebPage::PasteAndMatchStyle)->isEnabled(), false);
     1173    QCOMPARE(page->action(QWebPage::RemoveFormat)->isEnabled(), false);
     1174    QCOMPARE(page->action(QWebPage::ToggleStrikethrough)->isEnabled(), false);
     1175    QCOMPARE(page->action(QWebPage::ToggleSubscript)->isEnabled(), false);
     1176    QCOMPARE(page->action(QWebPage::ToggleSuperscript)->isEnabled(), false);
     1177    QCOMPARE(page->action(QWebPage::InsertUnorderedList)->isEnabled(), false);
     1178    QCOMPARE(page->action(QWebPage::InsertOrderedList)->isEnabled(), false);
     1179    QCOMPARE(page->action(QWebPage::Indent)->isEnabled(), false);
     1180    QCOMPARE(page->action(QWebPage::Outdent)->isEnabled(), false);
     1181    QCOMPARE(page->action(QWebPage::AlignCenter)->isEnabled(), false);
     1182    QCOMPARE(page->action(QWebPage::AlignJustified)->isEnabled(), false);
     1183    QCOMPARE(page->action(QWebPage::AlignLeft)->isEnabled(), false);
     1184    QCOMPARE(page->action(QWebPage::AlignRight)->isEnabled(), false);
     1185
     1186    // Select everything
     1187    page->triggerAction(QWebPage::SelectAll);
     1188
     1189    // make sure it is enabled since there is a selection
     1190    QCOMPARE(page->action(QWebPage::Copy)->isEnabled(), true);
    9731191
    9741192    // make it editable before navigating the cursor
    9751193    page->setContentEditable(true);
    9761194
     1195    // clear the selection
     1196    page->triggerAction(QWebPage::MoveToStartOfDocument);
     1197    QVERIFY(page->isSelectionCollapsed());
     1198    QCOMPARE(page->selectionStartOffset(), 0);
     1199
     1200    // make sure it is disabled since there isn't a selection
     1201    QCOMPARE(page->action(QWebPage::Copy)->isEnabled(), false);
     1202
    9771203    // here the actions are enabled after contentEditable is true
     1204    QCOMPARE(page->action(QWebPage::Paste)->isEnabled(), true);
    9781205    QCOMPARE(page->action(QWebPage::DeleteStartOfWord)->isEnabled(), true);
    9791206    QCOMPARE(page->action(QWebPage::DeleteEndOfWord)->isEnabled(), true);
     
    9861213    QCOMPARE(page->action(QWebPage::InsertParagraphSeparator)->isEnabled(), true);
    9871214    QCOMPARE(page->action(QWebPage::InsertLineSeparator)->isEnabled(), true);
     1215    QCOMPARE(page->action(QWebPage::PasteAndMatchStyle)->isEnabled(), true);
     1216    QCOMPARE(page->action(QWebPage::ToggleStrikethrough)->isEnabled(), true);
     1217    QCOMPARE(page->action(QWebPage::ToggleSubscript)->isEnabled(), true);
     1218    QCOMPARE(page->action(QWebPage::ToggleSuperscript)->isEnabled(), true);
     1219    QCOMPARE(page->action(QWebPage::InsertUnorderedList)->isEnabled(), true);
     1220    QCOMPARE(page->action(QWebPage::InsertOrderedList)->isEnabled(), true);
     1221    QCOMPARE(page->action(QWebPage::Indent)->isEnabled(), true);
     1222    QCOMPARE(page->action(QWebPage::Outdent)->isEnabled(), true);
     1223    QCOMPARE(page->action(QWebPage::AlignCenter)->isEnabled(), true);
     1224    QCOMPARE(page->action(QWebPage::AlignJustified)->isEnabled(), true);
     1225    QCOMPARE(page->action(QWebPage::AlignLeft)->isEnabled(), true);
     1226    QCOMPARE(page->action(QWebPage::AlignRight)->isEnabled(), true);
     1227   
     1228    // make sure these are disabled since there isn't a selection
     1229    QCOMPARE(page->action(QWebPage::Cut)->isEnabled(), false);
     1230    QCOMPARE(page->action(QWebPage::RemoveFormat)->isEnabled(), false);
     1231   
     1232    // make sure everything is selected
     1233    page->triggerAction(QWebPage::SelectAll);
     1234   
     1235    // this is only true if there is an editable selection
     1236    QCOMPARE(page->action(QWebPage::Cut)->isEnabled(), true);
     1237    QCOMPARE(page->action(QWebPage::RemoveFormat)->isEnabled(), true);
    9881238
    9891239    delete page;
    9901240}
    9911241
     1242void tst_QWebPage::requestCache()
     1243{
     1244    TestPage page;
     1245    QSignalSpy loadSpy(&page, SIGNAL(loadFinished(bool)));
     1246
     1247    page.mainFrame()->setUrl(QString("data:text/html,<a href=\"data:text/html,Reached\" target=\"_blank\">Click me</a>"));
     1248    QTRY_COMPARE(loadSpy.count(), 1);
     1249    QTRY_COMPARE(page.navigations.count(), 1);
     1250
     1251    page.mainFrame()->setUrl(QString("data:text/html,<a href=\"data:text/html,Reached\" target=\"_blank\">Click me2</a>"));
     1252    QTRY_COMPARE(loadSpy.count(), 2);
     1253    QTRY_COMPARE(page.navigations.count(), 2);
     1254
     1255    page.triggerAction(QWebPage::Stop);
     1256    QVERIFY(page.history()->canGoBack());
     1257    page.triggerAction(QWebPage::Back);
     1258
     1259    QTRY_COMPARE(loadSpy.count(), 3);
     1260    QTRY_COMPARE(page.navigations.count(), 3);
     1261    QCOMPARE(page.navigations.at(0).request.attribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferNetwork).toInt(),
     1262             (int)QNetworkRequest::PreferNetwork);
     1263    QCOMPARE(page.navigations.at(1).request.attribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferNetwork).toInt(),
     1264             (int)QNetworkRequest::PreferNetwork);
     1265    QCOMPARE(page.navigations.at(2).request.attribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferNetwork).toInt(),
     1266             (int)QNetworkRequest::PreferCache);
     1267}
     1268
     1269void tst_QWebPage::backActionUpdate()
     1270{
     1271    QWebView view;
     1272    QWebPage *page = view.page();
     1273    QAction *action = page->action(QWebPage::Back);
     1274    QVERIFY(!action->isEnabled());
     1275    QSignalSpy loadSpy(page, SIGNAL(loadFinished(bool)));
     1276    QUrl url = QUrl("qrc:///frametest/index.html");
     1277    page->mainFrame()->load(url);
     1278    QTRY_COMPARE(loadSpy.count(), 1);
     1279    QVERIFY(!action->isEnabled());
     1280    QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(10, 10));
     1281    QTRY_COMPARE(loadSpy.count(), 2);
     1282
     1283    QVERIFY(action->isEnabled());
     1284}
     1285
     1286void frameAtHelper(QWebPage* webPage, QWebFrame* webFrame, QPoint framePosition)
     1287{
     1288    if (!webFrame)
     1289        return;
     1290
     1291    framePosition += QPoint(webFrame->pos());
     1292    QList<QWebFrame*> children = webFrame->childFrames();
     1293    for (int i = 0; i < children.size(); ++i) {
     1294        if (children.at(i)->childFrames().size() > 0)
     1295            frameAtHelper(webPage, children.at(i), framePosition);
     1296
     1297        QRect frameRect(children.at(i)->pos() + framePosition, children.at(i)->geometry().size());
     1298        QVERIFY(children.at(i) == webPage->frameAt(frameRect.topLeft()));
     1299    }
     1300}
     1301
     1302void tst_QWebPage::frameAt()
     1303{
     1304    QWebView webView;
     1305    QWebPage* webPage = webView.page();
     1306    QSignalSpy loadSpy(webPage, SIGNAL(loadFinished(bool)));
     1307    QUrl url = QUrl("qrc:///frametest/iframe.html");
     1308    webPage->mainFrame()->load(url);
     1309    QTRY_COMPARE(loadSpy.count(), 1);
     1310    frameAtHelper(webPage, webPage->mainFrame(), webPage->mainFrame()->pos());
     1311}
     1312
     1313void tst_QWebPage::inputMethods_data()
     1314{
     1315    QTest::addColumn<QString>("viewType");
     1316    QTest::newRow("QWebView") << "QWebView";
     1317#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     1318    QTest::newRow("QGraphicsWebView") << "QGraphicsWebView";
     1319#endif
     1320}
     1321
     1322#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     1323static Qt::InputMethodHints inputMethodHints(QObject* object)
     1324{
     1325    if (QGraphicsObject* o = qobject_cast<QGraphicsObject*>(object))
     1326        return o->inputMethodHints();
     1327    if (QWidget* w = qobject_cast<QWidget*>(object))
     1328        return w->inputMethodHints();
     1329    return Qt::InputMethodHints();
     1330}
     1331#endif
     1332
     1333static bool inputMethodEnabled(QObject* object)
     1334{
     1335#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     1336    if (QGraphicsObject* o = qobject_cast<QGraphicsObject*>(object))
     1337        return o->flags() & QGraphicsItem::ItemAcceptsInputMethod;
     1338#endif
     1339    if (QWidget* w = qobject_cast<QWidget*>(object))
     1340        return w->testAttribute(Qt::WA_InputMethodEnabled);
     1341    return false;
     1342}
     1343
     1344void tst_QWebPage::inputMethods()
     1345{
     1346    QFETCH(QString, viewType);
     1347    QWebPage* page = new QWebPage;
     1348    QObject* view = 0;
     1349    QObject* container = 0;
     1350    if (viewType == "QWebView") {
     1351        QWebView* wv = new QWebView;
     1352        wv->setPage(page);
     1353        view = wv;
     1354        container = view;
     1355    }
     1356#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     1357    else if (viewType == "QGraphicsWebView") {
     1358        QGraphicsWebView* wv = new QGraphicsWebView;
     1359        wv->setPage(page);
     1360        view = wv;
     1361
     1362        QGraphicsView* gv = new QGraphicsView;
     1363        QGraphicsScene* scene = new QGraphicsScene(gv);
     1364        gv->setScene(scene);
     1365        scene->addItem(wv);
     1366        wv->setGeometry(QRect(0, 0, 500, 500));
     1367
     1368        container = gv;
     1369    }
     1370#endif
     1371    else
     1372        QVERIFY2(false, "Unknown view type");
     1373
     1374    page->settings()->setFontFamily(QWebSettings::SerifFont, "FooSerifFont");
     1375    page->mainFrame()->setHtml("<html><body>" \
     1376                                            "<input type='text' id='input1' style='font-family: serif' value='' maxlength='20'/><br>" \
     1377                                            "<input type='password'/>" \
     1378                                            "</body></html>");
     1379    page->mainFrame()->setFocus();
     1380
     1381    EventSpy viewEventSpy(container);
     1382
     1383    QWebElementCollection inputs = page->mainFrame()->documentElement().findAll("input");
     1384
     1385    QMouseEvent evpres(QEvent::MouseButtonPress, inputs.at(0).geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier);
     1386    page->event(&evpres);
     1387    QMouseEvent evrel(QEvent::MouseButtonRelease, inputs.at(0).geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier);
     1388    page->event(&evrel);
     1389
     1390#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     1391    QVERIFY(!viewEventSpy.contains(QEvent::RequestSoftwareInputPanel));
     1392#endif
     1393    viewEventSpy.clear();
     1394
     1395    page->event(&evpres);
     1396    page->event(&evrel);
     1397
     1398#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     1399    QVERIFY(viewEventSpy.contains(QEvent::RequestSoftwareInputPanel));
     1400#endif
     1401
     1402    //ImMicroFocus
     1403    QVariant variant = page->inputMethodQuery(Qt::ImMicroFocus);
     1404    QRect focusRect = variant.toRect();
     1405    QVERIFY(inputs.at(0).geometry().contains(variant.toRect().topLeft()));
     1406
     1407    //ImFont
     1408    variant = page->inputMethodQuery(Qt::ImFont);
     1409    QFont font = variant.value<QFont>();
     1410    QCOMPARE(page->settings()->fontFamily(QWebSettings::SerifFont), font.family());
     1411
     1412    QList<QInputMethodEvent::Attribute> inputAttributes;
     1413
     1414    //Insert text.
     1415    {
     1416        QInputMethodEvent eventText("QtWebKit", inputAttributes);
     1417        QSignalSpy signalSpy(page, SIGNAL(microFocusChanged()));
     1418        page->event(&eventText);
     1419        QCOMPARE(signalSpy.count(), 0);
     1420    }
     1421
     1422    {
     1423        QInputMethodEvent eventText("", inputAttributes);
     1424        eventText.setCommitString(QString("QtWebKit"), 0, 0);
     1425        page->event(&eventText);
     1426    }
     1427
     1428#if QT_VERSION >= 0x040600
     1429    //ImMaximumTextLength
     1430    variant = page->inputMethodQuery(Qt::ImMaximumTextLength);
     1431    QCOMPARE(20, variant.toInt());
     1432
     1433    //Set selection
     1434    inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 3, 2, QVariant());
     1435    QInputMethodEvent eventSelection("",inputAttributes);
     1436    page->event(&eventSelection);
     1437
     1438    //ImAnchorPosition
     1439    variant = page->inputMethodQuery(Qt::ImAnchorPosition);
     1440    int anchorPosition =  variant.toInt();
     1441    QCOMPARE(anchorPosition, 3);
     1442
     1443    //ImCursorPosition
     1444    variant = page->inputMethodQuery(Qt::ImCursorPosition);
     1445    int cursorPosition =  variant.toInt();
     1446    QCOMPARE(cursorPosition, 5);
     1447
     1448    //ImCurrentSelection
     1449    variant = page->inputMethodQuery(Qt::ImCurrentSelection);
     1450    QString selectionValue = variant.value<QString>();
     1451    QCOMPARE(selectionValue, QString("eb"));
     1452#endif
     1453
     1454    //ImSurroundingText
     1455    variant = page->inputMethodQuery(Qt::ImSurroundingText);
     1456    QString value = variant.value<QString>();
     1457    QCOMPARE(value, QString("QtWebKit"));
     1458
     1459#if QT_VERSION >= 0x040600
     1460    {
     1461        QList<QInputMethodEvent::Attribute> attributes;
     1462        // Clear the selection, so the next test does not clear any contents.
     1463        QInputMethodEvent::Attribute newSelection(QInputMethodEvent::Selection, 0, 0, QVariant());
     1464        attributes.append(newSelection);
     1465        QInputMethodEvent event("composition", attributes);
     1466        page->event(&event);
     1467    }
     1468
     1469    // A ongoing composition should not change the surrounding text before it is committed.
     1470    variant = page->inputMethodQuery(Qt::ImSurroundingText);
     1471    value = variant.value<QString>();
     1472    QCOMPARE(value, QString("QtWebKit"));
     1473#endif
     1474
     1475    //ImhHiddenText
     1476    QMouseEvent evpresPassword(QEvent::MouseButtonPress, inputs.at(1).geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier);
     1477    page->event(&evpresPassword);
     1478    QMouseEvent evrelPassword(QEvent::MouseButtonRelease, inputs.at(1).geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier);
     1479    page->event(&evrelPassword);
     1480
     1481    QVERIFY(inputMethodEnabled(view));
     1482#if QT_VERSION >= 0x040600
     1483    QVERIFY(inputMethodHints(view) & Qt::ImhHiddenText);
     1484
     1485    page->event(&evpres);
     1486    page->event(&evrel);
     1487    QVERIFY(!(inputMethodHints(view) & Qt::ImhHiddenText));
     1488#endif
     1489
     1490    page->mainFrame()->setHtml("<html><body><p>nothing to input here");
     1491    viewEventSpy.clear();
     1492
     1493    QWebElement para = page->mainFrame()->findFirstElement("p");
     1494    {
     1495        QMouseEvent evpres(QEvent::MouseButtonPress, para.geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier);
     1496        page->event(&evpres);
     1497        QMouseEvent evrel(QEvent::MouseButtonRelease, para.geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier);
     1498        page->event(&evrel);
     1499    }
     1500
     1501#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     1502    QVERIFY(!viewEventSpy.contains(QEvent::RequestSoftwareInputPanel));
     1503#endif
     1504
     1505    delete container;
     1506}
     1507
     1508// import a little DRT helper function to trigger the garbage collector
     1509void QWEBKIT_EXPORT qt_drt_garbageCollector_collect();
     1510
     1511void tst_QWebPage::protectBindingsRuntimeObjectsFromCollector()
     1512{
     1513    QSignalSpy loadSpy(m_view, SIGNAL(loadFinished(bool)));
     1514
     1515    PluginPage* newPage = new PluginPage(m_view);
     1516    m_view->setPage(newPage);
     1517
     1518    m_view->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
     1519
     1520    m_view->setHtml(QString("<html><body><object type='application/x-qt-plugin' classid='lineedit' id='mylineedit'/></body></html>"));
     1521    QTRY_COMPARE(loadSpy.count(), 1);
     1522
     1523    newPage->mainFrame()->evaluateJavaScript("function testme(text) { var lineedit = document.getElementById('mylineedit'); lineedit.setText(text); lineedit.selectAll(); }");
     1524
     1525    newPage->mainFrame()->evaluateJavaScript("testme('foo')");
     1526
     1527    qt_drt_garbageCollector_collect();
     1528
     1529    // don't crash!
     1530    newPage->mainFrame()->evaluateJavaScript("testme('bar')");
     1531}
     1532
     1533void tst_QWebPage::localURLSchemes()
     1534{
     1535    int i = QWebSecurityOrigin::localSchemes().size();
     1536    QWebSecurityOrigin::removeLocalScheme("file");
     1537    QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i);
     1538    QWebSecurityOrigin::addLocalScheme("file");
     1539    QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i);
     1540    QString myscheme = "myscheme";
     1541    QWebSecurityOrigin::addLocalScheme(myscheme);
     1542    QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i + 1);
     1543    QVERIFY(QWebSecurityOrigin::localSchemes().contains(myscheme));
     1544    QWebSecurityOrigin::removeLocalScheme(myscheme);
     1545    QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i);
     1546    QWebSecurityOrigin::removeLocalScheme(myscheme);
     1547    QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i);
     1548}
     1549
     1550static inline bool testFlag(QWebPage& webPage, QWebSettings::WebAttribute settingAttribute, const QString& jsObjectName, bool settingValue)
     1551{
     1552    webPage.settings()->setAttribute(settingAttribute, settingValue);
     1553    return webPage.mainFrame()->evaluateJavaScript(QString("(window.%1 != undefined)").arg(jsObjectName)).toBool();
     1554}
     1555
     1556void tst_QWebPage::testOptionalJSObjects()
     1557{
     1558    // Once a feature is enabled and the JS object is accessed turning off the setting will not turn off
     1559    // the visibility of the JS object any more. For this reason this test uses two QWebPage instances.
     1560    // Part of the test is to make sure that the QWebPage instances do not interfere with each other so turning on
     1561    // a feature for one instance will not turn it on for another.
     1562
     1563    QWebPage webPage1;
     1564    QWebPage webPage2;
     1565
     1566    webPage1.currentFrame()->setHtml(QString("<html><body>test</body></html>"), QUrl());
     1567    webPage2.currentFrame()->setHtml(QString("<html><body>test</body></html>"), QUrl());
     1568
     1569    QEXPECT_FAIL("","Feature enabled/disabled checking problem. Look at bugs.webkit.org/show_bug.cgi?id=29867", Continue);
     1570    QCOMPARE(testFlag(webPage1, QWebSettings::OfflineWebApplicationCacheEnabled, "applicationCache", false), false);
     1571    QCOMPARE(testFlag(webPage2, QWebSettings::OfflineWebApplicationCacheEnabled, "applicationCache", true),  true);
     1572    QEXPECT_FAIL("","Feature enabled/disabled checking problem. Look at bugs.webkit.org/show_bug.cgi?id=29867", Continue);
     1573    QCOMPARE(testFlag(webPage1, QWebSettings::OfflineWebApplicationCacheEnabled, "applicationCache", false), false);
     1574    QCOMPARE(testFlag(webPage2, QWebSettings::OfflineWebApplicationCacheEnabled, "applicationCache", false), true);
     1575
     1576    QCOMPARE(testFlag(webPage1, QWebSettings::LocalStorageEnabled, "localStorage", false), false);
     1577    QCOMPARE(testFlag(webPage2, QWebSettings::LocalStorageEnabled, "localStorage", true),  true);
     1578    QCOMPARE(testFlag(webPage1, QWebSettings::LocalStorageEnabled, "localStorage", false), false);
     1579    QCOMPARE(testFlag(webPage2, QWebSettings::LocalStorageEnabled, "localStorage", false), true);
     1580}
     1581
     1582void tst_QWebPage::testEnablePersistentStorage()
     1583{
     1584    QWebPage webPage;
     1585
     1586    // By default all persistent options should be disabled
     1587    QCOMPARE(webPage.settings()->testAttribute(QWebSettings::LocalStorageEnabled), false);
     1588    QCOMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineStorageDatabaseEnabled), false);
     1589    QCOMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineWebApplicationCacheEnabled), false);
     1590    QVERIFY(webPage.settings()->iconDatabasePath().isEmpty());
     1591
     1592    QWebSettings::enablePersistentStorage();
     1593
     1594    // Give it some time to initialize - icon database needs it
     1595    QTest::qWait(1000);
     1596
     1597    QCOMPARE(webPage.settings()->testAttribute(QWebSettings::LocalStorageEnabled), true);
     1598    QCOMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineStorageDatabaseEnabled), true);
     1599    QCOMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineWebApplicationCacheEnabled), true);
     1600
     1601    QVERIFY(!webPage.settings()->offlineStoragePath().isEmpty());
     1602    QVERIFY(!webPage.settings()->offlineWebApplicationCachePath().isEmpty());
     1603    QVERIFY(!webPage.settings()->iconDatabasePath().isEmpty());
     1604}
     1605
     1606void tst_QWebPage::defaultTextEncoding()
     1607{
     1608    QWebFrame* mainFrame = m_page->mainFrame();
     1609
     1610    QString defaultCharset = mainFrame->evaluateJavaScript("document.defaultCharset").toString();
     1611    QVERIFY(!defaultCharset.isEmpty());
     1612    QCOMPARE(QWebSettings::globalSettings()->defaultTextEncoding(), defaultCharset);
     1613
     1614    m_page->settings()->setDefaultTextEncoding(QString("utf-8"));
     1615    QString charset = mainFrame->evaluateJavaScript("document.defaultCharset").toString();
     1616    QCOMPARE(charset, QString("utf-8"));
     1617    QCOMPARE(m_page->settings()->defaultTextEncoding(), charset);
     1618
     1619    m_page->settings()->setDefaultTextEncoding(QString());
     1620    charset = mainFrame->evaluateJavaScript("document.defaultCharset").toString();
     1621    QVERIFY(!charset.isEmpty());
     1622    QCOMPARE(charset, defaultCharset);
     1623
     1624    QWebSettings::globalSettings()->setDefaultTextEncoding(QString("utf-8"));
     1625    charset = mainFrame->evaluateJavaScript("document.defaultCharset").toString();
     1626    QCOMPARE(charset, QString("utf-8"));
     1627    QCOMPARE(QWebSettings::globalSettings()->defaultTextEncoding(), charset);
     1628}
     1629
     1630class ErrorPage : public QWebPage
     1631{
     1632public:
     1633
     1634    ErrorPage(QWidget* parent = 0): QWebPage(parent)
     1635    {
     1636    }
     1637
     1638    virtual bool supportsExtension(Extension extension) const
     1639    {
     1640        return extension == ErrorPageExtension;
     1641    }
     1642
     1643    virtual bool extension(Extension, const ExtensionOption* option, ExtensionReturn* output)
     1644    {
     1645        const ErrorPageExtensionOption* info = static_cast<const ErrorPageExtensionOption*>(option);
     1646        ErrorPageExtensionReturn* errorPage = static_cast<ErrorPageExtensionReturn*>(output);
     1647
     1648        if (info->frame == mainFrame()) {
     1649            errorPage->content = "data:text/html,error";
     1650            return true;
     1651        }
     1652
     1653        return false;
     1654    }
     1655};
     1656
     1657void tst_QWebPage::errorPageExtension()
     1658{
     1659    ErrorPage* page = new ErrorPage;
     1660    m_view->setPage(page);
     1661
     1662    QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool)));
     1663
     1664    page->mainFrame()->load(QUrl("qrc:///frametest/index.html"));
     1665    QTRY_COMPARE(spyLoadFinished.count(), 1);
     1666
     1667    page->mainFrame()->setUrl(QUrl("http://non.existent/url"));
     1668    QTest::qWait(2000);
     1669    QTRY_COMPARE(spyLoadFinished.count(), 2);
     1670    QCOMPARE(page->mainFrame()->toPlainText(), QString("data:text/html,error"));
     1671    QCOMPARE(page->history()->count(), 2);
     1672    QCOMPARE(page->history()->currentItem().url(), QUrl("http://non.existent/url"));
     1673    QCOMPARE(page->history()->canGoBack(), true);
     1674    QCOMPARE(page->history()->canGoForward(), false);
     1675
     1676    page->triggerAction(QWebPage::Back);
     1677    QTest::qWait(2000);
     1678    QCOMPARE(page->history()->canGoBack(), false);
     1679    QCOMPARE(page->history()->canGoForward(), true);
     1680
     1681    page->triggerAction(QWebPage::Forward);
     1682    QTest::qWait(2000);
     1683    QCOMPARE(page->history()->canGoBack(), true);
     1684    QCOMPARE(page->history()->canGoForward(), false);
     1685
     1686    page->triggerAction(QWebPage::Back);
     1687    QTest::qWait(2000);
     1688    QCOMPARE(page->history()->canGoBack(), false);
     1689    QCOMPARE(page->history()->canGoForward(), true);
     1690    QCOMPARE(page->history()->currentItem().url(), QUrl("qrc:///frametest/index.html"));
     1691
     1692    m_view->setPage(0);
     1693}
     1694
     1695void tst_QWebPage::crashTests_LazyInitializationOfMainFrame()
     1696{
     1697    {
     1698        QWebPage webPage;
     1699    }
     1700    {
     1701        QWebPage webPage;
     1702        webPage.selectedText();
     1703    }
     1704    {
     1705        QWebPage webPage;
     1706        webPage.triggerAction(QWebPage::Back, true);
     1707    }
     1708    {
     1709        QWebPage webPage;
     1710        QPoint pos(10,10);
     1711        webPage.updatePositionDependentActions(pos);
     1712    }
     1713}
     1714
     1715static void takeScreenshot(QWebPage* page)
     1716{
     1717    QWebFrame* mainFrame = page->mainFrame();
     1718    page->setViewportSize(mainFrame->contentsSize());
     1719    QImage image(page->viewportSize(), QImage::Format_ARGB32);
     1720    QPainter painter(&image);
     1721    mainFrame->render(&painter);
     1722    painter.end();
     1723}
     1724
     1725void tst_QWebPage::screenshot_data()
     1726{
     1727    QTest::addColumn<QString>("html");
     1728    QTest::newRow("WithoutPlugin") << "<html><body id='b'>text</body></html>";
     1729    QTest::newRow("WindowedPlugin") << QString("<html><body id='b'>text<embed src='resources/test.swf'></embed></body></html>");
     1730    QTest::newRow("WindowlessPlugin") << QString("<html><body id='b'>text<embed src='resources/test.swf' wmode='transparent'></embed></body></html>");
     1731}
     1732
     1733void tst_QWebPage::screenshot()
     1734{
     1735    QDir::setCurrent(SRCDIR);
     1736
     1737    QFETCH(QString, html);
     1738    QWebPage* page = new QWebPage;
     1739    page->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
     1740    QWebFrame* mainFrame = page->mainFrame();
     1741    mainFrame->setHtml(html, QUrl::fromLocalFile(QDir::currentPath()));
     1742    if (html.contains("</embed>")) {
     1743        // some reasonable time for the PluginStream to feed test.swf to flash and start painting
     1744        QTest::qWait(2000);
     1745    }
     1746
     1747    // take screenshot without a view
     1748    takeScreenshot(page);
     1749
     1750    QWebView* view = new QWebView;
     1751    view->setPage(page);
     1752
     1753    // take screenshot when attached to a view
     1754    takeScreenshot(page);
     1755
     1756    delete page;
     1757    delete view;
     1758
     1759    QDir::setCurrent(QApplication::applicationDirPath());
     1760}
     1761
     1762void tst_QWebPage::originatingObjectInNetworkRequests()
     1763{
     1764    TestNetworkManager* networkManager = new TestNetworkManager(m_page);
     1765    m_page->setNetworkAccessManager(networkManager);
     1766    networkManager->requests.clear();
     1767
     1768    m_view->setHtml(QString("data:text/html,<frameset cols=\"25%,75%\"><frame src=\"data:text/html,"
     1769                            "<head><meta http-equiv='refresh' content='1'></head>foo \">"
     1770                            "<frame src=\"data:text/html,bar\"></frameset>"), QUrl());
     1771    QVERIFY(::waitForSignal(m_view, SIGNAL(loadFinished(bool))));
     1772
     1773    QCOMPARE(networkManager->requests.count(), 2);
     1774
     1775    QList<QWebFrame*> childFrames = m_page->mainFrame()->childFrames();
     1776    QCOMPARE(childFrames.count(), 2);
     1777
     1778#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     1779    for (int i = 0; i < 2; ++i)
     1780        QVERIFY(qobject_cast<QWebFrame*>(networkManager->requests.at(i).originatingObject()) == childFrames.at(i));
     1781#endif
     1782}
    9921783
    9931784QTEST_MAIN(tst_QWebPage)
  • trunk/src/3rdparty/webkit/WebKit/qt/tests/tests.pro

    r2 r561  
    11
    22TEMPLATE = subdirs
    3 SUBDIRS = qwebframe qwebpage qwebhistoryinterface
     3SUBDIRS = qwebframe qwebpage qwebelement qgraphicswebview qwebhistoryinterface qwebview qwebhistory
     4greaterThan(QT_MINOR_VERSION, 4): SUBDIRS += benchmarks/painting/tst_painting.pro benchmarks/loading/tst_loading.pro
Note: See TracChangeset for help on using the changeset viewer.